# Class of Service (CoS) in Junos: A Primer

The Class of Service (CoS) is a critical component in Juniper Networks' Junos operating system. It is a fundamental topic for anyone preparing for the JNCIS-ENT certification. This blog post will provide a primer on CoS in Junos, covering its importance, components, and configuration.

## Importance of CoS

In a network, not all traffic is created equal. Some packets are more critical than others, and they need to be prioritized. This is where CoS comes into play. CoS allows network administrators to manage the priority of different types of traffic, ensuring that critical packets get the bandwidth and treatment they need.

## Components of CoS

CoS in Junos is made up of several components:

1. **Classifiers**: These are used to categorize incoming packets into different classes based on various parameters like IP precedence, DSCP, and MPLS EXP bits.

2. **Forwarding Classes**: These are essentially queues. Once packets are classified, they are put into one of these queues. Junos supports four default forwarding classes: best effort, expedited forwarding, assured forwarding, and network control.

3. **Schedulers**: These determine how packets in a queue are treated. They control the bandwidth, delay, jitter, and loss characteristics of a queue.

4. **Drop Profiles**: These are used to manage congestion. When a queue starts to fill up, drop profiles determine which packets to drop.

## Configuring CoS in Junos

Here is a basic example of how to configure CoS in Junos:

set class-of-service classifiers dscp my-classifier forwarding-class expedited-forwarding loss-priority high code-points 101110
set class-of-service interfaces ge-0/0/0 unit 0 classifiers dscp my-classifier

In this example, we first define a DSCP classifier named my-classifier that maps the DSCP code point 101110 to the expedited-forwarding forwarding class with a high loss priority. Then, we apply this classifier to the interface ge-0/0/0.


Understanding CoS in Junos is crucial for managing network traffic effectively and for passing the JNCIS-ENT certification. This primer has provided a basic overview of CoS, but there is much more to learn. Be sure to dive deeper into each component and practice configuring CoS in a lab environment.

© Ben Jacobson.RSS