606
Configuring QoS
Configuring QoS
Using Class Maps to Define a Traffic Class
You use the class-map global configuration command to name and to isolate a specific traffic flow (or class) from all
other traffic. A class map defines the criteria to use to match against a specific traffic flow to further classify it. Match
statements can include criteria such as an ACL, CoS value, DSCP value, IP precedence values, QoS group values, or
VLAN IDs. You define match criterion with one or more match statements entered in the class-map configuration mode.
Follow these guidelines when configuring class maps:
A match-all class map cannot have more than one classification criterion (one match statement), but a match-any
class map can contain multiple match statements.
The match cos and match vlan commands are supported only on Layer 2 802.1Q trunk ports.
You use a class map with the match vlan command in the parent policy in input hierarchical policy maps for per-port,
per-VLAN QoS on trunk ports. A policy is considered a parent policy map when it has one or more of its classes
associated with a child policy map. Each class within a parent policy map is called a parent class. You can configure
only the match vlan command in parent classes. You cannot configure the match vlan command in classes within
the child policy map.
For an input policy map, you cannot configure an IP classification (match ip dscp, match ip precedence, match
access-group for an IP ACL) and a non-IP classification (match cos or match access-group for a MAC ACL) in the
same policy map or class map. For a per-port, per-VLAN hierarchical policy map, this applies to the child policy map.
You cannot configure match qos-group for an input policy map.
In an output policy map, no two class maps can have the same classification criteria; that is, the same match
qualifiers and values.
The maximum number of class maps on the switch is 1024.
Beginning in privileged EXEC mode, follow these steps to create a class map and to define the match criterion to classify
traffic: