CCNA Class 18: BGP Concept and Configurations
BGP Fundamental
Border Gateway Protocol (BGP) refers to an Exterior Gateway Protocol that enables the Internet to exchange routing information and communication between Multiple autonomous systems (AS). The backbone protocol ensures global connectivity by determining the best paths for data transmission across networks.
Core Concepts of BGP
Autonomous Systems (AS): Each AS represents a collection of networks under a single administrative control, identified by a unique Autonomous System Number (ASN).
Path Vector Protocol: Unlike traditional distance-vector or link-state protocols, BGP uses a path vector routing protocol. It includes the complete AS path in routing updates, ensuring loop-free routing and enabling sophisticated policy control.
Inter-Domain Routing: BGP is primarily designed for routing between AS(s) known as inter-domain routing. This is in contrast to protocols like OSPF or EIGRP, which handle intra-domain (within an AS) routing.
Peering and Neighbor Relationships: Routers running BGP establish a neighbor relationship (peering) using TCP port 179 to exchange routing information. Neighbors can be: -
eBGP (External BGP): Between routers in different AS(s).
iBGP (Internal BGP): Between routers within the same AS.
BGP Attributes: Routes in BGP are associated with attributes that influence the path selection process. Common attributes include:
AS_PATH: List of AS(s) the route traverses.
NEXT_HOP: Next-hop IP address for the route.
LOCAL_PREF: Preference for routes within the same AS.
MED (Multi-Exit Discriminator): Suggests preferred entry points between AS(s).
Weight: Cisco-specific attribute for path selection.
Route Selection Process: BGP selects the best route based on a predefined set of rules, prioritizing attributes like LOCAL_PREF, AS_PATH length, and MED.
Policy-Based Routing: BGP allows administrators to implement routing policies to control traffic flow based on business or technical requirements.
Scalability: BGP can handle thousands of routes, making it suitable for large-scale networks like the Internet.
Incremental Updates: BGP sends incremental updates (only changes) to neighbors rather than full routing tables, reducing bandwidth usage
BGP CONFIGURATION
Addressing Table: -
Part 01: Configure the BGP
ISP1_R(config)#router bgp 200
ISP1_R(config-router)#bgp router-id 1.1.1.1
ISP1_R(config-router)#neighbor 1.2.3.2 remote-as 100
ISP1_R(config-router)#network 200.200.100.0 mask 255.255.255.0
ISP1_R(config-router)#network 1.2.3.0 mask 255.255.255.252
ISP2_R(config)#router bgp 300
ISP2_R(config-router)#bgp router-id 1.1.1.2
ISP2_R(config-router)#neighbor 2.3.4.1 remote-as 100
ISP2_R(config-router)#network 2.3.4.0 mask 255.255.255.252
ISP2_R(config-router)#network 201.201.100.0 mask 255.255.255.0
T1_ISP(config)#router bgp 100
T1_ISP(config-router)#bgp router-id 2.2.2.2
T1_ISP(config-router)#neighbor 1.2.3.1 remote-as 200
T1_ISP(config-router)#neighbor 2.3.4.2 remote-as 300
T1_ISP(config-router)#network 1.2.3.0 mask 255.255.255.252
T1_ISP(config-router)#network 2.3.4.0 mask 255.255.255.252
Part 02: Checking the BGP Configuration
Step 01: Checking from the Routers
ISP1_R#show ip bgp neighbors
ISP1_R#show ip bgp summary
ISP1_R#show ip protocols
Step 02: Checking from the PCs