Vlan Based QoS
Configuring VLAN-Based QoS on Layer 2 Interfaces
By default, QoS uses policy maps attached to physical interfaces. For Layer 2 interfaces, you can
configure QoS to use policy maps attached to a VLAN. For more information, see the “Attaching a Policy
Map to an Interface” section on page 37-36.
To configure VLAN-based QoS on a Layer 2 interface, perform this task:
Note If no input QoS policy is attached to a Layer 2 interface, then the input QoS policy attached to the VLAN
(on which the packet is received), if any, is used even if the port is not configured as VLAN-based. If
you do not want this default, attach a placeholder input QoS policy to the Layer 2 interface. Similarly,
if no output QoS policy is attached to a Layer 2 interface, then the output QoS policy attached to the
VLAN (on which the packet is transmitted), if any, is used even if the port is not configured as
VLAN-based. If you do not want this default, attach a placeholder output QoS policy to the Layer 2
This example shows how to configure VLAN-based QoS on Fast Ethernet interface 5/42:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface fastethernet 5/42
Switch(config-if)# qos vlan-based
This example shows how to verify the configuration:
Switch# show qos | begin QoS is vlan-based
QoS is vlan-based on the following interfaces:
Note When a Layer 2 interface is configured with VLAN-based QoS, and if a packet is received on the port
for a VLAN on which there is no QoS policy, then the QoS policy attached to the port, if any is used.
This applies for both input and output QoS policies.