BGP4 - Border Gateway Protocol
Autonomous Systems Routers under a single administrative control are grouped into autonomous systems Identified by a 16 bit Autonomous System Number (ASN) Normally BGP chooses the route with shortest AS PATH as “best”
Types of Autonomous Systems Single-homed Multi-homed non-transit Multi-homed transit
ASN Numbers 16-bit Integer, 1 thru Public ASNs 1 thru –Assigned by ARIN requires multihoming Private ASNs thru 65535
Typical ASN Connections
Sample ASNs 2553FSU209Qwest 3447Sprint-TLH701UUNET 6912Hayes3996FIRN 8103DMS22909Comcast 2379Sprint-Orld3506CSIT 1239Sprint-BB10490GIT-I2
FSU ASN Connections
sh ip bgp neighbor HCS-TLH-2#sh ip bgp sum BGP router identifier , local AS number 6912 BGP table version is , main routing table version BGP activity / prefixes, / paths Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd :09: d09h d09h d00h w1d d09h 4 HCS-TLH-2#
sh ip bgp nei routes HCS-TLH-2#sh ip bgp neighbor routes BGP table version is , local router ID is Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> i *> i *> i *> i Total number of prefixes 4 HCS-TLH-2#
Route Servers To figure out Internet backbone problems, there are several public route servers Many can be found at On the next slide, we look at one route server’s entries for the FSU ASN
sh ip bgp route-views.oregon-ix.net>sh ip bgp BGP routing table entry for /16, version Paths: (51 available, best #6) from ( ) Origin IGP, localpref 100, valid, external from ( ) Origin IGP, localpref 100, valid, external from ( ) Origin IGP, localpref 100, valid, external Community: 267: : : : from ( ) Origin IGP, localpref 100, valid, external, best Community: 11537:950
IBGP BGP routers within the same AS speak IBGP with each other BGP routers that speak to each other are called “peers” or “neighbors” IBGP speakers within an AS need not be directly connected to each other, but must be fully meshed or use a route reflector
EBGP BGP routers in different ASNs speak EBGP to each other Normally are directly connected Sometimes use EBGP Multihop
EBGP - IBGP
Public Tools Route Servers, Traceroute Servers, Looking Glass servers at Digex Looking-Glass nitrous.digex.net
Protocol BGP peers speak using tcp/179 Initially send full routing table, followed by periodic updates Updates are incremental BGP table version keeps track of the state Routing entries include subnet and support CIDR Table entries also have associated attributes
BGP attributes Origin ASPATH Weight Local Preference Multi-Exit Descriminator (MED) Communities Origin Type Next-Hop
BGP Attributes 2 Both mandatory and optional attributes Route Maps used to manipulate attributes Eg: Can use route maps to prepend the ASPATH on routing annoucements
Route Maps Manipulate routes and their attributes See Doyle vol 1, chapter 14, p805 Each has a line number and is processed sequentially (similar to BASIC) Match on IP address, next hop, metric, etc. Can set various attributes
BGP Net Advertisements Normally, use a NETWORK statement for networks to be advertised BGP will only advertise a network to its BGP peers if there is a local route for the network. Local routes are often added to the NULL 0 device for this purpose Can disable synchronization but not recommended.
BGP Advertisments 2 router bgp 2553 network mask ip route null 0
Weight Attribute Cisco specific Default Highest weight preferred when multiple paths to a destination exist Local relevance (not propogated)
Local Preference Attribute Only applies when multiple routes to a destination all with the same weight Default is 100 Attribute exchanged within AS Highest local preference is preferred Used to control exit point when your AS has mulitple EBGP connections
Metric / MED Attribute MED=Multi Exit Descriminator Gives external AS hints as to your preferred entry to your network Not always honored, ASPATH prepend may be better Low value is preferred
Community Attribute Used for grouping destinations Allows applying routing decisions to according to communities. Must explicitly send communities Also used for other enhancements like MPLS/VPNs
ASPATHs List of ASNs representing the path to a desination Use ASPATH filters with regular expressions to match “ip as-path 5 permit ^2553” (Matches routes originating from FSU AS) Applied with filter-list or route-map
ASPATH Regular Expressions.Single Character Wildcard ^Beginning of String $End of String _Match beginning,end,comma,brace, or space *Zero or more occurances +One or more occurances
Regular Expressions Examples _2553_Paths that traverse FSU ^2553$Origin FSU ^2553.*Path from FSU ^$Null path from this AS Experiment with: sh ip bgp regexp REGULAR-EXP
Internet Backbone Architecture Backbone ISPs provide service Backbone ISPs peer at the Internet NAPs Large backbone ISPs also privately peer Peering arrangements are largely determined by finances
References Internet Routing Architectures 2/e - Halabi RFC1771 BGP4 Case Studies - Halabi