1 / 22

Distance Vector Routing – Dynamic Programming

Distance Vector Routing – Dynamic Programming. Limited state information. Just the next hop and cost. A. D. A. D. F. C. B. H. G. E. I. A. D. F. C. B. H. G. E. Distance Vector Routing – Dynamic Programming. Suppose a new node comes on line. I. I. A. D. F. C. B. H. G.

Download Presentation

Distance Vector Routing – Dynamic Programming

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. Distance Vector Routing – Dynamic Programming • Limited state information. Just the next hop and cost. A D A D F C B H G E University of Delaware CPEG 419

  2. I A D F C B H G E Distance Vector Routing – Dynamic Programming • Suppose a new node comes on line. I University of Delaware CPEG 419

  3. I A D F C B H G E Distance Vector Routing – Dynamic Programming • Suppose a new node comes on line. • Suppose I first talks to A. A I University of Delaware CPEG 419

  4. I A D F C B H G E Distance Vector Routing – Dynamic Programming • Suppose a new node comes on line. • Suppose I first talks to A. • Next I talks to D. I D University of Delaware CPEG 419

  5. Distance Vector - Algorithm • Start with all destinations with infinite distance, except for the actual node, which is distance 0. • Every 30 seconds (RIP), or when a change occurs in the table, send table to neighbors. • If the distance to a prefix advertised by a neighbor is less plus the distance to the neighbor is less than known distance, reduce distance to prefix and route packets with that destination prefix to that neighbor. University of Delaware CPEG 419

  6. A A B B C C D D E E Count to Infinity Problem University of Delaware CPEG 419

  7. Approaches to Mitigate Count Infinity Why is count to infinity a problem? It generates tons of routing updates – too much traffic The network should report that a route is unreachable. Put upper bound an upper bound the the diameter of the network. But what is the network grows (as it did). Split horizon. A router does not report a distance to the neighbor it learned the distance from. Split horizon with poison reverse. If A advertises the best cost to E to B, then B advertises a cost of infinity to E back to A. This only works for loops that involve two nodes. With larger loops, the mitigation is more difficult and these remedies reduce the rate of convergence. The way to fix it is to use link state routing. University of Delaware CPEG 419

  8. Link State Routing (IS-IS and OSPF) • Each router learns the entire network. (Compare to distance vector) • If the entire network is known, the shortest cost routing can be computed. • Each router advertises to its neighbors who it is connected to. • Each router floods any advertisement it receives. University of Delaware CPEG 419

  9. Link State Routing • HELLO – Determining who the router is connected to. • Reliable Flooding of LSA (link state advertisement) and keeping/getting up-to-date information. • Calculate shortest path. University of Delaware CPEG 419

  10. HELLO • Periodically, a node sends a HELLO LSP (Link State Packet) to its neighbors. • The neighbor responds with a HELLO reply. • This way the router can determine which router it is connected to. • The default period is 10 – 30sec. University of Delaware CPEG 419

  11. Reliable Flooding • Each LSP contains • The ID of the node that created the LSP. • The list of the neighbors directly connected to that node with the cost of each link. • A sequence number • A time to live • Each LSP reception is ACKed. University of Delaware CPEG 419

  12. Sequence Number • The node that generated the LSA increments the sequence number for each LSA it sends out. • The sequence number is 32 bits long, so wrap around is not possible. • When router receives an LSA, it checks if the seq num of the received LSA is larger than the LSA in memory. • If the LSA has a larger seq. num, it is stored, the old one discarded and the new LSA is flooded to all neighbors, except the one that sent it. • If the LSA has a smaller or equal seq. no, it is discarded. University of Delaware CPEG 419

  13. Time to Live (TTL) • Each second a LSA sits in memory, its TTL is decremented. • Each time the LSA is transmitted, its TTL is decremented. • When the TTL reaches zero, the LSA is discarded and the router floods the LSA with TTL=0 to tell other routers to delete this information. University of Delaware CPEG 419

  14. A LSA is generated periodically (on the order of hours) or when a change is detected (via the HELLO). • When a node reboots, it doesn’t know its seq. no. • It floods its link state with seq. no. 0. • It sends a Link State Request to its neighbors • The neighbors respond with the most up to date LSA they have. These LSA may contain the LSA of the before it crashed. In this case, the node updates its seq. no. • Remember that every time a router gets a new info, it floods the information. University of Delaware CPEG 419

  15. Security Issues • An attacker could send fake LSAs. • Must filter out LSA from any other source but the neighbor and use authentication. • If a router is compromised, it could advertise a low cost to all nodes. Then all nodes will send packets to this node and the network would stop working. University of Delaware CPEG 419

  16. metrics • ARPANET – the link cost included the size of the queue (a measure of congestion). • This does not work.. • Static cost – just use delay (Juniper seems to do this) • Dynamic cost – must make sure that link costs do not vary too much. • The cost can is restricted to only change slowly over time. • The cost between links cannot vary much. There cannot be more than a factor of 7 difference between the most and least expensive link. • The cost of a link can only vary by a factor of 3. • Cost only depends on utilization at moderate or high loads. • Only send updates when the cost crosses a threshold. • Is this stable? University of Delaware CPEG 419

  17. TOS – Type of Service • A data packet can identify the type of service it wants. • The router can provide different routing according to the TOS.. • To support this, OSPF allows the link cost to depend on the TOS. • This is not widely deployed. University of Delaware CPEG 419

  18. OSPF Header Type: 1=hello 2=database description 3=link status request 4=link state update 5=link state ack version type length Source address Address of the sender Area ID Checksum Authentication type Authentication Which area the packet originated University of Delaware CPEG 419

  19. OSPF LSA Like TTL LS Age Options Type=1 Link State ID The same Advertising Router Seq. No Checksum Length Number of Links Link ID Link Data Link Type Num TOS Metric Optional TOS More Links University of Delaware CPEG 419

  20. University of Delaware CPEG 419

  21. University of Delaware CPEG 419

  22. University of Delaware CPEG 419

More Related