Content

| 8.2 |  | Quality of Service Mechanisms |
| 8.2.9 |  | Applying the policy to an interface – the service-policy |

The service policy command is used to attach the traffic policy , as specified with the policy-map command, to an interface. Because the elements of the traffic policy can be applied to packets entering and leaving the interface, it is necessary to specify whether the traffic policy characteristics should be applied to incoming or outgoing packets. For instance, the service-policy output policy1 command would attach all the characteristics of the traffic policy named policy1 to the specified interface. All packets leaving the specified interface are evaluated according to the criteria specified in the traffic policy named policy1.

> Switch(config)#interface fastethernet 0/1
> Switch(config-if)#service-policy output policy1
> Switch(config-if)#exit