All user interactions with the QoS module are performed with 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 |
|
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 |
---|---|
|
Number of bytes that arrived to this class since the last time statistics were presented |
|
Number of bytes that were transmitted from this class since the last time statistics were presented |
|
Number of bytes that were dropped from this class since the last time statistics were presented |
Notes:
watch
command to periodically present these statisticsTo 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:
|
weight <weight_value> |
This parameter is used only for classes of type |
dscp { |
The DiffServ code-points assigned to the class. Multiple DSCPs can be specified, separated by commas, with no spaces between values. Valid values are:
Notes:
|
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:
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. |
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.
This command shows the classes defined in the QoS policy.
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.
This command un-installs the previously installed QoS policy. If un-installed, the policy will not be installed again when the machine boots.
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:
watch
command to periodically present the statistics.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.
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.
This section presents a sample differentiated services implementation. It includes examples for configuration, monitoring and statistics.
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 |
Your QoS policy should apply these guidelines:
This example of the cpqos class add
command creates classes for traffic of various types:
|
Monitoring example shows previously defined classes:
|
Statistics example shows statistics for the previously defined classes:
|
From this statistical output, it is apparent that: