There are instances when BGP neighborship between 2 BGP enabled Routers may not be working due to incorrect BGP AS number configured on one of the Routers. This post discusses one such scenario.
Below is the ideal situation where Router R1 belongs to BGP ASN 1 while R2 belongs to BGP ASN 2.
Example Scenario: Incorrect BGP AS Number
During configuration of devices, administrator accidentally configures an incorrect BGP AS number 20, instead of AS 2 on R2 as shown is below diagram –
The configuration is shown below
R1
router bgp 1
net 1.1.1.0 m 255.255.255.0
net 192.168.12.0
neighb 192.168.12.2 remote-as 2
R2
router bgp 20 >>>>>>>>>> Incorrectly configured ASN 20 instead of ASN 2
net 2.2.2.0 m 255.255.255.0
net 192.168.12.0
neighb 192.168.12.1 remote-as 1
When R2 is configured with wrong AS Number, lets se the error message sent by R1 and received by R2 –
R1 –
R2 –
As seen from the output logs on R1 and R2, where R1 sends the notification and R2 receives the notification on incorrect AS number (shown in HEX as “0014”) which comes out to be BGP ASN “20” in decimal.
Now that we know R2 has been wrongly configured as BGP AS 20 instead of 2 , the administrator can perform any of below options to address the problem scenario –
Option 1 –
Change the BGP configuration on R2 i.e. remove “Router BGP 20” and replace whole configuration on “Router BGP 2”
No router bgp 20
router bgp 2
net 2.2.2.0 m 255.255.255.0
net 192.168.12.0
neighb 192.168.12.1 remote-as 1
Option 2 –
On R1 , configure neighbor command with “Remote-as” of R2 being 20 instead of 2-
router bgp 1
R1(config-router)#neighbor 192.168.12.2 remote-as 20
Option 3 –
Configure “local-AS 2” on R2 to show to R1 that it belongs to AS 2 and not AS 20 as below –
Router bgp 20
neighbor 192.168.12.1 local-as 2
Once the any of above configuration is performed, the BGP neighborship comes up.
The output is shown below after any of the above 3 configuration is performed on R1/R2 –
R1#sh ip bgp summ
BGP table version is 8, main routing table version 8
3 network entries using 351 bytes of memory
4 path entries using 208 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 955 total bytes of memory
BGP activity 4/1 prefixes, 6/2 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.168.12.2 4 2 117 117 8 0 0 00:30:02 2
R2#sh ip bgp summar
BGP table version is 8, main routing table version 8
3 network entries using 351 bytes of memory
4 path entries using 208 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 955 total bytes of memory
BGP activity 4/1 prefixes, 6/2 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.168.12.1 4 1 116 116 8 0 0 00:29:33 2
Continue Reading:
Sample Configuration for eBGP and iBGP
Troubleshooting directly connected eBGP neighbors
ABOUT THE AUTHOR
I am here to share my knowledge and experience in the field of networking with the goal being – “The more you share, the more you learn.”
I am a biotechnologist by qualification and a Network Enthusiast by interest. I developed interest in networking being in the company of a passionate Network Professional, my husband.
I am a strong believer of the fact that “learning is a constant process of discovering yourself.”
– Rashmi Bhardwaj (Author/Editor)
nice one. But try to give tough troubleshoot article