Computer Networks Essentials / Congestion & Traffic Control

Quality of Service (QoS)

๐Ÿค” What is Quality of Service? (Basic Idea)

In a network:

  • Not all data is equally important โŒ

  • Voice calls ๐Ÿ“ž and video ๐ŸŽฅ need fast delivery

  • Emails ๐Ÿ“ง and downloads can wait a little

๐Ÿ“Œ QoS ensures that important traffic gets better service than less important traffic.


๐Ÿง  Simple Definition

๐Ÿ“Œ Quality of Service (QoS) is a set of techniques used to manage network resources by prioritizing certain types of traffic to ensure reliable performance.


๐Ÿง  One-Line Understanding

QoS decides who gets priority when the network is busy.


๐Ÿง  Real-Life Analogy

๐Ÿฅ Hospital Emergency Room

  • Critical patients ๐Ÿš‘ treated first

  • Minor cases wait โณ

๐Ÿ‘‰ QoS works the same way:

  • Voice/video = emergency

  • File download = waiting patient


๐Ÿšจ Why QoS Is Needed

Without QoS โŒ:

  • Voice calls break

  • Video buffers

  • Online meetings fail

With QoS โœ…:

  • Clear voice ๐Ÿ“ž

  • Smooth video ๐ŸŽฅ

  • Stable applications

๐Ÿ“Œ Especially important in congested networks.


๐Ÿงญ Where QoS Is Applied

QoS is implemented in:

  • Routers

  • Switches

  • Wireless networks

  • ISP backbone

๐Ÿ“Œ Mostly at network edges.


๐ŸŽฏ Goals of Quality of Service

QoS aims to:

  • ๐Ÿ“‰ Reduce delay

  • ๐Ÿ“ฆ Reduce packet loss

  • โฑ๏ธ Control jitter

  • ๐Ÿ“ˆ Improve throughput

  • โš–๏ธ Ensure fairness


๐Ÿง  Key QoS Performance Parameters

โฑ๏ธ 1. Delay (Latency)

๐Ÿ“Œ Time taken for a packet to travel from sender to receiver

  • Voice/video need low delay

  • High delay causes lag โŒ

๐Ÿ”„ 2. Jitter

๐Ÿ“Œ Variation in packet delay

  • Uneven arrival times

  • Causes choppy audio/video

๐Ÿ“Œ QoS minimizes jitter.

๐Ÿ“ฆ 3. Packet Loss

๐Ÿ“Œ Packets dropped due to congestion

  • Data apps can retransmit

  • Voice/video cannot โŒ

๐Ÿ“ˆ 4. Throughput

๐Ÿ“Œ Actual data successfully delivered

  • QoS ensures required bandwidth

  • Especially for streaming apps


๐Ÿงฉ QoS Techniques

QoS is implemented using four main techniques:

1๏ธโƒฃ Traffic Classification

2๏ธโƒฃ Traffic Marking

3๏ธโƒฃ Traffic Shaping & Policing

4๏ธโƒฃ Scheduling & Queuing


๐Ÿงพ 1. Traffic Classification

๐Ÿง  What is Classification?

๐Ÿ“Œ Identifying packets based on:

  • Application type

  • Port number

  • IP address

Example:

  • Port 80 โ†’ Web

  • Port 5060 โ†’ VoIP

๐Ÿ‘‰ First step of QoS โœ”๏ธ


๐Ÿท๏ธ 2. Traffic Marking

๐Ÿง  What is Marking?

๐Ÿ“Œ Mark packets with priority values

Common marking methods:

  • DSCP (DiffServ)

  • ToS bits

๐Ÿ‘‰ Routers read these marks and give priority.


๐Ÿšฆ 3. Traffic Shaping & Policing

(You already studied traffic shaping, now see it in QoS context)

๐Ÿšฐ Traffic Shaping

  • Delays excess packets

  • Smooths traffic

  • Prevents congestion

๐Ÿš” Traffic Policing

  • Drops excess packets

  • Enforces strict limits

๐Ÿ“Œ Shaping = soft control

๐Ÿ“Œ Policing = strict control


๐Ÿงฎ 4. Scheduling & Queuing

Scheduling decides which packet is sent first.


๐Ÿ“ฅ Common Queuing Algorithms

๐Ÿ“ฆ a) FIFO (First In First Out)

  • Simple

  • No priority

  • Not suitable for QoS

โญ b) Priority Queuing

  • High priority packets sent first

  • Voice/video prioritized

โŒ Risk of starvation for low priority traffic

โš–๏ธ c) Weighted Fair Queuing (WFQ)

  • Fair bandwidth sharing

  • Each flow gets a weight

๐Ÿ“Œ Most balanced approach โœ”๏ธ


๐ŸŒ QoS Models

๐ŸŸข 1. Best Effort Service

๐Ÿ“Œ Default Internet service

๐Ÿ“Œ No guarantee

๐Ÿ“Œ All packets treated equally

๐Ÿ”ต 2. Integrated Services (IntServ)

  • Resource reservation

  • Uses RSVP protocol

  • High overhead

๐Ÿ“Œ Rarely used today.

๐ŸŸฃ 3. Differentiated Services (DiffServ)

  • Traffic classified into classes

  • Uses DSCP marking

  • Scalable & efficient

๐Ÿ“Œ Most widely used QoS model โœ”๏ธ


โš–๏ธ IntServ vs DiffServ

Feature

IntServ

DiffServ

Resource reservation

Yes

No

Scalability

Low

High

Complexity

High

Low

Usage

Limited

Widely used


๐ŸŽฅ Applications That Require QoS

  • VoIP calls ๐Ÿ“ž

  • Video conferencing ๐ŸŽฅ

  • Online gaming ๐ŸŽฎ

  • Live streaming ๐Ÿ“บ


๐Ÿง  QoS vs Congestion Control

Feature

QoS

Congestion Control

Focus

Priority & guarantees

Prevent overload

Scope

Application-based

Network-wide

Example

VoIP priority

TCP slow start

๐Ÿ“Œ Both work together.


๐Ÿง  Advantages of QoS

  • Improved user experience

  • Reliable real-time communication

  • Efficient resource usage

  • Business-critical traffic protected

โŒ Limitations of QoS

  • Complex configuration

  • Requires network-wide support

  • Misconfiguration causes issues


๐Ÿง  Memory Tricks

  • QoS = Quality over Quantity โญ

  • Delay + Jitter = Voice killers

  • DiffServ = Different priorities


โญ One-Line Summary

๐Ÿ”น Quality of Service (QoS) prioritizes network traffic to ensure reliable performance for delay-sensitive applications like voice and video.