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
Router1(config)#
0.0.0.0 0.0.0.0 172.25.1.1
access-list
7
permit
Router1(config)#
0.0.0.0
route-map
TAGGING
permit
Router1(config-route-map)#
10
match ip address
Router1(config-route-map)#
7
set tag
Router1(config-route-map)#
5
exit
Router1(config)#router eigrp
Router1(config-router)#
55
redistribute static route-map
Router1(config-router)#
TAGGING
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.