Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Defining CoS Forwarding Classes

Forwarding classes allow you to group packets for transmission. The switch supports a total of eight (QFX10000 and NFX Series devices), 10 (QFX5200 switches), or 12 (other switches) forwarding classes. To forward traffic, you map (assign) the forwarding classes to output queues.

The QFX10000 switches and NFX Series devices have eight output queues, queues 0 through 7. These queues support both unicast and multidestination traffic.

Except on QFX10000 and NFX Series devices, the switch has 10 output queues (QFX5200) or 12 output queues (other switches). Queues 0 through 7 are for unicast traffic and queues 8 through 11 are for multicast traffic. Forwarding classes mapped to unicast queues must carry unicast traffic, and forwarding classes mapped to multidestination queues must carry multidestination traffic. There are four default unicast forwarding classes and one default multidestination forwarding class.

The default forwarding classes, except on NFX Series devices, are:


Except on QFX10000, these are the default unicast forwarding classes.

  • best-effort—Best-effort traffic

  • fcoe—Guaranteed delivery for Fibre Channel over Ethernet traffic (do not use on OCX Series switches)

  • no-loss—Guaranteed delivery for TCP no-loss traffic (do not use on OCX Series switches)

  • network-control—Network control traffic


QFX10002-60C does not support PFC and lossless queues; that is, default lossless queues (fcoe and no-loss) will be lossy queues.

The default multidestination forwarding class, except on QFX10000 switches and NFX Series devices, is:

  • mcast—Multidestination traffic

The NFX Series devices have the following default forwarding classes:

  • best-effort (be)—Provides no service profile. Loss priority is typically not carried in a CoS value.

  • expedited-forwarding (ef)—Provides a low loss, low latency, low jitter, assured bandwidth, end-to-end service.

  • assured-forwarding (af)—Provides a group of values you can define and includes four subclasses: AF1, AF2, AF3, and AF4, each with two drop probabilities: low and high.

  • network-control (nc)—Supports protocol control and thus is typically high priority.

You can map forwarding classes to queues using the class statement. You can map more than one forwarding class to a single queue. Except on QFX10000 or NFX Series devices, all forwarding classes mapped to a particular queue must be of the same type, either unicast or multicast. You cannot mix unicast and multicast forwarding classes on the same queue.

All of the forwarding classes mapped to the same queue must have the same packet drop attribute: either all of the forwarding classes must be lossy or all of the forwarding classes must be lossless. This is important because the default fcoe and no-loss forwarding classes have the no-loss drop attribute, which is not supported on OCX Series switches. On OCX Series switches, do not map traffic to the default fcoe and no-loss forwarding classes.

One example is to create a forwarding class named be2 and map it to queue 1:

Another example is to create a lossless forwarding class named fcoe2 and map it to queue 5:


On switches that do not run ELS software, if you are using Junos OS Release 12.2 or later, use the default forwarding-class-to-queue mapping for the lossless fcoe and no-loss forwarding classes. If you explicitly configure the lossless forwarding classes, the traffic mapped to those forwarding classes is treated as lossy (best-effort) traffic and does not receive lossless treatment unless you include the optional no-loss packet drop attribute introduced in Junos OS Release 12.3 in the forwarding class configuration..


On switches that do not run ELS software, Junos OS Release 11.3R1 and earlier supported an alternate method of mapping forwarding classes to queues that allowed you to map only one forwarding class to a queue using the statement:

The queue statement has been deprecated and is no longer valid in Junos OS Release 11.3R2 and later. If you have a configuration that uses the queue statement to map forwarding classes to queues, edit the configuration to replace the queue statement with the class statement.