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

How a route map decides

  1. Sequences are read in order of their number (10, 20, 30 …).
  2. The first sequence whose every match statement matches is used. No match at all matches everything.
  3. permit with set changes the route and passes it; deny drops it (in PBR: routes it normally).
  4. A route that matches no sequence hits the implicit deny.
Written asMeans
match ip address prefix-list A BA or B (one statement, several lists)
match ip address prefix-list A + match tag 10A and tag 10 (two statements)
deny sequence with no matchDrops everything that reaches it
permit 100 with no match or setThe classic final "let the rest through"

Where they are applied

UseApplied withTypical match / set
Redistributionredistribute ospf 1 route-map Rmatch prefix-list, tag, route-type; set metric, metric-type, tag
BGP policyneighbor X route-map R in|outmatch as-path, community; set local-preference, weight, med, as-path prepend, community
Policy-based routingip policy route-map Rmatch ip address (ACL), length; set ip next-hop, interface
Default routedefault-information originate route-map Rmatch ip address (a route that must exist)
OSPF/EIGRP filteringdistribute-list route-map R inmatch 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-OSPF

Troubleshooting 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
  1. Check every list the route map names exists. A match on a missing prefix list matches everything in IOS 15.
  2. Check the order: a broad permit 10 above a deny 20 makes the deny dead.
  3. Check there is a final permit when you meant to filter only a few routes.
  4. 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

Check yourself

Sequence 10 has match tag 5 and match 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 10 and one match filter everything else?
The implicit deny at the end drops routes that match no sequence.
What does a deny sequence 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

Try it live: Redistribution between EIGRP and OSPF: seed metrics, subnets and a route map

More topics in 1.0 Layer 3 Technologies