##
Quality of Service
QoS protects latency-sensitive traffic when the link is congested: classify it, mark it, then queue, shape and schedule so voice and video win.
DSCP lives in the IP header (L3); CoS is 3 bits in the 802.1Q tag (L2). Map CoS ↔ DSCP at the access edge and trust it inward.
// queuing flowchart
packet in
→ classify & mark
→ software queuesqueue Aqueue Bdefault
→ scheduler
→ HW queue
full?
full?
yes ↘ tail dropno ↓
hardware queue → Tx
// key facts
- Classify → mark → queue → shape/police → schedule
- Mark as close to the source as possible, then trust the marking
- Congestion management (queuing) vs avoidance (WRED drops early)
class-map match-all Voice
match dscp ef
class-map match-any Critical
match dscp af21 af22
!
policy-map WAN-QoS
class Voice
priority percent 33
class Critical
bandwidth percent 20
class class-default
fair-queue
random-detect
!
interface Serial0/0
service-policy output WAN-QoS show policy-map interface Serial0/0
show mls qos