WAN Routing BGP - caitlinmallen/TechWiki GitHub Wiki
WAN Routing - BGP
BGP Overview
Is the EGP used on the Internet
Exchanges routing and reachability information among autonomous systems on the Internet
Classified as a path vector protocol
Makes routing decisions based on paths, network policies, or rule sets configured by a network admin
Some large organizations may also use this as an IGP
Autonomous Systems
The AS is
A collection of connected IP routing prefixes
Under the control of a single administrative entity that presents a common, clearly defined routing policy
AS Numbers
A unique ASN is allocated to each AS for use in BGP routing
Important because the ASN uniquely identifies each network on the Internet
IANA handles ASN assignments
Until 2007, ASN were defined as 16-bit integers which allowed for a max of 65536 assignments
Registries can hand out 32 bit ASN (Over 4 billion)
ASN Growth
The unique autonomous networks in the routing system of the Internet exceeded 5000 in 1999
30k in late 2008
35k in mid-2010
42k in late 2012
54k in mid-2016
BGP Operation
Neighbors, called peers, are established by manual configuration between routers
Creates a TCP session on port 179
A BGP speaker sends a 19-byte keep alive message every 60 seconds to maintain connection
Among routing protocols, BGP is unique in using TCP as its transport protocol
BGP Peering
Organizations must "peer" with their ISP and other networks which they share an external link
This allows for multi-homed networks (Multiple connections to the Internet)
Your AS will be advertised through your multiple peers - allowing multiple paths to your IP networks from Internet
Other routers pick the best "path" to your network
Path Vector Protocol
Distance Vector
Like RIP - use "distance" as a route selection metric
Routing table includes how many hops to a remote network
Only knows IP of next router
Path Vector
Routing tables includes the "path" of ASNs to get to remote networks
BGP Best Path Algorithm
Best Path Algorithm used to choose and install the best routes into the router's routing table
The full Internet BGP routing table includes over 400,000 routes
BGP routers can receive numerous copies of those routes from various providers
So it has to compare the routing tables and choose the most optimal route on the router
BGP Attributes for Selecting Path
Weight
Cisco proprietary, to tell a router which of the multiple local paths to select for traffic leaving the AS. Highest weight preferred. Only has local significance
Local Preference
A value telling IBGP peers which path to select for traffic leaving the AS, default value is 100
Shortest AS Path
Ordered list of all the ASes through which this update has passed
Lowest Origin
How BGP learned of this network
Lowest Multi-Exit Discriminator (MED)
Suggests to a neighboring AS which of the multiple paths to select for traffic that is inbound to your AS. Lowest MED preferred.
BGP Update Message
Sent to peers
Includes the AS Path and IPv4 networks
Configuring BGP
Create BGP instance
Identify peer neighbors by IP address
Identify any networks that the router is responsible to advertise