Use this command in router configuration mode to remove private AS numbers when advertising IPv4 routes to an external peer. To stop removing private AS numbers, use the no form of this command.
This command can only be applied to external peers. Private AS numbers are removed or replaced whether or not the original AS path includes any non-private AS numbers. The AS path advertised to the external peer always includes at least one instance of the local AS number; therefore, removing private AS numbers never results in advertisement of an empty AS_PATH attribute. AS numbers from 64512 to 65535 inclusive are considered private. Although 65535 is a reserved ASN and not technically part of the private range, it is treated as a private ASN when removing or replacing private ASNs.
| Default | Private AS numbers are not removed by default. |
| Format | neighbor ip-address remove-private-as [all replace-as] |
| Mode | BGP Router Config |
| Parameter | Description |
|---|---|
| ip-address | The neighbor's IPv4 address. |
| all replace-as | To retain the original AS path length, replace each private AS number with the local AS number. This is optional. |