Table Of Contents
Configuring Quality of Service
Understanding How QoS Works
Overview of QoS
QoS Terminology
Understanding Classification and Marking
Understanding Classification and Marking at the Ingress Port
Understanding Classification and Marking Based on Destination
Understanding Classification and Marking Based on an ACE
Understanding Scheduling
Hardware and Software Requirements
QoS Default Configuration
Configuring QoS
Enabling QoS Globally
Configuring the Default CoS Value for the Switch
Configuring the CoS Value for a Port
Reverting to the Default Switch CoS Value
Reverting to the Default Port CoS Value
Mapping a CoS Value to a Host Destination MAC Address and VLAN Pair
Creating an Access Control Entry
Configuring the Router MAC Address
Removing a Router Address
Configuring Transmit Queue Drop Thresholds
Mapping CoS Values to Transmit Queues and Drop Thresholds
Reverting to the Default CoS-to-Transmit Queue and Drop Threshold Mapping
Displaying QoS Statistics
Displaying QoS Information
Reverting to QoS Defaults
Disabling QoS
Configuring COPS Support
Understanding QoS Policy
Selecting COPS as the QoS Policy Source
Selecting Locally Configured QoS Policy
Configuring Roles
Deleting Roles
Configuring Policy Decision Point Servers
Deleting the PDP Server Configuration
Configuring the COPS Domain Name
Deleting the COPS Domain Name
Configuring the COPS Communications Parameters
Displaying Download Policy
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
•
Hardware and 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
•
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 IEEE 802.1p class of service (CoS) values to frames at supported ingress ports. On the Catalyst 5000 family switches, for IPv4 traffic destined for a router, QoS can classify packets that match an access-control entry (ACE) by setting the IP precedence bits (in the IP header) and CoS value in the frame header.
QoS implements scheduling on supported egress ports with transmit queue drop thresholds and multiple transmit queues that use the IEEE 802.1p CoS values to give preference to higher-priority traffic. Figure 15-1 shows how QoS affects the traffic flow through a Catalyst 5000 family switch.
Note
Use the show port capabilities command to determine if ports on a specific module support QoS as shown in Figure 15-1.
Figure 15-1 Traffic Flow Through the Switch with QoS Enabled—Catalyst 5000 Family Switches
Figure 15-2 shows how QoS affects the traffic flow through a Catalyst 4000 family, 2948G,
or 2980G switch.
Figure 15-2 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 class of service (CoS) values—Layer 2 Inter-Switch Link (ISL) frame headers have a 1-byte User field that carries an IEEE 802.1p CoS value in the three least significant bits. Layer 2 IEEE 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 zero (low priority) and seven (high priority).
–
Layer 3 IP precedence values—The IP version 4 specification defines the three most significant bits of the 1-byte Type of Service (ToS) field as IP precedence, which is used to indicate priority. IP precedence values range between zero (low priority) and seven (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
These sections describe the three supported methods of classification and marking:
•
Understanding Classification and Marking at the Ingress Port
•
Understanding Classification and Marking Based on Destination
•
Understanding Classification and Marking Based on an ACE
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 ISL frame enters the switch through a supported ingress port, QoS accepts the three least significant bits in the User field as the CoS value.
•
When an 802.1Q frame enters the switch through a supported ingress port, QoS accepts the User Priority bits as the CoS value.
On the Catalyst 5000 family switches, QoS classifies and marks 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). On the Catalyst 4000 family, 2948G, and 2980G switches, 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 only support frame classification and marking on unclassified frames entering the switch. Destination-based and Layer 3 ACE-based classification is not supported.
Understanding Classification and Marking Based on Destination
On the Catalyst 5000 family switches, 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 and VLAN Pair" section). Destination-based marking overwrites any CoS value previously written, including port-based CoS values.
Understanding Classification and Marking Based on an ACE
On the Catalyst 5000 family switches, for IPv4 traffic destined for a router, QoS can perform classification of traffic that matches the parameters in an ACE under the following conditions:
•
If Multilayer Switching (MLS) is disabled, QoS can perform ACE-based classification of all traffic destined for a router. Specify router MAC addresses using the set qos router-mac command (see "Configuring the Router MAC Address" section).
•
If MLS is enabled:
–
QoS can perform ACE-based classification of all traffic destined for a router other than the Multilayer Switching Route Processor (MLS-RP). Specify router MAC addresses using the set qos router-mac command.
–
For traffic destined for the MLS-RP, QoS can perform ACE-based classification only for traffic that is switched using MLS. ACE-based classification is performed at the switch egress port as the flow is being multilayer switched. QoS cannot perform ACE-based classification on traffic that the MLS-RP routes off the switch. QoS learns the address of the MLS-RP automatically when MLS is configured on the switch.
Use the show mls entry qos command to display information about the Layer 3-switched traffic on which QoS has performed ACE-based classification. QoS might take up to 1 second to start ACE-based classification of Layer 3-switched traffic.
If ACE-based classification occurs, QoS sets the IP precedence bits in the IP header to match the CoS value. ACE-based marking overwrites any CoS value previously written, including port-based and destination-based CoS values.
These parameters can be specified in an ACE:
•
Layer 3 destination IP address and netmask
•
Layer 3 source IP address and netmask
•
Layer 4 protocol (tcp, udp, or any)
•
Layer 4 destination port number (can be a wildcard)
•
Layer 4 source port number (can be a wildcard)
For information on configuring ACEs, see the "Creating an Access Control Entry" section.
Understanding Scheduling
On the Catalyst 5000 family switches, there is one non-user-configurable transmit queue and four user-configurable transmit queue drop thresholds for each port. Ports of this type are specified using the 1q4t keyword in QoS-related commands.
QoS uses the transmit queue drop thresholds to schedule transmission of network traffic from the switch through supported egress ports. By default, the four transmit queue drop thresholds function as follows:
•
Threshold 1—Frames with CoS 0 or 1 are dropped when the transmit queue buffer is 30 percent full.
•
Threshold 2—Frames with CoS 2 or 3 are dropped when the transmit queue buffer is 50 percent full.
•
Threshold 3—Frames with CoS 4 or 5 are dropped when the transmit queue buffer is 80 percent full.
•
Threshold 4—Frames with CoS 6 or 7 are dropped when the transmit queue buffer is 100 percent full.
Note
To configure the transmit queue drop threshold percentages on the Catalyst 5000 family switches, see the "Configuring Transmit Queue Drop Thresholds" section. To configure the CoS values mapped to each threshold on the Catalyst 5000 family switches, see the "Mapping CoS Values to Transmit Queues and Drop Thresholds" section. All 1q4t ports in the switch use the same drop threshold configuration.
On the Catalyst 4000 family, 2948G, and 2980G switches, there are two user-configurable transmit queues and a single non-user-configurable transmit queue drop threshold for each port. Ports of this type are specified 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 
On the Catalyst 4000 family, 2948G, and 2980G switches, when QoS is disabled, unicast traffic is assigned to queue 1 and broadcast, multicast, and unknown traffic is assigned 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 on the Catalyst 4000 family, 2948G, and 2980G switches, see the "Mapping CoS Values to Transmit Queues and Drop Thresholds" section.
Hardware and Software Requirements
QoS requires these software and hardware versions:
•
Supervisor engine software:
–
Catalyst 5000 family switches—Software release 5.1 or later
–
Catalyst 4000 family, 2948G, and 2980G switches—Software release 5.2 or later
On Catalyst 5000 family switches, the following hardware is required:
•
Supervisor Engine II G or III G; or Supervisor Engine III or III F with a NetFlow Feature Card II (NFFC II)
•
One or more Ethernet switching modules that support QoS (QoS requires that traffic is received and transmitted on supported ports):
–
4-port 10/100BaseTX Fast EtherChannel uplink module (WS-U5537-FETX)
–
4-port 100BaseFX MMF MT-RJ Fast EtherChannel uplink module (WS-U5538-FEFX-MMF)
–
24-port 10/100BaseTX Fast Ethernet RJ-45 (WS-X5234-RJ45)
–
24-port 100BaseFX Fast Ethernet MT-RJ (WS-X5236-FX-MT)
–
36-port 10/100BaseTX Fast Ethernet Telco (WS-X5239-RJ21)
Use the show port capabilities command to determine the specific QoS support for a module.
QoS Default Configuration
Table 15-1 shows the QoS default configuration.
Table 15-1 QoS Default Configuration
Feature
|
Default Value
|
QoS global enable state
|
Disabled
|
Port CoS value (Catalyst 5000 family)
|
0
|
Switch CoS value (Catalyst 4000 family, 2948G, and 2980G )
|
0
|
Transmit queue drop threshold percentages
|
Catalyst 5000 family:
• Threshold 1: 30%
• Threshold 2: 50%
• Threshold 3: 80%
• Threshold 4: 100%
Catalyst 4000 family, 2948G, and 2980G:
• Threshold 1: 100%1
|
CoS value-to-drop threshold mapping
|
Catalyst 5000 family:
• Transmit queue drop threshold 1: CoS 0-1
• Transmit queue drop threshold 2: CoS 2-3
• Transmit queue drop threshold 3: CoS 4-5
• Transmit queue drop threshold 4: CoS 6-7
Catalyst 4000 family, 2948G, and 2980G:
• Transmit queue drop threshold 1: CoS 0-71.
|
CoS value-to-transmit queue mapping
|
Catalyst 5000 family:
• Transmit queue 1: CoS 0-71.
Catalyst 4000 family, 2948G, and 2980G:
• Transmit queue 1: CoS 0-7
• Transmit queue 2: None configured
|
Configuring QoS
These sections describe how to configure QoS:
•
Enabling QoS Globally
•
Configuring the Default CoS Value for the Switch
•
Configuring the CoS Value for a Port
•
Reverting to the Default Switch CoS Value
•
Reverting to the Default Port CoS Value
•
Mapping a CoS Value to a Host Destination MAC Address and VLAN Pair
•
Creating an Access Control Entry
•
Configuring the Router MAC Address
•
Removing a Router Address
•
Configuring Transmit Queue Drop Thresholds
•
Mapping CoS Values to Transmit Queues and Drop Thresholds
•
Reverting to the Default CoS-to-Transmit Queue and Drop Threshold Mapping
•
Displaying QoS Statistics
•
Displaying QoS Information
•
Reverting to QoS Defaults
•
Disabling QoS
•
Configuring COPS Support
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
Configuring the Default CoS Value for the Switch
On the Catalyst 4000 family, 2948G, and 2980G switches, QoS assigns unclassified frames received on any port on the switch that the CoS value configured for the switch. The default CoS value is zero.
Note
You cannot configure a switch-default CoS value on the Catalyst 5000 family switches.
To set the default CoS value for a Catalyst 4000 family, 2948G, or 2980G switch, 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
Configuring the CoS Value for a Port
On the Catalyst 5000 family switches, QoS assigns to unclassified frames received through a supported port the CoS value configured for that port. The default CoS value is zero.
Note
You cannot configure port-specific CoS values on the Catalyst 4000 family, 2948G, and 2980G switches.
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
Port 8/1 has 1 transmit queue with 4 drop thresholds (1q4t).
Reverting to the Default Switch CoS Value
On the Catalyst 4000 family, 2948G, and 2980G switches, 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.
Reverting to the Default Port CoS Value
On the Catalyst 5000 family switches, to revert to the default CoS value for a port, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Revert to the default CoS value for a port.
|
clear port qos mod_num/port_num cos
|
Step 2
|
Verify that the default CoS value was restored.
|
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
Port 8/1 has 1 transmit queue with 4 drop thresholds (1q4t).
Mapping a CoS Value to a Host Destination MAC Address and VLAN Pair
Note
You cannot map MAC address and VLAN pairs to CoS values on the Catalyst 4000 family, 2948G, and 2980G switches.
To assign a CoS value to all frames destined for a particular host destination MAC address and VLAN number pair, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Assign a CoS value to a host destination MAC address/VLAN number 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 number pair 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
---- ------------------ ---
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.
Note
You cannot configure ACEs on the Catalyst 4000 family, 2948G, and 2980G switches.
The dest_addr/netmask parameter is the destination IP address and netmask. The src_addr/netmask parameter is the source IP address and netmask. The cos (CoS) parameter range is 0-7. The address and netmask 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, ACEs 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 src_ip_addr_spec dest_ip_addr_spec [before ACE# | modify ACE#]
set qos ip-filter cos {tcp | udp | any} src_ip_addr_spec src_port dest_ip_addr_spec dest_port [before ACE# | modify ACE#]
|
Step 2
|
Verify the entry.
|
show qos ip [runtime]
|
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 255.255.255.0 200.200.1.1 255.255.255.0
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/255.255.255.0 200.200.1.1/255.255.255.0
Protocol Dst Port Src Port CoS
-------- -------- -------- ---
Console> (enable) set qos ip 4 tcp 120.100.1.1 255.255.255.0 47 210.210.1.1 255.255.255.0 23
qos ip-filter is set successfully.
Console> (enable) show qos ip
There are 2 IP filter(s).
ACE# Dest IP/Mask Src IP/Mask
---- -------------------------------- --------------------------------
1 100.100.1.1/255.255.255.0 200.200.1.1/255.255.255.0
Protocol Dst Port Src Port CoS
-------- -------- -------- ---
2 120.100.1.1/255.255.255.0 210.210.1.1/255.255.255.0
Protocol Dst Port Src Port CoS
-------- -------- -------- ---
Console> (enable) set qos ip-filter 1 20.20.20.1 255.0.0.0 30.30.1. 255.0.0.0 before 1
qos ip-filter is set successfully.
Console> (enable) show 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
-------- -------- -------- ---
2 100.100.1.1/255.255.255.0 200.200.1.1/255.255.255.0
Protocol Dst Port Src Port CoS
-------- -------- -------- ---
3 120.100.1.1/255.255.255.0 210.210.1.1/255.255.255.0
Protocol Dst Port Src Port CoS
-------- -------- -------- ---
Configuring the Router MAC Address
Note
You cannot specify router MAC addresses on the Catalyst 4000 family, 2948G, and 2980G switches.
To configure a router MAC address to use with QoS (except for MLS-RP), 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 #
---------------------------------
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.
Configuring Transmit Queue Drop Thresholds
Use the set qos wred-threshold command to set the transmit queue drop thresholds.
Note
You cannot configure transmit queue drop thresholds on the Catalyst 4000 family, 2948G, and 2980G switches.
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 1q4t port type supports one transmit queue and four drop thresholds.
The q# is the transmit queue number. The thresholds are specified as percentages, ranging from 1 to 100. A value of 10 indicates a threshold when the buffer is 10 percent full. The number of threshold percentages you can specify depends on the port_type.
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 port_type tx queue q# threshold_percentage_values
|
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%
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 1q4t port type supports one transmit queue and four drop thresholds.
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. On the Catalyst 4000 family, 2948G, and 2980G switches, 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 assign the CoS values 4 through 7 to the first transmit queue and the second drop threshold for that queue on a 1q4t port (Catalyst 5000 family switches):
Console> (enable) set qos map 1q4t 1 2 cos 4-7
Qos tx priority queue and threshold mapped to cos successfully.
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 (Catalyst 4000 family and 2926G switches):
Console> (enable) set qos map 2q1t 2 1 cos 4-7
Qos tx priority queue and threshold mapped to cos successfully.
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 the 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 1q4t ports (Catalyst 5000 family switches):
Console> (enable) clear qos map 1q4t
This example shows how to return the CoS-to-transmit queue and drop threshold mappings to the default values on 2q1t ports (Catalyst 4000 family, 2948G, and 2980G switches):
Console> (enable) clear qos map 2q1t
Displaying QoS Statistics
Note
The show qos statistics command is not supported on the Catalyst 4000 family, 2948G, and 2980G switches.
To display QoS statistics, perform this task:
Task
|
Command
|
Display 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
Displaying QoS Information
To display QoS information, perform one of these tasks:
Task
|
Command
|
Catalyst 5000 family switches:
|
• Display QoS information.
|
show qos info [runtime | config] mod_num/port_num
|
• Display QoS information about the transmit queues.
|
show qos info config port_type tx
|
Catalyst 4000 family, 2948G, and 2980G switches:
|
• Display QoS information.
|
show qos info [runtime | config]
|
This example shows how to display the QoS information currently in NVRAM for port 8/1:
Console> show qos info runtime 8/1
Port 8/1 has 1 transmit queue with 4 drop thresholds (1q4t).
Queue and Threshold Mapping:
----- --------- ---------------
Queue # Thresholds in percentage ( in abs values )
------- ------------------------------------------
1 14% (16380 bytes) 28% (32764 bytes) 57% (65532 bytes) 100% (131068 bytes)
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:
Queue and Threshold Mapping:
----- --------- ---------------
Queue # Thresholds in percentage ( in abs values )
------- ------------------------------------------
This example shows how to display the current QoS configuration information for the switch (Catalyst 4000 family, 2948G, and 2980G switches):
Console> show qos info config
All ports have 2 transmit queues with 1 drop thresholds (2q1t).
Queue and Threshold Mapping:
----- --------- ---------------
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
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
Configuring COPS Support
Note
QoS only supports the commands in this section when it is configured on a switch with a Layer 3 switching engine.
These sections describe configuring Common Open Policy Service (COPS) support:
•
Understanding QoS Policy
•
Selecting COPS as the QoS Policy Source
•
Selecting Locally Configured QoS Policy
•
Configuring Roles
•
Deleting Roles
•
Configuring Policy Decision Point Servers
•
Deleting the PDP Server Configuration
•
Configuring the COPS Domain Name
•
Deleting the COPS Domain Name
•
Configuring the COPS Communications Parameters
•
Displaying Download Policy
Note
Throughout this guide and all Catalyst 5000 family documents, the term COPS refers to COPS support as implemented on the Catalyst 5000 family.
Understanding QoS Policy
The term QoS policy refers to the QoS values, such as how packets are classified and scheduled as they pass through the switch.
A valid QoS router MAC address must be configured for COPS to activate. Only the packets destined for the configured router will be classified. For more information on configuring the router MAC address, see "Configuring the Router MAC Address" on page 13.
Selecting COPS as the QoS Policy Source
QoS uses locally configured QoS values as the default QoS policy source. To select COPS as the QoS policy source, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Select COPS as the QoS policy source.
|
set qos policy-source {local | cops}
|
Step 2
|
Verify the QoS policy source.
|
show qos policy-source
|
This example shows how to select COPS as the QoS policy source:
Console> (enable) set qos policy-source cops
QoS policy source for the switch set to COPS.
Console> (enable) show qos policy-source
QoS policy source for the switch set to COPS.
QoS runtime policy source for the switch is local.
When you select COPS as the QoS policy source, the following values switch from locally configured values to received COPS values:
•
Named and default ACL (list of ACEs) definitions
•
CoS-to-queue assignments
•
Threshold configuration
Selecting Locally Configured QoS Policy
To select locally configured QoS policy, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Select locally configured QoS policy.
|
set qos policy-source {local | cops}
|
Step 2
|
Verify the QoS policy source.
|
show qos policy-source
|
This example shows how to select locally configured QoS policy:
Console> (enable) set qos policy-source local
QoS policy source for the switch set to local.
Console> (enable) show qos policy-source
QoS policy source for the switch set to local.
Configuring Roles
COPS does not configure ports using slot number and port number parameters. COPS uses roles that you create and assign to the switch.
A role is a name that describes the capability of ports (for example, access or mod2_1-4). Only one role combination, with up to 64 roles, can be assigned per switch. You can assign more than one role name to a switch (for example, mod2ports1-12 and access), with the limitation that the combined length of role names cannot exceed 255 characters.
The role name can be up to 31 characters long, and is not case-sensitive, but may include uppercase and lowercase letters, consisting of a-z and A-Z, and numbers 0-9, the dash character (-), the underscore character (_), and the period character (.). Role names must start with an alphabetic character.
When you first assign a new role to a switch, the role is created.
To assign roles to a switch, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Assign roles to a port ASIC.
|
set cops roles role1 [role2] ...
|
Step 2
|
Verify the roles for the port.
|
show cops roles
|
This example shows how to assign two new roles to the switch:
Console> (enable) set cops roles backbone access
New role `backbone' created.
New role `access' created.
Roles added successfully.
Deleting Roles
To delete a role (which removes it from all ports), perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Delete a role.
|
clear cops {all-roles | roles role1 [role2] ...}
|
Step 2
|
Verify the roles for the port.
|
show cops roles
|
This example shows how to delete a role:
Console> (enable) clear cops roles backbone_port main_port
Configuring Policy Decision Point Servers
Note
COPS can use the same policy decision point (PDP) server.
COPS obtains QoS policy from a PDP server. You need to configure a primary PDP server and, optionally, a backup PDP server to obtain QoS policy.
To configure a PDP server, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Configure a PDP server.
|
set cops server ip_address [port] [primary]
|
Step 2
|
Verify the PDP server configuration.
|
show cops info
|
The ip_address parameter can be the IP address or name of the server.
The port variable is the PDP server TCP port number.
The first ip_address address specified is set as the primary server. If an additional ip_address is set as a COPS server, it becomes the secondary server, unless specified as primary. The previously entered ip_address becomes the secondary server.
This example shows how to configure a PDP server:
Console> (enable) set cops server my_server1 primary
my_server1 added to the COPS diff-serv server table as primary server.
my_server1 added to the COPS rsvp server table as primary server.
Deleting the PDP Server Configuration
To delete the PDP server configuration, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Delete the PDP server configuration.
|
clear cops server {all | ip_address}
|
Step 2
|
Verify the PDP server configuration.
|
show cops info
|
This example shows how to delete PDP server configuration:
Console> (enable) clear cops server all
All COPS diff-serv servers cleared.
All COPS rsvp servers cleared.
Configuring the COPS Domain Name
PDP servers use a COPS domain name to communicate with policy enforcement point (PEP) devices such as switches. To configure a COPS domain name for the switch, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Configure the COPS domain name.
|
set cops domain-name domain_name
|
Step 2
|
Verify the COPS domain name.
|
show cops info
|
This example shows how to configure a COPS domain name:
Console> (enable) set cops domain-name my_domain
Domain name set to my_domain.
Deleting the COPS Domain Name
To delete the COPS domain name, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Delete the COPS domain name.
|
clear cops domain-name
|
Step 2
|
Verify the configuration.
|
show cops info
|
This example shows how to delete the COPS domain name:
Console> (enable) clear cops domain-name
Configuring the COPS Communications Parameters
To configure the parameters that COPS uses to communicate with the PDP server, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Configure the parameters that COPS uses to communicate with the PDP server.
|
set cops retry-interval initial increment maximum
|
Step 2
|
Verify the configuration.
|
show cops info
|
Enter the parameters as a number of seconds in the range 0 to 65535. The value of the initial parameter plus the value of the increment parameter must not exceed the value of the maximum parameter.
This example shows how to configure the parameters that COPS uses to communicate with the PDP server:
Console> (enable) set cops retry-interval 15 1 30
Connection retry intervals set.
Displaying Download Policy
To display the runtime policy for the switch, use the following commands:
Task
|
Command
|
• Display the QoS policy source information.
|
show qos policy-source
|
• Display the access control list.
|
show qos ip [runtime]
|
• Display QoS-related information for a specified port.
|
show qos info [runtime]
|
• Display the COPS policy tree information.
|
show cops pib
|
This example shows how to view the QoS policy source:
Console> show qos policy-source
QoS policy source for the switch set to local.
QoS runtime policy source for the switch is local.
This example shows how to display the access control list and its details when cops is disabled:
Console> (enable) show qos ip runtime
There are 1 IP filter(s).
ACE# Src IP and Mask Dest IP and Mask
---- -------------------------------- --------------------------------
1 171.33.22.7 0.0.0.255 172.22.33.5 0.0.255.255
Protocol Src Port Dst Port CoS Action
-------- -------- -------- --- ------
This example shows how to display the current QoS runtime information for a port:
Console> show qos info runtime 8/1
Port 8/1 has 1 transmit queue with 4 drop thresholds (1q4t).
Queue and Threshold Mapping:
----- --------- ---------------
Queue # Thresholds in percentage ( in abs values )
------- ------------------------------------------
1 14% (16380 bytes) 28% (32764 bytes) 57% (65532 bytes) 100% (131068 bytes)
This example shows how to display COPS policy tree information:
------------------------------- ------ ---- ----- -----
QosDevicePibIncarnationTable 1 0 Unsigned32 1
1 DisplayStr g1lab-pc4.cisco.com
30.30.30.30.30.30.30.30.39.34.37.32.37.35.35.35.31.30.36.31.23.30.39.34.37.32.37.35.35.35
.31.23.35.62.66.36.32.31.30.32.38.65.37.31.65.38.37.30.23.31.23
QosDeviceAttributeTable 1 0 Unsigned32 1
QosInterfaceTypeTable 2 0 Unsigned32 2
QosAggregateTable - - - -
QosMacClassificationTable - - - -
QosIpAceTable 5346 0 Unsigned32 5346
2 IpAddress 255.255.255.255
QosIfDropPreferenceTable 3642 0 Unsigned32 3642
QosIfTailDropTable - - - -
QosIfWeightsTable - - - -