Print Download PDF Send Feedback

Previous

Next

QoS Configuration

All user interactions with the QoS module are performed with the cpqos command.

The cpqos Command

The cpoqs command lets you manage the network Quality of Service on VSX Gateway.

To show QoS statistics:

cpqos stats [-u]

Parameter

Description

-u

Shows statistics for each CPU.

This command prints a line of statistics for each of the defined classes. Each line includes the following data columns:

Column

Value

rx

Number of bytes that arrived to this class since the last time statistics were presented

tx

Number of bytes that were transmitted from this class since the last time statistics were presented

drops

Number of bytes that were dropped from this class since the last time statistics were presented

Notes:

To show the QoS policy status:

cpqos status

To install the previously created QoS policy:

cpqos install

Note - This command also validates the overall integrity of the QoS policy. Once installed, the QoS policy remains installed even after the machine reboots.

To uninstall the previously installed QoS policy:

cpqos uninstall

Note - Once uninstalled, the QoS policy remains uninstalled even after the machine reboots.

To show the DiffServ classes defined in the QoS policy:

cpqos class show [-b]

Parameter

Description

-b

Shows DSCP values in 8 bits binary numbers.

To add new DiffServ class with specified name:

cpqos class add <class_name> prio <priority_value> type {llq | reg} [weight <weight_value>] dscp {default | <value[,value2[,value3...]]>}

Parameter

Description

add <class_name>

Unique class name.

prio <priority_value>

Priority value between 1-15. The lower the value, the higher the priority.

type {llq | reg}

Class Type:

  • llq - low-latency
  • reg - regular (weighted classes)

weight <weight_value>

This parameter is used only for classes of type reg. It determines the relative portion of the resources that the class will receive in relation to other weighted classes. Valid values are between 0 and 1000.

dscp {default | <value[,value2[,value3...]]}

The DiffServ code-points assigned to the class. Multiple DSCPs can be specified, separated by commas, with no spaces between values.

Valid values are:

  • default
  • decimal numbers (not binary format) between 0 to 63

Notes:

  • There can be only one class with a "default" DSCP. The default class is used for traffic without DiffServ marking (for example, tos=0), or traffic with DSCP values that are not assigned to any other class.
  • If no class is used as "default", all 64 DSCP values must be assigned to the classes.
  • A DSCP value cannot be assigned to more than one class.

To delete a specified DiffServ class name:

cpqos class del <class_name>

Note - Changes to the QoS policy will be are enforced only after the QoS policy is installed.

Notes:

cpqos class add

This command adds a class with the following arguments:

Argument

Value

name

Unique name for the class

priority

Value between 1 and 15. A low value indicates a higher priority

type

"llq" for low-latency classes or "reg" for regular, weighted classes

weight

This value is used only for classes of type "reg". It determines the relative portion of the resources that the class will receive in relation to other weighted classes. Valid values are between 0 and 1000.

dscp

The DiffServ code-points assigned to the class. Multiple DSCP's can be specified, separated by commas, with no spaces between values.

Values are in decimal (not binary format) with values from 0 to 63 or "default". There can be only one class with a "default" DSCP.

The default class is used for traffic without DiffServ marking (e.g. tos=0) or traffic with DSCP values that are not assigned to any other class. If no class is used as "default", all 64 DSCP values must be assigned to the classes. A DSCP value cannot be assigned to more than one class.

Note - Changes to the policy with cpqos class add are enforced only after the policy is installed.

cpqos class del

This command deletes the class of the specified name. Changes to the policy with cpqos class del are enforced only after the policy is installed.

cpqos class show

This command shows the classes defined in the QoS policy.

cpqos install

This command installs the previously created QoS policy. It also validates the overall integrity of the policy. Once installed, the policy remains installed even if the machine reboots.

cpqos uninstall

This command un-installs the previously installed QoS policy. If un-installed, the policy will not be installed again when the machine boots.

cpqos stats

This command shows QoS statistics. cpqos stats prints a line of statistics for each of the defined classes. Each line includes the following data columns:

Column

Value

rx

Number of bytes that arrived to this class since the last time statistics were presented

tx

Number of bytes that were transmitted from this class since the last time statistics were presented

drops

Number of bytes that were dropped from this class since the last time statistics were presented

Note:

QoS Policy File

The QoS policy file is $FWDIR/database/qos_policy.C. The QoS policy file is created when the cpqos command is run for the first time.

Important - The QoS policy file should not be edited manually.

Use the cpqos class add/del commands to create entries. To maintain multiple QoS policies, rename the qos_policy.C file or copy it to another directory, and copy it back as $FWDIR/database/qos_policy.C when the policy needs to be enforced.

QoS Default Configuration

Default QoS configuration is set to "uninstall" (for example, not enforced).

Run the cpqos install or cpqos uninstall command to set the desired default configuration after boot.

Sample Differentiated Services Implementation

This section presents a sample differentiated services implementation. It includes examples for configuration, monitoring and statistics.

Sample Traffic Types

Traffic Type

Meaning...

Diamond

Real-time traffic (e.g. VOIP) which requires little bandwidth and is sensitive to latency and drops. This traffic is usually assigned to the EF (Expedited-Forwarding) PHB (Per Hop Behavior).

Platinum

Real-time traffic with low bandwidth requirements that is less sensitive to latency and drops than Diamond.

Gold

Traffic which is sensitive to drops

Silver

Traffic which is less sensitive to drops than Gold.

Bronze

Various types of traffic which require resource allocation. This traffic is usually assigned to the Best-Effort PHB.

Copper

High-volume traffic with a tendency to consume bandwidth

Configuration Guidelines

Your QoS policy should apply these guidelines:

Configuration Examples

This example of the cpqos class add command creates classes for traffic of various types:

cpqos class add Diamond type llq prio 1 dscp 46
cpqos class add Platinum type llq prio 2 dscp 32
cpqos class add Gold type reg prio 3 weight 100 dscp 26
cpqos class add Silver type reg prio 4 weight 100 dscp 28
cpqos class add Bronze type reg prio 5 weight 200 dscp default
cpqos class add Copper type reg prio 15 weight 50 dscp 10,12,14

Monitoring example shows previously defined classes:

[Expert@cpmodule:0]# cpqos class show
class: Diamond
priority: 1
type: llq
weight: 0
DSCPs: 46

class: Platinum
priority: 2
type: llq
weight: 0
DSCPs: 32

class: Gold
priority: 3
type: reg
weight: 100
DSCPs: 26

class: Silver
priority: 4
type: llq
weight: 100
DSCPs: 28

class: Bronze
priority: 5
type: llq
weight: 200
DSCPs: default

class: Copper
priority: 15
type: reg
weight: 50
DSCPs: 10,12,14

Statistics example shows statistics for the previously defined classes:

class   priority type     weight     rx         tx        drops

Diamond   1       llq      0         2775        2650      0

Platinum  2       llq      0         1024        1020      105

Gold      3       reg      100       1775015     1773805   205

Silver    4       reg      100       1862437     1862336   550

Bronze    5       reg      200       3370033     2955120   3147

Copper    15      reg      50        1862437     762336    100689

From this statistical output, it is apparent that: