Notes9:WANRoutingBGP - echadbourne/NET-330 GitHub Wiki
Routing Protocols
Exterior Gateway Protocol: Responsible for building and updating routing tables between organizations - across large internetworks like the internet
- Border Gateway Protocol (BGP): Is the EGP Used on the internet
- Used to help secure the WWI, if we used OSPF other routers could advertise other networks
BGP Overview
- Exchanges routing and reachability information among autonomous systems (AS) on the internet
- The protocol is classified as a path vector protocol
- Makes routing decisions based on paths, network policies, or rule-sets configured by a network administrator
- Some very large organizations may also use BGP as an IGP
Autonomous Systems
- A collection of connected Internet Protocol (IP) routing prefixes
- Under the control of a single administrative entity (eg company, university, ISP)
- That presents a common, clearly defined routing policy to the Internet
AS Numbers
- Unique ASN is allocated to each AS for use in BGP routing
- AS numbers are important because the ASN uniquely identifies each (aggregated) network on the internet
- IANA handles AS number assignments
- Until 2007, AS numbers were defined as 16-bit integers, which allowed for a maximum of 65536 assignments
- Now registries can hand out 32 bit AS numbers (over 4 billion)
AS Number Growth
The number of unique autonomous networks in the routing system of the Internet exceeded 5000 in 1999
- 30,000 in late 2008
- 35,000 in mid 2010
- 42,000 in late 2012
- 54,000 in mid 2016
- 118,000 in Oct 2024
BGP Operation
- BGP neighbors, called peers, are established by manual configuration between routers
- Creates a TCP session on port 179
- A BGP speaker sends 19-byte keep-alive messages every 60 seconds to maintain the connection
- Among routing protocols, BGP is unique in using TCP as its transport protocol
- Others are their own layer 4 protocols
BGP Peering
- So, organizations must "peer" with their ISP(s) and other networks with which they share an external link
- This allows for multi-homed networks (aka multiple connections to the internet)
- Your AS will be advertised through your multiple peers - this allows multiple paths to your IP networks from the internet
- Other routers pick the best "path" to your network
BGP - Path Vector Protocol
Distance Vector Protocols
- Like RIP - use "distances" as route selection metric
- Routing table includes how many hops/routers to a remote network
- Only knows IP of next router - not the full path to destination
Path Vector Protocols
- Routing table includes the "path" of AS numbers to get remote networks
BGP Best Path Algorithm
- BGP Best Path Selection Algorithm is 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 router can receive numerous copies of those routes from various providers
- So it has to compare the multiple routing tables and choose the optimal route on the router
BGP Attributes for selecting path
BGP Update Message
- Sent to peers
- Includes AS Path and IPv4 nets
- 10.0.0.0/8 in this example
Configuring BGP
A basic configuration of BGP is pretty simple
3 steps
- Create BGP instance
- Identify peer neighbors by IP Address
- Identify any networks that the router is responsible 10 advertise
BGP on Cisco
- Define router instance
router bgp *AS_Number_for_Router*
router bgp 1010
- Identify peers
(config-router) neighbor *ip_of_peer* remote-as *as-number_of_peer*
(config-router) neighbor 192.168.1.2 remote-as 2352
- Advertise Networks
(config-router) network 10.10.52.0 mask 255.255.255.0
Additional Notes
- Configuring redistribution of OSPF on border router
- To advertise networks shared through OSPF - the following command must be included in BGP config
redistribute ospf *instance_number*
with bgp the network between routers can only live on one AS number