BGP Overview BGP concepts and operation
What Is BGP? BGP is the core routing protocol within the Internet BGP is a path-vector protocol used for interdomain routing. BGP views the Internet as a collection of autonomous systems. AS 65502 BGP BGP AS 65501 BGP AS 65504 BGP BGP AS 65503 BGP is the core routing protocol within the Internet BGP Is an IETF standard defined in RFC 4271 (supersedes RFC 1771).
When Should I Use BGP? BGP is typically used in large enterprise environments where multiple ISP connections exist, and in all service provider environments ISP A AS 65502 Customer A Single-homed customers typically use a default route to the Internet. BGP AS 65501 BGP Customer B BGP Static Routing AS 65503 Multihomed customers use BGP to control inbound and outbound traffic. ISP B
BGP Peers BGP peers can reside in different ASs or the same AS Peers in different ASs use the external session type (EBGP) Peers in the same AS use the internal session type (IBGP) AS 65502 IBGP is not used because a single BGP speaker exists. IBGP is used because multiple BGP speakers exist. IGP IBGP EBGP EBGP IGP EBGP IGP EBGP EBGP AS 65501 AS 65504 IGP IBGP AS 65503
Established Neighbors BGP Peers BGP peering sessions are manually defined and rely on TCP connections No automatic neighbor discovery BGP Neighbor States TCP Connectivity BGP Connectivity Idle OpenSent Connect OpenConfirm Active Established R1 R2 TCP Connectivity BGP Connectivity Established Neighbors
High-Level BGP Operation ISP B (AS 65002) ISP A (AS 65001) ISP C (AS 65003) Static default route to ISP A Static route to Customer A Customer A is single-homed to ISP A and uses 172.20.21.0/24 subnet, which was assigned by ISP A Customer B (AS 65501) Customer A
Static route for 172.20.21.0/24 to Customer A ISP A’s Network I can reach 172.20.0.0/16 R3 R2 ISP A (AS 65001) ISP C (AS 65003) R4 R1 Customer A I can reach 172.20.21.0/24 Static route for 172.20.21.0/24 to Customer A Note: All BGP routes start as something other than BGP routes.
ISP A’s Aggregate 172.20.0.0/16 is reachable through AS 65002 and AS 65001 172.20.0.0/16 is reachable through AS 65001 172.20.0.0/16 is reachable through AS 65003, AS 65002 and AS 65001 ISP B (AS 65002) ISP A (AS 65001) ISP C (AS 65003) ISP A advertises an aggregate of 172.20.0.0/16 through BGP to ISP B Customer B (AS 65501) Customer A
Customer B’s Aggregate 172.31.128.0/20 is reachable through AS 65002, AS 65003 and AS 65501 172.31.128.0/20 is reachable through AS 65003 and AS 65501 ISP B (AS 65002) ISP A (AS 65001) ISP C (AS 65003) 172.31.128.0/20 is reachable through AS 65501 Default static route Customer B advertises its 172.31.128.0/20 network through BGP to ISP C Customer B (AS 65501) Customer A
Customer B Connects to ISP B ISP B chooses the best path and advertises only that path 172.31.128.0/20 is reachable through AS 65002 and AS 65501 172.31.128.0/20 is reachable through AS 65003 and AS 65501 ISP B (AS 65002) ISP A (AS 65001) ISP C (AS 65003) 172.31.128.0/20 is reachable through AS 65501 Default static route Customer B advertises its 172.31.128.0/20 network through BGP to ISP B and ISP C Customer B (AS 65501) Customer A
BGP Commands 1-3 router bgp autonomous-system Enables the BGP routing protocol
Establishing BGP Neighbors neighbor ip-address remote-as autonomous-system Activates a BGP session Used for both external and internal neighbors
BGP network command network network-number Allows BGP to advertise an IGP route if it is already in the IP table This command differs from the network command in OSPF, RIP and EIGRP in that it does not activate the protocol on an interface