To globally configure a QoS policy on the switch, follow these steps:
-
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:
-
Device priority—IP source or destination address. Destination has precedence over source.
-
IP precedence bit set (leftmost three bits in the ToS/Traffic Class field of IP packets).
-
IP differentiated services bit set (leftmost six bits in the ToS/Traffic Class field of IP packets).
-
VLAN ID. At least one tagged VLAN is required on the network.
-
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.
-
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.
-
For 802.1p priority settings to be included in outbound packets, ensure that tagged VLANs are configured on the appropriate downstream links.
-
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.
To display the existing switch-wide configurations for a global QoS classifier, use one of the following show qos
commands.
Syntax:
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.
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.
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
orUntagged
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.
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: Global TCP/UDP classifiers are supported on IPv4 only. |
|
|
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.
-
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:
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
: 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.<start end>
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: 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:
-
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:
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:
-
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).
-
Overwrites (re-marks) the packet's DSCP with the new DSCP configured for matching packets.
-
Assigns the 802.1p priority associated with the new DSCP (see Differentiated Services Codepoint (DSCP) mapping).
-
Forwards the packet through the appropriate outbound port queue.
The following procedure creates a DSCP policy for IP packets carrying the selected TCP or UDP port-number classifier.
-
Identify the TCP or UDP port-number classifier you want to use for assigning a DSCP policy.
-
Determine the DSCP policy for packets carrying the selected TCP or UDP port number or range of port numbers.
-
If necessary, use the
qos dscp-map
command to configure the DSCP policy (codepoint and associated 802.1p priority) that you want to use to mark matching packets.<codepoint>
priority <0-7>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
Syntax: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).(Optional) This command is required only if an 802.1p priority is not already assigned to the specified
in the DSCP Policy table.<codepoint>
Valid values for a DSCP codepoint are as follows:
-
A binary value for the six-bit codepoint from
000000
to111111
. -
A decimal value from
0
(low priority) to63
(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 1af22
(010100)cs2
(010000) = precedence 2af23
(010110)cs3
(011000) = precedence 3af31
(011010)cs4
(100000) = precedence 4af32
(011100)cs5
(101000) = precedence 5af33
(011110)cs6
(110000) = precedence 6af41
(100010)cs7
(111000) = precedence 7default
(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.)
-
-
Configure the switch to assign the DSCP policy to packets with the specified TCP or UDP port number or range of port numbers.
Syntax: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
value, where:<codepoint>
-
port-number
: specifies a TCP/UDP port-number from 1 to 65535. -
range
: 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.<start end>
-
dscp
: overwrites the DSCP codepoint in the IPv4 ToS byte or IPv6 Traffic Class byte of matching packets with the specified value.<codepoint>
Valid values for the DSCP codepoint are as follows:
-
A binary value for the six-bit codepoint from
000000
to111111
. -
A decimal value from
0
(low priority) to63
(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 theno
command; you cannot remove part of a range. -
-
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 |
-
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
-
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 ...
-
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 | 3 1
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.
-
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.
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: 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. |
|
|
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.
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):
Syntax (IPv6):
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:
or
ipv4-address
is an IPv4 or IPv6 address used to match the source or destination address in packet headers.
ipv6-address
NOTE: An IPv6 local-link address (such as
fe80::110:252%vlan20
) that is automatically generated on a VLAN interface is not supported as anipv6-address
value.
ipv4
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.<ipv4-address/mask-length>
ipv6
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.<ipv6-address/prefix-length>
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
or10.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 toNo-override
.
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
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:
-
Selects an incoming IPv4 packet on the basis of the source or destination IP address or subnet mask it carries.
-
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.)
-
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).
-
Identify the IPv4 address to use as a classifier for assigning a DSCP policy.
-
Determine the DSCP policy for packets carrying the selected IP address:
-
If necessary, use the
qos dscp-map
command to configure the DSCP policy (codepoint and associated 802.1p priority) that you want to use to mark matching packets.<code-point>
priority <0-7>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:
(Optional) This command is required only if an 802.1p priority is not already assigned to the specified
in the DSCP Policy table.<codepoint>
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.
-
Configure the switch to assign the DSCP policy to packets with the specified IP address or subnet mask.
Syntax:
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:
: is an IPv4 address used to match the source or destination address in packet headers.
ip-address
dscp
: 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:<codepoint>
A binary value for the six-bit codepoint from
000000
to111111
.A decimal value from
0
(low priority) to63
(high priority) that corresponds to a binary DSCP bit setAn 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 theno
command.
Syntax:
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 |
-
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: 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
-
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
-
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.
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 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 displayNo-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:-
Configure a DSCP codepoint with the desired priority in an edge switch.
-
Configure the local switch to mark specified inbound traffic with the DSCP (and thus create a policy for that traffic type).
-
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: 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.
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:
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.
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:
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.
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).
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.
-
Identify a DSCP used to set a policy in packets received from an upstream or edge switch.
-
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.)
-
Use
qos dscp-map
to assign the 802.1p priority you want to the specified DSCP.<codepoint>
priority <0-7>
Syntax:
Causes the switch to read the
(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).
<codepoint>
Disables direct 802.1p priority assignment to packets carrying the
by reconfiguring the codepoint priority assignment in the DSCP table to
<codepoint>
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.)
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:
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:
-
Identify the DSCP used to set a policy in packets received from an upstream or edge switch.
-
Create a new policy by using the
qos dscp-map
command to configure an 802.1p priority for the codepoint you will use to overwrite the DSCP that the packet carries from upstream.<code-point>
priority <0-7> -
Use the
qos type-of-service diff-services
command to change the policy on packets coming from the edge or upstream switch with the specified incoming DSCP.< incoming-DSCP >
dscp< outgoing-DSCP >
Interior switch B honors the policy established in edge switch A illustrates this scenario.
Syntax:
Syntax:
Configures the switch to select an incoming IP packet carrying the
and then use the
<current-codepoint>
to assign a new, previously configured DSCP policy to the packet. The policy overwrites the
<new-codepoint>
with the
<current-codepoint>
and assigns the 802.1p priority specified by the policy.
<new-codepoint>
Valid values for a DSCP codepoint are as follows:
A binary value for the six-bit codepoint from
000000
to111111
.A decimal value from
0
(low priority) to63
(high priority) that corresponds to a binary DSCP bit setAn 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:
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:
Deletes the DSCP policy assigned to the
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
<codepoint>
No-override
.
Syntax:
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 |
-
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
-
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
-
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
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:
|
Based on the DSCP codepoint that the switch has been configured to detect, one of the following actions is taken:
Based on the new 802.1p priority marking, the packet leaves the switch through one of the following queues:
If |
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:
|
Based on the DSCP codepoint that the switch has been configured to detect, one of the following actions is taken:
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 |
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.
This global QoS packet-marking option assigns an 802.1p priority to outbound packets having the specified Layer-3 protocol.
Syntax:
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.
Syntax:
Disables use of the specified protocol as a QoS classifier and resets the protocol priority to
No-override
.
Syntax:
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.
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.)
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:
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.
Syntax:
Removes the specified VLAN-ID as a QoS classifier and resets the priority for that VLAN to
No-override
.
Syntax:
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 ------- -------------------------------- + ---------- ----- ----- 1 DEFAULT_VLAN | Port-based No No 20 VLAN_20 | Static No No 30 VLAN_30 | Static No No 40 VLAN_40 | Static No No
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
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:
-
Selects an incoming IP packet on the basis of the VLAN-ID it carries.
-
Overwrites the packet’s DSCP with the DSCP configured in the switch for such packets.
-
Assigns 802.1p priority configured in the switch for the new DSCP (see Differentiated Services Codepoint (DSCP) mapping).
-
Forwards the packet through the appropriate outbound port queue.
Creating a policy based on VLAN-ID classifier.
-
Determine the VLAN-ID classifier to which you want to assign a DSCP policy.
-
Determine the DSCP policy for packets carrying the selected VLAN-ID:
-
Configure the DSCP policy by using
qos dscp-map <
command to configure the DSCP policy (codepoint and associated 802.1p priority) that you want to use to mark matching packets.codepoint
> priority <0-7>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. -
Configure the switch to assign the DSCP policy to packets with the specified VLAN-ID.
Syntax:
This command is optional if a priority has already been assigned to the
. 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.
<codepoint>
Syntax:
Assigns a DSCP policy to IP packets carrying the specified VLAN ID, and overwrites the DSCP in these packets with the assigned
value.
<codepoint>
Valid values for the DSCP codepoint are as follows:
A binary value for the six-bit codepoint from
000000
to111111
.A decimal value from
0
(low priority) to63
(high priority) that corresponds to a binary DSCP bit setAn 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:
Syntax:
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 |
-
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: 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
-
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 . . . . . .
-
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.
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.
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.
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.
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
command to go to the port context instead of individually configuring the priority for each port.)<port-list>
Syntax:
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.
Syntax:
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:
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
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:
-
Selects an incoming IP packet on the basis of its source-port.
-
Overwrites the packet’s DSCP with the DSCP configured for matching packets.
-
Assigns 802.1p priority associated with the new DSCP (see Differentiated Services Codepoint (DSCP) mapping).
-
Forwards the packet through the appropriate outbound port queue.
Creating a policy based on source-port classifiers.
-
Identify the source-port classifier to which you want to assign a DSCP policy.
-
Determine the DSCP policy for packets having the selected source-port:
-
If necessary, use the
qos dscp-map
command to configure the DSCP policy (codepoint and associated 802.1p priority) that you want to use to mark matching packets.<codepoint>
priority <0-7>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:
This command is optional if a priority has already been assigned to the
. 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.<codepoint>
-
Configure the switch to assign the DSCP policy to packets from the specified source-port.
Syntax:
Assigns a DSCP policy to packets from the specified sourceport( s), and overwrites the DSCP in these packets with the assigned
value.
<codepoint>
Valid values for a DSCP codepoint are as follows:
A binary value for the six-bit codepoint from
000000
to111111
.A decimal value from
0
(low priority) to63
(high priority) that corresponds to a binary DSCP bit setAn ASCII standard (hexadecimal) name for a binary DSCP bit set
Enter ? to display the list of valid codepoint entries.
Syntax:
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.
Syntax:
Syntax:
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 |
-
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
command to configure the DSCP policy (codepoint and associated 802.1p priority) that you want to use to mark matching packets.<codepoint>
priority <0-7>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 . . . . . . . . .
-
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 . . . . . . . . .
-
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