BGP LOCAL-AS CONCEPT

Consider the below diagram:
 
 At some point of time say ISP A acquires ISP B, then topology will be like as per below diagram:
Once ISA A acquires ISP B, we need to change the BGP config on both R2 and R3.

The issue is that R3 doesn’t agree to change its configuration and only wants its neighborship to remain with R2 under AS 200 and not the new AS 100.

To solve this, we can use below config on R2:

Scenario 1:  “local-as  xxx” command
R2#
router bgp 100
 neighbor 9.9.23.3 remote-as 300
 neighbor 9.9.23.3 local-as 200   >>>>>>>>> Neighborship with R3.
————————
Below is the output of BGP table from R3 and R1.
————————–
R3#sh ip bgp
         Network             Next Hop            Metric     LocPrf        Weight           Path
 *>  9.9.0.1/32       9.9.23.2                                                   0                  200 100 i
 *>  9.9.0.2/32         9.9.23.2                 0                                    0                    200 100 i
 *>  9.9.0.3/32        0.0.0.0                  0                                  32768               i
—————————–
R1#sh ip bgp
     Network                Next Hop             Metric       LocPrf         Weight            Path
 *>  9.9.0.1/32             0.0.0.0                   0                                  32768                i
 r>i 9.9.0.2/32            9.9.0.2                    0               100                0                     i
 *>i 9.9.0.3/32       9.9.23.3                0              100              0                  200 300    i




Scenario 2:  “local-as  xxx  no-prepend” command.

R2#
R2(config)#router bgp 100
R2(config-router)#neighbor 9.9.23.3 local-as 200 no-prepend
——————-
Below are the outputs from R1 now:
——————–
R1#sh ip bgp | i 9.9.0.3
 *>i 9.9.0.3/32       9.9.23.3                 0    100      0        300 i

You will not see AS 100 in AS Path for R3’s prefix 9.9.0.3/32 on R1. 

But, we’ll see not difference in output of R3 for R1’s prefix 9.9.0.1/32.  The output of R3 will be same as given in Scenario1. 



 Scenario 3:  “local-as xxx  no-prepend replace-as” command.

R2(config-router)#neighbor 9.9.23.3 local-as 200 no-prepend replace-as
With “replace-as” option, we don’t see any difference in out of R1 (will be same as output given in Scenario 2), but on R3, we will not see AS 100 for R1 (9.9.0.1/32) and R2’s prefixes (9.9.0.2/32), on R3.

R3#sh ip bgp
     Network          Next Hop            Metric                 LocPrf      Weight         Path
 *>  9.9.0.1/32       9.9.23.2                                                                0               200 i
 *>  9.9.0.2/32       9.9.23.2                 0                                            0               200 i
 *>  9.9.0.3/32       0.0.0.0                  0                                       32768             i


Hope you have enjoyed reading this Post. Please share your feedback if you liked this post. You can also write to us on networkurge@gmail.com.