1.2 Troubleshoot route maps in any routing protocol: attributes, tags and filters
ENARSI 300-410 v1.1 · 1.0 Layer 3 Technologies
A route map is an ordered list of permit and deny sequences, each with match and set clauses. The same tool filters and changes routes in redistribution, BGP neighbour policy, policy-based routing and default origination. Most faults are in the logic: an empty deny, a missing final permit, or a match on the wrong list.
What you must know
- Read a route map's sequence logic: first match wins, implicit deny at the end.
- Know how AND and OR combine within and between match clauses.
- Match on prefix lists, ACLs, tags, interfaces, next hops, metrics, AS paths and communities.
- Set tags, metrics, metric types, local preference, weight, communities and next hops.
How a route map decides
- Sequences are read in order of their number (10, 20, 30 …).
- The first sequence whose every
matchstatement matches is used. Nomatchat all matches everything. permitwithsetchanges the route and passes it;denydrops it (in PBR: routes it normally).- A route that matches no sequence hits the implicit deny.
| Written as | Means |
|---|---|
match ip address prefix-list A B | A or B (one statement, several lists) |
match ip address prefix-list A + match tag 10 | A and tag 10 (two statements) |
deny sequence with no match | Drops everything that reaches it |
permit 100 with no match or set | The classic final "let the rest through" |
Where they are applied
| Use | Applied with | Typical match / set |
|---|---|---|
| Redistribution | redistribute ospf 1 route-map R | match prefix-list, tag, route-type; set metric, metric-type, tag |
| BGP policy | neighbor X route-map R in|out | match as-path, community; set local-preference, weight, med, as-path prepend, community |
| Policy-based routing | ip policy route-map R | match ip address (ACL), length; set ip next-hop, interface |
| Default route | default-information originate route-map R | match ip address (a route that must exist) |
| OSPF/EIGRP filtering | distribute-list route-map R in | match ip address, tag |
Sequence 5 drops the lab range (2); sequence 10 tags the branch routes and makes them E1 (1); sequence 100 passes the rest unchanged.
ip prefix-list LAB seq 5 permit 10.99.0.0/16 le 32
ip prefix-list BRANCH seq 5 permit 10.1.0.0/16 le 24
!
route-map EIGRP-TO-OSPF deny 5
match ip address prefix-list LAB
route-map EIGRP-TO-OSPF permit 10
match ip address prefix-list BRANCH
set tag 100
set metric-type type-1
route-map EIGRP-TO-OSPF permit 100
!
router ospf 1
redistribute eigrp 100 subnets route-map EIGRP-TO-OSPFTroubleshooting a route map
R2# show route-map EIGRP-TO-OSPF
route-map EIGRP-TO-OSPF, deny, sequence 5
Match clauses:
ip address prefix-lists: LAB
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map EIGRP-TO-OSPF, permit, sequence 10
Match clauses:
ip address prefix-lists: BRANCH
Set clauses:
metric-type type-1
tag 100
Policy routing matches: 0 packets, 0 bytes
route-map EIGRP-TO-OSPF, permit, sequence 100
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes- Check every list the route map names exists. A
matchon a missing prefix list matches everything in IOS 15. - Check the order: a broad
permit 10above adeny 20makes the deny dead. - Check there is a final permit when you meant to filter only a few routes.
- Check the result where the route lands:
show ip route,show ip ospf database external,show ip bgp.
Commands
show route-map [name] | Every sequence with its match and set clauses (and PBR counters). |
show ip prefix-list [detail] | The lists a route map matches, with hit counts. |
show ip route <prefix> | Tag, metric and type after the route map was applied. |
show ip ospf database external <prefix> | The external LSA with its tag and metric type. |
Exam traps
- Without a final empty
permit, every unmatched route is dropped. - Two prefix lists on one
matchline are OR; twomatchlines are AND. - A
denysequence in a route map for PBR means "route normally", not "drop". - A route map that names a list that does not exist matches every route.
set metricin a BGP route map sets MED, not an IGP metric.
Check yourself
- Sequence 10 has
match tag 5andmatch ip address prefix-list P. What must a route have to match? - Both: tag 5 and a permit in prefix list P.
- Why does a redistribution route map with only
permit 10and one match filter everything else? - The implicit deny at the end drops routes that match no sequence.
- What does a
denysequence do in PBR? - The packet is not policy-routed; it follows the routing table.
- Where can you read a route map's match counters for routes?
- Nowhere directly. The counters count PBR packets; verify the routes where they land.
Labs
- Redistribution between EIGRP and OSPF: seed metrics, subnets and a route map
- Redistribution loops: two ASBRs, route tags and distance
- BGP path control: local preference, prepending, a no-transit filter and communities
Try it live: Redistribution between EIGRP and OSPF: seed metrics, subnets and a route map
More topics in 1.0 Layer 3 Technologies
- 1.1 Troubleshoot administrative distance across every routing source
- 1.3 Troubleshoot routing loop prevention: filters, tags, split horizon and poisoned routes
- 1.5 Troubleshoot manual and automatic route summarization
- 1.6 Configure and verify policy-based routing
- 1.7 Configure and verify VRF-Lite
- 1.8 Describe how Bidirectional Forwarding Detection works
- 1.9 Troubleshoot EIGRP in classic and named mode, globally and in a VRF
- 1.10 Troubleshoot OSPFv2 and OSPFv3