Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


class (Forwarding Classes)

Syntax for QFX Series and OCX Series Routers

Syntax for M120, M320, MX Series routers, T Series routers, and EX Series switches

Hierarchy Level


On M120 , M320, MX Series routers, T Series routers and EX Series switches only, specify the output transmission queue to which to map all input from an associated forwarding class.

This statement enables you to configure up to 16 forwarding classes with multiple forwarding classes mapped to single queues. If you want to configure up to eight forwarding classes with one-to-one mapping to output queues, use the queue statement instead of the class statement at the [edit class-of-service forwarding-classes] hierarchy level.

Map one or more forwarding classes to a single queue. Also, when configuring DSCP-based PFC, map a forwarding class to a PFC priority value to use in pause frames when traffic on a DSCP value becomes congested (see Configuring DSCP-based PFC for Layer 3 Untagged Traffic for details).

You can map unicast forwarding classes to a unicast queue (0 through 7) and multidestination forwarding classes to a multicast queue (8 through 11). The queue to which you map a forwarding class determines if the forwarding class is a unicast or multicast forwarding class.


On systems that do not use the ELS CLI, if you are using Junos OS Release 12.2, 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.


On systems that do not use the ELS CLI, if you are using Junos OS Release 12.3 or later, the default configuration is the same as the default configuration for Junos OS Release 12.2, and the default behavior is the same (the fcoe and no-loss forwarding classes receive lossless treatment). However, if you explicitly configure lossless forwarding classes, you can configure up to six lossless forwarding classes by specifying the no-loss option. If you do not specify the no-loss option in an explicit forwarding class configuration, the forwarding class is lossy. For example, if you explicitly configure the fcoe forwarding class and you do not include the no-loss option, the fcoe forwarding class is lossy, not lossless.


class-name—Name of the forwarding class.

queue-number—Output queue number.

  • Range: 0 through 7. Some T Series router PICs are restricted to 0 through 3.

The remaining statements are explained separately. See CLI Explorer for details.

Required Privilege Level

interface—To view this statement in the configuration.interface-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Release 8.1.

No-loss option introduced in Junos OS Release 12.3 for the QFX Series.

PFC-priority statement introduced in Junos OS Release 17.4R1 for the QFX Series.