We know how to change peer ASN without changing BGP processor ID which might be private ASN. That is local-as commands is the one to replace ASN for outside of world. However, your BGP peer keep on sending private ASN or current BGP processor ID. Here is the magic command to fix it.
"neighbor x.x.x.x local-as yyy no-prepend replace-as"
From below example, we will use ASN 100 on R1 to peer with R5. After configured R1, we got following output.
R1(config-router)# neighbor 10.10.15.5 local-as 100
R5# sh ip bgp
BGP table version is 69, local router ID is 200.5.5.5
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
*> 10.0.0.0 10.10.15.1 0 0 100 65500 i
*> 10.10.12.0/24 10.10.15.1 0 0 100 65500 i
*> 10.10.13.0/24 10.10.15.1 0 0 100 65500 i
r> 10.10.15.0/24 10.10.15.1 0 0 100 65500 i
*> 10.10.26.0/24 10.10.15.1 0 100 65500 i
*> 30.30.30.0/24 10.10.15.1 0 100 65500 i
*> 100.100.100.0/24 10.10.15.1 0 0 100 65500 i
R5#
R1(config-router)# neighbor 10.10.15.5 local-as 100 no-prepend replace-as
R5# sh ip bgp
BGP table version is 84, local router ID is 200.5.5.5
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
*> 10.0.0.0 10.10.15.1 0 0 100 i
*> 10.10.12.0/24 10.10.15.1 0 0 100 i
*> 10.10.13.0/24 10.10.15.1 0 0 100 i
r> 10.10.15.0/24 10.10.15.1 0 0 100 i
*> 10.10.26.0/24 10.10.15.1 0 100 i
*> 30.30.30.0/24 10.10.15.1 0 100 i
*> 100.100.100.0/24 10.10.15.1 0 0 100 i
R5#
Recent Comments