- QoS CLI Index
- New and Changed Content for QoS CLI Config Guide
- Preface
- Overview
- Using Modular QoS CLI
- Configuring Classification
- Configuring Marking
- Configuring Mutation Mapping
- Configuring Policing
- Configuring Queuing and Scheduling
- Network QoS Policy Configuration
- Configuring Queuing and Scheduling on F1 Modules
- Configuring Priority Control
- Monitoring QoS Statistics
- Limits Appendix
- Additional References Appendix
- Information About Classification
- Licensing Requirements for Classification
- Prerequisites for Classification
- Guidelines and Limitations
- Configuring Traffic Classes
- Configuring ACL Classification
- Configuring DSCP Classification
- Configuring IP Precedence Classification
- Configuring Protocol Classification
- Configuring QoS Group Classification
- Configuring Discard Class Classification
- Configuring Layer 3 Packet Length Classification
- Configuring CoS Classification
- Configuring IP RTP Classification
- Configuring Class Map Classification
- Verifying the Classification Configuration
- Configuration Examples for Classification
- Feature History for Classification
Configuring Classification
This chapter describes how to configure classification on the Cisco NX-OS device. This chapter includes the following sections:
Information About Classification
Classification is the separation of packets into traffic classes. You configure the device to take a specific action on the specified classified traffic, such as policing or marking down, or other actions.
You can create class maps to represent each traffic class by matching packet characteristics with the classification criteria in Table 2-1 .
You can specify multiple match criteria, you can choose to not match on a particular criterion, or you can determine the traffic class by matching any or all criteria.
Note
However, if you match on an ACL, no other match criteria, except the packet length, can be specified in a match-all class. In a match-any class, you can match on ACLs and any other match criteria.
Some match criteria relate only to ingress or egress traffic. For example, the internal label QoS group has no meaning on ingress traffic because it has not yet been assigned a value.
Traffic that fails to match any class in a QoS policy map is assigned to a default class of traffic called class-default. The class-default can be referenced in a QoS policy map to select this unmatched traffic.
Note
When you configure match all for a QoS class map by entering the class-map type qos match-all command, the match-all option does not work. Instead, the match criteria is always treated as match any.
You can reuse class maps within the same virtual device context (VDC) when defining the QoS policies for different interfaces that process the same types of traffic.
Note
For more information on class maps, see Chapter3, “Using Modular QoS CLI”
Licensing Requirements for Classification
The following table shows the licensing requirements for this feature:
However, using virtual device contexts (VDCs) requires an Advanced Services license.
Prerequisites for Classification
Classification has the following prerequisites:
- You must be familiar with Chapter3, “Using Modular QoS CLI”
- You are logged on to the switch.
- You are in the correct VDC. A VDC is a logical representation of a set of system resources. You can use the switchto vdc command with a VDC number.
Guidelines and Limitations
Cassification has the following configuration guidelines and limitations:
- You can specify a maximum of 1024 match criteria in a class map.
- You can configure a maximum of 4096 classes for use in a single policy map.
- When you match on an ACL, the only other match you can specify is the Layer 3 packet length in a match-all class.
- You can classify traffic on Layer 2 ports based on either the port policy or VLAN policy of the incoming packet but not both. Either the port policy or the VLAN policy takes effect but not both. If both are present, the device acts on the port policy and ignores the VLAN policy.
- For F1 module proxy-forwarded traffic, ACL classification is matched against the layer 3 protocols shown in the following table.
|
|
|
|---|---|
Note
Layer 3 protocols not listed in the table are classified as protocol number 4 (IPv4 Encapsulation).
Configuring Traffic Classes
This section includes the following topics:
- Configuring ACL Classification
- Configuring DSCP Classification
- Configuring IP Precedence Classification
- Configuring Protocol Classification
- Configuring QoS Group Classification
- Configuring Discard Class Classification
- Configuring Layer 3 Packet Length Classification
- Configuring CoS Classification
- Configuring IP RTP Classification
- Configuring Class Map Classification
Configuring ACL Classification
Note
The device does not support the no form of the match access-group name command.
You can classify traffic by matching packets based on existing ACLs. The permit and deny ACL keywords are ignored in the matching. QoS does not use the permit-deny functions of ACLs. You can classify by either IPv4 or IPv6.
Note
Tunneled IP packets are matched unless the tunneling protocol is also IP, and then the match applies to the outer IP header and not the encapsulated IP header.
SUMMARY STEPS
2.
class-map [ type qos ] [ match-any | match-all ] class-map-name
DETAILED STEPS
This example shows how to display the ACL class-map configuration:
Configuring DSCP Classification
You can classify traffic based on the DSCP value in the DiffServ field of the IP header. The standard DSCP values are listed in Table 2-3 .
|
|
|
|---|---|
Note
Tunneled IP packets are matched unless the tunneling protocol is also IP, and the match applies to the outer IP header and not the encapsulated IP header.
SUMMARY STEPS
2.
class-map [type qos] [match-any | match-all] class-map-name
`DETAILED STEPS
|
|
|
|
|---|---|---|
class-map [ type qos ] [ match-any | match-all ] class-map-name |
Creates or accesses the class map named class-map-name and enters class-map mode. The class-map name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters. |
|
Configures the traffic class by matching packets based on dscp-values. The standard DSCP values are shown in Table 2-3 . Use the not keyword to match on values that do not match the specified range. |
||
Exits class-map queuing mode, and enters configuration mode. |
||
(Optional) Saves the running configuration to the startup configuration. |
This example shows how to display the DSCP class-map configuration:
Configuring IP Precedence Classification
You can classify traffic based on the precedence value in the type of service (ToS) byte field of the IP header. Table 2-4 shows the precedence values.
|
|
|
|---|---|
Note
Tunneled IP packets are be matched unless the tunneling protocol is also IP, and the match applies to the outer IP header and not the encapsulated IP header.
SUMMARY STEPS
2.
class-map [ type qos ] [ match-any | match-all ] class-map-name
`DETAILED STEPS
|
|
|
|
|---|---|---|
class-map [ type qos ] [ match-any | match-all ] class-map-name |
Creates or accesses the class map named class-map-name, and then enters class-map mode. The class-map name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters. |
|
Configures the traffic class by matching packets based on precedence-values. Values are shown in Table 2-4 . Use the not keyword to match on values that do not match the specified range. |
||
(Optional) Saves the running configuration to the startup configuration. |
This example shows how to display the IP precedence class-map configuration:
Configuring Protocol Classification
For Layer 3 protocol traffic, you can use the ACL classification match. For more information, see the “Configuring ACL Classification” section.
You can classify traffic based on the protocol arguments described in Table 2-5 .
|
|
|
|---|---|
Note
A maximum of eight different protocols (in Table 2-5) can be matched at a time.
SUMMARY STEPS
2.
class-map [ type qos ] [ match-any | match-all ] class-map-name
3.
match [ not ] protocol { arp | bridging | clns | clns_is | dhcp | isis | netbios | cdp | clns_es | ldp }
DETAILED STEPS
This example shows how to display the protocol class-map configuration:
Configuring QoS Group Classification
You can classify traffic based on the value of the QoS group internal label, which is not part of the packet payload or any packet header. You can set the value of the QoS group within a policy map by using the set qos-group command as described in the “Configuring QoS Group Marking” section.
Note
You match on the QoS group only in egress policies because its value is undefined until you set it in an ingress policy.
SUMMARY STEPS
2.
class-map [ type qos ] [ match-any | match-all ] class-map-name
DETAILED STEPS
This example shows how to to display the QoS group class-map configuration:
Configuring Discard Class Classification
You can classify traffic based on the value of the discard class internal label, which is not part of the packet payload or any packet header. You can set the value of the discard class within a policy map using the set discard-class command as described in the “Configuring Discard Class Marking” section.
Note
You match on the discard class only in egress policies because its value is undefined until you set it in an ingress policy.
SUMMARY STEPS
2.
class-map [ type qos ] [ match-any | match-all ] class-map-name
3.
match [ not ] discard-class multi-range-discard-class-values
DETAILED STEPS
This example shows how to display the discard class class-map configuration:
Configuring Layer 3 Packet Length Classification
You can classify Layer 3 traffic based on various packet lengths.
Note
This feature is designed for IP packets only.
SUMMARY STEPS
2.
class-map [ type qos ] [ match-any | match-all ] class-map-name
DETAILED STEPS
This example shows how to display the packet length class-map configuration:
Configuring CoS Classification
You can classify traffic based on the Class of Service (CoS) in the IEEE 802.1Q header. This 3-bit field is defined in IEEE 802.1p to support QoS traffic classes. CoS is encoded in the high order 3 bits of the VLAN ID Tag field and is referred to as user_priority.
SUMMARY STEPS
2.
class-map [ type qos ] [ match-any | match-all ] class-map-name
DETAILED STEPS
This example shows how to display the CoS class-map configuration:
Configuring IP RTP Classification
The IP Real-time Transport Protocol (RTP) is a transport protocol for real-time applications that transmits data such as audio or video and is defined by RFC 3550. Although RTP does not use a common TCP or UDP port, you typically configure RTP to use ports 16384 to 32767. UDP communications uses an even-numbered port and the next higher odd-numbered port is used for RTP Control Protocol (RTCP) communications.
You can configure classification based on UDP port ranges, which are likely to target applications using RTP.
SUMMARY STEPS
2.
class-map [ type qos ] [ match-any | match-all ] class-map-name
DETAILED STEPS
This example shows how to display the rtp class-map configuration:
Configuring Class Map Classification
You must create a referenced class map prior to its reference. You can configure only one level of nesting of class maps. You cannot reference a class map that references another class map.
Before you delete a referenced class map, you should delete all references to that class map.
You can classify traffic based on the match criteria in another class map. You can reference the same class map in multiple policies.
Follow these guidelines while configuring the class-map classification:
- To perform a logical OR with the class map specified in the match class-map command, use the match-any keyword. The match-any or match-all specification of the matched class map is ignored.
- To perform a logical AND with the class map specified in the match class-map command, use the match-all keyword. The match-any or match-all specification of the matched class map is ignored.
SUMMARY STEPS
2.
class-map [ type qos ] [ match-any | match-all ] class-map-name
DETAILED STEPS
This example shows how to display the class-map class-map configuration:
Verifying the Classification Configuration
Use the show class-map command to verify the class-map configuration. This command displays all class maps.
Configuration Examples for Classification
The following example shows how to configure classification for two classes of traffic:
Feature History for Classification
Table 2-6 lists the release history for this feature.
|
|
|
|
|---|---|---|
Feedback