Specifications
2-488
Catalyst 4500 Series Switch Cisco IOS Command Reference—Release IOS XE 3.3.0XO(15.1(1)XO)
OL_28738 -01
Chapter 2 Cisco IOS Commands for the Catalyst 4500 Series Switches
service-policy (inter face configu ration)
service-policy (int erface configuration)
To attach a policy map to an interface or to apply different QoS policies on VLANs that an interface
belongs to, use the service-policy command. To remove a policy map from an interface, use the no form
of this command.
service-policy {input | output} policy-map name
no service-policy {input | output} policy-map name
Syntax Description
Defaults A policy map is not attached to an interface or a VLAN.
Command Modes Interface configuration mode
Usage Guidelines L ayer 2 interfaces can be part of multiple VLANs (for example, a typical trunk port). In conjunction with
the vlan-range command, you can use the service-policy command to specify different QoS policies on
different VLANs .
Note This capability is restricted to Layer 2 interfaces.
You can apply a service policy under an interface as well as a VLAN range at the same time. However,
this is allowed only when the interface policy has only queuing actions whereas a VLAN has only
non-queueing act ions (QoS marki ng and/or policing ) actions .
To attach a service policy to a VLAN, the VLAN configuration mode has to be used.
Examples This example shows how to attach a policy map to Fast Ethernet interface 5/20:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface fastethernet 5/20
Switch(config-if)# service-policy input pmap1
Switch(config-if)# end
This example shows how to apply policy m ap p1 for traffic in VLANs 20 and 400, and policy map p2
for traffic in V LANs 300 thr ough 301 :
Switch# configure terminal
Switch(config)# interface gigabitEthernet 6/1
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport mode trunk
Switch(config-if)# vlan-range 20,400
Switch(config-if-vlan-range)# service-policy input p1
input Specifies the input pol icy maps.
output Specifies the output po licy ma ps.
policy-map name Name of a previously configured policy map.