2-37
Catalyst 3750 Metro Switch Command Reference
OL-9645-10
Chapter 2 Catalyst 3750 Metro Switch Cisco IOS Commands
class
Examples
This example shows how to create a policy map called
policy1
. When attached to an ingress port, the
policy matches all the inbound traffic defined in
class1
, sets the IP DSCP to 10, and polices the traffic
at an average rate of 1 Mbps and bursts of 20 KB. Traffic exceeding the profile is marked down to a
Traffic exceeding the profile is marked down to a DSCP value obtained from the policed-DSCP map and
then sent.
Switch(config)#
class-map class1
Switch(config-cmap)#
exit
Switch(config)#
policy-map policy1
Switch(config-pmap)#
class class1
Switch(config-pmap-c)#
set ip dscp 10
Switch(config-pmap-c)#
police 1000000 20000 exceed-action policed-dscp-transmit
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
exit
Switch(config)#
interface fastethernet1/0/4
Switch(config-if)#
service-policy input policy1
This example configures two class policies included in the egress policy map called
policy1
. Class1
specifies a policy for 802.1Q tunneling traffic that matches packets based on the outer VLAN ID (VLAN
2) and the inner VLAN IDs (3 to 8).
Switch(config)#
class-map match-all class1
Switch(config-cmap)#
match vlan 2
Switch(config-cmap)#
match vlan inner 3 - 8
Switch(config-cmap)#
exit
Switch(config)#
policy-map policy1
Switch(config-pmap)#
class class1
Switch(config-pmap-c)#
bandwidth 2000
Switch(config-pmap-c)#
queue-limit 40
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
exit
Switch(config)#
interface gigabitethernet1/1/1
Switch(config-if)#
service-policy output policy1
For class1, a minimum of 2000 kbps of bandwidth is expected to be delivered to this class in the event
of congestion. The queue reserved for this class can contain 40 packets before tail drop occurs.
This example shows how to shape the default class. This configuration associates a class-level policy
map with a VLAN-level policy map and then associates the VLAN-level policy map with a
physical-level policy map.
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