Policy Map
A policy-map ties classes to actions — priority, bandwidth, shape, police, set dscp — and becomes active only when attached to an interface with service-policy.
1. A policy-map assigns actions to classes (priority, bandwidth, police, shape, set).
2. Order matters.
3. class-default for unmatched.
4. Hierarchical for shaping parents.
5. Test counters after applying.
class-maps → policy-map actions → service-policy
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
policy-map <name>Primary Commands
Configuration and operational commands for this Topic.
policy-map <name>ReferenceCreate a policy map that applies actions to classes.
Use when: Use this command at the QoS boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A configured policy-map does not prove attachment, matching traffic, congestion or end-to-end service quality.
Cisco IOS / IOS XE · mixedclass <class-name>ReferenceReference a class map inside a policy map to define its actions.
Use when: Use this command at the QoS boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A configured policy-map does not prove attachment, matching traffic, congestion or end-to-end service quality.
Cisco IOS / IOS XE · mixedset dscp <value>ReferenceMark traffic in a class with a DSCP value.
Use when: Use this command at the QoS boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A configured policy-map does not prove attachment, matching traffic, congestion or end-to-end service quality.
Cisco IOS / IOS XE · mixedset cos <value>ReferenceMark traffic in a class with a CoS value.
Use when: Use this command at the QoS boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A configured policy-map does not prove attachment, matching traffic, congestion or end-to-end service quality.
Cisco IOS / IOS XE · mixedpriorityReferenceGive a class strict-priority queuing (LLQ), typically for voice.
Use when: Use this command at the QoS boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A configured policy-map does not prove attachment, matching traffic, congestion or end-to-end service quality.
Cisco IOS / IOS XE · mixedpriority percent <value>ReferenceGive a class strict priority limited to a percentage of bandwidth.
Use when: Use this command at the QoS boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A configured policy-map does not prove attachment, matching traffic, congestion or end-to-end service quality.
Cisco IOS / IOS XE · mixedbandwidth percent <value>ReferenceGuarantee a class a minimum share of interface bandwidth during congestion (CBWFQ).
Use when: Use this command at the QoS boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A configured policy-map does not prove attachment, matching traffic, congestion or end-to-end service quality.
Cisco IOS / IOS XE · mixedpolice <rate>ReferencePolice a class to a rate; traffic above it is dropped or remarked.
Use when: Use at the Control Plane Policing / CoPP boundary after prerequisite state is verified.
Quick note: Operational guidance. CoPP counters do not alone prove an attack or safe thresholds; legitimate bursts can exceed a poorly sized policer.
Cisco IOS / IOS XE · mixedshape average <rate>ReferenceShape a class to an average rate by buffering excess traffic.
Use when: Use this command at the QoS boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A configured policy-map does not prove attachment, matching traffic, congestion or end-to-end service quality.
Cisco IOS / IOS XE · mixedShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
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 Verification and what it shows Verify boundary
Read the applied service-policy, verify class and action counters with a controlled flow, and compare offered/drop/queue rates to the intended policy. Re-run the original workload after adjustment. Policy-map configuration does not show hardware programming or downstream QoS behavior; effective counters and end-to-end observation are separate evidence.
Step 2 Verification and output interpretation Verify boundary
Inspect the policy definition and then the applied policy on the actual interface/direction. Read offered rate, packet/byte counters, queue depth/drops, policing conformance/exceed counters or shaping state as appropriate. Interpret those numbers relative to interface load and time: queue drops under sustained congestion mean something different from zero drops on an idle link. Correlate marking changes with packet captures or downstream trust behavior when marking is the intended action.
Step 3 Verification & troubleshooting Narrow the fault
1. Define trust boundary and traffic classes.
2. Verify class-map matches.
3. Verify policy actions.
4. Confirm service-policy interface/direction.
5. Generate representative load and read offered/drop/queue counters.
Step 4 Observation → implication → next check Narrow the fault
Observation → implication → next check: no service-policy counters move first to attachment/direction and class matching. Class counters without action counters move to configured action/platform support. Drops or queueing under load require comparing offered rate, configured rate and scheduler state. Correct policy behavior with poor application performance moves upstream/downstream.
- A policy map lists actions for each class: priority, bandwidth, police, shape or set.
- Classes are processed in order.
class-defaulthandles remaining traffic.
show policy-map <name>— policy contentsshow policy-map interface <interface>— live counters
ReferenceWhy it matters1 section · depth on demand
How it works in operation
ReferenceImportant terms & boundaries4 sections · depth on demand
In depth
Policy maps
A policy map defines what QoS does to each traffic class. Cisco's IOS XE QoS guide lists the actions that can go under each class in a policy map: bandwidth, priority, police, shape, set, queue-limit, random-detect and drop, and states that a packet can match only one traffic class within a policy, the first one that matches.
Structure
policy-map WAN-EDGE-OUT
class VOICE
priority level 1
police cir percent 20
class VIDEO
bandwidth remaining percent 40
random-detect dscp-based
class CRITICAL-DATA
bandwidth remaining percent 30
class SCAVENGER
bandwidth remaining percent 1
class class-default
bandwidth remaining percent 29
fair-queue
Actions
| Action | Effect |
|---|---|
priority | Low-latency queue (LLQ) for real-time traffic; usually policed |
bandwidth / bandwidth remaining | Minimum share during congestion |
police | Drop or re-mark traffic above a rate |
shape | Buffer traffic to a rate (smooths bursts) |
set | Mark DSCP, CoS, QoS group |
random-detect | WRED: drop early to avoid tail drop |
queue-limit | Queue depth |
Hierarchical policy maps (guide)
A child policy can be nested in a parent's class with service-policy, typically to shape to a contracted rate and queue inside that rate:
R1(config)# policy-map SHAPE-100M
R1(config-pmap)# class class-default
R1(config-pmap-c)# shape average 100000000
R1(config-pmap-c)# service-policy WAN-EDGE-OUT
R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# service-policy output SHAPE-100M
Order and design
Class order matters because the first match wins: put specific classes before broad ones. Keep the class model consistent across the network (for example 4, 8 or 12 classes) so marking means the same everywhere.
Documented example, not captured output.
Quick reference
A policy map applies actions to classes: marking (set), priority, bandwidth guarantees, policing, shaping and congestion avoidance. Classes are evaluated in the order listed, and each packet matches the first class it fits.
policy-map WAN-QUEUING
class VOICE
priority percent 10
class CRITICAL-DATA
bandwidth percent 30
class class-default
fair-queue
random-detect dscp-based
Documented example, not captured output.
Use a hierarchical policy (parent shaper with child queuing policy) when the physical interface is faster than the contracted WAN rate.
State model and technical mechanics
A policy map evaluates classified traffic and applies the configured action to each class. Actions can include DSCP/CoS marking, policing, shaping, guaranteed bandwidth, low-latency priority queuing and nested child policies depending on platform and direction. class-default provides behavior for traffic not matched by earlier explicit classes. Queueing behavior becomes meaningful only when an egress resource is congested; marking and policing can act even without queue contention. Priority treatment does not create infinite bandwidth: the scheduler still operates under interface capacity and platform-specific policing/safeguards. Read the mechanism as a chain of dependent state rather than a single boolean. The same configured object can be healthy locally while an adjacent interface, policy, route, neighbor or endpoint prevents the intended service, so the reference keeps those state boundaries explicit.
Limits and common misconceptions
A configured policy map is not evidence that the policy is attached, and an attached policy with zero counters is not automatically broken. Guaranteed bandwidth is a scheduler promise under defined conditions, not a permanent reservation visible as constant utilization. A priority queue can still experience drops when traffic exceeds designed limits or the physical link is saturated.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Define actions from the business/traffic objective rather than from a desire to make a particular counter look nonzero. Size priority and bandwidth guarantees against expected traffic and interface capacity, and keep policing versus shaping semantics clear: policing enforces a rate by dropping/remarking excess while shaping buffers/delays to pace traffic. Document hierarchical parent/child relationships where used because the effective bandwidth available to a child can be constrained by its parent. Keep classification, action and attachment separate in the design so Round-trip changes do not silently alter more than one layer.
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 IP Services → QoS → Policy Map. 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
Policy Map · technical reference
Compact mechanics, configuration and evidence boundaries for fast lookup.
| Action | Core behavior |
|---|---|
| Mark | Change QoS field |
| Police | Enforce rate; drop/remark excess |
| Shape | Buffer and pace traffic |
| Priority/bandwidth | Scheduler treatment during contention |