Networking · IP Services › QoS
Class Map
Cheat sheet · https://pcornel.dk/topic.php?topic=668
Answer
A class-map defines which traffic belongs to a class, using match criteria such as DSCP, ACL, protocol (NBAR) or CoS, with match-any or match-all logic.
Remember
- A class map defines which traffic belongs to a class using match statements.
match-anyneeds one match;match-allneeds all.- Unmatched traffic falls into
class-default.
First checks
show class-map— class definitionsshow policy-map interface <interface>— packets matched per class
Commands
class-map match-any <name>- Create a class map that matches traffic if any match statement is true.
class-map match-all <name>- Create a class map that matches traffic only if all match statements are true.
match access-group name <acl>- Match traffic in a class map using a named ACL.
match dscp <value>- Match traffic in a class map by DSCP value.
match cos <value>- Match traffic in a class map by 802.1p CoS value.
show policy-map interface- Display per-class QoS counters on interfaces.
show class-map
Verify in this order
traffic → class-map match → class
Where it usually breaks
packet selector → class match → marking → policy attachment → queue/policer/shaper → egress counters/drops → receiver behavior
Class Map · technical reference
| Layer | Question |
|---|---|
| Class map | Which packets match? |
| Policy map | What action applies? |
| Service policy | Where/direction is it active? |
| Counters | Did real traffic hit the class? |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=668