ON THIS PAGE
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:
|
QFX Series Switches |
CoS Hardware Specifications |
||||||
|---|---|---|---|---|---|---|---|
|
Buffer Memory |
DSCP Classifiers |
Rewrite |
Queues |
Queuing and Scheduling |
WRED |
802.1p Classifiers |
|
|
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 |
|
|
112 MB |
64 profiles |
128 profiles |
8 unicast and 2 multicast per port |
Four-level hierarchical scheduling scheme |
128 profiles per pipe |
64 profiles |
|
|
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 |
|
|
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:
[edit] user@switch# set class-of-service classifiers dscp | dscp-ipv6 | ieee-802.1 classifier-name import default user@switch# set class-of-service classifiers dscp | dscp-ipv6 | ieee-802.1 classifier-name forwarding-class forwarding-class-name loss-priority loss-priority-value code-points value user@switch# set class-of-service interfaces interface-name unit unit classifiers dscp | dscp-ipv6 | ieee-802.1 classifier-name user@switch# set class-of-service interfaces interface-* unit * classifiers dscp | dscp-ipv6 | ieee-802.1 classifier-name
To verify the BA classifier configuration:
user@switch> show configuration class-of-service interfaces interface-name user@switch> show configuration class-of-service classifiers user@switch> show class-of-service interface interface-name user@switch> show class-of-service interface interface-name detail
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:
set class-of-service classifiers dscp classifier-name forwarding-class forwarding-class-name1 loss-priority low code-points dscp-values set class-of-service classifiers dscp classifier-name forwarding-class forwarding-class-name2 loss-priority low code-points dscp-values set class-of-service interfaces interface-name unit 0 classifiers dscp classifier-name set class-of-service interfaces interface-name unit 0 scheduler-maps sm1
To verify DSCP classifier configuration:
show configuration class-of-service classifiers show configuration class-of-service interfaces show class-of-service classifiers dscp classifier-name
To configure shared packet buffer memory on your switch by partitioning it between ingress and egress:
set class-of-service shared-buffer ingress buffer-partition lossless percent ingress-lossless-percent set class-of-service shared-buffer ingress buffer-partition lossless dynamic-threshold ingress-lossless-dynamic-threshold set class-of-service shared-buffer ingress buffer-partition lossless-headroom percent ingress-lossless-headroom-percent set class-of-service shared-buffer ingress buffer-partition lossy percent ingress-lossy-percent set class-of-service shared-buffer egress buffer-partition lossless percent egress-lossless-percent set class-of-service shared-buffer egress buffer-partition lossy percent egress-lossy-percent
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:
set class-of-service interfaces et-* congestion-notification-profile pfc set class-of-service congestion-notification-profile pfc pfc-watchdog set class-of-service congestion-notification-profile pfc input dscp code-point dscp-values set class-of-service congestion-notification-profile pfc output ieee-802.1 code-point code-point-bits flow-control-queue 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:
set class-of-service classifiers dscp classifier-name forwarding-class forwarding-class-name loss-priority loss-priority-value code-points value set class-of-service forwarding-classes class forwarding-class-name queue-num queue-num-value set class-of-service forwarding-classes class forwarding-class-name pfc-priority pfc-priority-value set class-of-service congestion-notification-profile profile-name pfc input dscp code-point value
To configure NO-LOSS traffic scheduling:
set class-of-service schedulers scheduler-name drop-profile-map loss-priority low|medium-low|medium-high|high protocol any drop-profile drop-profile-name set class-of-service drop-profiles drop-profile-name interpolate fill-level fill-level1 set class-of-service drop-profiles drop-profile-name interpolate fill-level fill-level2 set class-of-service drop-profiles drop-profile-name interpolate drop-probability drop-probability-1 set class-of-service drop-profiles drop-profile-name interpolate drop-probability drop-probability-2
To verify NO-LOSS traffic scheduling configuration:
show class-of-service interface interface-name show configuration class-of-service schedulers show configuration class-of-service drop-profiles
To assign strict-high priority to the queue and reserve 5% of the interface’s bandwidth:
set class-of-service schedulers scheduler-name priority strict-high set class-of-service schedulers scheduler-name transmit-rate percent 5 set class-of-service schedulers scheduler-name shaping-rate percent 5
To view the scheduler-map, congestion-notification status, profile name, and the classifier applied to the interface:
show class-of-service interface interface-name
To view the mapping between DSCP values and forwarding classes and to confirm correct assignments:
show class-of-service classifier name classifier-name
To view the forwarding-classes to queue mapping:
show class-of-service forwarding-class
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:
show class-of-service scheduler-map scheduler-map-name
To view peak queue occupancy for each queue on interface:
show class-of-service shared-buffer