04-interdomain
04-interdomain
David Andersen
15-744 Spring 2007
Carnegie Mellon University
Outline
• What does the Internet look like?
• Relationships between providers
– Enforced by: Export filters and import ranking
• BGP: The Border Gateway Protocol
– Design goals
– Protocol basics
• Updates, withdrawals, path vector concept
– eBGP and iBGP
– Scaling with confederations and route reflectors
– BGP decision process, MEDs, localpref, and path length;
load balancing
– Failover and scalability
• Multi-homing and address allocation
• Convergence problems
• Preview of stability
The Internet: Attempt 1
End-hosts
Routers
The Internet: Zooming In
• ASes: Independently owned &
operated commercial entities Autonomous
Systems
BGP Abilene (ASes)
Comcast
CMU
AT&T (PSC)
Cogent
IGPs
(OSPF, etc)
ASes
• Economically independent
• All must cooperate to ensure reachability
• Routing between: BGP
• Routing inside: Up to the AS
– OSPF, E-IGRP, ISIS (You may have heard of
RIP; almost nobody uses it)
• Inside an AS: Independent policies about
nearly everything.
The Internet: Zooming In 2x
AT&T Autonomous
Systems
BGP Abilene (ASes)
Comcast
CMU
Cogent
All ASes are not equal
AS relationships
• Very complex economic landscape.
• Simplifying a bit:
– Transit: “I pay you to carry my packets to
everywhere” (provider-customer)
– Peering: “For free, I carry your packets to my
customers only.” (peer-peer)
• Technical defn of tier-1 ISP: In the “default-
free” zone. No transit.
– Note that other “tiers” are marketing, but
convenient. “Tier 3” may connect to tier-1.
Zooming in 4
Tier
Tier11
Tier
Tier11ISP
ISP ISP
ISP
Tier
Tier22
Tier
Tier22
Tier
Tier22
Tier
Tier
Tier 2: Regional/National Tier 3: Local 33
Economics of Packets
• Transit: Customer pays the provider
• Who is who? Usually, the one who can
“live without” the other. AT&T does not
need CMU, but CMU needs some ISP.
• What if both need each other? Peering.
– Instead of sending packets over $$ transit,
set up a direct connection and exchange
traffic for free! (traceroute www.pitt.edu)
• Tier 1s must peer by definition
• Peering can give:
– Better performance
– Lower cost
– More “efficient” routing (keeps packets
local)
• But negotiating can be very hairy!
Business and peering
• Cooperative competition (brinksmanship)
• Much more desirable to have your peer’s customers
– Much nicer to get paid for transit
• Peering “tiffs” are relatively common
During the “outage”, Level 3 and Cogent’s singly homed customers could not
reach each other. (~ 4% of the Internet’s prefixes were isolated from each other)
Formalizing Relationships
• Provider:
– Sends: all routes to customer and customer’s routes to
everyone
– Prefers: Route to customers over peers/providers
• Peering:
– Sends: to customers but not to other peers or providers.
– Prefers: Route to peer over providers
• Customer:
– Sends: to customers but not to peers or other providers
– Prefers: Anything else.
Enforcing relationships
• Two mechanisms:
• Export filters
– Control what you send over BGP
• Import ranking
– Controls which route you prefer of those you hear.
– “LOCALPREF” – Local Preference. More later.
• Terminology nit: Both people at the BGP session
level are called “BGP peers” regardless of business
relationship. So you have a BGP peering session
with your provider…
BGP version 4
• Design goals:
– Scalability as more networks connect
– Policy: ASes hould be able to enforce
business/routing policies
• Result: Flexible attribute structure, filtering
– Cooperation under competition:
• ASes should have great autonomy for routing
and internal architecture
• But BGP should provide global reachability
BGP
Autonomous Systems (ASes)
Route Advertisement
Traffic
Session
(over
TCP)
• BGP messages
– OPEN
– UPDATE
• Announcements
– Dest Next-hop AS Path … other attributes …
– 128.2.0.0/16 196.7.106.245 2905 701 1239 5050 9
• Withdrawals
– KEEPALIVE
• Keepalive timer / hold timer
• Key thing: The Next Hop attribute
Path Vector
• ASPATH Attribute
– Records what ASes a route went through
– Loop avoidance: Immediately discard
– Short path heuristics
• Like distance vector, but fixes the
count-to-infinity problem
Two Flavors of BGP
iBGP
eBGP