|
|
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.
This chapter describes how to configure QoS on the Catalyst 6000 and 6500 series switches.
This chapter consists of these sections:
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 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).
These sections describe how QoS handles traffic received by the switch:
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.
QoS evaluates received frames as either classified or unclassified:
Before entering the receive queue, all frames have either a received CoS value or the applied port CoS value.
Each port on the switch has a single receive queue buffer for incoming traffic.
These sections describe how QoS handles traffic transmitted from 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.
Table 9-1 shows the QoS default configuration.
| Feature | Default Value |
|---|---|
QoS enable state | Disabled |
Port trust state | Untrusted |
Receive queue drop threshold1 percentages |
|
Default port CoS | Zero |
Transmit queue drop threshold percentages |
|
Transmit queue low-priority/high-priority bandwidth allocation ratio | 100:255 |
Transmit queue size ratio |
|
CoS value/drop threshold mapping |
|
| 1QoS configures receive queue drop thresholds only on trusted ports. |
These sections describe how to configure QoS on the Catalyst 6000 and 6500 series switches:
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)
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)
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)
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)
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)
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)
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)
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:
Similarly for queue 2, it is:
This example shows how to configure bandwidth:
Console> (enable) set qos wrr 2q2t 30 70 QoS wrr ratio is set successfully. Console> (enable)
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)
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)
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>
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>
|
|