BGP and route tagging

Route tagging is a technique used to prevent networks from being re-redistributed into a routing domain from which the networks originated. It is a loop prevention mechanism that should be employed whenever two IGPs are redistributing routes between them.

Route tagging however does not work for BGP. Indeed, BGP does not support tags, because there is no field in the BGP header to accommodate tags.

BGP doesn’t need tags because the purpose of redistribution from an IGP to BGP is to allow BGP to learn and advertise networks internal to the local AS. Those learned networks are then advertised to other ASes via eBGP. Now if BGP attempts to advertise those networks back to their originating AS, there are already built-in loop prevention mechanisms, and in particular, the AS_PATH check that will prevent this from happening before it ever reaches redistribution. Specifically, an eBGP router will not accept a prefix that contains its own AS in the AS_PATH.

However, if you want to implement something similar to route tagging using BGP, then you can use BGP communities to carry information about prefixes, and you can act upon those communities using Route-maps.

https://networklessons.com/bgp/mpls-layer-3-vpn-bgp-allow-as-in

Links to this page: