Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Policy-Based Routing

Direct answer

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.

When to use this

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.

First 30 seconds

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.

Operational verification

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

Failure signaturePBR route-map configured but traffic follows normal routing

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.
Evidence · next step

Check route-map and ACL counters during one controlled flow.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Treating the classifier ACL as if every deny drops the packet.
  • Applying ip policy route-map on 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.
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE · Cisco IOS XE
Key commandip access-list extended <name>
Scope / prerequisiteUse it to steer a class of traffic — a source subnet, an application — over a particular link, and when that traffic do…
Show · 2Reference · 7
What next?3 suggested next steps
Child topics (this level)3
Catalog command links9
Evidence2
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

7 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

command output · 1observation · 1
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points

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.

Key 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.
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

NeedExample
Send some sources to another exitGuest traffic to a separate Internet link
Steer applicationsBackup traffic over a cheaper WAN link
Force traffic through a serviceRedirect to a firewall, proxy or WAN optimiser
Path when routing has noneset ip default next-hop as a fallback

Next-hop behaviour (technote)

CommandRouting table checkPolicy applies when
set ip next-hopThe configured next hopThe next hop is in the table
set ip default next-hopThe destinationNo 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

CautionReason
PBR is per routerPaths must make sense end to end, including return traffic
Next hop "reachable" isn't "working"Use tracking with IP SLA
AsymmetryStateful firewalls may drop returning traffic on another path
ComplexityDocument 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 2475

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%
Embedded reference data

Quick lookup tables

PBR packet decision flow

Where PBR sits relative to normal destination routing

StepQuestionEvidence
1Which L3 interface receives the packet?interface/path evidence
2Is PBR attached there?show ip policy
3Which route-map sequence is first applicable?show route-map
4Does the ACL classify the real tuple as permit?ACL + counters
5Is the sequence permit or deny?route-map config
6Is the set next hop/interface usable?route/ARP/CEF/interface state
7If PBR does not apply, what does normal routing select?route/CEF
8Does downstream/return path work?hop-by-hop evidence

Policy-Based Routing · operational reference

Compact state and interpretation boundaries for fast lookup.

PBR componentPurpose
Match ACL/criteriaSelect packets for policy evaluation
Route-map sequenceOrdered policy logic
Set next-hop/interfaceOverride normal forwarding choice for match
ip policy route-mapAttach policy to ingress interface
Normal RIBBaseline/fallback path where policy does not steer
Confirmation

Confirm action

Continue?