Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spring 20081 Routing: Part I Section 4.2 Outline Algorithms Scalability.

Similar presentations


Presentation on theme: "Spring 20081 Routing: Part I Section 4.2 Outline Algorithms Scalability."— Presentation transcript:

1 Spring 20081 Routing: Part I Section 4.2 Outline Algorithms Scalability

2 Spring 20082 Overview Forwarding vs Routing –forwarding: to select an output port based on destination address and routing table –routing: process by which routing table is built Network as a Graph –Assume single admin. authority –Assume nodes are routers –Assume each link has a cost The Routing Problem: Find lowest cost path (sum of links) between two nodes

3 Spring 20083 Routing Protocol Issues It may be simple to calculate least cost path if graph is static but… –Links and routers go down –Links and routers are added –Traffic can cause links to overload –How are costs calculated? –Algorithm must be distributed in order to scale –Different routers can have different routes at same time –Rich area for research due to distributed, dynamic nature of the problem

4 Spring 20084 Distance Vector Each node maintains a set of triples –(Destination, Cost, NextHop) forwarding only uses (Destination,NextHop) Directly connected neighbors exchange “route updates” –periodically (on the order of several seconds; called periodic update) –whenever table changes (called triggered update) Each update is a list of pairs: –( Destination, Cost) A router modifies its routing table if it receives a “new” route –smaller cost ( “better” route) –came from the next-hop used to reach a destination Refresh existing routing table entries –delete an entry if it times out

5 Spring 20085 Example Destination Cost NextHop A 1 A C 1 C D 2 C E 2 A F 2 A G 3 A Table of Router B

6 Spring 20086 Routing Loops: Example 1 F detects that the link to G has failed F sets distance to G to infinity and sends triggered update to A A sets distance to G to infinity since it uses F to reach G; sends triggered update to neighbors –C ignores this update since its route to G is vai D with a cost of 2 A receives periodic update from C with 2-hop path to G A sets distance to G to 3 and sends a triggered update F decides it can reach G in 4 hops via A Network stabilizes

7 Spring 20087 Routing Loops: Example 2 the following depends on exact timing of events: link from A to E fails, A advertises distance of infinity to E C advertise a distance of 2 to E (periodic updates) B processes update from A, then the update from C Based on update from C –B decides it can reach E in 3 hops; sends triggered update –A decides that it can reach E in 4 hops (Via B); sends triggered update –C decides that it can reach E in 5 hops; sends update to B Based on update from C –B decides it can reach E in 6 hops; sends triggered update –A decides that it can reach E in 7 hops (Via B); sends triggered update –C decides that it can reach E in 8 hops; sends update to B Based on update from C –cycle repeats –…..

8 Spring 20088 Routing Loops: Example 2 (continued) Cycle stops when distances reach infinity (some large number) For a period of time, no node knows that E is unreachable Routing tables do not stabilize This is known as the Count-to-infinity problem

9 Spring 20089 Loop- Breaking “Heuristics” Set infinity to 16 –Assume this is the maximum number of hops in network bounds the amount of time that it takes to count to infinity Split horizon –Works only for loops involving two nodes –Don’t send routes learned from a neighbor back to the neighbor B has the route (E, 2, A) in its table  it must have learned this route from A When B sends a periodic update to A  route (E, 2) is not included in update

10 Spring 200810 Loop- Breaking Heuristics (cont.) Split horizon with poison reverse –Send route back with negative information i.e. Infinite ensures that A will not use B to get to E.  B sends the route (E, ∞) to A.

11 Spring 200811 Loop- Breaking: What can be done ?? B and C wait after hearing of link failure from A before advertising routes to E –each would conclude that it really had no route to E However, this delays the convergence of the protocol (Distance Vector Routing)

12 Spring 200812 Link State Strategy –each node sends to all other nodes information about directly connected links Link State Packet (LSP) –id of the node that created the LSP –cost of link to each neighbor –sequence number (SEQNO) –time-to-live (TTL) for this packet

13 Spring 200813 Link State: Reliable flooding when reboot, start SEQNO of all initial LSPs at 0 generate new LSP periodically –increment SEQNO store most recent LSP from each node forward LSP to all nodes but one that sent it decrement TTL of each LSP before flooding it to neigbors –discard when TTL=0

14 Spring 200814 Link State Route Calculation: Dijkstra’s Shortest Path Algorithm Let –N denotes set of nodes in the graph –each node needs to execute the algorithm –l (i, j) denotes non-negative cost for edge (i, j) l (i, j) = ∞ if no edge connects i and j –s denotes this node (i.e. the node executing the algorithm to find the shortest path to all the other nodes in N) –for each node n != s which is a member in the set N, let C(n) denotes cost of the path from s to node n –At each point during the execution of the algorithm, let M denotes the set of nodes whose routes has been found so far

15 Spring 200815 Link State Route Calculation: Dijkstra’s Shortest Path Algorithm (cont.) M = {s} for each n in N - {s} C(n) = l(s, n) /* Costs of directly connected nodes */ while (M != N ) /* Add a node */ M = M union {w} such that C(w) is the minimum for all w in (N - M) for each n in (N - M) /* Recalculate costs */ C(n) = MIN(C(n), C (w) + l(w, n ))

16 Spring 200816 Route Calculation: Explanation start with M containing s initialize table of costs using known costs to directly connected nodes while M <> N 1.w: node reachable at lowest cost 2.update M : add w to M 3.update table of costs by considering the cost of reaching nodes through w choose a new route to node n through w if total cost of going from s to w and then following link from w to n is less than old route to n repeat until all nodes are incorporated in M

17 Spring 200817 Example: Node A Executing the Algorithm Itrn MB Path C Path D Path E Path F Path G Path 1 {A}2 A-B 5 A-C 1 A-D Inf. Inf. 1 A-G 2 {A,D}2 A-B 4 A-D-C 1 A-D 2 A-D-E Inf. 1 A-G 3 {A,D,G}2 A-B 4 A-D-C 1 A-D 2 A-D-E Inf. 1 A-G 4 {A,B,D,G}2 A-B 4 A-D-C 1 A-D 2 A-D-E Inf. 1 A-G 5 {A,B,D,E,G}2 A-B 3 A-D-E-C 1 A-D 2 A-D-E 4 A-D-E-F 1 A-G 6 {A,B,C,D,E2 A-B 3 A-D-E-C 1 A-D 2 A-D-E 4 A-D-E-F 1 A-G G} 7 {A,B,C,D,E2 A-B 3 A-D-E-C 1 A-D 2 A-D-E 4 A-D-E-F 1 A-G F,G} D G A B C E F 5 1 1 1 2 1 3 5 2 2 3

18 Spring 200818 Link State Routing Summary One of the oldest algorithm for routing Finds “Shortest Path” by developing paths in order of increasing length –Requires each node to have complete information about the network –Nodes exchange information with all other nodes in the network –Known to converge quickly under static conditions –Does not generate much network traffic

19 Spring 200819 Metrics for Link Cost Simplest method is to assign 1 to each link Original ARPANET metric –link cost = number of packets enqueued on each link This moves packets toward shortest queue not the destination!! took neither latency or bandwidth into consideration Newer ARPANET metric –link cost = average delay over some time period –stamp each incoming packet with its arrival time ( AT ) –record departure time ( DT ) –when link-level ACK arrives, compute Delay = (DT - AT) + Transmit + Latency  Transmit and latency are static for the link –if timeout, reset DT to departure time for retransmission –Fine Tuning (pp 287, 289)


Download ppt "Spring 20081 Routing: Part I Section 4.2 Outline Algorithms Scalability."

Similar presentations


Ads by Google