BGP AS Override feature

When implementing the BGP routing protocol, in some cases, the eBGP loop prevention mechanism may cause undesired behavior. Take a look at this MPLS VPN topology for instance:

mpls-vpn-pe-ce-eBGP.png

In this scenario, eBGP is running between the CE and PE routers. Both CE routers are in the same AS but the AS is discontiguous. This means that any routes they share must be shared via eBGP through the MPLS core network. As a result, the CE routers will receive prefixes where AS 12 is included in the AS path.

Under normal circumstances, such prefixes wouldn't be accepted. However, this can be overridden using the as-override keyword on the neighbor command on the PE routers.

This results in the PE router replacing the AS number of 12 with its own AS number of 234. This way, the remote CE router will receive the prefix without seeing its own AS in the advertisement.

This problem can also be resolved using the BGP Allow-AS in feature.

Note that in other circumstances using the as-override feature can be risky, so it must be used with care.

Links:

https://networklessons.com/bgp/mpls-layer-3-vpn-bgp-override/