26-22
Catalyst 3750 Metro Switch Software Configuration Guide
78-15870-01
Chapter 26 Configuring QoS
Understanding Hierarchical QoS
This is an example of a VLAN-level policy-map that combines a VLAN-level classification with a
VLAN-level policy-map and associates a previously defined child policy at the class level:
Switch(config)# class-map cls-class
Switch(config-cmap)# match mpls experimental 2
Switch(config-cmap)# exit
Switch(config)# class-map log-class
Switch(config-cmap)# match vlan 203
Switch(config-cmap)# exit
Switch(config)# policy-map cls-policy
Switch(config-pmap)# class cls-class
Switch(config-pmap-c)# set mpls experimental 5
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# policy-map log-policy
Switch(config-pmap)# class log-class
Switch(config-pmap-c)# service-policy cls-policy
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# interface gigabitethernet1/1/2
Switch(config-if)# switchport trunk encapsulation isl
Switch(config-if)# switchport mode trunk
Switch(config-if)# service-policy output log-policy
• Physical level—You can shape or police only the class-default class at the physical level of the
hierarchy by using the shape, police cir, or police cir percent policy-map class configuration
command.
Within a policy-map, the class-default applies to all traffic that is not explicitly matched within the
policy map but does match the parent policy. If no parent policy is configured, the parent policy
represents the physical port. In a physical-level policy-map, class-default is the only class that you
can configure.
You use the service-policy output interface configuration command to attach an egress policy to an
ES port.
This is an example of a physical-level configuration. All hierarchical levels exist, and the order is
preserved. The class level at the bottom, the VLAN level in the middle, and the physical level at the
top.
Switch(config)# class-map my-class
Switch(config-cmap)# match ip precedence 1
Switch(config-cmap)# exit
Switch(config)# class-map my-logical-class
Switch(config-cmap)# match vlan 5
Switch(config-cmap)# exit
Switch(config)# policy-map my-class-policy
Switch(config-pmap)# class my-class
Switch(config-pmap-c)# set ip precedence 2
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# policy-map my-logical-policy
Switch(config-pmap)# class my-logical-class
Switch(config-pmap-c)# shape average 400000000
Switch(config-pmap-c)# service-policy my-class-policy
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# policy-map my-physical-policy
Switch(config-pmap)# class class-default
Switch(config-pmap-c)# shape average 500000000
Switch(config-pmap-c)# service-policy my-logical-policy
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit