CCNA Class 16: 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 in CISCO (eBGP)

Addressing Table: -

Device

Interface

IP Address

Subnet Mask

Gateway

ISP1_R

Se0/0/0

1.2.3.1

255.255.255.252

N/A

Gi0/0

200.200.100.1

255.255.255.0

N/A

ISP2_R

Se0/0/0

2.3.4.2

255.255.255.252

N/A

Gi0/0

201.201.100.1

255.255.255.0

N/A

Tier1_ISP

Se0/0/0

1.2.3.2

255.255.255.252

N/A

Se0/0/1

2.3.4.1

255.255.255.252

N/A

PC1

Fa0

200.200.100.10

255.255.255.0

200.200.100.1

PC2

Fa0

200.200.100.20

255.255.255.0

200.200.100.1

PC3

Fa0

201.201.100.10

255.255.255.0

201.201.100.1

PC4

Fa0

201.201.100.20

255.255.255.0

201.201.100.1


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



iBGP CONFIGURATION in CISCO




Step-01: Basic Router Configuration 



Step-02: OSPF Routing Protocol Configuration 

R1(config)#router ospf 1
R1(config-router)#network 10.12.12.1 0.0.0.0 area 0
R1(config-router)#network 10.14.14.1 0.0.0.0 area 0
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0

R3(config)#router ospf 1
R3(config-router)#network 10.23.23.3 0.0.0.0 area 0
R3(config-router)#network 10.34.34.3 0.0.0.0 area 0
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0

R2(config)#router ospf 1
R2(config-router)#network 0.0.0.0 255.255.255.255 area 0

R4(config)#router ospf 1
R4(config-router)#network 0.0.0.0 255.255.255.255 area 0


Step-03: eBGP Routing Protocol Configuration

R1(config)#router bgp 65535
R1(config-router)#network 192.168.15.0 mask 255.255.255.0
R1(config-router)#neighbor 192.168.15.5 remote-as 65531

R5(config)#router bgp 65531
R5(config-router)#network 192.168.15.0 mask 255.255.255.0
R1(config-router)#neighbor 192.168.15.5 remote-as 65535

R6(config)#router bgp 65532
R6(config-router)#network 192.168.36.0 mask 255.255.255.0
R6(config-router)#neighbor 192.168.36.3 remote-as 65535

R3(config)#router bgp 65535
R3(config-router)#network 192.168.36.0 mask 255.255.255.0
R3(config-router)#neighbor 192.168.36.6 remote-as 65532

Step-04: iBGP Routing Protocol Configuration


R1(config)#router bgp 65535
R1(config-router)#neighbor 3.3.3.3 remote-as 65535
R1(config-router)#neighbor 3.3.3.3 update-source lo0

R3(config)#router bgp 65535
R3(config-router)#neighbor 1.1.1.1 remote-as 65535
R3(config-router)#neighbor 1.1.1.1 update-source lo0

Step-05: Verification

R1#sh ip bgp
R1#sh ip bgp 6.6.6.6

R5#sh ip bgp
R5#sh ip bgp 6.6.6.6

R3#sh ip bgp
R3#sh ip bgp 5.5.5.5

R6#sh ip bgp
R6#sh ip bgp 5.5.5.5

N:B: In Cisco Packet Tracer not able to configure iBGP.

Popular posts from this blog

RHCSA-EX200: Vendor Exam Problem Solving

CCNA Class 11: Distance vector Routing Protocol (RIPv1 & RIPv2) Configuration

CCNA Class 10: Introduction of Routed & Routing Protocols and Configuration