Use it when the wrong traffic is policy-routed, or the intended traffic is not.
ACL match
In policy-based routing, the ACL decides which packets the policy applies to: a packet permitted by the ACL is policy-routed; a packet denied — or not matched — by the ACL is routed normally. Nothing is dropped by the ACL itself.
1. Write the flow: source, destination, protocol, port.
2. show access-lists <acl> — which line should match it? Does its counter rise?
3. An earlier line matching first → reorder.
4. Return traffic is a separate flow, arriving on another interface.
5. Check show route-map <name> counters after the fix.
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
Check route-map order and counters.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
match ip address <acl>Primary Commands
Configuration and operational commands for this Topic.
Verification & 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.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- ACL with deny entries expecting them to drop traffic (deny means route normally).
- Matching return traffic by accident.
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 first matching ACL ACE for the exact source/destination/protocol tuple is permit.
configuration · Evidence referenceClassifier ACL denies the controlled flowThe first matching classifier ACE is deny or the packet reaches the implicit deny.
Here permit means "apply the policy" and deny means "route normally", not drop. Write the flow as source, destination, protocol, port and read the ACL from the top for it. Extended ACLs are needed for anything beyond source address.
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
The ACL used by match ip address classifies packets for a PBR route-map. In this context, the ACL is not itself attached as an interface filter: permitted ACL entries identify traffic that matches the route-map clause, while denied/nonmatching traffic does not satisfy that match clause.
ReferenceWhy it matters1 section · depth on demand
Why it matters
Use an extended ACL when PBR must distinguish source, destination, protocol or transport ports. Use the narrowest classifier that expresses the intended steering policy and validate it against the real packet tuple.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Matching traffic for policy-based routing with an ACL
Policy-based routing (PBR) forwards selected traffic based on more than the destination address. Cisco's PBR technote builds it from three parts: an ACL that selects the traffic, a route map that matches the ACL and sets the next hop, and ip policy route-map on the ingress interface.
R1(config)# ip access-list extended GUEST-TO-INTERNET
R1(config-ext-nacl)# deny ip 10.90.0.0 0.0.255.255 10.0.0.0 0.255.255.255
R1(config-ext-nacl)# permit ip 10.90.0.0 0.0.255.255 any
R1(config)# route-map PBR-GUEST permit 10
R1(config-route-map)# match ip address GUEST-TO-INTERNET
R1(config-route-map)# set ip next-hop 192.0.2.9
R1(config)# interface Vlan90
R1(config-if)# ip policy route-map PBR-GUEST
R1# debug ip policy
IP: s=10.90.0.15 (Vlan90), d=142.250.74.46, len 60, policy match
IP: route map PBR-GUEST, item 10, permit
IP: s=10.90.0.15 (Vlan90), d=142.250.74.46 (GigabitEthernet0/0/2), len 60, policy routed
IP: s=10.90.0.15 (Vlan90), d=10.10.50.53, len 60, policy rejected -- normal forwarding
R1# show route-map PBR-GUEST
The output strings policy match, policy routed and policy rejected -- normal forwarding are the ones the technote describes.
What the ACL entries mean in PBR
| ACL result | Effect |
|---|---|
| Permit | The route-map entry matches: the set clause applies |
| Deny (or no match) | Not policy routed by this entry; the next entry is checked, then normal routing |
The ACL doesn't drop anything in PBR. deny only excludes traffic from the policy, as the first entry above does for internal destinations.
set ip next-hop versus set ip default next-hop (from the technote)
| Command | Behaviour |
|---|---|
set ip next-hop | Policy routes to the next hop if it exists in the routing table, even if a route to the destination exists; otherwise normal routing |
set ip default next-hop | Uses the routing table if a route to the destination exists; policy routes only if none does. A default route alone counts as no route |
Practice
| Practice | Reason |
|---|---|
| Apply PBR on the ingress interface | It acts on received packets only |
Exclude internal destinations with deny lines | Otherwise local traffic is sent to the PBR next hop |
Track the next hop (set ip next-hop verify-availability) | Fall back cleanly if it fails |
| Check hardware support | Some PBR variants aren't supported in Catalyst switch hardware |
Documented example, not captured output.
Quick reference
Policy-based routing (PBR) lets a router forward traffic based on more than the destination address — for example sending guest traffic to a different internet link than corporate traffic. The first step is defining which traffic the policy applies to, usually with an access list; traffic that does not match continues to use the normal routing table.
PBR match criteria use ACLs (or prefix lists, packet length) to select traffic:
ip access-list extended PBR-GUEST
permit ip 10.120.0.0 0.0.255.255 any
route-map PBR-WAN permit 10
match ip address PBR-GUEST
set ip next-hop 198.51.100.1
route-map PBR-WAN permit 20 ! no match → normal routing
interface Vlan120
ip policy route-map PBR-WAN
PBR applies to traffic arriving on the interface where the policy is attached (ingress), not to locally generated traffic (ip local policy route-map for that).
ReferenceConfiguration & state1 section · depth on demand
Configuration
ip access-list extended PBR-WEB
permit tcp 10.10.0.0 0.0.255.255 any eq 443
route-map PBR permit 10
match ip address PBR-WEB
set ip next-hop 192.0.2.1
interface Gi0/1
ip policy route-map PBR
Documented example, not captured output. Traffic not matching the ACL is routed normally.
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 → ACL match. 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
ACL semantics inside PBR
Classifier behavior is not interface-filter behavior
| ACL result for packet | match ip address result | PBR meaning |
|---|---|---|
| Permit ACE | Match | Sequence can continue to its PBR action |
| Deny ACE | No match | This ACL match clause is not satisfied |
| No explicit ACE | Implicit deny → no match | Packet is not classified by this ACL for that sequence |