Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Example: Assigning Forwarding Classes to Output Queues

    This example shows how to assign forwarding classes to output queues.

    Requirements

    Before you begin, determine the MF classifier. See Example: Configuring and Applying a Firewall Filter for a Multifield Classifier.

    Overview

    In this example, you configure class of service and assign best-effort traffic to queue 0 as be-class, expedited forwarding traffic to queue 1 as ef-class, assured forwarding traffic to queue 2 as af-class, and network control traffic to queue 3 as nc-class.

    You must assign the forwarding classes established by the MF classifier to output queues. Table 1 shows how this example assigns output queues.

    Table 1: Sample Output Queue Assignments for mf-classifier Forwarding Queues

    mf-classifier Forwarding Class

    For Traffic Type

    Output Queue

    be-class

    Best-effort traffic

    Queue 0

    ef-class

    Expedited forwarding traffic

    Queue 1

    af-class

    Assured forwarding traffic

    Queue 2

    nc-class

    Network control traffic

    Queue 3

    Configuration

    CLI Quick Configuration

    To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

    set class-of-service forwarding-classes queue 0 be-classset class-of-service forwarding-classes queue 1 ef-class set class-of-service forwarding-classes queue 2 af-class set class-of-service forwarding-classes queue 3 nc-class

    Step-by-Step Procedure

    The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide PDF Document.

    To assign forwarding classes to output queues:

    1. Configure class of service.
      [edit]user@host# edit class-of-service forwarding-classes
    2. Assign best-effort traffic to queue 0.
      [edit class-of-service forwarding-classes]user@host# set queue 0 be-class
    3. Assign expedited forwarding traffic to queue 1.
      [edit class-of-service forwarding-classes]user@host# set queue 1 ef-class
    4. Assign assured forwarding traffic to queue 2.
      [edit class-of-service forwarding-classes]user@host# set queue 2 af-class
    5. Assign network control traffic to queue 3.
      [edit class-of-service forwarding-classes]user@host# set queue 3 nc-class

    Results

    From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

    [edit]user@host# show class-of-serviceforwarding-classes {queue 0 be-class;queue 1 ef-class;queue 2 af-class;queue 3 nc-class;}

    If you are done configuring the device, enter commit from configuration mode.

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

    Verification

    Confirm that the configuration is working properly.

    Verifying Forwarding Classes Are Assigned to Output Queues

    Purpose

    Verify that the forwarding classes are properly assigned to output queues.

    Action

    From configuration mode, enter the show class-of-service command.

    Published: 2012-06-29