11. Port scheduler policies

This chapter provides information to configure port scheduler policies using the command line interface.

11.1. Configuring port scheduler policies

The port-scheduler-policy command creates a port scheduler template which may be assigned to an egress port. Only one port scheduler policy is allowed per port. There is a “default” port-scheduler policy (which services the queues of the port in a Strict order) associated with each port. To change the behavior, users can associate the port with another port-scheduler policy. The policy contains mode commands to set the mode of scheduling (RR, Strict, WRR, WDRR) and queue commands to set the weight of the queue (only 8 queues per port and queue settings only for WRR/WDRR modes). In WRR/WDRR, a strict option treats that particular queue as a strict queue, this leads to a hybrid mode of scheduling (WRR+Strict, WDRR+Strict).

11.2. Basic configurations

A basic QoS port scheduler policy must conform to the following:

  1. Each QoS port scheduler policy must have a unique policy name.

11.2.1. Creating a QoS port scheduler policy

To create a port scheduler policy, define the following:

  1. a port scheduler policy name
  2. include a description - the description provides a brief overview of policy features

Use the following syntax to create a QoS port scheduler policy.

Note that the create keyword is included in the command syntax upon creation of a policy.

A port scheduler policy cannot be deleted unless it is removed from all ports where it is applied. The “default” port-scheduler policy cannot be deleted.

CLI Syntax:
config>qos
port-scheduler-policy port-scheduler-name [create]
description description-string
mode {strict | rr | wrr | wdrr}
queue queue-id [strict | weight weight]

The following is a sample port scheduler policy configuration output.

*A:card-1>config>qos>port-sched-plcy# info
----------------------------------------------
            mode WRR
            queue 1 weight 1
            queue 2 weight 3
            queue 3 weight 5
            queue 5 weight 5
            queue 6 weight 1
----------------------------------------------
*A:card-1>config>qos>port-sched-plcy#

11.3. Service management tasks

This section describes the service management tasks.

11.3.1. Copying and overwriting port scheduler policies

You can copy an existing QoS policy, rename it with a new QoS policy value, or overwrite an existing policy. The overwrite option must be specified or an error occurs if the destination policy exists.

CLI Syntax:
config>qos> copy port-scheduler-policy src-name dst-name [overwrite]
Example:
config>qos# copy port-scheduler-policy psp psp1
*A:card-1>config# qos port-scheduler-policy psp create
*A:card-1>config>qos>port-sched-plcy# mode WRR
*A:card-1>config>qos>port-sched-plcy# queue 1 weight 1
*A:card-1>config>qos>port-sched-plcy# queue 2 weight 3
*A:card-1>config>qos>port-sched-plcy# queue 3 weight 5
*A:card-1>config>qos>port-sched-plcy# exit
*A:card-1>config# qos copy port-scheduler-policy psp psp1
*A:card-1>config# qos copy port-scheduler-policy psp psp1
MINOR: CLI Destination "psp1" exists - use {overwrite}.
*A:card-1>config# qos copy port-scheduler-policy psp psp1 overwrite
*A:card-1>config# show qos port-scheduler-policy
===============================================================
Port Scheduler Policies
===============================================================
Policy-Id     Description                           Mode
-------------------------------------------------------------------------------
default       Default Port Scheduler policy.        STRICT
psp                                                 WRR
psp1                                                WRR
===============================================================
*A:card-1>config# 
 
*A:card-1>config# show qos port-scheduler-policy psp
===============================================================
QoS Port Scheduler Policy
===============================================================
Policy-Name : psp
Accounting: packet-based
Mode : WRR
Last changed : 01/01/2000 22:13:01
Queue 1 Weight: 1
Queue 2 Weight: 3
Queue 3 Weight: 5
Queue 4 Weight: strict
Queue 5 Weight: strict
Queue 6 Weight: strict
Queue 7 Weight: strict
Queue 8 Weight: strict
===============================================================
*A:card-1>config# 
*A:card-1>config# show qos port-scheduler-policy psp1
===============================================================
QoS Port Scheduler Policy
===============================================================
Policy-Name : psp1
Accounting: packet-based
Mode : WRR
Last changed : 01/01/2000 22:13:17
Queue 1 Weight: 1
Queue 2 Weight: 3
Queue 3 Weight: 5
Queue 4 Weight: strict
Queue 5 Weight: strict
Queue 6 Weight: strict
Queue 7 Weight: strict
Queue 8 Weight: strict
===============================================================================
*A:card-1>config#
 

11.3.2. Editing QoS policies

You can edit a port-scheduler policy, the modifications are done and it affects the port where it is applied. The “default” port-scheduler policy cannot be modified.

To prevent configuration errors use the copy command to make a duplicate of the original policy to a work area, make the edits, and then overwrite the original policy.