In IP networks, what problem does quality of service (QoS) solve, and why does it change nothing on a link that is never congested?
answer
- where a queue actually forms
- arrivals faster than the line rate
- delay, jitter and loss share a source
- who waits, who is dropped
- no new bandwidth
basics
~20 sQoS decides which packets wait and which are dropped when traffic reaches an output faster than the link can send it. It trades delay, jitter and loss between classes but adds no bandwidth, so without a queue it has nothing to decide.
solid answer
~50 sA router or switch queues packets at an output interface whenever they arrive faster than the line can send them: a 1 Gb/s LAN feeding a 20 Mb/s WAN circuit, or several ports bursting into one uplink. That queue is where **queuing delay**, **jitter** (variation in delay) and **loss** come from; propagation delay is fixed by distance. With one first-in, first-out queue, a voice packet waits behind a backup burst. QoS, in the DiffServ model of RFC 2475, classifies and marks traffic and gives each class a per-hop behaviour at every congestion point: a policed priority queue for voice, guaranteed shares for business data, early drop for bulk. It decides who waits and who is dropped; it adds no bandwidth. If no queue ever forms the scheduler has nothing to choose, but averages hide millisecond bursts, so check per-class queue and drop counters before calling a link idle.
go deeper
Recall that QoS acts on queues: it chooses who waits and who is dropped when an output is oversubscribed, and it never adds bandwidth.
Explain where delay, jitter and loss come from, separate propagation from queuing, and walk the DiffServ steps: classify, mark, condition, queue, manage the queue.
Show you locate real congestion points from per-class queue and drop counters, recognise microbursts behind low averages, and know when buying bandwidth beats tuning QoS.
Frame QoS as an allocation of unavoidable congestion between business priorities, weighed against capacity spend and against what other operators' domains will honour.
## Where delay, jitter and loss come from A packet crossing a network accumulates delay from several distinct sources: - **Propagation delay**: the time the signal takes to travel the distance, fixed by geography and the medium. - **Serialisation delay**: the time to clock the packet's bits onto the wire, packet bits divided by line rate. A 1,500-byte packet is 12,000 bits, so it takes 6 ms on a 2 Mb/s link and 12 microseconds on a 1 Gb/s link. - **Queuing delay**: the time a packet waits in an output buffer behind packets that arrived earlier. - **Processing delay**: lookup and forwarding inside the device, usually small and steady. RFC 3246, which defines the Expedited Forwarding per-hop behaviour, names fixed propagation delay and queuing delay in switches and routers as the dominant causes of delay in packet networks, and defines **jitter** as the variation between maximum and minimum delay. Propagation does not change from one packet to the next, so jitter comes almost entirely from queues that grow and shrink. **Loss** has the same origin: a queue that has run out of buffer space discards new arrivals. ## Where queues form A queue forms at an output interface whenever packets arrive for it faster than it can transmit them. That happens at predictable places: | Situation | Why arrivals exceed the line rate | |---|---| | LAN-to-WAN edge | a 1 Gb/s campus feeds a 20 Mb/s branch circuit | | Many-to-one | several ports send to one uplink or one server at once | | Microbursts | a link averaging 30 % is briefly full for a few milliseconds | | Contracted rate | a provider accepts less than the physical port can send | When arrivals stay below the line rate, each packet is transmitted as soon as the one ahead of it finishes. There is no backlog, so there is nothing to reorder and nothing to drop. ## What QoS does Quality of service is the set of tools that decides, at each congestion point, **who waits and who is dropped**. In the Differentiated Services (DiffServ) architecture of RFC 2475 the toolchain runs in this order: 1. **Classify** packets into traffic classes, by header fields at the network edge or by an existing marking further in. 2. **Mark** each packet with a DiffServ codepoint (DSCP) so later hops can classify it cheaply. 3. **Condition** traffic at boundaries: police (discard or re-mark the excess) or shape (delay the excess) against an agreed profile. 4. **Queue and schedule** at each output: a strict-priority queue for voice, guaranteed shares for other classes. 5. **Manage the queue**: drop or mark some packets early, before a buffer overflows. Every hop applies a **per-hop behaviour** (PHB) selected by the packet's codepoint, so the service is built hop by hop rather than reserved end to end. ## Reservations versus classes Two models exist. **Integrated Services** reserves resources per flow with a signalling protocol such as RSVP; RFC 4594 notes concern about its scalability in large networks, where aggregating reservations is considered necessary. **Differentiated Services** keeps no per-flow state in the core: edge devices classify and mark, and interior routers act only on the codepoint. Most enterprise and provider QoS designs are DiffServ-based, which is why an interview question about QoS usually means the toolchain above. ## Why an idle link gains nothing, and why "idle" is tricky If no queue ever forms, the scheduler never has a choice to make: the next packet to arrive is the next packet to leave. That is why QoS changes nothing on a link that is genuinely never congested. The catch is the word **never**. Utilisation averaged over minutes hides bursts that last milliseconds, and those bursts are exactly what a voice packet notices. A link that a graph shows below 40 % can still hold a queue long enough to add jitter. The evidence that matters is per-class queue depth and drop counters at the interface, not average utilisation. ## What QoS cannot do - **It adds no capacity.** A 50 Mb/s link offered 60 Mb/s still sends at most 50 Mb/s; QoS only picks which 10 Mb/s waits or is dropped. - **It cannot shorten propagation.** A long-haul path keeps its distance delay whatever the marking. - **It cannot control traffic outside its domain.** Markings are honoured only inside a network whose operator configured them; another operator may re-mark or ignore them. - **It cannot rescue a class that exceeds its own allowance.** If voice alone exceeds the priority queue's limit, the excess voice is dropped. The order of work is therefore: find the congestion point, decide whether more bandwidth is the honest answer, and use QoS to protect the traffic that cannot tolerate delay or loss when congestion is unavoidable.
- If a WAN link's graphs show 30 % average utilisation, can QoS still matter on it?Yes. Averages over minutes hide microbursts: several senders converging, or a fast interface feeding a slow one, can fill the buffer for milliseconds. A voice packet behind such a burst sees extra delay and jitter, and a full buffer drops it. Per-class queue depth and drop counters show this; a five-minute utilisation average cannot.
- Why does marking voice packets for priority rarely help across the public internet?A codepoint is honoured only inside a DiffServ domain whose operator configured per-hop behaviours for it. At a domain boundary the next network conditions traffic by its own agreements; RFC 3246 even tells a domain with no negotiated EF rate to police EF-marked packets at a rate of zero. You control your own egress queue, so the upload direction can be protected, but the rest of the path is best effort.
A supermarket express lane changes who waits, not how many cashiers there are: with no queue at any till, the lane makes no difference, and when every till is busy it lets a few small baskets through quickly while the full trolleys wait longer.
saying these in an interview costs you the question
- QoS makes a link faster or adds bandwidth for priority traffic.
- QoS only matters once average utilisation is close to 100 percent.
- Jitter is caused mainly by long propagation distances.
- A packet marked high priority is expedited by every router on the internet.
- Marking every application as high priority fixes performance problems.