The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes how to configure classification on the Cisco 1000 Series Connected Grid Routers (hereafter referred to as Cisco CG-OS router). This chapter includes the following sections:
•Information About Classification
•Prerequisites for Classification
•Verifying the Classification Configuration
•Configuration Examples for Classification
Classification is the separation of packets into traffic classes. You configure the Cisco CG-OS router to take a specific action on the specified classified traffic, such as marking or priority queuing.
You can create class maps to represent each traffic class by matching packet characteristics with the classification criteria in Table 3-1.
For more information on class maps, see Chapter 2 "Using Modular QoS CLI".
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. Traffic that fails to match any class within a QoS policy map is assigned to a default class of traffic called class-default. You can also directly reference class-default within a QoS policy map to select unmatched traffic.
You can reuse class maps on the Cisco CG-OS router when defining QoS policies for different interfaces that process the same types of traffic.
For more information on class maps, see Chapter 2 "Using Modular QoS CLI".
You must be familiar with Chapter 2 "Using Modular QoS CLI".
You are logged on to the Cisco CG-OS router.
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.
This section includes the following topics:
•Configuring Access Control List Classification
•Configuring DSCP Classification
•Configuring IP Precedence Classification
•Configuring Layer 3 Packet Length Classification
•Configuring Class Map Classification
Note For the examples within this section, please note that because type qos is the system-defined default, you can exclude type qos from the class-map [type qos] [match-any | match-all] class-map-name command when you are configuring class maps and it yields the same result.
You can classify traffic by matching packets based on existing access control lists (ACLs). The permit and deny ACL keywords are ignored in the matching process. QoS does not use the permit and deny functions of ACLs. You can classify traffic as 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.
No prerequisites.
This example shows how to create or access an ACL class map on the Cisco CG-OS router.
router# configure terminal
router(config)# class-map class_acl
router(config-cmap-qos)# match access-group name my_acl
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 3-2.
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.
No prerequisites.
|
|
|
---|---|---|
Step 1 |
configure terminal |
Enters configuration mode. |
Step 2 |
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. |
Step 3 |
match [not] dscp dscp-list |
Configures the traffic class by matching packets based on a dscp-list. Table 3-2 shows the standard DSCP values. Use the not keyword to match on values that do not match the specified range. |
Step 4 |
copy running-config startup-config |
(Optional) Saves the running configuration to the startup configuration. |
This example shows how to configure a DSCP class-map with matching criteria of af21 and af32:
router# configure terminal
router(config)# class-map class_dscp
router(config-cmap-qos)# match dscp af21 af32
router(config-cmap-qos)# copy running-config startup-config
You can classify traffic based on the precedence value in the type of service (ToS) byte field of the IP header. Table 3-3 shows the precedence values.
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.
No prerequisites.
|
|
|
---|---|---|
Step 1 |
configure terminal |
Enters configuration mode. |
Step 2 |
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. |
Step 3 |
match [not] precedence precedence-values |
Configures the traffic class by matching packets based on precedence-values. Values are shown in Table 3-3. Use the not keyword to match on values that do not match the specified range. |
Step 4 |
copy running-config startup-config |
(Optional) Saves the running configuration to the startup configuration. |
This example shows how to classify traffic based on the precedence values of 1-2 and 5-7 (see Table 3-3) in the type of service (ToS) byte field of the IP header:
router# configure terminal
router(config)# class-map class_ip_precedence
router(config-cmap-qos)# match precedence 1-2, 5-7
router(config-cmap-qos)# copy running-config startup-config
You can classify Layer 3 traffic based on various packet lengths.
Note This feature is designed for IPv4 and IPv6 packets only.
No prerequisites.
This example shows how to configure a packet length class-map.
router# configure terminal
router(config)# class-map class_packet_length
router(config-cmap-qos)# match packet length 2000
router(config-cmap-qos)# copy running-config startup-config
Before you reference a class-map within a match class-map command, you must create that referenced class map. Additionally, you can configure only one level of nesting of class maps; and, you cannot reference a class map that references another class map.
Note Before you delete a referenced class map, you must 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 operation for a class map within the match class-map command, use the match-any keyword.
•To perform a logical AND operation for a class map within the class map specified in the match class-map command, use the match-all keyword.
Create the class map that you want to reference within the match class-map command.
This example shows how to configure the class-map, class_class_map to match its criteria with the match criteria defined within the class_map3 class-map:
router# configure terminal
router(config)# class-map class_class_map
router(config-cmap-qos)# match class-map class_map3
router(config-cmap-qos)# copy running-config startup-config
Use the show class-map command to verify the class-map configuration. This command displays all class maps.
router# show class-map
show class-map
Type qos class-maps
====================
class-map type qos match-all class1
match dscp 5
class-map type qos match-all class33
match dscp 10
The following example shows how to configure classification for two classes of traffic:
class-map class_dscp
match dscp af21 af32
exit
class-map class_packet_length
match packet length 2000
exit