Pcornel
Networking · Routing › Policy-Based Routing

Route-map

Cheat sheet · https://pcornel.dk/topic.php?topic=1145

Back to the Topic

Answer

The route-map in policy-based routing lists sequences of match and set clauses. Each packet is checked against the sequences in order; the first sequence it matches applies its set clauses. A packet that matches none is routed normally.

Remember

A deny sequence that matches means "do not policy-route". A sequence without match matches every packet. Several match clauses of different types must all match. Counters per sequence show where packets land.

First checks

  • show ip policy — interfaces with a policy and the route-map used.
  • show route-map <name> — sequences, matches, set clauses and policy-routed packet counts.
  • show access-lists <acl> — hits on the classifying ACL.
  • show ip cef <next hop> — whether the set next hop is reachable.
  • debug ip policy — per-packet decisions; restrict and use briefly.

Commands

ip policy route-map
debug ip policy
ip local policy route-map

Verify in this order

route-map applied on the ingress interface → ACL matches the flow → route-map sequence permits → next hop set and reachable → packet forwarded via the policy path; non-matching traffic routed normally

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

PBR route-map outcomes

Route-map outcomePBR result
Matching permit + usable set actionPolicy forwarding action is used
Matching denyPBR bypass; normal destination routing
No matching sequenceNormal destination routing
Matching permit but forwarding action is not usableVerify platform/action fallback and normal-routing behavior with live evidence

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1145

Confirmation

Confirm action

Continue?