2-359
Catalyst 3750 Metro Switch Command Reference
OL-9645-10
Chapter 2 Catalyst 3750 Metro Switch Cisco IOS Commands
policy-map
Only one policy map per port is supported. With standard QoS, you can attach one ingress
nonhierarchical single-level service policy per standard physical port, per SVI, or per enhanced-services
(ES) port. You can also apply one ingress hierarchical dual-level hierarchical service policy per SVI.
With hierarchical QoS on ES ports,
y
ou can attach one ingress hierarchical service policy and one egress
hierarchical service policy per ES port. If an ingress hierarchical service policy is attached to a ES port,
the service policy must have at least two levels.
You can apply the same policy map to multiple ports. When you attempt to attach a policy map to a port,
the attempt is denied if the available bandwidth on the port cannot accommodate the total bandwidth
requested by class policies comprising the policy map.
Whenever you modify a class policy in an attached policy map, class-based weighted fair queueing
(CBWFQ) is notified, and the new classes are installed as part of the policy map in the CBWFQ system.
In software releases earlier than Cisco IOS Release 12.2(25)EY, you can apply a policy map and
configure policing only on physical ports. You can configure the trust state, set a new DSCP or IP
precedence value in the packet, or define an individual or aggregate policer.
In Cisco IOS Release 12.2(25)EY or later, you can apply a nonhierarchical single-level policy map to
ingress physical ports, SVIs, or ES ports. A single-level policy map is the same as a standard port-based
policy map in software releases earlier than Cisco IOS Release 12.2(25)EY. However, a hierarchical
dual-level policy map can be applied only to SVIs, and a hierarchical policy map can be applied only to
ES ports.
A dual-level policy map has two levels. The first level, the VLAN level, specifies the actions to be taken
against a traffic flow on an SVI. The second level, the interface level, specifies the actions to be taken
against the traffic on the physical ports that belong to the SVI and are specified in the interface-level
policy map. In a primary VLAN-level policy map, you can only configure the trust state or set a new
DSCP or IP precedence value in the packet. In a secondary interface-level policy map, you can only
configure individual policers on physical ports that belong to the SVI.
After the dual-level policy map is attached to an SVI, an interface-level policy map cannot be modified
or removed from the dual-level policy map. A new interface-level policy map also cannot be added to
the dual-level policy map. You also cannot add or remove a class map specified in the dual-level policy
map. If you want these changes to occur, the dual-level policy map must first be removed from the SVI.
For more information about nonhierarchical single- level policy maps and hierarchical dual-level policy
maps, see the “Ingress Policing and Marking” section in the “Configuring QoS” chapter of the software
configuration guide for this release.
Examples
This example shows how to create a policy map called
policy1
. When attached to the ingress direction,
it 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 at 20 KB. Traffic exceeding the profile is marked down to a DSCP
value obtained from the policed-DSCP map and then sent.
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
This example shows how to configure multiple classes in a policy map called
policymap2
:
Switch(config)#
policy-map policymap2
Switch(config-pmap)#
class class1
Switch(config-pmap-c)#
set ip dscp 10
Switch(config-pmap-c)#
police 100000 20000 exceed-action policed-dscp-transmit
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
class class2