VLAN-ID Classifiers

Creating a policy based on the VLAN-ID classifier

  1. Determine the VLAN-ID classifier to which you want to assign a DSCP policy.

  2. Determine the DSCP policy for packets carrying the selected VLAN-ID.

    1. Determine the DSCP you want to assign to the selected packets. (This codepoint will be used to overwrite the DSCP carried in packets received from upstream devices.)

    2. Determine the 802.1p priority you want to assign to the DSCP.

  3. If necessary, use the qos dscp-map codepoint priority 0 - 7 command to configure the DSCP policy (codepoint and associated 802.1p priority) that you want to use to mark matching packets.

    Prerequisite: A DSCP codepoint must have a preconfigured 802.1p priority (0 - 7) before you can use the codepoint to mark matching packets. If a codepoint you want to use shows No-override in the Priority column of the DSCP Policy table (show qos dscp-map command), you must first configure a priority for the codepoint before proceeding (qos dscp-map priority command).

  4. Configure the switch to assign the DSCP policy to packets with the specified VLAN-ID.

    Syntax:

    qos dscp-map codepoint priority 0 - 7

    This command is optional if a priority has already been assigned to the codepoint. The command creates a DSCP policy by assigning an 802.1p priority to a specific DSCP.

    When the switch applies this priority to a packet, the 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. For IP packets, the DSCP codepoint in the packet header is replaced by the codepoint specified in this command.

    Default: For most codepoints, No-override.

Syntax:

vlan vid qos dscp codepoint

Assigns a DSCP policy to IP packets carrying the specified VLAN ID, and overwrites the DSCP in these packets with the assigned codepoint value.

  • A binary value for the six-bit codepoint from 000000 to 111111.

  • A decimal value from 0 (low priority) to 63 (high priority) that corresponds to a binary DSCP bit set

  • An ASCII standard name for a binary DSCP bit set.

    Enter ? to display the list of valid codepoint entries.

    The DSCP policy includes an 802.1p priority and 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.

    Default: No-override

Syntax:

no vlan vid qos

Removes a global QoS classifier for the specified VLAN.

Syntax:

show qos device-priority

Displays a listing of all QoS VLAN-ID classifiers currently in the running-config file.

Assigning DSCP policies to packets

Assigning DSCP policies (codepoint and associated 802.1p priority) to packets with the specified VLAN IDs:

VLAN-ID DSCP Priority
40 000111 7
30 000101 5
20 000010 1
1 000010 1
  1. Determine if the DSCP codepoints that you want to use to mark matching packets already have an 802.1p priority assigned, which could indicate use by existing applications (show qos dscp-map command). This is not a problem as long as the configured priorities are acceptable for all applications using the same DSCP.

    A DSCP codepoint must also have a priority configured before you can use it to mark matching packets.

    Viewing the current DSCP-priority mapping in the DSCP policy table

    Viewing the current DSCP-priority mapping in the DSCP policy table
  2. Configure the priorities for the DSCPs.

    Assign priorities to the selected DSCPs

    Assign priorities to the selected DSCPs
  3. Assign the DSCP policies to the selected VLAN IDs and display the result.

    HP Switch(config)#: vlan 1 qos dscp 000010
    HP Switch(config)#: vlan 20 qos dscp 000010
    HP Switch(config)#: vlan 30 qos dscp 000101
    HP Switch(config)#: vlan 40 qos dscp 000111
    
    HP Switch(config)#: show qos vlan-priority
    
      VLAN priorities
    
      VLAN ID Apply rule  | DSCP   Priority
      ------- ----------- + ------ -----------
      1       DSCP        | 000010 1
      20      DSCP        | 000010 1
      30      DSCP        | 000101 5
      40      DSCP        | 000111 7
    

The switch will now apply the DSCP policies to packets received on the switch with the specified VLAN-IDs. This means the switch will:

  • Overwrite the original DSCPs in the selected packets with the new DSCPs specified in the above policies.

  • Assign the 802.1p priorities in the above policies to the appropriate packets.

Assigning a priority for a global VLAN-ID classifier

This global QoS packet-marking option assigns a priority to all outbound packets having the specified VLAN-ID (VID). You can configure this option by either specifying the VLAN-ID 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

no vlan vid qos

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

show qos vlan-priority

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

Viewing the VLANs available for QoS prioritization

802.1p priorities are assigned to packets received in VLANs 1, 20, 30, and 40:

Enter the following commands to mark VLAN packets that match the specified VLAN IDs with an 802.1p priority:

HP Switch(config)#: vlan 1 qos priority 2
HP Switch(config)#: vlan 20 qos priority 5
HP Switch(config)#: vlan 30 qos priority 5
HP Switch(config)#: vlan 40 qos priority 7
HP Switch(config)#: show qos vlan

  VLAN priorities

  VLAN ID Apply rule  | DSCP   Priority
  ------- ------------+ ------ -------------
  1       Priority    |        2
  20      Priority    |        5
  30      Priority    |        5
  40      Priority    |        7

Returning a QoS-prioritized VLAN to "No-override" status

If later it is necessary to remove VLAN 20 from QoS prioritization, enter the following command: