2.1 QoS Components: Classification, Marking & Trust Boundaries

Key Takeaways

  • ENCOR v1.2 topic 1.4 is 'Interpret QoS configurations', so the exam tests reading a policy and predicting its effect rather than authoring one from a blank prompt.
  • DSCP is the high-order 6 bits of the IPv4 ToS / IPv6 Traffic Class byte, giving values 0-63; Layer 2 CoS (802.1p) and MPLS EXP carry only 3 bits, so any DSCP-to-CoS mapping is lossy and is normally taken from the three most significant DSCP bits.
  • Expedited Forwarding is DSCP 46 (binary 101110) and Assured Forwarding uses the AFxy pattern where x is the class 1-4 and y is the drop precedence 1-3, so AF31 evaluates to decimal 26 and AF41 to decimal 34.
  • The trust boundary should sit as close to the source as possible while still being under administrative control; an untrusted access port rewrites incoming DSCP to 0 by default, and conditional trust extends trust to a device only after CDP or LLDP-MED verifies it.
  • Classification identifies traffic and marking writes a value into the header, and the Modular QoS CLI separates them: class-map matches, policy-map sets or polices, and service-policy attaches the result to an interface in one direction.
Last updated: August 2026

2.1 QoS Components: Classification, Marking & Trust Boundaries

ENCOR v1.2 topic 1.4 is worded precisely: "Interpret QoS configurations." The verb matters. Cisco is not asking you to design a queuing strategy from scratch; it is asking you to look at a policy-map, a show policy-map interface counter block, or a switchport trust statement and correctly predict what happens to a packet. Everything in this section and the next exists to make that prediction reliable.

1. The Four Impairments QoS Actually Manages

QoS cannot create bandwidth. It can only decide who suffers first when a link is oversubscribed. There are exactly four impairments:

ImpairmentDefinitionVoice targetInteractive video target
BandwidthBits per second available to a flow21-320 kbps per call, codec-dependent384 kbps - 20+ Mbps
Delay (latency)One-way end-to-end transit time<= 150 ms one-way<= 150 ms
JitterVariation in inter-packet arrival delay<= 30 ms<= 30 ms
LossPercentage of packets discarded<= 1%<= 1%

These thresholds come from the long-standing Cisco design guidance derived from ITU-T G.114 and they show up constantly in scenario stems. When a question says "voice calls are choppy but throughput tests pass", it is describing jitter, not bandwidth. When it says "callers hear each other talk over one another", it is describing delay.

2. Three QoS Models

ModelMechanismScalabilityWhere you see it
Best effortNo classification, FIFO everywhereInfiniteDefault on every interface
IntServPer-flow reservation signalled with RSVP; routers hold per-flow statePoor — state grows with flowsLegacy voice admission control, some MPLS-TE
DiffServPer-hop behaviour selected by a marking in the packet header; no per-flow stateExcellentEssentially all modern enterprise QoS

DiffServ won because it pushes complexity to the network edge. The edge classifies and marks once; every downstream hop simply reads the mark and applies a Per-Hop Behaviour (PHB). That single sentence is the conceptual core of topic 1.4.

3. Marking Fields: Where the Bits Live

  LAYER 2 (802.1Q tagged frame)                LAYER 3 (IPv4 header, byte 2)
  +--------+--------+------------+             +---------------------------------+
  | TPID   | PCP|DEI|   VLAN ID  |             |  DSCP (6 bits)  |  ECN (2 bits) |
  | 0x8100 | 3b | 1b |   12 bits  |             |   0 .. 63       |    0 .. 3     |
  +--------+--------+------------+             +---------------------------------+
            ^                                   ^
            |                                   |
         CoS / 802.1p                    Formerly "IP Precedence" was the
         values 0-7                      top 3 bits of this same byte
FieldWhereWidthRangeNote
CoS (802.1p PCP)802.1Q tag3 bits0-7Lost on an access port — untagged frames have no CoS
MPLS EXP / TCMPLS shim header3 bits0-7Provider-facing; same 3-bit constraint as CoS
IP PrecedenceIPv4 ToS byte3 bits0-7Legacy; equals the top 3 bits of DSCP
DSCPIPv4 ToS / IPv6 Traffic Class6 bits0-63The modern marking; survives Layer 3 boundaries

The single most common design error the exam probes: a marking placed only in CoS is destroyed the moment the frame crosses a routed hop or leaves a trunk, because CoS lives in the 802.1Q tag. Mark in DSCP if the value must survive end to end.

DSCP-to-CoS mapping is lossy

Mapping 6 bits into 3 bits cannot be reversible. The default Cisco behaviour takes the three most significant DSCP bits, which is equivalent to the old IP Precedence value. So DSCP 46 (EF, binary 101110) maps to CoS 5, and DSCP 34 (AF41, binary 100010) also maps to CoS 4 — and AF41, AF42, and AF43 all collapse onto the same CoS. Drop-precedence granularity does not survive the mapping.

4. DSCP Arithmetic and the Standard PHBs

You must be able to convert between the DSCP name and its decimal value without a lookup table.

Class Selector (CS) PHBs

CS values are backward compatible with IP Precedence: the top 3 bits carry the precedence and the low 3 bits are zero. Therefore CSn = n x 8.

NameBinaryDecimalTypical use
DF / CS00000000Best effort (default)
CS10010008Scavenger / bulk
CS201000016OAM / network management
CS301100024Call signalling (SIP, SCCP)
CS410000032Real-time interactive
CS510100040Broadcast video
CS611000048Network control (routing protocols)
CS711100056Reserved — do not mark user traffic here

Assured Forwarding (AF) PHBs

The AF name is AFxy where x is the AF class (1-4, meaning increasing queue priority) and y is the drop precedence (1 = lowest chance of being dropped, 3 = highest). The encoding is xxxyy0, which gives the formula AFxy = 8x + 2y.

Drop precedence 1 (low)Drop precedence 2 (medium)Drop precedence 3 (high)
AF1xAF11 = 10AF12 = 12AF13 = 14
AF2xAF21 = 18AF22 = 20AF23 = 22
AF3xAF31 = 26AF32 = 28AF33 = 30
AF4xAF41 = 34AF42 = 36AF43 = 38

Worked example: AF31 is class 3, drop precedence 1, so binary 011 01 0 = 26. Worked example: AF43 is class 4, drop precedence 3, so binary 100 11 0 = 38. The formula 8x + 2y reproduces both: 8(3) + 2(1) = 26 and 8(4) + 2(3) = 38.

Expedited Forwarding (EF)

EF = DSCP 46 = binary 101110. EF is the single PHB defined for low-loss, low-latency, low-jitter service and is reserved for voice bearer traffic. It is deliberately not a CS value and not an AF value — memorise 46 outright. The higher-order bits 101 are why EF maps down to CoS 5.

5. RFC 4594 Marking Recommendations Used in Cisco Designs

Traffic classRecommended DSCPRecommended queue treatment
Network control (OSPF, BGP, EIGRP)CS6 (48)Small guaranteed bandwidth
VoIP bearer (RTP)EF (46)Priority / LLQ
Broadcast videoCS5 (40)Priority or guaranteed
Real-time interactive videoCS4 (32)Priority or guaranteed
Multimedia conferencingAF41/42/43 (34/36/38)Guaranteed bandwidth with WRED
Multimedia streamingAF31/32/33 (26/28/30)Guaranteed bandwidth with WRED
Call signallingCS3 (24)Small guaranteed bandwidth
Transactional dataAF21/22/23 (18/20/22)Guaranteed bandwidth
Bulk dataAF11/12/13 (10/12/14)Guaranteed bandwidth, aggressive WRED
ScavengerCS1 (8)Minimal bandwidth, first to drop
Best effortDF (0)Default queue

Exam-relevant asymmetry: signalling is CS3 while the media it sets up is EF. Losing signalling breaks call setup; losing bearer breaks audio. They are marked differently on purpose so they can be queued differently.

6. Trust Boundaries

A trust boundary is the point at which the network begins believing the QoS markings inside arriving packets. Everything outside the boundary is untrusted and gets re-marked or zeroed.

+---------------------------------------------------------------------------+
|            WHERE TO PUT THE TRUST BOUNDARY (best -> acceptable)           |
+---------------------------------------------------------------------------+
|  BEST:  IP phone           -- trusted endpoint you administer             |
|  GOOD:  Access switchport  -- classify/mark here with an ingress policy   |
|  OK:    Distribution layer -- further from the source, more traffic to    |
|                               classify, more CPU/TCAM per policy          |
|  NEVER: Trust a PC, a printer, or anything a user can reconfigure         |
+---------------------------------------------------------------------------+

The governing principle is "trust as close to the source as possible, but never trust a device you do not administer." A user workstation can set DSCP 46 on a torrent client trivially; if the access port trusts DSCP, that torrent lands in the voice priority queue.

The three switchport trust states

  • Untrusted (default on Catalyst access ports) — incoming CoS and DSCP are overwritten with 0. Safe, but it also destroys legitimate endpoint markings.
  • Unconditional trusttrust dscp or trust cos accepts whatever arrives. Appropriate only on uplinks toward other switches you administer, or toward a server you control.
  • Conditional trust — the port trusts markings only after the attached device identifies itself over CDP or LLDP-MED. On IOS-XE the modern syntax is trust device cisco-phone (also cts, ip-camera, media-player). If the phone is unplugged and a laptop is connected in its place, CDP/LLDP-MED verification fails and the port silently reverts to untrusted. This is the elegant answer to the "phone plus daisy-chained PC" topology, and it pairs naturally with the voice VLAN behaviour covered in Section 7.1.

7. Classification vs. Marking, and the MQC That Expresses Them

These two words are not synonyms and the exam separates them.

  • Classification answers "which bucket is this packet in?" It inspects something — an ACL, a DSCP value, an incoming interface, or an NBAR2 application ID — and assigns the packet to a class. Classification changes nothing in the packet.
  • Marking answers "what value should I write so downstream hops do not have to re-inspect?" It rewrites DSCP, CoS, or MPLS EXP.

The Modular QoS CLI (MQC) is the three-step construct that carries both. You have already met it in a security context in Section 16.3, where CoPP uses exactly the same grammar.

! STEP 1 - class-map: CLASSIFY. 'match-any' = logical OR, 'match-all' = logical AND.
class-map match-any VOICE-BEARER
 match dscp ef
 match protocol rtp audio
!
class-map match-any CALL-SIGNALLING
 match dscp cs3
 match protocol sip
!
class-map match-all TRANSACTIONAL-ERP
 match access-group name ERP-SERVERS
 match protocol http
!
! STEP 2 - policy-map: decide the ACTION per class
policy-map INGRESS-MARK
 class VOICE-BEARER
  set dscp ef
 class CALL-SIGNALLING
  set dscp cs3
 class TRANSACTIONAL-ERP
  set dscp af21
 class class-default
  set dscp default
!
! STEP 3 - service-policy: ATTACH, in exactly one direction
interface GigabitEthernet1/0/12
 description Access port - user + phone
 trust device cisco-phone
 service-policy input INGRESS-MARK

Reading that policy the way the exam wants

  1. match-any in VOICE-BEARER means a packet qualifies if it carries DSCP EF or NBAR2 identifies it as audio RTP.
  2. match-all in TRANSACTIONAL-ERP means the packet must match the ERP-SERVERS ACL and be identified as HTTP. Miss either condition and it falls through.
  3. Classes are evaluated top to bottom, first match wins. Reordering the classes changes behaviour.
  4. class-default catches everything unmatched. Here it is explicitly re-marked to DF, which is the correct hardening posture at a trust boundary: anything you did not deliberately recognise loses its markings.
  5. service-policy input applies on ingress only. A separate service-policy output would be required to queue on egress — and queuing is an egress-only action, which is the subject of Section 2.2.
Test Your Knowledge

A network engineer inspects a packet capture taken on a WAN link and sees an IPv4 header whose second byte is 0x68. Interpreting only the DSCP field, which Per-Hop Behaviour has this packet been marked with, and what is its decimal DSCP value?

A
B
C
D
Test Your Knowledge

An enterprise marks voice bearer traffic with CoS 5 at the access layer and relies on that marking end to end. Users report that voice quality is excellent within a single campus VLAN but degrades severely once calls cross the routed core to another building. What is the architectural cause?

A
B
C
D
Test Your Knowledge

A Catalyst 9300 access switchport is configured with 'trust device cisco-phone'. A Cisco IP phone is connected and marks its own RTP stream DSCP EF, which the switch honours. Overnight the phone is removed and a user connects a laptop directly to the same port. The laptop's peer-to-peer file-sharing client sets DSCP 46 on all of its packets. What happens to the laptop's traffic?

A
B
C
D
Test Your Knowledge

An engineer is asked to interpret the following ingress policy applied to an access port:

class-map match-all CRITICAL-APP
 match access-group name APP-SERVERS
 match protocol http
!
policy-map EDGE-IN
 class CRITICAL-APP
  set dscp af21
 class class-default
  set dscp default
A packet arrives that matches the APP-SERVERS access list but is identified by NBAR2 as SSH rather than HTTP. What DSCP value will the switch write into this packet?

A
B
C
D