~/netref / QoS
##

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 marking (DiffServ) — 6 bits in the IP header
MarkingTrafficMeaning
EF (46)Voice (RTP)Expedited Forwarding — strict priority, low latency
CS3 (24)Call signalingSIP / H.323
AF41 (34)Video conferencingAssured Forwarding class 4
AF31 (26)Mission-critical dataAssured Forwarding class 3
CS6 (48)Routing protocolsNetwork control
DF (0)Best effortDefault — everything else
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?
yes ↘ tail dropno ↓
hardware queue → Tx
// queuing mechanisms
FIFOFirst in, first out — no differentiation
PQPriority Queuing — high starves low
CBWFQClass-based weighted fair — bandwidth guarantees
LLQCBWFQ + a strict-priority queue for voice
WREDDrops low-priority early to avoid tail drop
// shaping vs policing
ShapePolice
Action on excessBuffers & delaysDrops or re-marks
Traffic effectSmooths burstsCaps hard
DirectionOutboundIn or outbound
Use caseWAN egress to contract rateEnforce a limit at the edge

// 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)
qos policy (llq) · cisco ios
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
verify
show policy-map interface Serial0/0
show mls qos