Route Tagging

Problem

You want to tag specific routes to prevent routing loops while mutually redistributing routes between two routing protocols.

Solution

This example shows how to tag external routes in EIGRP:

Router1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#ip route 0.0.0.0 0.0.0.0 172.25.1.1
Router1(config)#access-list 7 permit 0.0.0.0
Router1(config)#route-map TAGGING permit 10
Router1(config-route-map)#match ip address 7
Router1(config-route-map)#set tag 5
Router1(config-route-map)#exit
Router1(config)#router eigrp 55
Router1(config-router)#redistribute static route-map TAGGING
Router1(config-router)#exit
Router1(config)#end
Router1#

In this case, the external routes are static, but the same technique applies to routes learned through other routing protocols.

Discussion

You can only tag routes that EIGRP has learned from another routing protocol. As we saw when talking about route tags with RIP, EIGRP does not use these tags directly; it only distributes them. You would use these tags at network boundaries when redistributing routes into another routing process.

For instance, if our EIGRP network were being used as a transit network between two other routing protocols, we could tag routes learned from the first external network. We could then redistribute only the first network’s routes into the second external network. Similarly, we could redistribute only the second network’s routes into the first network. In this way, we could ...

Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.