Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Network Layer Part 1: Routing EE 122, Fall 2013 Sylvia Ratnasamy

Similar presentations


Presentation on theme: "The Network Layer Part 1: Routing EE 122, Fall 2013 Sylvia Ratnasamy"— Presentation transcript:

1 The Network Layer Part 1: Routing EE 122, Fall 2013 Sylvia Ratnasamy http://inst.eecs.berkeley.edu/~ee122/

2 Starting on the internals of the network layer Today Application Transport Network Link Layer Physical

3 Many pieces to the network layer Addressing Routing Forwarding Policy and management IP protocol details … Today + next 1-2 lectures: Routing

4 Context and Terminology “End hosts” “Clients”, “Users” “End points” “End hosts” “Clients”, “Users” “End points” “Interior Routers” “Border Routers” “Autonomous System (AS)” or “Domain” Region of a network under a single administrative entity “Route” or “Path”

5 Lecture#2: Routers Forward Packets to MIT to UW UCB to NYU DestinationNext Hop UCB4 UW5 MIT2 NYU3 Forwarding Table 111010010 MIT switch#2 switch#5 switch#3 switch#4

6 Context and Terminology 111010010 MITMIT Destination MIT Internet routing protocols are responsible for constructing and updating the forwarding tables at routers

7 Routing Protocols Routing protocols implement the core function of a network Establish paths between nodes Part of the network’s “control plane” Network modeled as a graph Routers are graph vertices Links are edges Edges have an associated “cost” e.g., distance, loss Goal: compute a “good” path from source to destination “good” usually means the shortest (least cost) path A E D CB F 2 2 1 3 1 1 2 5 3 5

8 Internet Routing Internet Routing works at two levels Each AS runs an intra-domain routing protocol that establishes routes within its domain (AS -- region of network under a single administrative entity) Link State, e.g., Open Shortest Path First (OSPF) Distance Vector, e.g., Routing Information Protocol (RIP) ASes participate in an inter-domain routing protocol that establishes routes between domains Path Vector, e.g., Border Gateway Protocol (BGP)

9 Addressing (for now) Assume each host has a unique ID (address) No particular structure to those IDs Later in course will talk about real IP addressing

10 Outline Link State Distance Vector Routing: goals and metrics (if time)

11 Link-State

12 Link State Routing Each node maintains its local “link state” (LS) i.e., a list of its directly attached links and their costs (N1,N2) (N1,N4) (N1,N5) Host A Host B Host E Host D Host C N1 N2 N3 N4 N5 N7N6

13 Link State Routing Each node maintains its local “link state” (LS) Each node floods its local link state on receiving a new LS message, a router forwards the message to all its neighbors other than the one it received the message from Host A Host B Host E Host D Host C N1 N2 N3 N4 N5 N7N6 (N1,N2) (N1, N4) (N1, N5) (N1,N2) (N1, N4) (N1, N5) (N1,N2) (N1, N4) (N1, N5) (N1,N2) (N1, N4) (N1, N5) (N1,N2) (N1, N4) (N1, N5) (N1,N2) (N1, N4) (N1, N5) (N1,N2) (N1, N4) (N1, N5) (N1,N2) (N1, N4) (N1, N5) (N1,N2) (N1, N4) (N1, N5) (N1,N2) (N1, N4) (N1, N5)

14 Link State Routing Each node maintains its local “link state” (LS) Each node floods its local link state Hence, each node learns the entire network topology Can use Dijkstra’s to compute the shortest paths between nodes Host A Host B Host E Host D Host C N1 N2 N3 N4 N5 N7N6 A B E D C A B E D C A B E D C A B E D C A B E D C A B E D C A B E D C

15 How to Compute Routes Each node should have same global view They each compute their own routing tables Using exactly the same algorithm Can use any algorithm that avoids loops Computing shortest paths is one such algorithm Associate “cost” with links, don’t worry what it means…. Dijkstra’s algorithm is one way to compute shortest paths

16 “Least Cost” Routes No sensible cost metric will be minimized by traversing a loop “Least cost” routes an easy way to avoid loops Least cost routes are also “destination-based” i.e., do not depend on the source Why is this? Therefore, least-cost paths form a spanning tree 16

17 Dijkstra’s Shortest Path Algorithm INPUT: Network topology (graph), with link costs OUTPUT: Least cost paths from one node to all other nodes Iterative: after k iterations, a node knows the least cost path to its k closest neighbors

18 Example A E D CB F 2 2 1 3 1 1 2 5 3 5

19 Notation c(i,j): link cost from node i to j; cost is infinite if not direct neighbors; ≥ 0 D(v): total cost of the current least cost path from source to destination v p(v): v’s predecessor along path from source to v S: set of nodes whose least cost path definitively known A E D CB F 2 2 1 3 1 1 2 5 3 5 Source

20 Dijkstra’s Algorithm 1 Initialization: 2 S = {A}; 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v); 6 else D(v) = ; 7 8 Loop 9 find w not in S such that D(w) is a minimum; 10 add w to S; 11 update D(v) for all v adjacent to w and not in S: 12 if D(w) + c(w,v) < D(v) then // w gives us a shorter path to v than we’ve found so far 13 D(v) = D(w) + c(w,v); p(v) = w; 14 until all nodes in S; c(i,j): link cost from node i to j D(v): current cost source  v p(v): v’s predecessor along path from source to v S: set of nodes whose least cost path definitively known

21 Intuition S (V-S) remaining nodes w

22 Example: Dijkstra’s Algorithm Step 0 1 2 3 4 5 set S A D(B),p(B) 2,A D(C),p(C) 5,A D(D),p(D) 1,A D(E),p(E) D(F),p(F) A E D CB F 2 2 1 3 1 1 2 5 3 5 1 Initialization: 2 S = {A}; 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v); 6 else D(v) = ; …

23 Example: Dijkstra’s Algorithm Step 0 1 2 3 4 5 set S A D(B),p(B) 2,A D(C),p(C) 5,A … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12If D(w) + c(w,v) < D(v) then 13 D(v) = D(w) + c(w,v); p(v) = w; 14 until all nodes in S; A E D CB F 2 2 1 3 1 1 2 5 3 5 D(D),p(D) 1,A D(E),p(E) D(F),p(F)

24 Example: Dijkstra’s Algorithm Step 0 1 2 3 4 5 set S A AD D(B),p(B) 2,A D(C),p(C) 5,A D(D),p(D) 1,A D(E),p(E) D(F),p(F) A E D CB F 2 2 1 3 1 1 2 5 3 5 … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12If D(w) + c(w,v) < D(v) then 13 D(v) = D(w) + c(w,v); p(v) = w; 14 until all nodes in S;

25 Example: Dijkstra’s Algorithm Step 0 1 2 3 4 5 set S A AD D(B),p(B) 2,A D(C),p(C) 5,A 4,D D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) A E D CB F 2 2 1 3 1 1 2 5 3 5 … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12If D(w) + c(w,v) < D(v) then 13 D(v) = D(w) + c(w,v); p(v) = w; 14 until all nodes in S;

26 Example: Dijkstra’s Algorithm Step 0 1 2 3 4 5 set S A AD ADE D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) 4,E A E D CB F 2 2 1 3 1 1 2 5 3 5 … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12If D(w) + c(w,v) < D(v) then 13 D(v) = D(w) + c(w,v); p(v) = w; 14 until all nodes in S;

27 Example: Dijkstra’s Algorithm Step 0 1 2 3 4 5 set S A AD ADE ADEB D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) 4,E A E D CB F 2 2 1 3 1 1 2 5 3 5 … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12If D(w) + c(w,v) < D(v) then 13 D(v) = D(w) + c(w,v); p(v) = w; 14 until all nodes in S;

28 Example: Dijkstra’s Algorithm Step 0 1 2 3 4 5 set S A AD ADE ADEB ADEBC D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) 4,E A E D C B F 2 2 1 3 1 1 2 5 3 5 … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12If D(w) + c(w,v) < D(v) then 13 D(v) = D(w) + c(w,v); p(v) = w; 14 until all nodes in S;

29 Example: Dijkstra’s Algorithm Step 0 1 2 3 4 5 set S A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) 4,E A E D CB F 2 2 1 3 1 1 2 5 3 5 … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12If D(w) + c(w,v) < D(v) then 13 D(v) = D(w) + c(w,v); p(v) = w; 14 until all nodes in S;

30 Example: Dijkstra’s Algorithm Step 0 1 2 3 4 5 set S A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) 4,E A E D CB F 2 2 1 3 1 1 2 5 3 5 To determine path A  C (say), work backward from C via p(v)

31 Running Dijkstra at node A gives the shortest path from A to all destinations We then construct the forwarding table The Forwarding Table A E D CB F 2 2 1 3 1 1 2 5 3 5 DestinationLink B(A,B) C(A,D) D E F

32 Issue #1: Scalability How many messages needed to flood link state messages? O(N x E), where N is #nodes; E is #edges in graph Processing complexity for Dijkstra’s algorithm? O(N 2 ), because we check all nodes w not in S at each iteration and we have O(N) iterations more efficient implementations: O(N log(N)) How many entries in the LS topology database? O(E) How many entries in the forwarding table? O(N)

33 33 Flooding the Topology Information Each router sends information out its ports The next node sends it out through all of its ports Except the one where the information arrived Need to remember previous msgs, suppress duplicates! X A CBD (a) XA C BD (b) X A CB D (c) XA CBD (d)

34 Making Flooding Reliable Reliable flooding Ensure all nodes receive link-state information Ensure all nodes use the latest version Challenges Packet loss Out-of-order arrival Solutions Acknowledgments and retransmissions Sequence numbers How can it still fail? 34

35 When to Initiate Flood? Topology change Link or node failure Link or node recovery Configuration change Link cost change Potential problems with making cost dynamic! Periodically Refresh the link-state information Typically (say) 30 minutes Corrects for possible corruption of the data

36 Convergence Getting consistent routing information to all nodes E.g., all nodes having the same link-state database Forwarding is consistent after convergence All nodes have the same link-state database All nodes forward packets on same paths

37 37 Convergence Delay Time elapsed before every router has a consistent picture of the network Sources of convergence delay Detection latency Flooding of link-state information Recomputation of forwarding tables Storing forwarding tables Performance during convergence period Lost packets due to blackholes and TTL expiry Looping packets consuming resources Out-of-order packets reaching the destination Very bad for VoIP, online gaming, and video

38 Inconsistent link-state database Some routers know about failure before others The shortest paths are no longer consistent Can cause transient forwarding loops Issue#2: Transient Disruptions A E D CB F A and D think that this is the path to C E thinks that this is the path to C A E D CB F Loop!

39 39 Reducing Convergence Delay Faster detection Smaller “hello” timers Link-layer technologies that can detect failures Faster flooding Flooding immediately Sending link-state packets with high-priority Faster computation Faster processors on the routers Incremental Dijkstra algorithm Faster forwarding-table update Data structures supporting incremental updates

40 Distance Vector

41 Learn-By-Doing Let’s try to collectively develop distance-vector routing from first principles

42 Experiment Your job: find the youngest person in the room Ground Rules You may not leave your seat, nor shout loudly across the class You may talk with your immediate neighbors (hint: “exchange updates” with them) At the end of 5 minutes, I will pick a victim and ask: who is the youngest person in the room? (name, date) which one of your neighbors first told you this info.?

43 Go!

44 Distance-Vector

45 Example of Distributed Computation I am one hop away I am two hops away I am three hops away Destination I am three hops away

46 Routing “Metrics” Algorithm finds path with smallest hop-count More complicated if you route with a different metric Other routing goals (besides hop-count) Path with highest capacity Path with lowest latency Path with most reliable links …. Generally, assume every link has “cost” or weight associated with it, and you want to minimize cost

47 Two Ways to Avoid Loops Global state, local computation Link-state Broadcast local information, construct network map Local state, global computation Distance-Vector Minimizing “cost” will produce loop-free routes Iterative computation: no one knows the topology

48 Distance Vector Routing Each router knows the links to its neighbors Does not flood this information to the whole network Each router has provisional “shortest path” to every other router E.g.: Router A: “I can get to router B with cost 11” Routers exchange this distance vector information with their neighboring routers Vector because one entry per destination Routers look over the set of options offered by their neighbors and select the best one Iterative process converges to set of shortest paths

49 Bellman-Ford Algorithm INPUT: Link costs to each neighbor (Not full topology) OUTPUT: Next hop to each destination and the corresponding cost (Not the complete path to the destination) My neighbors tell me how far they are from dest’n Compute: (cost to nbr) plus (nbr’s cost to destination) Pick minimum as my choice Advertise that cost to my neighbors

50 Bellman-Ford Overview Each router maintains a table Best known distance from X to Y, via Z as next hop = D Z (X,Y) Each local iteration caused by: Local link cost change Message from neighbor Notify neighbors only if least cost path to any destination changes Neighbors then notify their neighbors if necessary wait for (change in local link cost or msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Each node:

51 Bellman-Ford Overview Each router maintains a table Row for each possible destination Column for each directly-attached neighbor to node Entry in row Y and column Z of node X  best known distance from X to Y, via Z as next hop = D Z (X,Y) A C 1 2 7 B D 3 1 BC B28 C37 D48 Node A Neighbor (next-hop) Destinations D C (A, D)

52 Bellman-Ford Overview Each router maintains a table Row for each possible destination Column for each directly-attached neighbor to node Entry in row Y and column Z of node X  best known distance from X to Y, via Z as next hop = D Z (X,Y) A C 1 2 7 B D 3 1 BC B28 C37 D48 Node A Smallest distance in row Y = shortest Distance of A to Y, D(A, Y)

53 Distance Vector Algorithm (cont’d) 1 Initialization: 2 for all neighbors V do 3 if V adjacent to A 4 D(A, V) = c(A,V); 5 else 6 D(A, V) = ∞; 7 send D(A, Y) to all neighbors loop: 8 wait (until A sees a link cost change to neighbor V /* case 1 */ 9 or until A receives update from neighbor V) /* case 2 */ 10 if (c(A,V) changes by ±d) /*  case 1 */ 11 for all destinations Y that go through V do 12 D V (A,Y) = D V (A,Y) ± d 13 else if (update D(V, Y) received from V) /*  case 2 */ /* shortest path from V to some Y has changed */ 14 D V (A,Y) = D V (A,V) + D(V, Y); /* may also change D(A,Y) */ 15 if (there is a new minimum for destination Y) 16 send D(A, Y) to all neighbors 17 forever c(i,j): link cost from node i to j D Z (A,V): cost from A to V via Z D(A,V): cost of A’s best path to V

54 wait for (change in local link cost or msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Each node: initialize, then Distance Vector Algorithm (cont’d)

55 1 Initialization: 2 for all neighbors V do 3 if V adjacent to A 4 D(A, V) = c(A,V); 5 else 6 D(A, V) = ∞; 7 send D(A, Y) to all neighbors loop: 8 wait (until A sees a link cost change to neighbor V /* case 1 */ 9 or until A receives update from neighbor V) /* case 2 */ 10 if (c(A,V) changes by ±d) /*  case 1 */ 11 for all destinations Y that go through V do 12 D V (A,Y) = D V (A,Y) ± d 13 else if (update D(V, Y) received from V) /*  case 2 */ /* shortest path from V to some Y has changed */ 14 D V (A,Y) = D V (A,V) + D(V, Y); /* may also change D(A,Y) */ 15 if (there is a new minimum for destination Y) 16 send D(A, Y) to all neighbors 17 forever c(i,j): link cost from node i to j D Z (A,V): cost from A to V via Z D(A,V): cost of A’s best path to V Distance Vector Algorithm (cont’d)

56 Example: Initialization A C 1 2 7 B D 3 1 BC B2∞ C∞7 D∞∞ Node A ACD A2∞∞ C∞1∞ D∞∞3 Node B Node C ABD A 7∞∞ B∞1∞ D∞∞1 BC A∞∞ B3∞ C∞1 Node D 1 Initialization: 2 for all neighbors V do 3 if V adjacent to A 4 D(A, V) = c(A,V); 5 else 6 D(A, V) = ∞; 7 send D(A, Y) to all neighbors

57 Example: C sends update to A A C 1 2 7 B D 3 1 BC B28 C∞7 D∞8 Node A ACD A2∞∞ C∞1∞ D∞∞3 Node B Node C ABD A 7∞∞ B∞1∞ D∞∞1 BC A∞∞ B3∞ C∞1 Node D 7loop: … 13 else if (update D(A, Y) from C) 14 D C (A,Y) = D C (A,C) + D(C, Y); 15 if (new min. for destination Y) 16 send D(A, Y) to all neighbors 17 forever D C (A, B) = D C (A,C) + D(C, B) = 7 + 1 = 8 D C (A, D) = D C (A,C) + D(C, D) = 7 + 1 = 8

58 Example: Now B sends update to A A C 1 2 7 B D 3 1 BC B28 C37 D58 Node A ACD A2∞∞ C∞1∞ D∞∞3 Node B Node C ABD A 7∞∞ B∞1 D∞∞1 Node D 7loop: … 13 else if (update D(A, Y) from B) 14 D B (A,Y) = D B (A,B) + D(B, Y); 15 if (new min. for destination Y) 16 send D(A, Y) to all neighbors 17 forever D B (A, C) = D B (A,B) + D(B, C) = 2 + 1 = 3 D B (A, D) = D B (A,B) + D(B, D) = 2 + 3 = 5 BC A∞∞ B3∞ C∞1 Make sure you know why this is 5, not 4!

59 Example: After 1 st Full Exchange A C 1 2 7 B D 3 1 BC B28 C37 D58 Node A Node B Node C ABD A 7 3∞ B914 D∞41 Node D BC A58 B32 C41 End of 1 st Iteration All nodes knows the best two-hop paths ACD A 2 8∞ C914 D∞23 Make sure you know why this is 3 Assume all send messages at same time

60 Example: Now A sends update to B A C 1 2 7 B D 3 1 BC B28 C37 D58 Node A Node B Node C ABD A 7 3∞ B914 D∞41 Node D BC A58 B32 C41 ACD A 2 8∞ C514 D723 7loop: … 13 else if (update D(B, Y) from A) 14 D A (B,Y) = D A (B,A) + D(A, Y); 15 if (new min. for destination Y) 16 send D(B, Y) to all neighbors 17 forever D A (B, C) = D A (B,A) + D(A, C) = 2 + 3 = 5 D A (B, D) = D A (B,A) + D(A, D) = 2 + 5 = 7 Where does this 5 come from?Where does this 7 come from?What harm does this cause?

61 Example: End of 2 nd Full Exchange A C 1 2 7 B D 3 1 BC B28 C37 D48 Node A ACD A 2 48 C514 D723 Node B Node C ABD A 7 36 B913 D1231 Node D BC A54 B32 C41 End of 2 nd Iteration All nodes knows the best three-hop paths Assume all send messages at same time

62 Example: End of 3rd Full Exchange A C 1 2 7 B D 3 1 BC B28 C37 D48 Node A ACD A 2 47 C514 D623 Node B Node C ABD A 7 35 B913 D1131 Node D BC A54 B32 C41 End of 3 rd Iteration: Algorithm Converges! What route does this 11 represent? Assume all send messages at same time

63 Intuition Initial state: best one-hop paths One simultaneous round: best two-hop paths Two simultaneous rounds: best three-hop paths … Kth simultaneous round: best (k+1) hop paths Must eventually converge as soon as it reaches longest best path …..but how does it respond to changes in cost? The key here is that the starting point is not the initialization, but some other set of entries. Convergence could be different!

64 DV: Link Cost Changes AC A46 C91 Node B AB A505 B541 Node C Link cost changes here AC A16 C61 AB A505 B541 AC A16 C31 AB A505 B511 AC A16 C31 AB A502 B511 BC B4 C550 Node A BC B151 C250 BC B151 C250 BC B151 C250 AC A13 C31 AB A 2 B511 BC B1 C250 Stable state A-B changed A sends tables to B, C B sends tables to C C sends tables to B A C 1 4 50 B 1 “good news travels fast”

65 DV: Count to Infinity Problem AC A46 C91 Node B AB A505 B541 Node C Link cost changes here AC A 606 C 651 AB A505 B541 AC A 606 C 1101 AB A 505 B 1011 AC A 606 C 1101 AB A 507 B 1011 BC B451 C550 Node A BC B 6051 C 6150 BC B 6051 C 6150 BC B 6051 C 6150 AC A 608 C 1101 AB A 507 B 1011 BC B 6051 C 6150 Stable state A-B changed A sends tables to B, C B sends tables to C C sends tables to B A C 1 4 50 B 60 “bad news travels slowly” (not yet converged)

66 DV: Poisoned Reverse AC A 4∞ C ∞1 Node B AB A505 B541 Node C Link cost changes here AC A 60∞ C ∞1 AB A505 B541 AC A 60∞ C 1101 AB A 505 B ∞1 AC A 60∞ C 1101 AB A 5061 B ∞1 BC B451 C550 Node A BC B 6051 C 6150 BC B 6051 C 6150 BC B 6051 C 6150 AC A 6051 C 1101 AB A 5061 B ∞1 BC B 6051 C 6150 Stable state A-B changed A sends tables to B, C B sends tables to C C sends tables to B A C 1 4 50 B 60 If B routes through C to get to A: -B tells C its (B’s) distance to A is infinite (so C won’t route to A via B) Note: this converges after C receives another update from B

67 Will Poison-Reverse Completely Solve the Count-to-Infinity Problem? A C 1 B D 1 11 11 22 ∞ ∞∞ 100 3 ∞ 4 ∞ 4 5 6

68 A few other inconvenient aspects What if we use a non-additive metric? E.g., maximal capacity What if routers don’t use the same metric? I want low delay, you want low loss rate? What happens if nodes lie?

69 Can You Use Any Metric? I said that we can pick any metric. Really? What about maximizing capacity?

70 What Happens Here? All nodes want to maximize capacityA high capacity link gets reduced to low capacity Problem:“cost” does not change around loop Additive measures avoid this problem!

71 No agreement on metrics? If the nodes choose their paths according to different criteria, then bad things might happen Example Node A is minimizing latency Node B is minimizing loss rate Node C is minimizing price Any of those goals are fine, if globally adopted Only a problem when nodes use different criteria Consider a routing algorithm where paths are described by delay, cost, loss

72 What Happens Here? Low price link Low loss link Low delay linkLow loss link Low delay link Low price link Cares about price, then loss Cares about delay, then price Cares about loss, then delay

73 Must agree on loop-avoiding metric When all nodes minimize same metric And that metric increases around loops Then process is guaranteed to converge

74 What happens when routers lie? What if a router claims a 1-hop path to everywhere? All traffic from nearby routers gets sent there How can you tell if they are lying? Can this happen in real life? It has, several times….

75 Link State vs. Distance Vector Core idea LS: tell all nodes about your immediate neighbors DV: tell your immediate neighbors about (your least cost distance to) all nodes

76 Link State vs. Distance Vector LS: each node learns the complete network map; each node computes shortest paths independently and in parallel DV: no node has the complete picture; nodes cooperate to compute shortest paths in a distributed manner  LS has higher messaging overhead  LS has higher processing complexity  LS is less vulnerable to looping

77 Link State vs. Distance Vector Message complexity LS: O(NxE) messages; N is #nodes; E is #edges DV: O(#Iterations x E) where #Iterations is ideally O(network diameter) but varies due to routing loops or the count-to-infinity problem Processing complexity LS: O(N 2 ) DV: O(#Iterations x N) Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: node can advertise incorrect path cost each node’s table used by others; error propagates through network

78 Routing: Just the Beginning Link state and distance-vector are the deployed routing paradigms for intra-domain routing Next lecture: inter-domain routing (BGP) new constraints: policy, privacy new solutions: path vector routing new pitfalls: truly ugly ones

79 What are desirable goals for a routing solution? “Good” paths (least cost) Fast convergence after change/failures no/rare loops Scalable #messages table size processing complexity Secure Policy Rich metrics (more later)

80 Delivery models What if a node wants to send to more than one destination? broadcast: send to all multicast: send to all members of a group anycast: send to any member of a group What if a node wants to send along more than one path?

81 Metrics Propagation delay Congestion Load balance Bandwidth (available, capacity, maximal, bbw) Price Reliability Loss rate Combinations of the above In practice, operators set abstract “weights” (much like our costs); how exactly is a bit of a black art


Download ppt "The Network Layer Part 1: Routing EE 122, Fall 2013 Sylvia Ratnasamy"

Similar presentations


Ads by Google