29-45
Catalyst 2960 Switch SoftwareConfiguration Guide
78-16881-01
Chapter29 Configuring QoS
Configuring Standard QoS
Classifying, Policing, and Marking Traffic on Physical Ports by Using Policy Maps
You can configure a policy map on a physical port that specifies which traffic class to act on. Actions
can include trusting the CoS, DSCP, or IP precedence values in the traffic class; setting a specific DSCP
or IP precedence value in the traffic class; and specifying the traffic bandwidth limitations for each
matched traffic class (policer) and the action to take when the traffic is out of profile (marking).
A policy map also has these characteristics:
A policy map can contain multiple class statements, each with different match criteria and policers.
A separate policy-map class can exist for each type of traffic received through a port.
A policy-map trust state and a port trust state are mutually exclusive, and whichever is configured
last takes affect.
Follow these guidelines when configuring policy maps on physical ports:
You can attach only one policy map per ingress port.
If you configure the IP-precedence-to-DSCP map by using the mls qos map ip-prec-dscp
dscp1...dscp8 global configuration command, the settings only affect packets on ing ress interfaces
that are configured to trust the IP precedence value. In a policy map, if you set the packet IP
precedence value to a new value by using the set ip precedence new-precedence policy-map class
configuration command, the egress DSCP value is not affected by the IP-precedence-to-DSCP map.
If you want the egress DSCP value to be different than the ingress value, use the set dscp new-dscp
policy-map class configuration command.
If you enter or have used the set ip dscp command, the switch changes this command to set dscp in
its configuration.
Beginning in privileged EXEC mode, follow these steps to create a policy map:
Command Purpose
Step1 configure terminal Enter global configuration mode.
Step2 class-map [match-all | match-any]
class-map-name
Create a class map, and enter class-map configuration mode.
By default, no class maps are defined.
(Optional) Use the match-all keyword to perform a logical-AND
of all matching statements under this class map. All match cri teria
in the class map must be matched.
(Optional) Use the match-any keyword to perform a logical-OR of
all matching statements under this class map. One or more match
criteria must be matched.
For class-map-name, specify the name of the class map.
If neither the match-all or match-any keyword is specified, the default
is match-all.
Note Because only one match command per class map is supported,
the match-all and match-any keywords function the same.