Use it when voice suffers under load, a provider drops traffic above the contract, or a class is starved.
QoS Policing, Shaping & Queuing
1. show policy-map interface <if> output — which class is dropping?
2. Priority class drops → priority too small or policed; resize.
3. Drops on the WAN although the link looks idle → provider policing; shape below the contract.
4. Default class drops only → expected under congestion.
5. Compare before and after the change.
traffic classified → shaped to the contract rate → queued by class inside the shaper → priority served first within its limit → other classes get their bandwidth → excess dropped in best effort
A shaper or queuing policy is attached, yet latency and loss are unchanged, or drops appear when the link is not busy.
Possible stored cause: The policy is not where congestion actually happens (a WAN shaper missing, wrong interface/direction), or a policer drops traffic that is within the real contract.Context & applicabilityCommon mistakes · platform/version boundaries
Policing enforces a rate by taking an immediate action on excess traffic, commonly drop or remark. Shaping buffers excess traffic to smooth transmission toward a target rate. Queuing decides which traffic is serviced first when an interface is congested. The mechanisms solve different problems and can coexist.
Operational reference
Fast context before you go deeper.
show policy-map interface [interface]Show 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.
A shaper or queuing policy is attached, yet latency and loss are unchanged, or drops appear when the link is not busy.
Step 1 Verification & evidence Verify boundary
show policy-map interface; inspect offered rate, drops, queue depth and class counters under congestion.
Step 2 Commands & verification Verify boundary
Step 3 QoS: quantify the observation and restore the attachment Verify boundary
Illustrative measurement, not captured output: if the chosen class byte counter increases by 2,500,000 over 10 seconds, its average observed rate is 2,500,000 × 8 / 10 = 2,000,000 bit/s at that counter's accounting point. Compare with transmitted bytes and police/queue drops; do not equate a five-minute average with the short test window.
For the policer, correlate conform/exceed/drop deltas with receiver loss. For shaping, inspect supported shape rate, queue depth/drops and receiver delay/loss over the same interval. Scheduling effects require actual contention; this single-class test is not evidence of every priority or fairness property.
Negative classification test: repeat bounded traffic on another permitted UDP port and verify it does not increment LAB-CLASS. A zero class counter without evidence the packet reached this egress is not enough. Recheck the normal application path.
Restore the exact prior output service-policy and remove only unused lab objects created for this test. Never overwrite a production policy or clear all counters as a first check. Authored results are not device Evidence or new verification dates.
Step 4 QoS: isolated policer-versus-shaper comparison Narrow the fault
Authored lab: sender → IOS XE router → receiver over an otherwise uncongested link faster than 2 Mbit/s. Test UDP destination port 5001, with reverse/control traffic and routing already working. Verify that the chosen router supports both example policies on output before applying either; use one at a time.
ip access-list extended LAB-UDP
permit udp any host 198.51.100.20 eq 5001
class-map match-all LAB-CLASS
match access-group name LAB-UDP
policy-map LAB-POLICE
class LAB-CLASS
police cir 1000000 conform-action transmit exceed-action drop
policy-map LAB-SHAPE
class LAB-CLASS
shape average 1000000
Apply only the selected lab policy with service-policy output <name> on the verified egress; save and preserve any previous attachment. Generate a bounded UDP flow offered above 1 Mbit/s, for example 2 Mbit/s for 10 seconds. Collect class/counter deltas and receiver rate/loss. Use the same traffic when comparing policies, with a recovery/drain interval between tests.
Expected distinction: the policer drops excess according to its rate/burst model; the shaper buffers/delays toward its target until queue limits may cause drops. Sustained overload can therefore drop even with shaping. Do not promise exact 50 percent loss or a fixed queue delay; burst, overhead, granularity and buffering matter.
Step 5 Common failure modes Narrow the fault
Step 6 Troubleshooting workflow Narrow the fault
Step 7 QoS symptom timing and counter deltas Narrow the fault
Collect the same class's before/after matched bytes, offered rate, police/drop and queue counters with timestamps. Verify the original symptom occurs in that window. If the class never matches, inspect tuple and policy attachment before tuning the shaper; if the class matches and drops, identify the responsible policer or queue rather than calling all QoS drops congestion.
Use the isolated 1-Mbit/s comparison in this Topic for a numerical experiment. A policer can drop without an output queue bottleneck, and a shaper can introduce delay before dropping at its queue limit. Successful low-load traffic does not demonstrate behavior under contention. Preserve unrelated counters and restore exact prior policy after testing.
Shape to the provider's contracted rate on a faster physical link, then queue inside the shaper (hierarchical policy). Keep the priority queue small (about a third of the link) and police it. Policing causes drops and TCP retransmissions; shaping adds delay instead.
show policy-map interface <if> output— per class: matched, queued, dropped; shaper and priority stats.show policy-map <name>— configured rates and actions.show interfaces <if> | include drops|rate— total drops and load.show platform hardware fed switch active qos queue stats interface <if>— switch hardware queues (Catalyst 9000).
ReferenceHow it works2 sections · depth on demand
Policing, shaping and queuing solve different problems
A policer enforces a rate by immediately permitting, remarking or dropping excess traffic. A shaper buffers excess traffic and releases it at a configured rate, trading delay for fewer immediate drops. Queuing/scheduling decides which waiting class transmits next when an interface is congested.
These functions can coexist. A packet can classify correctly, enter the right queue and still be dropped by a policer, so troubleshooting must follow the policy pipeline rather than treating all QoS drops as one mechanism.
QoS: read the policy at the actual traffic direction
Scope: a Cisco IOS XE router supporting MQC class-based policing and egress shaping on the chosen interface. Switching ASIC policies, hierarchy and rate granularity need platform-specific documentation; no universal Catalyst configuration is implied.
Read show policy-map interface <interface> and the relevant running class-map/policy-map attachment. Record input/output direction, class match, measurement interval and available packet/byte, police/shape and queue/drop counters. A configured policy on the wrong direction is not enforcement for this flow. Historical nonzero counters do not identify the current test.
QoS first classifies traffic; policing, shaping and scheduling then have distinct effects. Offered, matched and transmitted rate can describe different accounting points. Confirm whether displayed rates include L2 overhead before comparing them with an application generator.
Reference: Cisco IOS XE QoS policing.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Policing, shaping and queuing with MQC
Policing, shaping and queuing all deal with congestion, but in different ways. Cisco's IOS XE MQC guide lists the actions available in a policy map:
- police: enforces a rate and transmits, re-marks or drops excess traffic.
- shape average: buffers excess traffic to smooth it to a rate.
- bandwidth / bandwidth remaining: a minimum share during congestion.
- priority: a low-latency queue.
- queue-limit, fair-queue and random-detect: queue depth, flow fairness and WRED.
Queuing actions work only in the output direction. Policing and marking also work inbound.
Policing compared with shaping
| Policing | Shaping | |
|---|---|---|
| Excess traffic | Dropped or re-marked immediately | Delayed in a buffer |
| Effect on TCP | Drops trigger backoff, causing saw-tooth throughput | Smoother, at the cost of added delay |
| Direction | Input or output | Output |
| Typical use | Enforce contracts, limit scavenger traffic | Match a slower provider rate (sub-rate Ethernet) |
A WAN edge example
A 1 Gbit/s port connects to a 200 Mbit/s provider service. Without shaping, the provider's policer drops excess traffic, and the router's own queues never fill, so its queuing policy has no effect. A parent shaper at 200 Mbit/s creates congestion locally, where the child policy can prioritise.
R1(config)# policy-map WAN-CHILD
R1(config-pmap)# class VOICE
R1(config-pmap-c)# priority percent 10
R1(config-pmap)# class VIDEO
R1(config-pmap-c)# bandwidth remaining percent 30
R1(config-pmap)# class SCAVENGER
R1(config-pmap-c)# bandwidth remaining percent 5
R1(config-pmap)# class class-default
R1(config-pmap-c)# fair-queue
R1(config-pmap-c)# random-detect dscp-based
R1(config)# policy-map WAN-PARENT
R1(config-pmap)# class class-default
R1(config-pmap-c)# shape average 200000000
R1(config-pmap-c)# service-policy WAN-CHILD
R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# service-policy output WAN-PARENT
R1# show policy-map interface GigabitEthernet0/0/0 output | include Class-map|drops|shape|queue
Reading the counters
| Counter | Meaning |
|---|---|
| Drops in the priority class | The priority policer is too small, or voice exceeds its plan |
| Drops in class-default | Congestion in best effort; normal at peaks |
| Shaper queue depth growing | The link is congested at the shaped rate |
| No drops anywhere, users complain | Congestion happens elsewhere, for example on the provider side |
Limits
The MQC guide notes that class-default without features uses FIFO with tail drop. Configure it deliberately on congested links. Priority queues should be policed (priority percent includes an implicit policer in congestion) so they can't starve other classes.
Documented example, not captured output.
Quick reference
Policing, shaping and queuing control traffic when demand exceeds capacity. Policing drops or remarks traffic above a rate immediately; shaping delays excess traffic in a buffer to smooth it; queuing decides which waiting packets are sent first when an interface is congested.
| Tool | Effect on excess | Typical place |
|---|---|---|
| Policer | Drop or remark | Ingress, provider edge, scavenger limits |
| Shaper | Buffer and delay | Egress to a sub-rate WAN circuit |
| LLQ (priority) | Strict priority, policed | Voice |
| CBWFQ | Bandwidth guarantees per class | Data classes |
| WRED | Early random drops | TCP bulk classes |
policy-map WAN-OUT
class class-default
shape average 50000000
service-policy QUEUING
Documented example, not captured output.
Shape a 1 Gbps port to a 50 Mbps contract so queues build on your router, where you control them, rather than in the provider network.
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 Infrastructure → QoS Policing, Shaping & Queuing. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc2475.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Policing is a QoS rate-enforcement mechanism that acts immediately on traffic exceeding a configured rate/burst profile.
QoS · primaryShapingShaping is a QoS rate-adaptation mechanism that buffers excess traffic and schedules it for later transmission at the configured rate.
Quick lookup tables
Policing vs shaping
Quick comparison of two rate-control mechanisms.
| Mechanism | Excess traffic | Common effect |
|---|---|---|
| Policing | Immediate configured action | Drop or remark traffic above policy |
| Shaping | Buffer when possible | Delay/smooth traffic toward target rate |
Deep reference
Design & tradeoffs
ENCOR design tradeoffs
QoS manages contention; it should protect critical traffic without masking chronic capacity problems.