Routing - route tagging

Route tagging is a technique used in routing when you configure multipoint redistribution between two routing domains. Tagging helps prevent readvertising a route that protocol A redistributed into protocol B, from being redistributed back into protocol A.

For example, take a look at the following diagram: redistribution-multipoint.png Let’s say R1 redistributes the network from routing protocol A into B. R2 will learn about this network from routing protocol B and it may redistribute it back into Routing Protocol A. This is something you want to avoid as it can create a routing loop. Such routing loops can be avoided using tagging.

When R1 redistributes network /24 into routing protocol B, it should tag it. When R2 is going to redistribute routing information from routing protocol B into routing protocol, A it will notice the tag and skip redistribution for network /24. redistribution-routetagging.png Tagging can be achieved by either using Route-maps to add tags to redistributed routes, or by using the tag keyword in conjunction with the redistribute command. Both of these examples can be seen below:

The following route-map configured on R1 will set the tag of a route to 1, while denying any routes with a tag that has a value of 1.

R1(config)#route-map TAG deny 10 R1(config-route-map)#match tag 1 R1(config-route-map)#exit R1(config)#route-map TAG permit 20 R1(config-route-map)#set tag 1

Now let's assume that protocols A and B are RIP and OSPF respectively, This route map can then be applied to R1 for redistribution in both directions.

R1(config)#router rip R1(config-router)#redistribute ospf 1 metric 5 route-map TAG
R1(config)#router ospf 1 R1(config-router)#redistribute rip subnets route-map TAG

The above will not only tag redistributed routes but will prevent tagged routes from being re-redistributed.

The following is an example of tagging a route using the redistribution command:

R1(config)#router ospf 1 R1(config-router)#redistribuite eigrp 65005 subnet tag 12345678 R1(config-router)#summary address

Route tagging will function with IGPs including OSPF, RIP, EIGRP, as well as IS-IS, but not BGP.


Links to this page: