service-policy (interface)
To attach a policy map to an input interface or output interface to be used as the service policy for that interface,
use the
service-policy
command in the appropriate configuration mode. To remove a service policy from
an input or output interface, use the
no
form of the command.
service-policy
{
input|output
}
policy-map
no service-policy
{
input|output
}
policy-map
Syntax Description
Attaches the specified policy map to the input interface.
input
Attaches the specified policy map to the output interface.
output
Name of a service policy map (created using the
policy-map
command) to be attached.
policy-map
Command Default
No service policy is specified.
Command Modes
Interface configuration.
Command History
Modification
Release
This command was introduced.
Release 6.0
Usage Guidelines
You can attach a single policy map to one or more interfaces to specify the service policy for those interfaces.
The class policies composing the policy map are then applied to packets that satisfy the class map match
criteria for the class. To apply a new policy to an interface, you must remove the previous policy. A new
policy cannot replace an existing policy.
Task ID
Operations
Task
ID
read,
write
qos
Examples
This example shows policy map policy2 applied to HundredGigabitEthernet 0/0/0/1.
RP/0/RP0/CPU0:router(config)#
class-map class2
RP/0/RP0/CPU0:router(config)#
match precedence ipv4 2
RP/0/RP0/CPU0:router(config-cmap)#
exit
RP/0/RP0/CPU0:router(config)#
policy-map policy2
RP/0/RP0/CPU0:router(config-pmap)#
class-map class2
RP/0/RP0/CPU0:router(config-pmap-c)#
set precedence 3
RP/0/RP0/CPU0:router(config-pmap)#
exit
RP/0/RP0/CPU0:router(config)#
HundredGigabitEthernet 0/0/0/1
RP/0/RP0/CPU0:router(config-if)#
service-policy input policy2
This example shows policy map policy 1 applied to Bundle-Ether interface.
Modular QoS Command Reference for Cisco NCS 5500 Series and Cisco NCS 540 Series Routers
73
Congestion Avoidance Commands
service-policy (interface)