Class of Service (CoS) is a networking technique used to prioritize critical traffic like voice, video, or other latency-sensitive applications. It ensures high-priority traffic is delivered reliably, even during network congestion.
Why CoS?
Applications of CoS:
CoS is implemented through the following processes:
Classification involves identifying and categorizing traffic into classes based on specific criteria.
Classification Methods:
Configuration Example:
Define a classifier for DSCP:
set class-of-service classifiers dscp voice-classifier forwarding-class voice
Scheduling determines how traffic from different classes is handled when sent out of an interface.
Queue Structure:
Scheduling Mechanisms:
Configuration Example:
Define a scheduler for voice traffic:
set class-of-service schedulers voice priority high transmit-rate 50%
Shaping controls the outbound traffic rate to prevent congestion and smooth traffic bursts.
How It Works:
Policing vs. Shaping:
Configuration Example:
Set a shaping rate for background traffic:
set class-of-service traffic-shaping-profile background shaping-rate 10m
Classifiers are used to identify and categorize traffic based on its characteristics.
Define a DSCP-Based Classifier:
set class-of-service classifiers dscp my-classifier forwarding-class voice
set class-of-service classifiers dscp my-classifier forwarding-class data
Assign the Classifier to an Interface:
set interfaces ge-0/0/1 unit 0 family inet class-of-service classifier-input my-classifier
Schedulers allocate bandwidth and priority to queues.
Create a Scheduler for High-Priority Traffic:
set class-of-service schedulers voice priority high transmit-rate 50%
Assign the Scheduler to an Interface:
set class-of-service scheduler-maps scheduler-map1 forwarding-class voice scheduler voice
set interfaces ge-0/0/1 unit 0 family inet class-of-service scheduler-map scheduler-map1
Objective:
Step 1: Define Classifiers:
set class-of-service classifiers dscp voice-classifier forwarding-class voice
set class-of-service classifiers dscp video-classifier forwarding-class video
set class-of-service classifiers dscp data-classifier forwarding-class data
Step 2: Define Schedulers:
set class-of-service schedulers voice priority high transmit-rate 40%
set class-of-service schedulers video priority medium transmit-rate 30%
set class-of-service schedulers data priority low transmit-rate 20%
Step 3: Assign Schedulers to Interfaces:
set class-of-service scheduler-maps scheduler-map1 forwarding-class voice scheduler voice
set class-of-service scheduler-maps scheduler-map1 forwarding-class video scheduler video
set class-of-service scheduler-maps scheduler-map1 forwarding-class data scheduler data
set interfaces ge-0/0/1 unit 0 family inet class-of-service scheduler-map scheduler-map1
Monitoring helps verify that CoS policies are working as expected and allows you to identify issues in prioritization or traffic shaping.
Check Queue Statistics:
show interfaces queue ge-0/0/1
Verify Classifiers:
show class-of-service classifiers
Monitor Scheduler Usage:
show class-of-service scheduler-map
Check Traffic Policing and Shaping:
show class-of-service traffic-shaping
Symptom:
Solution:
Verify classifier configuration:
show class-of-service classifiers
Ensure DSCP or VLAN tagging is correctly applied by the source.
Symptom:
Solution:
Adjust transmit rates for other queues to free up bandwidth.
Example:
set class-of-service schedulers data transmit-rate 15%
Symptom:
Solution:
Increase the shaping or policing threshold:
set class-of-service policers data-traffic if-exceeding bandwidth-limit 20m
Class of Service (CoS) is often associated with Layer 2 mechanisms, such as:
802.1p priority bits in Ethernet frame headers.
VLAN-based classification (e.g., voice VLAN).
Quality of Service (QoS) is a broader term encompassing traffic prioritization, congestion management, and traffic shaping at Layer 3 and above, including:
DSCP (Differentiated Services Code Point)
Queuing and scheduling algorithms
Policing and shaping mechanisms
“CoS is typically used to mark traffic at Layer 2 (e.g., 802.1p), while QoS is a broader framework encompassing traffic classification, scheduling, policing, and shaping at Layers 3–7. CoS is often the foundation of a larger QoS strategy.”
This distinction is commonly misunderstood and often appears in conceptual exam questions.
While DSCP and VLAN tags are commonly used, real-world CoS deployment involves multiple additional classification techniques:
IP Precedence:
An older method based on the Type of Service (ToS) field in IPv4 headers.
Still supported for backward compatibility.
Access Control List (ACL)-Based Classification:
Classify traffic by matching:
Source/destination IP addresses
Port numbers
Protocol types (e.g., TCP, UDP)
Deep Packet Inspection (DPI) / Application Recognition (NBAR):
Classify traffic based on application-layer signatures (e.g., Zoom, Skype).
Enables intelligent traffic handling beyond static ports.
“Beyond DSCP and VLAN tags, CoS can classify traffic using IP Precedence, ACL-based policies, or deep packet inspection (DPI) techniques to identify application-specific flows.”
These advanced techniques are frequently used in service provider or enterprise edge environments.
Low Latency Queuing (LLQ) is a hybrid scheduling model that combines:
Strict Priority Queuing: Ensures delay-sensitive traffic (like voice) is always sent first.
Weighted Round Robin (WRR): Provides fair bandwidth distribution among remaining traffic classes.
“LLQ (Low Latency Queuing) integrates strict priority with weighted scheduling to ensure low latency for real-time traffic while preserving fairness for other classes.”
This concept may be tested in multiple-choice questions focused on real-time service optimization.
Understanding the difference between these two traffic management techniques is crucial for both configuration and troubleshooting.
Enforces a hard rate limit.
Drops or re-marks traffic that exceeds the defined threshold.
Suitable for contract enforcement and protecting downstream devices.
Smooths out traffic bursts by buffering packets and sending them at a defined rate.
Does not drop excess traffic unless buffer overflows.
Ideal for delaying traffic until bandwidth becomes available.
“Policing enforces rate limits by dropping or re-marking excess ingress traffic, while shaping smooths outbound traffic by buffering excess packets and sending them later.”
Many scenario-based questions will expect you to identify when and where each mechanism is appropriate.
Once CoS is configured, it’s essential to verify its impact through monitoring and analytics tools.
SNMP (Simple Network Management Protocol):
NetFlow / sFlow:
Provides visibility into flow-level traffic patterns.
Helps identify whether specific traffic classes are correctly marked and handled.
Streaming Telemetry:
Juniper HealthBot:
“Tools like SNMP, NetFlow, sFlow, telemetry, and Juniper HealthBot are essential for validating CoS performance and detecting traffic anomalies.”
Expect exam scenarios involving commands like show class-of-service or interpretation of queue statistics.
As networks evolve toward programmability, virtualization, and time-sensitive services, CoS plays a strategic role in ensuring performance across diverse use cases.
Software-Defined Networking (SDN):
CoS policies can be programmatically controlled via SDN controllers.
Enables dynamic, application-aware prioritization.
Cloud / Data Center Multi-Tenant Environments:
CoS ensures bandwidth fairness and SLA enforcement per tenant.
Supports isolated queueing for north-south and east-west traffic.
Industrial and Real-Time Networks (e.g., TSN – Time-Sensitive Networking):
CoS ensures deterministic delivery for automation, robotics, or video surveillance.
Integrates with strict latency and jitter control mechanisms.
“In modern networks, CoS ensures deterministic performance in SDN-driven architectures, cloud multi-tenant environments, and time-sensitive applications like TSN.”
This content helps bridge traditional QoS concepts with their next-gen applications, useful for higher-tier certifications and job interviews.
| Topic | Clarification |
|---|---|
| CoS vs QoS | CoS is a Layer 2 marking method; QoS includes end-to-end traffic treatment across all layers |
| Classification Methods | Includes IP Precedence, ACL-based matching, and DPI/NBAR-based identification |
| Hybrid Scheduling | LLQ combines strict priority and WRR to support real-time and fair-queued traffic |
| Policing vs. Shaping | Policing drops excess traffic on ingress; shaping buffers and smooths egress traffic |
| Monitoring Tools | SNMP, NetFlow/sFlow, telemetry, and HealthBot enable CoS verification |
| Modern Use Cases | CoS is key in SDN, cloud multi-tenancy, and industrial TSN environments |
What is the purpose of traffic classification in Class of Service?
To identify traffic types so they can receive appropriate priority and handling.
Traffic classification examines packet fields such as:
DSCP
IP precedence
VLAN priority bits
Based on these values, packets are placed into forwarding classes. This allows network devices to apply different policies such as queuing or bandwidth guarantees.
Demand Score: 78
Exam Relevance Score: 84
What is the difference between traffic policing and traffic shaping?
Policing drops or marks packets exceeding limits, while shaping buffers packets to smooth traffic rates.
Policing
Enforces strict rate limits
Excess packets may be dropped
Shaping
Delays packets instead of dropping them
Smooths bursts of traffic
Shaping is typically used on outbound interfaces where buffering is possible.
Demand Score: 81
Exam Relevance Score: 87
What role do queues play in Class of Service?
Queues store packets temporarily and determine the order in which they are transmitted.
Routers maintain multiple queues to support different traffic priorities.
Scheduling algorithms decide which queue transmits next.
Common algorithms include:
Weighted Round Robin
Strict Priority
This ensures latency-sensitive traffic such as voice receives faster forwarding.
Demand Score: 75
Exam Relevance Score: 82
Why is QoS important for voice traffic?
Voice traffic is sensitive to delay, jitter, and packet loss.
Real-time applications such as VoIP require predictable network performance.
QoS mechanisms can:
Prioritize voice packets
Guarantee minimum bandwidth
Reduce latency and jitter
Without QoS, voice quality may degrade during network congestion.
Demand Score: 73
Exam Relevance Score: 80