Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Default Forwarding Classes

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

These default mappings apply to all routers. The four forwarding classes defined by default are shown in Table 1.

If desired, you can rename the forwarding classes associated with the queues supported on your hardware. Assigning a new class name to an output queue does not alter the default classification or scheduling that is applicable to that queue.

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.

Some routers support eight queues. Queues 4 through 7 have no default mappings to forwarding classes. To use queues 4 through 7, you must create custom forwarding class names and map them to the queues.

Table 1: Default Forwarding Classes


Forwarding Class Name


Queue 0

best-effort (be)

The software does not apply any special CoS handling to packets with 000000 in the DiffServ field, a backward compatibility feature. These packets are usually dropped under congested network conditions.

Queue 1

expedited-forwarding (ef)

The software delivers assured bandwidth, low loss, low delay, and low delay variation (jitter) end-to-end for packets in this service class.

Routers accept excess traffic in this class, but in contrast to assured forwarding, out-of-profile expedited-forwarding packets can be forwarded out of sequence or dropped.

Queue 2

assured-forwarding (af)

The software offers a high level of assurance that the packets are delivered as long as the packet flow from the customer stays within a certain service profile that you define.

The software accepts excess traffic, but applies a RED drop profile to determine if the excess packets are dropped and not forwarded.

Depending on router type, up to four drop probabilities (low, medium-low, medium-high, and high) are defined for this service class.

Queue 3

network-control (nc)

The software delivers packets in this service class with a low priority. (These packets are not delay sensitive.)

Typically, these packets represent routing protocol hello or keepalive messages. Because loss of these packets jeopardizes proper network operation, delay is preferable to discard.

The following rules govern queue assignment:

  • If classifiers fail to classify a packet, the packet always receives the default classification to the class associated with queue 0.

  • The number of queues is dependent on the hardware plugged into the chassis. CoS configurations are inherently contingent on the number of queues on the system. Only two classes, best-effort and network-control, are referenced in the default configuration. The default configuration works on all routers.

  • CoS configurations that specify more queues than the router can support are not accepted. The commit fails with a detailed message that states the total number of queues available.

  • All default CoS configuration is based on queue number. The name of the forwarding class that shows up when the default configuration is displayed is the forwarding class currently associated with that queue.

This is the default configuration for the forwarding-classes statement:

If you reassign the forwarding-class names, the best-effort forwarding-class name appears in the locations in the configuration previously occupied by network-control as follows:

All the default rules of classification and scheduling that applied to Queue 3 still apply. Queue 3 is simply now renamed best-effort.

On Juniper Networks M320 Multiservice Edge Routers, MX Series 5G Universal Routing Platforms, and T Series Core Routers, you can assign multiple forwarding classes to a single queue. If you do so, the first forwarding class that you assign to queue 0 acquires the default BE classification and scheduling. The first forwarding class that you assign to queue 1 acquires the default EF classification and scheduling. The first forwarding class that you assign to queue 2 acquires the default AF classification and scheduling. The first forwarding class that you assign to queue 3 acquires the default NC classification and scheduling. For more information, see Configuring Up to 16 Custom Forwarding Classes.


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.

  • In the current default configuration:

    • Only IP precedence classifiers are associated with interfaces.

    • The only classes designated are best-effort and network-control.

    • Schedulers are not defined for the expedited-forwarding or assured-forwarding forwarding classes.

  • You must explicitly classify packets to the expedited-forwarding or assured-forwarding forwarding class and define schedulers for these classes.

  • For Asynchronous Transfer Mode (ATM) interfaces on Juniper Networks M Series Multiservice Edge Routers, when you use fixed classification with multiple logical interfaces classifying to separate queues, a logical interface without a classifier attached inherits the most recent classifier applied on a different logical interface. For example, suppose you configure traffic through logical unit 0 to be classified into queue 1, and you configure traffic through logical unit 1 to be classified into queue 3. You want traffic through logical unit 2 to be classified into the default classifier, which is queue 0. In this case, traffic through logical unit 2 is classified into queue 3, because the configuration of logical unit 1 was committed last.