How to configure Route Tagging

Hello Vadim

Route tagging is only useful when used between two IGP routing domains. The practical application is to prevent the “re-redistribution” of a route back into the routing domain that originated it. BGP however, does not support tags, because tags are not a BGP attribute, so there is no field in the BGP header to accommodate tags.

Actually, 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.

In addition, BGP and IGPs coexist within the same AS, thus you don’t have a situation that is described by this diagram in the lesson:
image
where each routing protocol has a separate domain. But because IGPs operate like this, such a diagram makes sense.

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

I hope this has been helpful!

Laz