1 / 30

Introduction to BGP

Introduction to BGP. What Is BGP?. Border Gateway Protocol BGP-4 The de-facto interdomain routing protocol BGP enables policy in routing: Which information gets advertised and how BGP is a Distance Vector like protocol Within an AS, Internal Gateway Protocol (IGP or I-BGP).

conlan
Download Presentation

Introduction to 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. Introduction to BGP

  2. What Is BGP? • Border Gateway Protocol BGP-4 • The de-facto interdomain routing protocol • BGP enables policy in routing: • Which information gets advertised and how • BGP is a Distance Vector like protocol • Within an AS, Internal Gateway Protocol (IGP or I-BGP)

  3. Internet Structure Original idea Backbone service provider Consumer ” ISP “ Consumer ISP ” Large corporation “ Small “ ” Consumer ISP “ ” Consumer ISP corporation Small Small Small corporation corporation corporation CS 640

  4. Large corporation “ ” Consumer ISP Peering point Backbone service provider Peering point Consumer ” ISP “ “ Consumer ISP ” Large corporation Small corporation Internet Structure Today CS 640

  5. Route Propagation in the Internet • Autonomous System (AS) • corresponds to an administrative domain • examples: University, company, backbone network • assign each AS a 16-bit number • Two-level route propagation hierarchy • interior gateway protocol (each AS selects its own) • exterior gateway protocol (Internet-wide standard) • Routes information is propagated at various levels • hosts know local router • local routers know site routers • site routers know core router • core routers know everything CS 640

  6. Popular Interior Gateway Protocols • RIP: Route Information Protocol • distributed with BSD Unix • distance-vector algorithm • based on hop-count (infinity set to 16) • OSPF: Open Shortest Path First • recent Internet standard • uses link-state algorithm • supports load balancing • supports authentication CS 640

  7. EGP: Exterior Gateway Protocol • Overview • Original standard for Internet routing protocol (c 1983) • designed for tree-structured Internet • Single backbone • concerned with reachability, not optimal routes • Protocol messages • neighbor acquisition: one router requests that another be its peer; peers exchange reachability information • neighbor reachability: one router periodically tests if the another is still reachable; exchange HELLO/ACK messages; • uses a k-out-of-n rule: ¼ to stay up, ¾ to establish • routing updates: peers periodically exchange their routing tables (including route weights) using a basic distance vector method • There can be multiple connections between ASs CS 640

  8. Limits of EGP • At first glance, EGP seems like a distance vector protocol since updates carry lists of destinations and distances – but distances are NOT reliable. • EGP was designed to support tree topologies, not meshes • False routes injected by accident can have really bad consequences (black holes) – there is no easy way for dealing with this problem • Loops can easily occur – all we are doing is forwarding routing tables • EGP was not designed to easily support fragmented IP packets – all data is assumed to fit in MTU. • Solutions to these and other EGP problems were all manual CS 640

  9. BGP-4: Border Gateway Protocol • BGP-1 developed in 1989 to address problems with EGP. • Assumes Internet is an arbitrarily interconnected set of ASs • AS traffic types • Local • starts or ends within an AS • Transit • passes through an AS • AS Types • stub AS: has a single connection to one other AS • carries local traffic only • multihomed AS: has connections to more than one AS • refuses to carry transit traffic • transit AS: has connections to more than one AS • carries both transit and local traffic CS 640

  10. BGP-4 contd. • Each AS has: • one or more border routers • Handles inter-AS traffic • one BGP speaker for an AS that participates in routing • BGP speaker establishes BGP sessions with peers and advertises: • local network names • other reachable networks (transit AS only) • gives path information including path weights (MEDs) • withdrawn routes • BGP goal: find loop free paths between ASs • Optimality is secondary goal • It’s neither a distance-vector nor a link-state protocol • Hard problem • Internet’s size (~12K active ASs) means large tables in BGP routers • Autonomous domains mean different path metrics • Need for flexibility CS 640

  11. 128.96 Customer P 192.4.153 (AS 4) Regional provider A (AS 2) Customer Q 192.4.32 (AS 5) 192.4.3 Backbone network (AS 1) Customer R 192.12.69 (AS 6) Regional provider B (AS 3) Customer S 192.4.54 (AS 7) 192.4.23 BGP Example • Speaker for AS2 advertises reachability to P and Q • network 128.96, 192.4.153, 192.4.32, and 192.4.3, can be reached directly from AS2 • Speaker for backbone advertises • networks 128.96, 192.4.153, 192.4.32, and 192.4.3 can be reached along the path (AS1, AS2). • Speaker can cancel previously advertised paths CS 640

  12. Some BGP details • Path vectors are most important innovation in BGP • Enables loop prevention in complex topologies • If AS sees itself in the path, it will not use that path • Routes can be aggregated • Based on CIDR (classless) addressing • Routes can be filtered • Runs over TCP • Most of the same messages as EGP • Open, Update, Notify, Keepalive • BGP session have only recently been made secure CS 640

  13. BGP in practice • 10-20 “tier 1” ASs which are the Internet backbone • Clearly convergence is an issue – why? • Black holes are always a potential problem • There are lots of BGP updates every day! • BGP is really the heart of the Internet • BGP is a means by which network operators control congestion in the Internet. • BGP is really a big problem! CS 640

  14. How A BGP graph Looks Like AS 2 • Each AS has designated BGP routers • BGP routers of an AS communicate internally with another protocol (IGP) AS 5 AS 4 AS 3 AS 1

  15. What is different with BGP? • BGP goal: enable business relationships • Opts for: flexibility, scalability • Performance optimization is secondary

  16. Some Basic Numbers • ~20,000 Autonomous Systems approx. • Corporate Networks • ISP Internal Networks • National Service Providers • Identified by ASN a 16 bit value • Assigned by IANA • Superlinear growth

  17. Size of the Routing Table at the core of the Internet Source: http://www.telstra.net/ops/bgptable.html

  18. Routing is Based on Prefixes • A BGP Routing table has prefixes for entries • For a IP address of a packet, find longest match • Example: packet IP 128.32.101.1 • 128.32.0.0/16 match for 16 bits • 128.32.101.0/24 is a longer match • No matches: • 128.1.1.4 • 128.32.5.0/24

  19. Prefix Matching in More Detail • For a IP address of a packet, find longest match • Example: Compare • packet IP 128.32.101.1 • With 128.32.0.0/16 • IP : 01000000. 001000000. 01100101 .00000001 • Mask : 11111111. 111111111. 00000000 .00000000 • AND : 01000000. 001000000. 00000000 .00000000 • Prefix : 01000000. 001000000. 00000000. 00000000 • Equal? Yes

  20. Advertising Routing Information • Each AS advertises what it can reach from each BGP router • Policies I: filter what you advertise • Policies II: filter from what you hear advertised • Build up a BGP routing table • Remember which prefix you hear from which link

  21. What Does a Routing Table Look Like? • Origin AS “owns” the address

  22. Basic AS relationships • Customer – Provider • Customer pays Provider for service • The Customer is always right • Peer to Peer: mutual cooperation • Ex. MCI and AT&T • Sibling-Sibling • Ex. AT&T research and AT&T wireless

  23. Provider Customer Peer Peer The Internet as a Directed Graph • Every edge is bidirectional • Business relationships are represented

  24. The Initial Idea • Data flows between customers-providers • Top level providers are peers • They exchange information to ensure connectivity • What can possibly go wrong?

  25. And then came the rain… • Thousands of ASs • Complicated relationships • Multiple providers for one AS!! • Multihoming • Traffic engineering • I want to use multiple paths and load balance

  26. AS Relationships Provider Customer 200 100 • Customer – Provider: customer pays and is always right • Peer to Peer: Exchange traffic only between their customers • Sibling-Sibling: Exchange traffic at will Peer Peer 10 11 12 13 1 4 3 2

  27. The Rules of BGP Routing • Transit traffic: traffic that does not go to my customers (or their customers) • A provider carries any traffic to or from a customer • Peers exchange traffic only if between their customers

  28. How BGP Policy Restricts Routing • Routing rules: • Provider accept everything • Peer only if it is for its customers • Path Properties: • Up then down • No up-down-up, at most 1 peer-peer steps Provider Customer Peer 100 Peer 200 10 11 13 12 1 3 4 2

  29. Implementing BGP Rules • What do you do with an advertisement: • Through customer link • Advertise to all (customers, peers, providers) • Through provider link • Advertise to customer only (and possibly siblings) • Through peer link • Advertise to customer only (and possibly siblings) • Through sibling link • Advertise to all

  30. How Policies Affect Routing • A Provider will get rid of traffic as soon as possible, • But a Provider will carry the traffic for its customer • Did anyone say traffic is asymmetric? Customer 1 ISP1 ISP2 Customer 2

More Related