Networking · IP Services › QoS
Policy Map
Cheat sheet · https://pcornel.dk/topic.php?topic=669
Answer
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.
Remember
- A policy map lists actions for each class: priority, bandwidth, police, shape or set.
- Classes are processed in order.
class-defaulthandles remaining traffic.
First checks
show policy-map <name>— policy contentsshow policy-map interface <interface>— live counters
Commands
policy-map <name>- Create a policy map that applies actions to classes.
class <class-name>- Reference a class map inside a policy map to define its actions.
set dscp <value>- Mark traffic in a class with a DSCP value.
set cos <value>- Mark traffic in a class with a CoS value.
priority- Give a class strict-priority queuing (LLQ), typically for voice.
priority percent <value>- Give a class strict priority limited to a percentage of bandwidth.
bandwidth percent <value>- Guarantee a class a minimum share of interface bandwidth during congestion (CBWFQ).
police <rate>- Police a class to a rate; traffic above it is dropped or remarked.
shape average <rate>- Shape a class to an average rate by buffering excess traffic.
show policy-map interface- Display per-class QoS counters on interfaces.
Verify in this order
class-maps → policy-map actions → service-policy
Where it usually breaks
packet selector → class match → marking → policy attachment → queue/policer/shaper → egress counters/drops → receiver behavior
Policy Map · technical reference
| Action | Core behavior |
|---|---|
| Mark | Change QoS field |
| Police | Enforce rate; drop/remark excess |
| Shape | Buffer and pace traffic |
| Priority/bandwidth | Scheduler treatment during contention |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=669