Post

Qos

Qos

Master Guide to Quality of Service (QoS)

Network bandwidth is not unlimited. When multiple applications compete for the same network resources, congestion and bottlenecks occur.

This is where Quality of Service (QoS) comes in.

QoS is a collection of techniques that prioritize important traffic (like voice or video) while de-prioritizing less critical traffic when the network becomes congested.

In simple terms:

QoS ensures that critical applications get the network performance they need.


Why QoS Matters

Imagine a network where:

  • A user is downloading large files
  • Another user is on a VoIP call
  • Someone else is watching a video meeting

Without QoS, all traffic is treated equally, which can result in:

  • Lagging calls
  • Frozen video meetings
  • Poor user experience

With QoS:

  • Voice packets are prioritized
  • Video packets get enough bandwidth
  • Background downloads wait their turn

1. Key Network Performance Metrics

QoS mainly focuses on controlling four critical network metrics.

Bandwidth

Bandwidth is the maximum amount of data that can travel through a link per second.

Example : 100 Mbps link = Maximum 100 megabits per second

More traffic than the available bandwidth leads to congestion.


Delay (Latency)

Delay is the time it takes for a packet to travel from source to destination.

Recommended values for voice traffic : ≤ 150 ms (one-way delay)

High latency causes:

  • Voice delay
  • Conversation overlap
  • Poor call quality

Jitter

Jitter is the variation in delay between packets.

Example:

1
2
3
Packet 1 delay: 20 ms
Packet 2 delay: 35 ms
Packet 3 delay: 18 ms

This variation is jitter.

Recommended jitter for voice : ≤ 30 ms

High jitter leads to choppy audio or video.


Packet Loss

Packet loss occurs when packets fail to reach their destination.

Voice traffic is extremely sensitive to packet loss because VoIP uses UDP, which does not retransmit lost packets.

Recommended packet loss : ≤ 1%

Higher loss results in missing audio and broken calls.


2. Classification and Marking

Before prioritizing traffic, network devices must identify what type of traffic it is.

This happens in two steps.


Classification

Classification is the process of identifying traffic types and placing them into categories.

Examples:

  • Voice
  • Video
  • Critical applications
  • Background traffic

Classification methods include:

  • ACLs
  • NBAR (deep packet inspection)

Marking

Marking adds labels inside packet headers so other devices know the packet priority.

This allows QoS policies to be applied consistently across the network.


PCP (Priority Code Point)

PCP is a 3-bit field located in the 802.1Q VLAN tag.

Key characteristics:

  • 8 possible values
  • Also known as Class of Service (CoS)
  • Exists only on trunk links or voice VLANs

DSCP (Differentiated Services Code Point)

DSCP is a 6-bit field in the IP header.

Key advantages:

  • 64 possible values
  • Travels end-to-end across the network
  • Modern QoS standard

Common DSCP Markings

MarkingValuePurpose
DF (Default Forwarding)0Best-effort traffic
EF (Expedited Forwarding)46Voice traffic
CS (Class Selector)0–7Backward compatibility
AF (Assured Forwarding)VariousTraffic classes with drop priorities

Trust Boundaries

A trust boundary defines where network devices start trusting packet markings.

Best practice:

  • Trust markings from IP phones
  • Do not trust PCs

Why?

A user could manually mark their traffic as high priority, which would break QoS policies.


3. Queuing and Scheduling

When packets arrive faster than they can be transmitted, they are stored in queues.

Scheduling determines which packet leaves the queue first.


FIFO (First-In First-Out)

Default method used by many devices.

First packet in → First packet out

No prioritization.

All traffic is treated equally.


Priority Queuing (PQ)

Traffic is divided into multiple priority queues.

Example:

1
2
3
High Priority
Medium Priority
Low Priority

The router always empties higher queues first.

Problem:

Low-priority traffic may never get serviced (queue starvation).


Class-Based Weighted Fair Queuing (CBWFQ)

CBWFQ assigns minimum bandwidth guarantees to each traffic class.

Example:

ClassBandwidth
Voice30%
Video25%
Data35%
Background10%

This ensures fair bandwidth allocation.


Low Latency Queuing (LLQ)

LLQ combines:

  • CBWFQ
  • Strict priority queue

Real-time traffic (like voice marked EF) goes into the priority queue.

However, it must be rate-limited to prevent starvation of other queues.


4. Rate Limiting: Policing vs Shaping

These techniques control how much traffic is allowed to pass.


Policing

Policing immediately drops or re-marks traffic exceeding a limit.

Example:

1
2
Limit = 10 Mbps
Traffic = 15 Mbps

Result : 5 Mbps dropped

Commonly used by ISPs to enforce customer bandwidth limits.


Shaping

Shaping buffers excess traffic instead of dropping it.

Example:

1
2
Limit = 10 Mbps
Traffic = 15 Mbps

Result:

1
2
10 Mbps sent
5 Mbps buffered and sent later

Used by customers to avoid ISP policing drops.


5. Congestion Avoidance

When queues become full, the device must decide which packets to drop.


Tail Drop

The simplest approach.

When the queue is full : New packets are dropped

This can cause TCP Global Synchronization.

TCP Global Synchronization

Many hosts simultaneously:

  1. Detect packet loss
  2. Reduce transmission rate
  3. Increase again together

This creates network inefficiency and traffic oscillations.


WRED (Weighted Random Early Detection)

WRED prevents congestion before the queue becomes full.

It works by:

  • Randomly dropping packets early
  • Dropping lower priority packets first
  • Using AF drop precedence values

Benefits:

  • Prevents TCP global synchronization
  • Maintains smoother traffic flow

6. Wireless QoS Levels

In wireless networks (like Cisco WLC), traffic is categorized into four QoS levels.

LevelPriorityTypical Use
PlatinumHighestVoice (VoIP)
GoldHighVideo traffic
SilverMediumStandard data
BronzeLowestBackground or guest traffic

7. Per-Hop Behavior (PHB)

QoS is not automatically end-to-end.

Each device (router or switch) must apply QoS policies independently.

This concept is called Per-Hop Behavior (PHB).

Example network path : Client → Switch → Router → ISP → Destination

If only one device applies QoS, prioritization is lost on the next hop.

Therefore:

QoS policies must be implemented consistently across the entire network path.


Final Thoughts

Quality of Service is essential for modern networks where multiple applications compete for bandwidth.

A well-designed QoS strategy ensures:

  • Clear voice calls
  • Smooth video conferencing
  • Reliable application performance
  • Efficient bandwidth usage

Key concepts to remember:

1
2
3
4
5
6
7
8
Metrics → Bandwidth, Delay, Jitter, Loss
Classification → Identify traffic
Marking → Label packets (DSCP/PCP)
Queuing → Control packet transmission
Rate Limiting → Policing & Shaping
Congestion Avoidance → WRED
Wireless QoS → Traffic priority levels
PHB → QoS applied at every hop

When implemented correctly, QoS transforms a congested network into a predictable, reliable, and application-aware system.

🙌 Connect With Me

GitHub LinkedIn YouTube Gmail

This post is licensed under CC BY 4.0 by the author.