Transport Layer · Computer Networks

Quality of Service

Watch lectures

Quality of Service (QoS) in Computer Networks


1. Fundamentals of Quality of Service

Quality of Service (QoS) defines the capability of a network to provide prioritized handling, guaranteed transmission parameters, and dedicated service levels to selected network traffic.

Traditional IP networks operate on a "Best-Effort" model: all packets are treated equally with zero guarantees regarding when (or even if) they will arrive. While acceptable for non-real-time web browsing or file transfers, real-time multimedia (VoIP telephony, video conferencing, financial algorithmic trading) degrades rapidly under best-effort latency and jitter.


2. The Four Primary QoS Metrics

+-----------------------------------------------------------------------------+
|                            THE FOUR QoS METRICS                             |
+------------------------------------+----------------------------------------+
| 1. Throughput (Bandwidth)          | Actual data bits delivered per second  |
| 2. Latency (Delay)                 | Total transit time across network path |
| 3. Jitter (Delay Variation)        | Variance in arrival intervals of packets|
| 4. Packet Loss Ratio               | Fraction of transmitted packets dropped|
+------------------------------------+----------------------------------------+

Traffic Flow Requirements:

  • Audio / VoIP (Real-Time): Low throughput requirement (64 kbps64\text{ kbps}), but demands ultra-low delay (<150 ms< 150\text{ ms}), ultra-low jitter (<30 ms< 30\text{ ms}), tolerating up to 1−2%1 - 2\% packet loss.
  • Video Streaming: High throughput (5−25 Mbps5 - 25\text{ Mbps}), moderate delay sensitivity, sensitive to jitter.
  • File Transfer (FTP/HTTP): High throughput, insensitive to delay and jitter, but demands absolute 0%0\% packet loss.

3. Queue Scheduling Algorithms

When router buffers congest, queue scheduling algorithms determine the transmission order of queued packets:

  A. FIFO (First-In, First-Out)
     [ Large File Download ] ──> [ Tiny Urgent VoIP Packet ]
     (VoIP packet trapped behind huge download packet ===> High Jitter!)

  B. PRIORITY QUEUEING (PQ)
     High Priority:   [ VoIP Packets ] ──> Always sent first!
     Low Priority:    [ File Downloads ] ──> Suffers starvation under heavy load!

  C. WEIGHTED FAIR QUEUEING (WFQ)
     Queue 1 (50% Bandwidth): [ Voice Streams ]
     Queue 2 (30% Bandwidth): [ Web Browsing  ] ──> Proportional round-robin service;
     Queue 3 (20% Bandwidth): [ File Transfers]     prevents starvation entirely!

4. QoS Architectures: IntServ vs. DiffServ

                            QoS ARCHITECTURES
                                    |
         +--------------------------+--------------------------+
         |                                                     |
  INTEGRATED SERVICES (IntServ)                 DIFFERENTIATED SERVICES (DiffServ)
  - Hard QoS guarantees                         - Soft class-based QoS
  - Per-flow state at every router              - Edge classification + Core forwarding
  - Signaling via RSVP                          - 6-bit DSCP tagging in IP header
  - Suffers from scalability collapse           - Highly scalable across the global Internet

1. Integrated Services (IntServ - RFC 1633)

  • Uses RSVP (Resource ReSerVation Protocol): The sending host transmits an RSVP path reservation message to reserve specific bandwidth and buffer space along all intermediate routers before data transmission starts.
  • Drawback: Routers must store state tables for every individual connection. In the core Internet with millions of flows, router CPU and memory collapse under the state burden.

2. Differentiated Services (DiffServ - RFC 2475)

  • Class of Service (CoS) approach: Pushes complex flow classification to edge routers.
  • Edge routers inspect packets and mark a 6-bit DSCP (Differentiated Services Code Point) in the IPv4 ToS / IPv6 Traffic Class byte.
  • Core routers simply read the 6-bit DSCP and apply Per-Hop Behaviors (PHBs):
    • Expedited Forwarding (EF - DSCP 46): Low loss, low latency, guaranteed bandwidth (virtual leased line for voice).
    • Assured Forwarding (AF): 4 traffic classes with 3 drop probabilities.
    • Best Effort (BE - DSCP 0): Unprioritized standard traffic.

5. Key Exam Questions & Takeaways

  1. Why is Jitter more damaging than constant delay for VoIP?
    • A constant delay of 100 ms100\text{ ms} allows playback buffers to deliver smooth, unbroken audio. Jitter (irregular delay variations) causes the receiver's jitter buffer to empty (underflow), causing clipped audio and gaps in speech.
  2. Explain the purpose of the DSCP field in DiffServ.
    • DSCP is a 6-bit field in the IP header that encodes up to 64 distinct classes of service, allowing core routers to apply predefined per-hop forwarding behaviors without maintaining state tables.
  3. Compare IntServ and DiffServ in terms of scalability.
    • IntServ maintains per-flow state across every router along the path, making it unscalable for large networks. DiffServ aggregates flows into a few traffic classes at the network edge, making it infinitely scalable for the global Internet.
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.

← All Computer Networks modules