1 / 130

Interdomain Routing and BGP

Interdomain Routing and BGP. The slides here were created by Timothy G. Griffin of AT&T and presented at a SIGCOMM 2001 Tutorial Session. The slides have been edited by me (D. Szajda). Any errors introduced as a result of these minor changes are my responsibility.

banyan
Télécharger la présentation

Interdomain Routing and BGP

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. Interdomain Routing and BGP The slides here were created by Timothy G. Griffin of AT&T and presented at a SIGCOMM 2001 Tutorial Session. The slides have been edited by me (D. Szajda). Any errors introduced as a result of these minor changes are my responsibility.

  2. An Introduction to Interdomain Routing and BGP Timothy G. Griffin griffin@research.att.com http://www.research.att.com/~griffin/interdomain.html SIGCOMM 2001 Tutorial Session August 28, 2001

  3. Caveat • These slides have been edited by me. Any errors introduced as a result of these minor changes are my responsibility.

  4. Acknowledgements Thanks to Jay Borkenhagen, Randy Bush, Anja Feldmann, Matt Grossglauser, Madan Musuvathi, Jennifer Rexford, Shubho Sen, and Jia Wang for many helpful comments Errors are my own My opinions should not be taken to represent AT&T policy

  5. BGP Generalities • BGP is a path-vector protocol • Generally, vectoring refers to creating routes without having global knowledge of the tolopology • Based on neighbors reported paths, you choose preferred path and report that to neighbors • BGP implements policy-based routing • talk of “minimum paths” is ill defined. • configure routers with route preferences

  6. Policy Based Routing • Ways to configure routers that effect which routes get computed • Route preferences: e.g. don’t use any path going through AS X • Which destinations should not be reported to which neighbors? • How a path should be edited when passed to a particular neighbor • E.G. maybe add several AS numbers into path to discourage, but not prevent, others from using path

  7. Policy Based Routing • Is there a better way? • R. Perlman supports link-state system plus source specified routes. • Link-state gives complete information • Sources can then determine routes that meet their specifications • Instead of influencing neighbors with advertisements, simply drop traffic you don’t want to forward

  8. Common View of the Telco Network Brick

  9. Common View of the IP Network (Layer 3)

  10. routing What This Tutorial Is About

  11. Goal Understand how layer 3 connectivity is maintained in the global Internet This tutorial will not say much about the applications that exploit this connectivity. It will be restricted to IPv4 unicast routing. • Part I : The basics of interdomain routing and BGP • Part II : BGP in practice: Issues of Scale

  12. Outline Part I • Forwarding vs. Routing • IP addressing • Autonomous Systems (basic units of interdomain routing) • The Border Gateway Protocol (BGP) • BGP fundamentals • BGP route attributes • Implementing policy with BGP • A wee bit of theory

  13. Outline Part II • Scaling internal BGP • BGP table growth • Address aggregation vs. Multihoming • Growth in number of autonomous systems • Dynamics of BGP • Route flapping • BGP convergence • Rates of BGP updates

  14. Best Effort Connectivity IP traffic 135.207.49.8 192.0.2.153 This is the fundamental service provided by Internet Service Providers (ISPs) All other IP services depend on connectivity: DNS, email, VPNs, Web Hosting, …

  15. Routing vs. Forwarding Net Nxt Hop Forwarding always works Routing can be badly broken A B C D E default R1 Direct R3 R1 R3 R1 Default to upstream router B Net Nxt Hop R A B C D E default R2 R2 Direct R5 R5 R2 R2 A R R R1 R3 C R5 R4 Net Nxt Hop D E A B C D E default R4 R3 R3 R4 Direct R4 Forwarding: determine next hop Routing: establish end-to-end paths

  16. How Are Forwarding Tables Populated to implement Routing? Statically Dynamically Administrator manually configures forwarding table entries Routers exchange network reachability information using ROUTING PROTOCOLS. Routers use this to compute best routes + More control + Not restricted to destination-based forwarding - Doesn’t scale - Slow to adapt to network failures + Can rapidly adapt to changes in network topology + Can be made to scale well - Complex distributed algorithms - Consume CPU, Bandwidth, Memory - Debugging can be difficult - Current protocols are destination-based In practice : a mix of these. Static routing mostly at the “edge”

  17. Routers Talking to Routers Routing info Routing info • Routing computation is distributed among routers within a routing domain • Computation of best next hop based on routing information is the most CPU/memory intensive task on a router • Routing messages are usually not routed, but exchanged via layer 2 between physically adjacent routers (internal BGP and multi-hop external BGP are exceptions)

  18. Before We Go Any Further … IP ROUTING PROTOCOLS DO NOT DYNAMICALLY ROUTE AROUND NETWORK CONGESTION • IP traffic can be very bursty • Dynamic adjustments in routing typically operate more slowly than fluctuations in traffic load • Dynamically adapting routing to account for traffic load can lead to wild, unstable oscillations of routing system

  19. Autonomous Routing Domains A collection of physical networks glued together using IP, that have a unified administrative routing policy. • Campus networks • Corporate networks • ISP Internal networks • …

  20. … the administration of an AS appears to other ASes to have a single coherent interior routing plan and presents a consistent picture of what networks are reachable through it. RFC 1930: Guidelines for creation, selection, and registration of an Autonomous System Autonomous Systems (ASes) An autonomous system is an autonomous routing domain that has been assigned an Autonomous System Number (ASN).

  21. AS Numbers (ASNs) ASNs are 16 bit values. 64512 through 65535 are “private” Currently over 11,000 in use. • Genuity: 1 • MIT: 3 • Harvard: 11 • UC San Diego: 7377 • AT&T: 7018, 6341, 5074, … • UUNET: 701, 702, 284, 12199, … • Sprint: 1239, 1240, 6211, 6242, … • … ASNs represent units of routing policy

  22. Architecture of Dynamic Routing OSPF BGP AS 1 EIGRP IGP = Interior Gateway Protocol Metric based: OSPF, IS-IS, RIP, EIGRP (cisco) AS 2 EGP = Exterior Gateway Protocol Policy based: BGP The Routing Domain of BGP is the entire Internet

  23. Topology information is flooded within the routing domain Best end-to-end paths are computed locally at each router. Best end-to-end paths determine next-hops. Based on minimizing some notion of distance Works only if policy is shared and uniform Examples: OSPF, IS-IS Each router knows little about network topology Only best next-hops are chosen by each router for each destination network. Best end-to-end paths result from composition of all next-hop choices Does not require any notion of distance Does not require uniform policies at all routers Examples: RIP, BGP Technology of Distributed Routing Link State Vectoring

  24. Link State Vectoring OSPF RIP IGP IS-IS BGP EGP The Gang of Four

  25. OSPF Process OSPF Routing tables RIP Process RIP Routing tables BGP Process BGP Routing tables Many Routing Processes Can Run on a Single Router BGP OS kernel RIP Domain OSPF Domain Forwarding Table Manager Forwarding Table

  26. 11111111 00010001 10000111 00000000 0 255 17 134 255.17.134.0 Dotted quadnotation IPv4 Addresses are 32 Bit Values IPv6 addresses have 128 bits

  27. Classful Addresses hhhhhhhh 0nnnnnnn hhhhhhhh hhhhhhhh ClassA 10nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh Class B nnnnnnnn nnnnnnnn hhhhhhhh 110nnnnn Class C n = network address bit h = host identifier bit Leads to a rigid, flat, inefficient use of address space …

  28. 00001100 00000100 00000000 00000000 Address 11111111 11111110 00000000 00000000 Mask Network Prefix for hosts RFC 1519: Classless Inter-Domain Routing (CIDR) Use two 32 bit numbers to represent a network. Network number = IP address + Mask IP Address : 12.4.0.0 IP Mask: 255.254.0.0 Usually written as 12.4.0.0/15

  29. 00001100 00001100 00001100 00000100 00000101 00000111 00000000 00001001 00001001 00010000 00010000 00000000 11111111 11111110 00000000 00000000 Which IP Addresses are Covered by a Prefix? 12.5.9.16 is covered by prefix 12.4.0.0/15 12.5.9.16 12.4.0.0/15 12.7.9.16 12.7.9.16 is not covered by prefix 12.4.0.0/15

  30. 12.0.0.0/16 : : : 12.1.0.0/16 12.3.0.0/24 12.2.0.0/16 12.3.1.0/24 : : 12.3.0.0/16 : : : 12.0.0.0/8 12.3.254.0/24 12.253.0.0/19 12.253.32.0/19 12.253.64.0/19 12.253.0.0/16 12.253.96.0/19 12.254.0.0/16 12.253.128.0/19 12.253.160.0/19 12.253.192.0/19 CIDR = Hierarchy in Addressing

  31. Prefix Next Hop Interface 0.0.0.0/0 10.14.11.33 ATM 5/0/9 12.0.0.0/8 10.14.22.19 ATM 5/0/8 12.4.0.0/15 10.1.3.77 Ethernet 0/1/3 12.5.8.0/23 attached Serial 1/0/7 IP Forwarding Table Classless Forwarding Destination =12.5.9.16 ------------------------------- payload OK better even better best!

  32. IP Address Allocation and Assignment: Internet Registries IANA www.iana.org APNIC www.apnic.org ARIN www.arin.org RIPE www.ripe.org Allocate to National and local registries and ISPs Addresses assigned to customers by ISPs RFC 2050 - Internet Registry IP Allocation Guidelines RFC 1918 - Address Allocation for Private Internets RFC 1518 - An Architecture for IP Address Allocation with CIDR

  33. IP traffic Nontransit vs. Transit ASes Internet Service providers (often) have transit networks ISP 2 ISP 1 NET A Nontransit AS might be a corporate or campus network. Could be a “content provider” Traffic NEVER flows from ISP 1 through NET A to ISP 2 (At least not intentionally!)

  34. IP traffic Selective Transit NET B NET C NET A provides transit between NET B and NET C and between NET D and NET C NET A DOES NOT provide transit Between NET D and NET B NET A NET D Most transit networks transit in a selective manner…

  35. provider customer IP traffic Customers and Providers provider customer Customer pays provider for access to the Internet

  36. Customers Don’t Always Need BGP provider Nail up routes 192.0.2.0/24 pointing to customer Nail up default routes 0.0.0.0/0 pointing to provider. customer 192.0.2.0/24 Static routing is the most common way of connecting an autonomous routing domain to the Internet. This helps explain why BGP is a mystery to many …

  37. Customer-Provider Hierarchy IP traffic provider customer

  38. peer peer provider customer The Peering Relationship Peers provide transit between their respective customers Peers do not provide transit between peers Peers (often) do not exchange $$$ traffic allowed traffic NOT allowed

  39. peer peer provider customer Peering Provides Shortcuts Peering also allows connectivity between the customers of “Tier 1” providers.

  40. Reduces upstream transit costs Can increase end-to-end performance May be the only way to connect your customers to some part of the Internet (“Tier 1”) You would rather have customers Peers are usually your competition Peering relationships may require periodic renegotiation Peering Wars Peer Don’t Peer Peering struggles are by far the most contentious issues in the ISP world! Peering agreements are often confidential.

  41. BGP-4 • BGP = Border Gateway Protocol • Is a Policy-Based routing protocol • Is the de facto EGP of today’s global Internet • Relatively simple protocol, but configuration is complex and the entire world can see, and be impacted by, your mistakes. • 1989 : BGP-1 [RFC 1105] • Replacement for EGP (1984, RFC 904) • 1990 : BGP-2 [RFC 1163] • 1991 : BGP-3 [RFC 1267] • 1995 : BGP-4 [RFC 1771] • Support for Classless Interdomain Routing (CIDR)

  42. BGP Operations (Simplified) Establish session on TCP port 179 AS1 BGP session Exchange all active routes AS2 While connection is ALIVE exchange route UPDATE messages Exchange incremental updates

  43. Four Types of BGP Messages • Open : Establish a peering session. • Keep Alive : Handshake at regular intervals. • Notification : Shuts down a peering session. • Update : Announcing new routes or withdrawing previously announced routes. announcement = prefix + attributes values

  44. BGP Attributes Value Code Reference ----- --------------------------------- --------- 1 ORIGIN [RFC1771] 2 AS_PATH [RFC1771] 3 NEXT_HOP [RFC1771] 4 MULTI_EXIT_DISC [RFC1771] 5 LOCAL_PREF [RFC1771] 6 ATOMIC_AGGREGATE [RFC1771] 7 AGGREGATOR [RFC1771] 8 COMMUNITY [RFC1997] 9 ORIGINATOR_ID [RFC2796] 10 CLUSTER_LIST [RFC2796] 11 DPA [Chen] 12 ADVERTISER [RFC1863] 13 RCID_PATH / CLUSTER_ID [RFC1863] 14 MP_REACH_NLRI [RFC2283] 15 MP_UNREACH_NLRI [RFC2283] 16 EXTENDED COMMUNITIES [Rosen] ... 255 reserved for development This tutorial will cover these attributes Not all attributes need to be present in every announcement From IANA: http://www.iana.org/assignments/bgp-parameters

  45. Attributes are Used to Select Best Routes 192.0.2.0/24 pick me! 192.0.2.0/24 pick me! 192.0.2.0/24 pick me! Given multiple routes to the same prefix, a BGP speaker must pick at most one best route (Note: it could reject them all!) 192.0.2.0/24 pick me!

  46. Two Types of BGP Neighbor Relationships • External Neighbor (eBGP) in a different Autonomous System • Internal Neighbor (iBGP) in the same Autonomous System AS1 iBGP is routed (using IGP!) eBGP iBGP AS2

  47. eBGP update iBGP updates iBGP Peers Must be Fully Meshed • iBGP is needed to avoid routing loops within an AS • Injecting external routes into IGP does not scale and causes BGP policy information to be lost • BGP does not provide “shortest path” routing • Is iBGP an IGP? NO! iBGP neighbors do not announce routes received via iBGP to other iBGP neighbors.

  48. BGP Next Hop Attribute 12.127.0.121 12.125.133.90 AS 7018 AT&T AS 12654 AS 6431 RIPE NCC RIS project AT&T Research 135.207.0.0/16 Next Hop = 12.125.133.90 135.207.0.0/16 Next Hop = 12.127.0.121 Every time a route announcement crosses an AS boundary, the Next Hop attribute is changed to the IP address of the border router that announced the route.

  49. EGP destination next hop 135.207.0.0/16 192.0.2.1 Join EGP with IGP For Connectivity Arrows show direction of route advertisement 135.207.0.0/16 Next Hop = 192.0.2.1 135.207.0.0/16 10.10.10.10 AS 1 AS 2 192.0.2.1 192.0.2.0/30 Forwarding Table Router IP address Network address (for AS 2) destination next hop 192.0.2.0/30 10.10.10.10 Forwarding Table + destination next hop 135.207.0.0/16 10.10.10.10 192.0.2.0/30 10.10.10.10

  50. Next Hop Often Rewritten to Loopback 135.207.0.0/16 Next Hop = 192.0.2.1 135.207.0.0/16 Next Hop = 127.22.33.44 135.207.0.0/16 10.10.10.10 AS 1 AS 2 192.0.2.1 Loopback refers to directing traffic back to advertising router Forwarding Table 127.22.33.44 destination next hop 127.22.33.44 10.10.10.10 Forwarding Table + destination next hop EGP 135.207.0.0/16 10.10.10.10 destination next hop 127.22.33.44 10.10.10.10 135.207.0.0/16 127.22.33.44

More Related