1 / 39

Chapter 4: Network Layer

4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP IPv6. 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP

claude
Download Presentation

Chapter 4: Network Layer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing Chapter 4: Network Layer

  2. routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 2 2 1 value in arriving packet’s header 1 0111 2 3 Interplay between routing, forwarding • There is a difference between routing and forwarding • Forwarding • Forwarding is the act of taking a packet from an input interface and sending a packet out on an output interface. • This requires using the destination address and looking in the forwarding table to determine the next-hop (= output interface) • Routing • The act of generating forwarding tables

  3. B C E A D Vertices: A, B, C, D, E Edges: (A,B), (B,C), (C,D), (C,E), (E,D) Graph Abstraction Abstraction: a model (i.e., some aspects of the real system are missing or only approximated) and a generalization (i.e., it can represent other things beside the original object) • Graphs have two components • Vertices (nodes) • Edges (links) • Graph abstraction • IP Networks: Routers are vertices and links are edges • WWW: Web pages are vertices and “hot links” are edges • Social networks: people are vertices and relationships are edges • Zillions of other graph abstractions • This means that techniques from graph theory can be applied • Graph theory is a part of discrete mathematics • Other important theoretical areas include probability (stochastic processes and quueing theory), optimization, and algortihms

  4. An example of a directed graph with weighted edges 2 2 B C E 1 3 5 A D 3 All of these types of graphs are important in networking Types of Graphs • Directed graphs v.s. undirected graphs • In directed graphs, edges have direction • In undirected graphs, edges are bidirectional • Graphs with weighted edges • Graphs with weighted vertices

  5. 2 2 B C E 2 2 1 1 5 5 3 5 5 A D 3 Graphs • Edge weights can represent • Bit-rate • Give an example where bit-rates are asymmetric • DSL, Comcast • E.g., comcastr has 16Mbps download and 768kbps upload • Delay • Congestion • Security/robustness • Cost • Service provides may charge per bit • Abstract cost representing several of the above • Node weights can represent • Remaining battery power • Security/robustness • (Graph theory focuses more on weighted vertices than weighted edges. But graphs with weighted edges can be transformed into similar graphs with weighted vertices.)

  6. Concepts from Graph Theory • A graph is connected if it is possible to reach any node from any node. • If the graph is directed, then the movement between nodes must follow the direction of the edge • K-connected: a graph is k-edge-connected if it remains connected when k edges are removed. • K-connected is an important concept for robustness. • Least cost/hop path • If each edge has the same cost, then a least cost path is the same as the least hop path • Find the least hop path between A and E • Find the least cost path between A and E • Routing is concerned with finding least cost paths. • Diameter of a graph is the maximum length of all least hop paths • What is the diameter of the graph below • The degree of a vertex = the number of edges emanating from vertex • In networking, the out-degree is the number of output interfaces and the in-degree is the the number of input interfaces • In social networks, the degree is the number of “friends” a vertex has • In the web, the out-degree of a page is the number of links a page has • In the web, the in-degree of a page is the number of other pages that have links to the page • Degree can be used to measure importance • Max-flow • If edge weights are the capacities of edges, then what is the maximum flow can be sent from one node to another? • What is the maximum flow from A to E 2 2 B C E 1 3 5 A D 3

  7. Global information: all routers have complete topology and link cost info “link state” routing algorithms have global information OSPF and ISIS are examples of link-state routing protocols OLSR is a link state protocol for ad hoc wireless networks Local information: router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors “distance vector” algorithms use local information RIP is an example of a distance vector routing protocol RIP and distance vector routing is not widely used Routing with Global or Local Topology Information Distance vector: Pros • Routers only need to get information from their neighbors • Low overhead (in theory) Cons • However, an iterative scheme is required, which might require many iterations before convergence • It might take a long time for the routing to converge • In the meantime, there might be loops • Will a pkt remain in a loop forever? • Loops can cause congestion • Excessive overhead to achieve timely convergence Link state: Cons • Overhead is required to ensure that all routers have • An up-to-date “picture” of the topology • Have a consistent “picture” of the topology • Otherwise loops can occur Pros • Routes can be immediately computed, there is no problems with convergence

  8. Static or dynamic Static: routes change only when manually changed Dynamic: routes change when the topology changes periodic update in response to link cost changes Adaptive Route change even when the topology remains constant, e.g., when the traffic changes. Adaptive routing is rarely used in the internet It is used in some the Philadelphia mesh network What should be optimized when find routes Nothing, just get packets to the destination E.g., the pkt follows a random path Least cost paths where cost is The number of hops Total energy (in wireless Transmission and receptions require energy) Maximum energy Congestion total congestion along the path Worst-case congestion End-to-end Delay Money Probability of arrival at destination Administrative cost The network administrator adjust the cost so that several of the above are represented in the cost. Types of Routing Algorithms

  9. 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP Chapter 4: Network Layer

  10. Three tasks must be accomplished Determine the link state hello messages so that bidirectionality is determined Exchange/flood topology information Link state flooding Link database synchronization Compute routes Dijkstra’s algorithm – a fast way to compute least cost paths A Link-State Routing Algorithm e.g., OSPF (open shortest path first (open, because anyone can use it, as oppose to ISIS which belongs to cisco))

  11. Determining link state - Hello • A link is “up” if it is bi-directional • If a node hears a hello from a router, then the link is known to be unidirectional. • The hello packet contains a list of neighboring routers that have recently sent hello packets. • If a router has not heard a hello from a neighboring router in 40 seconds, then it removes the router from the list of routers that have recently sent hello packets. • A router should send a hello every 10 seconds

  12. Link State Generation and Flooding • Link state announcement generation • A router will generate is own link state announcement (LSA) within 30 minutes • or when link change is detected and flood it to all its neighbors. • The LSA contains the state of the ability to communicate with all its neighbors • i.e., link is up or down • No information such as congestion is used in OSPF • Flooding • When a LSA exchanges between routers are reliable • When an LSA is received, an ACK is sent. • The router resends the LSA until either an ACK is received or the link is no longer bidirectional. • Since exchanges are reliable, LSA flooding is reliable • Routers don’t flood to routers that sent the LSA, but to all others. • Routers only flood if the LSA is new • If a router gets a “new” LSA, then it floods it to its neighbors. • LSAs are stored in a LSA database • Sequence numbers are used to determine if a received LSA is newer than the one in the database • How could the LSA be in the database be newer than the one that was received? • Rules for LSA comparison • Highest sequence number is newest. • Else highest checksum is newest. • Else if one of the ages is MaxAge, it is newest. • Else if ages differ by more than 15 minutes (MaxAgeDiff), lowest age is newest. • Else LSAs are the same. • An LSA in a router is replaced when a “newer” one is received. • So updating the link state database implies that the LSA is flooded Aside: we’ve seen sequence numbers in all three layers so far (there are in MAC layer as well)

  13. Database sync • After a link comes up, the database must synchronized. • After receiving a hello with the router in the recently heard list, the router sends a datebase seq number. (this acts as a hello to make the link fully bidirectional • The routers exchange link state announcement headers only. (Each LSA contains the list of links from a single router and a sequence number). • Each router then requests LSAs it does not have. • These LSA are then flooding to neighbors in the usual way. • Note, that usually a router will only generate its own LSAs • But when a link comes up, its neighbor will generate LSAs from its database that are announcing links besides its own links • These generated LSAs will be flooded by the neighbor router. • Of course, if the neighbors of the just-up router have already received these LSAs, they will not propagation the LSAs • But, these LSAs are new to some neighbors, they will be propagated. This can happen when the network is partitioned. • If a router did not generate the LSAs in this way, it would take 30 minutes for the network to stabilize after a un-partitioning (i.e., when a router comes up so that the network switches from partitioned to unpartitioned)

  14. B B>A, although, the number A > the number B B A 0x00000 B>A A 0xFFFFF B A In this case, we don’t know if A >B In 9181, the original ARPA net tried such an approach (without CRC or checksum). Transmission errors lead to three different sequence numbers being generated. They had to reboot! S1 • An update with seq num=S1 arrives – so update LS database • An update with seq num=S2 arrives, so update the Ls database • An Update with seq num=S# arrives, so update LS databass, • Then back to 1… S3 S2 Sequence numbers • When a router crashes and reboots, how does it know which seq. num to use? If it uses 0x00000 and other routers in the network still have LSA from this router, then the other routers will ignore its LSAs. • note, a router will only use a link if it has up-to-date LSAs from routers on both ends • So, if a router receives its own LSA, but with a larger seq num, it will increase its own seq no. • What about wrap around? • You could take an circular approach • B>A if (A+X)%0xfffff = B and (B+Y)%0xfffff = A, and X<Y.

  15. OSPF uses 0x8000001 as the smallest seq num and 0x7fffffff as the largest. No wrap around permitted. To reset the seq num to 0x800001, the router must clear the LSA from the other routers. LSAs will not be accepted faster than once per 5 seconds. So wrap around will not occur for 600 years. But what if an attacker is able to put in an incorrect LSA. OSPF has some authentication of LSAs What if there are multiple failures that require udpates closer than 5 seconds. If faster than 5 sec was permitted, then an attacker or a faulty link could generate a large number of LSAs and cause wide spread routing problems Also, the seq num could reach 0x7FFFFFFF in which case the router would have to be brought offline for a little while OSPF Sequence numbers

  16. LS Age (timeout) • A router will generate a LSA every 30 minutes • If the LS Age reaches 1 hour, the LSA is removed from the database. • However, it is important that all routers remove the LSA together (why?) • Routers must have a consistent view of the network • But, if an LSA has not been generated, then perhaps the router is down, in which case the router on the other side should have generated a LSA declaring the link is down. • But if the network is partitioned, then no such LSA is generated. • To remove the LSA, an LSA is flooded with LS age=1 hour. • ? If a router goes down, the other routers will not remove the LSA from this router for an hour. • Would this lead to routing problems? • No, the routing will only use links that are advertised by both routers. • If a router wants to remove its LSAs, then it can flood an LSA with LS Age = MaxAge (1 hour). • This will delete the LSAs. • But, if this real LS ages are not close to 1 hour, then an LSA with age=max-age can only be generated by the originating router.

  17. OSPF • For each Neighbor • If TimeSinceLastHello>10 sec • Send hello • If TimeSinceLastLSAWasGenerated > 30 minutes • Generate new LSA • Flood new LSA • If received an LSA • ACK LSA • Check if LSA is a new LSA • If LSA AGE == MaxLSA Age and LSA is in LSA data base, then delete LSA and flood LSA to neighbors (except the one that sent the LSA) • If LSA is new, then put LSA into LSA database, increment LSA age and flood to neighbors. If topology has changed, recompute forwarding table • Else (I.e., not new), quietly discard LSA • For each LSA in database • Check if LSA Age is greater than 60 minutes • If LSA age is greater than 60 minutes, generate a copy of the LSA but with the LSA Age=MaxAge. Flood this LSA and delete LSA • On reboot or upon rediscovery of a neighbor exchange link state databases and flood any required LSA from the exchange • Consider a link that is brought up so the network is no longer paritioned • that here the node on the edge of the link does not initiate the flood, but the node on each side of the partition do. • When computing the forwarding table, only links that are advertised by both ends are used.

  18. See other slides Dijkstra’s Algorithm

  19. 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing Chapter 4: Network Layer

  20. c(B,C)=2 B C c(A,B)=1 c(C,F)=1 c(C,D)=6 c(B,E)=6 A F c(E,F)=2 c(A,D)=12 D E c(D,E)=1 Dynamic Programming Bellman-Ford Equation (dynamic programming) Dynamic programming is one of the major achievements in the 20th century Objective: find the least cost path between two vertices in a graph Approach 1: list all possible paths and select the smallest one Drawback: Too many possible paths. The number of paths grows exponentially with the number of vertices

  21. Then we must have D(i,j) = min { c(i,k) + D(k,j) } k  neighbors of i c(B,C)=2 B C c(A,B)=1 c(C,F)=1 c(C,D)=6 c(B,E)=6 F c(E,F)=2 c(A,D)=12 D E c(D,E)=1 Dynamic Programming Bellman-Ford Equation (dynamic programming) Dynamic programming is one of the major achievements in the 20th century Objective: find the least cost path between two vertices in a graph. Approach 2: Dynamic programming • Let D(i,j) be the end-to-end cost from vertex i to vertex j. • Let c(i,j) be the edge cost along the edge from vertex i to vertex j. D(B,F)=3 D(C,F)=1 What is D(A,F)? A’s neighbors are B and D. D(A,F) = min{ c(A,B)+D(B,F), c(A,D)+D(D,F) } D(A,F) = min{ 1 + 3, 12+3} D(A,F) = min{4, 15} = 4 D(F,F)=0 A D(A,F)=? D(E,F)=2 D(D,F)=3 Assume: c(i,j)=c(j,i)

  22. D(n+1,i,j) = min { c(i,k) + D(n,k,j) } Let k  neighbors of i Then D(i,j) = min { c(i,k) + D(k,j) } k  neighbors of i Dynamic Programming • Let c(i,j) be the edge cost along the edge from vertex i to vertex j. • Let D(n,i,j) be the estimate of end-to-end cost from vertex i to vertex j at the nth iteration. Then limnD(n,i,j) exists (i.e., the above converges) Let D(i,j) := limnD(n,i,j)

  23. Then D(i,j) = min { c(i,k) + D(k,j) } k  neighbors of i D(n+1,i,j) = min { c(i,k) + D(n,k,j) } Let k  neighbors of i 2 B C 1 1 6 24 A F 6 2 2 D E Dynamic Programming Let c(i,j) be the edge cost along the edge from vertex i to vertex j. Let D(i,j) := limnD(n,i,j) Initialization: n=0 D(0,C,F) =  D(0,B,F) =  D(0,A,F) =  D(0,F,F)=0 1 D(0,E,F) =  D(0,D,F) = 

  24. Then D(i,j) = min { c(i,k) + D(k,j) } k  neighbors of i D(n+1,i,j) = min { c(i,k) + D(n,k,j) } Let k  neighbors of i 2 B C 1 1 6 24 A F 6 2 2 D E Dynamic Programming Let c(i,j) be the edge cost along the edge from vertex i to vertex j. Let D(i,j) := limnD(n,i,j) Iteration 1: n=1 D(0,C,F) =  D(1,C,F) = min{c(C,B)+D(0,B,F), c(C,D)+D(0,D,F) c(C,F)+D(0,f,F)} = min{ 2 + , 6 + , 1 + 0} = 1 D(0,B,F) =  D(1,B,F) = min{c(B,A)+D(0,A,F), c(B,C)+D(0,C,F)} = min{ 1 + , 2 + } =  D(0,A,F) =  D(1,A,F) = min{c(A,B)+D(0,B,F), c(A,D)+D(0,D,F), c(A,E)+D(0,E,F) c(A,F)+D(0,F,F)} = min{ 1 + , 2 + , 6 + , 24 + 0} = 24 D(0,F,F)=0 D(1,F,F)=0 1 D(0,E,F) =  D(1,E,F) = min{c(E,A)+D(0,A,F), c(E,D)+D(0,D,F), c(E,F)+D(0,F,F)} = min{ 6 + , 1 + , 2 + 0 } = 2 D(0,D,F) =  D(1,D,E) = min{c(D,A)+D(0,A,F), c(D,C)+D(0,C,F), c(D,E)+D(0,E,F)} = min{ 2 + , 6 + , 1 + } = 

  25. Then D(i,j) = min { c(i,k) + D(k,j) } k  neighbors of i D(n+1,i,j) = min { c(i,k) + D(n,k,j) } Let k  neighbors of i 2 B C 1 1 6 24 A F 6 2 2 D E Dynamic Programming Let c(i,j) be the edge cost along the edge from vertex i to vertex j. Let D(i,j) := limnD(n,i,j) Iteration 2: n=2 D(1,C,F) = 1 D(2,C,F) = min{c(C,B)+D(1,B,F), c(C,D)+D(1,D,F) c(C,F)+D(1,f,F)} = min{ 2 + , 6 + , 1 + 0} = 1 D(1,B,F) =  D(2,B,F) = min{c(B,A)+D(1,A,F), c(B,C)+D(1,C,F)} = min{ 1 + 24, 2 + 1} = 3 D(1,A,F) = 24 D(2,A,F) = min{c(A,B)+D(1,B,F), c(A,D)+D(1,D,F), c(A,E)+D(1,E,F) c(A,F)+D(1,F,F)} = min{ 1 + , 2 + , 6 + 2, 24 + 0} = 8 D(0,F,F)=0 D(1,F,F)=0 D(2,F,F)=0 1 D(1,E,F) = 2 D(2,E,F) = min{c(E,A)+D(1,A,F), c(E,D)+D(1,D,F), c(E,F)+D(1,F,F)} = min{ 6 + 24, 1 + , 2 + 0 } = 2 D(1,D,F) =  D(2,D,E) = min{c(D,A)+D(2,A,F), c(D,C)+D(2,C,F), c(D,E)+D(2,E,F)} = min{ 2 + 24, 6 + 1, 1 + 2} = 3

  26. Then D(i,j) = min { c(i,k) + D(k,j) } k  neighbors of i D(n+1,i,j) = min { c(i,k) + D(n,k,j) } Let k  neighbors of i 2 B C 1 1 6 24 A F 6 2 2 D E Dynamic Programming Let c(i,j) be the edge cost along the edge from vertex i to vertex j. Let D(i,j) := limnD(n,i,j) Iteration 3: n=3 D(2,C,F) = 1 D(3,C,F) = min{c(C,B)+D(2,B,F), c(C,D)+D(2,D,F) c(C,F)+D(2,f,F)} = min{ 2 + 3, 6 + 3, 1 + 0} = 1 D(2,B,F) = 3 D(3,B,F) = min{c(B,A)+D(2,A,F), c(B,C)+D(2,C,F)} = min{ 1 + 8, 2 + 1} = 3 D(2,A,F) = 8 D(3,A,F) = min{c(A,B)+D(2,B,F), c(A,D)+D(2,D,F), c(A,E)+D(2,E,F) c(A,F)+D(2,F,F)} = min{ 1 + 3, 2 + 3, 6 + 2, 24 + 0} = 4 D(0,F,F)=0 D(1,F,F)=0 D(2,F,F)=0 D(3,F,F)=0 1 D(2,E,F) = 2 D(3,E,F) = min{c(E,A)+D(2,A,F), c(E,D)+D(2,D,F), c(E,F)+D(2,F,F)} = min{ 6 + 8, 1 + 3, 2 + 0 } = 2 D(2,D,F) = 3 D(3,D,E) = min{c(D,A)+D(2,A,F), c(D,C)+D(2,C,F), c(D,E)+D(2,E,F)} = min{ 2 + 8, 6 + 1, 1 + 2} = 3

  27. Then D(i,j) = min { c(i,k) + D(k,j) } k  neighbors of i D(n+1,i,j) = min { c(i,k) + D(n,k,j) } Let k  neighbors of i 2 B C 1 1 6 24 A F 6 2 2 D E Dynamic Programming Let c(i,j) be the edge cost along the edge from vertex i to vertex j. Let D(i,j) := limnD(n,i,j) Iteration 4: n=4 D(3,C,F) = 1 D(4,C,F) = min{c(C,B)+D(3,B,F), c(C,D)+D(3,D,F) c(C,F)+D(3,f,F)} = min{ 2 + 3, 6 + 3, 1 + 0} = 1 D(3,B,F) = 3 D(4,B,F) = min{c(B,A)+D(3,A,F), c(B,C)+D(3,C,F)} = min{ 1 + 8, 2 + 1} = 3 D(3,A,F) = 8 D(4,A,F) = min{c(A,B)+D(3,B,F), c(A,D)+D(3,D,F), c(A,E)+D(3,E,F) c(A,F)+D(3,F,F)} = min{ 1 + 3, 2 + 3, 6 + 2, 24 + 0} = 4 D(0,F,F)=0 D(1,F,F)=0 D(2,F,F)=0 D(3,F,F)=0 1 D(3,E,F) = 2 D(4,E,F) = min{c(E,A)+D(3,A,F), c(E,D)+D(3,D,F), c(E,F)+D(3,F,F)} = min{ 6 + 8, 1 + 3, 2 + 0 } = 2 D(3,D,F) = 3 D(4,D,E) = min{c(D,A)+D(3,A,F), c(D,C)+D(3,C,F), c(D,E)+D(3,E,F)} = min{ 2 + 8, 6 + 1, 1 + 2} = 3 Nothing changed, so done!

  28. Iterative, asynchronous: each local iteration caused by: local link cost change (hello messages) DV update message from neighbor Distributed: each node notifies neighbors only when its DV changes Each node: wait for (change in local link cost or msg from neighbor) recompute estimates if DV to any dest has changed, notify neighbors Distance Vector Algorithm

  29. 1 4 1 50 x z y Distance Vector: link cost changes Link cost changes: • node detects local link cost change • updates routing info, recalculates distance vector • if DV changes, notify neighbors At time t0, y detects the link-cost change, updates its DV, and informs its neighbors. “good news travels fast” At time t1, z receives the update from y and updates its table. It computes a new least cost to x and sends its neighbors its DV. At time t2, y receives z’s update and updates its distance table. y’s least costs do not change and hence y does not send any message to z.

  30. Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B C D E A B C D E A B C D E A B C D E C C C D E B B C D D A B C C C D D D D E A B B B B 3 2 1 0 1 2 1 0 1 2 4 3 2 1 0 0 1 2 3 4 1 0 1 2 3 Distance Vector: Bad news travels slowly 1 1 1 1 B C D A E

  31. Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B C D E A B C D E A B C D E A B C D E B B C D D D D D D E A B C C C C C C D E A B B B B 3 2 1 0 1 0 1 2 3 4 4 3 2 1 0 1 0 1 2 3 2 1 0 1 2 Distance Vector: Bad news travels slowly link break  1 1 1 B C D A E Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2 3     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 2 C min{2+1, +0} ? 3 ?

  32. Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B C D E A B C D E A B C D E A B C D E D D D D E C C C D E B B C D D A B B B B A B C C C 3 2 1 0 1 4 3 2 1 0 2 1 0 1 2 0 1 2 3 4 1 0 1 2 3 Distance Vector: Bad news travels slowly link break  1 1 1 B C D A E Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2 3     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 2 C 3 Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2 3     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 3 min{3+1, 3+1} C

  33. Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B C D E A B C D E A B C D E A B C D E B B C D D A B B B B C C C D E D D D D E A B C C C 0 1 2 3 4 4 3 2 1 0 3 2 1 0 1 2 1 0 1 2 1 0 1 2 3 Distance Vector: Bad news travels slowly link break  1 1 1 B C D A E Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2 3     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 2 C 3 Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2 3     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 3 C 4 Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 min{4+1, 4+1} min{4+1, +1} 4 C

  34. Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B C D E A B C D E A B C D E A B C D E C C C D E A B C C C B B C D D D D D D E A B B B B 0 1 2 3 4 4 3 2 1 0 3 2 1 0 1 1 0 1 2 3 2 1 0 1 2 Distance Vector: Bad news travels slowly link break  1 1 1 B C D A E Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2 3     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 2 C 3 Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2 3     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 3 C 4 Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 5 4 C 5 Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 A B C D E A B C C C 1 0 1 2     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 5+1 5 C min{5+1, 5+1} 5

  35. Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B C D E A B C D E A B C D E A B C D E A B C C C A B B B B B B C D D D D D D E C C C D E 1 0 1 2 3 4 3 2 1 0 2 1 0 1 2 0 1 2 3 4 3 2 1 0 1 Distance Vector: Bad news travels slowly link break  1 1 1 B C D A E Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 5 4 C 5 Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 A B C D E A B C C C 1 0 1 2     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 6 C min{6+1, 6+1} 6 min{6+1, +1}

  36. Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B C D E A B C D E A B C D E A B C D E D D D D E C C C D E B B C D D A B B B B A B C C C 0 1 2 3 4 4 3 2 1 0 1 0 1 2 3 2 1 0 1 2 3 2 1 0 1 Distance Vector: Bad news travels slowly link break  1 1 1 B C D A E Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 4 A B C D E A B C C C 1 0 1 2     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 5 4 C 5 Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 A B C D E A B C C C 1 0 1 2     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 6 C 7 6 7 Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost Dest. Next hop Cost A B C D E A B B B B 0 1 2 3 A B C D E A B C C C 1 0 1 2     0 A B C D E C C C D 3 2 1 0 A B C D E D D D D E A B C D E B B C D D 2 1 0 1 8 5 C 5 8

  37. Distance Vector: Bad news travels slowly Poisoned reverse: • If Z routes through Y to get to X : • Z tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z) • will this completely solve count to infinity problem? • No, there are cases where it will not

  38. Message complexity LS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors only convergence time varies Speed of Convergence LS: O(n2) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: DV node can advertise incorrect path cost each node’s table used by others error propagate thru network Comparison of LS and DV algorithms

  39. 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing Chapter 4: Network Layer

More Related