Why QoS Is Needed
Without QoS, all traffic is treated equally (best-effort). When a link is congested, all traffic experiences delay. For bulk file transfers this is acceptable — a 1-second delay is unnoticeable. For VoIP, 50ms+ delay causes noticeable echo; 150ms+ is unacceptable. For video conferencing, jitter causes pixelation and audio sync issues.
QoS solves congestion problems by prioritizing latency-sensitive traffic (VoIP, video) over bulk traffic (file transfers, backups, software updates). QoS does not create additional bandwidth — it manages how existing bandwidth is allocated under congestion. QoS is implemented at every router and switch along the path.
QoS Mechanisms
Traffic marking: classify packets and mark them with a priority indicator so downstream devices honor the priority. DSCP (Differentiated Services Code Point): 6-bit field in the IPv4/IPv6 header's ToS/Traffic Class field. DSCP values: EF (Expedited Forwarding, 46) for VoIP, AF (Assured Forwarding) for different levels of business traffic, CS (Class Selector) for backward compatibility. CoS (Class of Service): 3-bit field in the 802.1Q VLAN tag (Layer 2) — used within a LAN between switches.
Queuing: how traffic waits when a link is congested. FIFO (First In, First Out): no prioritization. PQ (Priority Queuing): strict priority — high priority queue empties before lower queues. Risk: low priority traffic starves. WFQ (Weighted Fair Queuing): bandwidth allocated by weight. CBWFQ (Class-Based WFQ): assigns minimum bandwidth to traffic classes. LLQ (Low Latency Queuing): adds a strict priority queue for real-time traffic (VoIP) to CBWFQ. LLQ is the recommended approach for VoIP.
Traffic shaping and policing: Shaping buffers excess traffic (smooths bursts) — traffic is delayed but not dropped. Policing drops traffic that exceeds the defined rate — traffic is discarded. Shaping is used at network edges; policing is stricter and used at ISP handoffs.
QoS for VoIP
VoIP requirements: one-way latency < 150ms, jitter < 30ms, packet loss < 1%. VoIP uses G.711 (64 kbps/call) or G.729 (8 kbps/call). QoS implementation for VoIP: mark VoIP RTP traffic with DSCP EF (46), put VoIP on a separate Voice VLAN, configure LLQ to give VoIP strict priority, police VoIP traffic to prevent it from monopolizing the link.
Voice VLAN: segregates VoIP phone traffic from data traffic. Enables CoS marking at the switch port level. QoS trust boundary: where the network trusts QoS markings from endpoints. Typically trust IP phones (which mark EF) but reclassify/police traffic from PCs (which should not mark high priority).