Use it when designing QoS, or when voice or video is not prioritised because packets carry the wrong or no marking.
QoS Classification & Marking
QoS classification identifies traffic (by ACL, DSCP, NBAR application or interface) and marking writes a value (DSCP in IP, CoS in 802.1Q) so later hops can treat it without re-classifying. The trust boundary decides where markings from endpoints are accepted.
1. Capture at the source switch — DSCP as sent by the endpoint?
2. show policy-map interface <if> input — the class matching and set action counting?
3. Trust boundary: is the marking from the phone trusted and from the PC re-marked?
4. Check DSCP again further along — is something re-marking it to 0?
5. Fix classification or trust, then verify at the congestion point.
traffic enters at the edge → classified (ACL/NBAR/DSCP) → marked or trusted at the trust boundary → marking preserved hop by hop → used by queuing at congestion points
Critical traffic counts in class-default, or best-effort traffic is counted in a priority class.
Possible stored cause: The class-map matches the wrong criteria (ACL, DSCP, NBAR) or traffic is already re-marked before the classifier sees it.Context & applicabilityCommon mistakes · platform/version boundaries
A policy being attached is not evidence that the intended traffic matches its class. Counters, offered rate and drops must be correlated with the actual flow and symptom timing.
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.
show policy-map interface [interface]ShowDisplay QoS class counters, rates and drops.
Use when: QoS verification under load.
IOS/IOS XE · mixed · verifiesshow mls qosShowShows whether QoS is enabled globally on older Catalyst switches that use MLS QoS (for example 2960, 3560, 3750).
Use when: Markings are lost or ignored on a classic Catalyst access switch.
Quick note: On these switches, enabling "mls qos" makes ports untrusted by default, so phone and uplink ports need a trust setting. Catalyst 9000 switches use MQC policies instead and do not have this command.
Cisco IOS / IOS XE · configuration · verifiesVerification & 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.
Critical traffic counts in class-default, or best-effort traffic is counted in a priority class.
Step 1 Verification & evidence Verify boundary
show policy-map interface; verify DSCP/CoS before/after policy; inspect class counters.
Step 2 Commands & verification Verify boundary
show policy-map interface— Display QoS class counters, rates and drops.
Path: Networking → Infrastructure → QoS Classification & Marking. Local intent: Traffic classification, trust boundaries, DSCP/CoS markings and preserving policy meaning across the path.
Step 3 QoS counters must be tied to the exact flow Verify boundary
Show service-policy attachment and direction, then generate a controlled flow and confirm the intended class counter changes. If counters remain zero, the failure is likely classification/trust/attachment rather than queuing. Marking can be correct while scheduling or policing later causes the symptom.
Step 4 Common failure modes Narrow the fault
Wrong classifier, policy on wrong direction, untrusted markings, remarking mismatch or application not using expected ports/DSCP.
Step 5 Troubleshooting workflow Narrow the fault
Focus for this topic: Wrong classifier, policy on wrong direction, untrusted markings, remarking mismatch or application not using expected ports/DSCP.
Classify and mark as close to the source as possible; trust IP phones (conditionally) and re-mark untrusted endpoints. Common values: EF (46) voice, AF41 (34) video, CS3 (24) signalling, 0 best effort. Mark once, trust along the path, act at congestion points.
show class-map— match criteria per class.show policy-map interface <if> input— packets matched and set actions on ingress.show running-config interface <if> | include trust|service-policy— trust and policies on the port.- Capture — DSCP value in the IP header along the path.
ReferenceWhat it is1 section · depth on demand
Concept overview
Traffic classification, trust boundaries, DSCP/CoS markings and preserving policy meaning across the path.
Key ideas: Classification identifies traffic; marking stores a policy signal in packet/frame fields. Trust boundaries determine where existing markings are accepted or rewritten.
ReferenceWhy it matters1 section · depth on demand
Why it matters
Classification identifies traffic; marking stores a policy signal in packet/frame fields. Trust boundaries determine where existing markings are accepted or rewritten.
ReferenceHow it works1 section · depth on demand
Classification, marking and the trust boundary
QoS starts by deciding which traffic belongs to which class. Classification can use ACLs, NBAR-like application recognition or existing markings. Marking writes metadata such as DSCP/CoS so later devices can apply consistent treatment.
A trust boundary decides where existing markings become believable. At an untrusted edge, the network may rewrite endpoint markings rather than carrying them blindly. This is a policy decision, not evidence that a downstream queue will be congested or drop traffic.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Classification and marking with MQC
Classification decides which traffic is which. Marking writes that decision into the packet, so later devices can act on it cheaply. Cisco's IOS XE MQC guide shows the building blocks. A class-map matches traffic with criteria such as an access group, NBAR protocol, DSCP, precedence, CoS, QoS group or input interface. It uses match-all (the default) or match-any logic. A policy-map applies actions such as set dscp to each class. service-policy input attaches the policy to an interface. Traffic that matches no class falls into class-default.
Where to classify and mark
| Location | Action |
|---|---|
| Access edge (trust boundary) | Classify and mark; don't trust user devices unless they are known phones or controlled hosts |
| Distribution and core | Trust DSCP; queue by it |
| WAN edge | Map DSCP to the provider's classes; shape and queue |
Common markings
| Traffic | DSCP | PHB |
|---|---|---|
| Voice | 46 | EF |
| Interactive video | 34 | AF41 |
| Call signalling | 24 | CS3 |
| Network control (routing) | 48 | CS6 |
| Transactional data | 18 | AF21 |
| Bulk data | 10 | AF11 |
| Scavenger | 8 | CS1 |
| Best effort | 0 | Default |
Match logic (guide)
| Class-map type | Matches when |
|---|---|
match-all | Every match statement is true |
match-any | At least one match statement is true |
Nested match class-map | Combine both kinds of logic |
SW1(config)# class-map match-any VOICE
SW1(config-cmap)# match dscp ef
SW1(config-cmap)# match protocol rtp audio
SW1(config)# class-map match-any SCAVENGER
SW1(config-cmap)# match protocol bittorrent
SW1(config)# policy-map MARK-ACCESS-IN
SW1(config-pmap)# class VOICE
SW1(config-pmap-c)# set dscp ef
SW1(config-pmap)# class SCAVENGER
SW1(config-pmap-c)# set dscp cs1
SW1(config-pmap)# class class-default
SW1(config-pmap-c)# set dscp default
SW1(config)# interface GigabitEthernet1/0/14
SW1(config-if)# service-policy input MARK-ACCESS-IN
SW1# show policy-map interface GigabitEthernet1/0/14 input | include Class-map|packets|set
Marking rules
| Rule | Reason |
|---|---|
| Mark as close to the source as possible | Every later device benefits |
| Re-mark untrusted traffic | Users can't give themselves priority |
| Keep a consistent scheme across the network | Queuing depends on it |
| Mark, don't drop, at the edge | Dropping decisions belong where congestion occurs |
The DSCP table reflects common RFC 4594-style practice. The MQC guide itself documents only the commands.
Documented example, not captured output.
Quick reference
QoS classification identifies which traffic belongs to which class, and marking writes a value into the packet so later devices can act on it without reclassifying. On Cisco MQC, class maps classify and policy maps mark.
class-map match-any VOICE
match dscp ef
match protocol rtp audio
policy-map MARK-IN
class VOICE
set dscp ef
class class-default
set dscp default
interface Gi1/0/10
service-policy input MARK-IN
Documented example, not captured output.
| Field | Layer | Size |
|---|---|---|
| CoS (802.1p) | Ethernet 802.1Q tag | 3 bits |
| DSCP | IP header | 6 bits |
| EXP/TC | MPLS label | 3 bits |
Decide the trust boundary: trust markings from IP phones (with trust device cisco-phone), reset them from PCs.
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 Classification & Marking. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc2475.html · confidence 94%Quick lookup tables
QoS evidence boundaries
Map QoS function to the evidence you should inspect.
| Function | Evidence question |
|---|---|
| Classification | Did the intended packets hit the intended class? |
| Marking | Were DSCP/CoS values set or trusted as intended? |
| Policing | Did conform/exceed/violate counters and actions match policy? |
| Shaping | Is excess traffic buffered/delayed toward the target rate? |
| Queuing | Which queue/class experienced backlog or drops? |
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.
QoS classification & marking skeleton
Classify one traffic class and mark it explicitly
class-map match-any VOICE
match dscp ef
!
policy-map EDGE-QOS
class VOICE
set dscp ef
!
interface GigabitEthernet0/1
service-policy input EDGE-QOS
Verify with show policy-map interface. The critical evidence is whether the expected class counters increase for the exact test flow.
Deep reference
Design & tradeoffs
ENCOR design tradeoffs
Marking is useful only when downstream devices apply a consistent policy to the meaning of those values.
QoS trust-boundary reasoning
Classification identifies traffic; marking carries a policy signal; queuing/policing/shaping decide treatment when resources are constrained. Put the trust boundary where markings become trustworthy. QoS cannot manufacture bandwidth and should be verified under the conditions where congestion or policy actually matters.