Monday, 4 May 2020

BGP CHAPTER 12 - BGP SYNCHRONIZATION RULE


Today we will discuss regarding BGP Synchronization Rule which states-

"Don't use or advertise the route/s learned via an iBGP neighbor to an eBGP neighbor unless & until the same is/are learned via some other IGP like RIP , OSPF ,EIGRP etc . "


This feature is off by default in Cisco IOS Software release 12.2(8)T and later.

To disable BGP Synchronization 

R1(config)#router bgp 100                    -------> AS is 100
R1(config-router)#no synchronization 

To enable BGP Synchronization 

R1(config-router)#synchronization



Lets check the interfaces of all the Routers

R1#sh int des
Interface                      Status         Protocol Description
Fa0                            up             up       ***CONNECTION_TO_R2***
Se0                            up             up       ***CONNECTION_TO_R3***

R1#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0              12.1.1.1        YES manual up                    up
Serial0                    13.1.1.1        YES manual up                    up

R2#sh int des
Interface                      Status         Protocol Description
Fa0                            up             up       ***CONNECTION_TO_R1***
Lo0                            up             up

R2#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0              12.1.1.2        YES manual up                    up
Loopback0                  100.0.0.1       YES manual up                    up

R3#sh int des
Interface                      Status         Protocol Description
Se0                            up             up       ***CONNECTION_TO_R1***

R3#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
Serial0                    13.1.1.3        YES manual up                    up

Lets configure BGP on all Routers by keeping synchronization off .

R1(config)#router bgp 100
R1(config-router)#neighbor 12.1.1.2 remote-as 100
R1(config-router)#neighbor 13.1.1.3 remote-as 200
R1(config-router)#no synchronization

R2(config)#router bgp 100
R2(config-router)#neighbor 12.1.1.1 remote-as 100
R2(config-router)#no synchronization

R3(config)#router bgp 200
R3(config-router)#neighbor 13.1.1.1 remote-as 100

Lets advertise 100.0.0.0/24 network on R2 which is iBGP neighbor of R1

R2(config)#router bgp 100
R2(config-router)#network 100.0.0.0 mask 255.255.255.0

Since BGP Synchronization is off on R1 , R1 is using the route i.e installed in its routing and also advertising to R3 which is its eBGP neighbor 

R1#sh ip bgp
BGP table version is 2, local router ID is 13.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i100.0.0.0/24     12.1.1.2                 0    100      0 i


R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/24 is subnetted, 1 subnets
B       100.0.0.0 [200/0] via 12.1.1.2, 00:39:07
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, FastEthernet0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.1.1.0 is directly connected, Serial0


R3#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/24 is subnetted, 1 subnets
B       100.0.0.0 [20/0] via 13.1.1.1, 00:38:31
     13.0.0.0/24 is subnetted, 1 subnets
C       13.1.1.0 is directly connected, Serial0


Now lets ON the Synchronization on R1 !!!!!

R1(config)#router bgp 100
R1(config-router)#synchronization

and check the routing table 

R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     100.0.0.0/24 is subnetted, 1 subnets
B       100.0.0.0 [200/0] via 12.1.1.2, 00:41:03
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, FastEthernet0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.1.1.0 is directly connected, Serial0


Still we are able to view the route .

Lets clear the bgp neighborship once 

R1#clear ip bgp *
R1#
R1#
Apr  2 15:54:13.055: %BGP-5-ADJCHANGE: neighbor 12.1.1.2 Down User reset
Apr  2 15:54:13.059: %BGP-5-ADJCHANGE: neighbor 13.1.1.3 Down User reset
Apr  2 15:54:13.839: %BGP-5-ADJCHANGE: neighbor 12.1.1.2 Up
R1#
Apr  2 15:54:14.195: %BGP-5-ADJCHANGE: neighbor 13.1.1.3 Up

!! Now you can see the route is present in bgp table but not in routing table 

R1#sh ip bgp
BGP table version is 2, local router ID is 13.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i100.0.0.0/24     12.1.1.2                 0    100      0 i


R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, FastEthernet0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.1.1.0 is directly connected, Serial0


Lets check the routing table of R3 as well 
R3#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     13.0.0.0/24 is subnetted, 1 subnets
C       13.1.1.0 is directly connected, Serial0

You can see the 100.0.0.0/24 route is not present in the routing table.


Hope you all find the blog useful !!!!

Thanks for reading !!!!

1 comment: