Skip to Content
Cisco IOS Cookbook, 2nd Edition
book

Cisco IOS Cookbook, 2nd Edition

by Kevin Dooley, Ian Brown
December 2006
Intermediate to advanced
1188 pages
72h 8m
English
O'Reilly Media, Inc.
Content preview from Cisco IOS Cookbook, 2nd Edition

OSPF Route Tagging

Problem

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

Solution

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
Router1(config-router)#exit
Router1(config)#end
Router1#

Discussion

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 10.2.2.0
Routing entry for 10.2.2.0/30
  Known via "ospf 87", distance 110, metric 45
  Tag 67, type extern 1
  Redistributing via ospf 87
  Last update from 172.25.1.5 on Ethernet0, 00:07:14 ago
  Routing Descriptor Blocks:
  * 172.25.1.5, from 172.25.25.1, 00:07:14 ago, via Ethernet0
      Route metric is 45, traffic share count is 1
Router5#

The tags become useful when you go to redistribute the tagged routes into another network. For example, the following configuration ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

Brad Edgeworth, Aaron Foss, Ramiro Garza Rios
Cisco Software-Defined Access

Cisco Software-Defined Access

Srilatha Vemula, Jason Gooley, Roddie Hasan

Publisher Resources

ISBN: 0596527225Supplemental ContentErrata Page