Supported Platforms
Related Documentation
- QFabric System, QFX Series standalone switches
- Understanding CoS Packet Flow
- Understanding CoS Code-Point Aliases
- Overview of Policers
- Understanding CoS Classifiers
- Understanding CoS Forwarding Classes
- Understanding CoS Forwarding Class Sets (Priority Groups)
- Understanding CoS Flow Control (Ethernet PAUSE and PFC)
- Understanding CoS WRED Drop Profiles
- Understanding CoS Output Queue Schedulers
- Understanding CoS Rewrite Rules
- Understanding DCB Features and Requirements
- QFX Series standalone switches
- Understanding CoS Explicit Congestion Notification
Understanding Junos CoS Components
This topic describes the Junos operating system (OS) class-of-service (CoS) components:
Code-Point Aliases
A code-point alias assigns a name to a pattern of code-point bits. You can use this name instead of the bit pattern when you configure other CoS components such as classifiers and rewrite rules.
Policers
Policers limit traffic of a certain class to a specified bandwidth and burst size. Packets exceeding the policer limits can be discarded, or can be assigned to a different forwarding class, a different loss priority, or both. You define policers with filters that you can associate with input interfaces.
Classifiers
Packet classification associates incoming packets with a particular CoS servicing level. In Junos OS, classifiers associate packets with a forwarding class and loss priority and assign packets to output queues based on the associated forwarding class. Junos OS supports two general types of classifiers:
- Behavior aggregate (BA) or CoS value traffic classifiers—Examine the CoS value in the packet header. The value in this single field determines the CoS settings applied to the packet. BA classifiers allow you to set the forwarding class and loss priority of a packet based on the Differentiated Services code point (DSCP) value or IEEE 802.1p value.
- Multifield traffic classifiers—Examine multiple fields in the packet, such as source and destination addresses and source and destination port numbers of the packet. With multifield classifiers, you set the forwarding class and loss priority of a packet based on firewall filter rules.
You can create unicast classifiers for unicast traffic and multidestination classifiers for multicast, broadcast, and destination lookup fail traffic. You cannot assign unicast traffic and multidestination traffic to the same classifier.
You can apply unicast classifiers to one or more interfaces. Multidestination classifiers apply to all of the switch interfaces and cannot be applied to individual interfaces.
Forwarding Classes
Forwarding classes group packets for transmission and CoS. You assign each packet to an output queue based on the packet’s forwarding class. Forwarding classes affect the forwarding, scheduling, and rewrite marking policies applied to packets as they transit the switch.
The switch provides five default forwarding classes:
- fcoe—Fibre Channel over Ethernet traffic
- no-loss—Lossless traffic
- be—Best-effort traffic
- nc—Network control traffic
- mcast—Multicast traffic
The switch supports a total of 12 forwarding classes (8 unicast forwarding classes and 4 multicast forwarding classes), which provide flexibility in classifying traffic.
Forwarding Class Sets
You can group forwarding classes (output queues) into forwarding class sets in order to apply CoS to groups of traffic that require similar treatment. Forwarding class sets map traffic into priority groups to support enhanced transmission selection (ETS, described in IEEE 802.1Qaz).
You can configure up to three unicast forwarding class sets and one multicast forwarding class set. For example, you can configure different forwarding class sets to apply CoS to unicast groups of local area network (LAN) traffic, storage area network (SAN) traffic, and high-performance computing (HPC) traffic, and configure another group for multicast traffic.
Within each forwarding class set, you can configure special CoS treatment for the traffic mapped to each individual queue. This provides the ability to configure CoS in a two-tier hierarchical manner. At the forwarding class set tier, you configure CoS for groups of traffic using a traffic control profile. At the queue tier, you configure CoS for individual output queues within a forwarding class set using a scheduler that you map to a queue (forwarding class) using a scheduler map.
Flow Control (Ethernet PAUSE, PFC, and ECN)
Ethernet PAUSE (described in IEEE 802.3X) is a link-level flow control mechanism. During periods of network congestion, Ethernet PAUSE stops all traffic on a full-duplex Ethernet link for a period of time specified in the PAUSE message.
Priority-based flow control (PFC, described in IEEE 802.1Qbb) is part of the IEEE data center bridging (DCB) specifications for creating a lossless Ethernet environment to transport loss-sensitive flows such as Fibre Channel over Ethernet (FCoE) traffic.
PFC is a link-level flow control mechanism similar to Ethernet PAUSE. However, Ethernet PAUSE stops all traffic on a link for a period of time. PFC decouples the pause function from the physical link and divides the traffic on the link into eight priorities (3-bit IEEE 802.1p code points). You can think of the eight priorities as eight “lanes” of traffic. You can apply pause selectively to the traffic on any priority without pausing the traffic on other priorities on the same link.
The granularity that PFC provides allows you to configure different levels of CoS for different types of traffic on the link. You can create lossless lanes for traffic such as FCoE, LAN backup, or management, while using standard frame-drop methods of congestion management for IP traffic on the same link.
![]() | Note: If you transport FCoE traffic, you must enable PFC on the priority assigned to FCoE traffic (usually IEEE 802.1p code point 011 on interfaces that carry FCoE traffic). |
Explicit congestion notification (ECN) enables end-to-end congestion notification between two endpoints on TCP/IP based networks. ECN must be enabled on both endpoints and on all of the intermediate devices between the endpoints for ECN to work properly. Any device in the transmission path that does not support ECN breaks the end-to-end ECN functionality. ECN notifies networks about congestion with the goal of reducing packet loss and delay by making the sending device decrease the transmission rate until the congestion clears, without dropping packets. RFC 3168, The Addition of Explicit Congestion Notification (ECN) to IP, defines ECN.
WRED Profiles
A WRED (weighted random early detection) profile (drop profile) defines parameters that enable the network to drop packets during periods of congestion. A drop profile defines the conditions under which packets of different loss priorities drop, by determining the probability of dropping a packet for each loss priority when output queues become congested. Drop profiles essentially set a value for a level of queue fullness—when the queue fills to the level of the queue fullness value, packets drop.
You can associate different drop profiles with different loss priorities to set the probability of dropping packets. You can apply a drop profile for each loss priority to a forwarding class (output queue) by applying a drop profile to a scheduler, and then mapping the scheduler to a forwarding class using a scheduler map. When the queue mapped to the forwarding class experiences congestion, the drop profile determines the level of packet drop for traffic of each loss priority in that queue.
Loss priority affects the scheduling of a packet without affecting the packet’s relative ordering. Typically you mark packets exceeding a particular service level with a high loss priority.
Schedulers
Each switch interface has multiple queues assigned to store packets. The switch determines which queue to service based on a particular method of scheduling. This process often involves determining the sequence in which different types of packets should be transmitted.
You can define the priority (priority), minimum bandwidth (transmit-rate), maximum bandwidth (shaping-rate), and WRED profiles to be applied to a particular queue for packet transmission. Extra bandwidth is shared among queues in proportion to the minimum guaranteed bandwidth of each queue.
A scheduler map associates a specified forwarding class with a scheduler configuration. You can associate up to four user-defined scheduler maps with the interfaces.
Rewrite Rules
A rewrite rule sets the appropriate CoS bits in the outgoing packet. This allows the next downstream device to classify the packet into the appropriate service group. Rewriting (marking) outbound packets is useful when the switch is at the border of a network and must change the CoS values to meet the policies of the targeted peer.
![]() | Note: Ingress firewall filters can also rewrite forwarding class and loss priority values. |
Related Documentation
- QFabric System, QFX Series standalone switches
- Understanding CoS Packet Flow
- Understanding CoS Code-Point Aliases
- Overview of Policers
- Understanding CoS Classifiers
- Understanding CoS Forwarding Classes
- Understanding CoS Forwarding Class Sets (Priority Groups)
- Understanding CoS Flow Control (Ethernet PAUSE and PFC)
- Understanding CoS WRED Drop Profiles
- Understanding CoS Output Queue Schedulers
- Understanding CoS Rewrite Rules
- Understanding DCB Features and Requirements
- QFX Series standalone switches
- Understanding CoS Explicit Congestion Notification
Published: 2014-07-23
Supported Platforms
Related Documentation
- QFabric System, QFX Series standalone switches
- Understanding CoS Packet Flow
- Understanding CoS Code-Point Aliases
- Overview of Policers
- Understanding CoS Classifiers
- Understanding CoS Forwarding Classes
- Understanding CoS Forwarding Class Sets (Priority Groups)
- Understanding CoS Flow Control (Ethernet PAUSE and PFC)
- Understanding CoS WRED Drop Profiles
- Understanding CoS Output Queue Schedulers
- Understanding CoS Rewrite Rules
- Understanding DCB Features and Requirements
- QFX Series standalone switches
- Understanding CoS Explicit Congestion Notification