Download presentation
Presentation is loading. Please wait.
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) Vectoring Distributed Routing protocol Each Router knows little about the network topology Only best next-hops are chosen by each router for each destination network Best end2end paths result from composition of all next-hop choices Does not require any notion of distance Does not require uniform policies at all routers
3
Internet Structure Original idea Backbone service provider “ Consumer
” ISP Large corporation “ Consumer ” ISP Small “ Consumer ” ISP “ corporation Consumer ” ISP Small Small Small corporation corporation corporation CS 640
4
Internet Structure Today Backbone service provider Peering point
Large corporation Small corporation “ Consumer ” ISP 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: BGP goal: find loop free paths between ASs
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
BGP Example Speaker for AS2 advertises reachability to P and Q
network , , , and , can be reached directly from AS2 Speaker for backbone advertises networks , , , and can be reached along the path (AS1, AS2). Speaker can cancel previously advertised paths Backbone network (AS 1) Regional provider A (AS 2) Regional provider B (AS 3) Customer P (AS 4) Customer Q (AS 5) Customer R (AS 6) Customer S (AS 7) 128.96 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 AS 5 Each AS has designated BGP routers BGP routers of an AS communicate internally with another protocol (IGP) AS 4 BGP-speaking routers peer with each other over TCP sessions, and exchange routes through the peering sessions. Providers typically try to peer at multiple places. Either by peering with the same AS multiple times, Or because soma Ass are multi-homed, a typical network will have many candidate paths to a given prefix. --The BGP Route is conceptually a “promise” to carry data to a section of IP space. The route is a “bag” of Attributes. --The section of IP space is called the “prefix” attribute of the route. --As a BGP route travels from AS to AS, the ASN of each AS is stamped on it when it leaves that AS. Called The AS_PATH attribute, or “as-path” in Cisco-speak It provides a mechanism for loop detection. Policies may be applied based on AS path. 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 From Griffin RFC 1930:”… 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.
17
Size of the Routing Table at the core of the Internet
Source:
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 /16 match for 16 bits /24 is a longer match No matches: /24
19
Prefix Matching in More Detail
For a IP address of a packet, find longest match Example: Compare packet IP With /16 IP : Mask : AND : Prefix : 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?
Prefix Origin AS Path /16 123 /24 15 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
The Internet as a Directed Graph
Every edge is bidirectional Business relationships are represented Provider Customer Peer
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 100 200 Peer Peer 10 11 12 13 1 3 4 2 Customer – Provider: customer pays and is always right Peer to Peer: Exchange traffic only between their customers Sibling-Sibling: Exchange traffic at will
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
Provider Customer 100 Peer 200 Peer 10 11 12 13 1 3 4 2 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
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 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.