ip routing ospf n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
IP Routing: OSPF PowerPoint Presentation
Download Presentation
IP Routing: OSPF

play fullscreen
1 / 28

IP Routing: OSPF

108 Views Download Presentation
Download Presentation

IP Routing: OSPF

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. IP Routing: OSPF Network Protocols and Standards Autumn 2003-2004 CS573: Network Protocols and Standards

  2. OSPF • Link State Routing • Dijkstra Algorithm • Distributed Map concept • Flooding protocol for information dissemination • Advantages over distance vector • Fast, loopless convergence • Precise metrics and multiple metrics per link • Support for multiple paths to destination CS573: Network Protocols and Standards

  3. OSPF Features • Type of Service (TOS) routing • Load balancing • Multiple routes to a destination • Network partitioning • Areas made independent of each other • Authentication of exchanges between routers • Reduction of routing traffic on broadcast networks by means of a designated router • Support for exchange of information learned from other (external) sites CS573: Network Protocols and Standards

  4. Basic Idea • Each router has a complete map of the network • The map is built by “flooding”: • Each router advertises the state of all its interfaces (their costs and where they connect to) • These link state advertisements are flooded throughout the network; upon reception, the other routers repeat them on all their interfaces • Advertisements have sequence numbers • Given the map, each router uses Dijkstra’s algorithm to compute the shortest path tree from itself to all other routers CS573: Network Protocols and Standards

  5. 1 2 A B C 3 4 5 D E 6 Link State Database Every router has a copy of the distributed map in memory CS573: Network Protocols and Standards

  6. 1 2 A B C xxxxxx 3 4 5 D E 6 Link State Database Database is updated after each change of link state using “Flooding Protocol” Router A will advertise: Message: <From A, To B, Link 1, distance = Inf> Old messages “may” pollute the database if we do not number the messages! CS573: Network Protocols and Standards

  7. Flooding Algorithm • Receive a message on an interface and look for that same message in the DB. Do one of the following: • Add to the local DB and broadcast incoming message on all the interfaces except for the incoming if: • Received record was not in the DB, or • Record number in the DB is lower (i.e., a newer message is received and others should know it) • Transmit only on the incoming interface if: • Record number in the DB is higher (i.e., the neighboring bridge through incoming interface must be told that the information sent is too old!) • Do not transmit anywhere if: • Record number in DB is the same as the one received CS573: Network Protocols and Standards

  8. 1 2 A B C xxxxxx 3 4 5 D E xxxxxx 6 Map Inconsistencies! What if link 6 also fails after link 1 failed? DB in Nodes A and D DB in Nodes B, C, and E CS573: Network Protocols and Standards

  9. 1 2 A B C xxxxxx xxxxxx 3 4 5 D E xxxxxx 6 Map Inconsistencies! What if link 2 also fails now? A and D will not know… DB in Nodes A and D DB in Nodes B, C, and E CS573: Network Protocols and Standards

  10. 1 2 A B C xxxxxx 3 4 5 D E xxxxxx 6 Map Inconsistencies! What if link 1 is restored? Inconsistency results!!! DB in Nodes A and D DB in Nodes B, C, and E CS573: Network Protocols and Standards

  11. Bringing up Adjacencies • Neighboring routers need to align or synchronize their databases on a continuous basis • Record numbers help! • Exchanging complete copies of databases is inefficient • OSPF defines database description packets containing link identifiers and version numbers only CS573: Network Protocols and Standards

  12. Bringing up Adjacencies • Neighboring routers synchronize their databases in two phases: • Phase 1 • Routers send complete description of their databases • Compile a list of records they are interested in after receiving the database descriptions • Phase 2 • Each router polls its neighbor for a full copy of these interesting records by means of “link state request” packets CS573: Network Protocols and Standards

  13. Securing the Map Updates • Coherency of routing is fully dependent upon maintaining synchronized copies of databases in all nodes • Each router is only required to be synchronized with its neighbors • Measures introduced by OSPF • Flooding includes hop-by-hop acknowledgements • Database description packets are transmitted in a secure fashion • Each link state record is protected by a timer and is removed from the database if not refreshed in due time • All records are protected by checksum • The messages can be authenticated or encrypted CS573: Network Protocols and Standards

  14. OSPF Algorithm: Notation • E: set of nodes already evaluated • R: remaining nodes • O: an ordered list of paths used to find the next shortest route • P: the shortest path in O • V: the last node in P CS573: Network Protocols and Standards

  15. OSPF Algorithm: Dijkstra’s 1. Initialization • Initialize E to contain only the source node S • Initialize R to contain all the other nodes • Initialize the list of paths O to contain all the one hop paths starting from S. Each of these paths has a cost equal to the corresponding link’s metric. Sort list O by increasing metrics 2. If list O is empty, or if the first path in O has an infinite metric, mark all nodes in R as unreachable. The computation is finished… CS573: Network Protocols and Standards

  16. OSPF Algorithm: Dijkstra’s 3. Set P=the shortest path in list O. Remove the shortest path from O. Let V be the last node in P. If V is already in E, go back to step 2. Otherwise, P is the shortest path to V. Move V from R to E 4. Last step • Build a set of new candidate paths by concatenating P and each of the links starting from V • The cost to these paths is the sum of the cost of P and the metric of the link appended to P • Insert the new links in the ordered list O, each at the rank corresponding to its cost • Go to step 2 CS573: Network Protocols and Standards

  17. 3 A C 1 1 S E 1 1 2 5 B D 6 Example Each node will find a shortest path from itself to all other nodes Consider node S to see how Dijkstra’s algorithm works! CS573: Network Protocols and Standards

  18. 3 A C 1 1 S E 1 1 2 5 B D 6 Example: Link State DB Like every node, S has a complete map of the network CS573: Network Protocols and Standards

  19. E R O Cost E R O Cost S A,B,C,D,E SA 1 S,A,B,C D,E SABCE 4 SB 5 SABD 8 S,A B,C,D,E SAB 2 SAC 4 (*) SAC 4 SB 5 SB 5 S,A,B,C,E D SABCED 6 S,A,B C,D,E SABC 3 SABD 8 SABD 8 SB 5(*) SAC 4 SB 5 3 A C 1 1 Example 1 1 S E 2 5 B D 6 Underlined paths are shortest at each iteration (*) links removed at step 3 CS573: Network Protocols and Standards

  20. 1 1 B C L2 L1 L3 1 A L5 L4 2 E D 3 E R O Dist P V 1 1 A B,C,D,E AB 1 A-L1-B B 1 B C L2 L1 AE 2 L3 1 A L5 2 A,B C,D,E ABC 2 A-L5-E E L4 2 E D 3 AE 2 3 A,B,E C,D ABC 2 A-L1-B- L2-C C AED 5 4 A,B,E,C D ABCD 3 A-L1-B-L2-C-L3-D D AED 5 5 A,B,E,C,D AED 5 Another Example Need paths from A CS573: Network Protocols and Standards

  21. Advantages of OSPF • Why is a link state protocol better? • Fast, loopless convergence • Support for precise metrics and, if needed, multiple metrics • Support for multiple paths to destination CS573: Network Protocols and Standards

  22. Fast, loopless convergence • Fast • Distance vector uses Bellman-Ford algorithm and converges in O(NM) where N is the number of nodes and M is the number of links • OSPF uses Dijkstra’s algorithm where local computation involves O(MlogM) computations • Transmission of new information is quick by using flooding • Loopless • Immediately after flooding and the computation, all routes in the network are same – no loops and no counting to infinity • The loopless features avoids the disruptive consequences of routing loops CS573: Network Protocols and Standards

  23. Support for Multiple Metrics • Full topology is known for computation; arbitrarily precise metrics can be used without slowing down the convergence • Convergence speed is not a function of metrics • The precision of computation makes it possible to use multiple metrics in parallel • Must make consistent decision in all nodes. Why? • Possible metrics • Throughput • Delay • Cost • Reliability CS573: Network Protocols and Standards

  24. T1 Satellite link (275ms) A B T1 Terrestrial Link (10ms) 64kbps (10ms) E C D T1 Terrestrial Link (10ms) 64kbps (10ms) Support for Multiple Metrics T1 link ~ 1.544Mbps How to route from D to B? Bandwidth-based: DCAB (1.544Mbps vs. 64kbps) Delay-based: DEB (20ms vs. 295ms) CS573: Network Protocols and Standards

  25. Support for Multiple Paths • In complex networks, there are usually several “almost equivalent” routes towards a destination • Analysis have proved that splitting traffic over multiple paths is more efficient • Average delay will be lower • Delay variations will also be lower • Spreading the traffic also alleviates the effect of the disconnection in one single path. Without spreading the traffic, if the single path being used becomes unavailable, all traffic will be routed to the alternate path, causing possible congestion CS573: Network Protocols and Standards

  26. Support for Multiple Paths • Issues • Splitting (or spreading) traffic will lead to out-of-order delivery of certain packets • Effect on TCP flow control (different delay) • A solution is to route packets belonging to the same connection over one path and distribute the connections rather than the packets over multiple available paths CS573: Network Protocols and Standards

  27. Modified Algorithm • Initialize E, R, and O as in the standard SPF • If O is empty, the algorithm is finished • Examine P, the shortest path in O. Remove P from O and Let V be the last node in P. If V is already in E, continue at step 4. Otherwise, P is the shortest path to V. Move V from R to E and continue at step 5 • If the distance to V is larger than the shortest path, ignore P. Otherwise (distance to V is equal to the shortest path), P is an equal cost path. Move V from R to E. In all cases continue at step 2 • Build the new set of candidate paths, add them to O as in standard algorithm and continue at step 2 CS573: Network Protocols and Standards

  28. Issues • Design of OSPF • Separating hosts and routers • Broadcast networks (Ethernet, FDDI, …) • Non-broadcast networks (ATM, X.25, …) • Splitting very large networks into areas CS573: Network Protocols and Standards