Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring Up to 16 Custom Forwarding Classes

By default on all routers, four forwarding classes are mapped to four output queues, as shown in the topic Default Forwarding Classes. On M120 and M320 Multiservice Edge Routers, MX Series 5G Universal Routing Platforms, PTX Series Packet Transport Routers, and T Series Core Routers, you can configure more than four forwarding classes and queues; you can configure up to 16 forwarding classes and eight queues, with multiple forwarding classes assigned to single queues. The concept of assigning multiple forwarding classes to a queue is sometimes referred to as creating forwarding-class aliases.

Note:

You cannot use CoS-based forwarding features if you configure more than eight forwarding classes on the device.

Mapping multiple forwarding classes to single queues is useful. Suppose, for example, that forwarding classes are set based on multifield packet classification, and the multifield classifiers are different for core-facing interfaces and customer-facing interfaces. Suppose you need four queues for a core-facing interface and five queues for a customer-facing interface, where fc0 through fc4 correspond to the classifiers for the customer-facing interface, and fc5 through fc8 correspond to classifiers for the core-facing interface, as shown in Figure 1.

Figure 1: Customer-Facing and Core-Facing Forwarding ClassesCustomer-Facing and Core-Facing Forwarding Classes

In this example, you need nine classifiers and, therefore, nine forwarding classes. The forwarding class-to-queue mapping is shown in Table 1.

Table 1: Sample Forwarding Class-to-Queue Mapping

Forwarding Class Names

Queue Number

fc0

fc5

0

fc1

fc6

1

fc2

fc7

2

fc3

fc8

3

fc4

4

To configure up to 16 forwarding classes, include the class and queue-num statements at the [edit class-of-service forwarding-classes] hierarchy level:

You can configure up 16 different forwarding-class names. The corresponding output queue number can be from 0 through 7. Therefore, you can map multiple forwarding classes to a single queue. If you map multiple forwarding classes to a queue, the multiple forwarding classes must refer to the same scheduler (at the [edit class-of-service scheduler-maps map-name forwarding-class class-name scheduler scheduler-name] hierarchy level).

When you configure up to 16 forwarding classes, you can use them as you can any other forwarding class—in classifiers, schedulers, firewall filters (multifield classifiers), policers, and rewrite rules.

When you configure up to 16 forwarding classes, the following limitations apply:

  • The class and queue statements at the [edit class-of-service forwarding-classes] hierarchy level are mutually exclusive. In other words, you can include one or the other of the following configurations, but not both:

  • When you use CoS-based forwarding features, you cannot configure more than eight forwarding classes with a forwarding policy. However, if you try to configure CoS-based forwarding with more than eight forwarding classes configured, commit fails with a message. Therefore, you can configure CBF on a router with eight or less than eight forwarding classes only. Under this condition, the forwarding class to queue mapping can be either one-to-one or one-to-many.

  • A scheduler map that maps eight different forwarding classes to eight different schedulers can only be applied to interfaces that support eight queues. If you apply this type of scheduler map to an interface that only supports four queues, then the commit fails.

  • We recommend that you configure the statements changing PICs to support eight queues and then applying an eight queue scheduler map in two separate steps. Otherwise, the commit might succeed but the PIC might not have eight queues when the scheduler map is applied, generating an error.

You can determine the ID number assigned to a forwarding class by issuing the show class-of-service forwarding-class command. You can determine whether the classification is fixed by issuing the show class-of-service forwarding-table classifier mapping command. In the command output, if the Table Type field appears as Fixed, the classification is fixed. For more information about fixed classification, see Applying Forwarding Classes to Interfaces.

Enabling Eight Queues on Interfaces

By default, Intelligent Queuing (IQ), Intelligent Queuing 2 (IQ2), Intelligent Queuing Enhanced (IQE), and Intelligent Queuing 2 Enhanced (IQ2E) PICs on M320 and T Series routers are restricted to a maximum of four egress queues per interface. The following procedures describe how to configure a maximum of eight egress queues on these interfaces.

Note:

In addition to configuring eight queues at the [edit chassis] hierarchy level, the configuration at the [edit class-of-service] hierarchy level must support eight queues per interface.

The maximum number of queues per IQ PIC can be 4 or 8. If you include the max-queues-per-interface statement, all ports on the IQ PIC use configured mode and all interfaces on the IQ PIC have the same maximum number of queues.

To configure a maximum of eight egress queues on these PICs:

  1. Specify the PIC you want to configure.
  2. Configure a maximum of eight egress queues on these interfaces.

    The numerical value can be 4 or 8.

This procedure describes how to configure the maximum number of queues the interface supports on a TX Matrix or TX Matrix Plus router.

Note:

In addition to configuring eight queues at the [edit chassis] hierarchy level, the configuration at the [edit class-of-service] hierarchy level must support eight queues per interface.

The maximum number of queues per IQ PIC can be 4 or 8. If you include the max-queues-per-interface statement, all ports on the IQ PIC use configured mode and all interfaces on the IQ PIC have the same maximum number of queues.

  1. To configure a maximum of eight egress queues on these PICs:

  2. Configure a maximum of eight egress queues on these interfaces.

    The numerical value can be 4 or 8.

To determine how many queues an interface supports, you can check the CoS queues output field of the show interfaces interface-name extensive command:

  1. To view how many queues an interface supports:

If you include the max-queues-per-interface 4 statement, you can configure all four ports and configure up to four queues per port.

For 4-port OC3c/STM1 Type I and Type II PICs on M320 and T Series routers, when you include the max-queues-per-interface 8 statement, you can configure up to eight queues on ports 0 and 2. After you commit the configuration, the PIC goes offline and comes back online with only ports 0 and 2 operational. No interfaces can be configured on ports 1 and 3.

For Quad T3 and Quad E3 PICs, when you include the max-queues-per-interface 8 statement, you can configure up to eight queues on ports 0 and 2. After you commit the configuration, the PIC goes offline and comes back online with only ports 0 and 2 operational. No interfaces can be configured on ports 1 and 3.

When you include the max-queues-per-interface statement and commit the configuration, all physical interfaces on the IQ PIC are deleted and re-added. Also, the PIC is taken offline and then brought back online immediately. You do not need to take the PIC offline and online manually. You should change modes between four queues and eight queues only when there is no active traffic going to the IQ PIC.

Assigning Multiple Forwarding Classes and Default Forwarding Classes

For queues 0 through 3, if you assign multiple forwarding classes to a single queue, default forwarding class assignment works as follows:

  • 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.

Of course you can override the default classification and scheduling by configuring custom classifiers and schedulers.

If you do not explicitly map forwarding classes to queues 0 through 3, then the respective default classes are automatically assigned to those queues. When you are counting the 16 forwarding classes, you must include in the total any default forwarding classes automatically assigned to queues 0 through 3. As a result, you can map up to 13 forwarding classes to a single queue when the single queue is queue 0,  1, 2, or 3. You can map up to 12 forwarding classes to a single queue when the single queue is queue 4, 5, 6, or 7. In summary, there must be at least one forwarding class each (default or otherwise) assigned to queue 0 through 3, and you can assign the remaining 12 forwarding classes (16–4) to any queue.

For example, suppose you assign two forwarding classes to queue 0 and you assign no forwarding classes to queues 1 through 3. The software automatically assigns one default forwarding class each to queues 1 through 3. This means 11 forwarding classes (16–5) are available for you to assign to queues 4 through 7.

For more information about forwarding class defaults, see Default Forwarding Classes.

Examples: Configuring Up to 16 Forwarding Classes

To configure 16 forwarding classes, map two forwarding classes to each queue. For example:

Specify each forwarding class and queue you want mapped.

For PICs restricted to four queues, map four forwarding classes to each queue:

  1. Specify each forwarding class and queue you want mapped.

If you map multiple forwarding classes to a queue, the multiple forwarding classes must refer to the same scheduler. To configure a scheduler map applicable to an interface restricted to four queues:

  1. Specify a scheduler map name and associate it with the scheduler configuration and forwarding class.

  2. Map the forwarding classes to the restricted queues.