39-60
Catalyst 3750-X and 3560-X Switch Software Configuration Guide
OL-21521-01
Chapter 39 Configuring QoS
Configuring Standard QoS
Switch(config-ext-mac)# exit
Switch(config)# class-map macclass1
Switch(config-cmap)# match access-group maclist1
Switch(config-cmap)# exit
Switch(config)# policy-map macpolicy1
Switch(config-pmap)# class macclass1
Switch(config-pmap-c)# set dscp 63
Switch(config-pmap-c)# exit
Switch(config-pmap)# class macclass2 maclist2
Switch(config-pmap-c)# set dscp 45
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# interface gigabitethernet1/0/1
Switch(config-if)# mls qos trust cos
Switch(config-if)# service-policy input macpolicy1
This example shows how to create a class map that applies to both IPv4 and IPv6 traffic:
Switch(config)# ip access-list 101 permit ip any any
Switch(config)# ipv6 access-list ipv6-any permit ip any any
Switch(config)# Class-map cm-1
Switch(config-cmap)# match access-group 101
Switch(config-cmap)# exit
Switch(config)# Class-map cm-2
Switch(config-cmap)# match access-group name ipv6-any
Switch(config-cmap)# exit
Switch(config)# Policy-map pm1
Switch(config-pmap)# class cm-1
Switch(config-pmap-c)# set dscp 4
Switch(config-pmap-c)# exit
Switch(config-pmap)# class cm-2
Switch(config-pmap-c)# set dscp 6
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# interface G0/1
Switch(config-if)# switch mode access
Switch(config-if)# service-policy input pm1
Classifying, Policing, and Marking Traffic on SVIs by Using Hierarchical Policy Maps
You can configure hierarchical policy maps on SVIs, but not on other types of interfaces. Hierarchical
policing combines the VLAN- and interface-level policy maps to create a single policy map.
On an SVI, the VLAN-level policy map specifies which traffic class to act on. Actions can include
trusting the CoS, DSCP, or IP precedence values or setting a specific DSCP or IP precedence value in
the traffic class. Use the interface-level policy map to specify the physical ports that are affected by
individual policers.
Beginning with Cisco IOS Release 12.2(52)SE, you can configure hierarchical policy maps that filter
IPv4 and IPv6 traffic.
Follow these guidelines when configuring hierarchical policy maps:
Before configuring a hierarchical policy map, you must enable VLAN-based QoS on the physical
ports that are to be specified at the interface level of the policy map.
You can attach only one policy map per ingress port or SVI.
A policy map can contain multiple class statements, each with different match criteria and actions.
A separate policy-map class can exist for each type of traffic received on the SVI.