Troubleshooting Scenario on Incorrect BGP AS Number

Rashmi Bhardwaj | Blog,Config & Troubleshoot,Protocol,Routing & Switching
Google ADs

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 –

Google ADs

The configuration is shown below

R1

conf t

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

conf t

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 –

*Mar 1 00:27:09.287: %BGP-3-NOTIFICATION: sent to neighbor 192.168.12.2 2/2 (peer in wrong AS) 2 bytes 0014

R2 –

*Mar  1 00:28:37.991: %BGP-3-NOTIFICATION: received from neighbor 192.168.12.1 2/2 (peer in wrong AS) 2 bytes 0014

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”

R1#Config t

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-

R1#Config t

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 –

R2#con t

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 router identifier 1.1.1.1, local AS number 1

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 router identifier 2.2.2.2, local AS number 20

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


1 thought on “Troubleshooting Scenario on Incorrect BGP AS Number”

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart