Catalyst 4500 Series Software Configuration Guide, 7.5
Configuring QoS

Table Of Contents

Configuring QoS

Understanding How QoS Works

Overview of QoS

QoS Terminology

Understanding Classification and Marking at the Ingress Port

Understanding Scheduling

Software Requirements

QoS Default Configuration

Configuring QoS

Enabling QoS Globally

Configuring the Default CoS Value for the Switch

Reverting to the Default Switch CoS Value

Mapping CoS Values to Transmit Queues and Drop Thresholds

Reverting to the Default CoS-to-Transmit Queue and Drop Threshold Mapping

Displaying QoS Information

Reverting to QoS Defaults

Disabling QoS


Configuring QoS


This chapter describes how to configure quality of service (QoS) on Catalyst enterprise LAN switches.


Note For complete syntax and usage information for the commands used in this chapter, refer to the Command Reference—Catalyst 4000 Family, Catalyst 2948G, and Catalyst 2980G Switches.


This chapter consists of these major sections:

Understanding How QoS Works

Software Requirements

QoS Default Configuration

Configuring QoS

Understanding How QoS Works

These sections describe how QoS works:

Overview of QoS

QoS Terminology

Understanding Classification and Marking at the Ingress Port

Understanding Scheduling

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 selects network traffic, prioritizes it according to its relative importance, and provides priority-indexed treatment through congestion-avoidance techniques. Implementing QoS in your network makes network performance more predictable and bandwidth utilization more effective.

QoS classifies traffic by assigning priority-indexed 802.1p class of service (CoS) values to frames at ingress ports. If traffic is tagged with a CoS value at the ingress port, the switch forwards the value. If traffic is native, then the switch can rewrite the CoS tag.

QoS implements scheduling on supported egress ports with transmit queue drop thresholds and multiple transmit queues that use the 802.1p CoS values to give preference to higher-priority traffic.

Figure 14-1 shows how QoS affects the traffic flow.

Figure 14-1 Traffic Flow Through the Switch with QoS Enabled—Catalyst 4000 Family, Catalyst 2948G, and Catalyst 2980G Switches

QoS Terminology

The following QoS terminology is used in this chapter:

QoS labels are used to prioritize traffic:

Layer 2 CoS values—Layer 2 802.1Q frame headers have a 2-byte Tag Control Information field that carries the CoS value in the three most significant bits (the User Priority bits). Other frame types cannot carry CoS values. CoS values range between 0 (low priority) and 7 (high priority).

Classification is the selection of traffic to be marked.

Marking is the application of QoS labels to traffic.

Scheduling is the assignment of traffic to a queue. QoS assigns traffic based on CoS values.

Congestion avoidance is the process by which QoS reserves ingress and egress port capacity for traffic with high-priority CoS values. QoS implements congestion avoidance with CoS value-based drop thresholds and transmit queues. A drop threshold is the percentage of buffer utilization at which traffic with a specified CoS value is dropped, leaving the buffer available for traffic with higher-priority CoS values. A transmit queue is a queue on the egress port where outgoing frames are stored before transmission. With multiple transmit queues, traffic with higher-priority CoS values can be placed in a reserved transmit queue.

Policing is the process by which the switch limits the bandwidth consumed by a flow of traffic. Policing can mark or drop traffic.

Understanding Classification and Marking at the Ingress Port

ISL or 802.1Q frames are not classified or marked at the ingress port; the existing CoS value is honored.

When an 802.1Q frame enters the switch through a supported ingress port, QoS accepts the User Priority bits as the CoS value.

QoS classifies and marks all other frame types that enter the switch with the default CoS value configured for the entire switch. You cannot mark traffic on a per-port basis.


Note The Catalyst 4000 family, 2948G, and 2980G switches support frame classification and marking only on unclassified frames entering the switch.


Understanding Scheduling

There are two user-configurable transmit queues and one non-user-configurable transmit queue drop threshold for each port. You can specify such ports using the 2q1t keyword in QoS-related commands.

QoS uses the transmit queues to schedule transmission of network traffic from the switch through egress ports. By default, all traffic is assigned to queue 1 and threshold 1 when QoS is enabled. All traffic destined for a transmit queue, regardless of classification, is subject to tail drop when the queue is full (that is, frames at the end of the queue are dropped).


Caution When QoS is disabled, the switch assigns unicast traffic to queue 1 and broadcast, multicast, and unknown traffic to queue 2. If you enable QoS but do not modify the CoS-to-transmit queue mappings, switch performance could be affected because all traffic is assigned to queue 1. If you enable QoS, we recommend that you modify the CoS-to-transmit queue mappings.


Note To configure the CoS values mapped to each transmit queue, see the "Mapping CoS Values to Transmit Queues and Drop Thresholds" section.


Software Requirements

QoS requires supervisor engine software release 5.2 or later releases. Use the show port capabilities command to determine the specific QoS support for a module.

QoS Default Configuration

Table 14-1 shows the QoS default configuration.

Table 14-1 QoS Default Configuration 

Feature
Default Value

QoS global enable state

Disabled

Switch CoS value

0

Transmit queue drop threshold percentages

Threshold 1:100%1

CoS value-to-drop threshold mapping

Transmit queue drop threshold 1: CoS 0-71.

CoS value-to-transmit queue mapping

Transmit queue 1: CoS 0-7

Transmit queue 2: None configured

1 Not user-configurable


Configuring QoS

These sections describe how to configure QoS:

Enabling QoS Globally

Configuring the Default CoS Value for the Switch

Reverting to the Default Switch CoS Value

Mapping CoS Values to Transmit Queues and Drop Thresholds

Reverting to the Default CoS-to-Transmit Queue and Drop Threshold Mapping

Displaying QoS Information

Reverting to QoS Defaults

Disabling QoS


Note Because entering some QoS commands disables and then reenables ports (which can cause spanning tree topology changes), enter QoS commands only when necessary.


Enabling QoS Globally

To enable QoS globally on the switch, 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 Default CoS Value for the Switch

QoS assigns unclassified frames received on a port a CoS value. The default CoS value is zero.

To set the default CoS value, perform this task in privileged mode:

 
Task
Command

Step 1 

Set the CoS value for the switch.

set qos defaultcos cos-value

Step 2 

Verify the CoS value of the switch.

show qos info [runtime | config]

This example shows how to set CoS equal to 7 in all unclassified frames received on the switch and verify the configuration:

Console> (enable) set qos defaultcos 7
qos defaultcos set to 7
Console> (enable)

Reverting to the Default Switch CoS Value

To revert to the default switch CoS value, perform this task in privileged mode:

 
Task
Command

Step 1 

Revert to the default CoS value for the switch.

clear qos defaultcos

Step 2 

Verify that the default CoS value was restored.

show qos info [runtime | config]

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

Console> (enable) clear qos defaultcos
qos defaultcos setting cleared.
Console> (enable)

Mapping CoS Values to Transmit Queues and Drop Thresholds

Use the set qos map command to associate CoS values to transmit queue drop thresholds.

The port_type is hardware dependent. Use the show port capabilities command to determine the port_type for your hardware. The port type is defined by the number of transmit queues and the number of drop thresholds supported on the port. For example, the 2q1t port type supports two transmit queues and one drop threshold.

The q# is the transmit queue number. The threshold# is the drop threshold number for the specified queue. The cos_list is the list of CoS values to map to the specified transmit queue and drop threshold. CoS values must be specified in pairs (0-1, 2-3, 4-5, and 6-7).

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

Task
Command

Associate a CoS value to a transmit queue and drop threshold.

set qos map port_type q# threshold# cos cos_list


This example shows how to map CoS values 4 through 7 to the second transmit queue and the first drop threshold for that queue on a 2q1t port:

Console> (enable) set qos map 2q1t 2 1 cos 4-7
Qos tx priority queue and threshold mapped to cos successfully.
Console> (enable)

Reverting to the Default CoS-to-Transmit Queue and Drop Threshold Mapping

Use the clear qos map command to revert to the default CoS-to-transmit queue and drop threshold mappings. The port_type is hardware dependent. Use the show port capabilities command to determine the port_type for your hardware.

To revert to default CoS-to-transmit queue and drop threshold mappings, perform this task in privileged mode:

Task
Command

Revert to default CoS-to-transmit queue and drop threshold mappings.

clear qos map port_type


This example shows how to return the CoS-to-transmit queue and drop threshold mappings to the default values on 2q1t ports:

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

Displaying QoS Information

To display QoS information, perform this task:

Task
Command

Display QoS information.

show qos info [runtime | config]


This example shows how to display the current QoS configuration information for the switch:

Console> show qos info config
QoS setting in NVRAM:
QoS is enabled
All ports have 2 transmit queues with 1 drop thresholds (2q1t).
Default CoS = 4    
Queue and Threshold Mapping:
Queue Threshold CoS            
----- --------- ---------------
1     1         0 1 2 3 
2     1         4 5 6 7 
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:

Tas
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)