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
router bgp 100
 neighbor remote-as 300
 neighbor 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
 *>                                                   0                  200 100 i
 *>                 0                                    0                    200 100 i
 *>                  0                                  32768               i
R1#sh ip bgp
     Network                Next Hop             Metric       LocPrf         Weight            Path
 *>                      0                                  32768                i
 r>i                      0               100                0                     i
 *>i                0              100              0                  200 300    i

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

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

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

But, we’ll see not difference in output of R3 for R1’s prefix  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 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 ( and R2’s prefixes (, on R3.

R3#sh ip bgp
     Network          Next Hop            Metric                 LocPrf      Weight         Path
 *>                                                                0               200 i
 *>                 0                                            0               200 i
 *>                  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