What is QoS (Quality of Service)?
Learn what QoS is, how DSCP marking and priority queuing work, and why it protects voice/video traffic during congestion.
Expected Interview Answer
QoS (Quality of Service) is a set of techniques that classify, prioritize, and manage network traffic so that latency-sensitive or business-critical applications get preferential treatment over less time-sensitive traffic when a link is congested.
QoS works by classifying packets, often using the DSCP field in the IP header, into traffic classes such as voice, video, or best-effort, and then applying queuing and scheduling policies that decide which packets are forwarded first, delayed, or dropped when a link nears capacity. Techniques include priority queuing for real-time voice traffic, traffic shaping to smooth bursty flows, and policing to enforce bandwidth limits on lower-priority classes. Without QoS, all packets compete equally for bandwidth, so a large file transfer can starve a video call of the low-latency delivery it needs, causing choppy audio and frozen video even though total bandwidth is technically available. QoS does not create more bandwidth; it only changes the order in which existing bandwidth is allocated during contention.
- Protects latency-sensitive traffic (voice, video) during congestion
- Classifies traffic via DSCP markings for consistent handling
- Traffic shaping and policing smooth or cap bandwidth-hungry flows
- Improves perceived reliability without adding raw bandwidth
AI Mentor Explanation
QoS is like a stadium’s medical team having a dedicated fast-track exit lane separate from the general spectator crowd — during a packed post-match rush, an injured player can be moved out immediately instead of waiting behind thousands of exiting fans. Regular foot traffic still exits, just at normal speed, while the priority lane is reserved for genuine emergencies. This is exactly how QoS reserves fast-track handling for latency-sensitive traffic like a live match feed during network congestion.
Step-by-Step Explanation
Step 1
Classify
Traffic is classified, often via DSCP markings in the IP header, into classes like voice, video, or best-effort.
Step 2
Mark
Devices at the network edge mark packets so downstream devices can apply consistent policies.
Step 3
Queue and schedule
Priority queuing and scheduling algorithms decide which class of traffic is forwarded first during contention.
Step 4
Shape or police
Traffic shaping smooths bursts and policing enforces bandwidth caps on lower-priority classes.
What Interviewer Expects
- Correct definition: prioritizing traffic classes, not adding bandwidth
- Knows DSCP marking as the classification mechanism
- Distinguishes queuing/scheduling from shaping/policing
- Gives a concrete example like voice vs bulk file transfer contention
Common Mistakes
- Thinking QoS increases total available bandwidth
- Confusing QoS with simple bandwidth throttling for everyone equally
- Not knowing DSCP is the common IP-layer marking mechanism
- Assuming QoS guarantees zero latency rather than reduced/prioritized latency
Best Answer (HR Friendly)
“QoS is a way of telling the network which traffic matters most when things get busy, so a video call stays smooth even if someone else is downloading a huge file at the same time. It does not create more bandwidth, it just makes sure important, time-sensitive traffic gets served first while less urgent traffic waits a little longer.”
Code Example
# Mark outgoing traffic on port 5060 (SIP/voice) with DSCP EF (priority)
tc qdisc add dev eth0 root handle 1: prio
iptables -t mangle -A OUTPUT -p udp --dport 5060 -j DSCP --set-dscp-class EF
# Inspect DSCP markings in captured traffic
sudo tcpdump -n -v host example.com | grep -i tosFollow-up Questions
- What is the difference between traffic shaping and traffic policing?
- How does DSCP marking differ from the older ToS field?
- Why is QoS often ineffective across the public internet?
- What traffic classes are typically prioritized in an enterprise network?
MCQ Practice
1. What does QoS primarily do on a congested network?
QoS classifies and schedules traffic so priority classes are served first; it does not add bandwidth.
2. Which IP header field is commonly used to mark traffic class for QoS?
The DSCP (Differentiated Services Code Point) field in the IP header marks a packet’s traffic class.
3. What is traffic shaping used for in a QoS policy?
Traffic shaping delays or buffers bursty traffic to conform to a target rate, smoothing flow.
Flash Cards
What is QoS? — Techniques to classify and prioritize network traffic during contention.
How is traffic classified for QoS? — Commonly via the DSCP field in the IP header.
Does QoS add bandwidth? — No — it only changes the order traffic is served in.
Shaping vs policing? — Shaping smooths bursts by delaying; policing drops or remarks traffic exceeding a limit.