Inter-Domain Routing: BGP Stefano Vissicchio UCL Computer Science CS 3035/GZ01
Agenda We study how to route over the Internet 1. Context The Internet, a network of networks Relationships between ASes 2. Inter-domain routing 3. BGP 2
We have studied Intra-Domain Routing Domain 1 (e.g., UCL) 1.2.3.48 1.2.3.156 5.6.7.11 host host DNS host host... DNS 1.2.2.0/23 255.255.254. 1.2.3.19 0 router router router 5.6.7.0/24 Internet Domain: single organization, typically owning 100s routers 3
We now look at Inter-Domain Routing Domain 1 (e.g., UCL) Domain 2 (e.g., JANET) Domain 3 (e.g., Cambridge) 4
in the Big Internet Domain 10 (e.g., GEANT) Domain 172 (e.g., Internet2) Domain 2 (e.g., JANET) Domain 1 (e.g., UCL) Domain 3 (e.g., Cambridge) Domain 564 (e.g., CENIC) Domain 1771 (e.g., Berkeley) 5
in the Big Internet Domain 10 (e.g., GEANT) Domain 172 (e.g., Internet2) About Domain 60,000 2 Ases on (e.g., Dec JANET) 5 th, 2017 (see cidr-report.org) Domain 1 (e.g., UCL) Domain 3 (e.g., Cambridge) Domain 564 (e.g., CENIC) Domain 1771 (e.g., Berkeley) 6
Domains == Autonomous Systems In inter-domain routing, a domain is also called Autonomous System (AS) Each AS known by unique 32-bit number used to be 16 bits, but expanded in 2006 AS owns one or a handful of address prefixes assigned by Regional Internet Registries (RIRs) RIPE, ARIN, LACNIC, APNIC, AFRINIC overseen by IANA 7
Agenda We study how to route over the Internet 1. Context The Internet, a network of networks Relationships between ASes 2. Inter-domain routing 3. BGP 8
Global Internet Routing: Naïve View Shared, densely connected infrastructure ASes cooperate to find globally optimal paths e.g., globally shortest and lightly loaded paths No correspondence to reality! 10
Global Internet Routing: Socialist Style Multiple, interconnected Internet Service Providers (ISPs) ISPs all equal: in connectivity and network extent Little correspondence to reality! 11
Global Internet Routing: Capitalist Style Tiers of ISPs: Tier 3: local ISPs Tier 2: regional ISPs Tier 1: worldwide ISPs Some relation to reality! ISPs are business entities Routing follows money, per-as policies 12
AS Relationships Basic connectivity model: customer-provider Customer: smaller AS paying for connectivity (e.g., corporations, universities) Provider: larger AS being paid for connectivity (e.g., regional ISPs) Alternative: peering Two ASes mutually forward their own traffic, but there is no exchange of money 13
AS Relationship: Customer-Provider Provider allow customer to route to (nearly) all destinations in its routing tables It provides transit to customer s traffic Transit nearly always involves payment from customer to provider 14
AS Relationship: Peering Two ASes mutually allow one another to route to some destinations usually, ISPs peer for customers destinations Contractual agreement, but usually no money changes hands as long as traffic ratio is narrower than, e.g., 4:1 15
Incentives to Peer Typically, two ISPs notice their own direct customers originate a lot of traffic for the other Peering ISPs avoids paying transit costs to providers for this traffic; shunt it directly to one another Often better performance (shorter latency, lower loss rate) as avoid transit via another provider Easier than attracting one another s customers Note: Tier 1s must typically peer with one another to build complete, global routing tables 16
Disincentives to Peer Yet, ISPs compete with each other Peering doesn t let ISPs charge anybody Transit traffic enables to charge customers Peering contracts must be renegotiated often Peers need to agree on how to handle asymmetric traffic loads between them Nobody really knows if and how traffic patterns will change after peering 17
Agenda We study how to route over the Internet 1. Context 2. Inter-domain routing Goals Basic scheme 3. BGP 18
Inter-Domain Routing: Goals Scalability Each Internet host must have unique IP address Internet hosts are millions (potentially, trillions?) Onerous / impractical to consult central authority for each new host 19
Internet Address Allocation is Hierarchical Routers keep track IP prefixes Divide 32-bit IP address hierarchically e.g., 128.16.64.200 is a host at UCL e.g., 128.16.64/24 prefix is UCL CS dept e.g., 128.16/16 prefix is all of UCL 20
Hierarchical Addressing: Pros Reduction of number of destinations in global Internet routing system Outside UCL, single prefix 128.16/16 can represent thousands of hosts on UCL network Decentralized allocation of unique addresses Inside UCL, local authority can allocate low-order 16 bits of host IP addresses under 128.16 prefix Based on the intuition that centralized address allocation is easier for smaller user/host population 21
Hierarchical Addressing: Cons Inherent loss of information from global routing protocol; implies less optimal routes External ASes know nothing about UCL s addresses: all traffic via London if UCL has host in Antarctica Host addresses indicate both host identity and network attachment point Suppose I move my UCL laptop to Berkeley: IP address must change, so it aggregates under Berkeley IP prefix! 22
Inter-Domain Routing: Goals Scalability in number of ASes and prefixes Yet, 60k ASes and 700k announced prefixes 23
Inter-Domain Routing: Goals Scalability in number of ASes and prefixes Yet, 60k ASes and 700k announced prefixes Enforcing policies, not optimality! ASes are competitors, and routing must reflect commercial agreements We need cooperation under competitive pressure BGP designed to run on successor to NSFnet, the former single, government-run backbone 24
Intra-Domain Protocols aren t appropriate Insufficient scalability DV and LS cannot scale to Internet routing prohibitive message complexity for LS flooding loops and slow convergence for DV No support for policies DV and LS compute shortest paths How to reflect commercial agreements? 25
Hence, BGP... New goals raise the need for a new protocol BGP is the de-facto inter-domain routing protocol It allows to route between ASes, with policies BGP is complementary to LS and DV protocols BGP is an Exterior Gateway Protocol (EGP), as it runs between ASes LS and DV are Interior Gateway Protocols (IGPs), since they run among subnets inside a single AS 26
Agenda We study how to route over the Internet 1. Context 2. Inter-domain routing Goals Basic scheme 3. BGP 27
Inter-domain Routing Principles ASes exchange coarse-grained information At a per-as level rather than at a per-router one Scalable, support Internet business model competition à information hiding Each AS implements autonomous routing choices Custom route selection Custom route filtering 28
Routes are Offers to Carry Traffic AS A can offer to forward traffic from AS B to a destination D A advertises to B a route for destination D Forwarding traffic has a cost bandwidth, network resources, etc. Routes reflect economic agreement between ASes e.g., B pays A for the forwarded traffic 29
ASes Autonomously Select Routes Each AS selects one among the many routes received for the same destination e.g., routers may hear a different route from each neighbouring AS In route selection, the identity of advertiser is key ASes are profit-driven Customer traffic is remunerative, peering traffic is neutral and provider traffic is a cost Customer routes > peer routes > provider routes 30
ASes Filter Routes ASes import only some routes from neighbours Strongly motivated to control which routes to avoid e.g., don t carry traffic for a provider (for free) But also export only some routes to neighbours e.g., only let peering AS send to specific customer destinations enumerated peering contract Note: only selected routes are exported! 31
Routes Heard from Customers An ISP is motivated to advertise routes to reach its own customers to everybody Customers pay to be reachable from global Internet More traffic à customer will buy a faster link If an ISP hears route for its own customer from multiple neighbours, it should favour advertisement from its own customer 32
Routes Heard from Providers If ISP hears routes from its provider (via a transit relationship), it passes them to customers only Customers pay to reach global Internet Not to peers or providers: they don t pay, so no motivation to provide transit service for them! 33
Example: Routes Heard from Providers ISP P announces route to C P, own customer, to X X doesn t announce C P to Y or Z; no revenue from peering X announces C P to C i ; they re paying to be able to reach everywhere 34
Routes Advertised to Peers Which routes should an ISP advertise to ASes with whom it has peering relationships? Routes to ISP s own addresses Routes for all own downstream customers Not routes heard from upstream transit providers, which don t pay Not routes heard from other peerings: don t pay 35
Example: Routes Advertised to Peers ISP X announces C i to Y and Z ISP X doesn t announce routes heard from ISP P to Y or Z ISP X doesn t announce routes heard from ISP Y to ISP Z, or vice-versa 36
Route Filtering: Summary ISPs typically provide selective transit Full transit (export of all routes) for own customers in both directions Some transit (export of routes between mutual customers) across peering relationship Customer-only transit (export of routes to customers) for providers Route advertisements are based on policies (money), not optimality (e.g., shortest paths) 37