cc/td/doc/product/lan/cat5000/rel_5_1
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Configuring Quality of Service

Configuring Quality of Service

This chapter describes how to configure Quality of Service (QoS).


Note For complete syntax and usage information for the commands used in this chapter, refer to the Command Reference publication for your switch.

This chapter consists of these sections:

Understanding How QoS Works

These sections describe how QoS works:

Overview of 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 IEEE 802.1p Class of Service (CoS) values to them at supported ingress ports. For IPv4 traffic going to a router, QoS can classify packets that match an Access-Control Entry (ACE) by setting the IP precedence bits and CoS value.

QoS implements scheduling on supported egress ports with transmit queue drop thresholds that use the IEEE 802.1p CoS values to give preference to higher-priority traffic. See Figure 48-1.


Note Use the show port capabilities command to determine if ports on a specific module support QoS as shown in Figure 48-1.

Figure 48-1: Traffic Flow Through the Switch with QoS Enabled

Understanding CoS and IP Precedence Values

CoS and IP precedence values range between zero for low-priority and seven for high-priority.

ISL frame headers have a one-byte User field that carries the CoS value in the three least significant bits. 802.1Q frame headers have a two-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.

IP packets have a one-byte Type of Service (ToS) field that carries IP precedence in the three most significant bits.

CoS and ToS values are collectively referred to as QoS labels.

Understanding Classification

Classification is the assignment of QoS labels to network traffic.

These sections describe classification:

Understanding Classification at the Ingress Port

ISL or 802.1Q frames do not require classification at the ingress port.

QoS classifies all other frame types that enter the switch through a supported ingress port with the configured CoS value of the port (the default is zero).

Understanding Classification Based on Destination

QoS can rewrite the CoS value with a configurable value in frames destined for selected destination host Media Access Control (MAC) address and VLAN pairs (see the "Mapping a CoS Value to a Host Destination MAC Address/VLAN Pair" section).

Understanding Classification Based on an ACE

For IPv4 traffic going to routers, QoS can perform classification of traffic that matches the parameters in an ACE under the following conditions:

If ACE-based classification occurs, QoS sets the IP precedence bits to match the CoS value. ACE-based classification overwrites the port CoS and any destination-based classification.

The parameters that can be used in an ACE are:

See "Creating an Access Control Entry" section.

Understanding Scheduling

QoS uses transmit queue drop thresholds to schedule transmission of network traffic from the switch through supported egress ports. QoS configures each supported egress port with four transmit queue drop thresholds that function as follows:


Note The explanations in this section use default values. You can configure the transmit queue drop threshold percentages (see the
"Configuring Transmit Queue Drop Thresholds" section). You can configure the CoS values mapped to each threshold (see the "Mapping CoS Values to Drop Thresholds" section). All ports in the switch use the same drop threshold configuration.

Hardware and Software Requirements

QoS requires these software and hardware versions:

Use the show port capabilities command to determine the specific QoS support for a module.

QoS Default Configuration

Table 48-1 shows the QoS default configuration.


Table 48-1: QoS Default Configuration
Feature Default Value

QoS enable state

Disabled

Port CoS value

Zero

With QoS enabled

Transmit queue drop threshold percentages

  • Threshold 1: 30%

  • Threshold 2: 50%

  • Threshold 3: 80%

  • Threshold 4: 100%

CoS value/drop threshold mapping

  • Transmit queue drop threshold 1: CoS 0 and 1

  • Transmit queue drop threshold 2: CoS 2 and 3

  • Transmit queue drop threshold 3: CoS 4 and 5

  • Transmit queue drop threshold 4: CoS 6 and 7

With QoS disabled

Transmit queue drop threshold percentages

All thresholds set to 100%

CoS value/drop threshold mapping

Transmit queue drop threshold 1: CoS 0-7

Configuring QoS

These sections describe how to configure QoS on the Catalyst 5000 series switches:


Note Because some QoS commands disable and then reenable ports, which may cause Spanning-Tree Protocol (STP) reconvergence, enter QoS commands only when necessary.

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) 

Configuring the CoS Value for a Port

QoS assigns unclassified frames received through a supported port the CoS value specified with this command. The default is zero.

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

Step 1 Set the CoS value for a port.

set port qos mod_num/port_num cos cos-value

Step 2 Verify the CoS value of the port.

show port qos mod_num/port_num

This example shows how to set CoS equal to 7 in all unclassified frames received through port 8/1 and verify the configuration:

Console> (enable) set port qos 8/1 cos 7 
Port 8/1 qos cos set to 7
Console> (enable) show port qos 8/1 
QoS is enabled on 8/1
Port 8/1 has 1 transmit queue with 4 drop thresholds (1q4t).
QoS setting in NVRAM:
Default CoS = 7    
Run time setting of QoS:
Default CoS = 7 
Console> (enable) 

Reverting to the Default Port CoS Value

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

Step 1 Revert to the CoS value for a port.

clear port qos mod_num/port_num cos

Step 2 Verify the CoS value of the port.

show port qos mod_num/port_num

This example shows how to revert to the default CoS value for port 8/1 and verify the configuration:

Console> (enable) clear port qos 8/1 cos
Port 8/1 qos cos setting cleared.
Console> (enable) show port qos 8/1 
QoS is enabled on 8/1
Port 8/1 has 1 transmit queue with 4 drop thresholds (1q4t).
QoS setting in NVRAM:
Default CoS = 0 
Run time setting of QoS:
Default CoS = 0 
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

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

set qos mac-cos dest_MAC_addr VLAN cos_value

Step 2 Verify the assigned CoS value.

show qos mac-cos dest_MAC_addr [VLAN]

show qos mac-cos all

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

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) show qos mac-cos 00-40-0b-30-03-48
VLAN  Dest MAC            CoS
----  ------------------  ---
525   00-40-0b-30-03-48   2 
Console> (enable) 

Creating an Access Control Entry

Use the set qos ip-filter command to create access control entries (ACEs) with Layer 3 values or with both Layer 3 and 4 values.

The dest_addr/wildcardmask parameter is the destination IP address and wildcard mask. The src_addr/wildcardmask parameter is the source IP address and wildcard mask. The cos (CoS) parameter range is 0-7. The address and wildcard mask (use one bits where you want wildcards) can specify a network, subnet, or host address.

Frames are compared to the access control entries sequentially. QoS uses the first match found. By default, ACE entries are added to the end of the access control list. Use the optional before ACE# keyword and parameter to position an entry within the list (use the show qos ip command to display the access control list).

The dst_port parameter is the Layer 4 destination port number. The src_port parameter is the Layer 4 source port number. You can use zero as a wildcard for either or both port numbers.

To create an ACE, perform this task in privileged mode:
Task Command

Step 1 Create an ACE.

set qos ip-filter cos dest_addr/wildcardmask src_addr/wildcardmask [before ACE#]

set qos ip-filter cos dest_addr/wildcardmask src_addr/wildcardmask {tcp | udp | any} dst_port src_port [before ACE#>]

Step 2 Verify the entry.

show qos ip

This example shows how to create ACEs and an ACE within the list and verify the configuration:

Console> (enable) set qos ip 7 100.100.1.1/0.0.0.255 200.200.1.1/0.0.0.255 
qos ip-filter is set successfully.
Console> (enable) show qos ip 
There are 1 IP filter(s).
ACE# Dest IP/Mask                     Src IP/Mask                    
---- -------------------------------- --------------------------------
   1 100.100.1.1/0.0.0.255            200.200.1.1/0.0.0.255       
     Protocol Dst Port Src Port CoS
     -------- -------- -------- ---
     both     0        0        7  
Console> (enable) set qos ip 4 120.100.1.1/0.0.0.255 210.210.1.1/0.0.0.255 tcp 23 47 
qos ip-filter is set successfully.
Console> (enable) sh qos ip 
There are 2 IP filter(s).
ACE# Dest IP/Mask                     Src IP/Mask                    
---- -------------------------------- --------------------------------
   1 100.100.1.1/0.0.0.255            200.200.1.1/0.0.0.255       
     Protocol Dst Port Src Port CoS
     -------- -------- -------- ---
     both     0        0        7  
 
   2 120.100.1.1/0.0.0.255            210.210.1.1/0.0.0.255       
     Protocol Dst Port Src Port CoS
     -------- -------- -------- ---
     tcp      23       47       4  
 
Console> (enable) set qos ip-filter 1 20.20.20.1/255.0.0.0 30.30.1.1/255.0.0.0 before 1
qos ip-filter is set successfully.
Console> (enable) sh qos ip 
There are 3 IP filter(s).
ACE# Dest IP/Mask                     Src IP/Mask                    
---- -------------------------------- --------------------------------
   1 20.20.20.1/255.0.0.0             30.30.1.1/255.0.0.0             
     Protocol Dst Port Src Port CoS
     -------- -------- -------- ---
     both     0        0        1  
 
   2 100.100.1.1/0.0.0.255            200.200.1.1/0.0.0.255       
     Protocol Dst Port Src Port CoS
     -------- -------- -------- ---
     both     0        0        7  
 
   3 120.100.1.1/0.0.0.255           210.210.1.1/0.0.0.255       
     Protocol Dst Port Src Port CoS
     -------- -------- -------- ---
     tcp      23       47       4 

Entering the MAC Address of a Router

Use this command to enter router addresses used by QoS, except for the MLS-RP.

To configure a router address, perform this task in privileged mode:
Task Command

Step 1 Configure a router for use with QoS.

set qos router-mac MAC_addr vlan

Step 2 Verify the configuration.

show qos router-mac [MAC_addr | vlan]

This example shows how to configure a router address in VLAN 2:

Console> (enable) set qos router-mac 00-40-0b-30-03-48 2
Router MAC/Vlan is set for QoS.
Console> (enable) show qos router-mac 00-40-0b-30-03-48
Number  MAC address        Vlan #
---------------------------------
     1  00-40-0b-30-03-48  2
Console> (enable) 

Removing a Router Address

To remove a router or all routers from the QoS configuration, perform this task in privileged mode:
Task Command

Step 1 Remove a router or all routers from the QoS configuration.

clear qos router-mac MAC_addr vlan

clear qos router-mac all

Step 2 Verify the configuration.

show qos router-mac

This example shows how to clear a router address in VLAN 2:

Console> (enable) clear qos router-mac 00-40-0b-30-03-48 2
QoS Router MAC/Vlan(s) cleared.
Console> (enable) 

Configuring Transmit Queue Drop Thresholds

Use the set qos wred-threshold command to set the transmit queue drop thresholds. 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.

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 wred-threshold 1q4t tx queue 1 thr1 thr2 thr3 thr4

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

Console> (enable) set qos wred-threshold 1q4t tx queue 1 30 50 80 100
Transmit drop thresholds for queue 1 set at 30% 50% 80% 100%
Console> (enable) 

Mapping CoS Values to Drop Thresholds

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

Associate a CoS value to a drop threshold.

set qos map 1q4t 1 thr# cos coslist

This example shows how to map the CoS values 0 and 1 to transmit queue drop threshold 1:

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

Reverting to Default CoS-to-Drop Threshold Mapping

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

Step 1 Revert to QoS map defaults.

clear qos map 1q4t

This example shows how to revert to QoS map defaults:

Console> (enable) clear qos map 1q4t
Qos map setting cleared.
Console> (enable) 

Displaying 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 8/1:

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

Displaying QoS Information

To display QoS information, perform this task:
Task Command

Display QoS information.

show qos info [runtime | config] mod_num/port_num

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

Console> show qos info runtime 8/1
Run time setting of QoS:
QoS is enabled
Port 8/1 has 1 transmit queue with 4 drop thresholds (1q4t).
Default CoS = 0    
Queue and Threshold Mapping:
Queue Threshold CoS            
----- --------- ---------------
1     1         0 1 
1     2         2 3 
1     3         4 5 
1     4         6 7 
Tx WRED thresholds:
Queue #  Thresholds in percentage ( in abs values )
-------  ------------------------------------------
1        14% (16380 bytes) 28% (32764 bytes) 57% (65532 bytes) 100% (131068 bytes) 
Console> 
 

To display QoS information about the transmit queues, perform this task:
Task Command

Display QoS information about the transmit queues.

show qos info config 1q4t tx

This example shows how to display the QoS information for the transmit queue:

Console> (enable) show qos info config 1q4t tx
QoS setting in NVRAM for 1q4t transmit:
QoS is enabled
Queue and Threshold Mapping:
Queue Threshold CoS            
----- --------- ---------------
1     1         0 1 
1     2         2 3 
1     3         4 5 
1     4         6 7 
Tx WRED thresholds:
Queue #  Thresholds in percentage ( in abs values )
-------  ------------------------------------------
1        14% 28% 57% 100% 
Console> 

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.

Disabling QoS

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) 


hometocprevnextglossaryfeedbacksearchhelp
Posted: Wed Feb 9 16:12:17 PST 2000
Copyright 1989 - 2000©Cisco Systems Inc.