OSPF Route Tagging


You want to tag specific routes to prevent routing loops during mutual redistributing between routing protocols.


You can tag external routes in OSPF by using the redistribute command with the tag keyword:

Router1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#router ospf 55
Router1(config-router)#redistribute eigrp 11 metric-type 1 subnets tag 67



Route tagging in OSPF is similar to route tagging in RIP Version 2 and EIGRP, which we discussed in Chapters 6 and 7, respectively. Just like those protocols, OSPF doesn't directly use the route tags. But they are useful when distributing routes into foreign routing protocols.

In the example configuration, this router, Router1, is an ASBR that connects to a network that uses EIGRP process number 11. We have configured this router so that it redistributes these EIGRP routes into OSPF as External Type 1 routes with a tag value of 67:

Router5#show ip route
Routing entry for
 Known via "ospf 87", distance 110, metric 45
 Tag 67, type extern 1
 Redistributing via ospf 87
 Last update from on Ethernet0, 00:07:14 ago
 Routing Descriptor Blocks:
 *, from, 00:07:14 ago, via Ethernet0
 Route metric is 45, traffic share count is 1

The tags become useful when you go to redistribute the tagged routes into another network. For example, the following configuration shows how we might redistribute this group of external routes into RIP, but no internal OSPF routes. This sort of configuration is useful if you want to allow the RIP and EIGRP external networks to talk to one another through your OSPF network, but prevent them from seeing your own routing tables:

Router1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#router rip
Router1(config-router)#version 2
Router1(config-router)#redistribute ospf 87 route-map TAGGEDROUTES
Router1(config)#route-map TAGGEDROUTES permit 10
Router1(config-route-map)#match tag 67
Router1(config)#route-map TAGGEDROUTES deny 20 


See Also

Chapter 6; Chapter 7

Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505
Simiral book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net