|
|
This chapter describes how to configure the quality of service (QoS) feature on the Catalyst 6000 and 6500 series switches.
This chapter consists of these sections:
When you enable QoS (see the "Enabling QoS" section), the Catalyst 6000 and 6500 series switches provide QoS based on IEEE 802.1p class of service (CoS) values.
These sections describe QoS:
Typically, networks operate on a best-effort delivery basis, which means that 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.
QoS uses classification and scheduling to transmit network traffic from the switch in a predictable manner. QoS classifies frames by assigning priority-indexed CoS values to them and implements scheduling with receive queue and transmit queue drop thresholds that use the CoS values to give preference to higher-priority traffic. See Figure 9-1.
CoS values range between zero for low-priority and seven for high-priority.
Inter-Switch Link (ISL) frame headers have a 1-byte User field that carries the CoS value in the three least significant bits. IEEE 802.1Q frame headers have a 2-byte Tag Control Information field that carries the CoS value in the three most significant bits, which are called the User Priority bits. Other frame types cannot carry CoS values.
Ports can be configured as either trusted or untrusted, indicating whether or not QoS should trust the CoS values in received frames to be consistent with network policy. On trusted ports, QoS accepts received CoS values. On untrusted ports, QoS classifies the frame with the port CoS value.
Classification is the assignment of CoS values to network traffic.
These sections describe classification:
ISL or 802.1Q frames received through trusted ports do not require classification.
QoS classifies all other frame types that enter the switch through a trusted ingress port with the configured CoS value of the port (the default is zero).
QoS classifies all frames that enter the switch through an untrusted port with the configured CoS value of the port (the default is zero).
After network traffic passes through the ingress port, QoS can rewrite the CoS value with a configurable value in frames destined for selected pairs of destination host Media Access Control (MAC) addresses and VLANs (see the "Mapping a CoS Value to a Host Destination MAC Address/VLAN Pair" section).
QoS uses transmit queue drop thresholds to schedule transmission of network traffic from the switch. QoS configures each port with a low-priority transmit queue and a high-priority transmit queue. The default QoS configuration 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 that function as follows:
Table 9-1 shows the QoS default configuration.
| Feature | Default Value |
|---|---|
QoS enable state | Disabled |
Port trust state | Untrusted |
Port CoS value | Zero |
| With QoS enabled | |
Receive queue drop threshold1 percentages |
|
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 |
|
| With QoS disabled | |
Receive queue drop threshold1 percentages | All thresholds set to 100% |
Transmit queue drop threshold percentages | All thresholds set to 100% |
Transmit queue low-priority/high-priority bandwidth allocation ratio | 255:1 |
Transmit queue size ratio |
|
CoS value/drop threshold mapping | Receive drop threshold 1 and transmit queue 1/drop threshold 1: CoS 0-7 |
| 1QoS implements 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)
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 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 100 Transmit drop thresholds for queue 1 set at 40% 100% 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. 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 on your network (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 display QoS information, perform this task:
| Task | Command |
|---|---|
Show QoS information. | show qos info [runtime | config] mod_num/port_num |
The config keyword displays the QoS configuration.
The runtime keyword displays the QoS configuration in use. When QoS is disabled, the display with the runtime keyword is "QoS is disabled." When QoS is enabled, the display with the runtime keyword is similar to that of the config keyword, except that current port activity is also shown.
This example shows how to display the QoS runtime information for port 2/1:
Console> show qos info runtime 2/1 Run time setting of QoS: QoS is enabled on 2/1 Port 2/1 has 2 transmit queue with 2 drop thresholds (2q2t). Port 2/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 40% (144224 bytes) 100% (360416 bytes) 2 40% (32864 bytes) 100% (77792 bytes) Queue Sizes: Queue # Sizes - percentage (abs values ) ------- ------------------------------------- 1 80% (360416 bytes) 2 20% (81888 bytes) WRR Configuration: Ports with speed 1000Mbps have ratio of 100:255 between transmit queue 1 and 2 (25600:65280 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> show qos info config 2q2ttx 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 40% 100% 2 40% 100% Queue Sizes: Queue # Sizes - percentage (abs values ) ------- ------------------------------------- 1 80% 2 20% WRR Configuration: Ports with 2q2t have ratio of 100:255 between transmit queue 1 and 2 Console>
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 2/1:
Console> show qos statistics 2/1 On Transmit:Port 2/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 2/1 has 1 Queue(s) 4 Threshold(s) Rx drop threshold counters are disabled for untrusted ports. Q # Threshold #:Packets dropped --- ----------------------------------------------- 1 1:0 pkts, 2:0 pkts, 3:0 pkts, 4:0 pkts Console>
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)
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)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Thu Apr 8 14:24:49 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.