Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Supported Platforms

Example: Reducing Jitter in Hierarchical CoS Queues

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.

set interfaces xe-2/0/0 per-unit-schedulerset interfaces xe-2/0/0 flexible-vlan-taggingset interfaces xe-2/0/0 unit 0 vlan-id 1set interfaces xe-2/0/0 unit 0 family inet address 1.1.1.1/24set interfaces xe-2/0/0 unit * classifiers ieee-802.1 ieee_jitterset interfaces xe-5/0/0 per-unit-schedulerset interfaces xe-5/0/0 flexible-vlan-taggingset interfaces xe-5/0/0 unit 0 vlan-id 1set interfaces xe-5/0/0 unit 0 family inet address 2.1.1.1/24set class-of-service-interfaces xe-5/0/0 unit * output-traffic-control-profile tcpset class-of-service forwarding-classes queue 0 beset class-of-service forwarding-classes queue 1 efset class-of-service forwarding-classes queue 2 afset class-of-service forwarding-classes queue 3 ncset class-of-service schedulers be_sch priority lowset class-of-service schedulers ef_sch priority lowset class-of-service schedulers af_sch priority strict-highset class-of-service schedulers nc_sch priority lowset class-of-service classifiers ieee_jitter forwarding-class be loss-priority low code-points 000set class-of-service classifiers ieee_jitter forwarding-class ef loss-priority low code-points 001set class-of-service classifiers ieee_jitter forwarding-class af loss-priority low code-points 010set class-of-service classifiers ieee_jitter forwarding-class nc loss-priority low code-points 011set class-of-service scheduler-maps smap_jitter forwarding-class be scheduler be_schset class-of-service scheduler-maps smap_jitter forwarding-class ef scheduler ef_schset class-of-service scheduler-maps smap_jitter forwarding-class af scheduler af_schset class-of-service scheduler-maps smap_jitter forwarding-class nc scheduler nc_schset class-of-service traffic-control-profiles tcp scheduler-map smap_jitterset 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:

    [edit]user@host# set interfaces xe-2/0/0 per-unit-scheduleruser@host# set interfaces xe-2/0/0 flexible-vlan-tagginguser@host# set interfaces xe-2/0/0 unit 0 vlan-id 1user@host# set interfaces xe-2/0/0 unit 0 family inet address 1.1.1.1/24 user@host# set interfaces xe-5/0/0 per-unit-scheduleruser@host# set interfaces xe-5/0/0 flexible-vlan-tagginguser@host# set interfaces xe-5/0/0 unit 0 vlan-id 1user@host# set interfaces xe-5/0/0 unit 0 family inet address 2.1.1.1/24
  2. Map each of four queues to a forwarding class.

    [edit]user@host# set class-of-service forwarding-classes queue 0 beuser@host# set class-of-service forwarding-classes queue 1 efuser@host# set class-of-service forwarding-classes queue 2 afuser@host# set class-of-service forwarding-classes queue 3 nc
  3. Assign a packet-scheduling priority value to each forwarding class.

    [edit]user@host# set class-of-service schedulers be_sch priority lowuser@host# set class-of-service schedulers ef_sch priority lowuser@host# set class-of-service schedulers af_sch priority strict-highuser@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.

    [edit]user@host# set class-of-service classifiers ieee_jitter forwarding-class be loss-priority low code-points 000user@host# set class-of-service classifiers ieee_jitter forwarding-class ef loss-priority low code-points 001user@host# set class-of-service classifiers ieee_jitter forwarding-class af loss-priority low code-points 010user@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.

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

    [edit]user@host# set class-of-service scheduler-maps smap_jitter forwarding-class be scheduler be_schuser@host# set class-of-service scheduler-maps smap_jitter forwarding-class ef scheduler ef_schuser@host# set class-of-service scheduler-maps smap_jitter forwarding-class af scheduler af_schuser@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).

    [edit]user@host# set class-of-service traffic-control-profiles tcp scheduler-map smap_jitteruser@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.

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

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

[edit]user@host# show interfaces
xe-2/0/0 {per-unit-scheduler;flexible-vlan-tagging;unit 0 {vlan-id 1;family inet {address 1.1.1.1/24;}}}
xe-5/0/0 {per-unit-scheduler;flexible-vlan-tagging;unit 0 {vlan-id 1;family inet {address 2.1.1.1/24;}}}
[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.

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

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

Published: 2013-07-31

Supported Platforms

Published: 2013-07-31