Assigning a priority based on VLAN-ID

This option assigns a priority to all outbound packets having the specified VLAN-ID (VID). You can configure this option by either specifying the VID ahead of the qos command or moving to the VLAN context for the VLAN you want to configure for priority.

Syntax:


vlan <vid> qos priority <0-7>

Configures an 802.1p priority for outbound packets belonging to the specified VLAN. This priority determines the packet’s queue in the outbound port to which it is sent. If the packet leaves the switch on a tagged port, it carries the 802.1p priority with it to the next downstream device. You can configure one QoS classifier for each VLAN-ID.

(Default: No-override)

Syntax:


no vlan <vid> qos

Removes the specified VLAN-ID as a QoS classifier and resets the priority for that VLAN to No-override.

Syntax:


show qos vlan-priority

Displays a listing of the QoS VLAN-ID classifiers currently in the running-config file, with their priority data.

Procedure
  1. For example, suppose that you have the following VLANs configured on the switch and want to prioritize them as shown:
    switch(config)# show vlan
     Status and Counters - VLAN Information
    
      Maximum VLANs to support : 8
      Primary VLAN : DEFAULT_VLAN
    
      802.1Q VLAN ID Name         Status
      -------------- ----------   ------------
      1              DEFAULT_VLAN static
      22             VLAN_22      static
  2. You would then execute the following commands to prioritize the VLANs by VID:
    switch(config)# vlan 1 qos dscp 9
    switch(config)# vlan 22 qos dscp 8
    
    switch(config)# show qos vlan-priority
    
      VLAN priorities
      
      VLAN ID Apply rule  | DSCP   Priority
      ------- ----------- + ------ -----------
      1       DSCP        | 001001 7
      22      DSCP        | 001000 6
  3. If you then decided to remove VLAN_22 from QoS prioritization:

    In this instance, No-override indicates that VLAN 22 is not prioritized by QoS.

    switch(config)# no vlan 22 qos
    switch(config)# show qos vlan
    
      VLAN priorities
      
      VLAN ID Apply rule  | DSCP   Priority
      ------- ----------- + ------ -----------
      1       DSCP        | 001001 7
      22      No-override |        No-override