CoS or often interchanged with QoS (Quality of Service), is a subject that I’ve had to really focus on studying for the JNCIP-ENT since it’s not something that I deal with often with enterprise networks outside maybe prioritizing VOIP traffic.

Juniper likes to call QoS, CoS, but often you’ll find documentation that describes CoS as being at layer 2 and QoS being at later 3. I prefer to keep that description of it in the workplace, but for the purpose of these notes, I’ll use CoS.

The best way to try to memorize the different parts of COS is starting with how Juniper devices would process CoS:

  1. Classification
  2. (Input) Policing
  3. Queuing
  4. Scheduling
  5. Shapeing
  6. Remarking
Courtesy https://www.juniper.net/us/en/research-topics/what-is-qos.html

(Courtesy https://www.juniper.net/us/en/research-topics/what-is-qos.html)

I would try to memorize this image and the order of these type of CoS, and that the last four have to do with egress instead of ingress.

1. Classification / Classifiers

Classification in the simplest terms is the process of inspecting a packet and associating the traffic with some type of CoS value (usually a forwarding class, but can also assign “packet loss priority” – PLP), these forwarding classes are then associated to an output queue (more on queuing below). 

There are three main types of classifiers: 

  1. Behavior aggregate (BA) classifier – this inspects the existing markings that packets have and then puts the packet in the corresponding forwarding class. This BA classifier is performed first, then the MF classifier, if there is a conflict between the two the MF overrides the setting* (this is likely going to be on an exam). 
  2. Multifield (MF) classifier – unlike the BA classifier, the MF classifier can use more than one field in the packet header, for example the source and destination address of the packet, or the source and destination port numbers of the packet. Remember although these are processed after the BA, if there is a conflict between the two, the MF takes priority! This classifier can also be applied on outbound traffic and when utilizing a firewall filter on a loopback interface, route engine traffic can be classified this way* (likely to be on an exam). 
  3. Fixed classifier – this is the simplest type of classifier, it takes all the ingress traffic on a physical interface and puts it into one forwarding class, regardless of the CoS bits in the packet header.

Note on Forwarding Classes – they are essentially a configuration object that the classifiers use to then map to the queues. These are four default forwarding classes that you will often come across and their queues:

Forwarding Class  Queue
best-effort (be) 0
expedited-forwarding (ef) 1
assured-forwarding (af) 2
network control (nc) 3

Note on Packet Loss Priority (PLP) – this is essentially the value that packets will have to define how likely they are to get dropped under congestion. This can be assigned via the above classifiers, or via a policer* (some of these objects like PLP mix into different parts of CoS, more on policers below). 

2. Policing / Policers

Policing is the limiting of input or output traffic, also known as rate-limiting. This allows you to control the maximum rate of traffic sent or received on an interface. 

Soft Policing

Hard Policing

 

3. Queuing / Queues

Puts packets into a buffer until it’s their turn to exit the router’s interface.

4. Scheduling / Schedulers

5. Shapers

6. Remarking

Rewrite rules can be implemented to change the value of the CoS bits of packets leaving the device on egress. This allows for changing the bits in fields such as IPv4 DSCP (Differentiated Service Code Point), IP precedence, MPLS EXP, and 802.1P.

 

Describe the concepts, operation, or functionality of Junos CoS for Layer 2 or 3 networks

  • CoS processing on Junos devices
  • CoS header fields
  • Forwarding classes
  • Classification
  • Packet loss priority
  • Policers
  • Schedulers
  • Drop profiles
  • Shaping
  • Rewrite rules

Given a scenario, demonstrate knowledge of how to configure, troubleshoot, or monitor CoS for Layer 2 or 3 networks

Notes: 

COS provides: minimum bandwidth guarantees, low latency, and low packet loss.

COS cannot eliminate congestion within a network

COS can guarantee certain levels of bandwidth to traffic classes.

Traffic Classification – Classifiers map traffic to a forwarding class at ingress. Can match on existing CoS values,

  • Behavior Aggregate (BA) classification – can match on existing C0S values
  • Multifield (MF) classification – can match on protocol, port, addresses, etc

BA classifiers – DSCP, DSCP IPv6, IP Precedence, IEEE 802.1p

Forwarding Classes – assign traffic to output queues

Controlling Congestion:

  • Weighted Tail Drop – When queue reaches a certain buffer capacity, Junos no longer allows traffic to enter the queue and begins dropping packets (by default the level is 100% of the queue).
  • Weighted Random Early Detection – When queue reaches a certain buffer capacity, Junos gradually and randomly drops packets with a packet loss priority of “low” or “high”.

Rate limiting traffic:

  • Policers – monitor and limit traffic on ingress interfaces
  • Shapers – monitor and limit traffic on egress interfaces / queues

References that I used while studying CoS: 

https://saidvandeklundert.net/2015-02-28-juniper-cos-notes/ – Said’s post is probably my favorite CoS resource that I’ve come across and the most concise one on the list, don’t miss it. 

https://www.networkfuntimes.com/how-to-read-a-junos-class-of-service-configuration/ – Chris’s post is a good read for an overview and actual configuration of CoS with Juniper. 

https://www.cbtnuggets.com/it-training/juniper/jncip-ent – While a great resource for an overview of all the subjects of the JNCIP-ENT, to properly prepare for the CoS section you’ll need to do a bit more homework than just these videos.