To apply feature-specific service policies to inbound port or VLAN interfaces, use the interface service-policy in
or vlan service-policy in
command.
The following service-policy restrictions apply to all software features:
-
A service policy is supported only on inbound traffic.
-
Only one feature-specific policy (for example, QoS or mirroring) is supported on a port or VLAN interface.
-
PBR is only supported within a
vlan [
command or within a VLAN context. PBR is not applicable a port‐specific interface.vlan-id
] service-policy [policy-name
] in
NOTE: Policy Based Routing (PBR) is available on the 3800 Series switch and the 5400/8200 series switch which all have v2 or higher modules. Any v1 modules will prevent PBR from functioning. PBR is not available on the 3500, 3500yl, 6200yl, nor 6600 Series switches.
-
If you apply a policy to a port or VLAN interface on which a policy of the same type (for example, QoS) is already configured, an error message is displayed. The new policy does not overwrite the existing one.
Before you can apply a new policy, you must first remove the existing policy with the
no interface service-policy in
orno vlan service-policy in
command.
Because only one policy of each type is supported on a port or VLAN interface, ensure that the policy you want to apply contains all the required classes and actions for your configuration.
To apply a service policy on a port or VLAN interface, enter one of the following commands from the global configuration context.
Syntax:
Configures the specified ports with a policy that is applied to inbound traffic on each interface. Separate individual port numbers in a series with a comma; for example,
a1, b4, d3
. Enter a range of ports by using a dash; for example,a1-a5
.The policy name you enter must be the same as the policy name you configured with the
policy
command.
Syntax:
Configures a policy on the specified VLAN that is applied to inbound traffic on the VLAN interface. Valid VLAN ID numbers range from
1
to4094
.The policy name you enter must be the same as the policy name you configured with the
policy
command.
Applying a QoS policy to a port range and a VLAN interface
The following example shows how to apply a QoS policy to a port range and a VLAN interface:
HP Switch(config)#: interface a4 service-policy RateLimitPrioritizeSuspectTraffic in HP Switch(config)#: vlan 10 service-policy RateLimitPrioritizeSuspectTraffic in