Use it to steer a class of traffic — a source subnet, an application — over a particular link, and when that traffic does not go where intended.
Policy-Based Routing
Policy-based routing sends selected traffic a different way than the routing table would: a route-map applied to an ingress interface matches packets (usually by ACL) and sets their next hop or interface.
1. show ip policy — is the route-map on the ingress interface of the traffic?
2. show route-map <name> — do the policy match counters rise when the traffic flows?
3. Not rising → the ACL does not match the traffic (show access-lists <acl>).
4. Rising but traffic not on the new path → the next hop is unreachable, so normal routing is used.
5. Use set ip next-hop verify-availability with tracking for a clean fallback.
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
The route-map exists and is applied, but test traffic still follows the destination-based route.
Possible stored cause: The real packet tuple does not match the route-map criteria, or the policy is attached to the wrong ingress interface.Check route-map and ACL counters during one controlled flow.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
- Treating the classifier ACL as if every deny drops the packet.
- Applying
ip policy route-mapon the egress interface instead of the ingress interface. - Looking only at the normal routing table when one source subnet fails.
- Assuming a route-map that exists is attached and receiving traffic.
- Assuming a matching route-map shows the set next hop is reachable.
- Forgetting that PBR can create an asymmetric return path.
Operational reference
Fast context before you go deeper.
ip access-list extended <name>Primary Commands
Configuration and operational commands for this Topic.
ip access-list extended <name>ReferenceCreate a named extended ACL, here used to match traffic for policy-based routing.
Use when: Define the exact packet set that should match a PBR route-map sequence.
Quick note: Verify with ACL counters and show route-map during a controlled test.
route-map <name> permit <sequence>ReferenceCreate a route map sequence that permits matching traffic.
Use when: Create or enter a route-map sequence used by redistribution policy.
Quick note: Redistribution is a policy boundary. Exact syntax and defaults vary by target protocol and IOS / IOS XE release.
Cisco IOS / IOS XE · mixedmatch ip address <acl>ReferenceMatch packets in a route map using an ACL (used for PBR).
Use when: Match only the intended PBR traffic based on ACL permit semantics.
Quick note: ACL permit = route-map match; ACL deny/no-match = this clause is not satisfied.
Cisco IOS / IOS XE · mixedset ip next-hop <address>ReferenceSend PBR-matched traffic to a specific next hop.
Use when: Steer matching traffic toward a deliberate next hop.
Quick note: Verify match counters first, then next-hop reachability and forwarding evidence.
Cisco IOS / IOS XE · mixedset interface <interface>ReferenceSend PBR-matched traffic out a specific interface.
Use when: Use interface-based steering only when the link/media and design make that forwarding action appropriate.
Quick note: Validate interface state, adjacency requirements and the real forwarding result.
Cisco IOS / IOS XE · mixedinterface <interface>ReferenceEnter interface configuration mode.
Use when: Use at the IOS / IOS XE Fundamentals boundary after prerequisite state is verified.
Quick note: Operational guidance. A command accepted by the parser does not prove feature support, correct scope, persistence or desired forwarding behavior.
Cisco IOS / IOS XE · mixedip policy route-map <name>ReferenceApply a route map for policy-based routing to traffic entering the interface.
Use when: Activate the intended route-map as interface ingress policy.
Quick note: Verify attachment with show ip policy, then route-map counters with controlled traffic.
Show Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
show route-mapShowShows route-map sequences, match/set clauses and counters.
Use when: Inspect route-map sequences and counters.
Quick note: This output proves only its local evidence boundary; continue to the next layer.
Cisco IOS XE · mixedshow ip policyShowDisplay interfaces with policy-based routing applied.
Use when: Verify that the intended Layer-3 ingress interface actually has the expected PBR route-map attached.
Quick note: After attachment is proven, use route-map/ACL counters to prove classification.
Cisco IOS / IOS XE · mixedVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
The route-map exists and is applied, but test traffic still follows the destination-based route.
Step 1 Prove PBR without confusing policy and reachability Verify boundary
Start with the exact test tuple and ingress interface. Confirm the policy is attached where that packet enters, the expected route-map sequence matches, and its counter changes during a controlled test. Resolve the configured next hop in the relevant VRF and verify CEF has a usable adjacency. Use traceroute, packet capture, interface counters or downstream observations to show the packet actually follows the intended path. Then repeat the original application test and verify the return path, because PBR commonly creates asymmetric paths that interact with stateful firewalls or NAT. A successful route-map match shows only classification; a reachable next hop shows only local resolution; only the preserved end-to-end test demonstrates that the policy produces the intended service outcome.
Step 2 PBR: prove path, return traffic and restoration Verify boundary
If the test never matches, check the real ingress and packet tuple before editing the route-map. If it matches but takes the wrong path, inspect the usable set action, direct next-hop route/ARP and platform forwarding state. Ordinary destination CEF alone does not show an ingress-PBR packet's final policy path; correlate policy state with downstream capture or counters for that flow.
If the intended egress is used but the application fails, inspect remote service, return routing, stateful policy and MTU. Reachable next-hop adjacency is not an end-to-end health check. Fallback behavior depends on the exact set action and platform; do not claim every unresolved ARP or dead remote path automatically switches to the ordinary route. Tracking/verify-availability needs separate design.
In the isolated lab, remove only the test ingress binding and repeat both flows: both should use ordinary routing. Restore the exact saved binding and confirm the selected HTTPS flow changes back while the non-match remains ordinary. Restore all original policy/routes before lab teardown. Never remove an existing production binding blindly; save its prior value. No captured Evidence or new verification is claimed.
Step 3 Verification and output interpretation Verify boundary
Use show route-map to confirm sequence matches/counters and configured set actions, and show ip policy to verify that the intended interface actually references the route-map. Confirm the normal route table as the fallback baseline, then test or observe traffic that definitely matches the classifier and compare it with traffic that does not. Counters are valuable because they show packets reached a route-map sequence, but they do not alone show the selected next hop successfully forwarded the packet. When conditional next-hop tracking is used, verify both the track/reachability state and the route-map behavior. Collect source/destination details when validating PBR so the tested flow genuinely matches the intended policy.
Step 4 Step-by-step troubleshooting Narrow the fault
Boundary rule: A healthy destination RIB does not show PBR-selected traffic follows that ordinary route.
Step 5 Classification, set action and fallback decisions Narrow the fault
Troubleshoot PBR as a branch tree. If counters do not increment, show the packet actually enters the policy-bound interface and that source/destination/protocol fields match the ACL in the correct direction. If counters increment but traffic follows the normal route, inspect the set action and whether the chosen next hop or interface is valid and resolvable. If the packet leaves through the intended path but the application still fails, move to downstream routing, return path, NAT, firewall and MTU boundaries rather than changing the route-map again. Be especially careful with deny statements inside ACLs used for PBR matching: a denied ACL line means “do not match this route-map condition,” not “drop the packet” by itself.
Step 6 PBR: matching and non-matching lab flows Narrow the fault
Authored isolated topology: router R has client ingress Gi1 in 10.10.10.0/24, ordinary egress via peer 192.0.2.2 and independent policy egress via directly connected 198.51.100.2. Both peers reach server 203.0.113.10 and have valid return routes to the client subnet. No NAT, VRF or interface filtering obscures this lab. Save original routes and interface bindings first.
On R, with its links and ordinary route already configured:
ip access-list extended LAB-PBR-HTTPS
permit tcp host 10.10.10.10 host 203.0.113.10 eq 443
route-map LAB-PBR permit 10
match ip address LAB-PBR-HTTPS
set ip next-hop 198.51.100.2
interface GigabitEthernet1
ip policy route-map LAB-PBR
This is configuration, not a read-only test. Send a bounded client TCP/443 request and inspect policy match, next-hop adjacency and downstream observation: it should take the policy peer. A TCP/22 flow with an actual listener, or traffic from another client, should miss this classifier and use the ordinary route via 192.0.2.2.
A router-originated ping is not equivalent to either transit client test. Do not add local PBR merely to make that ping follow the transit path. Example addresses and outcomes are authored reference material, not executed tests.
Step 7 Verification & troubleshooting Narrow the fault
1. Define one exact test flow: source, destination, protocol and ports if relevant.
2. Identify the ingress Layer-3 interface.
3. Verify show ip policy shows the intended route-map on that interface.
4. Check route-map sequence order and ACL classification.
5. Generate one controlled test and compare route-map/ACL counters.
6. Verify the set next hop is reachable and forwarding resolves toward it.
7. If no PBR sequence matches or no usable set action applies, compare the ordinary routing-table/CEF decision.
Evidence · 2 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
The interface where the controlled flow enters lists the expected route-map.
observation · Evidence referenceNormal route is healthy but one source class failsThe destination has a valid normal RIB/CEF path, but only traffic entering the PBR-classified source/interface follows the failing path.
Subtopics
Go one level deeper into this subject.
The ACL used by `match ip address` classifies packets for a PBR route-map.
Subtopic Route-mapA PBR route-map is an ordered policy made of numbered sequences.
Subtopic Set next-hop`set ip next-hop <address>` tells PBR to forward matching IPv4 traffic toward a specified next hop rather than simply accepting the next hop selected by the normal destination-route lookup.
It applies only to packets arriving on the interface with ip policy route-map; traffic the router itself sends needs ip local policy route-map. Packets that match no permit are routed normally. If the set next hop is not reachable, packets fall back to normal routing unless configured otherwise.
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.
ReferenceWhat it is1 section · depth on demand
What it is
Policy-Based Routing (PBR) steers selected ingress IPv4 traffic using policy criteria before the ordinary destination-based routing decision. On Cisco IOS / IOS XE, an interface policy normally uses a route-map to classify packets and apply a forwarding set action such as a specific next hop.
ReferenceWhy it matters1 section · depth on demand
Why it matters
Use PBR when selected traffic must follow a deliberate path that differs from the path chosen by normal destination routing. Treat it as a forwarding policy overlay: show the packet enters the correct interface, matches the classifier, reaches a permit route-map sequence and receives a usable set action.
ReferenceHow it works3 sections · depth on demand
PBR versus normal routing
Normal forwarding asks, where is the destination? PBR first asks, does this ingress packet match a steering policy? A matching permit sequence can select a policy next hop; otherwise ordinary destination routing remains the fallback boundary. This is why a healthy show ip route <destination> result can coexist with source-specific forwarding failures.
Where PBR intercepts normal forwarding
Policy-Based Routing changes the forwarding decision for matched traffic before normal destination-only routing would choose the path. On IOS/IOS XE, interface PBR is normally applied to transit packets entering that interface; local PBR is a separate mechanism for traffic generated by the router itself. A route-map sequence first evaluates match conditions, then applies a set action such as a next hop, interface or default next hop. If a sequence does not match, processing continues to later sequences and ultimately falls back to normal routing unless policy behavior explicitly changes that outcome. PBR therefore depends on ACL or other classification semantics, route-map ordering, next-hop resolution and the underlying forwarding table. Treat policy match and usable forwarding as separate states.
PBR: observe ingress policy before changing it
Scope: Cisco IOS / IOS XE router, global IPv4 unicast, interface-ingress PBR using a directly reachable set ip next-hop. Verify platform/release support; Catalyst hardware and other set actions need their own readback.
interface <interface> enters configuration mode; it is not a diagnostic read. Read show ip policy to locate the ingress binding, show route-map <name> and show access-lists <name> for policy/classifier and supported counters, and show ip local policy for any separate router-generated-traffic policy. Correlate deltas during the exact source/destination/protocol flow. Hardware counter visibility can differ from software counters.
An ACL deny used as a route-map classifier is a non-match for that condition, not an interface-filter drop. A route-map deny sequence bypasses policy routing for its match and uses normal routing. Separate this from an actual interface ACL or firewall.
Reference: Cisco PBR configuration guide.
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
Policy-based routing (PBR)
PBR forwards traffic by rules other than the destination: source address, application, packet size or ingress interface. Cisco's PBR technote shows the building blocks: an access list selects the traffic, a route map matches it and sets the forwarding action, and ip policy route-map applies the route map to the ingress interface; debug ip policy shows per packet whether it was policy-routed or forwarded normally.
When PBR is used
| Need | Example |
|---|---|
| Send some sources to another exit | Guest traffic to a separate Internet link |
| Steer applications | Backup traffic over a cheaper WAN link |
| Force traffic through a service | Redirect to a firewall, proxy or WAN optimiser |
| Path when routing has none | set ip default next-hop as a fallback |
Next-hop behaviour (technote)
| Command | Routing table check | Policy applies when |
|---|---|---|
set ip next-hop | The configured next hop | The next hop is in the table |
set ip default next-hop | The destination | No route to the destination exists |
R1(config)# ip access-list extended BACKUP-TRAFFIC
R1(config-ext-nacl)# permit tcp 10.40.0.0 0.0.255.255 host 10.90.0.20 eq 22
R1(config)# route-map PBR-BACKUP permit 10
R1(config-route-map)# match ip address BACKUP-TRAFFIC
R1(config-route-map)# set ip next-hop 172.16.20.1
R1(config)# interface GigabitEthernet0/0/2
R1(config-if)# ip policy route-map PBR-BACKUP
R1# show ip policy
Interface Route map
Gi0/0/2 PBR-BACKUP
R1# show route-map PBR-BACKUP | include matches
Policy routing matches: 12044 packets, 1203345877 bytes
Design cautions
| Caution | Reason |
|---|---|
| PBR is per router | Paths must make sense end to end, including return traffic |
| Next hop "reachable" isn't "working" | Use tracking with IP SLA |
| Asymmetry | Stateful firewalls may drop returning traffic on another path |
| Complexity | Document every policy; prefer routing design where possible |
On many platforms PBR runs in hardware; check TCAM limits before large policies.
Documented example, not captured output.
State model and protocol mechanics
Policy-Based Routing evaluates packets against an attached route-map, commonly on ingress, and applies set actions when a permitted sequence matches. Matching can use ACLs or other supported classifiers; set actions can specify a next hop, interface or conditional behavior. PBR therefore changes the forwarding decision for selected traffic without changing the destination prefixes learned by routing protocols. Route-map sequence logic matters: a matching permit sequence with a usable set action can steer the packet, while nonmatching traffic or policy outcomes without an applicable set generally fall back to normal routing according to platform semantics. Because the policy is interface/context specific, two packets with the same destination can take different paths based on source or other matched attributes.
Limits and common misconceptions
PBR is not a routing protocol and does not advertise the policy-selected path to neighbors. show ip route can therefore look completely normal even while selected packets are being steered elsewhere. A route-map match counter increasing shows classification occurred, not that the remote destination or return path is healthy. An ACL used for PBR classification is not acting as a packet-filter deny/permit in the same way as an interface ACL; its role is to select traffic for route-map logic. Poorly designed PBR can create asymmetric paths or blackholes, so keep policy decision, next-hop resolvability, actual forwarding and return routing as separate checks.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Start with a precise traffic classification and an explicit reason normal destination routing is insufficient. Build the ACL/prefix match narrowly, create route-map sequences with clear permit/deny/fallback intent, configure the set action, and attach the policy to the correct ingress interface using ip policy route-map. Ensure the selected next hop is resolvable in the relevant routing context and decide whether reachability tracking or verify-availability behavior is required to prevent blackholing toward a failed policy next hop. Keep PBR exceptional: large policy sets can make forwarding intent harder to reason about than a routing design. Document which traffic is intentionally diverted and what path unmatched traffic should take.
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 → Policy-Based Routing. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc2475.html · confidence 94%Quick lookup tables
PBR packet decision flow
Where PBR sits relative to normal destination routing
| Step | Question | Evidence |
|---|---|---|
| 1 | Which L3 interface receives the packet? | interface/path evidence |
| 2 | Is PBR attached there? | show ip policy |
| 3 | Which route-map sequence is first applicable? | show route-map |
| 4 | Does the ACL classify the real tuple as permit? | ACL + counters |
| 5 | Is the sequence permit or deny? | route-map config |
| 6 | Is the set next hop/interface usable? | route/ARP/CEF/interface state |
| 7 | If PBR does not apply, what does normal routing select? | route/CEF |
| 8 | Does downstream/return path work? | hop-by-hop evidence |
Policy-Based Routing · operational reference
Compact state and interpretation boundaries for fast lookup.
| PBR component | Purpose |
|---|---|
| Match ACL/criteria | Select packets for policy evaluation |
| Route-map sequence | Ordered policy logic |
| Set next-hop/interface | Override normal forwarding choice for match |
ip policy route-map | Attach policy to ingress interface |
| Normal RIB | Baseline/fallback path where policy does not steer |