- Index
- Preface
- Product Overview
- Command-Line Interfaces
- Configuring the Switch for the First Time
- Administering the Switch
- Configuring the Cisco IOS In-Service Software Upgrade Process
- Configuring Interfaces
- Checking Port Status and Connectivity
- Configuring Supervisor Engine Redundancy Using RPR and SSO
- Configuring Cisco NSF with SSO Supervisor Engine Redundancy
- Environmental Monitoring and Power Management
- Configuring Power over Ethernet
- Configuring NetWork Assista nt
- Configuring VLANs
- Configuring IP Unnumbered Interface
- Configuring Layer 2 Ethernet Interfaces
- Configuring SmartPort Macros
- Configuring Auto SmartPort Macros
- Configuring Spanning Tree
- Configuring Flex Links and MAC Address-Table Move Update
- Configuring Resilient Ethernet Protocol
- Configuring Enhanced Spanning Tree Features
- Configuring EtherChannel and Link State Tracking
- Configuring IGMP Snooping and Filtering
- Configuring MLD Snooping
- Configuring 802.1Q Tunneling, VLAN Mapping, and Layer 2 Protocol Tunneling
- Configuring CDP
- Configuring LLDP, LLDP-MED, and Location Service
- Configuring UDLD
- Configuring Unidirectional Ethernet
- Configuring Layer 3 Interfaces
- Configuring Cisco Express Forwarding
- Configuring Unicast Reverse Path Forwarding
- Configuring IP Multicast
- Configuring ANCP Client
- Configuring Policy-Based Routing
- Configuring VRF
- Configuring Quality of Service
- Configuring Voice Interfaces
- Configuring Private VLANs
- Configuring 802.1X Port-Based Authentication
- Configuring the PPPoE Intermediate Agent
- Configuring Web-based Authentication
- Configuring Port Security
- Configuring Control Plane Policing and Layer 2 Control Packet QoS
- Configuring DHCP Snooping, IP Source Guard, and IPSG for Static Hosts
- Configuring Dynamic ARP Inspection
- Configuring Network Security with ACL
- Support for IPv6
- Port Unicast and Multicast Flood Blocking
- Configuring Storm Control
- Configuring SPAN
- Configuring System Message Logging
- Configuring OBFL
- Configuring SNMP
- Configuring NetFlow-lite
- Configuring NetFlow Switching
- Configuring CFM and OAM
- Configuring Y1731
- Configuring Call Home
- Configuring Cisco IOS IP SLA Operations
- Configuring RMON
- Performing Diagnostics
- Configuring WCCP
- ROM Monitor
- Configuring MIB Support
- Acronyms
- About QoS
- Configuring QoS on Supervisor Engines II-Plus, II+10GE, IV, V, V-10GE, 4924, 4948, and 4948-10GE
- Default QoS Configuration
- Configuration Guidelines
- Enabling QoS Globally
- Enabling IP DSCP Rewrite
- Configuring a Trusted Boundary to Ensure Port Security
- Enabling Dynamic Buffer Limiting
- Creating Named Aggregate Policers
- Configuring a QoS Policy
- Configuring CoS Mutation
- Configuring User-Based Rate-Limiting
- Configuring Hierarchical Policers
- Enabling Per-Port Per-VLAN QoS
- Enabling or Disabling QoS on an Interface
- Configuring VLAN-Based QoS on Layer 2 Interfaces
- Configuring the Trust State of Interfaces
- Configuring the CoS Value for an Interface
- Configuring DSCP Values for an Interface
- Configuring Transmit Queues
- Configuring DSCP Maps
- MQC-Based QoS Configuration
- MQC-Based QoS on the Supervisor Engine 6-E and 6L-E
- Platform-Supported Classification Criteria and QoS Features
- Platform Hardware Capabilities
- Prerequisites for Applying a QoS Service Policy
- Restrictions for Applying a QoS Service Policy
- Classification
- Policing
- Marking Network Traffic
- Shaping, Sharing (Bandwidth), Priority Queuing, Queue-Limiting and DBL
- Configuring CoS Mutation
- Configuring System Queue Limit
Configuring Quality of Service
Note QoS functionality on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E are equivalent.
This chapter describes how to configure quality of service (QoS) by using automatic QoS (auto-QoS) commands or by using standard QoS commands on a Catalyst 4500 series switch. It describes how to specify QoS configuration on different types of interfaces (access, Layer 2 trunk, Layer 3 routed, EtherChannel) as well as VLANs. It also describes how to specify different QoS configurations on different VLANs on a given interface (per-port per-VLAN QoS). This chapter describes QoS support on Supervisor Engines II-Plus to V-10GE, Supervisor Engine 6-E, and Supervisor Engine 6L-E.
The QoS configuration model supported on Supervisor Engines II-Plus to V-10G is called the
switch qos model. However, Supervisor Engine 6-E and Supervisor Engine 6L-E support a different QoS configuration model known as MQC (Modular QoS CLI). Refer to the appropriate configuration section for the supervisor engine on which QoS will be configured. For more information about MQC, see the
“Modular Quality of Service Command-Line Interface” section of the
Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.3.
This chapter includes of these sections:
- About QoS
- Configuring QoS on Supervisor Engines II-Plus, II+10GE, IV, V, V-10GE, 4924, 4948, and 4948-10GE
- Configuring Auto-QoS on Supervisor Engines II-Plus, II+10GE, IV, V, V-10GE, 4924, 4948, and 4948-10GE
- Configuring QoS on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E
- Configuring Auto-QoS on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E
Note For complete syntax and usage information for the switch commands used in this chapter, see the Cisco Catalyst 4500 Series Switch Command Reference and related publications at this location:
http://www.cisco.com/en/US/products/hw/switches/ps4324/index.html
If the command is not found in the Cisco Catalyst 4500 Command Reference, you can locate it in the larger Cisco IOS library. Refer to the Cisco IOS Command Reference and related publications at this location:
http://www.cisco.com/en/US/products/ps6350/index.html
About 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 (both unicast and multicast), prioritizes it according to its relative importance, and uses congestion avoidance to provide priority-indexed treatment; QoS can also limit the bandwidth used by network traffic. QoS can make network performance more predictable and bandwidth utilization more effective.
This section includes the following subsections:
- Prioritization
- QoS Terminology
- Basic QoS Model
- Classification
- Policing and Marking
- Mapping Tables
- Queueing and Scheduling
- Packet Modification
- Per-Port Per-VLAN QoS
- QoS and Software Processed Packets
Prioritization
QoS implementation is based on the DiffServ architecture. This architecture specifies that each packet is classified upon entry into the network. The classification is carried in the IP packet header, using 6 bits from the deprecated IP type of service (ToS) field to carry the classification ( class) information. Classification can also be carried in the Layer 2 frame. These special bits in the Layer 2 frame or a Layer 3 packet are described here and shown in Figure 1-1:
– Layer 2 Inter-Switch Link (ISL) frame headers have a 1-byte User field that carries an IEEE 802.1p class of service (CoS) value in the three least-significant bits. On interfaces configured as Layer 2 ISL trunks, all traffic is in ISL frames.
– 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, which are called the User Priority bits. On interfaces configured as Layer 2 802.1Q trunks, all traffic is in 802.1Q frames except for traffic in the native VLAN.
– Other frame types cannot carry Layer 2 CoS values.
– Layer 2 CoS values range from 0 for low priority to 7 for high priority.
– Layer 3 IP packets can carry either an IP precedence value or a Differentiated Services Code Point (DSCP) value. QoS supports the use of either value because DSCP values are backward-compatible with IP precedence values.
– IP precedence values range from 0 to 7.
– DSCP values range from 0 to 63.
Figure 1-1 QoS Classification Layers in Frames and Packets
All switches and routers across the Internet rely on the class information to provide the same forwarding treatment to packets with the same class information and different treatment to packets with different class information. The class information in the packet can be assigned by end hosts or by switches or routers along the way, based on a configured policy, detailed examination of the packet, or both. Detailed examination of the packet is expected to happen closer to the edge of the network so that the core switches and routers are not overloaded.
Switches and routers along the path can use the class information to limit the amount of resources allocated per traffic class. The behavior of an individual device when handling traffic in the DiffServ architecture is called per-hop behavior. If all devices along a path provide a consistent per-hop behavior, you can construct an end-to-end QoS solution.
Implementing QoS in your network can be a simple or complex task and depends on the QoS features offered by your internetworking devices, the traffic types and patterns in your network, and the granularity of control you need over incoming and outgoing traffic.
QoS Terminology
The following terms are used when discussing QoS features:
- Packets carry traffic at Layer 3.
- Frames carry traffic at Layer 2. Layer 2 frames carry Layer 3 packets.
- Labels are prioritization values carried in Layer 3 packets and Layer 2 frames:
– Layer 2 class of service (CoS) values, which range between zero for low priority and seven for high priority:
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 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 Layer 2 CoS values.
Note On interfaces configured as Layer 2 ISL trunks, all traffic is in ISL frames. On interfaces configured as Layer 2 802.1Q trunks, all traffic is in 802.1Q frames except for traffic in the native VLAN.
– Layer 3 IP precedence values—The IP version 4 specification defines the three most significant bits of the 1-byte ToS field as IP precedence. IP precedence values range between zero for low priority and seven for high priority.
– Layer 3 differentiated services code point (DSCP) values—The Internet Engineering Task Force (IETF) has defined the six most significant bits of the 1-byte IP ToS field as the DSCP. The per-hop behavior represented by a particular DSCP value is configurable. DSCP values range between 0 and 63. For more information, see the “Configuring DSCP Maps” section.
Note Layer 3 IP packets can carry either an IP precedence value or a DSCP value. QoS supports the use of either value, since DSCP values are backwards compatible with IP precedence values. See Table 1-1.
Precedence |
|
DSCP |
|
Precedence |
|
DSCP |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
- Classification is the selection of traffic to be marked.
- Marking , according to RFC 2475, is the process of setting a Layer 3 DSCP value in a packet; in this publication, the definition of marking is extended to include setting Layer 2 CoS values.
- Scheduling is the assignment of Layer 2 frames to a queue. QoS assigns frames to a queue based on internal DSCP values as shown in Internal DSCP Values.
- Policing is limiting bandwidth used by a flow of traffic. Policing can mark or drop traffic.
Basic QoS Model
Figure 1-2 shows the basic QoS model (also referred to as Switch QoS model; it is not MQC compliant). Actions at the ingress and egress interfaces include classifying traffic, policing, and marking:
- Classifying distinguishes one kind of traffic from another. The process generates an internal DSCP for a packet, which identifies all the future QoS actions to be performed on this packet. For more information, see the “Classification” section.
- Policing determines whether a packet is in or out of profile by comparing the traffic rate to the configured policer, which limits the bandwidth consumed by a flow of traffic. The result of this determination is passed to the marker. For more information, see the “Policing and Marking” section.
- Marking evaluates the policer configuration information regarding the action to be taken when a packet is out of profile and decides what to do with the packet (pass through a packet without modification, mark down the DSCP value in the packet, or drop the packet). For more information, see the “Policing and Marking” section.
Actions at the egress interface include queueing and scheduling:
- Queueing evaluates the internal DSCP and determines which of the four egress queues in which to place the packet.
- Scheduling services the four egress (transmit) queues based on the sharing and shaping configuration of the egress (transmit) port. Sharing and shaping configurations are described in the “Queueing and Scheduling” section.
Classification
Classification is the process of distinguishing one kind of traffic from another by examining the fields in the packet. Classification is enabled only if QoS is globally enabled on the switch. By default, QoS is globally disabled, so no classification occurs.
You specify which fields in the frame or packet that you want to use to classify incoming traffic.
Classification options are shown in Figure 1-3.
For non-IP traffic, you have the following classification options:
- Use the port default. If the packet is a non-IP packet, assign the default port DSCP value to the incoming packet.
- Trust the CoS value in the incoming frame (configure the port to trust CoS). Next, use the configurable CoS-to-DSCP map to generate the internal DSCP value. Layer 2 ISL frame headers carry the CoS value in the three least-significant bits of the 1-byte User field. Layer 2 802.1Q frame headers carry the CoS value in the three most-significant bits of the Tag Control Information field. CoS values range from 0 for low priority to 7 for high priority. If the frame does not contain a CoS value, assign the default port CoS to the incoming frame.
The trust DSCP configuration is meaningless for non-IP traffic. If you configure a port with trust DSCP and non-IP traffic is received, the switch assigns the default port DSCP.
Note On a Catalyst 4948-10GE, Supervisor V-10GE, and Supervisor V, when you send non-IP traffic (such as IPX) from port 1 with.1Q tag and a Pri=x value, for all x values, the transmit CoS at the output interface varies as srcMac changes.
"trust dscp" in a policy map only works for IP packets. If a non-IP packet is matched by class with the “trust dscp" action, it could be transmitted with a random CoS value rather than treating the "trust dscp" as no-OP as assumed otherwise.
Workaround: Make the classification criteria in you class-maps more granular so that "trust dscp" is applied to a class that won't match non-IP packet. Separate the class-map matching both IP and non-IP packets into a set of class-maps so that "trust dscp" is applied to a class that matches only IPv4 traffic. For class-maps match non-IPv4 traffic, "trust cos" can be used.
For IP traffic, you have the following classification options:
- Trust the IP DSCP in the incoming packet (configure the port to trust DSCP), and assign the same DSCP to the packet for internal use. The IETF defines the six most-significant bits of the 1-byte type of service (ToS) field as the DSCP. The priority represented by a particular DSCP value is configurable. DSCP values range from 0 to 63.
- Trust the CoS value (if present) in the incoming packet, and generate the DSCP by using the CoS-to-DSCP map.
- Perform the classification based on a configured IP standard or extended ACL, which examines various fields in the IP header. If no ACL is configured, the packet is assigned the default DSCP based on the trust state of the ingress port; otherwise, the policy map specifies the DSCP to assign to the incoming frame.
Note It is not possible to classify traffic based on the markings performed by an input QoS policy. In the Catalyst 4500 platform, the input and output QoS lookup happen in parallel, and therefore, input marked DSCP value cannot be used to classify traffic in the output QoS policy.
Note It is not possible to classify traffic based on internal DSCP. The internal DSCP is purely an internal classification mechanism used for all packets to determine transmit queue and transmit CoS values only.
For information on the maps described in this section, see the “Mapping Tables” section. For configuration information on port trust states, see the “Configuring the Trust State of Interfaces” section.
Figure 1-3 Classification Flowchart
Classification Based on QoS ACLs
A packet can be classified for QoS using multiple match criteria, and the classification can specify whether the packet should match all of the specified match criteria or at least one of the match criteria. To define a QoS classifier, you can provide the match criteria using the match statements in a class map. In the match statements, you can specify the fields in the packet to match on, or you can use IP standard or IP extended ACLs. For more information, see the “Classification Based on Class Maps and Policy Maps” section.
If the class map is configured to match all the match criteria, then a packet must satisfy all the match statements in the class map before the QoS action is taken. The QoS action for the packet is not taken if the packet does not match even one match criterion in the class map.
If the class map is configured to match at least one match criterion, then a packet must satisfy at least one of the match statements in the class map before the QoS action is taken. The QoS action for the packet is not taken if the packet does not match any match criteria in the class map.
Note When you use the IP standard and IP extended ACLs, the permit and deny ACEs in the ACL have a slightly different meaning in the QoS context.
- If a packet encounters (and satisfies) an ACE with a permit, then the packet matches the match criterion in the QoS classification.
- If a packet encounters (and satisfies) an ACE with a deny, then the packet does not match the match criterion in the QoS classification.
- If no match with a permit action is encountered and all the ACEs have been examined, then the packet does not match the criterion in the QoS classification.
Note When creating an access list, remember that, by default, the end of the access list contains an implicit deny statement for everything if it did not find a match before reaching the end.
After a traffic class has been defined with the class map, you can create a policy that defines the QoS actions for a traffic class. A policy might contain multiple classes with actions specified for each one of them. A policy might include commands to classify the class as a particular aggregate (for example, assign a DSCP) or rate-limit the class. This policy is then attached to a particular port on which it becomes effective.
You implement IP ACLs to classify IP traffic by using the access-list global configuration command. For configuration information, see the “Configuring a QoS Policy” section.
Classification Based on Class Maps and Policy Maps
A class map is a mechanism that you use to isolate and name a specific traffic flow (or class) from all other traffic. The class map defines the criterion used to match against a specific traffic flow to further classify it; the criteria can include matching the access group defined by the ACL or matching a specific list of DSCP, IP precedence, or Layer 2 CoS values. If you have more than one type of traffic that you want to classify, you can create another class map and use a different name. After a packet is matched against the class map criteria, you can specify the QoS actions by using a policy map.
A policy map specifies the QoS actions for the traffic classes. Actions can include trusting the CoS or DSCP values in the traffic class; setting a specific DSCP or IP precedence value in the traffic class; or specifying the traffic bandwidth limitations and the action to take when the traffic is out of profile. Before a policy map can be effective, you must attach it to an interface.
You create a class map by using the class-map global configuration command. When you enter the class-map command, the switch enters the class map configuration mode. In this mode, you define the match criteria for the traffic by using the match class-map configuration command.
You create and name a policy map by using the policy-map global configuration command. When you enter this command, the switch enters the policy-map configuration mode. In this mode, you specify the actions to take on a specific traffic class by using the trust or set policy map configuration and policy map class configuration commands. To make the policy map effective, you attach it to an interface by using the service-policy interface configuration command.
The policy map can also contain commands that define the policer, (the bandwidth limitations of the traffic) and the action to take if the limits are exceeded. For more information, see the “Policing and Marking” section.
A policy map also has these characteristics:
- A policy map can contain up to 255 class statements.
- You can have different classes within a policy map.
- A policy map trust state supersedes an interface trust state.
For configuration information, see the “Configuring a QoS Policy” section.
Policing and Marking
After a packet is classified and has an internal DSCP value assigned to it, the policing and marking process can begin as shown in Figure 1-4.
Policing involves creating a policer that specifies the bandwidth limits for the traffic. Packets that exceed the limits are out of profile or nonconforming . Each policer specifies the action to take for packets that are in or out of profile. These actions, carried out by the marker, include passing using the packet without modification, dropping the packet, or marking down the packet with a new DSCP value that is obtained from the configurable policed-DSCP map. For information on the policed-DSCP map, see the “Mapping Tables” section.
You can create these types of policers:
QoS applies the bandwidth limits specified in the policer separately to each matched traffic class for each port/VLAN to which the policy map is attached to. You configure this type of policer within a policy map by using the police command under policy map class configuration mode.
QoS applies the bandwidth limits specified in an aggregate policer cumulatively to all matched traffic flows. You configure this type of policer by specifying the aggregate policer name within a policy map by using the police aggregate policy-map configuration command. You specify the bandwidth limits of the policer by using the qos aggregate-policer global configuration command. In this way, the aggregate policer is shared by multiple classes of traffic within a policy map.
With flow-based policing, all the identified flows are policed to the specified rate individually. Because the flows are dynamic, key distinguishing fields must be configured in class maps. Two flow-matching options are provided: source ip based (each flow with unique source IP address is considered a new flow) and destination ip based (each flow with unique destination IP address is considered as new flow). For information on flow-based policer configuration, see “Configuring User-Based Rate-Limiting” section.
When configuring policing and policers, observe these guidelines:
- On Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E, policers account only for the Layer 2 header length when calculating policer rates. In contrast, shapers account for header length as well as IPG in rate calculations. Starting with Cisco IOS Release 15.0(2)SG, Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E support the qos account layer-all encapsulation command which accounts for Layer 1 headers of 20 bytes (12 bytes preamble + 8 bytes IPG) and Layer 2 headers in policing features.
By default, on Supervisor Engine V-10GE and earlier supervisor engines, policer or shaping computation involves only IP payload information. You can include Layer 2 lengths and any overhead with the qos account layer2 encapsulation command.
For non-IP packets, the Layer 2 length as specified in the Layer 2 Header is used by the policer for policing computation. To specify additional Layer 2 encapsulation length when policing IP packets, use the qos account layer2 encapsulation command.
- By default, no policers are configured.
- Only the average rate and committed burst parameters are configurable.
- Policing for individual and aggregate policers can occur in ingress and egress interfaces.
– With the Supervisor Engine V-10GE (WS-X4516-10GE), 8192 policers are supported on ingress and on egress.
– With all other supervisor engines, 1024 policers are supported on ingress and on egress.
– The accuracy of the policer configured is +/- 1.5 percent.
Note Four policers in ingress and egress direction are reserved.
- Policers can be of individual or aggregate type. On the Supervisor Engine V-10GE, flow-based policers are supported.
- Policing for flow policers can occur on ingress Layer 3 interfaces only.
– 512 unique flow policers can be configured on the Supervisor Engine V-10GE.
Note Because one flow policer is reserved by software, 511 unique flow policers can be defined.
– Greater than 100,000 flows can be microflow policed.
- On an interface configured for QoS, all traffic received or sent using the interface is classified, policed, and marked according to the policy map attached to the interface. However, if the interface is configured to use VLAN-based QoS (using the qos vlan-based command), the traffic received or sent using the interface is classified, policed, and marked according to the policy map attached to the VLAN (configured on the VLAN interface) to which the packet belongs. If there is no policy map attached to the VLAN to which the packet belongs, the policy map attached to the interface is used.
- For 2 rate 3 colors (2r3c) policers, if no explicit violation-action is specified, the exceed-action is used as the violate-action.
After you configure the policy map and policing actions, attach the policy to an ingress or egress interface by using the service-policy interface configuration command. For configuration information, see the “Configuring a QoS Policy” section and the “Creating Named Aggregate Policers” section.
Figure 1-4 Policing and Marking Flowchart
Internal DSCP Values
Internal DSCP Sources
During processing, QoS represents the priority of all traffic (including non-IP traffic) with an internal DSCP value. QoS derives the internal DSCP value from the following:
- For trust-CoS traffic, from received or ingress interface Layer 2 CoS values
- For trust-DSCP traffic, from received or ingress interface DSCP values
- For untrusted traffic, from ingress interface DSCP value
The trust state of traffic is the trust state of the ingress interface unless set otherwise by a policy action for this traffic class.
QoS uses configurable mapping tables to derive the internal 6-bit DSCP value from CoS, which are 3-bit values (see the“Configuring DSCP Maps” section).
Egress ToS and CoS Sources
For egress IP traffic, QoS creates a ToS byte from the internal DSCP value and sends it to the egress interface to be written into IP packets. For trust-dscp and untrusted IP traffic, the ToS byte includes the original 2 least-significant bits from the received ToS byte.
Note The internal ToS value can mimic an IP precedence value (see Table 1-1).
For all egress traffic, QoS uses a configurable mapping table to derive a CoS value from the internal ToS value associated with traffic (see the “Configuring the DSCP-to-CoS Map” section). QoS sends the CoS value to be written into ISL and 802.1Q frames.
For traffic received on an ingress interface configured to trust CoS using the qos trust cos command, the transmit CoS is always the incoming packet CoS (or the ingress interface default CoS if the packet is received untagged).
When the interface trust state is not configured to trust dscp using the qos trust dscp command, the security and QoS ACL classification always use the interface DSCP and not the incoming packet DSCP.
Mapping Tables
During QoS processing, the switch represents the priority of all traffic (including non-IP traffic) with an internal DSCP value:
- During classification, QoS uses configurable mapping tables to derive the internal DSCP (a 6-bit value) from received CoS. These maps include the CoS-to-DSCP map.
- During policing, QoS can assign another DSCP value to an IP or non-IP packet (if the packet is out of profile and the policer specifies a marked down DSCP value). This configurable map is called the policed-DSCP map.
- Before the traffic reaches the scheduling stage, QoS uses the internal DSCP to select one of the four egress queues for output processing. The DSCP-to-egress queue mapping can be configured using the qos map dscp to tx-queue command.
The CoS-to-DSCP and DSCP-to-CoS map have default values that might or might not be appropriate for your network.
For configuration information, see the “Configuring DSCP Maps” section.
Queueing and Scheduling
Each physical port has four transmit queues (egress queues). Each packet that needs to be transmitted is enqueued to one of the transmit queues. The transmit queues are then serviced based on the transmit queue scheduling algorithm.
Once the final transmit DSCP is computed (including any markdown of DSCP), the transmit DSCP to transmit queue mapping configuration determines the transmit queue. The packet is placed in the transmit queue of the transmit port, determined from the transmit DSCP. Use the qos map dscp to tx-queue command to configure the transmit DSCP to transmit queue mapping. The transmit DSCP is the internal DSCP value if the packet is a non-IP packet as determined by the QoS policies and trust configuration on the ingress and egress ports.
For configuration information, see the “Configuring Transmit Queues” section.
Active Queue Management
Active queue management (AQM) informs you about congestion before a buffer overflow occurs. AQM is done using dynamic buffer limiting (DBL). DBL tracks the queue length for each traffic flow in the switch. When the queue length of a flow exceeds its limit, DBL drop packets or set the Explicit Congestion Notification (ECN) bits in the packet headers.
DBL classifies flows in two categories, adaptive and aggressive. Adaptive flows reduce the rate of packet transmission once it receives congestion notification. Aggressive flows do not take any corrective action in response to congestion notification. For every active flow the switch maintains two parameters, “buffersUsed” and “credits.” All flows start with “max-credits,” a global parameter. When a flow with credits less than “aggressive-credits” (another global parameter) it is considered an aggressive flow and is given a small buffer limit called “aggressiveBufferLimit.”
Queue length is measured by the number of packets. The number of packets in the queue determines the amount of buffer space that a flow is given. When a flow has a high queue length the computed value is lowered. This allows new incoming flows to receive buffer space in the queue. This allows all flows to get a proportional share of packets using the queue.
Because 4 transmit queues exist per interface and DBL is a per-queue mechanism, DSCP values can make DBL application more complex.
The following table provides the default DSCP-to-transmit queue mapping:
|
|
---|---|
For example, if you are sending two streams, one with a DSCP of 16 and other with a value of 0, they will transmit from different queues. Even though an aggressive flow in txQueue 2 (packets with DSCP of 16) can saturate the link, packets with a DSCP of 0 are not blocked by the aggressive flow, because they transmit from txQueue 1. Even without DBL, packets whose DSCP value places them in txQueue 1, 3, or 4 are not dropped because of the aggressive flow.
Sharing Link Bandwidth Among Transmit Queues
The four transmit queues for a transmit port share the available link bandwidth of that transmit port. You can set the link bandwidth to be shared differently among the transmit queues using bandwidth command in interface transmit queue configuration mode. With this command, you assign the minimum guaranteed bandwidth for each transmit queue.
By default, all queues are scheduled in a round-robin manner.
For systems using Supervisor Engine II-Plus, Supervisor Engine II-Plus TS, Supervisor Engine III, and Supervisor Engine IV, bandwidth can be configured on these ports only:
- Uplink ports on supervisor engines
- Ports on the WS-X4306-GB GBIC module
- Ports on the WS-X4506-GB-T CSFP module
- The two 1000BASE-X ports on the WS-X4232-GB-RJ module
- The first two ports on the WS-X4418-GB module
- The two 1000BASE-X ports on the WS-X4412-2GB-TX module
For systems using Supervisor Engine V, bandwidth can be configured on all ports (10/100 Fast Ethernet, 10/100/1000BASE-T, and 1000BASE-X).
Strict Priority / Low Latency Queueing
You can configure transmit queue 3 on each port with higher priority using the priority high tx-queue configuration command in the interface configuration mode. When transmit queue 3 is configured with higher priority, packets in transmit queue 3 are scheduled ahead of packets in other queues.
When transmit queue 3 is configured at a higher priority, the packets are scheduled for transmission before the other transmit queues only if it has not met the allocated bandwidth sharing configuration. Any traffic that exceeds the configured shape rate is queued and transmitted at the configured rate. If the burst of traffic, exceeds the size of the queue, packets are dropped to maintain transmission at the configured shape rate.
Traffic Shaping
Traffic shaping provides the ability to control the rate of outgoing traffic in order to make sure that the traffic conforms to the maximum rate of transmission contracted for it. Traffic that meets certain profile can be shaped to meet the downstream traffic rate requirements to handle any data rate mismatches.
Each transmit queue can be configured to transmit a maximum rate using the shape command. The configuration allows you to specify the maximum rate of traffic. Any traffic that exceeds the configured shape rate is queued and transmitted at the configured rate. If the burst of traffic exceeds the size of the queue, packets are dropped to maintain transmission at the configured shape rate.
Packet Modification
A packet is classified, policed, and queued to provide QoS. Packet modifications can occur during this process:
- For IP packets, classification involves assigning a DSCP to the packet. However, the packet is not modified at this stage; only an indication of the assigned DSCP is carried along. This is because QoS classification and ACL lookup occur in parallel; the ACL might specify that the packet should be denied and logged. In this situation, the packet is forwarded with its original DSCP to the CPU, where it is again processed through ACL software.
- For non-IP packets, classification involves assigning an internal DSCP to the packet, but because there is no DSCP in the non-IP packet, no overwrite occurs. Instead, the internal DSCP is used both for queueing and scheduling decisions and for writing the CoS priority value in the tag if the packet is being transmitted on either an ISL or 802.1Q trunk port.
- During policing, IP and non-IP packets can have another DSCP assigned to them (if they are out of profile and the policer specifies a markdown DSCP). Once again, the DSCP in the packet is not modified, but an indication of the marked-down value is carried along. For IP packets, the packet modification occurs at a later stage.
Note If you are running Supervisor Engines II-Plus, II-Plus-10GE, IV, V, V-10GE, or using a ME Catalyst 4900, Catalyst 4900, or Catalyst 4900-10GE series switch, you must enter the qos rewrite ip dscp command to enable update of packets and DSCP/ToS fields based on the switch’s QoS policies.
Per-Port Per-VLAN QoS
Per-port per-VLAN QoS (PVQoS) offers differentiated quality of services to individual VLANs on a trunk port. It enables service providers to rate-limit individual VLAN-based services on each trunk port to a business or a residence. In an enterprise voice-over-IP environment, it can be used to rate-limit voice VLAN even if an attacker impersonates a Cisco IP phone. A per-port per-VLAN service policy can be separately applied to either ingress or egress traffic.
QoS and Software Processed Packets
The Catalyst 4500 platform does not apply the QoS marking or policing configuration for any packets that are forwarded or generated by the Cisco IOS software. This means that any input or output QoS policy configured on the port or VLAN is not applied to packets if the Cisco IOS is forwarding or generating packets.
However, Cisco IOS marks all the generated control packets appropriately and uses the internal IP DSCP to determine the transmit queue on the output transmission interface. For IP packets, the internal IP DSCP is the IP DSCP field in the IP packet. For non-IP packets, Cisco IOS assigns a packet priority internally and maps it to an internal IP DSCP value.
Cisco IOS assigns an IP precedence of 6 to routing protocol packets on the control plane. As noted in RFC 791, “The Internetwork Control designation is intended for use by gateway control originators only.” Specifically, Cisco IOS marks the following IP-based control packets: Open Shortest Path First (OSPF), Routing Information Protocol (RIP), Enhanced Interior Gateway Routing Protocol (EIGRP) hellos, and keepalives. Telnet packets to and from the router also receive an IP precedence value of 6. The assigned value remains with the packets when the output interface transmits them into the network.
For Layer 2 control protocols, the software assigns an internal IP DSCP. Typically, Layer 2 control protocol packets are assigned an internal DSCP value of 48 (corresponding to an IP precedence value of 6).
The internal IP DSCP is used to determine the transmit queue to which the packet is enqueued on the transmission interface. See “Configuring Transmit Queues” section for details on how to configure the DSCP to transmit queues.
The internal IP DSCP is also used to determine the transmit CoS marking if the packet is transmitted with a IEEE 802.1q or ISL tag on a trunk interface. See “Configuring the DSCP-to-CoS Map” section for details on how to configure the DSCP to CoS mapping.
Configuring QoS on Supervisor Engines II-Plus, II+10GE, IV, V, V-10GE, 4924, 4948, and 4948-10GE
Before configuring QoS, you must have a thorough understanding of these items:
- The types of applications used and the traffic patterns on your network.
- Traffic characteristics and needs of your network. Is the traffic bursty? Do you need to reserve bandwidth for voice and video streams?
- Bandwidth requirements and speed of the network.
- Location of congestion points in the network.
These sections describe how to configure QoS on the Catalyst 4500 family switch:
- Default QoS Configuration
- Configuration Guidelines
- Enabling QoS Globally
- Configuring a Trusted Boundary to Ensure Port Security
- Enabling Dynamic Buffer Limiting
- Creating Named Aggregate Policers
- Configuring a QoS Policy
- Configuring CoS Mutation
- Configuring User-Based Rate-Limiting
- Enabling Per-Port Per-VLAN QoS
- Enabling or Disabling QoS on an Interface
- Configuring VLAN-Based QoS on Layer 2 Interfaces
- Configuring the Trust State of Interfaces
- Configuring the CoS Value for an Interface
- Configuring DSCP Values for an Interface
- Configuring Transmit Queues
- Configuring DSCP Maps
Default QoS Configuration
Table 1-2 shows the QoS default configuration.
Configuration Guidelines
Before beginning the QoS configuration, you should be aware of this information:
- If you have EtherChannel ports configured on your switch, you must configure QoS classification and policing on the EtherChannel. The transmit queue configuration must be configured on the individual physical ports that comprise the EtherChannel.
- If the IP fragments match the source and destination configured in the ACL used to classify the traffic for quality of service, but do not match the Layer 4 port numbers in the ACL, they are still matched with the ACL and may get prioritized. If the desired behavior is to give best-effort service to IP fragments, the following two ACEs should be added to the ACL used to classify the traffic:
- It is not possible to match IP options against configured IP extended ACLs to enforce QoS. These packets are sent to the CPU and processed by software. IP options are denoted by fields in the IP header.
- Control traffic (such as spanning tree BPDUs and routing update packets) received by the switch are subject to all ingress QoS processing.
- You cannot use set commands in policy maps if IP routing is disabled (enabled by default).
- On a dot1q tunnel port, only Layer 2 match criteria can be applied to tagged packets. However, all match criteria can be applied for untagged packets.
- On a trunk port, only Layer 2 match criteria can be applied to packets with multiple 802.1q tags.
Note QoS processes both unicast and multicast traffic.
Enabling QoS Globally
To enable QoS globally, perform this task:
|
|
|
---|---|---|
|
||
|
||
|
This example shows how to enable QoS globally and to verify the configuration:
Enabling IP DSCP Rewrite
You must enter the qos rewrite ip dscp command to enable the update of packets CoS, DSCP and ToS fields based on the switch’s QoS policies.
To enable IP DSCP rewrite, perform this task:
|
|
|
---|---|---|
|
||
|
||
|
This example shows how to enable IP DSCP rewrite and to verify the configuration:
Note The qos rewrite ip dscp command is not supported on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E.
If you disable IP DSCP rewrite and enable QoS globally, the following events occur:
- The ToS byte on the IP packet is not modified.
- Marked and marked-down DSCP values are used for queueing.
- The internally derived DSCP (as per the trust configuration on the interface or VLAN policy) is used for transmit queue and Layer 2 CoS determination. The DSCP is not rewritten on the IP packet header.
If you disable QoS, the DSCP of the incoming packet are preserved and are not rewritten.
Configuring a Trusted Boundary to Ensure Port Security
In a typical network, you connect a Cisco IP phone to a switch port as discussed in Chapter1, “Configuring Voice Interfaces” Traffic sent from the telephone to the switch is typically marked with a tag that uses the 802.1Q header. The header contains the VLAN information and the class of service (CoS) 3-bit field, which determines the priority of the packet. For most Cisco IP phone configurations, the traffic sent from the telephone to the switch is trusted to ensure that voice traffic is properly prioritized over other types of traffic in the network. By using the qos trust cos interface configuration command, you can configure the switch port to which the telephone is connected to trust the CoS labels of all traffic received on that port.
Note Starting with Cisco IOS Release 12.2(31)SG, Supervisor Engine V-10GE allows you to classify traffic based on packet's IP DSCP value irrespective of the port trust state. Because of this, even when a Cisco IP phone is not detected, data traffic can be classified based on IP DSCP values. Output queue selection is not impacted by this new behavior. It is still based on the incoming port trust configuration. For information on configuring transmit queues, refer to the “Configuring Transmit Queues” section.
In some situations, you also might connect a PC or workstation to the Cisco IP phone. In this case, you can use the switchport priority extend cos interface configuration command to configure the telephone using the switch CLI to override the priority of the traffic received from the PC. With this command, you can prevent a PC from taking advantage of a high-priority data queue.
However, if a user bypasses the telephone and connects the PC directly to the switch, the CoS labels generated by the PC are trusted by the switch (because of the trusted CoS setting) and can allow misuse of high-priority queues. The trusted boundary feature solves this problem by using the CDP to detect the presence of a Cisco IP phone (such as the Cisco IP phone 7910, 7935, 7940, and 7960) on a switch port.
Note If CDP is not running on the switch globally or on the port in question, trusted boundary does not work.
When you configure trusted boundary on a port, trust is disabled. When a phone is plugged in and detected, trust is enabled. (It may take a few minutes to detect the phone.) Now, when a phone is unplugged (and not detected), the trusted boundary feature disables the trusted setting on the switch port and prevents misuse of a high-priority queue.
Note On a given port, the Cisco IP phone discovery information is not maintained on the standby supervisor engine. When the standby supervisor engine becomes active, it rediscovers the Cisco IP phone through CDP. For a short time, the port are not in the trust state after the SSO switchover.
To enable trusted boundary on a port, perform this task:
To disable the trusted boundary feature, use the no qos trust device cisco-phone interface configuration command.
Enabling Dynamic Buffer Limiting
Note Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E support DBL using the MQC CLI, but not with the older QoS DBL CLI.
Dynamic buffer limiting (DBL) provides active queue management on Catalyst 4500 platforms. Refer to “Active Queue Management” section for details.
Through selective DBL, you can select the flows that are subjected to the DBL algorithm. You can enable DBL globally on specific IP DSCP values or on specific CoS values.
Enabling DBL Globally
To enable DBL globally on the switch, perform this task:
|
|
|
---|---|---|
|
||
|
||
|
This example shows how to enable DBL globally and verify the configuration:
You can enable DBL on the egress interface direction by applying a service policy:
Selectively Enable DBL
Note Selective DBL is not supported on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E.
DSCP values enable you to selectively apply DBL for IP packets only (single or untagged). Refer to the “Enabling DBL on Specific IP DSCP Values” section.
To selectively apply DBL for non-IP packets or double-tagged packets (such as Q-in-Q), you must use CoS values. Refer to the “Enabling DBL on Specific CoS Values” section.
Enabling DBL on Specific IP DSCP Values
DBL action is performed on transmit queues (four per interface). You manage the mapping from IP DSCP to transmit queues with the qos map dscp dscp-values to tx-queue queue-id command. Refer to “Configuring Transmit Queues” section for details.
To enable DBL on specific IP DSCP values, perform this task:
|
|
|
---|---|---|
|
||
|
||
|
This example shows how to selectively enable DBL on the DSCP values 1 through 10:
This example shows how to selectively disable DBL on DSCP values 1 through 10 and to verify the configuration:
Although you apply DBL based on class attributes other than DSCP, you need to attach a policy map to an egress interface. See “Configuring Policy-Map Class Actions” section.
Provided the value has been set according to your network policies, you must configure trust DSCP on the ingress interface of the aggressive flow that DBL will throttle:
Enabling DBL on Specific CoS Values
You might need to use CoS values to selectively apply DBL if you intend to use non-IP packets or double-tagged packets (for example, Q-in-Q).
For single-tagged IP packets, use the following approach. Specify the global qos dbl dscp-based command as shown in the “Enabling DBL on Specific IP DSCP Values” section.
To enable DBL non-IP or double-tagged packets, perform this task:
Note For more details on using CoS Mutation, refer to the “Configuring CoS Mutation” section.
To selectively enable DBL on CoS values 2 and 3:
Creating Named Aggregate Policers
To create a named aggregate policer, perform this task:
|
|
---|---|
Switch(config)# qos aggregate-policer policer_name rate burst [[ conform-action { transmit | drop }] [ exceed-action { transmit | drop | policed-dscp-transmit}]] |
An aggregate policer can be applied to one or more interfaces. However, if you apply the same policer to the input direction on one interface and to the output direction on a different interface, then you have created the equivalent of two different aggregate policers in the switching engine. Each policer has the same policing parameters, with one policing the ingress traffic on one interface and the other policing the egress traffic on another interface. If an aggregate policer is applied to multiple interfaces in the same direction, then only one instance of the policer is created in the switching engine.
Similarly, an aggregate policer can be applied to a port or to a VLAN. If you apply the same aggregate policer to a port and to a VLAN, then you have created the equivalent of two different aggregate policers in the switching engine. Each policer has the same policing parameters, with one policing the traffic on the configured port and the other policing the traffic on the configured VLAN. If an aggregate policer is applied to only ports or only VLANs, then only one instance of the policer is created in the switching engine.
In effect, if you apply a single aggregate policer to ports and VLANs in different directions, then you have created the equivalent of four aggregate policers: one for all ports sharing the policer in input direction, one for all ports sharing the policer in output direction, one for all VLANs sharing the policer in input direction and one for all VLANs sharing the policer in output direction.
When creating a named aggregate policer, note the following:
– Minimum—32 kilobits per second
– Maximum—32 gigabits per second
For more information, see the “Configuration Guidelines” section.
Note You can also use a decimal point. For example, a rate of 1,100,000 bps can be entered
as 1.1 m.
– g to denote 1000000000 bytes
Note You can also use a decimal point. For example, a burst of 1,100,000 bytes can be entered
as 1.1 m. However, decimal point is not supported on Cisco Catalyst 4948E Series Switches, Cisco Catalyst 4500x Series Switches, Cisco Catalyst 4500E Supervisor Engine 7-E and Supervisor Engine 8L-E Series Switches.
– The default conform action is transmit.
– Enter the drop keyword to drop all matched traffic.
Note When you configure drop as the conform action, QoS configures drop as the exceed action.
– The default exceed action is drop.
– Enter the policed-dscp-transmit keyword to cause all matched out-of-profile traffic to be marked down as specified in the markdown map.
– For no policing, enter the transmit keyword to transmit all matched out-of-profile traffic.
- You can enter the no qos aggregate-policer policer_name command to delete a named aggregate policer.
This example shows how to create a named aggregate policer with a ten MBps rate limit and a one mb burst size that transmits conforming traffic and marks down out-of-profile traffic.
This example shows how to verify the configuration:
Configuring a QoS Policy
The following subsections describe QoS policy configuration:
- Overview of QoS Policy Configuration
- Configuring a Class Map (Optional)
- Configuring a Policy Map
- Attaching a Policy Map to an Interface
Note QoS policies process both unicast and multicast traffic.
Overview of QoS Policy Configuration
Configuring a QoS policy requires you to configure traffic classes and the policies that will be applied to those traffic classes, and to attach the policies to interfaces using these commands:
– QoS supports these access list types:
|
|
|
|
---|---|---|---|
– See “Configuring Network Security with ACLs,” for information about ACLs on the Catalyst 4500 series switches.
- class-map (optional)—Enter the class-map command to define one or more traffic classes by specifying the criteria by which traffic is classified. (For more information, see the “Configuring a Class Map (Optional)” section.)
- policy-map —Enter the policy-map command to define the following for each class of traffic:
Configuring a Class Map (Optional)
The following subsections describe class map configuration:
Enter the class-map configuration command to define a traffic class and the match criteria that will be used to identify traffic as belonging to that class. Match statements can include criteria such as an ACL, an IP precedence value, or a DSCP value. The match criteria are defined with one match statement entered within the class map configuration mode.
Creating a Class Map
To create a class map, enter this command:
|
|
---|---|
|
Configuring Filtering in a Class Map
To configure filtering in a class map, enter one of these commands:
|
|
---|---|
|
(Optional) Specifies the name of the ACL used to filter traffic. Use the no keyword to remove the statement from a class map. Note Access lists are not documented in this publication. For more information, see the reference under access-list in the “Configuring a QoS Policy” section. |
|
(Optional—for IP traffic only) Specifies up to eight IP precedence values used as match criteria. Use the no keyword to remove the statement from a class map. |
|
(Optional—for IP traffic only) Specifies up to eight DSCP values used as match criteria. Use the no keyword to remove the statement from a class map. |
|
(Optional—for non-IPv4 traffic only) Specifies up to eight CoS values used as match criteria. Use the no keyword to remove the statement from a class map. For information on non-IPv4 traffic, see “Configuration Guidelines” section. |
|
|
|
(Optional) Treats each flow with a unique IP source address or destination address as a new flow. |
Note Any Input or Output policy that uses a class map with the match ip precedence or match ip dscp class-map commands, requires that you configure the port on which the packet is received to trust dscp. If not, the IP packet DSCP/IP-precedence is not used for matching the traffic; instead, the receiving port’s default DSCP is used. Starting with Cisco IOS Release 12.2(31)SG, the Supervisor Engine V-10GE allows you to classify traffic based on packet’s IP DSCP value irrespective of port trust state.
Note With Cisco IOS Release 12.2(31), the Catalyst 4500 series switch supports Match CoS.
Note The interfaces on the Catalyst 4500 family switch do not support the match classmap, match destination-address, match input-interface, match mpls, match not, match protocol, match qos-group, and match source-address keywords.
Verifying Class-Map Configuration
To verify class-map configuration, perform this task:
|
|
|
---|---|---|
|
||
|
This example shows how to create a class map named ipp5 and how to configure filtering to match traffic with IP precedence 5:
This example shows how to verify the configuration:
This example shows how to configure match CoS for non-IPv4 traffic and how to configure filtering to match traffic with CoS value of 5:
This example shows how to verify the configuration:
Configuring a Policy Map
You can attach only one policy map to an interface. Policy maps can contain one or more policy-map classes, each with different match criteria and policers.
Configure a separate policy-map class in the policy map for each type of traffic that an interface receives. Put all commands for each type of traffic in the same policy-map class. QoS does not attempt to apply commands from more than one policy-map class to matched traffic.
Creating a Policy Map
To create a policy map, enter this command:
|
|
---|---|
|
Configuring Policy-Map Class Actions
These sections describe policy-map class action configuration:
- Configuring the Policy-Map Marking State
- Configuring the Policy-Map Class Trust State
- Configuring the Policy-Map Class DBL State
- Configuring Policy-Map Class Policing
- Using a Named Aggregate Policer
- Configuring a Per-Interface Policer
Configuring the Policy-Map Marking State
To configure the policy map to mark the IP precedence or dscp of a packet, enter this command:
Configuring the Policy-Map Class Trust State
To configure the policy-map class trust state, enter this command:
|
|
---|---|
|
Configures the policy-map class trust state, which selects the value that QoS uses as the source of the internal DSCP value (see the “Internal DSCP Values” section). Use the no keyword to clear a configured value and return to the default. |
When configuring the policy-map class trust state, note the following:
- You can enter the no trust command to use the trust state configured on the ingress interface (the default).
- With the cos keyword, QoS sets the internal DSCP value from received or interface CoS.
- With the dscp keyword, QoS uses received DSCP.
Configuring the Policy-Map Class DBL State
To configure the policy-map class DBL state, enter this command:
|
|
---|---|
|
Configures the policy-map class DBL state, which tracks the queue length of traffic flows (see the “Active Queue Management” section). Use the no keyword to clear an DBL value and return to the default. |
When configuring the policy-map class DBL state, note the following:
Configuring Policy-Map Class Policing
These sections describe configuration of policy-map class policing:
Using a Named Aggregate Policer
To use a named aggregate policer (see the “Creating Named Aggregate Policers” section), enter this command:
|
|
---|---|
|
Uses a previously defined aggregate policer. Use the no keyword to delete the policer from the policy-map class. |
Configuring a Per-Interface Policer
To configure a per-interface policer (see the “Policing and Marking” section), enter this command:
When configuring a per-interface policer, note the following:
– Minimum—32 kilobits per second, entered as 32000
– Maximum—32 gigabits per second, entered as 32000000000
Note For more information, see the “Configuration Guidelines” section.
Note You can also use a decimal point. For example, a rate of 1,100,000 bps can be entered
as 1.1m.
– g to denote 1000000000 bytes
Note You can also use a decimal point. For example, a burst of 1,100,000 bytes can be entered
as 1.1m.
– The default conform action is transmit.
– You can enter the drop keyword to drop all matched traffic.
- Optionally, for traffic that exceeds the CIR, you can enter the policed-dscp-transmit keyword to cause all matched out-of-profile traffic to be marked down as specified in the markdown map. See “Configuring the Policed-DSCP Map” section.
– For no policing, you can enter the transmit keyword to transmit all matched out-of-profile traffic.
This example shows how to create a policy map named ipp5-policy that uses the class map named ipp5. The class map ipp5 is configured to rewrite the packet precedence to 6 and to aggregate police the traffic that matches IP precedence value of 5:
This example shows how to create a policy map named cs2-policy that uses class map named cs2. The class map cos5 is configured to match on CoS 5 and to aggregate policing the traffic:
Verifying Policy-Map Configuration
To verify policy-map configuration, perform this task:
This example shows how to verify the configuration:
Attaching a Policy Map to an Interface
To attach a policy map to an interface, perform this task:
Note You cannot enable marking commands on an interface until IP routing is enabled globally. If IP routing is disabled globally and you try to configure the service policy on an interface, the configuration is accepted but it does not take effect. You are prompted with this message:
Set command will not take effect since CEF is disabled. Please enable IP routing and CEF globally.
To enable IP routing globally, enter the ip routing and ip cef global configuration commands. After you do this, the marking commands take effect.
This example shows how to attach the policy map named pmap1 to Fast Ethernet interface 5/36 and to verify the configuration:
Configuring CoS Mutation
Service providers providing Layer 2 VPNs carry double-tagged or Q-in-Q traffic with the outer tag representing the service providers’ VLAN, and the inner tag representing the customers’ VLAN. Differentiated levels of service can be provided inside the SP network based on the CoS present in the outer tag.
By using CoS mutation on a dot1q tunnel port, the CoS value on the outer tag of dot1q tunneled packets entering the provider core network can be derived from the CoS of the customer VLAN tag. This allows providers to preserve customer QoS semantics using their network.
CoS mutation is achieved through explicit user configuration to match on specific incoming CoS values and specifying the internal DSCP that is associated for matched packets. This internal DSCP gets converted to CoS through DSCP-CoS mapping during exit from the switch and is the CoS value that gets marked on the outer VLAN tag.
During the process, the CoS in inner tag is preserved and is carried across in the service providers’ network.
The following example shows how a policy map preserves customer VLAN IDs and CoS values throughout the network:
Configuring User-Based Rate-Limiting
User-Based Rate-Limiting (UBRL) adopts microflow policing capability to dynamically learn traffic flows and rate-limit each unique flow to an individual rate. UBRL is available on Supervisor Engine V-10GE with the built-in NetFlow support. UBRL can be applied to ingress traffic on routed interfaces with source or destination flow masks. It can support up to 85,000 individual flows and 511 rates. UBRL is typically used in environments where a per-user, granular rate-limiting mechanism is required; for example, the per-user outbound traffic rate could differ from the per-user inbound traffic rate.
Note By default, UBRL polices only routed IP traffic. You can use the ip flow ingress layer2-switched global command to police switched IP traffic. However, UBRL configuration must remain on a Layer 3 interface. With the UBRL configurations and the ip flow ingress layer2-switched global command, you will also be able to police intra-VLAN flows. You do not need to enter the ip flow ingress command.
A flow is defined as a five-tuple (IP source address, IP destination address, IP head protocol field, Layer 4 source, and destination ports). Flow-based policers enable you to police traffic on a per-flow basis. Because flows are dynamic, they require distinguishing values in the class map.
When you specify the match flow command with the source-address keyword, each flow with a unique source address is considered a new flow. When you specify the match flow command with the destination-address keyword, each flow with a unique destination address is considered a new flow. If the class map used by the policy map has any flow options configured, it is considered a flow-based policy map. When you specify the match flow command with the
ip destination-address ip protocol L4 source-address L4 destination-address keyword, each flow with unique IP source, destination, protocol, and Layer 4 source and destination address is considered a new flow.
Note Microflow is only supported on Supervisor Engine V-10GE.
To configure the flow-based class maps and policy maps, perform this task:
Examples
Example 1
This example shows how to create a flow-based class map associated with a source address:
Example 2
This example shows how to create a flow-based class map associated with a destination address:
Example 3
Assume there are two active flows on the Fast Ethernet interface 6/1 with source addresses 192.168.10.20 and 192.168.10.21. The following example shows how to maintain each flow to one MBps with an allowed burst value of 9000 bytes:
Example 4
Assume there are two active flows on the Fast Ethernet interface 6/1 with destination addresses of 192.168.20.20 and 192.168.20.21. The following example shows how to maintain each flow to one MBps with an allowed burst value of 9000 bytes:
Example 5
Assume that there are two active flows on FastEthernet interface 6/1:
With the following configuration, each flow is policed to 1000000 bps with an allowed 9000 burst value.
Note If you use the match flow ip source-address | destination-address command, these two flows are consolidated into one flow because they have the same source and destination address.
Configuring Hierarchical Policers
Note Hierarchical policers are only supported on Supervisor Engine V-10GE.
You can tie flow policers with the existing policers to create dual policing rates on an interface. For example, using dual policing, you can limit all incoming traffic rates on a given interface to 50 MBps and can limit the rate of each flow that is part of this traffic to two MBps.
You can configure hierarchical policers with the service-policy policy-map config command. A policy map is termed flow-based if the class map it uses matches any of the flow-based match criteria
(such as match flow ip source-address). Each child policy map inherits all the match access-group commands of the parent.
Note You can configure only flow-based policy maps as child policy maps. A parent policy map cannot be a flow-based policy map. Both the child policy map and parent policy map must have match-all in their class map configuration.
To configure a flow-based policy map as a child of an individual or aggregate policer, perform this task:
|
|
|
---|---|---|
Switch(config-flow-cache)# service-policy service_policy_name |
Note In a hierarchal policer configuration with parent as aggregate policer and child as microflow policer, child microflow policer matched packets report only the packets that are in the profile (that is, match the policing rate). Packets that exceed the policing rate are not reported in the class-map packet match statistics.
This example shows how to create a hierarchical policy map. A policy map with the name aggregate-policy has a class map with the name aggregate-class. A flow-based policy map with the name flow-policy is attached to this policy map as a child policy map.
In the following example, traffic in the IP address range of 101.237.0.0 to 101.237.255.255 is policed to 50 MBps. Flows ranging from 101.237.10.0 to 101.237.10.255 are individually policed to a rate of two MBps. This traffic goes through two policers: the aggregate policer and the other flow-based policer.
The following example shows the configuration for this scenario:
The following example shows how to verify the configuration:
Enabling Per-Port Per-VLAN QoS
The per-port per-VLAN QoS feature allows you to specify different QoS configurations on different VLANs on a given interface. Typically, you use this feature on trunk or voice VLANs (Cisco IP phone) ports, because they belong to multiple VLANs.
To configure per-port per-VLAN QoS, perform this task:
Example 1
Figure 1-5 displays a sample topology for configuring PVQoS. The trunk port gi3/1 is comprised of multiple VLANs (101 and 102). Within a port, you can create your own service policy per-VLAN. This policy, performed in hardware, might consist of ingress and egress policing, trusting DSCP, or giving precedence to voice packet over data.
Figure 1-5 Per-Port Per-VLAN Topology
The following configuration file shows how to perform ingress and egress policing per-VLAN using the policy map P31_QoS applied to port Gigabit Ethernet 3/1:
Example 2
Assume that interface Gigabit Ethernet 6/1 is a trunk port and belongs to VLANs 20, 300-301, and 400. The following example shows how to apply policy map p1 for traffic in VLANs 20 and 400 and policy map p2 to traffic in VLANs 300 through 301:
Example 3
The following command shows how to display policy map statistics on VLAN 20 configured on Gigabit Ethernet interface 6/1:
Example 4
The following command shows how to display policy map statistics on all VLANs configured on Gigabit Ethernet interface 6/1:
Enabling or Disabling QoS on an Interface
The qos interface command reenables any previously configured QoS features. The qos interface command does not affect the interface queueing configuration.
To enable or disable QoS features for traffic from an interface, perform this task:
This example shows how to disable QoS on interface VLAN 5:
This example shows how to verify the configuration:
Configuring VLAN-Based QoS on Layer 2 Interfaces
By default, QoS uses policy maps attached to physical interfaces. For Layer 2 interfaces, you can configure QoS to use policy maps attached to a VLAN. For more information, see the “Attaching a Policy Map to an Interface” section.
To configure VLAN-based QoS on a Layer 2 interface, perform this task:
Note If no input QoS policy is attached to a Layer 2 interface, then the input QoS policy attached to the VLAN (on which the packet is received), if any, is used even if the port is not configured as VLAN-based. If you do not want this default, attach a placeholder input QoS policy to the Layer 2 interface. Similarly, if no output QoS policy is attached to a Layer 2 interface, then the output QoS policy attached to the VLAN (on which the packet is transmitted), if any, is used even if the port is not configured as VLAN-based. If you do not want this default, attach a placeholder output QoS policy to the Layer 2 interface.
This example shows how to configure VLAN-based QoS on Fast Ethernet interface 5/42:
This example shows how to verify the configuration:
Note When a Layer 2 interface is configured with VLAN-based QoS, and if a packet is received on the port for a VLAN on which there is no QoS policy, then the QoS policy attached to the port, if any is used. This applies for both input and output QoS policies.
Configuring the Trust State of Interfaces
This command configures the trust state of interfaces. By default, all interfaces are untrusted.
To configure the trust state of an interface, perform this task:
When configuring the trust state of an interface, note the following:
- You can use the no qos trust command to set the interface state to untrusted.
- For traffic received on an ingress interface configured to trust CoS using the qos trust cos command, the transmit CoS is always the incoming packet CoS (or the ingress interface default CoS if the packet is received untagged).
- When the interface trust state is not configured to trust dscp using the qos trust dscp command, the security and QoS ACL classification always use the interface DSCP and not the incoming packet DSCP.
- Starting with Cisco IOS Release 12.2(31)SG, the Supervisor Engine V-10GE allows you to classify a packet based on the packet’s IP DSCP value irrespective of the port trust state. Packet transmit queuing is not impacted by this behavior. For information on transmit queues, refer to the “Configuring Transmit Queues” section.”
This example shows how to configure Gigabit Ethernet interface 1/1 with the trust cos keywords:
This example shows how to verify the configuration:
Configuring the CoS Value for an Interface
QoS assigns the CoS value specified with this command to untagged frames from ingress interfaces configured as trusted and to all frames from ingress interfaces configured as untrusted.
To configure the CoS value for an ingress interface, perform this task:
This example shows how to configure the CoS 5 as the default on Fast Ethernet interface 5/24:
This example shows how to verify the configuration:
Configuring DSCP Values for an Interface
QoS assigns the DSCP value specified with this command to non-IPv4 frames received on interfaces configured to trust DSCP and to all frames received on interfaces configured as untrusted.
To configure the DSCP value for an ingress interface, perform this task:
This example shows how to configure the DSCP 5 as the default on Fast Ethernet interface 5/24:
This example shows how to verify the configuration:
Configuring Transmit Queues
The following sections describe how to configure transmit queues:
- Mapping DSCP Values to Specific Transmit Queues
- Allocating Bandwidth Among Transmit Queues
- Configuring Traffic Shaping of Transmit Queues
- Configuring a High Priority Transmit Queue
Depending on the complexity of your network and your QoS solution, you might need to perform all of the procedures in the following sections. However, you will first need to answer the following questions:
- Which packets are assigned (by DSCP value) to each queue?
- What is the size of a transmit queue relative to other queues for a given port?
- How much of the available bandwidth is allotted to each queue?
- What is the maximum rate and burst of traffic that can be transmitted out of each transmit queue?
Independent of the QoS state of an interface, a switch ensures that all the transmit queues are enabled. Because the DSCP values are trusted by default, a switch uses the appropriate transmit queues based on the DSCP to map them. This queue selection is based on the internal DSCP to transmit queue mapping table.
Mapping DSCP Values to Specific Transmit Queues
To map the DSCP values to a transmit queue, perform this task:
This example shows how to map DSCP values to transit queue 2.
This example shows how to verify the configuration.
Allocating Bandwidth Among Transmit Queues
To configure the transmit queue bandwidth, perform this task:
The bandwidth rate varies with the interface.
For systems using Supervisor Engine II-Plus, Supervisor Engine II-Plus TS, Supervisor Engine III, and Supervisor Engine IV, bandwidth can be configured on these ports only:
- Uplink ports on supervisor engines
- Ports on the WS-X4306-GB GBIC module
- Ports on the WS-X4506-GB-T CSFP module
- The two 1000BASE-X ports on the WS-X4232-GB-RJ module
- The first two ports on the WS-X4418-GB module
- The two 1000BASE-X ports on the WS-X4412-2GB-TX module
For systems using Supervisor Engine V, bandwidth can be configured on all ports (10/100 Fast Ethernet, 10/100/1000BASE-T, and 1000BASE-X).
This example shows how to configure the bandwidth of one MBps on transmit queue 2:
Configuring Traffic Shaping of Transmit Queues
To guarantee that packets transmitted from a transmit queue do not exceed a specified maximum rate, perform this task:
This example shows how to configure the shape rate to one MBps on transmit queue 2:
Configuring a High Priority Transmit Queue
To configure transmit queue 3 at a higher priority, perform this task:
This example shows how to configure transmit queue 3 to high priority:
Configuring DSCP Maps
The following sections describes how to configure the DSCP maps. It contains this configuration information:
All the maps are globally defined and are applied to all ports.
Configuring the CoS-to-DSCP Map
You use the CoS-to-DSCP map to map CoS values in incoming packets to a DSCP value that QoS uses internally to represent the priority of the traffic.
Table 1-3 shows the default CoS-to-DSCP map.
If these values are not appropriate for your network, you need to modify them.
To modify the CoS-to-DSCP map, perform this task:
This example shows how to configure the ingress CoS-to-DSCP mapping for CoS 0:
Note To return to the default map, use the no qos cos to dscp global configuration command.
This example shows how to clear the entire CoS-to-DSCP mapping table:
Configuring the Policed-DSCP Map
You use the policed-DSCP map to mark down a DSCP value to a new value as the result of a policing and marking action.
The default policed-DSCP map is a null map, which maps an incoming DSCP value to the same DSCP value.
To modify the CoS-to-DSCP map, perform this task:
To return to the default map, use the no qos dscp policed global configuration command.
This example shows how to map DSCP 50 to 57 to a marked-down DSCP value of 0:
Note In the previous policed-DSCP map, the marked-down DSCP values are shown in the body of the matrix. The d1 column specifies the most-significant digit of the original DSCP; the d2 row specifies the least-significant digit of the original DSCP. The intersection of the d1 and d2 values provides the marked-down value. For example, an original DSCP value of 53 corresponds to a marked-down DSCP value of 0.
Configuring the DSCP-to-CoS Map
You use the DSCP-to-CoS map to generate a CoS value.
Table 1-4 shows the default DSCP-to-CoS map.
If the values above are not appropriate for your network, you need to modify them.
To modify the DSCP-to-CoS map, perform this task:
This example shows how to map DSCP values 0, 8, 16, 24, 32, 40, 48, and 50 to CoS value 0 and to display the map:
Note In the previous DSCP-to-CoS map, the CoS values are shown in the body of the matrix. The d1 column specifies the most-significant digit of the DSCP; the d2 row specifies the least-significant digit of the DSCP. The intersection of the d1 and d2 values provides the CoS value. For example, in the DSCP-to-CoS map, a DSCP value of 08 corresponds to a CoS value of 0.
Configuring Auto-QoS on Supervisor Engines II-Plus, II+10GE, IV, V, V-10GE, 4924, 4948, and 4948-10GE
You can use the auto-QoS feature to simplify the deployment of existing QoS features. Auto-QoS makes assumptions about the network design, and as a result, the switch can prioritize different traffic flows and appropriately use the egress queues instead of using the default QoS behavior. (The default is that QoS is disabled. The switch then offers best-effort service to each packet, regardless of the packet content or size, and sends it from a single queue.)
When you enable auto-QoS, it automatically classifies traffic based on ingress packet label. The switch uses the resulting classification to choose the appropriate egress queue.
You use auto-QoS commands to identify ports connected to Cisco IP phones and to identify ports that receive trusted voice over IP (VoIP) traffic through an uplink. Auto-QoS then performs these functions:
- Detects the presence or absence of a Cisco IP phones
- Configures QoS classification
- Configures egress queues
These sections describe how to configure auto-QoS on your switch:
- Generated Auto-QoS Configuration
- Effects of Auto-QoS on the Configuration
- Configuration Guidelines
- Enabling Auto-QoS for VoIP
Generated Auto-QoS Configuration
By default, auto-QoS is disabled on all interfaces.
When you enable the auto-QoS feature on the first interface, these automatic actions occur:
- QoS is globally enabled (qos global configuration command).
- DBL is enabled globally (qos dbl global configuration command)
- When you enter the auto qos voip trust interface configuration command, the ingress classification on the specified interface is set to trust the CoS label received in the packet if the specified interface is configured as Layer 2 (and is set to trust DSCP if the interface is configured as Layer 3). See Table 1-5 .
- When you enter the auto qos voip cisco-phone interface configuration command, the trusted boundary feature is enabled. It uses the Cisco Discovery Protocol (CDP) to detect the presence or absence of a Cisco IP phone. When a Cisco IP phone is detected, the ingress classification on the interface is set to trust the CoS label received in the packet, if the interface is configured as Layer 2. (The classification is set to trust DSCP if the interface is configured as Layer 3.) When a Cisco IP phone is absent, the ingress classification is set to not trust the CoS label in the packet.
Note On a given port, the Cisco IP phone discovery information is not maintained on the standby supervisor engine. When the standby supervisor engine becomes active, it rediscovers the Cisco IP phone thru CDP. For a short time, the port are not in the trust state after the SSO switchover.
For information about the trusted boundary feature, see the “Configuring a Trusted Boundary to Ensure Port Security” section.
When you enable auto-QoS by using the auto qos voip cisco-phone or the auto qos voip trust interface configuration commands, the switch automatically generates a QoS configuration based on the traffic type and ingress packet label and applies the commands listed in Table 1-5 to the interface.
Effects of Auto-QoS on the Configuration
When auto-QoS is enabled, the auto qos voip interface configuration command and the generated configuration are added to the running configuration.
Configuration Guidelines
Before configuring auto-QoS, you should be aware of this information:
- In this release, auto-QoS configures the switch only for VoIP with Cisco IP phones.
- To take advantage of the auto-QoS defaults, do not configure any standard-QoS commands before entering the auto-QoS commands. If necessary, you can fine-tune the QoS configuration, but we recommend that you do so only after the auto-QoS configuration is completed.
- You can enable auto-QoS on static, dynamic-access, voice VLAN access, and trunk ports.
- By default, the CDP is enabled on all interfaces. For auto-QoS to function properly, do not disable the CDP.
- To enable auto qos voip trust on Layer 3 interfaces, change the port to Layer 3, then apply auto-QoS to make it trust DSCP.
Enabling Auto-QoS for VoIP
To enable auto-QoS for VoIP within a QoS domain, perform this task:
To disable auto-QoS on an interface, use the no auto qos voip interface configuration command. When you enter this command, the switch changes the auto-QoS settings to the standard-QoS default settings for that interface. It does not change any global configuration performed by auto-QoS. Global configuration remains the same.
This example shows how to enable auto-QoS and to trust the CoS labels in incoming packets when the device connected to Fast Ethernet interface 1/1 is detected as a Cisco IP phone:
This example shows how to enable auto-QoS and to trust the CoS/DSCP labels in incoming packets when the switch or router connected to Gigabit Ethernet interface 1/1 is a trusted device:
This example shows how to display the QoS commands that are automatically generated when auto-QoS is enabled:
Displaying Auto-QoS Information
To display the initial auto-QoS configuration, use the show auto qos [ interface [ interface-id ]] privileged EXEC command. To d isplay any user changes to that configuration, use the show running-config privileged EXEC command. You can compare the show auto qos and the show running-config command output to identify the user-defined QoS settings.
To display information about the QoS configuration that might be affected by auto-QoS, use one of these commands:
For more information about these commands, refer to the command reference for this release.
Auto-QoS Configuration Example
This section describes how you could implement auto-QoS in a network, as shown in Figure 1-6.
Figure 1-6 Auto-QoS Configuration Example Network
The intelligent wiring closets in Figure 1-6 are composed of Catalyst 4500 switches. The object of this example is to prioritize the VoIP traffic over all other traffic. To do so, enable auto-QoS on the switches at the edge of the QoS domains in the wiring closets.
Note You should not configure any standard QoS commands before entering the auto-QoS commands. You can fine-tune the QoS configuration, but we recommend that you do so only after the auto-QoS configuration is completed.
To configure the switch at the edge of the QoS domain to prioritize the VoIP traffic over all other traffic, perform this task:
|
|
|
---|---|---|
|
Enables debugging for auto-QoS. When debugging is enabled, the switch displays the QoS configuration that is automatically generated when auto-QoS is enabled. |
|
|
||
|
||
|
||
|
Enables auto-QoS on the interface, and specifies that the interface is connected to a Cisco IP phone. The CoS labels of incoming packets are trusted only when the Cisco IP phone is detected. |
|
|
||
|
Enables auto-QoS on the interface, and specifies that the interface is connected to a Cisco IP phone. |
|
|
||
|
Enables auto-QoS on the interface, and specifies that the interface is connected to a Cisco IP phone. |
|
|
||
|
Enables auto-QoS on the interface, and specifies that the interface is connected to a trusted router or switch. |
|
|
||
|
This command displays the auto-QoS configuration that is initially applied; it does not display any user changes to the configuration that might be in effect. For information about the QoS configuration that might be affected by auto-QoS, see the “Displaying Auto-QoS Information” section. |
|
|
This command displays the auto-QoS configuration that was initially applied; it does not display any user changes to the configuration that might be in effect. |
|
|
Saves the auto qos voip interface configuration commands and the generated auto-QoS configuration in the configuration file. |
Configuring QoS on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E
Note QoS functionality on Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E are equivalent.
Note Hierarchical QoS is not supported on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E.
This section includes these topics:
- MQC-Based QoS Configuration
- MQC-Based QoS on the Supervisor Engine 6-E and 6L-E
- Platform-Supported Classification Criteria and QoS Features
- Platform Hardware Capabilities
- Prerequisites for Applying a QoS Service Policy
- Restrictions for Applying a QoS Service Policy
- Classification
- Policing
- Marking Network Traffic
- Shaping, Sharing (Bandwidth), Priority Queuing, Queue-Limiting and DBL
- Configuring CoS Mutation
- Configuring System Queue Limit
MQC-Based QoS Configuration
Starting with Cisco IOS Release 12.2(40)SG, Catalyst 4900M, Catalyst 4948E, or Catalyst 4500 series switch with Supervisor Engine 6-E or Supervisor Engine 6L-E uses the MQC model of QoS. To apply QoS, you use the modular QoS command-line interface (MQC), which is a CLI structure that allows you to complete the following tasks:
- Specify the matching criteria used to define a traffic class.
- Create a traffic policy (policy map). The traffic policy defines the QoS policy actions to be taken for each traffic class.
- Apply the policy actions specified in the policy map to an interface, VLAN, or port and VLAN.
For more information about the MQC, see the “Modular Quality of Service Command-Line Interface” section of the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.3.
Note The MQC model does not support the trust feature, which is available in the switch qos model on Supervisor Engines II-Plus through V-10GE. In the MQC model supported on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E, the incoming traffic is considered trusted by default. Only when the trusted boundary feature is enabled on an interface can the port enter untrusted mode. In this mode, the switch marks the DSCP value of an IP packet and the CoS value of the VLAN tag on the Ethernet frame as 0.
MQC-Based QoS on the Supervisor Engine 6-E and 6L-E
The operation of Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E follow the QoS deployment outlined in RFCs 2597, 2598, 2474, and 2475. A high-level QoS flow is as follows:
1. The incoming packet is classified (based on different packet fields, receive port and/or VLAN) to belong to a traffic class.
2. Depending on the traffic class, the packet is rate-limited/policed and its priority is optionally marked (typically at the edge of the network) so that lower priority packets are dropped or marked with lower priority in the packet fields (DSCP and CoS).
3. After the packet has been marked, it is looked up for forwarding. This action obtains the transmit port and VLAN to transmit the packet.
4. The packet is classified in the output direction based on the transmit port and/or VLAN. The classification considerrs any marking of the packet by input QoS.
5. Depending on the output classification, the packet is policed, its priority is optionally (re-)marked, and the transmit queue for the packet is determined depending on the traffic class.
6. The transmit queue state is dynamically monitored by using the AQM (Active Queue Management) algorithm and drop threshold configuration to determine whether the packet should be dropped or enqueued for transmission.
7. If eligible for transmission, the packet is enqueued to a transmit queue. The transmit queue is selected based on output QoS classification criteria. The selected queue provides the desired behavior in terms of latency and bandwidth.
QoS Classification Layers in Frames and Packets illustrates a high-level flow of QoS function on Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E.
Figure 1-7 QoS Packet Processing
Platform-Supported Classification Criteria and QoS Features
The following table provides a summary of various classification criteria and actions supported on Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E. For details, refer to the Catalyst 4500 Series Switch Command Reference.
Platform Hardware Capabilities
Prerequisites for Applying a QoS Service Policy
Unlike the switch QoS model, there is no prerequisite for enabling QoS on various targets. Only attachment of a service policy enables QoS, and detachment of that policy disables QoS on that target.
Restrictions for Applying a QoS Service Policy
Traffic marking can be configured on an interface, a VLAN, or a port and VLAN. An interface can be a Layer 2 access port, a Layer 2 switch trunk, a Layer 3 routed port, or an EtherChannel. A policy is attached to a VLAN using the vlan configuration mode.
Attaching QoS service policy to VLANs and EtherChannel is described in the “Policy Associations” section.
Classification
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support classification of Layer 2, IP, IPv6 packets, and ARP packets. Packet marking performed on input can be matched in the output direction. The previous table lists the full set of capabilities. By default, Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E also support classification resources sharing.
By default, when the same policy is attached to a port or a VLAN or on per-port per-VLAN targets, ACL entries are shared on Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E. Even though CAM entries are shared, QoS actions is unique on each target.
If policy map p1 is applied to interfaces Gig 1/1 and Gig 1/2, one CAM entry is used (one ACE that matches IP packets), but two policers are allocated (one per target). All IP packets are policed to one MBps on interface Gig 1/1 and packets on interface Gig 1/2 are policed to one MBps.
Note With Cisco IOS Release 12.2(46)SG, you can enter the match protocol arp command. For details, see the Catalyst 4500 Series Switch Cisco IOS Command Reference.
Classification Statistics
Note Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support only packet based classification statistics.
They support TCAM resource sharing. When a policy map is applied on multiple targets, the command show policy-map interface displays the aggregate classification statistics, not those specific to an interface.
Note To obtain per interface policy map stats, you should configure a unique policy map name on each interface.
When a policy map is attached to a port-channel member ports, classification statistics are not displayed.
Policing
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support policers in the following operation modes:
This kind of policer is configured with committed rate (CIR) and normal burst, and is restricted to processing only conform and exceed actions.
Note This is the only mode supported on the Supervisor Engine II-Plus to V-10GE based systems.
- Single Rate Three Color Marker (srTCM) (RFC 2697)
- Two Rate Three Color Marker (trTCM) (RFC 2698)
- Color Blind Mode
Policing accuracy of 0.75 percent of configured policer rate.
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support 16384 (16 x 1024, 16 K) single-rate, single burst policers. 16 K policers are organized as eight banks of two K policers. The policer banks are dynamically assigned (input or output policer bank) by the software depending on the QoS configuration. The 16 K policers are dynamically partitioned by software as follows:
– 0 Input Policers and 16 K Output Policers
– 2 K Input Policers and 14 K Output Policers
– 4 K Input Policers and 12 K Output Policers
– 6 K Input Policers and 10 K Output Policers
– 8 K Input Policers and eight K Output Policers
– 10 K Input Policers and six K Output Policers
– 12 K Input Policers and four K Output Policers
– 14 K Input Policers and two K Output Policers
– 16 K Input Policers and zero Output Policers
These numbers represent individual policer entries in the hardware that support a single-rate and burst parameter. Based on this, Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support the following number of policers:
- 16 K Single Rate Policer with Single Burst (Two Color Marker)
- 8 K Single Rate Three Color Marker (srTCM)
- 8 K Two Rate Three Color Marker (trTCM)
These policers are partitioned between input and output in chunks of 2 K policer banks. The different types of policers can all co-exist in the system. However, a specific type of policer (srTCM, trTCM) is configurable as a block of 128 policers.
Implementing Policing
For details on how to implement the policing features on a Catalyst 4500 series switch, refer to the
Cisco IOS documentation at the following link:
http://www.cisco.com/en/US/docs/ios/12_2/qos/configuration/guide/qcfpolsh.html
Platform Restrictions
Platform restrictions include the following:
- Multi-policer actions can be specified (setting CoS and IP DSCP is supported).
- Simultaneous unconditional and policer-based marking is not supported.
- If policer-based service-policy is attached to both a port and a VLAN, port-based policed is preferred by default. To override a specific VLAN policy on a given port, then you must configure a per-port per-VLAN policy.
- When you delete a port channel with a per-port per-VLAN QoS policy, the switch crashes.
Before deleting the port channel, do the following:
– Remove any per-port per-VLAN QoS policies, if any.
– Remove the VLAN configuration on the port channel with the no vlan-range command.
Marking Network Traffic
Marking network traffic allows you to set or modify the attributes of traffic (that is, packets) belonging to a specific class or category. When used in conjunction with network traffic classification, marking network traffic is the foundation for enabling many quality of service (QoS) features on your network This module contains conceptual information and the configuration tasks for marking network traffic.
Information about Marking Network Traffic
To mark network traffic, you should understand the following concepts:
Purpose of Marking Network Traffic
Traffic marking is used to identify certain traffic types for unique handling, effectively partitioning network traffic into different categories.
After the network traffic is organized into classes by traffic classification, traffic marking allows you to mark (that is, set or change) a value (attribute) for the traffic belonging to a specific class. For instance, you may want to change the class of service (CoS) value from 2 to 1 in one class, or you may want to change the differentiated services code point (DSCP) value from 3 to 2 in another class. In this module, these values are referred to as attributes or marking fields.
Attributes that can be set and modified include the following:
Benefits of Marking Network Traffic
Traffic marking allows you to fine-tune the attributes for traffic on your network. This increased granularity helps isolate traffic that requires special handling, which helps to achieve optimal application performance.
Traffic marking allows you to determine how traffic will be treated, based on how the attributes for the network traffic are set. It allows you to segment network traffic into multiple priority levels or classes of service based on those attributes, as follows:
- Traffic marking is often used to set the IP precedence or IP DSCP values for traffic entering a network. Networking devices within your network can then use the newly marked IP precedence values to determine how traffic should be treated. For example, voice traffic can be marked with a particular IP precedence or DSCP and strict priority can then be configured to put all packets of that marking into that queue. In this case, the marking was used to identify traffic for strict priority queue.
- Traffic marking can be used to identify traffic for any class-based QoS feature (any feature available in policy-map class configuration mode, although some restrictions exist).
- Traffic marking can be used to assign traffic to a QoS group within a switch. The switch can use the QoS groups to determine how to prioritize traffic for transmission. The QoS group value is usually used for one of the two following reasons:
– To leverage a large range of traffic classes. The QoS group value has 64 different individual markings, similar to DSCP.
Methods for Marking Traffic Attributes
Note This section describes unconditional marking, which differs from policer-based marking. Unconditional marking is based only on classification.
Method One—Unconditional explicit marking (using the set command)
You specify the traffic attribute you want to change with a set command configured in a policy map. Table 1-6 lists the available set commands and the corresponding attribute. For details on the set command, refer to the Catalyst 4500 Series Switch Command Reference.
|
|
|
---|---|---|
If you are using individual set commands, those set commands are specified in a policy map. The following is a sample of a policy map configured with one of the set commands listed in Table 1-6 .
In this sample configuration, the set cos command has been configured in the policy map (policy1) to mark the CoS attribute:
For information on configuring a policy map, see the “Creating a Policy Map” section.
The final task is to attach the policy map to the interface. For information on attaching the policy map to the interface, see the “Attaching a Policy Map to an Interface” section.
Method Two—Unconditional table map-based marking
You can create a table map that can be used to mark traffic attributes. A table map is a type of two-way conversion chart that lists and maps one traffic attribute to another. A table map supports a many-to-one type of conversion and mapping scheme. The table map establishes a to-from relationship for the traffic attributes and defines the change to be made to the attribute. An attribute is set to one value that is taken from another value. The values are based on the specific attribute being changed. For instance, the Precedence attribute can be a number from 0 to 7, while the DSCP attribute can be a number from 0 to 63.
The following is a sample table map configuration:
Table 1-7 lists the traffic attributes for which a to-from relationship can be established using the table map.
|
|
---|---|
The following is an example of a policy map (policy2) configured to use the table map (table-map1) created earlier:
In this example, a mapping relationship was created between the CoS attribute and the DSCP attribute as defined in the table map.
For information on configuring a policy map to use a table map, “Configuring a Policy Map” section.
The final task is to attach the policy map to the interface. For information on attaching the policy map to the interface, see the “Attaching a Policy Map to an Interface” section.
Marking Action Drivers
A marking action can be triggered based on one of the two QoS processing steps:
- Classification-based—All the traffic matching a class is marked using either explicit or table map-based method. This method is referred to as unconditional marking.
- Policer result-based—A class of traffic is marked differently based on the policer result (conform/exceed/violate) applicable to that packet. This method is referred to as conditional marking.
Traffic Marking Procedure Flowchart
Figure 1-8 illustrates the order of the procedures for configuring traffic marking.
Figure 1-8 Traffic-Marking Procedure Flowchart
Restrictions for Marking Network Traffic
Multi-attribute Marking Support
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E can mark more than one QoS attribute of a packet matching a class of traffic. For example, DSCP, CoS, and QoS-group can all be set together, using either explicit or table map-based marking.
Note When using unconditional explicit marking of multiple fields or policer-based multifield, multiregion (conform/exceed/violate) marking the number of table maps that can be set up in ToS or CoS marking tables will be less than the maximum supported.
Hardware Capabilities for Marking
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E provide a 128 entry marking action table where each entry specifies the type of marking actions on CoS and DSCP/Precedence fields as well as policer action to transmit/markdown/drop a packet. One such table is supported for each direction, input and output. This table is used for both unconditional marking as well as policer-based marking. It can be used to support 128 unique marking actions or 32 unique policer-based actions or a combinations of the two.
For each of the marking fields (CoS and DSCP), Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E provide 512 entry marking tables for each direction. These are similar to mapping tables available on supervisor engines that support the switch QoS model. However, these provide an ability to have multiple unique mapping tables that are set up by the user.
For example, the ToS marking table provides marking of DSCP/Precedence fields and can be used as one of the following:
- 8 different table maps with each mapping the 64 DSCP or qos-group values to another DSCP
- 64 (32) different table maps with each one mapping eight CoS (16 CoS and CFi) values to DSCP in input (output) direction
- A combination of above two types of table maps
Similar mappings are available on the 512 entry CoS marking table.
Configuring the Policy-Map Marking Action
This section describes how to establish unconditional marking action for network traffic.
Prerequisites
- Create a class map (ipp5) and a policy map. Refer to the “Configuring a QoS Policy” section.
- Configure the marking action. Refer to the “Configuring Policy-Map Class Actions” section.
Note On Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E, the marking action command options have been extended. Refer to Table 1-6 and Table 1-7.
Configuring Table Map-Based Unconditional Marking
To configure table map-based unconditional marking, perform this task:
The following example shows how to enable marking action using table map:
Configuring Policer Result-Based Conditional Marking
To configure policer result-based conditional marking, set up a single-rate or dual-rate policer. Refer to the “Implementing Policing” section.
This example shows how to configure a two-rate three-color policer with explicit actions for each policer region:
Marking Statistics
The marking statistics indicate the number of packets that are marked.
For unconditional marking, the classification entry points to an entry in the marking action table that in turn indicates the fields in the packet that are marked. The classification statistics indicates the unconditional marking statistics.
For a conditional marking using policer, provided the policer is a packet rate policer, you cannot determine the number packets marked because the policer only provides byte statistics for different policing results.
Shaping, Sharing (Bandwidth), Priority Queuing, Queue-Limiting and DBL
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support the classification-based (class-based) mode for transmit queue selection. In this mode, the transmit queue selection is based on the output QoS classification lookup.
Note Only output (egress) queuing is supported.
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E hardware support eight transmit queues per-port. Once the forwarding decision has been made to forward a packet out a port, the output QoS classification determines the transmit queue into which the packet needs to be enqueued.
By default, in Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E, without any service policies associated with a port, there are two queues (a control packet queue and a default queue) with no guarantee as to the bandwidth or kind of prioritization. The only exception is that system-generated control packets are enqueued into a control packet queue so that control traffic receives some minimum link bandwidth.
Queues are assigned when an output policy attached to a port with one or more queuing-related actions for one or more classes of traffic. Because there are only eight queues per-port, there can be at most eight classes of traffic (including the reserved class, class-default) with queuing action(s). Classes of traffic that do not have any queuing action are referred to as non-queuing classes. Nonqueuing class traffic uses the queue corresponding to class class-default.
When a queuing policy (a policy with queuing action) is attached, the control packet queue is deleted and the control packets are enqueued into respective queue per their classification. Note that this differs from the way control-traffic was prioritized in the Catalyst 4924, Catalyst 4948, Catalyst 4948-10GE, and the Supervisor Engines II+, II+10GE, IV, V, and V-10GE. On these platforms, by default, control traffic was guaranteed 25 percent of the link bandwidth whether QoS was configured. If this same behavior is required on Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E, an egress QoS class must be configured to match IP Precedence 6 and 7 traffic, and a bandwidth guarantee must be configured.
Dynamic resizing of queues (queue limit class-map action) is supported using the use of the queue-limit command. Based on the chassis and line card type, all eight queues on a port are configured with equal queue size.
Shaping
Shaping enables you to delay out-of-profile packets in queues so that they conform to a specified profile. Shaping is distinct from policing. Policing drops packets that exceed a configured threshold. Shaping buffers packets so that traffic remains within a given threshold and offers greater smoothness in handling traffic than policing. You enable average-rate traffic shaping on a traffic class with the policy map class configuration command.
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support a range of 32 kbps to 10 gbps for shaping, with a precision of approximately with a precision of approximately +/- 0.75 percent.
When a queuing class is configured without any explicit shape configuration, the queue shape is set to the link rate.
To configure class-level shaping in a service policy, perform this task:
To delete an existing policy map, use the no policy-map policy-map-name global configuration command. To delete an existing class, use the no class class-name policy-map configuration command. To disable the average-rate traffic shaping, use the no shape average policy-map class configuration command.
This example shows how to configure class level, average-rate shaping. It limits traffic class class1 to a data transmission rate of 256 kbps:
This example shows how to configure class level, average shape percentage to 32 percent of link bandwidth for queuing-class traffic:
Sharing (Bandwidth)
The bandwidth assigned to a class of traffic is the minimum bandwidth that is guaranteed to the class during congestion. Transmit queue sharing is the process by which output link bandwidth is shared among multiple queues of a given port.
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support a range of 32 kbps to 10 Gbps for sharing, with a precision of approximately +/- 0.75 percent. The sum of configured bandwidth across all queuing classes should not exceed the link bandwidth.
To configure class-level bandwidth action in a service policy, perform this task:
To delete an existing policy map, use the no policy-map policy-map-name global configuration command. To delete an existing class, use the no class class-name policy-map configuration command. To return to the default bandwidth, use the no bandwidth policy-map class configuration command.
This example shows how to create a class-level policy map called policy11 for three classes called prec1, prec2, and prec3. In the policy for these classes, 30 percent of the available bandwidth is assigned to the queue for the first class, 20 percent is assigned to the queue for the second class, and 10 percent is assigned to the queue for the third class.
This example shows how to create a class-level policy map called policy11 for three classes called prec1, prec2, and prec3. In the policy for these classes, 300 MBps of the available bandwidth is assigned to the queue for the first class, 200 MBps is assigned to the queue for the second class, and 100 MBps is assigned to the queue for the third class.
When a queuing class is configured without any explicit share/bandwidth configuration, because the queue is not guaranteed any minimum bandwidth, the hardware queue is programmed to get a share of any unallocated bandwidth on the port as shown in the following example.
If there is no bandwidth remaining for the new queue or if the unallocated bandwidth is not sufficient to meet the minimum configurable rate (32 kbps) for all queues which do not have any explicit share/bandwidth configuration, then the policy association is rejected.
For example, there are two queues as follows:
The bandwidth allocation for the queues is as follows:
Similarly, when another queuing class (say q3) is added without any explicit bandwidth (a shape command), then the bandwidth allocation is as follows:
Priority Queuing
On Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E, you can configure only one transmit queue (on a port) as strict priority (termed low latency queue, or LLQ).
LLQ provides strict-priority queuing for a traffic class. It enables delay-sensitive data, such as voice, to be sent before packets in other queues. The priority queue is serviced first until it is empty or until it is under its shape rate. Only one traffic stream can be destined for the priority queue per class-level policy. You enable the priority queue for a traffic class with the priority policy-map class configuration command at the class mode.
An LLQ can starve other queues unless it is rate-limited. Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E do not support conditional policing where a two-parameter policer (rate, burst) becomes effective when the queue is congested (based on queue length). However, it supports application of an unconditional policer to rate-limit packets enqueued to the strict priority queue.
When a priority queue is configured on one class of a policy map, only bandwidth remaining is accepted on other classes, guaranteeing a minimum bandwidth for other classes from the remaining bandwidth of what is left after using the priority queue. When a priority queue is configured with a policer, then either bandwidth or bandwidth remaining is accepted on other classes.
Note Use bandwidth or bandwidth remaining on all classes. You cannot apply bandwidth on one class and bandwidth remaining on another class within a policy map.
To enable class-level priority queuing in a service policy, perform this task:
To delete an existing policy map, use the no policy-map policy-map-name global configuration command. To delete an existing class, use the no class class-name policy-map configuration command. To disable the priority queue, use the no priority policy-map class configuration command.
This example shows how to configure a class-level policy called policy1. Class 1 is configured as the priority queue, which is serviced first until it is empty.
Queue-limiting
When a class-based queue is instantiated on a physical port, it is set up with a default size. This size represents the number of queue entries in which packets belonging to that class of traffic can be queued. The scheduler moves packets from the queue that are ready for transmission, based on the queue shape, bandwidth, and priority configuration.
The queue-limit provides the maximum number of packets that can be in the queue at any given time. When the queue is full, an attempt to enqueue any further packets results in tail drop. However, if dynamic buffer limiting (DBL) is enabled on the queue, packets get a probabilistic drop based on the DBL algorithm, even when the queue is not full.
The queue-limit command can be configured under a class only when queue scheduling, such as bandwidth, shape, or priority is already configured. The only exception to this requirement is the support of the stand-alone queue-limit command on the class-default class.
Queue Memory
The number of queue entries that can be allocated has to be a multiple of eight and can range from 16 to 8184. When a class-based queue is instantiated on a physical port, it is given a default number of entries. This default queue size is based on the number of slots in the chassis and the number of front-panel ports in each slot.
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E have 512 K (524,288) queue entries of which the system sets aside 100 K (102,400) queue entries in a free reserve pool. Of the remaining 412 K (421,88), the drop port is provided 8184 entries and the CPU ports are assigned 11704 entries. The remaining entries are divided equally among the slots in the chassis. In a redundant chassis, the two supervisor slots are considered to be one for the purpose of this entry distribution. Within each slot, the number of queue entries are equally divided among the front-panel ports present on the line card in that slot.
When the user configuration for queue entries on an interface exceeds its dedicated quota, the system attempts to satisfy the configuration from the free reserve pool. The entries from the free reserve pool are allocated to interfaces on a first-come first-served basis.
Service Policy Association
When a QoS service-policy with queuing actions is configured, but no explicit queue-limit command is attached in the egress direction on a physical interface, each of the class-based queues gets the same number of queue entries from within the dedicated quota for that physical port. When a queue is explicitly given a size using the queue-limit command, the switch tries to allocate all the entries from within the dedicated quota for the interface. If the required number of entries is greater than the dedicated quota for the interface, the switch tries to allocate the entries from the free reserve.
The queue entries associated with a queue always have to be consecutive. This requirement can result in fragmentation of the 512 K of the queue entries that are shared across the switch. For example, an interface may not have enough entries for a queue in its dedicated quota and thus have to use the free reserve to set up that queue. In this case, the queue entries from the dedicated quota remain unused because they cannot be shared with any other port or slot.
When the QoS service policy associated with an interface is removed, any queue entries taken from the free reserve are returned to the free reserve pool. The interface queuing configuration reverts to two queues — class-default and the control-packet queue with default shape, bandwidth, and size. The control-packet queue is set up with size 16, and the default queue is set up with the maximum size possible based on the dedicated quota for that interface.
Queue Allocation Failure
The switch might not be able to meet the explicit queue size required on one or more queues on an interface because of fragmentation of queue memory or lack of enough free reserve entries. In this scenario, the switch logs an error message to notify you of the failure. The QoS service policy is left configured on the interface. You can fix the error by removing the QoS service policy and examining the current use of the queue entries from the free reserve by other ports on the switch.
To configure class-level queue-limit in a service policy, perform this task:
To remove the explicit queue size use the no queue-limit command under the class in a policy map.
This example shows how to configure a class-based queue with an explicit queue-limit command. It limits traffic class class1 to a queue of size 4048:
Active Queue Management by Using Dynamic Buffer Limiting
Active Queue Management (AQM) provides buffering control of traffic flows prior to queuing a packet into a transmit queue of a port. In a shared-memory switch, this feature ensures that certain flows do not retain the switch packet memory.
Note Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support active switch buffer management by using Dynamic Buffer Limiting (DBL).
Except for the default class of traffic (class class-default), you can configure DBL action only when at least one of the other queuing actions is configured.
To configure class-level DBL action along with shaping in a service policy, perform this task:
To delete an existing policy map, use the no policy-map policy-map-name global configuration command. To delete an existing class, use the no class class-name policy-map configuration command. To disable DBL on the associated queue, use the no dbl policy-map class configuration command.
The following example shows how to configure class-level, DBL action along with average-rate shaping. It enables DBL on the queue associated with traffic-class class1.
Transmit Queue Statistics
Transmit queue statistics are visible by using the show policy-map interface command.
Policy Associations
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E support per-port, per-VLAN policies. The associated policies are attached to the interface, VLAN, and a specific VLAN on a given port, respectively.
A policy can be associated with a variety of objects. Table 1-8 lists the objects and the actions allowed.
|
|
---|---|
QoS Action Restrictions
Action restrictions include the following:
- The same actions cannot be performed multiple times in a given direction on different targets. In other words, it is not possible to police the packets both on port and VLAN in the input direction. However, the user can police on the input port and on the output VLAN.
- Queuing actions are only allowed in the egress direction and only on the physical port.
- Percentage-based actions like policer cannot be configured on a VLAN.
- Port channel or VLAN configuration can only have a policing or a marking action, not a queueing action.
QoS Policy Priorities
Qos Policy Merging
Applicable policies are applied to a given packet in given direction. For example, configure egress VLAN-based police and marking, followed by selective queuing on the port, then actions from both policies will be applied for this packet.
The following policy-map configuration restrictions are imposed on an EtherChannel:
- Only policing and marking actions are supported at the EtherChannel level.
- Only queuing actions are supported at the physical member port level.
A packet can be marked (DSCP or CoS fields) by the EtherChannel policy. If the physical member port policy uses a classification based on DSCP or CoS fields, it must be based on the marked (modified) value. To ensure proper operation, the following restriction is placed on the EtherChannel.
The classification criteria for the policy map on the physical member ports has to based only on one type of field:
Classification criteria for the policy map on the physical member ports cannot be based on a combination of fields. This restriction ensures that if the EtherChannel policy is marking down DSCP or CoS, the marked (modified) value-based classification can be implemented in hardware.
Auto-QoS is not supported on EtherChannel or its member ports. A physical port configured with Auto-QoS is not allowed to become a member of a physical port.
Software QoS
At the highest level, there are two types of locally sourced traffic (such as control protocol packets, pings, and Telnet) from the switch: high priority traffic (typically the control protocol packets such as OSPF Hellos and STP) and low priority packets (all other packet types).
The QoS treatment for locally sourced packets differs for the two types.
Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E provide a way to apply QoS to packets processed in the software path. The packets that get this QoS treatment in software can be classified into two types: software-switched packets and software-generated packets.
On reception, software-switched packets are sent to the CPU that in turn sends them out of another interface. For such packets, input software QoS provides input marking and output software QoS provides output marking and queue selection.
The software-generated packets are the ones locally sourced by the switch. The type of output software QoS processing applied to these packets is the same as the one applied to software switched packets. The only difference in the two is that the software-switched packets take input marking of the packet into account for output classification purpose.
As per CSCtf40934, the following change is implemented beginning with Cisco IOS Release 12.2(54)SG:
High Priority Packets
High priority packets are marked as one of the following:
- Internally with PAK_PRIORITY
- With IP Precedence of 6 (for IP packets)
- With CoS of 6 (for VLAN tagged packets)
These packets operate as follows:
- They are not dropped because of any policing, AQM, drop thresholds (or any feature that can drop a packet) configured as per the egress service policy. However, they might be dropped because of hardware resource constraints (packet buffers, queue full).
- They are classified and marked as per the marking configuration of the egress service policy that could be a port or VLAN. Refer to the “Policy Associations” section.
- These high priority packets are enqueued to queue on the egress port based on the following criteria:
– If there is no egress queuing policy on the port, the packet is queued to a control packet queue that is set up separately from the default queue and has 5 percent of the link bandwidth reserved for it.
– If there is an egress queuing policy on the port, the queue is selected based on the classification criteria applicable to the packet.
As per CSCtf40934, beginning with Cisco IOS Release 12.2(54)SG, locally generated HI priority packets are handled as follows:
In the absence of a QoS policy, HI priority packets are enqueued into an internal priority queue.
In the presence of a policy, HI priority packets are enqueued into a priority queue if one is defined. If none is defined, classification criteria determines the queue. HI priority packets are never subjected to egress QoS marking. Locally generated packets that are not HI priority are treated like any other packet. For example, QoS policy is used to determine any marking and queueing action.
Low Priority Packets
Packets that are not considered high priority (as described previously) are considered unimportant. These include locally sourced pings, Telnet, and other protocol packets. They receive the same treatment as any other packet that is transmitting the given transmit port including egress classification, marking, and queuing.
Configuring CoS Mutation
CoS reflection and CoS mutation are supported on Supervisor E ngine 6-E and Catalyst 4900M. Below is an example of how to apply CoS reflection.
Let us say that traffic arrives on interface gigabit 2/5 with VLAN 10 and COS 1, 2,.... We want traffic to egress interface gigabit 2/6 with outer tag VLAN 11 and CoS copied from C-tag, where C-tag is VLAN 10 and COS 1, 2,...
Configuring System Queue Limit
Note This feature is supported on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E, and Catalyst 4948E-F.
Note This feature is available only from Cisco IOS Release 15.0(2)SG1 and later.
With the hw-module system max-queue-limit command, the Catalyst 4500 series switch allows you to change the queue limit for all interfaces globally, instead of applying a policy with queue limit to all the interfaces.
This command allows you to change the queue limit for all interfaces globally rather than apply a policy with a queue limit to all the interfcaes
To set the queue limit globally, perform this task:
This is a global configuration command. It can be overriden by the per port, per class, queue-limit command.
For a standalone supervisor engine, you must reboot the engine after applying this command.
For redundant supervisors in SSO mode, you must enter the redundancy reload shelf command enforce reboot to both the supervisors.
For redundancy supervisors in RPR mode, you must execute two consecutive switchovers to enforce the system queue limit on both the supervisors.
This example shows how to set the queue limit globally to 1024 on a standalone supervisor engine:
Configuring Auto-QoS on Supervisor Engine 6-E, Supervisor Engine 6L-E, Catalyst 4900M, and Catalyst 4948E
Note Auto-QoS cannot be applied to EtherChannel interfaces or VLANs.
Unlike auto-QoS on Supervisor Engines II-Plus to V-10GE, auto-QoS on Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E use the MQC model. This means that instead of using certain global configurations such as QoS and QoS DBL, auto-QoS applied to any interface on a switch with Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E configure several global class maps and policy maps.
The class maps are as follows:
The class maps are intended to identify control and data (bearer) voice traffic for either an Layer 2 or
Layer 3 interface.
The policy maps are as follows:
The three policy maps are defined as follows:
This policy map is applied as an input service policy on an Layer 3 interface (such as an uplink connection to a neighboring switch) when auto-QoS is configured on the port.
This policy map is applied as an input service policy on an Layer 2 interface that could be either an uplink connection or a port hooked to a Cisco IP phone.
This policy map is applied as an output policy for any port on which auto-QoS is configured, establishing policy governing egress traffic on the port based on whether it is voice data or control traffic.
The purpose of the input policy maps is to identify voice data or control traffic and mark it as such as it traverses the switch. The output policy map matches the packets on the marking occurring on ingress and then applies egress parameters such as bandwidth, policing and/or priority queuing.
The invocation of auto-QoS on a switch using Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, and Supervisor Engine 6L-E use the same configuration commands used on Supervisor Engines II-Plus to V-10GE.
For switch-to-switch connections, the [no] auto qos voip trust command is used to apply an input and output service policy on the interface:
The selection of the input policy depends on whether the port is Layer 2 or Layer 3. For Layer 2, the policy trusts the CoS setting in the received packets. For Layer 3 ports, it relies on the DSCP value contained in the packets.
For phone-connected ports, the [no] auto qos voice cisco-phone command is used to apply the following service policy to the port:
It establishes a trusted boundary that recognizes Cisco IP phones and trusts the CoS setting of the packets from the phone. If a Cisco IP phone is not detected, the CoS field is ignored and the packets are not classified as voice traffic. Upon detecting a Cisco IP phone, the ingress packets are marked based on the CoS value in the packets. This marking is used on egress for proper traffic classification and handling.