Users Guide

Layer 2 Switching Commands 766
service-policy
Use the service-policy command in either Global Configuration mode (for all
system interfaces) or Interface Configuration mode (for a specific interface)
to attach a policy to an interface. To return to the system default, use the no
form of this command.
NOTE: This command is not available on the N1500 Series switches.
Syntax
service-policy {in|out} policymapname
no service-policy {in|out} policymapname
policymapname—Specifies the DiffServ policy name as a unique case-
sensitive alphanumeric string. (Range: 1–31 alphanumeric characters.)
in—Apply the policy on ingress.
out—Apply the policy on egress.
Default Configuration
No policies are applied by default.
Command Mode
Global Configuration mode (for all system interfaces)
Interface Configuration (Ethernet, Port-channel) mode (for a specific
interface)
User Guidelines
This command applies a DiffServ policy to an interface and enables DiffServ
on the interface. No separate interface administrative mode command for
DiffServ is available. Use the policy-map command to configure the DiffServ
policy. The service-policy direction must match the direction given for the
policy map. DiffServ is enabled globally by default.
Ensure that no attributes within the policy definition exceed the capabilities
of the interface. When a policy is attached to an interface successfully, any
attempt to change the policy definition, such that it would result in a
violation of the interface capabilities, causes the policy change attempt to