Documente Academic
Documente Profesional
Documente Cultură
You can only have private AS numbers in the AS path, if you have a mix of
public and private AS numbers then the router wont remove anything
(theres a solution for this though that I will demonstrate).
If the AS path contains the AS number of the eBGP neighbor then it wont be
removed.
If there are confederations, BGP only removes private AS numbers after the
confederation part in the AS path.
Configuration
I will use the following 3 routers for this:
Remove-Private-AS
Lets take a look at R2 and R3, they should have learned about 1.1.1.1/32:
R2#show ip bgp
BGP table version is 2, local router ID is 192.168.23.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
*> 1.1.1.1/32
192.168.12.1
0
0 64512 i
R3#show ip bgp
BGP table version is 2, local router ID is 192.168.23.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
*> 1.1.1.1/32
Next Hop
192.168.23.2
R2(config)#router bgp 2
R2(config-router)#neighbor 192.168.23.3 remove-private-as
We use the remove-private-as command for this. Lets clear BGP to speed
things up:
R2#clear ip bgp *
Next Hop
192.168.23.2
Its only showing AS 2 in the AS path now, the private AS number has been
removed. Thats easy enough, there are a few other things we can try
however
Remove-Private-AS All
Removing the private AS number(s) will only work if there are no public AS
numbers in the AS path. To demonstrate this I will add extra AS numbers on
the update from R1: