2-38
Catalyst 3750 Metro Switch Command Reference
OL-9645-10
Chapter 2 Catalyst 3750 Metro Switch Cisco IOS Commands
class
This example shows how to create a hierarchical class-level policy map with two traffic classes. One of
the classes has a class-level classification and a two-rate policer, and the other is the default traffic class.
Packets that fail to meet the matching criteria are classified as members of the default traffic class, and
the IP precedence in this traffic is reset to 0.
Switch(config)#
class-map match-all classprece1
Switch(config-cmap)#
match ip precedence 1
Switch(config-cmap)#
exit
Switch-config)#
policy-map precedencepolice
Switch(config-pmap)#
class classprece1
Switch(config-pmap-c)#
police cir 100000000 pir 200000000 conform-action set-prec-transmit
2 exceed-action set-prec-transmit 3 violate-action set-prec-transmit 4
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
class class-default
Switch(config-pmap-c)#
set ip precedence 0
In the previous hierarchical QoS example, the first traffic class has only one match statement. However,
hierarchical policy maps can support multiple match statements.
This example shows how to configure a default traffic class to a policy map:
Switch#
configure terminal
Switch(config)#
class-map cm-3
Switch(config-cmap)#
match ip dscp 30
Switch(config-cmap)#
match protocol ipv6
Switch(config-cmap)#
exit
Switch(config)#
class-map cm-4
Switch(config-cmap)#
match ip dscp 40
Switch(config-cmap)#
match protocol ip
Switch(config-cmap)#
exit
Switch(config)#
policy-map pm3
Switch(config-pmap)#
class class-default
Switch(config-pmap-c)#
set dscp 10
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
class cm-3
Switch(config-pmap-c)
set dscp 4
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
class cm-4
Switch(config-pmap-c)#
trust cos
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
exit
You can verify your settings by entering the
show policy-map
privileged EXEC command.
This example shows how the default traffic class is automatically placed at the end of policy-map pm3
even though
class-default
was configured first:
Switch#
show policy-map pm3
Policy Map pm3
Class cm-3
set dscp 4
Class cm-4
trust cos
Class class-default
set dscp 10
Switch#