Differentiated Services Codepoint (DSCP) mapping

The DSCP Policy Table associates an 802.1p priority with a DSCP codepoint in an IPv4/IPv6 packet. Using DSCP codepoints in your network allows you to set a LAN policy that operates independently of 802.1Q VLAN-tagging.

In the default state, most of the 64 codepoints do not assign an 802.1p priority, as indicated by No-override in The default DSCP Policy Table. However, some codepoints, such as Assured Forwarding and Expedited Forwarding, have a default 802.1p priority setting.

Use the following commands to display the DSCP Policy table, configure the codepoint-priority assignments, and assign optional names to the codepoints.

Syntax:

show qos dscp-map

Displays the DSCP Policy Table.

qos dscp-map <codepoint> priority <0-7> [name <ascii-string>]

Configures an 802.1p priority for the specified codepoint and an optional (DSCP policy) name.

no qos dscp-map <codepoint>

Removes the currently configured 802.1p priority that is associated with the specified <codepoint> and displays the No-override setting. The codepoint policy name, if configured, is also removed.

no qos dscp-map <codepoint> name

Deletes only the policy name, if configured, for the specified <codepoint>.

The default DSCP Policy Table

DSCP policy 802.1p priority DSCP policy 802.1p priority DSCP policy 802.1p priority
000000 No-override 010110 3* 101011 No-override
000001 No-override 010111 No-override 101100 No-override
000010 No-override 011000 No-override 101101 No-override
000011 No-override 011001 No-override 101110 7**
000100 No-override 011010 4* 101111 No-override
000101 No-override 011011 No-override 110000 No-override
000110 No-override 011100 4* 110001 No-override
000111 No-override 011101 No-override 110010 No-override
001000 No-override 011110 5* 110011 No-override
001001 No-override 011111 No-override 110100 No-override
001010 1* 100000 No-override 110101 No-override
001011 No-override 100001 No-override 110110 No-override
001100 1* 100010 6* 110111 No-override
001101 No-override 100011 No-override 111000 No-override
001110 2* 100100 6* 111001 No-override
001111 No-override 100101 No-override 111010 No-override
010000 No-override 100110 7* 111011 No-override
010001 No-override 100111 No-override 111100 No-override
010010 0* 101000 No-override 111101 No-override
010011 No-override 101001 No-override 111110 No-override
010100 0* 101010 No-override 111111 No-override
010101 No-override  

*Assured Forwarding codepoints; configured by default on the switches covered in this guide.

**Expedited Forwarding codepoint configured by default.

Default priority settings for selected codepoints

In a few cases, such as 001010 and 001100, a default DSCP policy (implied by the DSCP standards for Assured-Forwarding and Expedited-Forwarding) is used. You can change the priorities for the default policies by using the qos dscp-map <codepoint> priority <0-7> command.

The currently configured DSCP policies (codepoint and associated 802.1p priority) are not enabled until you configure a global or classifier-based QoS policy to mark matching packets or configure a global IP-Diffserv classifier.

Quickly listing non-default codepoint settings

The default DSCP Policy Table lists the switch’s default codepoint/priority settings. If you change the priority of any codepoint setting to a non-default value and then execute write memory, the switch will list the non-default setting in the show config display. For example, in the default configuration, the following codepoint settings are true:

Codepoint Default priority
001100 1
001101 No-override
001110 2

If you change all three settings to a priority of 3, and then execute write memory, the switch will reflect these changes in the show config listing:

Example of show config listing with non-default priority settings in the DSCP table

Example of show config listing with non-default priority settings in the DSCP table

Effect of No-override: If you configure a global IP-Diffserv classifier and No-override is displayed for the 802.1p priority associated with a codepoint, DSCP marking cannot be performed on matching outbound packets. However, QoS does not affect the packet-queuing 802.1p priority or VLAN tagging carried in the packet.

In this case, the packets are handled as follows (as long as no other QoS feature creates priority assignments for them):

802.1Q status Outbound 802.1p priority
Received and Forwarded on a tagged port member of a VLAN. Unchanged
Received on an Untagged port member of a VLAN; Forwarded on a tagged port member of a VLAN. 0 (zero)—”normal”
Forwarded on an Untagged port member of a VLAN. None

Note on changing a priority setting

If you try to modify the priority associated with a DSCP codepoint in a DSCP policy using the qos dscp-map priority command, and if the DSCP policy is currently used by one or more global QoS or classifier-based QoS policies, the following error message is displayed:

Cannot modify DSCP Policy < 

codepoint > - in use by other
qos rules.

In this case, you can enter the following QoS show commands to identify in which global and classifier-based QoS configurations the DSCP policy is currently used:

show qos tcp-udp-port-priority

show qos device-priority

show qos type-of-service

show qos protocol-priority

show qos vlan-priority

show qos port-priority

After determining the QoS configurations in which the DSCP-priority mapping is used, you can either delete a QoS configuration and reset the DSCP-priority mapping to No-override, or change either the 802.1p priority or the codepoint used in the QoS configuration.

Example:

If codepoint 000001 is currently mapped to priority 6, and several global QoS policies use this codepoint to assign a priority to their respective types of matching traffic, you can change the priority associated with the codepoint as follows:

  1. Identify the global and classifier-based QoS policies that use the codepoint.

  2. Do one of the following:

    1. Reconfigure each QoS policy by re-entering a different DSCP codepoint or a different 802.1p priority associated with the codepoint.

    2. Enter the no qos <classifier> or no policy <qos-policy> command to remove the current DSCP policy with codepoint 000001 and reset the priority to No-override.

  3. Use the qos dscp-map 000001 priority <0-7> command to remap DSCP 000001 to the desired priority.

  4. Do one of the following:

    1. Reconfigure codepoint 000001 in the QoS policies in which you want to use the new DSCP-priority mapping to mark matching packets.

    2. Leave a QoS policy in which you use DSCP 000001 to mark matching packets with the associated No-override priority mapping.

Error messages for DSCP policy changes

See the error messages below to troubleshoot an error condition that results from reconfiguring a DSCP policy:

Error message Description
DSCP Policy < decimal-codepoint > not configured You have tried to configure a codepoint in a global or classifier-based QoS policy for which there is no associated priority (No-override). Use the qos dscp-map command to configure a priority for the codepoint, then re-enter the codepoint in the QoS configuration.
Cannot modify DSCP Policy < codepoint > - in use by other qos rules. You have tried to configure a codepoint in a global or classifier-based QoS policy that is already in use by other QoS policies. Before remapping the codepoint to a new priority, you must first reconfigure the other QoS policies so that they do not use the current codepoint-priority mapping. You can have multiple QoS policies that use the same codepoint to mark packets as long as it is acceptable for all such policies to use the same 802.1p priority.

Changing the priority setting on a policy when one or more classifiers are currently using the policy (example)

In this example, the codepoint 000001 is in use by one or more global QoS policies. If you try to modify the priority currently associated with the codepoint, an error message similar to the following is displayed:

Error message for changing the priority on a DSCP policy

HP Switch(config)# qos dscp-map 1 priority 2
Cannot modify DSCP Policy 1 - in use by other qos rules.

In this case, you would use steps similar to the following to change the priority.

  1. Identify the global and classifier-based QoS policies that use the codepoint whose DSCP-priority mapping you want to change.

    Identifying the QoS policies that use a codepoint

    HP Switch(config)# 
    
    show qos device-priority
     
     Device priorities
     
     Device Address Apply Rule | DSCP Priority
     -------------- ---------- - ---- -----------
     10.26.50.104   DSCP       | 
    
    1    6
    
    HP Switch(config)# 
    
    show qos port-priority
    
     Port priorities
    
     Port Apply rule  | DSCP  Priority     Radius Override
     ---- ----------    ----- ----------   ---------------
     1    No-override |       No-override  No-override
     2    No-override |       No-override  No-override
     3    DSCP        | 
    
    1     6            No-override
     4    No-override |       No-override  No-override
     .
     .
     .
    HP Switch(config)# 
    
    show qos tcp-udp-port-priority
    
     TCP/UDP port based priorities
    
              | IP Packet  Application
     Protocol | Type       Port       Apply rule | DSCP   Priority
     -------- + ---------- ---------- ---------- + ------ --------
     UDP      | IPv4       1260       DSCP       | 1      6
    
  2. Change each QoS configuration by assigning a different DSCP policy or a different 802.1p priority, or by removing the currently configured DSCP policy and restore the default No-override setting; for example:

    1. Delete the current DSCP policy used to mark matching packets for a global IP-device policy (no qos device-priority command) and reset the default priority mapping toNo-override.

    2. Create a new DSCP policy to use when you reconfigure QoS policies to use the new codepoint-priority mapping.

    3. Configure a global QoS source-port policy to mark matching packets with the new DSCP policy.

    4. Assign the global QoS policy that matches udp-port 1260 packets to a different 802.1p priority.

      a) HP Switch(config)# no qos device-priority 10.26.50.104
      
      b) HP Switch(config)# qos dscp-map 000100 priority 6
      
      c) HP Switch(config)# int 3 qos dscp 000100
      
      d) HP Switch(config)# qos udp-port 1260 priority 2
      
  3. Reconfigure the desired priority for the 000001 codepoint.

    HP Switch(config)# qos dscp-map 000001 priority 4
    
  4. Reconfigure QoS policies with the original codepoint (000001) to mark packets with the new DSCP-priority mapping, or leave QoS policies as currently configured from Step 2.