cc/td/doc/product/lan/cat6000/sw5_1
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Configuring Quality of Service

Configuring Quality of Service

Networks typically operate on a best-effort delivery basis. All traffic has equal priority and an equal chance of being delivered in a timely manner. When congestion occurs, all traffic has an equal chance of being dropped.

The Quality of Service (QoS) feature prioritizes network traffic with IEEE 802.1P Class of Service (CoS) values that allow network devices to recognize and deliver high-priority traffic in a predictable manner. When congestion occurs, QoS drops low-priority traffic to allow delivery of high-priority traffic.

This chapter describes how to configure QoS on the Catalyst  6000 and  6500 series switches.


Note For complete syntax and usage information for the commands used in this chapter, refer to the Catalyst  6000 and  6500 Series Command Reference publication.

This chapter consists of these sections:

Understanding How QoS Works

With QoS enabled on the switch (see the "Enabling QoS" section), the Catalyst  6000 and  6500 series switches provide QoS based on CoS values.

These sections describe QoS:

CoS Values

CoS values range between zero (low-priority) and seven (high-priority). CoS values are carried in ISL and 802.1Q frame headers (other frame types do not carry CoS values). While being switched, all frames have a CoS value regardless of frame type (see the "CoS Values in the Switch" section).

Understanding QoS for Received Traffic

These sections describe how QoS handles traffic received by the switch:

Trusted and Untrusted Ports

Ports can be configured as trusted or untrusted, indicating whether or not to trust the CoS values in received frames to be consistent with network policy. On trusted ports, QoS uses received CoS values. On untrusted ports, QoS replaces received CoS values with the port CoS value.

Frame Classification

QoS evaluates received frames as either classified or unclassified:

On each port, QoS applies the port's CoS value (the default is zero) to unclassified frames or, if the port is untrusted, QoS applies the port's CoS value to all frames.

Before entering the receive queue, all frames have either a received CoS value or the applied port CoS value.

Receive Queue and Receive Queue Drop Thresholds

Each port on the switch has a single receive queue buffer for incoming traffic.


Note The explanations in this section use default values. You can configure the default port CoS value on each port (see the
"Configuring the CoS Value for a Port" section). You can configure the receive queue drop threshold percentages (see the "Receive Queue and Receive Queue Drop Thresholds" section). You can configure the CoS values mapped to each drop threshold (see the "Mapping CoS Values to Drop Thresholds" section). All ports in the switch use the same drop threshold configuration.

Understanding QoS for Transmitted Traffic

These sections describe how QoS handles traffic transmitted from the switch:

CoS Values in the Switch

Each frame being switched has one of the following:

The CoS value determines how the frame is handled as it is transmitted from the switch.

Transmit Queue and Transmit Queue Drop Thresholds

Each port has a low-priority transmit queue and a high-priority transmit queue. QoS allocates 80 percent of the total transmit queue bandwidth to the low-priority queue and 20 percent to the high-priority queue. Each transmit queue has two drop thresholds as follows:


Note The explanations in this section use default values. You can configure the transmit drop threshold percentages (see the
"Configuring Transmit Queue Drop Thresholds" section). You can configure how the low- and high-priority transmit queues share the total available transmit queue bandwidth (see the "Allocating Bandwidth Between Transmit Queues" section and the "Configuring the Transmit Queue Size Ratio" section). You can configure the CoS values mapped to each transmit queue and the CoS values mapped to each threshold (see the "Mapping CoS Values to Drop Thresholds" section). All ports in the switch use the same transmit queue and drop threshold configuration.

QoS Default Configuration

Table 9-1 shows the QoS default configuration.


Table 9-1: QoS Default Configuration
Feature Default Value

QoS enable state

Disabled

Port trust state

Untrusted

Receive queue drop threshold1 percentages

  • Threshold 1: 20 percent

  • Threshold 2: 40 percent

  • Threshold 3: 75 percent

  • Threshold 4: 100 percent

Default port CoS

Zero

Transmit queue drop threshold percentages

  • Low-priority queue threshold 1: 40 percent

  • Low-priority queue threshold 2: 100 percent

  • High-priority queue threshold 1: 40 percent

  • High-priority queue threshold 2: 100 percent

Transmit queue low-priority/high-priority bandwidth allocation ratio

100:255

Transmit queue size ratio

  • Low priority: 80 percent

  • High priority: 20 percent

CoS value/drop threshold mapping

  • Receive drop threshold 1 and transmit queue 1/drop threshold 1: CoS 0 and 1

  • Receive drop threshold 2 and transmit queue 1/drop threshold 2: CoS 2 and 3

  • Receive drop threshold 3 and transmit queue 2/drop threshold 1: CoS 4 and 5

  • Receive drop threshold 4 and transmit queue 2/drop threshold 2: CoS 6 and 7

1QoS configures receive queue drop thresholds only on trusted ports.

Configuring QoS

These sections describe how to configure QoS on the Catalyst  6000 and  6500 series switches:


Note Because some QoS commands disable and then reenable ports, which may cause Spanning-Tree Protocol (STP) reconfiguration, enter QoS commands only when necessary. The messages resulting from disabling and enabling ports and from STP reconfiguration are not shown in the examples.

Enabling QoS

To enable QoS, perform this task in privileged mode:
Task Command

Enable QoS on the switch.

set qos enable

This example shows how to enable QoS:

Console> (enable) set qos enable
QoS is enabled.
Console> (enable) 
 

To disable QoS, perform this task in privileged mode:
Task Command

Disable QoS on the switch.

set qos disable

This example shows how to disable QoS:

Console> (enable) set qos disable
QoS is disabled.
Console> (enable) 

Reverting to QoS Defaults

To revert to QoS defaults, perform this task in privileged mode:
Task Command

Revert to QoS defaults.

clear qos config

This example shows how to revert to QoS defaults:

Console> (enable) clear qos config
This command will disable QoS and take values back to factory default.
Do you want to continue (y/n) [n]? y
QoS config cleared.
Console> (enable) 

Note Reverting to defaults disables QoS, since QoS is disabled by default.

Configuring the Trusted State of a Port

This command configures the trusted state of a port, indicating whether or not the frames arriving at the port are trusted to carry a CoS value consistent with network policy. By default, all ports are untrusted.

To configure the trusted state of a port, perform this task in privileged mode:
Task Command

Set the trusted state of a port.

set port qos mod_num/port_num trust {untrusted  |  trust-cos}

This example shows how to configure the trusted state of port 1/1:

Console> (enable) set port qos 1/1 trust trust-cos
Port 1/1 qos set to trust-cos
Console> (enable) 

Configuring the CoS Value for a Port

Unclassified frames from trusted ports and all frames from untrusted ports are assigned the CoS value specified with this command.

To set the CoS value for a port, perform this task in privileged mode:
Task Command

Set the CoS value for a port.

set port qos mod_num/port_num cos cos-value

This example shows how to set CoS equal to 3 in all unclassified frames received through port 1/1:

Console> (enable) set port qos 1/1 cos 3 
Port 1/1 qos cos set to 3
Console> (enable) 
 

To revert to the default CoS value for a port, perform this task in privileged mode:
Task Command

Revert to the CoS value for a port.

clear port qos mod_num/port_num cos

This example shows how to revert to the default CoS value for port 1/1:

Console> (enable) clear port qos 1/1 cos
Port 1/1 qos cos setting cleared.
Console> (enable) 

Configuring Receive Queue Drop Thresholds

To configure the receive queue drop thresholds on all trusted ports in the switch, perform this task in privileged mode:
Task Command

Set the receive queue drop thresholds.

set qos drop-threshold 1q4t rx queue 1 thr1 thr2 thr3 thr4

The thresholds are all specified as percentages, ranging from 1 to 100. A value of 10 indicates a threshold when the buffer is 10 percent full.

This example shows how to configure the receive queue drop thresholds:

Console> (enable) set qos drop-threshold 1q4t rx queue 1 20 40 75 100
Receive drop thresholds for queue 1 set at 20% 40% 75% 100%
Console> (enable) 

Mapping a CoS Value to a Host Destination MAC Address/VLAN Pair

To assign a CoS value to all frames, from both trusted and untrusted ports, destined for a particular host destination MAC address and VLAN number value pair, perform this task in privileged mode:
Task Command

Assign a CoS value to a host destination MAC address/VLAN pair.

set qos mac-cos dest_MAC_addr VLAN cos_value

This example shows how to assign CoS 2 to a destination MAC address and VLAN 525:

Console> (enable) set qos mac-cos 00-40-0b-30-03-48 525 2
CoS 2 is assigned to 00-40-0b-30-03-48 vlan 525.
Console> (enable) 

Configuring Transmit Queue Drop Thresholds

To configure the transmit queue drop thresholds on all ports in the switch, perform this task in privileged mode:
Task Command

Set the transmit drop queue thresholds.

set qos drop-threshold 2q2t tx queue q# thr1 thr2

The queue number is 1 for the low-priority transmit queue and 2 for the high-priority queue.

The thresholds are all specified as percentages, ranging from 1 to 100. A value of 10 indicates a threshold when the buffer is 10 percent full.

This example shows how to configure the low-priority transmit queue drop thresholds:

Console> (enable) set qos drop-threshold 2q2t tx queue 1 40 80
Transmit drop thresholds for queue 1 set at 40%  80%
Console> (enable) 

Allocating Bandwidth Between Transmit Queues

The switch transmits frames from one queue at a time using a weighted round robin (WRR) algorithm. WRR uses a weight value to decide how much to transmit from one queue before switching to the other. The higher the weight assigned to a queue, the more transmit bandwidth is allocated to it.

To allocate bandwidth, perform this task in privileged mode:
Task Command

Allocate bandwidth between transmit queue 1 (low-priority) and transmit queue 2 (high-priority).

set qos wrr 2q2t queue1-weight queue2-weight

The valid values for weight range from 1-255. The calculation to determine the weight is:

Assume w1 and w2 are the weights assigned to each of the queues and let B be the link bandwidth (10 Mbps, 100 Mbps, or 1000 Mbps). The number of bytes transmitted out of queue 1 before switching to queue 2 is:

b1 = (B*w1)/(w1+w2)

Similarly for queue 2, it is:

b2 = (B*w2)/(w1+w2)

Note The actual number of bytes transmitted does not match the calculation because whole frames are transmitted before switching to the other queue.

This example shows how to configure bandwidth:

Console> (enable) set qos wrr 2q2t 30 70
QoS wrr ratio is set successfully.
Console> (enable) 

Configuring the Transmit Queue Size Ratio

Estimate the mix of low priority-to-high priority traffic (for example, 80 percent low-priority traffic and 20 percent high-priority traffic). Specify queue ratios with the estimated percentages, which must range from 1 to 99 and together add up to 100.

To set the transmit queue size ratio, perform this task in privileged mode:
Task Command

Set the transmit queue size ratio between transmit queue 1 (low-priority) and transmit queue 2 (high-priority).

set qos txq-ratio 2q2t queue1-val queue2-val

This example shows how to set the transmit queue size ratio:

Console> (enable) set qos txq-ratio 2q2t 80 20
QoS txq-ratio is set successfully.
Console> (enable) 

Mapping CoS Values to Drop Thresholds

This command associates CoS values with both receive and transmit drop thresholds.

To associate CoS values to a drop threshold, perform this task in privileged mode:
Task Command

Associate a CoS value to a drop threshold.

set qos map 2q2t q# thr# cos coslist

The receive and transmit drop thresholds have this relationship:

Use the transmit queue and drop threshold values in this command. This example shows how to map the CoS values 0 and 1 to both receive queue drop threshold 1 and transmit queue 1/drop threshold 1:

Console> (enable) set qos map 2q2t 1 1 cos 0,1
Qos tx priority queue and threshold mapped to cos successfully.
Console> (enable) 
 

To revert to default CoS value/drop threshold mapping, perform this task in privileged mode:
Task Command

Revert to QoS map defaults.

clear qos map 2q2t

This example shows how to revert to QoS map defaults:

Console> (enable) clear qos map 2q2t
Qos map setting cleared.
Console> (enable) 

Showing QoS Statistics

To show QoS statistics, perform this task:
Task Command

Show QoS statistics.

show qos statistics [mod_num[/port_num]]

This example shows how to display QoS statistics for port 1/1:

Console> show qos statistics 1/1
On Transmit:Port 1/1 has 2 Queue(s) 2 Threshold(s)
Q #  Threshold #:Packets dropped
---  -----------------------------------------------
1    1:0 pkts , 2:0 pkts
2    1:0 pkts , 2:0 pkts
On Receive:Port 1/1 has 1 Queue(s) 4 Threshold(s)
Q #  Threshold #:Packets dropped
---  -----------------------------------------------
1    1:0 pkts, 2:0 pkts, 3:0 pkts, 4:0 pkts
Console> 

Showing QoS Information

To show QoS information, perform this task:
Task Command

Show QoS information.

show qos info [runtime  | config] mod_num/port_num

This example shows how to show the QoS information currently in NVRAM for port 1/1:

Console> show qos info runtime 1/1
Run time setting of QoS:
QoS is enabled on 1/1
Port 1/1 has 2 transmit queue with 2 drop thresholds (2q2t).
Port 1/1 has 1 receive queue with 4 drop thresholds (1q4t).
The qos trust type is set to untrusted.
Default CoS = 0
Queue and Threshold Mapping:
Queue Threshold CoS
----- --------- ---------------
1     1         0 1
1     2         2 3
2     1         4 5
2     2         6 7
Rx drop thresholds:
Rx drop thresholds are disabled for untrusted ports.
Tx drop thresholds:
Queue #  Thresholds - percentage (abs values )
-------  -------------------------------------
1        85% (752096 bytes) 90% (796256 bytes)
2        85% (12256 bytes) 95% (12256 bytes)
Queue Sizes:
Queue #  Sizes - percentage (abs values )
-------  -------------------------------------
1        99% (884704 bytes)
2        1% (16352 bytes)
WRR Configuration:
Ports with speed 1000Mbps have ratio of 1:2 between transmit queue 1 and 2 (2184
5:43690 bytes)
 

To show QoS information about receive or transmit queues, perform this task:
Task Command

Show QoS information about receive or transmit queues.

show qos info config {1q4t  rx  | 2q2t  tx}

Use the 1q4t and rx keywords for the receive queues (all receive queues on all ports use the same configuration).

Use the 2q2t and tx keywords for the transmit queues (all transmit queues on all ports use the same configuration).

This example shows how to show the QoS information for the transmit queues:

Console> (enable) show qos info config 2q2t tx
QoS setting in NVRAM for 2q2t transmit:
QoS is enabled
Queue and Threshold Mapping:
Queue Threshold CoS
----- --------- ---------------
1     1         0 1
1     2         2 3
2     1         4 5
2     2         6 7
Tx drop thresholds:
Queue #  Thresholds - percentage (abs values )
-------  -------------------------------------
1        85% 90%
2        85% 95%
Queue Sizes:
Queue #  Sizes - percentage (abs values )
-------  -------------------------------------
1        99%
2        1%
WRR Configuration:
Ports with 2q2t have ratio of 1:2 between transmit queue 1 and 2
Console> 

hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Feb 4 18:23:39 PST 1999
Copyright 1989-1999©Cisco Systems Inc.