Pcornel
Networking · IP Services › QoS

Policy Map

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

Back to the Topic

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-default handles remaining traffic.

First checks

  • show policy-map <name> — policy contents
  • show 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

ActionCore behavior
MarkChange QoS field
PoliceEnforce rate; drop/remark excess
ShapeBuffer and pace traffic
Priority/bandwidthScheduler 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

Confirmation

Confirm action

Continue?