Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Class of Service

This section briefly describes the class-of-service (CoS) feature and its configuration on the QFX5220, QFX5230, QFX5240, and QFX5241 Switches.

Overview

The class-of-service (CoS) feature enables Juniper devices to divide the network traffic into classes and set various levels of throughput and packet loss when congestion occurs. Using this feature, you can control packet loss as you can define rules according to your network requirements.

The QFX Series Switches QFX5220, QFX5230, QFX5240, and QFX5241 also support CoS where control plane and data plane processes and functions run in parallel, optimizing the utilization of the high-performance CPU. The CoS hardware specification details for your switch are as follows:

Table 1: CoS Hardware Specifications Supported by QFX5220, QFX5230, QFX5240, and QFX5241 Switches

QFX Series Switches

CoS Hardware Specifications

Buffer Memory

DSCP Classifiers

Rewrite

Queues

Queuing and Scheduling

WRED

802.1p Classifiers

QFX5220

64 MB

64 profiles

128 profiles

8 unicast and 2 multicast per port

Fixed hierarchical scheduling (FHS) and two-level hierarchy

128 profiles per pipe

64 profiles

QFX5230-64CD

112 MB

64 profiles

128 profiles

8 unicast and 2 multicast per port

Four-level hierarchical scheduling scheme

128 profiles per pipe

64 profiles

QFX5240

165.2 MB

64 profiles

128 profiles

8 unicast and 2 multicast per port

Four-level hierarchical scheduling scheme

128 profiles per pipe X 32 pipes

64 profiles

QFX5241

165.2 MB

64 profiles

128 profiles

8 unicast and 2 multicast per port

Four-level hierarchical scheduling scheme

128 profiles per pipe X 32 pipes

64 profiles

CoS Configuration for AI Data Center

Juniper CoS provides a flexible set of components that you can use to control the traffic on your network. Here's a list of some of the components:

  • Defining classifiers that classify incoming traffic into forwarding classes to place traffic in groups for transmission.

  • Configuring schedulers for each output queue to control the service level (priority, bandwidth characteristics) of each type of traffic.

  • Configuring various CoS components individually or in combination to define CoS services.

If you do not configure CoS settings, Junos OS performs some CoS functions to ensure that traffic and protocol packets are forwarded with minimum delay when the network experiences congestion.

Configure Behavior Aggregate Classifiers (DSCP, DSCP IPv6, IEEE 802.1p)

Behavior aggregate (BA) classifiers examine the Differentiated Services Code Point (DSCP or DSCP IPv6) value, the IEEE 802.1p CoS value, or the MPLS EXP value in the packet header to determine the CoS settings applied to the packet. You can use these classifiers to set the forwarding class and loss priority of a packet based on the incoming CoS value.

To configure a BA classifier:

To verify the BA classifier configuration:

For information about BA classifier configuration, see configuring BA classifiers.

Configure Schedulers

A scheduler is an egress service policy attached to an interface’s queue that helps in deciding the priority and bandwidth share of the network traffic. Each interface has multiple output queues (mapped from forwarding-class, 802.1p, or DSCP). When traffic congestion happens on the egress port, the scheduler determines which queue gets sent next and how much.

You can manage and control the traffic congestion on your switch by using the Data Center Quantized Congestion Notification (DCQCN) approach in the RoCEv2 environment. It provides mechanisms to adjust traffic rates in response to congestion events without relying on packet drops, striking a balance between reducing traffic rates and maintaining ongoing traffic flow. To implement flow and congestion control, DCQCN combines priority-based flow control (PFC) and explicit congestion notification (ECN). PFC mitigates data loss by pausing traffic transmission for specific traffic classes, based on IEEE 802.1p priorities or DSCP markings mapped to queues. Whereas, ECN offers a proactive congestion signaling mechanism, reducing transmission rates while allowing traffic to continue flowing during congestion periods.

To classify traffic on the basis of DSCP and implement traffic classification using the fabric-dscp classifier:

To verify DSCP classifier configuration:

To configure shared packet buffer memory on your switch by partitioning it between ingress and egress:

To apply a congestion-notification profile to interfaces, enable PFC watchdog under that profile, identify which incoming packets belong to the PFC-protected class (DSCP-based), and configure a switch to map to 802.1p priority and choose the flow-control queue:

To classify inbound traffic with DSCP and assign it to the forwarding class. This configuration maps it to queue, assigns pfc-priority, makes that queue a no-loss queue, and enables PFC for DSCP traffic:

To configure NO-LOSS traffic scheduling:

To verify NO-LOSS traffic scheduling configuration:

To assign strict-high priority to the queue and reserve 5% of the interface’s bandwidth:

To view the scheduler-map, congestion-notification status, profile name, and the classifier applied to the interface:

To view the mapping between DSCP values and forwarding classes and to confirm correct assignments:

To view the forwarding-classes to queue mapping:

This command is used to verify the queue mapping (CNP is greater than equal to queue 3, and NO-LOSS is greater than equal to queue 4), and the no-loss status and PFC priority of the NO-LOSS queue.

To view the scheduler map and the schedulers including their priority, assigned rate, and whether ECN is enabled:

To view peak queue occupancy for each queue on interface: