Use it whenever routes are redistributed at more than one point, or in both directions.
Route Tags
A route tag is a number attached to a route when it is redistributed (set tag). Other routers can match it (match tag) to recognise where the route came from — the standard way to stop routes being redistributed back into their source.
1. show ip route <prefix> — does the redistributed route carry the expected tag?
2. show ip ospf database external <prefix> / show ip eigrp topology <prefix> — tag in the protocol?
3. On the opposite redistribution: does the route-map deny that tag?
4. Route reappearing in its source domain → the deny is missing.
5. Verify on both redistribution routers.
route installed from the source → redistribute configured on the target process → route-map permits it → seed metric set → external route advertised → neighbours install it → tag prevents it from being fed back
Verify the same prefix/tag at every redistribution boundary.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
- Tags set at one redistribution point only.
- Tag values overlapping with other uses.
- Forgetting that OSPF can only tag external routes (type 5 and 7 LSAs), so tags must be set when routes are redistributed.
Operational reference
Fast context before you go deeper.
match tag <tag>Primary Commands
Configuration and operational commands for this Topic.
match tag <tag>ReferenceMatch route-policy metadata by route tag.
Use when: Match route-policy metadata by route tag.
Quick note: Redistribution is a policy boundary. Exact syntax and defaults vary by target protocol and IOS / IOS XE release.
Cisco IOS / IOS XE · mixedset tag <tag>ReferenceSet route-policy metadata on routes processed by the route map.
Use when: Set route-policy metadata on routes processed by the route map.
Quick note: Redistribution is a policy boundary. Exact syntax and defaults vary by target protocol and IOS / IOS XE release.
Cisco IOS / IOS XE · mixedEvidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
show ip protocols— what each process redistributes, and with which route-map.show route-map <name>— sequences and how many routes or packets each matched.show ip route <prefix>— the route, its source, distance, metric and tag.show ip ospf database external <prefix>— OSPF external LSA: metric type, metric, tag.show ip eigrp topology <prefix>— EIGRP external data: origin protocol, metric, tag.
ReferenceWhat it is1 section · depth on demand
How it works
A route tag is a number attached to a route when it is redistributed. Other routers can match the tag to filter or treat the route differently — mostly to stop routes being redistributed back into the protocol they came from in mutual redistribution.
ReferenceImportant terms & boundaries3 sections · depth on demand
Key points
- A tag is not an IP packet field
- Tags are locally interpreted policy metadata carried where the receiving protocol supports them
set tagcan mark imported routes;match tagcan block or classify them at another boundary- Tag values need a documented ownership convention to remain meaningful.
In depth
Worked two-point mutual redistribution with tags
R1 and R2 both redistribute between OSPF 1 and EIGRP 100. Each router tags what it injects and refuses routes carrying the other domain's tag:
route-map EIGRP-TO-OSPF deny 10
match tag 110 ! originally from OSPF — do not send back
route-map EIGRP-TO-OSPF permit 20
set tag 90 ! mark as EIGRP-origin
!
route-map OSPF-TO-EIGRP deny 10
match tag 90
route-map OSPF-TO-EIGRP permit 20
set tag 110
!
router ospf 1
redistribute eigrp 100 subnets route-map EIGRP-TO-OSPF
router eigrp 100
redistribute ospf 1 metric 10000 100 255 1 1500 route-map OSPF-TO-EIGRP
Both routers must use the same tag values; a tag set on only one redistribution point protects only that direction.
Where the tag is visible
| Protocol | Command | Field |
|---|---|---|
| RIB | show ip route 10.20.0.0 | Tag 90 |
| OSPF | show ip ospf database external 10.20.0.0 | External Route Tag: 90 |
| EIGRP | show ip eigrp topology 10.20.0.0/24 | Administrator tag is 110 (external routes only) |
Limits
OSPF carries tags in Type 5/7 external LSAs, and EIGRP in the external route TLV; internal routes are not tagged this way. BGP has no route tag — use communities when routes cross BGP and must be recognised later. A tag also says nothing about who set it, so pick values documented per redistribution point and avoid reusing the same numbers for unrelated policy.
Tagging to prevent loops
route-map OSPF-TO-EIGRP deny 10
match tag 100 ! came from EIGRP originally
route-map OSPF-TO-EIGRP permit 20
set tag 200
Documented example, not captured output. Each redistribution point tags what it injects and denies routes carrying the other side's tag. Check tags with show ip route <prefix> ("Tag 100").
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Routing → Route Redistribution → Route Tags. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.