BGP supplement Abhigyan Sharma
Autonomous systems AS is a network under a single administrative domain … … glued to other ASes by the Border Gateway Protocol But, “Not all ASes are created equal” Tier 1 (global), Tier 2 (regional) Tier 3 (maybe stub ASes) may not need to run BGP, if they configure a default gateway router
Key routing protocols External BGP (eBGP) Internal BGP (iBGP) Exchange routes with other ASes to obtain reachability information Internal BGP (iBGP) Disseminate routes learned via eBGP among routers in AS Interior Gateway Protocol Optimize path metrics using a variety of techniques (shortest path, distance vector)
BGP protocol IP Prefix: Attributes OPEN initiate BGP session over a TCP conneciton with another BGP speaker and exchange all routes with one another UPDATE Announcements : advertise new routes Withdrawal: remove previously advertised routes KEEP-ALIVE because TCP does not have keep alives Format of messages: IP Prefix: Attributes
Exporting and importing routes Exporting: which routes should I advertise to another eBGP speaker Importing: if I receive multiple routes to the same prefix, which one should I install locally Complex decisions, but one key factor is typical AS policies Customer > peer > provider
LOCAL_PREF attribute How are policies implemented in BGP? LOCAL_PREF attribute: sets a weight (e.g., 100) for routes originating from a router in neighbouring AS. LOCAL_PREF is propagated among routers within AS but not outside! RTC# router bgp 256 neighbor 1.1.1.1 remote−as 100 neighbor 128.213.11.2 remote−as 256 bgp default local−preference 150
Disseminating routes within an AS: iBGP Why? Multiple eBGP speakers learn routes from different ASes Must propagate all routes to all routers inside AS (including non-eBGP speakers) Goals: Loop-free forwarding: obvious! Complete visibility: all routers must reach the decision they would have reached if they received all eBGP advertisements
iBGP Why do we need a new protocol? IGP protocols do not provide incremental updates IGP protocols do not implement all of BGP’s attributes How to sync eBGP speakers to 100s of routers in a tier-1 AS? Full-mesh: e(e − 1)/2 + ei BGP sessions (quadratic scaling problem) Route reflectors: Configure a group of routers as a client of BGP route reflector
Route reflector operations
NEXT_HOP attribute IP address of next hop router along the path to the destination Mandatory attribute When crossing AS boundary, NEXT_HOP is updated to the IP of border router
ASPATH attribute Complete list of ASes along the path Achieves loop avoidance Gives a hint about length of route LOCAL_PREF > ASPATH 1 2 3 4 10.1.0.0/16 10.1.0.0/16 AS 1 10.1.0.0/16 AS2, AS 1 10.1.0.0/16 AS 3, AS 2, AS 1
MED (Multi-exit discriminator) If two ASes linked at multiple location, then MED value may accompany path advertisements lower MED value better path Provides an AS an option to control location of incoming traffic Provides neighboring AS guidance in choosing among multiple next hop routers May be ignored! MED 200 AS 1 AS 2 MED 100
Route importing based on multiple criteria LOCAL_PREF ASPATH MED eBGP > iBGP IGP path Router ID Decreasing order of importance