< Home

set priority

Function

The set priority command sets the 802.1p priority or DSCP priority of packets.

The undo set priority command cancels the settings of the 802.1p priority or DSCP priority of packets.

By default, the 802.1p priority or DSCP priority of packets is not set.

Format

set priority 8021p 8021p-number

undo set priority 8021p

set priority dscp dscp-number [ if-match acl acl-number ]

undo set priority dscp [ if-match acl acl-number ]

Only the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735S-S, S5735-S-I, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S support if-match acl acl-number.

Parameters

Parameter

Description

Value

8021p 8021p-number

Specifies the 802.1p priority of packets.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority.

dscp dscp-number

Specifies the DSCP priority of packets. This parameter takes effect only for IPv4 packets.

The value is an integer that ranges from 0 to 63.

if-match acl acl-number

Specifies the number of an ACL.

The value is an integer that ranges from 3000 to 3999.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the set priority command to set the 802.1p priority or DSCP priority of packets sent by the switch.

To change the DSCP priority of protocol packets that meet specified characteristics and are sent by the switch, you can use an ACL to match these packets.

Precautions

If the packet priority has been specified in the protocol, the set priority 8021p command does not take effect.

If you use ACLs to match packets whose DSCP priority is to be changed, you can specify up to eight ACLs, each of which supports a maximum of 32 rules. The following fields can be matched:

  • ICMP packets: source IP address, destination IP address, protocol number, icmp-type, icmp-code, fragment, precedence, tos, dscp, ttl-expired, vpn-instance, and time-range

  • TCP packets: source IP address, destination IP address, protocol number, source port, destination port, tcp-flag, fragment, precedence, tos, dscp, ttl-expired, vpn-instance, and time-range

  • UDP packets: source IP address, destination IP address, protocol number, source port, destination port, fragment, precedence, tos, dscp, ttl-expired, vpn-instance, and time-range

  • Other protocol packets: source IP address, destination IP address, protocol number, fragment, precedence, tos, dscp, ttl-expired, vpn-instance, and time-range

The switch cannot use ACL-based matching to change the DSCP priority of the following protocol packets:

  • Protocol packets that are not sent from the protocol stack, such as fast ICMP reply packets and NetStream packets

  • Protocol packets whose priority can be configured using a command (for example, you can run the tos command to set the priority of NQA packets)

Example

# Set the DSCP priority to 10.

<HUAWEI> system-view
[HUAWEI] set priority dscp 10
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >