- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-QoS commands | 536.50 KB |
Contents
display qos policy control-plane
qos apply policy (Ethernet service instance view, interface view, control plane view, VSI view)
qos apply policy (user profile view)
reset qos policy control-plane
QoS and ACL resource usage displaying commands
qos mirroring local-precedence
Congestion management commands
display qos queue sp interface
display qos queue wrr interface
display qos queue wfq interface
Queue scheduling profile commands
display qos qmprofile configuration
display qos qmprofile interface
qos wred queue weighting-constant
QoS policy commands
Traffic class commands
description
Use description to configure a description for a traffic class.
Use undo description to delete the description of a traffic class.
Syntax
description text
undo description
Default
No description is configured for a traffic class.
Views
Traffic class view
Predefined user roles
network-admin
Parameters
text: Specifies a description, a case-sensitive string of 1 to 127 characters.
Usage guidelines
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Configure the description as classifier for traffic class class1.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] description classifier
display traffic classifier
Use display traffic classifier to display traffic classes.
Syntax
display traffic classifier user-defined [ classifier-name ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
user-defined: Specifies user-defined traffic classes.
classifier-name: Specifies a traffic class by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a traffic class, this command displays all traffic classes.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays the traffic classes for the master device.
Examples
# Display all user-defined traffic classes.
<Sysname> display traffic classifier user-defined
User-defined classifier information:
Classifier: 1 (ID 100)
Operator: AND
Rule(s) :
If-match acl 2000
Classifier: 2 (ID 101)
Operator: AND
Rule(s) :
If-match protocol ipv6
Classifier: 3 (ID 102)
Operator: AND
Rule(s) :
-none-
Field |
Description |
Classifier |
Traffic class name and its match criteria. |
Operator |
Match operator you set for the traffic class. If the operator is AND, the traffic class matches the packets that match all its match criteria. If the operator is OR, the traffic class matches the packets that match any of its match criteria. |
Rule(s) |
Match criteria. |
if-match
Use if-match to define a match criterion.
Use undo if-match to delete a match criterion.
Syntax
if-match match-criteria
undo if-match match-criteria
Default
No match criterion is configured.
Views
Traffic class view
Predefined user roles
network-admin
Parameters
match-criteria: Specifies a match criterion. Table 2 shows the available match criteria.
Table 2 Available match criteria
Option |
Description |
acl [ ipv6 | mac ] { acl-number | name acl-name } |
Matches an ACL. The value range for the acl-number argument is as follows: · 2000 to 3999 for IPv4 ACLs. · 2000 to 3999 for IPv6 ACLs. · 4000 to 4999 for Layer 2 MAC ACLs. The acl-name argument is a case-insensitive string of 1 to 63 characters, which must start with an English letter. To avoid confusion, make sure the argument is not all. |
any |
Matches all packets. |
application app-name |
Matches an application. |
customer-dot1p dot1p-value&<1-8> |
Matches 802.1p priority values in inner VLAN tags of double-tagged packets. The dot1p-value&<1-8> argument specifies a space-separated list of up to eight 802.1p priority values. The value range for the dot1p-value argument is 0 to 7. |
customer-vlan-id vlan-id-list |
Matches VLAN IDs in inner VLAN tags of double-tagged packets. The vlan-id-list argument specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN or a range of VLANs in the form of vlan-id1 to vlan-id2. The value for vlan-id2 must be greater than or equal to the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094. |
destination-mac mac-address [ mac-address-mask ] |
Matches a destination MAC address. This option takes effect only on Ethernet interfaces. If you specify the mac-address-mask argument, the value obtained by performing a bitwise AND operation between the MAC address and the MAC address mask is compared with the value obtained by performing a bitwise AND operation between the destination MAC address and the MAC address mask in the packet. They must be identical for a successful match. If you not specify the mac-address-mask argument, only the MAC address is compared with the destination MAC address in the packet. They must be identical for a successful match. |
[ ipv6 ] dscp dscp-value&<1-8> |
Matches DSCP values. If you specify the ipv6 keyword, this option matches only IPv6 packets. If you do not specify the ipv6 keyword, this option matches only IPv4 packets. The dscp-value&<1-8> argument specifies a space-separated list of up to eight DSCP values. The value range for the dscp-value argument is 0 to 63 or keywords shown in Table 4. |
forwarding-layer { bridge | route } |
Matches Layer 2 forwarded packets or Layer 3 forwarded packets. · bridge—Matches Layer 2 forwarded packets. · route—Matches Layer 3 forwarded packets. A QoS policy containing this option can be applied only to the outbound direction. |
[ ipv6 ] ip-precedence ip-precedence-value&<1-8> |
Matches IP precedence values. If you specify the ipv6 keyword, this option matches only IPv6 packets. If you do not specify the ipv6 keyword, this option matches only IPv4 packets. The ip-precedence-value&<1-8> argument specifies a space-separated list of up to eight IP precedence values. The value range for the ip-precedence-value argument is 0 to 7. |
protocol protocol-name |
Matches a protocol. The protocol-name argument can be ip or ipv6. |
service-dot1p dot1p-value&<1-8> |
Matches 802.1p priority values in outer VLAN tags. The dot1p-value&<1-8> argument specifies a space-separated list of up to eight 802.1p priority values. The value range for the dot1p-value argument is 0 to 7. |
service-vlan-id vlan-id-list |
Matches VLAN IDs in outer VLAN tags. The vlan-id-list argument specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN or a range of VLANs in the form of vlan-id1 to vlan-id2. The value for vlan-id2 must be greater than or equal to the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094. You can use this option to match single-tagged packets. |
source-mac mac-address [ mac-address-mask ] |
Matches a source MAC address. This option takes effect only on Ethernet interfaces. If you specify the mac-address-mask argument, the value obtained by performing a bitwise AND operation between the MAC address and the MAC address mask is compared with the value obtained by performing a bitwise AND operation between the source MAC address and the MAC address mask in the packet. They must be identical for a successful match. If you not specify the mac-address-mask argument, only the MAC address is compared with the source MAC address in the packet. They must be identical for a successful match. |
tunnel-id tunnel-id |
Matches a VXLAN tunnel ID. For the traffic class to take effect, the tunnel must be a VXLAN tunnel. |
vxlan { any | vxlan-id } |
Matches a VXLAN ID. |
Usage guidelines
In a traffic class with the logical OR operator, you can configure multiple if-match commands for any of the available match criteria.
When you configure a match criterion that can have multiple values in one if-match command, follow these restrictions and guidelines:
· You can specify up to eight values for any of the following match criteria in one if-match command:
¡ 802.1p priority.
¡ DSCP.
¡ IP precedence.
¡ VLAN ID.
· If a packet matches one of the specified values, it matches the if-match command.
· To delete a criterion that has multiple values, the specified values in the undo if-match command must be the same as those specified in the if-match command. The order of the values can be different.
To use an ACL match criterion, the ACL must already exist. The ACL is used for classification only and the permit/deny actions in ACL rules are ignored. Actions taken on matching packets are defined in traffic behaviors.
When matching IPv6 packets, an if match source-mac clause can match only the last 24 bits of the source IPv6 address.
Examples
# Define a match criterion for traffic class class1 to match the packets with a destination MAC address of 0050-ba27-bed3.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match destination-mac 0050-ba27-bed3
# Define a match criterion for traffic class class2 to match the packets with a source MAC address of 0050-ba27-bed2.
<Sysname> system-view
[Sysname] traffic classifier class2
[Sysname-classifier-class2] if-match source-mac 0050-ba27-bed2
# Define a match criterion for traffic class class1 to match the double-tagged packets with 802.1p priority 3 in the inner VLAN tag.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match customer-dot1p 3
# Define a match criterion for traffic class class1 to match the packets with 802.1p priority 5 in the outer VLAN tag.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match service-dot1p 5
# Define a match criterion for traffic class class1 to match advanced ACL 3101.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl 3101
# Define a match criterion for traffic class class1 to match the ACL named flow.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl name flow
# Define a match criterion for traffic class class1 to match advanced IPv6 ACL 3101.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl ipv6 3101
# Define a match criterion for traffic class class1 to match the IPv6 ACL named flow.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl ipv6 name flow
# Define a match criterion for traffic class class1 to match all packets.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match any
# Define a match criterion for traffic class class1 to match the packets with a DSCP value of 1, 6, or 9.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match dscp 1 6 9
# Define a match criterion for traffic class class1 to match the IPv6 packets with a DSCP value of 1, 6, or 9.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match ipv6 dscp 1 6 9
# Define a match criterion for traffic class class1 to match the packets with an IP precedence value of 1 or 6.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match ip-precedence 1 6
# Define a match criterion for traffic class class1 to match the IPv6 packets with an IP precedence value of 1 or 6.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match ipv6 ip-precedence 1 6
# Define a match criterion for traffic class class1 to match the packets with a local precedence value of 1 or 6.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match local-precedence 1 6
# Define a match criterion for traffic class class1 to match IP packets.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match protocol ip
# Define a match criterion for traffic class class1 to match double-tagged packets with VLAN ID 1, 6, or 9 in the inner VLAN tag.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match customer-vlan-id 1 6 9
# Define a match criterion for traffic class class1 to match the packets with VLAN ID 2, 7, or 10 in the outer VLAN tag.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match service-vlan-id 2 7 10
traffic classifier
Use traffic classifier to create a traffic class and enter its view, or enter the view of an existing traffic class.
Use undo traffic classifier to delete a traffic class.
Syntax
traffic classifier classifier-name [ operator { and | or } ]
undo traffic classifier classifier-name
Default
No traffic classes exist.
Views
System view
Predefined user roles
network-admin
Parameters
classifier-name: Specifies a name for the traffic class, a case-sensitive string of 1 to 31 characters.
operator: Sets the operator to logic AND (the default) or OR for the traffic class.
and: Specifies the logic AND operator. The traffic class matches the packets that match all its criteria.
or: Specifies the logic OR operator. The traffic class matches the packets that match any of its criteria.
Examples
# Create a traffic class named class1.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1]
Related commands
display traffic classifier
Traffic behavior commands
accounting
Use accounting to configure a traffic accounting action in a traffic behavior.
Use undo accounting to restore the default.
Syntax
accounting { byte | packet }
undo accounting
Default
No traffic accounting action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
byte: Counts traffic in bytes.
packet: Counts traffic in packets.
Examples
# Configure a traffic accounting action in traffic behavior database to count traffic in bytes.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] accounting byte
car
Use car to configure a CAR action in absolute value in a traffic behavior.
Use undo car to restore the default.
Syntax
car cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ green action | red action | yellow action ] *
car cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ green action | red action | yellow action ] *
undo car
Default
No CAR action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
cir committed-information-rate: Specifies the committed information rate (CIR) in the range of 1 to 160000000 kbps.
cbs committed-burst-size: Specifies the committed burst size (CBS) in bytes. The value range for committed-burst-size is 512 to 256000000, in increments of 512. The default value for this argument is the product of 62.5 and the CIR and must be an integral multiple of 512. When the product is not an integral multiple of 512, it is rounded up to the nearest integral multiple of 512 that is greater than the product. A default value greater than 256000000 is converted to 256000000.
ebs excess-burst-size: Specifies the excess burst size (EBS) in bytes. The value range for excess-burst-size is 0 to 256000000, in increments of 512. If the PIR is configured, the default EBS is the product of 62.5 and the PIR and must be an integral multiple of 512. When the product is not an integral multiple of 512, it is rounded up to the nearest integral multiple of 512. A default value greater than 256000000 is converted to 256000000.
pir peak-information-rate: Specifies the peak information rate (PIR) in the range of 8 to 160000000 kbps, in increments of 8.
green action: Specifies the action to take on packets that conform to the CIR. The default setting is pass.
red action: Specifies the action to take on packets that conform to neither CIR nor PIR. The default setting is discard.
yellow action: Specifies the action to take on packets that conform to the PIR but not to the CIR. The default setting is pass.
action: Specifies the action to take on the packet:
· discard: Drops the packet.
· pass: Permits the packet to pass through.
· remark-dot1p-pass new-cos: Sets the 802.1p priority value of the 802.1p packet to new-cos and permits the packet to pass through. The new-cos argument is in the range of 0 to 7.
· remark-dscp-pass new-dscp: Sets the DSCP value of the packet to new-dscp and permits the packet to pass through. The new-dscp argument is in the range of 0 to 63.
· remark-lp-pass new-local-precedence: Sets the local precedence value of the packet to new-local-precedence and permits the packet to pass through. The new-local-precedence argument is in the range of 0 to 7.
Usage guidelines
To use two rates for traffic policing, configure the car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the car command without the pir peak-information-rate option.
If you execute the car command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure a CAR action in traffic behavior database: Set the CIR to 200 kbps and the CBS to 51200 bytes
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] car cir 200 cbs 51200
display traffic behavior
Use display traffic behavior to display traffic behaviors.
Syntax
display traffic behavior user-defined [ behavior-name ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
user-defined: Specifies user-defined traffic behaviors.
behavior-name: Specifies a behavior by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a traffic behavior, this command displays all traffic behaviors.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays the traffic behaviors for the master device.
Examples
# Display all user-defined traffic behaviors.
<Sysname> display traffic behavior user-defined
User-defined behavior information:
Behavior: 1 (ID 100)
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Behavior: 2 (ID 101)
Accounting enable: Packet
Filter enable: Permit
Redirecting:
Redirect to the CPU
Behavior: 3 (ID 102)
-none-
Field |
Description |
Behavior |
Name and contents of a traffic behavior. |
Marking |
Information about priority marking. |
Remark dscp |
Action of setting the DSCP value for packets. |
Committed Access Rate |
Information about the CAR action. |
Green action |
Action to take on green packets. |
Yellow action |
Action to take on yellow packets. |
Red action |
Action to take on red packets. |
Accounting enable |
Class-based accounting action. |
Filter enable |
Traffic filtering action. |
Redirecting |
Information about traffic redirecting. |
Mirroring |
Information about traffic mirroring. |
none |
No other traffic behavior is configured. |
filter
Use filter to configure a traffic filtering action in a traffic behavior.
Use undo filter to restore the default.
Syntax
filter { deny | permit }
undo filter
Default
No traffic filtering action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
deny: Drops packets.
permit: Transmits packets. The permitted packets can be processed by other class-behavior associations in the same QoS policy.
Examples
# Configure a traffic filtering action as deny in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] filter deny
packet-rate
Use packet-rate to configure a protocol packet rate limiting action in a traffic behavior.
Use undo packet-rate to restore the default.
packet-rate { value | attack-defense-threshold threshold-value } *
undo packet-rate
Default
No protocol packet rate limiting action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
value: Specifies the protocol packet rate in the range of 1 to 2000 packets per second (pps).
attack-defense-threshold threshold-value: Specifies the attack defense threshold for protocol packets, in the range of 1 to 2000 pps.
Usage guidelines
Protocol packet rate limiting can protect the CPU against protocol packet attacks.
If you execute the packet-rate command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure traffic behavior copp to rate limit the protocol packets sent to the CPU to 1600 pps.
<Sysname> system-view
[Sysname] traffic behavior copp
[Sysname-behavior-copp] packet-rate 1600
redirect
Use redirect to configure a traffic redirecting action in a traffic behavior.
Use undo redirect to restore the default.
Syntax
redirect { cpu | interface interface-type interface-number }
undo redirect { cpu | interface interface-type interface-number }
Default
No traffic redirecting action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
cpu: Redirects traffic to the CPU.
interface interface-type interface-number: Redirects traffic to an interface specified by its type and number.
Usage guidelines
If you execute the redirect command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure redirecting traffic to Twenty-FiveGigE 1/0/1 in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] redirect interface twenty-fivegige 1/0/1
Related commands
classifier behavior
qos policy
traffic behavior
remark customer-vlan-id
Use remark customer-vlan-id to configure a CVLAN marking action in a traffic behavior.
Use undo remark customer-vlan-id to restore the default.
Syntax
remark customer-vlan-id vlan-id
undo remark customer-vlan-id
Default
No CVLAN marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
vlan-id: Specifies a CVLAN ID in the range of 1 to 4094.
Examples
# Configure traffic behavior b1 to mark matching packets with CVLAN 111.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] remark customer-vlan-id 111
remark dot1p
Use remark dot1p to configure an 802.1p priority marking action or an inner-to-outer tag priority copying action in a traffic behavior.
Use undo remark dot1p to restore the default.
Syntax
remark [ green | red | yellow ] dot1p dot1p-value
undo remark [ green | red | yellow ] dot1p
remark dot1p customer-dot1p-trust
undo remark dot1p
Default
No 802.1p priority marking action or inner-to-outer tag priority copying action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
green: Specifies green packets.
red: Specifies red packets.
yellow: Specifies yellow packets.
dot1p-value: Specifies the 802.1p priority to be marked for packets, in the range of 0 to 7.
customer-dot1p-trust: Copies the 802.1p priority value in the inner VLAN tag to the outer VLAN tag.
Usage guidelines
The remark dot1p dot1p-value and remark dot1p customer-dot1p-trust commands override each other in the same traffic behavior. The remark dot1p customer-dot1p-trust command does not take effect on single-tagged packets.
If you execute the remark dot1p dot1p-value command multiple times for the same color, the most recent configuration takes effect.
If you do not specify a color, packets of all colors are marked.
Examples
# Configure traffic behavior database to mark matching traffic with 802.1p 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark dot1p 2
# Configure an inner-to-outer tag priority copying action in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark dot1p customer-dot1p-trust
remark drop-precedence
Use remark drop-precedence to configure a drop priority marking action in a traffic behavior.
Use undo remark drop-precedence to restore the default.
Syntax
remark drop-precedence drop-precedence-value
undo remark drop-precedence
Default
No drop priority marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
drop-precedence-value: Specifies the drop priority to be marked for packets, in the range of 0 to 2.
Usage guidelines
A traffic behavior that includes a drop priority marking action can be applied only to the inbound direction.
If you execute the remark drop-precedence command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure traffic behavior database to mark matching traffic with drop priority 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark drop-precedence 2
remark dscp
Use remark dscp to configure a DSCP marking action in a traffic behavior.
Use undo remark dscp to delete the action.
Syntax
remark [ green | red | yellow ] dscp dscp-value
undo remark [ green | red | yellow ] dscp
Default
No DSCP marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
green: Specifies green packets.
red: Specifies red packets.
yellow: Specifies yellow packets.
dscp-value: Specifies a DSCP value, which can be a number from 0 to 63 or a keyword in Table 4.
Table 4 DSCP keywords and values
Keyword |
DSCP value (binary) |
DSCP value (decimal) |
af11 |
001010 |
10 |
af12 |
001100 |
12 |
af13 |
001110 |
14 |
af21 |
010010 |
18 |
af22 |
010100 |
20 |
af23 |
010110 |
22 |
af31 |
011010 |
26 |
af32 |
011100 |
28 |
af33 |
011110 |
30 |
af41 |
100010 |
34 |
af42 |
100100 |
36 |
af43 |
100110 |
38 |
cs1 |
001000 |
8 |
cs2 |
010000 |
16 |
cs3 |
011000 |
24 |
cs4 |
100000 |
32 |
cs5 |
101000 |
40 |
cs6 |
110000 |
48 |
cs7 |
111000 |
56 |
default |
000000 |
0 |
ef |
101110 |
46 |
Examples
# Configure traffic behavior database to mark matching traffic with DSCP 6.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark dscp 6
remark flow-id
Use remark flow-id to configure a flow ID marking action in a traffic behavior.
Use undo remark flow-id to restore the default.
Syntax
remark flow-id flow-id
undo remark flow-id flow-id
Default
No flow ID marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
flow-id: Specifies a flow ID in the range of 1 to 65535.
Usage guidelines
In a RIR network, the RIR server deploys a traffic profile, NQA link detection results, and a QoS policy to the device.
1. The device selects an appropriate link for packets according to the traffic profile and NQA link detection results.
2. The device identifies packets according to the quintuple and DSCP in QoS parameters, and mark a flow ID for identified packets. Then, the device forwards the packets according to the marked flow ID and selected link.
For more information about RIR, see Layer 3—IP Routing Configuration Guide.
Examples
# Configure traffic behavior behavior1 to mark matching traffic with flow ID 10.
<Sysname> system-view
[Sysname] traffic behavior behavior1
[Sysname-behavior-behavior1] remark flow-id 10
Related commands
traffic behavior
remark ip-precedence
Use remark ip-precedence to configure an IP precedence marking action in a traffic behavior.
Use undo remark ip-precedence to delete the action.
Syntax
remark ip-precedence ip-precedence-value
undo remark ip-precedence
Default
No IP precedence marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
ip-precedence-value: Specifies the IP precedence value to be marked for packets, in the range of 0 to 7.
Examples
# Set the IP precedence to 6 for packets.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark ip-precedence 6
remark local-precedence
Use remark local-precedence to configure a local precedence marking action in a traffic behavior.
Use undo remark local-precedence to delete the action.
Syntax
remark [ green | red | yellow ] local-precedence local-precedence-value
undo remark [ green | red | yellow ] local-precedence
Default
No local precedence marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
green: Specifies green packets.
red: Specifies red packets.
yellow: Specifies yellow packets.
local-precedence-value: Specifies the local precedence to be marked for packets, in the range of 0 to 7.
Examples
# Configure traffic behavior database to mark matching traffic with local precedence 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark local-precedence 2
remark service-vlan-id
Use remark service-vlan-id to configure an SVLAN marking action in a traffic behavior.
Use undo remark service-vlan-id to restore the default.
Syntax
remark service-vlan-id vlan-id
undo remark service-vlan-id
Default
No SVLAN marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
vlan-id: Specifies an SVLAN ID in the range of 1 to 4094.
Examples
# Configure traffic behavior b1 to mark matching packets with SVLAN 222.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] remark service-vlan-id 222
traffic behavior
Use traffic behavior to create a traffic behavior and enter its view, or enter the view of an existing traffic behavior.
Use undo traffic behavior to delete a traffic behavior.
Syntax
traffic behavior behavior-name
undo traffic behavior behavior-name
Default
No traffic behaviors exist.
Views
System view
Predefined user roles
network-admin
Parameters
behavior-name: Specifies a name for the traffic behavior, a case-sensitive string of 1 to 31 characters.
Examples
# Create a traffic behavior named behavior1.
<Sysname> system-view
[Sysname] traffic behavior behavior1
[Sysname-behavior-behavior1]
Related commands
display traffic behavior
QoS policy commands
classifier behavior
Use classifier behavior to associate a traffic behavior with a traffic class in a QoS policy.
Use undo classifier to delete a class-behavior association from a QoS policy.
Syntax
classifier classifier-name behavior behavior-name [ mode dcbx | insert-before before-classifier-name ] *
undo classifier classifier-name
Default
No traffic behavior is associated with a traffic class.
Views
QoS policy view
Predefined user roles
network-admin
Parameters
classifier-name: Specifies a traffic class by its name, a case-sensitive string of 1 to 31 characters.
behavior-name: Specifies a traffic behavior by its name, a case-sensitive string of 1 to 31 characters.
mode dcbx: Specifies that the class-behavior association applies only to the DCBX. For more information about DCBX, see Layer 2—LAN Switching Configuration Guide.
insert-before before-classifier-name: Inserts the new traffic class before an existing traffic class in the QoS policy. The before-classifier-name argument specifies an existing traffic class by its name, a case-sensitive string of 1 to 31 characters. If you do not specify the insert-before before-classifier-name option, the new traffic class is placed at the end of the QoS policy.
Usage guidelines
A traffic class can be associated only with one traffic behavior in a QoS policy.
A QoS policy can contain multiple class-behavior associations. The device matches a packet against the class-behavior associations in their configuration order. When a match is found, the device stops the match process and takes the actions in the matching class-behavior association.
If the specified traffic class or traffic behavior does not exist, the system defines a null traffic class or traffic behavior.
Examples
# Associate traffic class database with traffic behavior test in QoS policy user1.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1] classifier database behavior test
# Associate traffic class database with traffic behavior test in QoS policy user1, and insert traffic class database before an existing traffic class named class-a.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1] classifier database behavior test insert-before class-a
Related commands
qos policy
control-plane
Use control-plane to enter control plane view.
Syntax
control-plane slot slot-number
Views
System view
Predefined user roles
network-admin
Parameters
slot slot-number: Specifies an IRF member device by its member ID.
Examples
# Enter the control plane view of slot 3.
<Sysname> system-view
[Sysname] control-plane slot 1
[Sysname-cp-slot1]
display qos policy
Use display qos policy to display QoS policies.
Syntax
display qos policy user-defined [ policy-name [ classifier classifier-name ] ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
user-defined: Specifies user-defined QoS policies.
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a QoS policy, this command displays all user-defined QoS policies.
classifier classifier-name: Specifies a traffic class by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a traffic class, this command displays all traffic classes.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays the QoS policies for the master device.
Examples
# Display all user-defined QoS policies.
<Sysname> display qos policy user-defined
User-defined QoS policy information:
Policy: 1 (ID 100)
Classifier: 1 (ID 100)
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 51200 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Classifier: 2 (ID 101)
Behavior: 2
Accounting enable: Packet
Filter enable: Permit
Marking:
Remark dot1p 4
Classifier: 3 (ID 102)
Behavior: 3
-none-
Table 5 Command output
Field |
Description |
User-defined QoS policy information |
Information about a user-defined QoS policy. |
For the output description, see Table 1 and Table 3.
display qos policy control-plane
Use display qos policy control-plane to display QoS policies applied to a control plane.
Syntax
display qos policy control-plane slot slot-number
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies an IRF member device by its member ID.
Examples
# Display the QoS policy applied to the control plane of slot 1.
<Sysname> display qos policy control-plane slot 1
Control plane slot 1
Direction: Inbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 51200 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
Yellow packets: 0 (Packets) 0 (Bytes)
Red packets : 0 (Packets) 0 (Bytes)
Classifier: 2
Operator: AND
Rule(s) :
If-match protocol ipv6
Behavior: 2
Accounting enable:
0 (Packets)
Filter enable: Permit
Marking:
Remark dscp 3
Classifier: 3
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 6 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied. |
For the description of other fields, see Table 1 and Table 3.
display qos policy global
Use display qos policy global to display QoS policies applied globally.
Syntax
display qos policy global [ slot slot-number ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
inbound: Specifies the QoS policy applied in the inbound direction.
outbound: Specifies the QoS policy applied in the outbound direction.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays global QoS policies for the master device.
Usage guidelines
If you do not specify a direction, this command displays both inbound and outbound global QoS policies.
Examples
# Display QoS policies applied globally.
<Sysname> display qos policy global
Direction: Inbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 51200 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
Yellow packets: 0 (Packets) 0 (Bytes)
Red packets : 0 (Packets) 0 (Bytes)
Classifier: 2
Operator: AND
Rule(s) :
If-match protocol ipv6
Behavior: 2
Accounting enable:
0 (Packets)
Filter enable: Permit
Marking:
Remark dscp 3
Classifier: 3
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 7 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied. |
Green packets |
Statistics about green packets. |
Yellow packets |
Statistics about yellow packets. |
Red packets |
Statistics about red packets. |
For the description of other fields, see Table 1 and Table 3.
display qos policy interface
Use display qos policy interface to display the QoS policies applied to interfaces.
Syntax
display qos policy interface [ interface-type interface-number ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number.
inbound: Specifies the QoS policy applied to incoming traffic.
outbound: Specifies the QoS policy applied to outgoing traffic.
Usage guidelines
If you do not specify a direction, this command displays the QoS policy applied to incoming traffic and the QoS policy applied to outgoing traffic.
Examples
# Display the QoS policy applied to the incoming traffic of Twenty-FiveGigE 1/0/1.
<Sysname> display qos policy interface twenty-fivegige 1/0/1 inbound
Interface: Twenty-FiveGigE1/0/1
Direction: Inbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 51200 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
Yellow packets: 0 (Packets) 0 (Bytes)
Red packets : 0 (Packets) 0 (Bytes)
Classifier: 2
Matched : 0 (Packets) 0 (Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Operator: AND
Rule(s) :
If-match protocol ipv6
Behavior: 2
Accounting enable:
0 (Packets)
Filter enable: Permit
Marking:
Remark dscp 3
Classifier: 3
Matched : 0 (Packets) 0 (Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 8 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied. |
Policy |
User-defined QoS policy name or system-defined QoS policy name. |
Green packets |
Traffic statistics for green packets. |
Yellow packets |
Traffic statistics for yellow packets. |
Red packets |
Traffic statistics for red packets. |
For the description of other fields, see Table 1 and Table 3.
display qos policy l2vpn-ac
Use display qos policy l2vpn-ac to display the QoS policies applied to Ethernet service instances.
Syntax
display qos policy l2vpn-ac [ interface interface-type interface-number [ service-instance instance-id ] ] [ inbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays QoS policies applied to Ethernet service instances on all interfaces.
service-instance instance-id: Specifies an Ethernet service instance by its ID in the range of 1 to 4096. If you do not specify an Ethernet service instance, this command displays QoS policies applied to all Ethernet service instances on an interface.
inbound: Specifies the QoS policies applied to incoming traffic. If you do not specify this keyword, the command execution results are the same.
Examples
# Display the QoS policy applied to the incoming traffic of Ethernet service instance 1 on Twenty-FiveGigE 1/0/1.
<Sysname> display qos policy l2vpn-ac interface twenty-fivegige 1/0/1 service-instance 1 inbound
Interface: Twenty-FiveGigE1/0/1 Service instance ID: 1
Direction: Inbound
Policy: p
Classifier: c
Operator: AND
Rule(s) :
If-match any
Behavior: b
Committed Access Rate:
CIR 88 (kbps), CBS 5632 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Table 9 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied. |
Green packets |
Traffic statistics for green packets. |
Yellow packets |
Traffic statistics for yellow packets. |
Red packets |
Traffic statistics for red packets. |
For the description of other fields, see Table 1 and Table 3.
display qos policy vsi
Use display qos policy vsi to display QoS policies applied to VSIs.
Syntax
display qos policy vsi [ name vsi-name ] [ inbound ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name vsi-name: Specifies a VSI by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VSI, this command displays QoS policies applied to all VSIs.
inbound: Specifies the QoS policy applied to incoming traffic. Because a VSI does not support a QoS policy in the outbound direction, the command execution result is the same no matter whether you specify this keyword.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays QoS policies applied to VSIs for all IRF member devices.
Examples
# Display QoS policies applied to all VSIs.
<Sysname> display qos policy vsi
VSI: vsi1
Direction: Inbound
Policy: p
Classifier: c
Operator: AND
Rule(s) :
If-match any
Behavior: b
Committed Access Rate:
CIR 88 (kbps), CBS 5632 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Table 10 Command output
Field |
Description |
VSI |
VSI name. |
Direction |
Direction in which the QoS policy is applied. |
Policy |
QoS policy name. |
Classifier |
Traffic class name. |
Operator |
Operator for match criteria in the traffic class. |
Rule(s) |
Match criteria. |
Behavior |
Behavior name. |
Green action |
Action to take on green packets. |
Red action |
Action to take on red packets. |
Green packets |
Number of green packets. |
Yellow packets |
Number of yellow packets. |
Red packets |
Number of red packets. |
Related commands
qos apply policy (VSI view)
display qos vlan-policy
Use display qos vlan-policy to display QoS policies applied to VLANs.
Syntax
display qos vlan-policy { name policy-name | vlan [ vlan-id ] } [ slot slot-number ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
vlan vlan-id: Specifies a VLAN by its ID in the range of 1 to 4094.
inbound: Displays QoS policies applied to incoming traffic.
outbound: Displays QoS policies applied to outgoing traffic.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays QoS policies applied to VLANs for the master device.
Usage guidelines
If you do not specify a direction, this command displays QoS policies applied to VLANs in both the inbound and outbound directions.
Examples
# Display QoS policies applied to VLAN 2.
<Sysname> display qos vlan-policy vlan 2
Vlan 2
Direction: Inbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
Yellow packets: 0 (Packets) 0 (Bytes)
Red packets : 0 (Packets) 0 (Bytes)
Classifier: 2
Operator: AND
Rule(s) :
If-match protocol ipv6
Behavior: 2
Accounting enable:
0 (Packets)
Filter enable: Permit
Marking:
Remark dscp 3
Classifier: 3
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 11 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied. |
Green packets |
Statistics about green packets. |
Yellow packets |
Statistics about yellow packets. |
Red packets |
Statistics about red packets. |
For the description of other fields, see Table 1 and Table 3.
qos apply policy (Ethernet service instance view, interface view, control plane view, VSI view)
Use qos apply policy to apply a QoS policy to an Ethernet service instance view, interface, or control plane.
Use undo qos apply policy to remove an applied QoS policy.
Syntax
qos apply policy policy-name { inbound | outbound }
undo qos apply policy policy-name { inbound | outbound }
Default
No QoS policy is applied.
Views
Control plane view
Interface view
Ethernet service instance view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
inbound: Applies the QoS policy to incoming traffic.
outbound: Applies the QoS policy to outgoing traffic.
Usage guidelines
A QoS policy applied to the inbound direction of a VXLAN tunnel interface cannot match VXLAN packets.
You cannot apply a QoS policy to the outbound direction of an Ethernet service instance.
Examples
# Apply QoS policy USER1 to the outgoing traffic of Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos apply policy USER1 outbound
# Apply QoS policy TEST12 to the incoming traffic of VSI vsi1.
<Sysname> system-view
[Sysname] vsi vsi1
[Sysname-vsi-vsi1] qos apply policy TEST12 inbound
qos apply policy (user profile view)
Use qos apply policy to apply a QoS policy to a user profile.
Use undo qos apply policy to remove a QoS policy applied to a user profile.
Syntax
qos apply policy policy-name { inbound | outbound }
undo qos apply policy policy-name { inbound | outbound }
Default
No QoS policy is applied to a user profile.
Views
User profile view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
inbound: Applies the QoS policy to the incoming traffic of the device (traffic sent by online users).
outbound: Applies the QoS policy to the outgoing traffic of the device (traffic received by online users).
Usage guidelines
Deleting a user profile also removes the QoS policies applied to the user profile.
For a user profile to be active, the QoS policy applied in user profile view cannot be empty. A user profile supports only the car and accounting actions in a QoS policy.
Examples
# Apply QoS policy test to incoming traffic of user profile user.
<Sysname> system-view
[Sysname] user-profile user
[Sysname-user-profile-user] qos apply policy test outbound
qos apply policy global
Use qos apply policy global to apply a QoS policy globally.
Use undo qos apply policy global to remove a globally applied QoS policy.
Syntax
qos apply policy policy-name global { inbound | outbound }
undo qos apply policy policy-name global { inbound | outbound }
Default
No QoS policy is applied globally.
Views
System view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
inbound: Applies the QoS policy to the incoming packets on all interfaces.
outbound: Applies the QoS policy to the outgoing packets on all interfaces.
A global QoS policy takes effect on all incoming or outgoing traffic depending on the direction in which the QoS policy is applied.
Examples
# Globally apply QoS policy user1 to the incoming traffic.
<Sysname> system-view
[Sysname] qos apply policy user1 global inbound
qos policy
Use qos policy to create a QoS policy and enter its view, or enter the view of an existing QoS policy.
Use undo qos policy to delete a QoS policy.
Syntax
qos policy policy-name
undo qos policy policy-name
Default
No QoS policies exist.
Views
System view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a name for the QoS policy, a case-sensitive string of 1 to 31 characters.
To delete a QoS policy that has been applied to an object, you must first remove the QoS policy from the object.
Examples
# Create a QoS policy named user1.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1]
Related commands
classifier behavior
qos apply policy
qos apply policy global
qos vlan-policy
qos vlan-policy
Use qos vlan-policy to apply a QoS policy to the specified VLANs.
Use undo qos vlan-policy to remove a QoS policy from the specified VLANs.
Syntax
qos vlan-policy policy-name vlan vlan-id-list { inbound | outbound }
undo qos vlan-policy policy-name vlan vlan-id-list { inbound | outbound }
Default
No QoS policy is applied to a VLAN.
Views
System view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
vlan vlan-id-list: Specifies a space-separated list of up to eight VLAN IDs or a VLAN ID range in the form of vlan-id1 to vlan-id2. The value for vlan-id2 must be greater than or equal to the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094.
inbound: Applies the QoS policy to incoming packets.
outbound: Applies the QoS policy to outgoing packets.
Examples
# Apply QoS policy test to the incoming traffic of VLAN 200, VLAN 300, VLAN 400, and VLAN 500.
<Sysname> system-view
[Sysname] qos vlan-policy test vlan 200 300 400 500 inbound
reset qos policy control-plane
Use reset qos policy control-plane to clear the statistics of the QoS policy applied to a control plane.
Syntax
reset qos policy control-plane slot slot-number
Views
User view
Predefined user roles
network-admin
Parameters
slot slot-number: Specifies an IRF member device by its member ID.
Examples
# Clear the statistics of the QoS policy applied to the control plane of slot 1.
<Sysname> reset qos policy control-plane slot 1
reset qos policy global
Use reset qos policy global to clear the statistics of a global QoS policy.
Syntax
reset qos policy global [ inbound | outbound ]
Views
User view
Predefined user roles
network-admin
Parameters
inbound: Clears the statistics of the global QoS policy applied to incoming traffic globally.
outbound: Clears the statistics of the global QoS policy applied to outgoing traffic globally.
Usage guidelines
If you do not specify a direction, this command clears the statistics of the global QoS policies in both directions.
Examples
# Clear the statistics of the QoS policy applied to the incoming traffic globally.
<Sysname> reset qos policy global inbound
reset qos policy l2vpn-ac
Use reset qos policy l2vpn-ac to clear the QoS policies applied to Ethernet service instances.
Syntax
reset qos policy l2vpn-ac [ interface interface-type interface-number [ service-instance instance-id ] ] [ inbound ]
Views
User view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command clears QoS policies applied to Ethernet service instances on all interfaces.
service-instance instance-id: Specifies an Ethernet service instance by its ID in the range of 1 to 4096. If you do not specify an Ethernet service instance, this command clears QoS policies applied to all Ethernet service instances on an interface.
inbound: Specifies the QoS policies applied to incoming traffic.
Usage guidelines
If you do not specify a direction, this command clears the QoS policies applied in the inbound direction.
Examples
# Clear the QoS policies applied to the inbound direction of Ethernet service instance 1 on Twenty-FiveGigE 1/0/1.
<Sysname> reset qos policy l2vpn-ac interface twenty-fivegige 1/0/1 service-instance 1 inbound
Related commands
display qos policy l2vpn-ac
reset qos vlan-policy
Use reset qos vlan-policy to clear the statistics of the QoS policy applied in a certain direction of a VLAN.
Syntax
reset qos vlan-policy [ vlan vlan-id ] [ inbound | outbound ]
Views
User view
Predefined user roles
network-admin
Parameters
vlan vlan-id: Specifies a VLAN ID in the range of 1 to 4094.
inbound: Clears the statistics of the QoS policy applied to the incoming traffic of the specified VLAN.
outbound: Clears the statistics of the QoS policy applied to the incoming traffic of the specified VLAN.
Usage guidelines
If you do not specify a direction, this command clears the statistics of the QoS policies in both directions of the VLAN.
Examples
# Clear the statistics of QoS policies applied to VLAN 2.
<Sysname> reset qos vlan-policy vlan 2
QoS and ACL resource usage displaying commands
display qos-acl resource
Use display qos-acl resource to display QoS and ACL resource usage.
Syntax
display qos-acl resource [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays QoS and ACL resource usage for all member devices.
Usage guidelines
This command does not display any usage data if the specified member device does not support counting QoS and ACL resources.
Examples
# Display QoS and ACL resource usage.
<Sysname> display qos-acl resource
Interfaces: 25GE1/0/1 to 25GE1/0/48, HGE1/0/49 to HGE1/0/56 (slot 1)
---------------------------------------------------------------------
Type Total Reserved Configured Remaining Usage
---------------------------------------------------------------------
T0 TTI0 1024 0 0 1024 0%
T0 EM0 8192 0 0 8192 0%
T0 EM1 8192 0 0 8192 0%
T0 IPCL0+IPCL2 1536 28 0 1508 1%
T0 IPCL1 ACL 512 0 0 512 0%
T0 IPCL Counter 3072 28 0 3044 0%
T0 EPCL ACL 256 0 0 256 0%
T0 EPCL1 ACL 256 0 0 256 0%
T0 EPCL Counter 1024 0 0 1024 0%
T0 IPCL Meter 3584 2 0 3582 0%
T0 EPCL Meter 512 0 0 512 0%
T1 TTI0 1024 0 0 1024 0%
T1 EM0 8192 0 0 8192 0%
T1 EM1 8192 0 0 8192 0%
T1 IPCL0+IPCL2 1536 26 0 1510 1%
T1 IPCL1 ACL 512 0 0 512 0%
T1 IPCL Counter 3072 26 0 3046 0%
T1 EPCL ACL 256 0 0 256 0%
T1 EPCL1 ACL 256 0 0 256 0%
T1 EPCL Counter 1024 0 0 1024 0%
T1 IPCL Meter 3584 2 0 3582 0%
T1 EPCL Meter 512 0 0 512 0%
Table 12 Command output
Field |
Description |
Interfaces |
Interface range for the resources. |
Type |
Resource type. · VFP ACL—ACL resource usage for marking local QoS IDs before Layer 2 forwarding. · IFP ACL—Ingress ACL resources. · IFP Meter—Ingress traffic policing resources. · IFP Counter—Ingress traffic accounting resources. · EFP ACL—Egress ACL resources. · EFP Meter—Egress traffic policing resources. · EFP Counter—Egress traffic accounting resources. |
Total |
Total number of resources. |
Reserved |
Number of reserved resources. |
Configured |
Number of resources that have been applied. |
Remaining |
Number of resources that you can apply. |
Usage |
Configured and reserved resources as a percentage of total resources. If the percentage is not an integer, this field displays the integer part. For example, if the actual usage is 50.8%, this field displays 50%. |
Priority mapping commands
Priority map commands
display qos map-table
Use display qos map-table to display the configuration of priority maps.
Syntax
display qos map-table [ dot1p-dp | dot1p-exp | dot1p-lp | dscp-dot1p | dscp-dp | dscp-dscp ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
The device provides the following types of priority map.
Priority mapping |
Description |
dot1p-dp |
802.1p-drop priority map. |
dot1p-exp |
802.1p-EXP priority map. |
dot1p-lp |
802.1p-local priority map. |
dscp-dot1p |
DSCP-802.1p priority map. |
dscp-dp |
DSCP-drop priority map. |
dscp-dscp |
DSCP-DSCP priority map. |
Usage guidelines
If you do not specify a priority map, this command displays the configuration of all priority maps.
Examples
# Display the configuration of the 802.1p-local priority map.
<Sysname> display qos map-table dot1p-lp
MAP-TABLE NAME: dot1p-lp TYPE: pre-define
IMPORT : EXPORT
0 : 2
1 : 0
2 : 1
3 : 3
4 : 4
5 : 5
6 : 6
7 : 7
Table 14 Command output
Field |
Description |
MAP-TABLE NAME |
Name of the priority map. |
TYPE |
Type of the priority map. |
IMPORT |
Input values of the priority map. |
EXPORT |
Output values of the priority map. |
import
Use import to configure mappings for a priority map.
Use undo import to restore the specified or all mappings to the default for a priority map.
Syntax
import import-value-list export export-value
undo import { import-value-list | all }
Default
The default priority maps are used. For more information, see ACL and QoS Configuration Guide.
Views
Priority map view
Predefined user roles
network-admin
Parameters
import-value-list: Specifies a list of input values.
export-value: Specifies the output value.
all: Restores all mappings in the priority map to the default.
Examples
# Configure the 802.1p-local priority map to map 802.1p priority values 4 and 5 to local priority 1.
<Sysname> system-view
[Sysname] qos map-table dot1p-lp
[Sysname-maptbl-dot1p-lp] import 4 5 export 1
Related commands
display qos map-table
qos map-table
Use qos map-table to enter the specified priority map view.
Syntax
qos map-table { dot1p-dp | dot1p-exp | dot1p-lp | dscp-dot1p| dscp-dp | dscp-dscp }
Views
System view
Predefined user roles
network-admin
Parameters
For the description of other keywords, see Table 13.
Examples
# Enter the 802.1p-local priority map view.
<Sysname> system-view
[Sysname] qos map-table dot1p-lp
[Sysname-maptbl-dot1p-lp]
Related commands
display qos map-table
import
Priority trust mode commands
display qos trust interface
Use display qos trust interface to display the priority trust mode and port priorities of an interface.
Syntax
display qos trust interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the priority trust mode and port priorities of all interfaces.
Examples
# Display the priority trust mode and port priority of Twenty-FiveGigE 1/0/1.
<Sysname> display qos trust interface twenty-fivegige 1/0/1
Interface: Twenty-FiveGigE1/0/1
Port priority trust information
Port priority: 4
Port priority trust type: dscp
Table 15 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Port priority |
Port priority set for the interface. |
Port dscp priority |
DSCP value rewritten for packets. If you have not rewritten the DSCP value of packets, this field displays a hyphen (-). |
Port priority trust type |
Priority trust mode on the interface: · dot1p—Uses the 802.1p priority of received packets for mapping. · dscp—Uses the DSCP precedence of received IP packets for mapping. · none—Trusts no packet priority. |
qos trust
Use qos trust to configure the priority trust mode for an interface.
Use undo qos trust to restore the default.
Syntax
qos trust { dot1p | dscp }
undo qos trust
Default
An interface does not trust any packet priority and uses the port priority as the 802.1p priority for mapping.
Views
Interface view
Predefined user roles
network-admin
Parameters
dot1p: Uses the 802.1p priority in incoming packets for priority mapping.
dscp: Uses the DSCP value in incoming packets for priority mapping.
Examples
# Set the priority trust mode to 802.1p priority on Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos trust dot1p
Related commands
Port priority commands
qos priority
Use qos priority to change the port priority of an interface.
Use undo qos priority to restore the default.
Syntax
qos priority [ dscp ] priority-value
undo qos priority [ dscp ]
Default
The port priority is 0.
Views
Interface view
Predefined user roles
network-admin
Parameters
priority-value: Specifies a priority value. If the dscp keyword is not specified, this argument specifies the port priority in the range of 0 to 7. If the dscp keyword is specified, this argument specifies the DSCP value to be set for packets, in the range of 0 to 63.
Usage guidelines
When no priority trust mode is configured for an interface, the interface uses the port priority as the 802.1p priority for priority mapping. If the qos priority dscp priority-value command is executed, the interface modifies the DSCP value of Layer 3 packets in addition to performing priority mapping.
Examples
# Set the port priority of Twenty-FiveGigE 1/0/1 to 2.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos priority 2
# Set the DSCP port priority of Twenty-FiveGigE 1/0/1 to 20.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos priority dscp 20
Related commands
display qos trust interface
Global priority commands
qos mirroring local-precedence
Use qos mirroring local-precedence to set the local precedence of mirrored packets.
Use undo qos mirroring local-precedence to restore the default.
Syntax
qos mirroring local-precedence local-precedence-value
undo qos mirroring local-precedence
Default
The local precedence of a mirrored packet is 0.
Views
System view
Predefined user roles
network-admin
Parameters
local-precedence-value: Specifies a local precedence value in the range of 0 to 7. The greater the value, the higher the priority.
Usage guidelines
On the mirroring source device, both mirrored packets and service packets might exist on the egress port. To schedule service packets preferentially, execute this command to set the local precedence of mirrored packets to a smaller value, for example, 0. In this case, when congestion occurs, less service packets will be dropped.
This command takes effect on packets mirrored by both port mirroring and flow mirroring.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Set the local precedence of mirrored packets to 5.
<Sysname> system-view
[Sysname] qos mirroring local-precedence 5
GTS and rate limit commands
Traffic policing commands
display qos car interface
Use display qos car interface to display the CAR information for interfaces.
Syntax
display qos car interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the CAR information for all interfaces.
Examples
# Display the CAR information for Twenty-FiveGigE 1/0/1.
<Sysname> display qos car interface twenty-fivegige 1/0/1
Interface: Twenty-FiveGigE1/0/1
Direction: inbound
Rule: If-match any
CIR 128 (kbps), CBS 5120 (Bytes), PIR 128 (kbps), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Direction: outbound
CIR 1000 (kbps), CBS 62500 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Table 16 Command output
Field |
Description |
Interface |
Interface name, including interface type and interface number. |
Direction |
Direction in which traffic policing is applied. |
Rule |
Match criteria. |
Green action |
Action to take on green packets. |
Yellow action |
Action to take on yellow packets. |
Red action |
Action to take on red packets. |
qos car (interface view)
Use qos car to configure a CAR policy on an interface.
Use undo qos car to delete a CAR policy from an interface.
Syntax
qos car { inbound | outbound } any cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ green action | red action | yellow action ] *
qos car { inbound | outbound } any cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ green action | red action | yellow action ] *
undo qos car { inbound | outbound } any
Default
No CAR policy is configured on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Performs CAR for incoming packets on the interface.
outbound: Performs CAR for outgoing packets on the interface.
any: Performs CAR for all IP packets in the specified direction.
cir committed-information-rate: Specifies the CIR in the range of 0 to 4294967294 kbps.
cbs committed-burst-size: Specifies the CBS in bytes, which is the size of bursty traffic when the actual average rate is not greater than the CIR. The value range for committed-burst-size is 0 to 4294967294. The default value is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the EBS in bytes. The value range for excess-burst-size is 0 to 4294967294. The default value is 0.
pir peak-information-rate: Specifies the PIR in kbps. The value range for peak-information-rate is 0 to 4294967294.
green: Specifies the action to take on packets when the traffic rate conforms to the CIR. The default is pass.
red: Specifies the action to take on packets when the traffic rate conforms to neither CIR nor PIR. The default is discard.
yellow: Specifies the action to take on packets when the traffic rate exceeds the CIR but conforms to the PIR. The default is pass.
action: Specifies the action to take on packets:
· continue: Continues to process the packet by using the next CAR policy.
· discard: Drops the packet.
· pass: Permits the packet to pass through.
· remark-dot1p-continue new-cos: Sets the 802.1p priority value of the 802.1p packet to new-cos and continues to process the packet by using the next CAR policy. The new-cos argument is in the range of 0 to 7.
· remark-dot1p-pass new-cos: Sets the 802.1p priority value of the 802.1p packet to new-cos and permits the packet to pass through. The new-cos argument is in the range of 0 to 7.
· remark-dscp-continue new-dscp: Remarks the packet with a new DSCP value and continues to process the packet by using the next CAR policy. The new-dscp argument is in the range of 0 to 63. Alternatively, you can specify the new-dscp argument with af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, or ef.
· remark-dscp-pass new-dscp: Remarks the packet with a new DSCP value and permits the packet to pass through. The new-dscp argument is in the range of 0 to 63. Alternatively, you can specify the new-dscp argument with af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, or ef.
· remark-mpls-exp-continue new-exp: Sets the EXP field value of the MPLS packet to new-exp and continues to process the packet by using the next CAR policy. The new-exp argument is in the range of 0 to 7.
· remark-mpls-exp-pass new-exp: Sets the EXP field value of the MPLS packet to new-exp and permits the packet to pass through. The new-exp argument is in the range of 0 to 7.
· remark-prec-continue new-precedence: Remarks the packet with a new IP precedence and continues to process the packet by using the next CAR policy. The new-precedence argument is in the range of 0 to 7.
· remark-prec-pass new-precedence: Remarks the packet with a new IP precedence and permits the packet to pass through. The new-precedence argument is in the range of 0 to 7.
Usage guidelines
To use two rates for traffic policing, configure the qos car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the qos car command without the pir peak-information-rate option.
You can configure multiple qos car commands on an interface to define multiple CAR policies. These CAR policies are executed in their configuration order.
Examples
# Perform CAR for all packets in the outbound direction of Twenty-FiveGigE 1/0/1. The CAR parameters are as follows:
· CIR is 200 kbps.
· CBS is 5120 bytes.
· EBS is 0.
· Conforming packets are transmitted.
· Excess packets are set with an IP precedence of 0 and transmitted.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos car outbound any cir 200 cbs 5000 ebs 0 green pass red remark-prec-pass 0
Related commands
display qos car interface
qos car (user profile view)
Use qos car to configure a CAR policy for a user profile.
Use undo qos car to delete a CAR policy from a user profile.
Syntax
qos car { inbound | outbound } any cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ]
qos car { inbound | outbound } any cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ]
undo qos car { inbound | outbound } any
Default
No CAR policy is configured.
Views
User profile view
Predefined user roles
network-admin
Parameters
inbound: Performs CAR for incoming traffic.
outbound: Performs CAR for outgoing traffic.
any: Performs CAR for all traffic.
cir committed-information-rate: Specifies the CIR in kbps. The value range for committed-information-rate is 1 to 160000000.
cbs committed-burst-size: Specifies the CBS in bytes, which is the size of bursty traffic when the actual average rate is not greater than the CIR. The value range for committed-burst-size is 512 to 256000000.
ebs excess-burst-size: Specifies the EBS in the range of 0 to 256000000 bytes. The default is 0.
pir peak-information-rate: Specifies the PIR in the range of 1 to 160000000 kbps.
Usage guidelines
To use two rates for traffic policing, configure the qos car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the qos car command without the pir peak-information-rate option.
If you execute the qos car any command multiple times for the same user profile, the most recent configuration takes effect.
The conforming traffic is permitted to pass through, and the excess traffic is dropped.
Examples
# Perform CAR for packets received by user profile user. The CAR parameters are as follows:
· The CIR is 200 kbps.
· The CBS is 51200 bytes.
<Sysname> system-view
[Sysname] user-profile user
[Sysname-user-profile-user] qos car outbound any cir 200 cbs 51200
GTS commands
display qos gts interface
Use display qos gts interface to display the GTS configuration for interfaces.
Syntax
display qos gts interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the GTS configuration and statistics for all interfaces.
Examples
# Display the GTS configuration for all interfaces.
<Sysname> display qos gts interface
Interface: Twenty-FiveGigE1/0/1
Rule: If-match queue 2
CIR 10000 (kbps), CBS 625152 (Bytes)
Table 17 Command output
Field |
Description |
Interface |
Interface name, including the interface type and interface number. |
Rule |
Match criteria. |
CIR |
CIR in kbps. |
CBS |
CBS in bytes. |
qos gts
Use qos gts to set GTS parameters on an interface.
Use undo qos gts to delete the GTS configuration on an interface.
Syntax
qos gts queue queue-id cir committed-information-rate [ cbs committed-burst-size ]
undo qos gts queue queue-id
Default
No GTS parameters are configured on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue queue-id: Shapes the packets in a queue specified by its ID. The value range for queue-id is 0 to 7.
cir committed-information-rate: Specifies the CIR in kbps. The value range for committed-information-rate is 1000 to 104857600.
cbs committed-burst-size: Specifies the CBS in bytes. The value range for committed-burst-size is 512 to 16777216, in increments of 512. The default value for this argument is the product of 62.5 and the CIR and must be an integral multiple of 512. When the product is not an integral multiple of 512, it is rounded up to the nearest integral multiple of 512 that is greater than the product. A default value greater than 16777216 is converted to 16777216.
Examples
# Shape the packets matching ACL 2001 on Twenty-FiveGigE 1/0/1. The GTS parameters are as follows:
· The CIR is 6400 kbps.
· The CBS is 51200 bytes.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos gts acl 2001 cir 6400 cbs 51200
Rate limit commands
display qos lr interface
Use display qos lr interface to display the rate limit configuration for interfaces.
Syntax
display qos lr interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the rate limit configuration for all interfaces.
Examples
# Display the rate limit configuration for all interfaces.
<Sysname> display qos lr interface
Interface: Twenty-FiveGigE1/0/1
Direction: Outbound
CIR 2000 (kbps), CBS 20480 (Bytes)
Table 18 Command output
Field |
Description |
Interface |
Interface name, including the interface type and interface number. |
Direction |
Direction in which the rate limit configuration is applied. |
CIR |
CIR in kbps. |
CBS |
CBS in bytes. |
qos lr
Use qos lr to configure rate limiting on an interface.
Use undo qos lr to delete the rate limit configuration.
Syntax
qos lr { inbound | outbound } cir committed-information-rate [ cbs committed-burst-size ]
undo qos lr { inbound | outbound }
Default
No rate limit is configured on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Limits the rate of incoming packets.
outbound: Limits the rate of outgoing packets.
cir committed-information-rate: Specifies the CIR in kbps. The value range for committed-information-rate is 1000 to 104857600.
cbs committed-burst-size: Specifies the CBS in the range of 512 to 134217728 bytes. The default is the product of 62.5 and the CIR and must be a multiple of 512. When the product is not a multiple of 512, it is rounded up to the nearest integral multiple of 512 that is greater than the product. A default value greater than 134217728 is converted to 134217728.
Examples
# Limit the rate of outgoing packets on Twenty-FiveGigE 1/0/1, with CIR 256 kbps and CBS 51200 bytes.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos lr outbound cir 256 cbs 51200
Congestion management commands
SP commands
display qos queue sp interface
Use display qos queue sp interface to display the SP queuing configuration of an interface.
Syntax
display qos queue sp interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the SP queuing configuration of all interfaces.
Examples
# Display the SP queuing configuration of Twenty-FiveGigE 1/0/1.
<Sysname> display qos queue sp interface twenty-fivegige 1/0/1
Interface: Twenty-FiveGigE1/0/1
Output queue: Strict Priority queuing
Table 19 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Output queue |
Type of the current output queue. |
qos sp
Use qos sp to enable SP queuing on an interface.
Use undo qos sp to restore the default.
Syntax
qos sp
undo qos sp
Default
An interface uses byte-count WRR queuing.
Views
Interface view
Predefined user roles
network-admin
Examples
# Enable SP queuing on Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos sp
Related commands
display qos queue sp interface
WRR commands
display qos queue wrr interface
Use display qos queue wrr interface to display the WRR queuing configuration of an interface.
Syntax
display qos queue wrr interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the WRR queuing configuration of all interfaces.
Examples
# Display the WRR queuing configuration of Twenty-FiveGigE 1/0/1.
<Sysname> display qos queue wrr interface twenty-fivegige 1/0/1
Interface: Twenty-FiveGigE1/0/1
Output queue: Weighted Round Robin queuing
Queue ID Queue name Group Byte count
---------------------------------------------------
0 be 1 1
1 af1 1 2
2 af2 1 3
3 af3 1 4
4 af4 1 5
5 ef 1 9
6 cs6 1 13
7 cs7 1 15
Table 20 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Output queue |
Type of the current output queue. |
Group |
ID of the group a queue is assigned to. |
Byte count |
Byte-count scheduling weight of a queue. N/A is displayed for a queue that uses the SP scheduling algorithm. |
Related commands
qos wrr
qos wrr
Use qos wrr to enable WRR queuing on an interface.
Use undo qos wrr to restore the default.
Syntax
qos wrr byte-count
undo qos wrr byte-count
Default
An interface uses byte-count WRR queuing.
Views
Interface view
Predefined user roles
network-admin
Parameters
byte-count: Allocates bandwidth to queues in bytes.
Usage guidelines
You must use the qos wrr command to enable WRR queuing before you can configure WRR queuing parameters for a queue on an interface.
Examples
# Enable byte-count WRR queuing on Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wrr byte-count
Related commands
display qos queue wrr interface
qos wrr byte-count
Use qos wrr byte-count to configure the WRR queuing parameters for a queue on an interface.
Use undo qos wrr to restore the default.
Syntax
qos wrr queue-id group 1 byte-count schedule-value
undo qos wrr queue-id
Default
All queues on a WRR-enabled interface are in WRR group 1, and queues 0 through 7 have a weight of 1, 2, 3, 4, 5, 9, 13, and 15, respectively.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.
Table 21 The number-keyword map for the queue-id argument
Number |
Keyword |
0 |
be |
1 |
af1 |
2 |
af2 |
3 |
af3 |
4 |
af4 |
5 |
ef |
6 |
cs6 |
7 |
cs7 |
group 1: Specifies WRR group 1. Only WRR group 1 is supported in the current software version.
byte-count: Allocates bandwidth to queues in bytes.
schedule-value: Specifies a scheduling weight. The value range for this argument is 1 to 15.
Usage guidelines
You must use the qos wrr command to enable WRR queuing before you can configure WRR queuing parameters for a queue on an interface.
Examples
# Enable byte-count WRR queuing on Twenty-FiveGigE 1/0/1, assign queue 0 to WRR group 1, and specify scheduling weight 10 for queue 0.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wrr byte-count
[Sysname-Twenty-FiveGigE1/0/1] qos wrr 0 group 1 byte-count 10
Related commands
display qos queue wrr interface
qos wrr
qos wrr group sp
Use qos wrr group sp to assign a queue to the SP group.
Use undo qos wrr group sp to remove a queue from the SP group.
Syntax
qos wrr queue-id group sp
undo qos wrr queue-id
Default
All queues on a WRR-enabled interface are in WRR group 1.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.
Usage guidelines
This command is available only on a WRR-enabled interface. Queues in the SP group are scheduled with SP. The SP group has higher scheduling priority than the WRR groups.
You must use the qos wrr command to enable WRR queuing before you can execute this command on an interface.
Examples
# Enable WRR queuing on Twenty-FiveGigE 1/0/1, and assign queue 0 to the SP group.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wrr 0 group sp
Related commands
display qos queue wrr interface
qos wrr
WFQ commands
display qos queue wfq interface
Use display qos queue wfq interface to display the WFQ configuration of an interface.
Syntax
display qos queue wfq interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the WFQ configuration of all interfaces.
Examples
# Display the WFQ configuration of Twenty-FiveGigE 1/0/1.
<Sysname> display qos wfq interface twenty-fivegige 1/0/1
Interface: Twenty-FiveGigE1/0/1
Output queue: Hardware Weighted Fair Queuing
Queue ID Queue name Group Byte count Min Bandwidth
--------------------------------------------------------------------------------
0 be 1 1 64
1 af1 1 1 64
2 af2 1 1 64
3 af3 1 1 64
4 af4 1 1 64
5 ef 1 1 64
6 cs6 1 1 64
7 cs7 1 1 64
Table 22 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Output queue |
Type of the current output queue. |
Group |
ID of the group that holds the queue. |
Byte-count |
Byte-count scheduling weight of the queue. N/A is displayed for a queue that uses the SP scheduling algorithm. |
Min Bandwidth |
Minimum guaranteed bandwidth for the queue. |
Related commands
qos wfq
qos bandwidth queue
Use qos bandwidth queue to set the minimum guaranteed bandwidth for a queue on an interface.
Use undo qos bandwidth queue to restore the default.
Syntax
qos bandwidth queue queue-id min bandwidth-value
undo qos bandwidth queue queue-id
Default
The minimum guaranteed bandwidth for a queue is 64 kbps.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.
min bandwidth-value: Sets the minimum guaranteed bandwidth in the range of 100 to 100000000 kbps.
Usage guidelines
The minimum guaranteed bandwidth is the amount of bandwidth guaranteed for a queue when the interface is congested.
You must use the qos wfq command to enable WFQ before you can execute this command on an interface.
Examples
# Set the minimum guaranteed bandwidth to 100 kbps for queue 0 on Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos bandwidth queue 0 min 100
Related commands
qos wfq
qos wfq
Use qos wfq to enable WFQ on an interface.
Use undo qos wfq to restore the default.
Syntax
qos wfq byte-count
undo qos wfq byte-count
Default
An interface uses byte-count WRR queuing.
Views
Interface view
Predefined user roles
network-admin
Parameters
byte-count: Allocates bandwidth to queues in bytes.
Usage guidelines
You must use the qos wfq command to enable WFQ before you can configure WFQ queuing parameters for a queue on an interface.
Examples
# Enable byte-count WFQ on Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wfq byte-count
Related commands
display qos queue wfq interface
qos wfq byte-count
Use qos wfq byte-count to assign a queue to a WFQ group with a certain scheduling weight.
Use undo qos wfq to restore the default.
Syntax
qos wfq queue-id group 1 byte-count schedule-value
undo qos wfq queue-id
Default
All queues on a WFQ-enabled interface are in WFQ group 1 and have a weight of 1.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.
group 1: Specifies WFQ group 1. Only WFQ group 1 is supported in the current software version.
byte-count: Allocates bandwidth to queues in bytes.
schedule-value: Specifies a scheduling weight for the specified queue in WFQ queuing. The value range for this argument is 1 to 127.
Usage guidelines
You must use the qos wfq command to enable WFQ before you execute this command.
Examples
# Enable byte-count WFQ on Twenty-FiveGigE 1/0/1, assign queue 0 to WFQ group 1, and specify scheduling weight 10 for queue 0.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wfq byte-count
[Sysname-Twenty-FiveGigE1/0/1] qos wfq 0 group 1 byte-count 10
Related commands
display qos queue wfq interface
qos bandwidth queue
qos wfq
qos wfq group sp
Use qos wfq group sp to assign a queue to the SP group.
Use undo qos wfq group sp to remove a queue from the SP group.
Syntax
qos wfq queue-id group sp
undo qos wfq queue-id
Default
All queues on a WFQ-enabled interface are in WFQ group 1.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7 or keywords in Table 21.
Usage guidelines
This command is available only on a WFQ-enabled interface. Queues in the SP group are scheduled with SP, instead of WFQ. The SP group has higher scheduling priority than the WFQ groups.
You must use the qos wfq command to enable WFQ before you execute this command.
Examples
# Enable WFQ on Twenty-FiveGigE 1/0/1, and assign queue 0 to the SP group.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wfq weight
[Sysname-Twenty-FiveGigE1/0/1] qos wfq 0 group sp
Related commands
display qos queue wfq interface
qos bandwidth queue
qos wfq
Queue scheduling profile commands
display qos qmprofile configuration
Use display qos qmprofile configuration to display the queue scheduling profile configuration.
Syntax
display qos qmprofile configuration [ profile-name ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
profile-name: Specifies a queue scheduling profile by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a queue scheduling profile, this command displays the configuration of all queue scheduling profiles.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays the queue scheduling profile configuration for the master device.
Examples
# Display the configuration of queue scheduling profile myprofile.
<Sysname> display qos qmprofile configuration myprofile
Queue scheduling profile: myprofile (ID 1)
Queue scheduling profile: qm1 (ID 1)
Queue ID Type Group Schedule Schedule Min Max
unit value bandwidth bandwidth
---------------------------------------------------------------------
be SP N/A N/A N/A N/A N/A
af1 SP N/A N/A N/A N/A N/A
af2 SP N/A N/A N/A N/A N/A
af3 SP N/A N/A N/A N/A N/A
af4 SP N/A N/A N/A N/A N/A
ef SP N/A N/A N/A N/A N/A
cs6 SP N/A N/A N/A N/A N/A
cs7 SP N/A N/A N/A N/A N/A
Table 23 Command output
Field |
Description |
Queue management profile |
Queue scheduling profile name. |
Type |
Queue scheduling type: · SP. · WRR. · WFQ. |
Group |
Priority group to which the queue belongs. N/A indicates this field is ignored. |
Schedule unit |
Scheduling unit: weight or byte-count. N/A indicates that this field is ignored. |
Schedule value |
This field indicates: · Number of packets for the weight scheduling unit. · Number of bytes for the byte-count scheduling unit. N/A indicates that this field is ignored. |
Min bandwidth |
Minimum guaranteed bandwidth for the queue. N/A indicates that this field is ignored. |
Max bandwidth |
Maximum allowed bandwidth for the queue. N/A indicates that this field is ignored. |
display qos qmprofile interface
Use display qos qmprofile interface to display the queue scheduling profile applied to an interface.
Syntax
display qos qmprofile interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the queue scheduling profiles applied to all interfaces.
Examples
# Display the queue scheduling profile applied to Twenty-FiveGigE 1/0/1.
<Sysname> display qos qmprofile interface twenty-fivegige 1/0/1
Interface: Twenty-FiveGigE1/0/1
Direction: Outbound
Queue management profile: myprofile
Table 24 Command output
Field |
Description |
Direction |
Direction in which the queue scheduling profile is applied. |
Queue management profile |
Name of the queue scheduling profile applied to the interface. |
Related commands
qos apply qmprofile
qos apply qmprofile
Use qos apply qmprofile to apply a queue scheduling profile to the outbound direction of an interface.
Use undo qos apply qmprofile to restore the default.
Syntax
qos apply qmprofile profile-name
undo qos apply qmprofile
Default
No queue scheduling profile is applied to an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
profile-name: Specifies a queue scheduling profile by its name, a case-sensitive string of 1 to 31 characters.
Usage guidelines
You can apply only one queue scheduling profile to an interface.
Examples
# Apply queue scheduling profile myprofile to the outbound direction of Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos apply qmprofile myprofile
Related commands
display qos qmprofile interface
qos qmprofile
Use qos qmprofile to create a queue scheduling profile and enter its view, or enter the view of an existing queue scheduling profile.
Use undo qos qmprofile to delete a queue scheduling profile.
Syntax
qos qmprofile profile-name
undo qos qmprofile profile-name
Default
No user-created queue scheduling profiles exist.
Views
System view
Predefined user roles
network-admin
Parameters
profile-name: Specifies a name for the queue scheduling profile, a case-sensitive string of 1 to 31 characters.
Usage guidelines
To delete a queue scheduling profile already applied to an object, first remove it from the object.
Examples
# Create a queue scheduling profile named myprofile and enter queue scheduling profile view.
<Sysname> system-view
[Sysname] qos qmprofile myprofile basic
[Sysname-qmprofile-myprofile]
Related commands
display qos qmprofile interface
queue
queue
Use queue to configure queue scheduling parameters.
Use undo queue to delete queue scheduling parameter settings.
Syntax
queue queue-id { sp | wfq group group-id byte-count schedule-value | wrr group group-id byte-count schedule-value }
undo queue queue-id
Default
All queues in a queue scheduling profile are SP queues.
Views
Queue scheduling profile view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.
sp: Enables SP for the queue.
wfq: Enables WFQ for the queue.
wrr: Enables WRR for the queue.
group group-id: Specifies a WFQ or WRR group by its ID. The group ID can only be 1.
byte-count: Allocates bandwidth to queues in bytes.
schedule-value: Specifies the scheduling weight. The value range for this argument is 1 to 15.
Examples
# Create a queue scheduling profile named myprofile, and configure queue 0 to use SP.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] queue 0 sp
# Create a queue scheduling profile named myprofile. Configure queue 1 to meet the following requirements:
· The WRR queuing is used.
· The WRR group is group 1.
· The scheduling weight is 10.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] queue 1 wrr group 1 weight 10
Related commands
display qos qmprofile interface
qos qmprofile
Congestion avoidance commands
WRED commands
display qos wred interface
Use display qos wred interface to display the WRED information for interfaces.
Syntax
display qos wred interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the WRED information for all interfaces.
Examples
# Display the WRED information for all interfaces.
<Sysname> display qos wred interface
Interface: Twenty-FiveGigE1/0/3
Current WRED configuration:
Applied WRED table name: q1
Table 25 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Related commands
qos wred apply
display qos wred table
Use display qos wred table to display the WRED table configuration.
Syntax
display qos wred table [ name table-name ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name table-name: Specifies a WRED table by its name, a case-sensitive string of 1 to 32 characters. If you do not specify a WRED table, this command displays the configuration of all WRED tables.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays the WRED table configuration for the master device.
Examples
# Display the configuration of WRED table 1.
<Sysname> display qos wred table name 1
Table name: 1
Table type: Queue based WRED
QID gmin gmax gpro ymin ymax ypro rmin rmax rpro exp ECN
--------------------------------------------------------------------------------
0 250 1000 10 250 1000 10 250 1000 10 9 N
1 250 1000 10 250 1000 10 250 1000 10 9 N
2 250 1000 10 250 1000 10 250 1000 10 9 N
3 250 1000 10 250 1000 10 250 1000 10 9 N
4 250 1000 10 250 1000 10 250 1000 10 9 N
5 250 1000 10 250 1000 10 250 1000 10 9 N
6 250 1000 10 250 1000 10 250 1000 10 9 N
7 250 1000 10 250 1000 10 250 1000 10 9 N
Table 26 Command output
Field |
Description |
Table name |
Name of a WRED table. |
Table type |
Type of a WRED table. |
QID |
Queue ID. |
gmin |
Lower limit for green packets. |
gmax |
Upper limit for green packets. |
gpro |
Drop probability for green packets. |
ymin |
Lower limit for yellow packets. |
ymax |
Upper limit for yellow packets. |
ypro |
Drop probability for yellow packets. |
rmin |
Lower limit for red packets. |
rmax |
Upper limit for red packets. |
rpro |
Drop probability for red packets. |
exp |
Exponent for average queue length calculation. |
ECN |
Indicates whether ECN is enabled for the queue: · Y—Enabled. · N—Disabled. |
qos wred apply
Use qos wred apply to apply a WRED table to an interface.
Use undo qos wred apply to restore the default.
Syntax
qos wred apply [ table-name ]
undo qos wred apply
Default
No WRED table is applied to an interface, and the tail drop mode is used on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
table-name: Specifies a WRED table by its name, a case-sensitive string of 1 to 32 characters. If you do not specify a WRED table, this command applies the default WRED table to the interface.
Examples
# Apply WRED table table1 to Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wred apply table1
Related commands
display qos wred interface
display qos wred table
qos wred queue table
qos wred ecn enable
Use qos wred ecn enable to enable ECN globally.
Use undo qos wred ecn enable to disable ECN globally.
Syntax
qos wred ecn enable
undo qos wred ecn enable
Default
ECN is disabled globally.
Views
System view
Predefined user roles
network-admin
Usage guidelines
This function enables ECN on all queues configured with WRED parameters. The queues can be queues configured with the qos wred queue commands in interface view and queues configured in a WRED table.
Examples
# Enable ECN globally.
<Sysname> system-view
[Sysname] qos wred ecn enable
Related commands
queue
queue ecn
qos wred queue
qos wred queue ecn
qos wred queue
Use qos wred queue to configure the WRED parameters for a queue.
Use undo qos wred queue to restore the default.
Syntax
qos wred queue queue-id low-limit low-limit high-limit high-limit [ discard-probability discard-prob ] [ ecn ] [ weighting-constant exponent ]
qos wred queue queue-id [ drop-level drop-level ] low-limit low-limit high-limit high-limit [ discard-probability discard-prob ]
undo qos wred queue { queue-id [ drop-level drop-level ] | all }
Default
No WRED parameters are configured.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
low-limit low-limit: Specifies the lower limit for the average queue length. The value range for low-limit 0 to 16000 packets.
high-limit high-limit: Specifies the upper limit for the average queue length. The upper limit must be greater than the lower limit. The value range for high-limit is 0 to 16000 packets.
discard-probability discard-prob: Specifies the denominator for drop probability calculation. The greater the denominator, the greater the calculated drop probability. The value range for discard-prob is 0 to 100.
ecn: Enables ECN.
weighting-constant exponent: Specifies the WRED exponent for average queue length calculation. The value range for exponent is 0 to 15.
drop-level drop-level: Specifies a drop level. This argument is a consideration for dropping packets. The value 0 corresponds to green packets, the value 1 corresponds to yellow packets, and the value 2 corresponds to red packets. If you do not specify a drop level, the subsequent configuration takes effect on the packets in the queue regardless of the drop level.
all: Specifies all queues.
Usage guidelines
When the average queue size is smaller than the lower threshold, no packet is dropped. When the average queue size is between the lower threshold and the upper threshold, the packets are dropped at random. The longer the queue is, the higher the drop probability is. When the average queue size exceeds the upper threshold, subsequent packets are dropped.
Specifying the ecn keyword in this command has the same effect as executing the qos wred queue ecn command.
Specifying the weighting-constant exponent keyword in this command has the same effect as executing the qos wred queue weighting-constant command.
This command and the qos wred apply command are mutually exclusive.
Examples
# Configure the following WRED parameters for in queue 1 on Twenty-FiveGigE 1/0/1:
· The drop level is 1.
· The lower limit for the average queue length is 10.
· The upper limit for the average queue length is 20.
· The drop probability is 30%.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wred queue 1 drop-level 1 low-limit 10 high-limit 20 discard-probability 30
Related commands
display qos wred interface
qos wred queue ecn
qos wred queue ecn
Use qos wred queue ecn to enable ECN for a queue.
Use undo qos wred queue ecn to restore the default.
Syntax
qos wred queue queue-id ecn
undo qos wred queue queue-id ecn
Default
ECN is disabled for a queue.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
Usage guidelines
When both the receiver and sender support ECN, the device can notify the peer end of the congestion status by identifying and setting the ECN flag. ECN avoids deteriorating congestion.
Executing this command has the same effect as specifying the ecn keyword in the qos wred queue command.
Examples
# Enable ECN for queue 1 on Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wred queue 1 ecn
Related commands
display qos wred interface
qos wred queue
qos wred queue table
Use qos wred queue table to create a WRED table and enter its view, or enter the view of an existing WRED table.
Use undo qos wred queue table to delete a WRED table.
Syntax
qos wred queue table table-name
undo qos wred queue table table-name
Default
No WRED tables exist.
Views
System view
Predefined user roles
network-admin
Parameters
table table-name: Specifies a name for the WRED table, a case-sensitive string of 1 to 32 characters.
Usage guidelines
You cannot delete a WRED table in use. To delete it, first remove it from the specified interface.
You can use the display qos wred table command to display the default WRED table, which cannot be modified or deleted.
Examples
# Create a queue-based WRED table named queue-table1.
<Sysname> system-view
[Sysname] qos wred queue table queue-table1
[Sysname-wred-table-queue-table1]
Related commands
display qos wred table
qos wred queue weighting-constant
Use qos wred queue weighting-constant to specify an exponent for average queue length calculation for a queue.
Use undo qos wred queue weighting-constant to restore the default.
Syntax
qos wred queue queue-id weighting-constant exponent
undo qos wred queue queue-id weighting-constant
Default
The exponent for average queue length calculation is 9 for a queue.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
weighting-constant exponent: Specifies the WRED exponent for average queue length calculation in the range of 0 to 15.
Usage guidelines
The bigger the exponent is, the less sensitive the average queue size is to real-time queue size changes. The average queue size is calculated using the formula:
Average queue size = previous average queue size × (1-2-n) + current queue size × 2-n,
where n can be configured with the qos wred weighting-constant command.
Executing this command has the same effect as specifying the weighting-constant exponent option in the qos wred queue command.
Examples
# Set the exponent for average queue length calculation to 12 for queue 1 on Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] qos wred queue 1 weighting-constant 12
Related commands
display qos wred interface
qos wred queue
queue (WRED table view)
Use queue to configure the drop-related parameters for a queue in the queue-based WRED table.
Use undo queue to restore the default.
Syntax
queue queue-id [ drop-level drop-level ] low-limit low-limit high-limit high-limit [ discard-probability discard-prob ]
undo queue { queue-id [ drop-level drop-level ] | all }
Default
The lower limit is 100, the upper limit is 1000, and the drop probability denominator is 10.
Views
WRED table view
Predefined user roles
network-admin
Parameters
all: Specifies all queues.
queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.
drop-level drop-level: Specifies a drop level. This argument is a consideration for dropping packets. The value 0 corresponds to green packets, the value 1 corresponds to yellow packets, and the value 2 corresponds to red packets. If you do not specify a drop level, the subsequent configuration takes effect on the packets in the queue regardless of the drop level.
low-limit low-limit: Specifies the lower limit for the average queue length. The value range for low-limit is 0 to 16000 cell resources.
high-limit high-limit: Specifies the upper limit for the average queue length. The upper limit must be greater than the lower limit. The value range for high-limit is 0 to 16000 cell resources.
discard-probability discard-prob: Specifies the denominator for drop probability calculation. The greater the denominator, the greater the calculated drop probability. The value range for discard-prob is 0 to 100.
Usage guidelines
When the average queue size is smaller than the lower threshold, no packet is dropped. When the average queue size is between the lower threshold and the upper threshold, the packets are dropped at random. The longer the queue is, the higher the drop probability is. When the average queue size exceeds the upper threshold, subsequent packets are dropped.
To use tail drop for a queue, set the lower limit and upper limit to the same value.
Examples
# In queue-based WRED table queue-table1, configure the following drop-related parameters for packets in queue 1:
· The drop level is 1.
· The lower limit for the average queue length is 10.
· The upper limit for the average queue length is 20.
· The drop probability is 30%.
<Sysname> system-view
[Sysname] qos wred queue table queue-table1
[Sysname-wred-table-queue-table1] queue 1 drop-level 1 low-limit 10 high-limit 20 discard-probability 30
Related commands
display qos wred table
qos wred queue table
queue ecn
Use queue ecn to enable ECN for a queue.
Use undo queue ecn to restore the default.
Syntax
queue queue-id ecn
undo queue queue-id ecn
Default
ECN is disabled for a queue.
Views
WRED table view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
Usage guidelines
When both the receiver and sender support ECN, the device can notify the peer end of the congestion status by identifying and setting the ECN flag. ECN avoids deteriorating congestion.
Examples
# In WRED table queue-table1, enable ECN for queue 1.
<Sysname> system-view
[Sysname] qos wred queue table queue-table1
[Sysname-wred-table-queue-table1] queue 1 ecn
Related commands
display qos wred table
qos wred queue table
queue weighting-constant
Use queue weighting-constant to specify an exponent for average queue length calculation for a queue.
Use undo queue weighting-constant to restore the default.
Syntax
queue queue-id weighting-constant exponent
undo queue queue-id weighting-constant
Default
The exponent for average queue length calculation is 9.
Views
WRED table view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.
weighting-constant exponent: Specifies the WRED exponent for average queue length calculation. The value range for exponent is 0 to 15.
Usage guidelines
The bigger the exponent is, the less sensitive the average queue size is to real-time queue size changes. The average queue size is calculated using the formula:
Average queue size = previous average queue size × (1-2-n) + current queue size × 2-n,
where n can be configured with the qos wred weighting-constant command.
Examples
# In WRED table queue-table1, set the exponent for average queue length calculation to 12 for queue 1.
<Sysname> system-view
[Sysname] qos wred queue table queue-table1
[Sysname-wred-table-queue-table1] queue 1 weighting-constant 12
Related commands
display qos wred table
qos wred queue table
Elephant and mice flows distinguishing commands
The S5580S-EI and S5580X-EI switch series do not support this feature.
elephant-flow action
Use elephant-flow action to configure an action to take on elephant flows.
Use undo elephant-flow action to restore the default.
Syntax
elephant-flow action { drop-precedence drop-precedence-value | dot1p dot1p-value | local-precedence local-precedence-value | none }
undo elephant-flow action
Default
No action is configured for elephant flows.
Views
Elephant/mice flow view
Predefined user roles
network-admin
Parameters
drop-precedence drop-precedence-value: Specifies a drop precedence value in the range of 0 to 2.
dot1p dot1p-value: Specifies an 802.1p priority value in the range of 0 to 7.
local-precedence local-precedence-value: Specifies a local precedence value in the range of 0 to 7.
none: Takes no action.
Examples
# Specify drop precedence 2 for elephant flows.
<Sysname> system-view
[Sysname] qos mice-elephant-flow
[Sysname-mice-elephant-flow] elephant-flow action drop-precedence 2
Related commands
elephant-flow rate
elephant-flow rate
Use elephant-flow rate to configure the traffic thresholds to identify elephant flows.
Use undo elephant-flow rate to remove traffic threshold settings.
Syntax
elephant-flow rate rate [ gbps | kbps | mbps ] [ size size [ bytes | kbytes | mbytes ] ]
undo elephant-flow rate
Default
No traffic thresholds are configured.
Views
Elephant/mice flow view
Predefined user roles
network-admin
Parameters
rate [ gbps | kbps | mbps ]: Specifies the traffic rate threshold in Gbps, kbps, or Mbps. The default unit is kbps. The value range for the rate argument is 1 to 1000.
size size [ bytes | kbytes | mbytes ]: Specifies the traffic size threshold in bytes, KB, or MB. The default unit is byte. The value range for the size argument is 1 to 1000.
Usage guidelines
The device assigns the drop precedence value specified the elephant-flow action command to the identified elephant flows and keeps the drop precedence of mice flows unchanged. When congestion occurs, packets with a lower or no drop precedence are preferentially forwarded.
Examples
# Specify the traffic thresholds as 20 kbps and 100 KB for identifying elephant flows.
<Sysname> system-view
[Sysname] qos mice-elephant-flow
[Sysname-mice-elephant-flow] elephant-flow rate 20 kbps size 100 kbytes
Related commands
elephant-flow action
qos mice-elephant-flow
Use qos mice-elephant-flow to enter elephant/mice flow view.
Syntax
qos mice-elephant-flow
Views
System view
Predefined user roles
network-admin
Examples
# Enter elephant/mice flow view.
<Sysname> system-view
[Sysname] qos mice-elephant-flow
[Sysname-mice-elephant-flow]