Globally-configured QoS

Global QoS configuration procedure

To globally configure a QoS policy on the switch, follow these steps:

  1. Determine the global QoS policy to implement on the switch by analyzing the types of traffic flowing through the network and identifying one or more traffic types to prioritize. The order of precedence in which global QoS classifiers are applied, from a (highest) to h (lowest), is as follows:

    1. TCP/UDP applications.

    2. Device priority—IP source or destination address. Destination has precedence over source.

    3. IP precedence bit set (leftmost three bits in the ToS/Traffic Class field of IP packets).

    4. IP differentiated services bit set (leftmost six bits in the ToS/Traffic Class field of IP packets).

    5. Layer-3 protocol.

    6. VLAN ID. At least one tagged VLAN is required on the network.

    7. Source port.

    8. Incoming 802.1p priority (requires at least one tagged VLAN on the network).

      Default: In a tagged VLAN environment, the incoming 802.1p priority is used as the default QoS classifier if no global QoS classifier with a higher precedence matches.

  2. Select the global QoS classifier to use. The following table shows the types of QoS marking (802.1p priority or DSCP codepoint) supported by each global QoS classifier.

    QoS marking supported by global QoS classifiers

    Global QoS classifiers Type of QoS marking used to prioritize outbound traffic
    802.1p Priority[1] only DSCP policy [2]– DSCP codepoint with 802.1p priority
    UDP/TCP Supported Supported
    IP Device Supported Supported
    IP Precedence Supported[3] Not Supported
    IP DiffServ Supported Supported
    L3 Protocol Supported Not Supported
    VLAN ID Supported Supported
    Source Port Supported Supported

    [1] When you configure only the 802.1p priority to mark packets that match a global QoS classifier, the selected traffic is prioritized and sent to the corresponding outbound port queue on the switch. VLAN-tagged ports are necessary to carry the 802.1p priority in a packet header to downstream devices.

    [2] When you configure a DSCP policy to mark packets that match a global QoS classifier, the selected traffic is also prioritized according to the associated 802.1p priority and sent to the corresponding outbound port queue on the switch. VLAN-tagged ports carry the 802.1p priority in a packet header to downstream devices. In addition, you can configure downstream devices to read the DSCP value in IP packets and implement the service policy implied by the codepoint.

    [3] When using a global QoS IP Precedence classifier, the 802.1p priority is automatically assigned to matching packets based on the IP precedence bit set in the packet header.

  3. For 802.1p priority settings to be included in outbound packets, ensure that tagged VLANs are configured on the appropriate downstream links.

  4. Determine the global QoS policy required for each QoS-capable device in the network and configure the necessary settings.

    For downstream devices to recognize and use DSCP codepoints in IP packets sent from the switch, enable ToS (Type-of-Service) Differentiated Service mode on the devices and configure the appropriate DSCP policies. Note that certain DSCP policies have a default 802.1p priority automatically assigned.

Viewing a global QoS configuration

To display the existing switch-wide configurations for a global QoS classifier, use one of the following show qos commands.

Syntax:

show qos <global-classifier>

tcp-udp-port-priority: Displays the current TCP/UDP port priority configuration.

type-of-service: Displays the current type-of-service priority configuration. The display output differs according to the ToS option used:

  • IP Precedence

  • Diffserve

protocol-priority: Displays the current protocol priority configuration.

vlan-priority: Displays the current VLAN priority configuration.

port-priority: Displays the current source-port priority configuration.

No override

By default, the show qos output for following global QoS classifiers may display No-override for QoS marking: IP Precedence, IP Diffserv, Layer-3 Protocol, VLAN ID, and Source-port (see Output for the show qos command). No-override means that the global QoS policy used to mark matching packets does not assign an 802.1p value.

  • IP packets received through a VLAN-tagged port are managed using the 802.1p priority they carry in the 802.1Q field in their headers.

  • VLAN-tagged packets received through an untagged port are handled by the switch with “normal” priority.

Output for the show qos command shows the global QoS configurations on the switch that are configured with the VLAN ID classifier. Note that non-default 802.1p priorities have been configured for VLAN IDs 22 and 33; packets received on VLAN 1 are managed with the default settings, as described in the two bulleted items above.

Output for the show qos command

HP Switch(config)# show qos vlan-priority
  VLAN priorities
  VLAN ID Apply rule  | DSCP   Priority
  ------- ----------- + ------ -----------
  1       No-override |        No-override
  22      Priority    |        0
  33      DSCP        | 000010 6

Global QoS restrictions

Restrictions for global QoS support

Type of packets supported Global QoS classifiers DSCP overwrite (re-marking)
TCP/UDP IP address IP ToS Layer 3 Protocol VLAN ID Source Port Incoming 802.1p
IP packets (IPv4) only Yes Yes Yes No No No No Yes
Layer-2 SAP encapsulation Yes Yes Yes Yes Yes Yes Yes No
  • All switches: For explicit QoS support of IP subnets, HP recommends forcing IP subnets onto separate VLANs and then configuring VLAN-based classifiers for those VLANs.

  • For devices that do not support 802.1Q VLAN-tagged ports: For communication between these devices and the switch, connect the device to a switch port configured as Untagged for the VLAN in which you want the device's traffic to move.

  • Port tagging rules: For a port on the switch to be a member of a VLAN, the port must be configured as either Tagged or Untagged for that VLAN. A port can be an untagged member of only one VLAN of a given protocol type. Otherwise, the switch cannot determine which VLAN should receive untagged traffic.

  • Maximum Global QoS remarking entries: The switches covered in this guide accept the maximum number of configured outbound 802.1p priority and DSCP entries.

    • Each IP Device (IP address) QoS configuration uses two entries.

    • Each TCP/UDP Port QoS configuration uses two entries.

    • All other global QoS classifier configurations use one entry each.

    If the global QoS configurations on a switch exceed the maximum number of entries, the following error message is displayed:

    Unable to add this QoS rule. Maximum number (
    entry-#)
    already reached.
    
  • Not supported: Use of an inbound 802.1p packet priority as a classifier for remapping a packet's outbound priority to different 802.1p priority. For example, where inbound packets carry an 802.1p priority of 1, QoS cannot be configured use this priority as a classifier for changing the outbound priority to 0.

  • Monitoring shared resources: The QoS feature shares internal switch resources with several other features. The switch provides ample resources for all features. However, if the internal resources become fully subscribed, additional QoS provisions cannot be configured until the necessary resources are released from other uses. For information on determining the current resource availability and usage, see the appendix titled “Monitoring Resources” in the Management and Configuration Guide for your switch.

Global TCP/UDP classifier

Global QoS classifier precedence: 1

When you use TCP or UDP and a layer 4 Application port number as a global QoS classifier, traffic carrying the specified TCP/UDP port numbers is marked with a specified priority level, without regard for any other QoS classifiers in the switch. You can configure up to 50 TCP/UDP application port numbers as QoS classifiers.


[NOTE: ]

NOTE: Global TCP/UDP classifiers are supported on IPv4 only.


Options for assigning priority

The packet-marking options for global TCP/UDP port-number classifiers include:

  • 802.1p priority

  • DSCP policy (Assigning a new DSCP and an associated 802.1p priority; inbound packets can be IPv4))

For a given TCP or UDP port number, you can use only one of the above options at a time. However, for different port numbers, you can use different options.

TCP/UDP port number ranges

There are three ranges:

  • Well-Known Ports: 0 – 1023

  • Registered Ports: 1024 – 49151

  • Dynamic and Private Ports: 49152 – 65535

For more information, including a listing of UDP/TCP port numbers, go to the Internet Assigned Numbers Authority (IANA) website at:

www.iana.org

Then click:

Protocol Number Assignment Services

P under Directory of General Assigned Numbers)

Port Numbers

Assigning an 802.1p priority for a global TCP/UDP classifier

To mark matching TCP or UDP packets with an 802.1p priority, enter the following command:

Syntax:

qos < udp-port | tcp-port > [ ipv4 | ipv6 | ip-all ] < port-number | range start end > priority < 0-7>

Marks an 802.1p priority in outbound packets with the specified TCP or UDP application-port number, where:

ipv4: Marks only IPv4 packets (default).

ipv6: Marks only IPv6 packets.

ip-all: Marks all IP traffic (both IPv4 and IPv6 packets).

port-number: TCP/UDP port number from 1 to 65535.

range <start end>: Marks a range of TCP/UDP ports. If you specify a range, the minimum port number must precede the maximum port number in the range.

priority <0-7>: Marks the specified 802.1p priority in matching TCP or UDP packets.

The 802.1p priority determines the packet's queue in the outbound port on the switch. If the packet leaves the switch on a tagged VLAN port, it carries the 802.1p priority with it to the next downstream device.

Default: Disabled — No 802.1p priority is assigned.

The no form of the command deletes the specified UDP or TCP port number or range of port numbers as a QoS classifier.


[NOTE: ]

NOTE: If you have specified a range of port numbers, you must specify the entire range in the no command; you cannot remove part of a range.


Syntax:

show qos tcp-udp-port-priority

Displays a listing of all TCP and UDP QoS classifiers currently in the running-config file.

Operating notes on using TCP/UDP port ranges

  • Only 6 concurrent policies are possible when using unique ranges. The number of policies allowed is less if ACLs are also using port ranges.

  • You cannot have ranges that include any port numbers that have been configured as part of another QoS application port number policy.

  • An error message is generated if there are not enough hardware resources available when configuring a policy.

  • The entire range of configured port numbers must be specified when using the no form of the command, for example:

    HP Switch(config)#: qos udp-port range 1300 1399 dscp 001110
    
    HP Switch(config)#: no qos range 1300 1399
    

The following example displays the following configuration for TCP and UDP port prioritization:

Configuration for TCP and UDP port prioritization

TCP/UDP port 802.1p priority for TCP 802.1p priority for UDP
TCP Port 23 (Telnet) 7 7
UDP Port 23 (Telnet) 7 7
TCP Port 80 (World Wide Web HTTP) 2 2
UDP Port 80 (World Wide Web HTTP) 1 1

Configuring 802.1p priority assignments on TCP/UDP ports

Configuring 802.1p priority assignments on TCP/UDP ports

Assigning a DSCP policy for a global TCP/UDP classifier

This global QoS packet-marking option assigns a previously configured or default DSCP policy (codepoint and 802.1p priority) to TCP or UDP packets having the specified port number or range of port numbers. When assigning a DSCP policy, the switch performs the following actions:

  1. Selects an incoming IP packet if the TCP or UDP port number it carries matches the port number specified in the TCP or UDP classifier (as shown in Configuring 802.1p priority assignments on TCP/UDP ports, above).

  2. Overwrites (re-marks) the packet's DSCP with the new DSCP configured for matching packets.

  3. Assigns the 802.1p priority associated with the new DSCP (see Differentiated Services Codepoint (DSCP) mapping).

  4. Forwards the packet through the appropriate outbound port queue.

Creating a DSCP policy based on TCP/UDP port number classifiers

The following procedure creates a DSCP policy for IP packets carrying the selected TCP or UDP port-number classifier.

  1. Identify the TCP or UDP port-number classifier you want to use for assigning a DSCP policy.

  2. Determine the DSCP policy for packets carrying the selected TCP or UDP port number or range of port numbers.

    1. Determine the DSCP you want to assign to the selected packets. (This codepoint will be used to overwrite (re-mark) 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).

    Syntax:

    qos dscp-map <codepoint> priority <0-7>>

    (Optional) This command is required only if an 802.1p priority is not already assigned to the specified <codepoint> in the DSCP Policy table.

    Valid values for a DSCP codepoint are as follows:

    • 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 (hexadecimal) name for a binary DSCP bit set:

      af11 (001010) af42 (100100)
      af12 (001100) af43 (100110)
      af13 (001110) ef (101110)
      af21 (010010) cs1 (001000) = precedence 1
      af22 (010100) cs2 (010000) = precedence 2
      af23 (010110) cs3 (011000) = precedence 3
      af31 (011010) cs4 (100000) = precedence 4
      af32 (011100) cs5 (101000) = precedence 5
      af33 (011110) cs6 (110000) = precedence 6
      af41 (100010) cs7 (111000) = precedence 7
      default (000000)  

      Enter ? to display the list of valid codepoint entries.

      When the switch applies the specified DSCP policy 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 will be replaced by the codepoint specified in this command.

      (Default: No-override for most codepoints.)

  4. Configure the switch to assign the DSCP policy to packets with the specified TCP or UDP port number or range of port numbers.

    Syntax:

    [no] qos < udp-port | tcp-port > < port-number | range <start end >> < dscp < codepoint >

    Assigns a DSCP policy to outbound packets having the specified TCP or UDP application-port number or port range, and overwrites the DSCP in these packets with the assigned <codepoint> value, where:

    • port-number: specifies a TCP/UDP port-number from 1 to 65535.

    • range <start end>: specifies a range of TCP/UDP ports. If you specify a range, the minimum port number must precede the maximum port number in the range.

    • dscp <codepoint>: overwrites the DSCP codepoint in the IPv4 ToS byte or IPv6 Traffic Class byte of matching packets with the specified value.

      Valid values for the DSCP codepoint are as follows:

      • 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 value you enter must be currently associated with an 802.1p priority in the DSCP Policy table. The 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.

        The default DSCP codepoint is No-override. The DSCP codepoint is not overwritten in matching packets.

      The no form of the command deletes the specified UDP or TCP port number or range of port numbers as a QoS classifier. If you configured a range of port numbers as the QoS classifier, you must enter the entire range in the no command; you cannot remove part of a range.

    Syntax:

    show qos tcp-udp-port-priority

    Displays a listing of all TCP and UDP QoS classifiers currently in the running-config file.

Example:

This example shows how to assign the following DSCP policies to packets that match the specified TCP and UDP port applications:

Port Applications DSCP Policies
DSCP Priority
23-UDP 000111 7
80-TCP 000101 5
914-TCP 000010 1
1001-UDP 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).

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

    HP Switch(config)# show qos dscp-map
    
      DSCP -> 802.p priority mappings
    
      NOTE: ‘qos type-of-service diff-services’ must be configured
             before DSCP is honored on inbound trafic.
    
      DSCP CodePoint DSCP Value 802.1p tag   DSCP Policy name
      -------------- ---------- -----------  ----------------------
      000000         0          0            cs0
      000001         1          No-override
      000010         2          No-override
      000011         3          No-override
      000100         4          No-override
      000101         5          No-override
      000110         6          No-override
      000111         7          No-override
      001000         8          1            cs1
      001001         9          No-override
    
  2. Configure the DSCP policies for the codepoints you want to use.

    HP Switch(config)# qos dscp-map af11 priority 3
    HP Switch(config)# qos dscp-map 13 priority 3
    HP Switch(config)# qos dscp-map af13 priority 3
    HP Switch(config)# write memory
    
    HP Switch(config)# show config
    HP Switch configuration:
    
    ; JXXXX Configuration Editor; Created on release XX.15.XX
    
    hostname “Switch”
    time daylight-time-rule None
    qos dscp-map af11 priority 3
    qos dscp-map 13 priority 3
    qos dscp-map af13 priority 3
    ...
    
  3. Assign the DSCP policies to the selected TCP/UDP port applications and display the result.

    Configuring a DSCP policy for global TCP/UDP port classifiers

    (Note: DSCP 3 is the decimal equivalent of binary 000010.)

    HP Switch(config)# qos udp-port 23 dscp 000111
    HP Switch(config)# qos tcp-port 80 dscp 000101
    HP Switch(config)# qos tcp-port 914 dscp 000010
    HP Switch(config)# qos udp-port range 1001 2000 dscp 000010
    
      TCP/UDP port based priorities
    
               | IP Packet Application            |
      Protocol | Type      Port        Apply rule | DSCP   Priority
      -------- + --------- ----------- ---------- + ------ -----------
      UDP      | IPV4      23          DSCP       | 8      7
      TCP      | IPV4      80          DSCP       | 6      5
      TCP      | IPV4      914         DSCP       | 3      1
      UDP      | IPV4      1001-2000   DSCP       | 31
    
          12
    
    
    

    1

    DSCP codepoint

    2

    802.1p priority mapping

    The switch applies the DSCP policies in Configuring a DSCP policy for global TCP/UDP port classifiers to IP packets with the specified TCP/UDP port applications that are received in the switch. The switch manages the packets as follows:

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

    • Assigns the 802.1p priorities in the above policies to the selected packets.

Viewing resource usage for QoS policies

When configuring global QoS classifiers using TCP/UDP and a Layer 4 Application port number or port range, the switch automatically assigns two QoS resources for each policy—one for traffic to the TCP/UDP destination port and one for traffic to the TCP/UDP source port.

The show qos resources command displays the number of hardware resources currently in use by QoS policies and other software features.

Displaying the hardware resources used by currently configured QoS policies

HP Switch# show qos resources

 Resource usage in Policy Enforcement Engine
        | Rules       | Rules Used
  Ports | Available   | ACL   | QoS   | IDM   | VT    | Mirror | Other |
  ------+-------------+-------+-------+-------+-------+--------+-------|
  1-24  |        3014 |    15 |    11 |     0 |     1 |      0 |     3 |
  25-48 |        3005 |    15 |    10 |    10 |     1 |      0 |     3 |
  A     |        3017 |    15 |     8 |     0 |     1 |      0 |     3 |

        | Meters      | Meters Used
  Ports | Available   | ACL   | QoS   | IDM   | VT    | Mirror | Other |
  ------+-------------+-------+-------+-------+-------+--------+-------|
  1-24  |         250 |       |     5 |     0 |       |        |     0 |
  25-48 |         251 |       |     4 |     0 |       |        |     0 |
  A     |         253 |       |     2 |     0 |       |        |     0 |

        | Application |
        | Port Ranges | Application Port Ranges Used
  Ports |  Available  | ACL   |  QoS  |  IDM  |   VT  | Mirror | Other |
  ------+-------------+-------+-------+-------+-------+--------+-------|
   1-24 |        3014 |     2 |     0 |     0 |       |      0 |     0 |
  25-48 |        3005 |     2 |     0 |     0 |       |      0 |     0 |
      A |        3017 |     2 |     0 |     0 |       |      0 |     0 |

 0 of 8 Policy Engine management resources used.
 Key:
 ACL = Access Control Lists
 QoS = Device & Application Port Priority, QoS Policies, ICMP rate limits
 IDM = Identity Driven Management
 VT  = Virus Throttling blocks
 Mirror = Mirror Policies, Remote Intelligent Mirror endpoints
 Other = Management VLAN, DHCP Snooping, ARP Protection, Jumbo IP-MTU.
 Resource usage includes resources actually in use, or reserved for future
 use by the listed feature. Internal dedicated-purpose resources, such as
 port bandwidth limits or VLAN QoS priority, are not included.

[NOTE: ]

NOTE: ACLs and QoS policies share the same application port ranges. If a new QoS policy specifies a port range that is already configured for one or more ACLs, the QoS column increases by 1, but the “Application Port Ranges Available” column remains unchanged. Likewise, if an ACL is configured for a port range on which a QoS policy is already applied, the ACL column increases by 1, while the “Available” column remains unchanged.

Similarly, when you remove a port range, the “Application Port Ranges Available” column only increases if the port range is not configured for an existing ACL or QoS policy on the switch.


Global IP-device classifier

Global QoS classifier precedence: 2

The global IP-device classifier enables you to configure up to 300 IP addresses to select IP packets according to source or destination address.

IPv6 Support: IP device classifiers are supported on IPv4 packets only.

When a globally-configured IP-device address has the highest precedence in the switch for traffic addressed to or from the device, traffic received on the switch with the configured IP address is marked with the specified priority level. You can configure different IP-device classifiers with different priority levels.


[NOTE: ]

NOTE: QoS IP-device restriction: The configuration of a QoS IP-device priority on the Management VLAN IP address (if configured) is not supported. If no Management VLAN is configured, the configuration of a QoS IP-device priority on the default VLAN IP address is not supported.


Options for assigning priority

The packet-marking options for global IP-device classifiers include:

  • 802.1p priority

  • DSCP policy: Assigning a new DSCP and 802.1p priority

For a given IP address or subnet mask, you can assign only one of the above options at a time. However, for different IP addresses, you can use different options.

Assigning a priority for a global IP-device classifier

This global QoS packet-marking option assigns an 802.1p priority to all IP packets that have the specified IP address as either a source or destination. If both the source and destination addresses match, the priority configured for the IP destination address has precedence.

Syntax (IPv4):

qos device-priority <ipv4-address|ipv4-address/mask-length> priority <0-7>

Syntax (IPv6):

qos device-priority <ipv6-address|ipv6-address/mask-length> priority <0-7>

Marks an 802.1p priority in outbound packets with the specified IP address or subnet mask in the source or destination field in a packet header, where:

  • ipv4-address or ipv6-address is an IPv4 or IPv6 address used to match the source or destination address in packet headers.


    [NOTE: ]

    NOTE: An IPv6 local-link address (such as fe80::110:252%vlan20) that is automatically generated on a VLAN interface is not supported as an ipv6-address value.


  • ipv4 <ipv4-address/mask-length> is the subnet identified by the IPv4 mask for the specified address that is used to match the IPv4 in the source or destination field of packet headers.

  • ipv6 <ipv6-address/prefix-length> is the subnet identified by the IPv6 prefix-length for the specified address that is used to match the IPv6 address in the source or destination field of packet headers.

    Enter the IPv4 mask or IPv6 prefix length with an address in CIDR format by using the number of significant bits (for example, 2001:db8::1:262:a03:e102:127/64 or 10.28.31.1/24).

  • priority <0-7> marks the specified 802.1p priority in matching IP packets.

The 802.1p priority determines the packet's queue in the outbound port on the switch. If the packet leaves the switch on a tagged VLAN port, it carries the 802.1p priority with it to the next downstream device.

The no form of the command deletes the specified IP address or subnet mask as a QoS classifier, and resets the priority for the VLAN to No-override.

show qos device-priority

Displays a listing of all IP device-priority QoS configurations currently in the running-config file.

Configuring and viewing 802.1p priority

Configuring and viewing the 802.1p priority used to mark packets that match each global IP-device classifier:

IP address / mask or prefix length 802.1p priority
10.28.31.1 7
10.28.31.130 5
10.28.31.100/24 1
2001:db8:2:1:212:79ff:fe88:a100 3
2001:db8:3:3::/64 1
HP Switch(config)#: qos device-priority 10.28.31.1 priority 7
HP Switch(config)#: qos device-priority 10.28.31.130 priority 5
HP Switch(config)#: qos device-priority ipv4 10.28.32.100/24 priority 1
HP Switch(config)#: qos device-priority 2001:db8:2:1:212:79ff:fe88:a100 priority
HP Switch(config)#: qos device-priority ipv6 2001:db8:3:3::/64 priority 1
HP Switch(config)#: show qos device-priority

  Device priorities

  Device Address                                Apply rule | DSCP  Priority
  --------------------------------------------  ---------- + ------ -----------
  10.28.31.1                                    Priority   |        7
  10.28.31.130                                  Priority   |        5
  10.28.32.100/24                               Priority   |        1
  2001:db8:2:1:212:79ff:fe88:a100               Priority   |        3
  2001:db8:3:3::/64                             Priority   |        1

Assigning a DSCP policy for a global IP-device classifier

This global QoS packet-marking option assigns a previously configured DSCP policy (codepoint and 802.1p priority) to outbound IP packets having the specified IP address or subnet mask in the source or destination field of their packet header. The switch:

  1. Selects an incoming IPv4 packet on the basis of the source or destination IP address or subnet mask it carries.

  2. Overwrites the DSCP in matching packets with the globally configured DSCP codepoint, and assigns the 802.1p priority associated with the new DSCP. (See Differentiated Services Codepoint (DSCP) mapping.)

  3. Forwards the packet through the appropriate outbound port queue.

Creating a policy based on IP address:

This procedure creates a DSCP policy for IPv4 packets carrying the selected IP address (source or destination).

  1. Identify the IPv4 address to use as a classifier for assigning a DSCP policy.

  2. Determine the DSCP policy for packets carrying the selected IP address:

    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 <code-point> 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).

    Syntax:

    qos dscp-map <codepoint> priority <0-7>>

    (Optional) This command is required only if an 802.1p priority is not already assigned to the specified <codepoint> in the DSCP Policy table.

    When the switch applies this policy 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 will be replaced by the codepoint specified in this command.

    (Default: No-override for most codepoints.)

  4. Configure the switch to assign the DSCP policy to packets with the specified IP address or subnet mask.

Syntax:

qos device-priority <ip-address> dscp <codepoint>

Assigns a DSCP policy in packets with the specified IP address or subnet mask in the source or destination field in a packet header, where:

  • ip-address: is an IPv4 address used to match the source or destination address in packet headers.

  • dscp <codepoint>: overwrites the DSCP codepoint in the IPv4 ToS byte of matching packets with the specified value. Valid values for the DSCP codepoint are as follows:

    • 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 value you enter must be currently associated with an 802.1p priority in the DSCP Policy table. The 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.

      The default DSCP codepoint is No-override. The DSCP codepoint is not overwritten in matching packets.

    The no form of the command deletes the specified IP address or subnet mask as a QoS classifier. If you configured a subnet mask as match criteria, you must enter the entire IP address and mask-length in the no command.

Syntax:

show qos device-priority

Displays a listing of all IP addresses and subnet masks used as QoS classifiers currently in the running-config file.

Example:

This example shows how to assign the following DSCP policies to the packets that match the specified global IP-device classifiers:

IP address DSCP policies
DSCP codepoint 802.1p priority
10.28.31.1 000111 7
10.28.31.130 000101 5
10.28.31.100/24 000010 1
2001:db8:2:1:212:79ff:fe88:a100 000101 3
2001:db8:3:3::/64 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 if the configured priorities are acceptable for all applications that use the same DSCP.


    [NOTE: ]

    NOTE: A DSCP codepoint must have an associated priority before you can use it to mark matching packets.


    Displaying the current DSCP-map configuration

    Note that the DSCPs for this example have not yet been assigned an 802.1p priority level.

    HP Switch(config)# show qos dscp-map
    
      DSCP -> 802.p priority mappings
      DSCP CodePoint DSCP Value 802.1p tag  DSCP Policy name
      -------------- ---------- ----------- --------------------
      000000         0          No-override
      000001         1          No-override
      000010         2          No-override
      000011         3          No-override
      000100         4          No-override
      000101         5          No-override
      000110         6          No-override
      000111         7          No-override
    
  2. Configure the priorities for the DSCPs you want to use to mark packets.

    Assigning 802.1p priorities to the selected DSCPs

    HP Switch(config)# qos dscp-map 000111 priority 7
    HP Switch(config)# qos dscp-map 000101 priority 5
    HP Switch(config)# qos dscp-map 000010 priority 1
    HP Switch(config)# show qos dscp-map
    
      DSCP -> 802.p priority mappings
      DSCP CodePoint DSCP Value 802.1p tag  DSCP Policy name
      -------------- ---------- ----------- --------------------
      000000         0          No-override
      000001         1          No-override
      000010         2          1
      000011         3          No-override
      000100         4          No-override
      000101         5          5
      000110         6          No-override
      000111         7          7
    
  3. Assign the DSCP policies to the specified IP-device addresses and display the result.

    The completed device-priority/codepoint configuration

    HP Switch(config)# qos device-priority 10.28.31.1 dscp 000111
    HP Switch(config)# qos device-priority 10.28.31.130 dscp 000101
    HP Switch(config)# qos device-priority ipv4 10.28.32.100/24 dscp 000010
    HP Switch(config)# qos device-priority 2001:db8:2:1:212:79ff:fe88:a100 dscp 0001
    HP Switch(config)# qos device-priority ipv6 2001:db8:3:3/64 dscp 000010
    HP Switch(config)# show qos device-priority
    
      Device priorities
      
      Device Address                         Apply rule | DSCP   Priority
      -------------------------------------- ---------- + ------ -----------
      10.28.31.1                             Priority   | 000111 7
      10.28.31.130                           Priority   | 000101 5
      10.28.32.100/24                        Priority   | 000010 1
      2001:db8:2:1:212:79ff:fe88:a100        Priority   | 000101 3
      2001:db8:3:3/64                        Priority   | 000010 1
    

The switch applies the DSCP policies in Assigning 802.1p priorities to the selected DSCPs to IP packets with the specified IP addresses and subnet masks (source or destination) received in the switch. The switch manages the packets as follows:

  • 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.

Global IP Type-of-Service classifier

Global QoS classifier precedence: 3

The global IP Type-of-Service classifier enables you to classify and mark IP packets according to the following modes:

  • IP-precedence mode: All IP packets generated by upstream devices and applications include a precedence bit set in the ToS/Traffic Class byte. In IP-precedence mode, the switch uses the precedence bits to compute and assign the corresponding 802.1p priority.

  • IP Differentiated Services (Diffserv) mode: The Diffserv mode uses the codepoints set in IP packets by upstream devices and applications to assign an 802.1p priority to packets. You can use Diffserv mode to mark packets in the following ways:

    • Assign a new DSCP policy: A “policy” includes both a codepoint and a corresponding 802.1p priority. This option selects an incoming IP packet on the basis of its codepoint and assigns a new codepoint and corresponding 802.1p priority. (Use the qos dscp-map command to specify a priority for any codepoint; see Differentiated Services Codepoint (DSCP) mapping.)

    • Assign an 802.1p priority: This option reads the DSCP of an incoming IPv4 packet and, without changing this codepoint, assigns the 802.1p priority to the packet, as configured in the DSCP Policy Table (The default DSCP Policy Table). This means that a priority value of 0 – 7 must be configured for a DSCP before the switch will attempt to perform a QoS match on the packet’s DSCP bits.

    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). See Differentiated Services Codepoint (DSCP) mapping for more information. Note that some 802.1p priorities are assigned by default to well-known DSCP codepoints, such as the “Assured Forwarding” and “Expedited Forwarding” codepoints (see The default DSCP Policy Table).

    Unless IP-Precedence mode and Diffserv mode are both disabled (the default setting), enabling one automatically disables the other.

IPv4 ToS Traffic Class byte

IPv4 packet headers contain a Type of Service (ToS) byte. A ToS/Traffic Class byte includes a DSCP codepoint and precedence bits:

  • A Differentiated Services Codepoint (DSCP): Consists of the upper six bits of the ToS/Traffic Class byte. There are 64 possible codepoints.

    • In the switches covered in this guide, the default qos configuration includes some codepoints, such as Assured Forwarding and Expedited Forwarding, that are preconfigured with an 802.1p priority setting. All other codepoints are not configured with an 802.1p priority and display No-override as shown in the default DSCP Policy table (The default DSCP Policy Table).

    Using the qos dscp-map command to configure the switch to assign different 802.1p priorities to IP packets with different codepoints. Also, you can configure the switch to assign a new codepoint with its associated priority level (0-7) to matching packets as follows:

    1. Configure a DSCP codepoint with the desired priority in an edge switch.

    2. Configure the local switch to mark specified inbound traffic with the DSCP (and thus create a policy for that traffic type).

    3. Configure the internal switches in your LAN to honor the policy.

    (For example, you could configure an edge switch to assign a codepoint of 000001 to all packets received from a specific VLAN, and then handle all traffic with that codepoint at high priority.)

    For a codepoint listing and the commands for displaying and changing the DSCP Policy table, see Differentiated Services Codepoint (DSCP) mapping.

  • Precedence bits: A subset of the DSCP codepoint, consisting of the upper three bits of the ToS/Traffic Class byte. When a global IP-Precedence classifier is configured, the switch uses the precedence bit set to determine the priority for selected packets as shown in IP precedence-to-802.1p priority mapping. (The switch does not change the setting of the precedence bits.)

IP precedence-to-802.1p priority mapping

ToS/Traffic Class Byte: IP Precedence Bits Corresponding 802.1p Priority Service Priority Level
000 1 Lowest
001 2 Low
002 0 Normal
003 3  
004 4  
005 5  
006 6  
007 7 Highest

[NOTE: ]

NOTE: Using a global IP-Precedence classifier to prioritize IP packets relies on priorities set in upstream devices and applications.


DSCP codepoint and precedence bits shows the difference between the diffserv bits and precedence bits in an IPv4 ToS byte. Note that:

  • Precedence bits are a subset of the Differentiated Services bits.

  • The rightmost two bits are reserved.

DSCP codepoint and precedence bits

DSCP codepoint and precedence bits

Assigning an 802.1p priority for a global IP-precedence classifier

If a device or application upstream of the switch sets the precedence bits in the ToS/Traffic Class byte of IPv4 packets, you can use this global packet marking option to prioritize packets for outbound port queues. If the outbound packets are in a tagged VLAN, this priority is carried as an 802.1p value to the adjacent downstream devices.

Syntax:

qos type-of-service ip-precedence

Causes the switch to automatically assign an 802.1p priority to all IPv4 packets by computing a packet’s 802.1p priority from the precedence bits the packet carries. 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.

(ToS IP Precedence Default: Disabled)

no qos type-of-service

Disables all ToS classifier operation, including prioritization using the precedence bits.

show qos type-of-service

When the IP-precedence mode is enabled (or if neither ToS option is configured), this command displays the ToS configuration status. If the Diff-serv mode is enabled, codepoint data is displayed.

Using the IP-precedence classifier, prioritization of outbound packets relies on the IP-Precedence bit setting that IP packets carry with them from upstream devices and applications. To configure and verify this option:

Enabling ToS IP-precedence prioritization

Enabling ToS IP-precedence prioritization

To change from IP-precedence to IP-Diffserv mode, follow the procedure in Assigning an 802.1p priority for a Global IP-Diffserv classifier, which automatically disables IP-Precedence. To disable IP-Precedence without enabling the IP-Diffserv option, enter the no qos type-of-service command.

Assigning an 802.1p priority for a Global IP-Diffserv classifier

One of the best uses for this global QoS packet-marking option is on an interior switch where you want to honor (continue) a policy set on an edge switch. The IP-diffserv classifier enables you to select incoming packets having a specific DSCP and forward these packets with the desired 802.1p priority. For example, if an edge switch “A” marks all packets received on port 5 with a particular DSCP, you can configure a downstream (interior) switch “B” to handle such packets with the desired priority (regardless of whether 802.1Q tagged VLANs are in use).

Interior switch B honors the policy established in edge switch A

Interior switch B honors the policy established in edge switch A

To do so, assign the desired 802.1p priority to the same codepoint that the upstream or edge switch assigns to the selected packets. When the downstream switch receives an IP packet carrying one of these codepoints, it assigns the configured priority to the packet and sends it out the appropriate outbound port queue. (The packet retains the codepoint it received from the upstream or edge switch). You can use this option concurrently with the diffserv DSCP Policy option (described later in this section), as long as the DSCPs specified in the two options do not match.

Configuration notes:

Different applications may use the same DSCP in their IP packets. Also, the same application may use multiple DSCPs if the application originates on different clients, servers, or other devices. Using an edge switch enables you to select the desired packets and mark them with predictable DSCPs that can be used by downstream switches to honor policies set in the edge switch.

When enabled, the switch applies direct 802.1p prioritization to all packets having codepoints that meet these prerequisites:

  • The codepoint is configured with an 802.1p priority in the DSCP table. (Codepoints configured with No-override are not used.)

  • The codepoint is not configured for a new DSCP policy assignment.

Thus, the switch does not allow the same incoming codepoint (DSCP) to be used simultaneously for directly assigning an 802.1p priority and also assigning a DSCP policy. For a given incoming codepoint, if you configure one option and then the other, the second overwrites the first.

To use this option:

  1. Identify a DSCP used to set a policy in packets received from an upstream or edge switch.

  2. Determine the 802.1p priority (0–7) you want to apply to packets carrying the identified DSCP. (You can either maintain the priority assigned in the upstream or edge switch, or assign a new priority.)

  3. Use qos dscp-map <codepoint> priority <0-7> to assign the 802.1p priority you want to the specified DSCP.

  4. Enable diff-services if not already enabled.

Syntax:

qos type-of-service diff-services <codepoint>

Causes the switch to read the <codepoint> (DSCP) of an incoming IP packet and, when a match occurs, assign a corresponding 802.1p priority, as configured in the switch’s DSCP table (The default DSCP Policy Table).

no qos type-of-service

Disables all ToS classifier operation.

no qos dscp-map <codepoint>

Disables direct 802.1p priority assignment to packets carrying the <codepoint> by reconfiguring the codepoint priority assignment in the DSCP table to No-override. Note that if this codepoint is in use as a DSCP policy for another diffserv codepoint, you must disable or redirect the other diffserv codepoint’s DSCP policy before you can disable or change the codepoint. For example, in ToS configuration that enables both 802.1p priority and DSCP policy assignment you cannot change the priority for the 000000 codepoint until you redirect the DSCP policy for 000001 away from using 000000 as a policy. (See Note on changing a priority setting“ and Differentiated Services Codepoint (DSCP) mapping.)

show qos type-of-service

Displays current Type-of-Service configuration. In diffserv mode it also shows the current direct 802.1p assignments and the current DSCP assignments covered later in this section.

For example, an edge switch “A” in an untagged VLAN assigns a DSCP of 000110 on IP packets it receives on port 6, and handles the packets with high priority (7). When these packets reach interior switch “B” you want the switch to handle them with the same high priority. To enable this operation you would configure an 802.1p priority of 7 for packets received with a DSCP of 000110. ToS diff-services must be enabled:

Viewing the codepoints available for 802.1p priority assignments

Viewing the codepoints available for 802.1p priority assignments

ToS configuration that enables both 802.1p priority and DSCP policy assignment

ToS configuration that enables both 802.1p priority and DSCP policy assignment

Assigning a DSCP policy for a Global IP-Diffserv classifier

The preceding section describes how to forward an 802.1p priority level set by an edge (or upstream) switch. This section describes how to use a global IP-Diffserv classifier to mark matching packets with a new DSCP policy. A DSCP policy consists of a DSCP codepoint and an associated 802.1p priority.

You can use a global IP-Diffserv classifier to mark a DSCP policy at the same time with a global IP-Diffserv classifier that marks an 802.1p priority if different DSCP codepoints are configured with each classifier.

To use a global IP-Diffserv classifier to mark matching packets with a new DSCP policy, follow these steps:

  1. Identify the DSCP used to set a policy in packets received from an upstream or edge switch.

  2. Create a new policy by using the qos dscp-map <code-point> priority <0-7> command to configure an 802.1p priority for the codepoint you will use to overwrite the DSCP that the packet carries from upstream.

  3. Use the qos type-of-service diff-services < incoming-DSCP > dscp < outgoing-DSCP > command to change the policy on packets coming from the edge or upstream switch with the specified incoming DSCP.

    Interior switch B honors the policy established in edge switch A illustrates this scenario.

Syntax:

qos type-of-service diff-services

Enables ToS Diff-services.

Syntax:

qos type-of-service diff-services <current-codepoint> dscp <new-codepoint>

Configures the switch to select an incoming IP packet carrying the <current-codepoint> and then use the <new-codepoint> to assign a new, previously configured DSCP policy to the packet. The policy overwrites the <current-codepoint> with the <new-codepoint> and assigns the 802.1p priority specified by the policy.

Valid values for a DSCP codepoint are as follows:

  • 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 (hexadecimal) name for a binary DSCP bit set

    Enter ? to display the list of valid codepoint entries.

    To reconfigure the 802.1p priority currently assigned to a DSCP codepoint, use the qos dscp-map command as described in Differentiated Services Codepoint (DSCP) mapping.

Syntax:

no qos type-of-service

Disables all ToS classifier operation. Current ToS DSCP policies and priorities remain in the configuration and will become available if you re-enable ToS diff-services.

Syntax:

no qos type-of-service [diff-services <codepoint>]

Deletes the DSCP policy assigned to the <codepoint> and returns the <codepoint> to the 802.1p priority setting it had before the DSCP policy was assigned, which is either a value from 0 - 7 or No-override.

Syntax:

show qos type-of-service

Displays a listing of codepoints with any corresponding DSCP policy reassignments for outbound packets. Also displays the 802.1p priority for each codepoint that does not have a DSCP policy assigned to it.

Example:

The following example shows how to configure new DSCP policies on matching packets with the specified DSCP codepoints.

Received DSCP Policy DSCP 802.1p Priority Policy Name (Optional)
001100 000010 6 Level 6
001101 000101 4 Level 4
  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 (See Note on changing a priority setting.

    Also, note that 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). See Differentiated Services Codepoint (DSCP) mapping for more information.

    Displaying the current DSCP-map configuration

    Note that the DSCPs for this example have not yet been assigned an 802.1p priority level.

    HP Switch(config)# show qos dscp-map
    
      DSCP -> 802.p priority mappings
      DSCP CodePoint DSCP Value 802.1p tag  DSCP Policy name
      -------------- ---------- ----------- --------------------
      000000         0          No-override
      000001         1          No-override
      000010         2          No-override
      000011         3          No-override
      000100         4          No-override
      000101         5          No-override
      000110         6          No-override
      000111         7          No-override
    
  2. Configure the desired policies (codepoint and associated 802.1p priority) in the DSCP table:

    Configuring DSCP policies in the DSCP table

    HP Switch(config)# qos dscp-map 000010 priority 6 name 'Level 6'
    HP Switch(config)# qos dscp-map 000101 priority 4 name 'Level 4'
    HP Switch(config)# show qos dscp-map
    
      DSCP -> 802.p priority mappings
      
      DSCP CodePoint DSCP Value 802.1p tag  DSCP Policy name
      -------------- ---------- ----------- --------------------
      000000         0          No-override
      000001         1          No-override
      000010         2          6           Level 6
      000011         3          No-override
      000100         4          No-override
      000101         5          4           Level 4
    
  3. Assign the new policies to mark matching packets with the specified codepoints.

    Assigning DSCP policies to outbound packets based on the DSCP codepoint from upstream devices

    Note: The specified DSCP policies overwrite the original DSCPs in matching packets, and use the 802.1p priorities configured in the DSCP policies in step 2.

    HP Switch(config)# qos type-of-service diff-services 001100 dscp 000010
    HP Switch(config)# qos type-of-service diff-services 001101 dscp 000101
    HP Switch(config)# show qos type-of-service
    
      Type of Service : Differentiated Services
    
      Codepoint DSCP Policy | Priority
      --------- ----------- + -----------
      000000                | No-override
      000001                | No-override
      000010                | 6
      000011                | No-override
      000100                | No-override
      000101                | 4
      000110                | No-override
      000111                | No-override
      001000                | No-override
      001001                | No-override
      001010                | No-override
      001011                | No-override
      001100    000010      | 6
      001101    000101      | 4
      001110                | No-override
    

Comparing global IP ToS classifiers

The next table shows the difference in how global IP-Precedence and IP-Diffserv classifiers are implemented in the switch.

Outbound port IP ToS classifiers
IP-precedence mode IP differentiated services mode
IP packet sent out an untagged port in a VLAN

Based on the IP Precedence bit set in a packet's ToS/Traffic Class field, the packet is sent to one of eight outbound port queues in the switch:

  • 1 - 2 = low priority (queue 1, 2)

  • 0 - 3 = normal priority (queue 3, 4)

  • 4 - 5 = medium priority (queue 5, 6)

  • 6 - 7 = high priority (queue 7, 8)

Based on the DSCP codepoint that the switch has been configured to detect, one of the following actions is taken:
  • The codepoint is re-marked according to the configured DSCP policy and the 802.1p priority currently configured for the codepoint in the DSCP Policy.

  • The codepoint is not changed, but the 802.1p priority is marked with the currently configured value for the codepoint in the DSCP Policy table.

Based on the new 802.1p priority marking, the packet leaves the switch through one of the following queues:

  • 1 - 2 = low priority (queue 1, 2)

  • 0 - 3 = normal priority (queue 3, 4)

  • 4 - 5 = medium priority (queue 5, 6)

  • 6 - 7 = high priority (queue 7, 8)

If No-override (the default) is configured for the 802.1p priority associated with a codepoint, the priority in the packet header is not re-marked by the global IP-Diffserv classifier and, by default, is sent to the "normal priority" outbound port queue.

IP packet sent out a tagged port in a VLAN Based on the IP Precedence bit set in a packet's ToS/Traffic Class field:
  • The packet is sent to one of eight outbound port queues in the switch as described above.

  • The IP Precedence value (0 - 7) is used to set the corresponding 802.1p priority in the VLAN tag carried by the packet to the next downstream device.

Based on the DSCP codepoint that the switch has been configured to detect, one of the following actions is taken:

  • The codepoint is re-marked according to the configured DSCP policy and the 802.1p priority currently configured for the codepoint in the DSCP Policy Table.

  • The codepoint is not changed, but the 802.1p priority is marked with the currently configured value for the codepoint in the DSCP Policy Table.

Based on the new 802.1p priority marking, the packet leaves the switch through one of the outbound port queues described above.

In addition, the priority value (0 - 7) is used to set the 802.1p priority in the VLAN tag carried by the packet to the next downstream device. If the priority is configured as No-override in the DSCP Policy table, the VLAN tag carries a "0" (normal priority) 802.1p setting if not prioritized by other global QoS classifiers.

Global Layer-3 protocol classifier

Global QoS classifier precedence: 4

When a global Layer-3 Protocol classifier is configured as the highest-precedence classifier and the switch receives traffic carrying the specified protocol, matching packets are assigned the priority configured for the classifier.

Assigning a priority for a global Layer-3 protocol classifier

This global QoS packet-marking option assigns an 802.1p priority to outbound packets having the specified Layer-3 protocol.

Syntax:

qos protocol < ip | ipx | arp | appletalk | sna | netbeui > priority < 0 - 7 >

Configures an 802.1p priority for outbound packets having the specified protocol. 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 protocol type.

(Default: No-override)

Syntax:

[no] qos protocol < ip | ipx | arp | appletalk | sna | netbeui >>

Disables use of the specified protocol as a QoS classifier and resets the protocol priority to No-override.

Syntax:

show qos protocol-priority

Lists the QoS protocol classifiers with their priority settings.

Configuring global Layer-3 protocol classifiers

To configure the following global Layer-3 protocol classifiers:

  1. Configure QoS protocol classifiers with IP at 0 (normal), ARP at 5 (medium), and AppleTalk at 7 (high) and display the QoS protocol configuration.

  2. Disable the QoS IP protocol classifier, downgrade the ARP priority to 4, and again display the QoS protocol configuration.

The following example shows the necessary configuration commands.

Adding, viewing, removing, and changing QoS protocol classifiers

Adding, viewing, removing, and changing QoS protocol classifiers

Global VLAN-ID (VID) classifier

Global QoS classifier precedence: 5

The global VLAN-ID (VID) classifier allows you to use up to 4094 VLAN IDs to match packets. When a particular VLAN-ID classifier has the highest precedence in the switch, traffic received in the VLAN is marked with the configured priority level. You can configure different global VLAN-ID classifiers to mark packets with different priority levels.

Options for assigning priority

The global QoS packet-marking options for packets that carry a specified VLAN-ID include:

  • 802.1p priority

  • DSCP policy (Assigning a new DSCP and an associated 802.1p priority; inbound packets must be IPv4.)

For information on QoS operation when other global QoS classifiers match the same traffic, see Globally-configured packet classification.)


[NOTE: ]

NOTE: Regarding configuration: A global VLAN-ID classifier marks priority levels only in packets received on static VLANs. Packets received in a dynamic VLAN created by GVRP operation are not marked by a global VLAN-ID classifier.

The VLAN ID used as a global QoS classifier must currently exist on the switch. If you remove a VLAN from the switch, all global QoS configurations that use the VLAN ID for packet marking are also removed.


Assigning a priority for a global VID 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)

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.

In the following example, 802.1p priorities are assigned to packets received in VLANs 1, 20, 30, and 40.

Displaying the VLANs available for QoS prioritization

HP Switch(config)# show vlans

 Status and Counters - VLAN Information

  Maximum VLANs to support : 256
  Primary VLAN : DEFAULT_VLAN
  Management VLAN :

  VLAN ID Name                             | Status     Voice Jumbo
  ------- -------------------------------- + ---------- ----- -----
  11

       DEFAULT_VLAN                     | Port-based No    No
  202

      VLAN_20                          | Static     No    No
  30      VLAN_30                          | Static     No    No
  403

      VLAN_40                          | Static     No    No

1

Mark VLAN 1 packets with priority 2.

2

Mark VLAN 20 and 30 packets with priority 5.

3

Mark VLAN 40 packets with priority 7.

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

Configuring and displaying QoS priorities for VIDs

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-priority

  VLAN priorities

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

If you later decided to remove VLAN 20 from QoS prioritization, you would enter the following command:

Returning a QoS-prioritized VLAN to “No-override” status

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

HP Switch(config)# no vlan 20 qos
HP Switch(config)# show qos vlan-priority

  VLAN priorities

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

Assigning a DSCP policy for a global VID classifier

This global QoS packet-marking option assigns a previously configured DSCP policy (codepoint and 802.1p priority) to outbound IP packets having the specified VLAN-ID (VID). The switch:

  1. Selects an incoming IP packet on the basis of the VLAN-ID it carries.

  2. Overwrites the packet’s DSCP with the DSCP configured in the switch for such packets.

  3. Assigns 802.1p priority configured in the switch for the new DSCP (see Differentiated Services Codepoint (DSCP) mapping).

  4. Forwards the packet through the appropriate outbound port queue.

Creating a policy based on 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 through the source-port from upstream devices.)

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

  3. Configure the DSCP policy by using 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). See Differentiated Services Codepoint (DSCP) mapping for more information.

  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.

Valid values for the DSCP codepoint are as follows:

  • 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 value you enter must be currently associated with an 802.1p priority in the DSCP Policy table. The 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.

Example:

This example, assigns the following 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 if the configured priorities are acceptable for all applications that use the same DSCP.


    [NOTE: ]

    NOTE: A DSCP codepoint must have an associated priority before you can use it to mark matching packets.


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

    Note that the DSCPs for this example have not yet been assigned an 802.1p priority level.

    HP Switch(config)# show qos dscp-map
    
      DSCP -> 802.p priority mappings
      DSCP CodePoint DSCP Value 802.1p tag  DSCP Policy name
      -------------- ---------- ----------- --------------------
      000000         0          No-override
      000001         1          No-override
      000010         2          No-override
      000011         3          No-override
      000100         4          No-override
      000101         5          No-override
      000110         6          No-override
      000111         7          No-override
    
  2. Configure the priorities for the DSCPs you want to use.

    Assigning 802.1p priorities to the selected DSCPs

    802.1p priorities are configured in this step.

    HP Switch(config)# qos dscp-map 000110 priority 7
    HP Switch(config)# qos dscp-map 000101 priority 5
    HP Switch(config)# qos dscp-map 000010 priority 1
    HP Switch(config)# show qos dscp-map
    
      Codepoint DSCP Policy | Priority
      --------- ----------- + -----------
      000000                | No-override
      000001                | No-override
      000010                | 1
      000011                | No-override
      000100                | No-override
      000101                | 5
      000110                | No-override
      000111                | 7
      001000                | No-override
        .          .          .
        .          .          .
    
  3. Assign the DSCP policies to the specified VLAN IDs and display the result.

    The completed VID-DSCP priority configuration

    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 in The completed VID-DSCP priority configuration 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.

QoS source-port classifier

Global QoS classifier precedence: 6

The global QoS source-port classifier allows you to use a packet’s source-port on the switch to mark packets. When a global source-port classifier has the highest precedence in the switch for traffic entering through a port, traffic received on the port is marked with the configured priority level. Different source-port classifiers can have different priority levels.

Options for assigning priority on the switch

The global QoS packet marking options for matching packets from a specified source-port include:

  • 802.1p priority

  • DSCP policy: Assigning a new DSCP and an associated 802.1p priority

For information on QoS operation when other global QoS classifiers match the same traffic, see Globally-configured packet classification.

Options for assigning priority from a RADIUS server

You can use a RADIUS server to impose a QoS source-port priority during an 802.1X port-access authentication session. See the RADIUS chapter in the Access Security Guide for your switch.

Assigning a priority for a global source-port classifier

This global QoS packet-marking option assigns a priority to all outbound packets having the specified source-port. You can configure this option by either specifying the source-port ahead of the qos command or moving to the port context for the port you want to configure for priority. (If you are configuring multiple source-ports with the same priority, you may find it easier to use the interface <port-list> command to go to the port context instead of individually configuring the priority for each port.)

Syntax:

interface <port-list> qos priority <0-7>

Configures an 802.1p priority for packets entering the switch through the specified (source) ports. This priority determines the packet queue in the outbound port(s) to which traffic is sent. If a 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 sourceport or group of source-ports.

(Default: No-override)

Syntax:

no interface <port-list> qos

Disables use of the specified source-port(s) for QoS classifier(s) and resets the priority for the specified source-port(s) to No-override.

Syntax:

show qos port-priority

Lists the QoS port-priority classifiers with their priority data.

For example, suppose that you want to prioritize inbound traffic on the following source-ports:

Source-port Priority
1–3 6
4–5 5
6–7 3

Enter the following commands to prioritize packets received from the specified source ports:

Configuring and displaying source-port QoS priorities

HP Switch(config)# interface 1-3 qos priority 6
HP Switch(config)# interface 4-5 qos priority 5
HP Switch(config)# interface 6-7 qos priority 3

HP Switch(config)# show qos port-priority

  Port priorities
  
  Port Apply rule  | DSCP   Priority    Radius Override
  ---- ----------  + -----  --------    ---------------
  1    Priority    |        6           No-override
  2    Priority    |        6           No-override
  3    Priority    |        6           No-override
  4    Priority    |        5           No-override
  5    Priority    |        5           No-override
  6    Priority    |        3           No-override
  7    Priority    |        3           No-override
  8    No-override |        No-override No-override
  9    No-override |        No-override No-override
  10   No-override |        No-override No-override

If you later decided to remove source-port 1 from QoS prioritization, you would enter the following command:

Returning a QoS-prioritized VLAN to “No-override” status

Note: In this instance, No-override indicates that port 1 is not prioritized by QoS.

HP Switch(config)# no interface 1 qos

HP Switch(config)# show qos port-priority

  Port priorities
  
  Port Apply rule  | DSCP  Priority    Radius Override
  ---- ----------  + ----- --------    ---------------
  1    Priority    |       No-override No-override
  2    Priority    |       6           No-override
  3    Priority    |       6           No-override
  4    Priority    |       5           No-override

Assigning a DSCP policy for a global source-port classifier

This global QoS packet-marking option assigns a previously configured DSCP policy (codepoint and 802.1p priority) to outbound IP packets received from the specified source-ports. The switch:

  1. Selects an incoming IP packet on the basis of its source-port.

  2. Overwrites the packet’s DSCP with the DSCP configured for matching packets.

  3. Assigns 802.1p priority associated with the new DSCP (see Differentiated Services Codepoint (DSCP) mapping).

  4. Forwards the packet through the appropriate outbound port queue.

Creating a policy based on source-port classifiers.

[NOTE: ]

NOTE: Regarding configuration: You can configure only one DSCP per source-port to mark matching packets.

Configuring a new DSCP for a source-port automatically overwrites (replaces) any previous DSCP or 802.1p priority configuration for that source-port classifier.


  1. Identify the source-port classifier to which you want to assign a DSCP policy.

  2. Determine the DSCP policy for packets having the selected source-port:

    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 through the source-port 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). See Differentiated Services Codepoint (DSCP) mapping for more information.

    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.)

  4. Configure the switch to assign the DSCP policy to packets from the specified source-port.

Syntax:

interface <port-list> qos dscp <codepoint>

Assigns a DSCP policy to packets from the specified sourceport( s), and overwrites the DSCP in these packets with the assigned <codepoint> value.

Valid values for a DSCP codepoint are as follows:

  • 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 (hexadecimal) name for a binary DSCP bit set

    Enter ? to display the list of valid codepoint entries.

Syntax:

interface <port-list> qos dscp <codepoint>

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 interface [e] <port-list> qos

Removes a QoS classifier for the specified source-port(s).

Syntax:

show qos source-port

Displays a listing of all source-port QoS classifiers currently in the running-config file.

Example:

In this example, you assign the following DSCP policies (codepoint and associated 802.1p priority) to matching packets with the specified source-ports:

Source-port DSCP Priority
2 000111 7
5-7 000101 5
8, 10 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.

    Also, note that a DSCP must have an 802.1p priority configured before you can use it to mark matching packets. 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.

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

    Note that the DSCPs for this example have not yet been assigned an 802.1p priority level.

    HP Switch(config)# show qos dscp-map
    
      DSCP -> 802.p priority mappings
    
      NOTE: ‘qos type-of-service diff-services’ must be configured
             before DSCP is honored on inbound trafic.
    
    DSCP CodePoint DSCP Value 802.1p tag   DSCP Policy name
    -------------- ---------- -----------  -------------------
    000000         0          0            cs0
    000001         1          No-override
    000010         2          No-override
    000011         3          No-override
    000100         4          No-override
    000101         5          No-override
    000110         6          No-override
    000111         7          No-override
    001000         8          1            cs1
    001001         9          No-override
    001010         10         No-override  af11
    001011         11         No-override
    001100         12         No-override  af12
    001101         13         No-override
    001110         14         No-override  af13
    001111         15         No-override
    010000         16         2            cs2
    010001         17         No-override
      .             .             .
      .             .             .
      .             .             .
    
  2. Configure the priorities for the DSCPs that you want to use to mark matching packets.

    Assigning priorities to the specified DSCP codepoints

    HP Switch(config)# qos dscp-map 2 priority 7
    HP Switch(config)# qos dscp-map 3 priority 5
    
    HP Switch(config)# show qos dscp-map
    
      DSCP -> 802.p priority mappings
    
      NOTE: ‘qos type-of-service diff-services’ must be configured
             before DSCP is honored on inbound trafic.
    
    DSCP CodePoint DSCP Value 802.1p tag   DSCP Policy name
    -------------- ---------- -----------  -------------------
    000000         0          0            cs0
    000001         1          No-override
    
    
    000010         2          7
    000011         3          5
    000100         4          No-override
    000101         5          No-override
    000110         6          No-override
    000111         7          No-override
    001000         8          1            cs1
    001001         9          No-override
    001010         10         No-override  af11
    001011         11         No-override
    001100         12         No-override  af12
    001101         13         No-override
    001110         14         No-override  af13
    001111         15         No-override
    010000         16         2            cs2
    010001         17         No-override
      .             .             .
      .             .             .
      .             .             .
    
  3. Assign the DSCP policies to the selected source-ports and display the result.

    Global source-port classifier with DSCP-priority marking

    HP Switch(eth-2)# int e 8,10
    HP Switch(eth-5,10)# qos dscp 000010
    HP Switch(eth-8,10)# int e 5-7
    HP Switch(eth-5-7)# qos dscp 000101
    HP Switch(eth-5-7)# int e 2
    HP Switch(eth-2)# qos dscp 000111
    
    HP Switch(eth-2)# show qos port-priority
    
      Port priorities
    
      Port Apply rule  | DSCP   Priority    Radius Override
      ---- ----------- + ------ ----------- ---------------
      1    No-override |        No-override No-override
      2    DSCP        | 000111 7           No-override
      3    Priority    |        No-override No-override
      4    Priority    |        No-override No-override
      5    DSCP        | 000101 5           No-override
      6    DSCP        | 000101 5           No-override
      7    DSCP        | 000101 5           No-override
      8    DSCP        | 000010 1           No-override
      9    No-override |        No-override No-override
      10   DSCP        | 000010 1           No-override
      11   No-override |        No-override No-override
      12   No-override |        No-override No-override
    

RADIUS override field

During a client session authenticated by a RADIUS server, the server can impose a port priority that applies only to that client session. For more information, see the RADIUS chapter in the Access Security Guide for your switch.