Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Configuring a Custom Forwarding Class for Each Queue

By default, four queues are assigned to four default forwarding classes, each with a queue number, name, and abbreviation.

Best Practice:

CoS configurations can be quite complicated, so unless it is required by your scenario, we recommend that you not alter the default class names or queue number associations.

If your network requires more than the four default forwarding classes, you can use the following procedure to create custom forwarding class names and assign each forwarding class to any queue number by including the forwarding-classes statement at the [edit class-of-service] hierarchy level.

The class and queue statements at the [edit class-of-service forwarding-classes] hierarchy level are mutually exclusive. If you want to configure one-to-one mapping of forwarding classes to output queues for up to eight forwarding classes, use the queue statement at the [edit class-of-service forwarding-classes] hierarchy level. If you want to configure up to 16 forwarding classes with multiple forwarding classes mapped to single output queues (see Configuring Up to 16 Custom Forwarding Classes), include the class statement at the [edit class-of-service forwarding-classes] hierarchy level.

You cannot commit a configuration that assigns the same forwarding class to two different queues.


We do not recommend classifying packets into a forwarding class that has no associated scheduler on the egress interface. Such a configuration can cause unnecessary packet drops because an unconfigured scheduling class might lack adequate buffer space. For example, if you configure a custom scheduler map that does not define queue 0, and the default classifier assigns incoming packets to the best-effort class (queue 0), the unconfigured egress queue for the best-effort forwarding class might not have enough space to accommodate even short packet bursts.

A default congestion and transmission control mechanism is used when an output interface is not configured for a certain forwarding class, but receives packets destined for that unconfigured forwarding class. This default mechanism uses the delay buffer and weighted round robin (WRR) credit allocated to the designated forwarding class, with a default drop profile. Because the buffer and WRR credit allocation is minimal, packets might be lost if a larger number of packets are forwarded without configuring the forwarding class for the interface.


When you define a forwarding class for the same queue as one of the default forwarding classes, the default forwarding class is automatically removed. For example, if you define class be for queue 0, which is the queue for the default best-effort forwarding class, the best-effort class is removed.

If you define more than one forwarding class for a given queue number and use the name of a default forwarding class for one of the new classes, the new class with the default name is deleted.

To create custom forwarding class names and assign each forwarding class to any queue number:

  1. Access the CoS forwarding class configuration hierarchy.
  2. Specify the forwarding class name and queue number.