BGP Remove Private AS

Hello David,

We often think about BGP exclusively as the routing protocol on the Internet. Remember, it is also extensively used on internal enterprise networks as well as on edge networks. As such, there are several situations in which you would have both private and public ASes in the AS Path. Take a look at this post concerning this fact.

Specifically, in the real world, you might encounter multiple ASes in the AS Path field that are both Private and Public in scenarios where an organization has multiple branches with their own private AS, and they are connected to the internet (public AS) through their ISP.

In such scenarios, the Remove-Private-AS All command can be used when you want to remove all occurrences of private AS numbers from the AS path, irrespective of their position in the path. This is generally done to hide the internal AS path details when advertising routes to external peers.

On the other hand, the Remove-Private-AS All Replace command replaces all occurrences of private AS numbers with the local AS number. This is useful when you want to maintain the length of the AS path while still hiding the private AS numbers.

I hope this has been helpful!

Laz