Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring CoS Non-Strict Priority Scheduling

Starting in Junos OS Release 15.1X49-D80 and Junos OS Release 17.3R1, you can configure non-strict priority scheduling to avoid starvation of lower priority queues on SRX300, SRX320, SRX340, SRX345, SRX550M, SRX1500, SRX1600, and vSRX Virtual Firewall 2.0 devices.

This example shows how to assign non-strict priority scheduling to CoS queues.

Requirements

Before you begin, determine the shaping rate, schedulers, and forwarding classes for the CoS traffic. See shaping-rate (CoS Interfaces), Example: Configuring Class-of-Service Schedulers on a Security Device, and Example: Assigning Forwarding Classes to Output Queues.

Overview

Traffic shaping bandwidth allocation is based on the egress (outgoing) interface that the packet traverses. If you have several traffic streams with CoS prioritized, all traffic streams across the network are sent with more bandwidth than the bandwidth on the egress interface. This can sometimes result in higher-priority queues getting all of the bandwidth and lower priority queues not getting any bandwidth, and thus being starved.

This example demonstrates how the non-strict priority feature can resolve the starvation of strict priority scheduling problem. For this scenario, you initialize two traffic streams (50 Mbps each) with CoS classifiers configured. Interface ge-0/0/1 is configured for ingress traffic, and ge-0/0/2 is configured for egress traffic with shaping enabled at 50 million. For traffic stream Q2, you set the queue priority as high and the shaping rate at 10%. For the other traffic stream Q1, you set the queue priority as low and the shaping rate at 10%. See Figure 1.

Figure 1: CoS Traffic with HIgh and Low Priority QueuesCoS Traffic with HIgh and Low Priority Queues
Note:

Since CoS is strict priority scheduling, please keep in mind that higher priority queues can starve lower priority queues.

Configuration

Procedure

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, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from the configuration mode.

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.

To configure non-strict priority scheduling:

  1. Configure shaping rate of 50 Mbps on the egress interface.

  2. Configure classifiers on the ingress interface.

  3. Define the DSCP value to be assigned to the forwarding class.

  4. Define the forwarding class to a queue number.

  5. Map the forwarding classes to a scheduler to control prioritized queueing.

  6. Define the schedulers with priority and transmit rates. The example uses the same ratio for transmit rate but defines different priorities.

  7. Configure the new non-strict-priority-scheduling option.

Results

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

You will notice that the LOW priority queue got some traffic.

Note:

Traffic on the low priority queue is still less than the high priority queue, as the non-priority scheduling option still works to control traffic..

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

Verification

Verifying Non-Strict Priority Configuration

Purpose

Verify that non-strict priority scheduling is configured properly.

Action

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