QoS ensures that delay-sensitive traffic (voice and video) is prioritized correctly under network load.
Facts
| Term | Explanation |
|---|---|
| Latency | Delay from sender to receiver |
| Jitter | Variation in latency (very critical for voice) |
| Packet loss | Lost packets (very critical for voice/video) |
| Bandwidth | Available capacity |
| Congestion | Traffic exceeds link capacity |
| Classification | Identifying traffic |
| Marking | Marking traffic (DSCP/CoS) |
| Queuing | How packets are placed in queues |
| Policing | Drop/remark when traffic exceeds a rate |
| Shaping | Buffer + send at an even rate |
Why is QoS necessary?
Networks are best-effort by default – all packets are treated the same, so voice/video competes with backups and downloads. Without QoS: robot voice, choppy video, dropped calls, bad user experience.
The QoS pipeline
- Classification – what type of traffic?
- Marking – mark it
- Queuing – prioritize in queues
- Congestion management – what goes first?
- Congestion avoidance – avoid queue overflow
- Policing/shaping – control bandwidth
Traffic types
- Voice (VoIP): very low latency, very low jitter, almost no loss; small packets, constant flow – DSCP EF (46)
- Video: moderately delay-sensitive, loss sensitive, more bandwidth – DSCP AF41/AF42 (some designs CS4)
- Data: least critical, tolerates delay, TCP retransmits – DSCP BE (0)
Models
| Model | Explanation |
|---|---|
| Best effort | Default – no prioritization |
| IntServ | RSVP, per-flow reservation (scales badly) |
| DiffServ | Classify + mark + prioritize (used in practice) |
👉 Cisco and CCNA/CCNP focus on DiffServ.
Marking
- L2 – CoS (802.1p): used on switches, values 0–7
- L3 – DSCP: part of the IP header, 6 bits → 64 values
| Traffic | DSCP |
|---|---|
| Voice | EF (46) |
| Video | AF41 |
| Data | BE (0) |
Trust boundary
Where do we trust the marking? Access port to a PC → untrusted; IP phone → trusted; switch/router remark when needed. Wrong trust boundary = QoS doesn’t work.
Queuing – the heart of QoS
- FIFO: first in, first out, no priority
- WFQ: fairness between flows, not optimal for voice
- CBWFQ: class-based, reserves bandwidth per class
- LLQ: strict priority queue, used for voice; starvation risk if misconfigured
Congestion management vs avoidance
- Management: decides what is sent first (LLQ, CBWFQ)
- Avoidance: drops intelligently – WRED, mostly for data
Policing vs shaping
| Policing | Shaping |
|---|---|
| Drops/remarks | Buffers + delays |
| Ingress | Egress |
| Fast | Smooths traffic |
Typical enterprise design
- Voice → LLQ (priority) · video → guaranteed bandwidth · data → the rest · scavenger traffic → lowest priority
Configuration (MQC)
! 1) Class-map (classification)
class-map match-any VOICE
match dscp ef
class-map VIDEO
match dscp af41
! 2) Policy-map (handling)
policy-map QOS-POLICY
class VOICE
priority percent 10
class VIDEO
bandwidth percent 30
class class-default
fair-queue
! 3) Apply on interface
interface GigabitEthernet0/0
service-policy output QOS-POLICY
Special considerations
- QoS does nothing without congestion
- Must be implemented end-to-end
- Wrong trust boundary = useless QoS
- Voice must never oversubscribe LLQ
Extras: scavenger class, hierarchical QoS (HQoS), wireless QoS (WMM), AutoQoS.