network and communications ju wang chapter 5 routing algorithm adopted from choi’s notes virginia...
TRANSCRIPT
Network and Communications
Ju Wang
Chapter 5
Routing Algorithm
Adopted from Choi’s notes
Virginia Commonwealth University
Design Issues
Store-and Forward packet Switching
Services Provided to the Transport layer
Implementation of Connectionless Service
Implementation of Connection oriented Service
Comparison of Virtual Circuit and Datagram Subnet
Store and Forward Packet Switching
Design Issues
Services Provided to the Transport Layer
Goals
Independent on the router technology
Router information shielding(number, type and topology)
Global and uniform network address
Datagram Switching
Implementation of Connection Oriented Service
Virtual circuit subnet
Every packet carry virtual circuit id and follows same route
Label switching (virtual circuit)
Design IssuesComparison of Virtual Circuits and Datagram subnet
Routing Algorithms
Routing algorithm is desirable if…
Correctness, simplicity, robustness, stability,fairness, optimality
NL Goal: Routing packets from the source to destination
Algorithm and data structure ?
Decision per packets
Why? Best route
What about VC?
Session routing
Correctness?
Simplicity
Stability
Need to converge to equilibrium
Fairness and optimality? Contradictory goals
Robustness
To topology and traffic change
What to optimize?
Mean packet delay? Network throughput?
Minimize the number of hop
Routing AlgorithmsPrinciple of optimality
If J is on the optimal path from I to K, then the optimal path from J to K also falls along the same route
Proof:
So what?
Sink tree
No cycles guarantee the bounded-hop delivery in real life?
Routing AlgorithmsShortest path Routing
Routing AlgorithmsFlooding
Send packet to every outgoing line except the one it arrives
– duplicated redundant packet
- hop count
Routing AlgorithmsDistance Vector Routing (Bellman Ford)
Problem?
Table giving the best known distance to each destination and line to use
Count to Infinity problem
Routing AlgorithmsLink State Routing
Each router must do the following:
1. Discover its neighbors, learn their network address.
2. Measure the delay or cost to each of its neighbors.
3. Construct a packet telling all it has just learned.
4. Send this packet to all other routers.
5. Compute the shortest path to every other router
Computing the New Route using Dijkstra
Building Link State Packets
Routing AlgorithmsHierarchical Routing
Save space! At the cost of path length (1A to 5C)
Routing AlgorithmsBroadcasting, Multicasting
Spanning tree
•Given–Graph G = (V,E)–Edge weights w: w(e) is weight for edge e.
•Find a spanning tree T which has minimum weight, i.e., minimum spanning tree
Recall, a spanning tree is a subgraph that is a tree that includes all the nodes.
Examples
4
8
11
71
6
24
8 7
2
14
9
10
1 2
4
8
11
76
24
8 7
14
9
10
Min SpanningTree = 37
SpanningTree = 42
Kruskal’s Algorithm: Basic Idea
• Start with a collection of subtrees Actually, each node is a subtree
• Find the lightest edge joining two subtrees• Keep doing this until there is a single subtree
4
8
11
71
6
24
8 7
2
14
9
10
Kruskal’s Algorithm: Basic Idea
Prim’s Algorithm: Basic Idea
• Start with a single subtree of ONE node• Grow this subtree by adding the lightest
edge coming out of it.• Keep doing this until the subtree is a
spanning tree.
4
8
11
71
6
24
8 7
2
14
9
10
Prim’s Algorithm: Basic Idea