Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Example: Reducing Jitter in Hierarchical CoS Queues

date_range 29-Nov-23

This example shows how to reduce jitter in the output queues for VLAN ports hosted on a hierarchical queuing MPC.

Requirements

This example uses the following Juniper Networks hardware and Junos OS software:

  • MX960 router in an IPv4 network and running Junos OS Release 13.2 or later.

  • Available Gigabit Ethernet port hosted on FPC slot 2, PIC slot 0, port 0.

  • Available Gigabit Ethernet port hosted on port 0 of a Gigabit Ethernet Modular Interface Card (MIC) in PIC slot 0 of an MPC2 Q Modular Port Concentrator (MPC) in FPC slot 5.

Before you begin configuring this example, make sure that the maximum number of queues allowed for the hierarchical queuing MPC in slot 5 has not yet been configured. When you enter the show chassis fpc 5 command from configuration mode, the max-queues statement should not display.

Overview

In this example you configure hierarchical scheduling on a VLAN port hosted on a hierarchical queuing MPC. To reduce jitter in the queues for all egress ports hosted on the MPC, reduce the maximum number of queues allowed for MPC.

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.

content_copy zoom_out_map
set interfaces xe-2/0/0 per-unit-scheduler
set interfaces xe-2/0/0 flexible-vlan-tagging
set interfaces xe-2/0/0 unit 0 vlan-id 1
set interfaces xe-2/0/0 unit 0 family inet address 10.1.1.1/24
set interfaces xe-2/0/0 unit * classifiers ieee-802.1 ieee_jitter
set interfaces xe-5/0/0 per-unit-scheduler
set interfaces xe-5/0/0 flexible-vlan-tagging
set interfaces xe-5/0/0 unit 0 vlan-id 1
set interfaces xe-5/0/0 unit 0 family inet address 10.2.1.1/24
set class-of-service-interfaces xe-5/0/0 unit * output-traffic-control-profile tcp
set class-of-service forwarding-classes queue 0 be
set class-of-service forwarding-classes queue 1 ef
set class-of-service forwarding-classes queue 2 af
set class-of-service forwarding-classes queue 3 nc
set class-of-service schedulers be_sch priority low
set class-of-service schedulers ef_sch priority low
set class-of-service schedulers af_sch priority strict-high
set class-of-service schedulers nc_sch priority low
set class-of-service classifiers ieee_jitter forwarding-class be loss-priority low code-points 000
set class-of-service classifiers ieee_jitter forwarding-class ef loss-priority low code-points 001
set class-of-service classifiers ieee_jitter forwarding-class af loss-priority low code-points 010
set class-of-service classifiers ieee_jitter forwarding-class nc loss-priority low code-points 011
set class-of-service scheduler-maps smap_jitter forwarding-class be scheduler be_sch
set class-of-service scheduler-maps smap_jitter forwarding-class ef scheduler ef_sch
set class-of-service scheduler-maps smap_jitter forwarding-class af scheduler af_sch
set class-of-service scheduler-maps smap_jitter forwarding-class nc scheduler nc_sch
set class-of-service traffic-control-profiles tcp  scheduler-map smap_jitter
set class-of-service traffic-control-profiles tcp  shaping-rate 6g

Baseline Configuration

Step-by-Step Procedure

Configure hierarchical scheduling at xe-5.0.0.

  1. To configure the VLAN 1 input and output at xe-2/0/0.0 and xe-5/0/0.0:

    content_copy zoom_out_map
    [edit]
    user@host# set interfaces xe-2/0/0 per-unit-scheduler
    user@host# set interfaces xe-2/0/0 flexible-vlan-tagging
    user@host# set interfaces xe-2/0/0 unit 0 vlan-id 1
    user@host# set interfaces xe-2/0/0 unit 0 family inet address 10.1.1.1/24
     
    user@host# set interfaces xe-5/0/0 per-unit-scheduler
    user@host# set interfaces xe-5/0/0 flexible-vlan-tagging
    user@host# set interfaces xe-5/0/0 unit 0 vlan-id 1
    user@host# set interfaces xe-5/0/0 unit 0 family inet address 10.2.1.1/24
    
  2. Map each of four queues to a forwarding class.

    content_copy zoom_out_map
    [edit]
    user@host# set class-of-service forwarding-classes queue 0 be
    user@host# set class-of-service forwarding-classes queue 1 ef
    user@host# set class-of-service forwarding-classes queue 2 af
    user@host# set class-of-service forwarding-classes queue 3 nc
    
  3. Assign a packet-scheduling priority value to each forwarding class.

    content_copy zoom_out_map
    [edit]
    user@host# set class-of-service schedulers be_sch priority low
    user@host# set class-of-service schedulers ef_sch priority low
    user@host# set class-of-service schedulers af_sch priority strict-high
    user@host# set class-of-service schedulers ef_sch priority low
    
  4. Customize the default IEEE 802.1p classifier (BA classifier based on Layer 2 header) by defining different values for iEEE 802.1p code points.

    content_copy zoom_out_map
    [edit]
    user@host# set class-of-service classifiers ieee_jitter forwarding-class be loss-priority low code-points 000
    user@host# set class-of-service classifiers ieee_jitter forwarding-class ef loss-priority low code-points 001
    user@host# set class-of-service classifiers ieee_jitter forwarding-class af loss-priority low code-points 010
    user@host# set class-of-service classifiers ieee_jitter forwarding-class nc loss-priority low code-points 011
    
  5. Apply the BA classifier to the input of the logical units on xe-2/0/0.

    content_copy zoom_out_map
    [edit]
    user@host# set interfaces xe-2/0/0 unit * classifiers ieee-802.1 ieee_jitter
    
  6. Configure the scheduler map smap_jitter to map the forwarding classes to the schedulers.

    content_copy zoom_out_map
    [edit]
    user@host# set class-of-service scheduler-maps smap_jitter forwarding-class be scheduler be_sch
    user@host# set class-of-service scheduler-maps smap_jitter forwarding-class ef scheduler ef_sch
    user@host# set class-of-service scheduler-maps smap_jitter forwarding-class af scheduler af_sch
    user@host# set class-of-service scheduler-maps smap_jitter forwarding-class nc scheduler nc_sch
    
  7. Configure the traffic control profile tcp to combine the scheduler map smap_jitter (that maps the forwarding classes to the schedulers for port-based scheduling) with a shaping rate (for hierarchical scheduling).

    content_copy zoom_out_map
    [edit]
    user@host# set class-of-service traffic-control-profiles tcp scheduler-map smap_jitter
    user@host# set class-of-service traffic-control-profiles tcp shaping-rate 6g
    
  8. Apply the traffic control profile to the router output at xe-5/0/0.

    content_copy zoom_out_map
    [edit]
    user@host# set class-of-service-interfaces xe-5/0/0 unit * output-traffic-control-profile tcp
    
  9. If you are done configuring the device, commit the configuration.

    content_copy zoom_out_map
    [edit]
    user@host# commit
    

Results

Confirm your configuration by entering show interfaces and show cloass-of-service commands from configuration mode. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

content_copy zoom_out_map
[edit]
user@host# show interfaces
xe-2/0/0 {
    per-unit-scheduler;
    flexible-vlan-tagging;
    unit 0 {
        vlan-id 1;
        family inet {
            address 10.1.1.1/24;
        }
    }
}
xe-5/0/0 {
    per-unit-scheduler;
    flexible-vlan-tagging;
    unit 0 {
        vlan-id 1;
        family inet {
            address 10.2.1.1/24;
        }
    }
}
content_copy zoom_out_map
[edit]
user@host# show class-of-service
classifiers {
    ieee-802.1 ieee_jitter {
        forwarding-class be {
            loss-priority low code-points 000;
        }
        forwarding-class ef {
            loss-priority low code-points 001;
        }
        forwarding-class af {
            loss-priority low code-points 010;
        }
        forwarding-class nc {
            loss-priority low code-points 011;
        }
    }
}
forwarding-classes {
    queue 0 be;
    queue 1 ef;
    queue 2 af;
    queue 3 nc;
}
traffic-control-profiles {
    tcp {
        scheduler-map smap_jitter;
        shaping-rate 6g;
    }
}
interfaces {
    xe-2/0/0 {
        unit * {
            classifiers {
                ieee-802.1 ieee_jitter;
            }
        }
    }
    xe-5/0/0 {
        unit * {
            output-traffic-control-profile tcp;
        }
    }
}
scheduler-maps {
    smap_jitter {
        forwarding-class be scheduler be_sch;
        forwarding-class ef scheduler ef_sch;
        forwarding-class af scheduler af_sch;
        forwarding-class nc scheduler nc_sch;
    }
}
schedulers {
    be_sch {
        priority low;
    }
    ef_sch {
        priority low;
    }
    af_sch {
        priority strict-high;
    }
    nc_sch {
        priority low;
    }
}

Verification

Confirm that the configuration is working properly

Measuring End-to-End Jitter to Establish the Baseline

Purpose

Establish a baseline measurement by noting the amount of jitter that occurs when the hierarchical queuing line card hosting the egress port is configured with the default maximum number of queues.

Action

To measure jitter:

  1. Pass traffic through the VLAN.

  2. Measure the variation in packet delay for selected packets in the data flow.

Configuring Jitter Reduction

Purpose

Reduce jitter in the VLAN port output queues.

Action
  1. Configure a reduced maximum number of queues for egress ports on the hierarchical queuing MPC in slot 5, thereby reducing the jitter in the port queues.

    content_copy zoom_out_map
    [edit]
    user@host# set chassis fpc 5 max-queue 64k
    
  2. If you are done configuring the device, commit the configuration.

    content_copy zoom_out_map
    [edit]
    user@host# commit
    

Measuring End-to-End Jitter to Verify Jitter Reduction

Purpose

Measure the amount of jitter that occurs when the hierarchical queuing line card hosting the egress port is configured with a reduced maximum number of queues.

Action

To measure jitter:

  1. Pass traffic through the VLAN.

  2. Measure the variation in packet delay for selected packets in the data flow.

footer-navigation