802.1p priority

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 ] priority0 - 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.


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/IPv6 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 IP packets (IPv4 and IPv6) 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 Type-of-Service 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 a priority for a global IP-device 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 to honor (continue) a policy set on an edge switch. The IP-diffserv classifier enables selecting incoming packets having a specific DSCP and forwards these packets with the desired 802.1p priority. For example, if an edge switch A marks all packets received on port A5 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, as long as the DSCPs specified in the two options do not match.


[NOTE: ]

NOTE: 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.


Reconfiguring the 802.1p priority value currently assigned to a DSCP codepoint

To reconfigure the 802.1p priority value currently assigned to a DSCP codepoint, enter one of the following commands:

  • Global configuration context:

    qos dscp-map codepoint priority0 - 7

  • Policy configuration context:

    class [ ipv4 | ipv6 ] classname action dscpcodepoint priority 0 - 7

If you do not enter a priority value with the class action dscp command in a QoS policy, one of the following occurs:

  • The switch refers to the DSCP Policy table to assign the 802.1p value that is currently configured for the specified DSCP codepoint to remark matching packets.

  • If the specified DSCP codepoint is not associated with an 802.1p priority in the DSCP Policy table, an error message is displayed and the class action dscp codepoint command is not executed. You are prompted to reenter the command with an 802.1p priority: class action dscp codepoint priority 0 - 7.

To ensure that the desired 802.1p priority is assigned to matching packets, you may need to first remap the priority to the new codepoint before you configure the policy, by using the qos dscp-map codepoint priority 0 - 7 command.


[NOTE: ]

NOTE: After you reconfigure the 802.1p priority for a DSCP codepoint, the switch immediately applies the new 802.1p priority value to packets transmitted with the associated codepoint as a result of:

  • Globally-configured QoS commands

  • class action dscp commands in other QoS policies




Applying classifier-based QoS policy to inbound traffic on VLAN

In the following example, a classifier-based QoS policy (dscp-remap) that assigns a new DSCP codepoint (af43) and associated 802.1p priority (5) to matching packets with a specified DSCP codepoint (af11) is applied to the inbound traffic on a VLAN.

HP Switch(config)#: qos dscp-map af43 priority 5
HP Switch(config)#: class ipv4 dscp5
HP Switch(config-class)#: match ip any any dscp af11
HP Switch(config-class)#: exit
HP Switch(config)#: policy qos dscp-remap
HP Switch(config-policy)#: class ipv4 dscp5 action dscp af43
HP Switch(config-policy)#: exit
HP Switch(config)#: vlan 3 service-policy dscp-remap in


[NOTE: ]

NOTE: 802.1p priority is mapped to the specified DSCP codepoint by using the qos dscp-map codepoint priority 0 - 7 command before the QoS policy is configured.