Pcornel
Networking · Infrastructure

QoS Policing, Shaping & Queuing

Cheat sheet · https://pcornel.dk/topic.php?topic=70

Back to the Topic

Answer

Policing drops or re-marks traffic above a rate; shaping buffers it to send at a rate; queuing decides which class is sent first when an interface is congested (LLQ priority for voice, CBWFQ bandwidth for other classes).

Remember

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.

First checks

  • 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).

Commands

show policy-map interface [interface]
Display QoS class counters, rates and drops.
show policy-map interface
show policy-map interface <interface>

Verify in this order

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

Where it usually breaks

wrong match/attachment → rate or burst interpretation → police excess → shaper backlog/queue limit → downstream receiver

Policing vs shaping

MechanismExcess trafficCommon effect
PolicingImmediate configured actionDrop or remark traffic above policy
ShapingBuffer when possibleDelay/smooth traffic toward target rate

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=70

Confirmation

Confirm action

Continue?