1 / 58

Unicast Routing Protocols

Unicast Routing Protocols. Outline. Routing basic RIP OSPF BGP. Routing Basic. IP Routing Autonomous System (AS) IGP/EGP Distance-vector(DV)/Link-state(LS) How routing protocol works?. IP Routing. Route entry Destination/netmask Nexthop Longest-match Default-route

amiel
Download Presentation

Unicast Routing Protocols

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. Unicast Routing Protocols

  2. Outline • Routing basic • RIP • OSPF • BGP

  3. Routing Basic • IP Routing • Autonomous System (AS) • IGP/EGP • Distance-vector(DV)/Link-state(LS) • How routing protocol works?

  4. IP Routing • Route entry • Destination/netmask • Nexthop • Longest-match • Default-route • Equal Cost Multipath Protocol(ECMP) • Static routing/Dynamic routing

  5. Autonomous System (AS) • Collection of networks with same policy • Usually under single administrative control • IGP to provide internal connectivity • Identified by a short number • Public & Private AS numbers • public: 1 - 64511 • private: 64512 – 65535 AS 100

  6. What Is an IGP? • Interior Gateway Protocol • Within an Autonomous System • Carries information about internal prefixes • Examples— • RIP, OSPF, ISIS…

  7. What Is an EGP? • Exterior Gateway Protocol • Used to convey routing information between ASes • Independent from the IGP • Current EGP is BGP4

  8. Why Do We Need an EGP? • Scaling to large network • Hierarchy • Limit scope of failure • Define administrative boundary • Policy • Control reachability to prefixes

  9. Other ISP’s BGP4 / IGP BGP4 BGP4/Static Customers Customers Hierarchy of Routing Protocols BGP4

  10. Distance-vector (Bellman-Ford) • Routers only know their local state • link metric and neighbor estimates • Examples – • RIP, BGP (path-vector)

  11. Link-state • Routers have knowledge of the global state • topology database • global optimization (Shortest Path First - Dijkstra) • Examples – • OSPF, ISIS

  12. How Routing Protocol works? • Neighbor Discovery • Route Exchange between neighbors • learning/flooding/invalidation/refresh • Best route choice and routing table management • Responsibility • Fast convergence and loop-free • Scalability • Robustness • Some control of routing choices

  13. Routing Information Protocol (RIP) • RIP basic • General operation • RIP v2 VS RIP v1 • Conclusion

  14. RIPv2 basic • Distance-vector protocol • Metric – hops • Metric is increased when routes are updated to neighbors • Network span limited to 15 (16 means unreachable) • Encapsulated as UDP packets, port 520

  15. RIPV2 General operation • On startup, send request on all interfaces. • When a request is received, a response is sent. - Response contains entire routing table. • A response is also gratuitously sent every 30s. – Response contains entire routing table. • A response is also sent when update detected. - Response only contains changed routes. • Route metric is set to 16 when network becomes inaccessible or not refreshed during 6 update periods(180s) • Invalid routes are flushed after another 4 update periods(120s)

  16. A B C Count of infinity • What happens when a link dies? A: 2, B B: 1, B C: 0 A: 0 B: 1, B C: 2, B A: 1, A B: 0 C: 1, C A: 2, B B: 1, B C: 0 A: 0 B: 1, B C: 2, B A: 1, A B: 0 C: 3, A A: 2, B B: 1, B C: 0 A: 0 B: 1, B C: 4, B A: 1, A B: 0 C: 3, A A: 2, B B: 1, B C: 0 A: 0 B: 1, B C: 15, B A: 1, A B: 0 C: 16, A

  17. Split horizon To speed up convergence • Simple - do not claim reachability for a destination network to the neighbor from which the route was learned. • Poison reverse - includes such routes in updates, but sets their metrics to infinity

  18. A B C Split horizon - simple A: 2, B B: 1, B C: 0 A: 0 B: 1, B C: 2, B A: 1, A B: 0 C: 1, C A: 2, B B: 1, B C: 0 A: 0 B: 1, B C: 16, B A: 1, A B: 0 C: 16

  19. A B C Split horizon – poison reverse A: 2, B B: 1, B C: 0 A: 0 B: 1, B C: 2, B A: 1, A B: 0 C: 1, C C: 16 A: 2, B B: 1, B C: 0 A: 0 B: 1, B C: 16, B A: 1, A B: 0 C: 16

  20. RIPv2 vs RIPv1 • 224.0.0.9 - broadcast • Variable Length Subnet Mask(VLSM) - Classless Inter-DomainRouting (CIDR, no prefix/subnet information, derived from address class) • Authentication - none

  21. Conclusion • Simplicity • Slow convergence • Not suited for large and complex networks

  22. Open Shortest Path First (OSPF) • OSPF Basic • OSPF Neighbors • OSPF Area • SPF and LSA database • OSPF Messages • Conclusion

  23. OSPF Basic • Encapsulated as RAW IP packets, protocol ID 89 • Uses metrics—path cost(1–65,535)

  24. OSPF Basic - general operation • Use Hello Protocol to establish neighbors • All routers exchange Link State Advertisement (LSA) to build and maintain a consistent database • Each router runs SPF on LSA database independently and gets optimal routes • Periodic flooding of LSAs every 30 minutes • LSA age • 0 when created • Incremented as time elapsed. • Max age 3600 indicates invalid • Remove a LSA by incrementing age to 3600, reflooding and flushing.

  25. OSPF Network type • Broadcast • Point-to-Point/Point-to-Multipoint • NBMA(Non-Broadcast Multiple Access)

  26. Neighbor discovery • Hello packets • Periodically Multicasting 224.0.0.5, including • RouterId, AreaId, Netmask, hello interval, Priority, DR, BDR, Neighbor list • Neighbor state machine • Works differently on different network

  27. DR/BDR/Others • For broadcast and NBMA networks • Optimize the flooding procedure • Designated Router(DR) • Adjacent to all routers • Describe all routers on the network • Send updates to all routers on the network • Backup Designated Router(BDR) • Adjacent to all routers • Act as new DR when previous DR fails • Others • Only adjacent to DR/BDR, only send updates to DR/BDR

  28. OSPF Area • Why divide the network into different areas? • Limit the scope of updates and computational overhead • independent SPF computing in each area • inject aggregated information on routes into other areas • 32 bit number • Backbone area – area 0 or 0.0.0.0 • All areas must connect to backbone area. • Backbone area must be continuous • Virtual link when the above fails • Area Border Routers(ABR)

  29. Virtual Link Area 0 Area 1 Area 2 ABR ABR Virtual link ABR Area 3

  30. Shortest Path First 3 A B 10 1 4 C D 7

  31. OSPF SPF process • SPF calculation is performed independently for each area • Router LSA • Each router creates a router LSA for each area • Describe links to an area • DR/BDR(broadcast) • Neighboring router(point-to-point) • Prefix/mask(stub network) • metric • Network LSA • Only DR creates a network LSA for a network • Describe all routers on the network

  32. Inter-area routes • Network Summary LSA • Created by ABR • Advertise optimal routes in one area into another area • Prefix/mask • Metric • Flood only in one area

  33. Inter-AS routes • Autonomous System Border Router(ASBR) • Autonomous System External LSA • Created by ASBR • Describe routes redistributed from other AS • Prefix/mask • Metric • Flood across area in an AS(except stub area) • ASBR summary LSA • Created by ABR • Describe ASBR routers in one area • ASBR router id • metric

  34. Stub area • AS External LSA are forbidden in stub area • Why stub area? • When many networks are connected only via one router • All external networks aggregated into default route • Reduce routing table sizes

  35. OSPF Messages • Hello • Used to establish neighbor relationship • Database description • Used to describe brief information of LSA • Link-state request • Used to request LSAs • Link-state update • Used to update LSAs • Link-state acknowledgment • Used to assure LSA flooding reliable by including brief description of received LSA

  36. Conclusion • 2-level hierarchical model • Faster convergence • Relatively low, steady state bandwidth requirements

  37. Border Gateway Protocol (BGP) • BGP Basic • BGP Peers • BGP Updates – NLRI and Path Attributes • Synchronization with IGP • Route Reflector and AS Confederation • Routing policy • BGP Messages • Conclusion

  38. BGP Basic • Based on TCP connection, port 179 • BGP peer is configured manually • BGP Peers exchangeUpdate messages containing Network Layer Reachability Information (NLRI) • Path attributes are with NLRI to avoid loop and facilitate policy control • No routes refresh

  39. A C B D E eBGP TCP/IP Peer Connection BGP Peers - eBGP eBGP AS 101 AS 100 220.220.16.0/24 220.220.8.0/24 eBGP eBGP AS 102 Peers in different AS’sare calledExternal Peers 220.220.32.0/24 Note: eBGP Peers normally should be directly connected.

  40. B D E iBGP TCP/IP Peer Connection BGP Peers - iBGP A C AS 101 AS 100 iBGP iBGP 220.220.16.0/24 220.220.8.0/24 AS 102 Peers in the same ASare calledInternal Peers 220.220.32.0/24 Note: iBGP Peers don’t have to be directly connected. Loopback interface are normally used as peer connection end-points. In this case, recursive route look-up is needed.

  41. B A C D Full mesh AS 100 • Each iBGP speaker must peer with every other iBGP speaker in the AS (full mesh) • IBgp speaker never floods routes received from another iBGP peer to any other iBGP peer.

  42. BGP Updates — NLRI • Network Layer Reachability Information • Used to advertise feasible routes • Composed of: • Network Prefix • Mask Length

  43. BGP Updates — Path Attributes • Used to convey information associated with NLRI • Origin - mandatory • AS path - mandatory • Next hop - mandatory • Local preference • Multi-Exit Discriminator (MED) • Community • Origin • Aggregator • Rich policy control

  44. Origin • Conveys the origin of the prefix • Three values: • IGP - Generated using “network” statement • ex: network 35.0.0.0 • EGP - Redistributed from EGP • Incomplete - Redistribute IGP • ex: redistribute ospf • IGP < EGP < INCOMPLETE

  45. Sequence of ASes a route has traversed Loop detection Apply policy AS-Path Attribute AS 200 AS 100 170.10.0.0/16 180.10.0.0/16 Network Path 180.10.0.0/16 300 200 100 170.10.0.0/16 300 200 AS 300 AS 400 150.10.0.0/16 Network Path 180.10.0.0/16 300 200 100 170.10.0.0/16 300 200 150.10.0.0/16 300 400 AS 500

  46. AS-Path Loop detection • Sequence of ASes a route has traversed • Loop detection AS 200 AS 100 170.10.0.0/16 180.10.0.0/16 180.10.0.0/16 dropped AS 300 AS 400 150.10.0.0/16 180.10.0.0/16 300 200 100 170.10.0.0/16 300 200 150.10.0.0/16 300 400 AS 500

  47. B A C D E BGP Update Messages Next Hop Attribute AS 300 AS 200 140.10.0.0/16 192.10.1.0/30 150.10.0.0/16 .1 .2 Network Next-Hop Path 150.10.0.0/16 192.10.1.1 200 160.10.0.0/16 192.10.1.1 200 100 .2 192.20.2.0/30 Network Next-Hop Path 150.10.0.0/16 192.10.1.1 200 160.10.0.0/16 192.10.1.1 200 100 .1 Network Next-Hop Path 160.10.0.0/16 192.20.2.1 100 AS 100 160.10.0.0/16 • Next hop to reach a network • Usually a local network is the next hop in eBGP session • Next Hop updated between eBGP Peers • Next hop not changed between iBGP peers

  48. Local Preference AS 100 160.10.0.0/16 AS 200 AS 300 D E Multi-homed AS A B AS 400 800 500 • Only for iBGP • Local to an AS • Path with highest local preference wins C 160.10.0.0/16 500 > 160.10.0.0/16 800

  49. Multi-Exit Discriminator (MED) AS 200 C preferred 192.68.1.0/24 2000 192.68.1.0/24 1000 A B • Used to convey the relative preference of entry points • Comparable if paths are from the same AS • Path with lower MED wins • IGP metric can be conveyed as MED 192.68.1.0/24 AS 201

More Related