Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Example: Configuring Forwarding Classes

 

Forwarding classes group packets for transmission. Forwarding classes map to output queues, so the packets assigned to a forwarding class use the output queue mapped to that forwarding class. Except on QFX10000, unicast traffic and multidestination (multicast, broadcast, and destination lookup fail) traffic use separate forwarding classes and output queues.

Requirements

This example uses the following hardware and software components for two configuration examples:

Configuring forwarding classes for switches except QFX10000

  • One switch except QFX10000 (this example was tested on a Juniper Networks QFX3500 Switch)

  • Junos OS Release 11.1 or later for the QFX Series or Junos OS Release 14.1X53-D20 or later for the OCX Series

Configuring forwarding classes for QFX10000 switches

  • One QFX10000 switch

  • Junos OS Release 15.1X53-D10 or later for the QFX Series

Overview

The QFX10000 switch supports eight forwarding classes. Other switches support up to 12 forwarding classes. To forward traffic, you must map (assign) the forwarding classes to output queues. On the QFX10000 switch, queues 0 through 7 are for both unicast and multidestination traffic. On other switches, queues 0 through 7 are for unicast traffic, and queues 8 through 9 (QFX5200 switch) or 8 through 11 (other switches) are for multidestination traffic. Except for OCX Series switches, switches support up to six lossless forwarding classes. (OCX Series switches do not support lossless Layer 2 transport.)

The switch provides four default forwarding classes, and except on QFX10000 switches, these four forwarding classes are unicast, plus one default multidestination forwarding class. You can define the remaining forwarding classes and configure them as unicast or multidestination forwarding classes by mapping them to unicast or multidestination queues. The type of queue, unicast or multidestination, determines the type of forwarding class.

The four default forwarding classes (unicast except on QFX10000) are:

  • be—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)

  • nc—Network control traffic

Except on QFX10000 switches, the default multidestination forwarding class is:

  • mcast—Multidestination traffic

Map forwarding classes to queues using the class statement. You can map more than one forwarding class to a single queue, but all forwarding classes mapped to a particular queue must be of the same type:

  • Except on QFX10000 switches, all forwarding classes mapped to a particular queue must be either unicast or multicast. You cannot mix unicast and multicast forwarding classes on the same queue.

  • On QFX10000 switches, all forwarding classes mapped to a particular queue must have the same packet drop attribute: all of the forwarding classes must be lossy, or all of the forwarding classes mapped to a queue must be lossless.

[edit class-of-service forwarding-classes]

user@switch# set class class-name queue-num queue-number;
Note

On switches that do not run ELS software, 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.

In Junos OS Release 12.3 and later, you can include the no-loss packet drop attribute in explicit forwarding class configurations to configure a lossless forwarding class.

Note

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:

[edit class-of-service forwarding-classes]

user@switch# set queue queue-number class-name

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.

Note

Hierarchical scheduling controls output queue forwarding. When you define a forwarding class and classify traffic into it, you must also define a scheduling policy for the forwarding class. Defining a scheduling policy means:

  • Mapping a scheduler to the forwarding class in a scheduler map

  • Including the forwarding class in a forwarding class set

  • Associating the scheduler map with a traffic control profile

  • Attaching the traffic control profile to a forwarding class set and applying the traffic control profile to an interface

On QFX10000 switches, you can define a scheduling policy using port scheduling:

  • Mapping a scheduler to the forwarding class in a scheduler map.

  • Applying the scheduler map to one or more interfaces.

Example 1: Configuring Forwarding Classes for Switches Except QFX10000

Configuration

Step-by-Step Procedure

Table 1 shows the configuration forwarding-class-to-queue mapping for this example:

Table 1: Forwarding-Class-to-Queue Example Configuration Except on QFX10000

Forwarding Class

Queue

best-effort

0

nc

7

mcast

8

To configure CoS forwarding classes for switches except QFX10000:

  1. Map the best-effort forwarding class to queue 0:
    [edit class-of-service forwarding-classes]

    user@switch# set class best-effort queue-num 0



  2. Map the nc forwarding class to queue 7:
    [edit class-of-service forwarding-classes]

    user@switch# set class nc queue-num 7



  3. Map the mcast-be forwarding class to queue 8:
    [edit class-of-service forwarding-classes]

    user@switch# set class mcast-be queue-num 8



Verification

Verifying the Forwarding-Class-to-Queue Mapping

Purpose

Verify the forwarding-class-to-queue mapping. (The system shows only the explicitly configured forwarding classes; it does not show default forwarding classes such as fcoe and no-loss.)

Action

Verify the results of the forwarding class configuration using the operational mode command show configuration class-of-service forwarding-classes:

user@switch> show configuration class-of-service forwarding-classes

Example 2: Configuring Forwarding Classes for QFX10000 Switches

Configuration

Step-by-Step Procedure

Table 2 shows the configuration forwarding-class-to-queue mapping for this example:

Table 2: Forwarding-Class-to-Queue Example Configuration on QFX10000

Forwarding Class

Queue

best-effort

0

be1

1

nc

7

To configure CoS forwarding classes for QFX10000 switches:

  1. Map the best-effort forwarding class to queue 0:
    [edit class-of-service forwarding-classes]

    user@switch# set class best-effort queue-num 0



  2. Map the be1 forwarding class to queue 1:
    [edit class-of-service forwarding-classes]

    user@switch# set class be1 queue-num 1



  3. Map the nc forwarding class to queue 7:
    [edit class-of-service forwarding-classes]

    user@switch# set class nc queue-num 7



Verification

Verifying the Forwarding-Class-to-Queue Mapping

Purpose

Verify the forwarding-class-to-queue mapping. (The system shows only the explicitly configured forwarding classes; it does not show default forwarding classes such as fcoe and no-loss.)

Action

Verify the results of the forwarding class configuration using the operational mode command show configuration class-of-service forwarding-classes:

user@switch> show configuration class-of-service forwarding-classes