Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring Forwarding Classes

Forwarding classes allow you to group packets for transmission. You assign packets to unicast or multidestination (multicast, broadcast, and destination lookup fail) output queues based on forwarding classes.

Requirements

This example uses the following hardware and software components:

  • One Juniper Networks QFX3500 Switch
  • Junos OS Release 11.1 or later for the QFX Series

Overview

The switch supports a total of 12 forwarding classes. In order to forward traffic, you must map (assign) the forwarding classes to unicast or multidestination output queues. The switch has 12 queues. Queues 0 through 7 are for unicast traffic, and queues 8 through 11 are for multidestination traffic. The switch supports up to two lossless forwarding classes.

By default, four categories of unicast forwarding classes and one multidestination forwarding class are defined. You can define the remaining seven forwarding classes and configure them as unicast or multidestination by mapping them to unicast or multidestination queues. The type of queue, unicast or multidestination, determines the type of forwarding class.

The four default unicast forwarding classes are:

  • be—Best-effort traffic
  • fcoe—Guaranteed delivery for Fibre Channel over Ethernet traffic
  • no-loss—Guaranteed delivery for TCP no-loss traffic
  • nc—Network control traffic

The default multidestination forwarding class is:

  • mcast—Multidestination traffic

Map forwarding classes to queues using the class statement, which enables you to configure up to 12 forwarding classes. 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, either unicast or multicast. You cannot mix unicast and multicast forwarding classes on the same queue. The statement format is:

[edit class-of-service forwarding-classes]
user@switch# class class-name queue-num queue-number;

Note: 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: 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# 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 that will carry traffic on the switch (the behavior aggregate classifier has a forwarding class and you expect traffic for the forwarding class), 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 an interface

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

Table 1: Forwarding-Class-to-Queue Example Configuration

Forwarding Class

Queue

best-effort

0

nc

7

mcast

8

Configuring Forwarding Classes

To configure CoS forwarding classes, map the forwarding classes to queues:

  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
class best-effort queue-num 0;
class network-control queue-num 7;
class mcast queue-num 8;

Published: 2014-07-23