MPLS Layer 3 VPN BGP AS Override

Hello Sims

The default behaviour of BGP is that a BGP router will not accept a path to a destination that contains its own AS number. This mechanism is not only OK for the Internet, but it is absolutely necessary. Take a look at the following diagram:


Let’s say that R1 shares a route to destination D with R2 via eBGP. If that route includes AS4 in its path, R2 will not accept it and won’t put it in the BGP table. Why? Because this means that somewhere along the line, BGP has created a loop.

If R2 does put this in its routing table, then when R2 wants to reach destination D it will send such packets to the installed route, but those packets are destined to reenter AS4 at some point (since AS4 is in the path) resulting in a loop.

By not accepting paths that include the local AS, BGP prevents loops which is vital for correct Internet routing.

The lesson here however, indicates a situation where this feature can cause problems, in particular, in a VPN environment such as the one described in the lesson.

I hope this has been helpful!

Laz