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:
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: 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.
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:
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.
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:
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.
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).
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.
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
priority
0 - 7
-
Policy configuration context:
class
[ipv4
|ipv6
]classname
action dscp
codepoint
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
command is not executed. You are prompted to reenter the command with an 802.1p priority:codepoint
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
command.codepoint
priority 0 - 7
|
|
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:
|
|
|
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: 802.1p priority is mapped to the specified DSCP codepoint by using the |
|
|