- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-QoS commands | 448.15 KB |
Contents
display qos policy control-plane
display qos policy control-plane pre-defined
qos apply policy(interface view, control plane view)
reset qos policy control-plane
Hardware congestion management commands
display qos queue sp interface
display qos queue wrr interface
qos wrr { byte-count | weight }
display qos queue wfq interface
qos wfq { byte-count | weight }
Queue-based accounting commands
Interface queue-based traffic statistics commands
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 ] { acl-number | name acl-name } |
Matches an ACL. The following are available value ranges for the acl-number argument: · 2000 to 2999 for basic ACLs. · 3000 to 3999 for advanced 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. If no VPN instance is specified in an ACL rule, the rule applies only to non-VPN packets. |
any |
Matches all IP packets. |
control-plane protocol protocol-name&<1-8> |
Matches control plane protocols. The protocol-name&<1-8> argument specifies a space-separated list of up to eight system-defined control plane protocols. For available system-defined control plane protocols, see Table 3. This option matches only protocol packets that use a well-known port number as the destination port number. |
control-plane protocol-group protocol-group-name |
Matches a control plane protocol group. The protocol-group-name argument can be critical, important, management, monitor, normal, or redirect. |
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. |
destination-mac mac-address |
Matches a destination MAC address. This option takes effect only on Ethernet interfaces. |
[ ipv6 ] dscp dscp-value&<1-8> |
Matches DSCP values. If you specify the ipv6 keyword, this option matches the DSCP value of only IPv6 packets. If you do not specify the ipv6 keyword, this option matches the DSCP value of both IPv4 packets and IPv6 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 5. |
[ ipv6 ] ip-precedence ip-precedence-value&<1-8> |
Matches IP precedence values. If you specify the ipv6 keyword, this option matches the IP precedence value of only IPv6 packets. If you do not specify the ipv6 keyword, this option matches the IP precedence value of both IPv4 packets and IPv6 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. |
mpls-exp exp-value&<1-8> |
Matches MPLS EXP values. The exp-value&<1-8> argument specifies a space-separated list of up to eight EXP values. The value range for the exp-value argument is 0 to 7. |
protocol protocol-name |
Matches a protocol. The protocol-name argument can be ipv6 or ip. |
service-dot1p dot1p-value&<1-8> |
Matches 802.1p priority values in outer VLAN tags. The dot1p-value&<1-8> argument is a space-separated list of up to eight 802.1p priority values. The value range for the dot1p-value argument is 0 to 7. |
source-mac mac-address |
Matches a source MAC address. This option takes effect only on Ethernet interfaces. |
Table 3 Available system-defined control plane protocols
Protocol |
Description |
default |
Protocol packets other than the following packet types |
arp-snooping |
ARP snooping packets |
bfd |
BFD packets |
bgp |
BGP packets |
bgp4+ |
IPv6 BGP packets |
bpdu-tunnel |
BPDU tunnel packets |
dhcp |
DHCP packets |
dhcp-snooping |
DHCP snooping packets |
dhcpv6 |
IPv6 DHCP packets |
dldp |
DLDP packets |
dot1x |
802.1X packets |
drcp |
DRCP packets |
ftp |
FTP packets |
gmrp |
GMRP packets |
hoplimit-expires |
Hop-limit expire packets |
http |
HTTP packets |
https |
HTTPS packets |
icmp |
ICMP packets |
icmpv6 |
ICMPv6 packets |
igmp |
IGMP packets |
ip-option |
IPv4 packets with the Options field |
ipv6-option |
IPv6 packets with the Options field |
isis |
IS-IS packets |
lacp |
LACP packets |
ldp |
LDP packets |
ldp6 |
IPv6 LDP packets |
lldp |
LLDP packets |
msdp |
MSDP packets |
ntp |
NTP packets |
ospf-multicast |
OSPF multicast packets |
ospf-unicast |
OSPF unicast packets |
ospf3-multicast |
OSPFv3 multicast packets |
ospf3-unicast |
OSPFv3 unicast packets |
pim-multicast |
PIM multicast packets |
pim-unicast |
PIM unicast packets |
pim6-multicast |
IPv6 PIM multicast packets |
pim6-unicast |
IPv6 PIM unicast packets |
radius |
RADIUS packets |
rsvp |
RSVP packets |
snmp |
SNMP packets |
ssh |
SSH packets |
stp |
STP packets |
tacacs |
TACACS packets |
telnet |
Telnet packets |
tftp |
TFTP packets |
vrrp |
VRRP packets |
vrrp6 |
IPv6 VRRP packets |
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:
¡ Control plane protocol.
¡ 802.1p priority.
¡ DSCP.
¡ IP precedence.
¡ MPLS EXP.
¡ MPLS label.
¡ 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.
When you configure ACL-based match criteria, follow these restrictions and guidelines:
· The ACL used as a match criterion must already exist.
· In a traffic class, you can add two if-match statements that use the same ACL as the match criterion. In one statement, specify the ACL by its name. In the other statement, specify the ACL by its number.
· Before defining a criterion to match the inner packet information of VXLAN packets in a traffic class, you must use the if-match vxlan command to define a VXLAN ID match criterion.
· If the ACL contains deny rules, 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.
You can use both AND and OR operators to define the match relationships between the criteria for a class. For example, you can define relationships among three match criteria in traffic class classA as follows:
traffic classifier classB operator and
if-match criterion 1
if-match criterion 2
traffic classifier classA operator or
if-match criterion 3
if-match classifier classB
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 the 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 the 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 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 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 NQA TCP packets.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match control-plane protocol nqa-tcp
# Define a match criterion for traffic class class1 to match packets of the protocols in protocol group normal.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match control-plane protocol-group normal
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
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 0 to 160000000 kbps, in increments of 20.
cbs committed-burst-size: Specifies the committed burst size (CBS) in the range of 512 to 256000000 bytes, in increments of 512.
ebs excess-burst-size: Specifies the excess burst size (EBS) in the range of 0 to 256000000 bytes, in increments of 512.
pir peak-information-rate: Specifies the peak information rate (PIR) in the range of 20 to 160000000 kbps, in increments of 20. The PIR must be greater than or equal to the CIR.
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.
· discard: Drops the packet. This keyword is not supported in the current software version.
· pass: Permits the packet to pass through.
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.
A QoS policy that uses a traffic behavior configured with CAR can be applied only in the inbound direction of an interface.
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 240 kbps and CBS to 51200 bytes.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] car cir 240 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 200 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Behavior: 2 (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. |
Assured Forwarding |
Assure forwarding (AF) information. |
Bandwidth |
Bandwidth of the queue. |
Filter enable |
Traffic filtering action. |
Remark mpls-exp |
Action of setting the MPLS EXP value for packets. |
Expedited Forwarding |
Expedited forwarding (EF) information. |
none |
No other traffic behavior is configured. |
Exponential Weight |
Exponent for average queue size calculation. |
Pre |
IP precedence. |
Low |
Lower threshold of the queue. |
High |
Upper threshold of the queue. |
Dis-prob |
Denominator for drop probability calculation. |
Cascade CAR name |
Multi-level CAR action name. |
Level |
Level of a CAR statement in the multi-level CAR action. |
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.
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
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 1048575 packets per second (pps).
Usage guidelines
Protocol packet rate limiting can protect the CPU against protocol packet attacks.
If you execute this 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
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 drop priority marking action takes effect only when the QoS policy is applied to the inbound direction.
If you execute this 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 restore the default.
Syntax
remark dscp dscp-value
undo remark dscp
Default
No DSCP marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
dscp-value: Specifies a DSCP value, which can be a number from 0 to 63 or a keyword in Table 5.
Table 5 DSCP keywords and values
Keyword |
DSCP value (binary) |
DSCP value (decimal) |
default |
000000 |
0 |
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 |
ef |
101110 |
46 |
Usage guidelines
If you execute the remark dscp command multiple times in the same traffic behavior, the most recent configuration takes effect.
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 ip-precedence
Use remark ip-precedence to configure an IP precedence marking action in a traffic behavior.
Use undo remark ip-precedence to restore the default.
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.
Usage guidelines
If you execute the remark ip-precedence command multiple times in the same traffic behavior, the most recent configuration takes effect.
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 restore the default.
Syntax
remark local-precedence local-precedence-value
undo remark local-precedence
Default
No local precedence marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
local-precedence-value: Specifies the local precedence to be marked for packets, in the range of 0 to 7.
Usage guidelines
By marking the local precedence, you assign matching packets to the queue corresponding to the local precedence value. You can use the display qos queue-statistics interface outbound command to display outgoing traffic statistics collected for interfaces on a per-queue basis. The outgoing traffic statistics are displayed only if you have enabled queue-based traffic accounting in the outbound direction and set the packet counting mode to queue.
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
Related commands
display qos queue-statistics interface outbound
display statistic mode
statistic mode queue
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 ] *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.
If the specified traffic class or traffic behavior does not exist, the system defines a null traffic class or traffic behavior.
The undo classifier default-class command performs the following operations:
· Deletes the existing class-behavior association for the system-defined class default-class.
· Associates the system-defined class default-class with the system-defined behavior be.
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.
Usage guidelines
A QoS policy applied in control plane view takes effect on all packets to the control plane except the packets sent from the management interface.
Examples
# Enter the control plane view of slot 1.
<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 200 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Classifier: 2 (ID 101)
Behavior: 2
Filter enable: Permit
Marking:
Remark mpls-exp 4
Classifier: 3 (ID 102)
Behavior: 3
-none-
Table 6 Command output
Field |
Description |
User-defined QoS policy information |
Information about user-defined QoS policies. |
Policy |
User-defined QoS policy name or system-defined QoS policy name. |
For the description of other fields, see Table 1 and Table 4.
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 200 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Yellow packets: 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Red packets : 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Classifier: 2
Operator: AND
Rule(s) :
If-match not protocol ipv6
Behavior: 2
Filter enable: Permit
Marking:
Remark mpls-exp 4
Classifier: 3
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 7 Command output
Field |
Description |
Direction |
Inbound direction on the control plane. |
Green packets |
Total number of bytes for green packets and average rate of green packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Yellow packets |
Total number of bytes for yellow packets and average rate of yellow packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Red packets |
Total number of bytes for red packets and average rate of red packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
For the description of other fields, see Table 1 and Table 4.
display qos policy control-plane pre-defined
Use display qos policy control-plane pre-defined to display predefined control plane QoS policies of cards.
Syntax
display qos policy control-plane pre-defined [ 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 predefined control plane QoS policies for all member devices.
Examples
# Display the predefined control plane QoS policy of slot 3.
<Sysname> display qos policy control-plane pre-defined slot 1
Pre-defined control plane policy slot 1
Protocol Priority Bandwidth Group
Default N/A 100000 (kbps) N/A
BGP N/A 100000 (kbps) critical
BGPv6 N/A 100000 (kbps) critical
HTTP N/A 100000 (kbps) management
HTTPS N/A 100000 (kbps) management
ICMP N/A 100000 (kbps) monitor
ICMPv6 N/A 100000 (kbps) monitor
IGMP N/A 100000 (kbps) important
IS-IS N/A 100000 (kbps) critical
LDP N/A 100000 (kbps) critical
LDPv6 N/A 100000 (kbps) critical
MSDP N/A 100000 (kbps) critical
NTP N/A 100000 (kbps) important
OSPF Multicast N/A 100000 (kbps) critical
OSPF Unicast N/A 100000 (kbps) critical
OSPFv3 Multicast N/A 100000 (kbps) critical
OSPFv3 Unicast N/A 100000 (kbps) critical
PIM Multicast N/A 100000 (kbps) critical
PIM Unicast N/A 100000 (kbps) critical
PIMv6 Multicast N/A 100000 (kbps) critical
PIMv6 Unicast N/A 100000 (kbps) critical
RADIUS N/A 100000 (kbps) management
Table 8 Command output
Field |
Description |
Pre-defined control plane policy |
Contents of the pre-defined control plane QoS policy. |
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 globally.
outbound: Specifies the QoS policy applied in the outbound direction globally.
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 QoS policies applied globally.
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 200 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Yellow packets: 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Red packets : 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Classifier: 2
Operator: AND
Rule(s) :
If-match not protocol ipv6
Behavior: 2
Filter enable: Permit
Marking:
Remark mpls-exp 4
Classifier: 3
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 9 Command output
Field |
Description |
Direction |
Direction (inbound or outbound ) in which the QoS policy is applied. |
Policy |
User-defined QoS policy name. |
Accounting policy |
This field is not supported in the current software version. User-defined accounting-type QoS policy name. |
Green packets |
Total number of bytes for green packets and average rate of green packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Yellow packets |
Total number of bytes for yellow packets and average rate of yellow packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Red packets |
Total number of bytes for red packets and average rate of red packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
For the description of other fields, see Table 1 and Table 4.
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. If you do not specify an interface, this command displays QoS policies applied to all interfaces.
inbound: Specifies the QoS policies applied to the inbound direction.
outbound: Specifies the QoS policies applied to the outbound direction.
Usage guidelines
If you do not specify a direction, this command displays both the QoS policies applied to the inbound direction and the QoS policies applied to the outbound direction.
Examples
# Display the QoS policy applied to the incoming traffic of GigabitEthernet 1/0/12.
<Sysname> display qos policy interface gigabitethernet 1/0/12 inbound
Interface: GigabitEthernet1/0/12
Direction: Inbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 200 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Yellow packets: 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Red packets : 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Classifier: 2
Operator: AND
Rule(s) :
If-match not protocol ipv6
Behavior: 2
Filter enable: Permit
# Display the QoS policies applied to all interfaces.
<Sysname> display qos policy interface
Interface: GigabitEthernet1/0/12
Direction: Inbound
Policy: a
Classifier: a
Operator: AND
Rule(s) :
If-match any
Behavior: a
Committed Access Rate:
CIR 200 (kbps), CBS 5120 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
0 (pps) 0 (bps)
Red packets : 0 (Packets)
0 (pps) 0 (bps)
Interface: GigabitEthernet1/0/14
Direction: Inbound
Policy: b
Classifier: b
Operator: AND
Rule(s) :
If-match any
Behavior: b
Committed Access Rate:
CIR 200 (kbps), CBS 51200 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0(Packets)
0 (pps) 0 (bps)
Red packets : 0 (Packets)
0 (pps) 0 (bps)
Interface: GigabitEthernet1/0/15
Direction: Inbound
Policy: a
Classifier: a
Operator: AND
Rule(s) :
If-match any
Behavior: a
Committed Access Rate:
CIR 200 (kbps), CBS 5120 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
0 (pps) 0 (bps)
Red packets : 0 (Packets)
0 (pps) 0 (bps)
Table 10 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied to the interface. |
Policy |
User-defined generic QoS policy name. |
Matched |
Number of matching packets. |
Forwarded |
Average rate of successfully forwarded matching packets in a statistics collection period. |
Dropped |
Average rate of dropped matching packets in a statistics collection period. |
Green packets |
Total number of packets for green packets and average rate of green packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). The statistics in pps and in bps are not supported in the current software version. |
Yellow packets |
Total number of packets for yellow packets and average rate of yellow packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). The statistics in pps and in bps are not supported in the current software version. |
Red packets |
Total number of packets for red packets and average rate of red packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). The statistics in pps and in bps are not supported in the current software version. |
For the description of other fields, see Table 1 and Table 4.
qos apply policy(interface view, control plane view)
Use qos apply policy to apply a QoS policy to an 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
Predefined user roles
network-admin
Parameters
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 when executing the undo qos apply policy command on an interface, all applied QoS policies will be removed from the interface. You must specify a QoS policy when executing the undo qos apply policy command on any other object.
inbound: Applies the QoS policy to the inbound direction.
outbound: Applies the QoS policy to the outbound direction. This keyword is not supported in control plane view.
Usage guidelines
A QoS policy applied to an aggregate interface does not take effect.
You can use the following commands to match protocol packets sent to the CPU for a QoS policy applied to a control plane:
· if-match control-plane protocol
· if-match control-plane protocol-group
· if-match acl
When you use the if-match acl command to match protocol packets sent to the CPU, follow these restrictions and guidelines:
¡ The used ACL must be an advanced ACL.
¡ You must specify TCP or UDP for the protocol argument in the rule.
¡ You must specify a source port or destination port by using the eq operator in the rule.
For example, an IPv4 advanced ACL that contains a rule permit tcp source-port eq 80 statement can match TCP packets sent to the CPU.
Examples
# Apply QoS policy USER1 to the incoming traffic of GigabitEthernet 1/0/12.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos apply policy USER1 inbound
# Apply QoS policy aaa to the incoming traffic of the control plane of slot 3.
<Sysname> system-view
[Sysname] control-plane slot 3
[Sysname-cp-slot3] qos apply policy aaa inbound
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 inbound direction.
outbound: Applies the QoS policy to the outbound direction.
Usage guidelines
A QoS policy applied globally takes effect on traffic of all interfaces.
# 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
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 for QoS policies applied globally.
Syntax
reset qos policy global [ inbound | outbound ]
Views
User view
Predefined user roles
network-admin
Parameters
inbound: Specifies the QoS policy applied to the inbound direction globally.
outbound: Specifies the QoS policy applied to the outbound direction globally.
Usage guidelines
If you do not specify a direction, this command clears the statistics for both QoS policies applied globally.
Examples
# Clear the statistics for the generic QoS policy applied to the incoming traffic globally.
<Sysname> reset qos policy global inbound
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-exp | dot1p-lp | dscp-exp | dscp-lp | exp-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-exp |
802.1p-EXP priority map. |
dot1p-lp |
802.1p-local priority map. |
dscp-exp |
DSCP-EXP priority map. |
dscp-lp |
DSCP-local priority map. |
exp-dscp |
EXP-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
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 12 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 (priority map view)
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.
Usage guidelines
If you have configured a priority map and applied the flexible priority map to an interface, the flexible priority map takes priority on the interface.
Examples
# Configure the 802.1p-drop priority map to map 802.1p priority values 4 and 5 to drop priority 1.
<Sysname> system-view
[Sysname] qos map-table dot1p-dp
[Sysname-maptbl-dot1p-dp] 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-exp | dot1p-lp | dscp-exp | dscp-lp | exp-dscp }
Views
System view
Predefined user roles
network-admin
Parameters
For the description of other keywords, see Table 11.
Examples
# Enter the 802.1p-EXP priority map view.
<Sysname> system-view
[Sysname] qos map-table dot1p-exp
[Sysname-maptbl-dot1p-exp]
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 GigabitEthernet 1/0/12.
<Sysname> display qos trust interface gigabitethernet 1/0/12
Interface: GigabitEthernet1/0/12
Port priority trust information
Port priority:4
Port priority trust type: dscp
Table 13 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Port priority |
Port priority set for the interface. |
Port priority trust type |
Priority trust mode on the interface: dot1p, dscp, inner-dot1por none. If the trust mode is none, the port priority is used for priority mapping. |
Override |
Indicates whether the precedence derived through priority mapping overwrites the original precedence carried in the packet. |
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 | inner-dot1p }
undo qos trust
Default
An interface trusts the port priority.
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 GigabitEthernet 1/0/12.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] 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 priority-value
undo qos priority
Default
The port priority is 0.
Views
Interface view
Predefined user roles
network-admin
Parameters
priority-value: Specifies the port priority value.
The port priority is in the range of 0 to 7.
Usage guidelines
This command is not supported on an aggregate interface.
Examples
# Set the port priority of GigabitEthernet 1/0/12 to 2.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos priority 2
Related commands
display qos trust interface
GTS and rate limit commands
GTS commands
display qos gts interface
Use display qos gts interface to display the GTS information 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 information for all interfaces.
Examples
# Display the GTS information for all interfaces.
<Sysname> display qos gts interface
Interface: GigabitEthernet1/0/12
Rule: If-match acl 2001
CIR 200 (kbps), CBS 51200 (Bytes)
Table 14 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 (interface view)
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.
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 8 to interface bandwidth, in increments of 8.
cbs committed-burst-size: Specifies the CBS in the range of 512 to 16000000 bytes, in increments of 512.
Examples
# Shape the packets in queue 1 on GigabitEthernet 1/0/1. The GTS parameters are as follows:
· The CIR is 200 kbps.
· The CBS is 1024 bytes.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos gts queue 1 cir 200 cbs 1024
Rate limit commands
display qos lr
Use display qos lr to display the rate limit information for interfaces.
Syntax
display qos lr 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 rate limit information for all interfaces.
Examples
# Display the rate limit information for all interfaces.
<Sysname> display qos lr interface
Interface: GigabitEthernet1/0/12
Direction: Outbound
CIR 2000 (kbps), CBS 51200 (Bytes)
Table 15 Command output
Field |
Description |
Interface |
Interface name, including the interface type and interface number. |
Direction |
Direction to which the rate limit configuration is applied: Outbound. |
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 on an interface.
Syntax
qos lr outbound cir committed-information-rate [ cbs committed-burst-size ]
undo qos lr outbound
Default
No rate limit is configured.
Views
Interface view
Predefined user roles
network-admin
Parameters
outbound: Limits the rate in the outbound direction.
cir committed-information-rate: Specifies the CIR in the range of 8 kbps to interface bandwidth in increments of 8.
cbs committed-burst-size: Specifies the CBS in the range of 512 to 16777216 bytes, in increments of 512.
Usage guidelines
This command is not supported on subinterfaces.
Examples
# Limit the rate of outgoing packets on GigabitEthernet 1/0/12, with CIR 200 kbps and CBS 51200 bytes.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos lr outbound cir 200 cbs 51200
Hardware 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 for all interfaces.
Examples
# Display the SP queuing configuration of GigabitEthernet 1/0/12.
<Sysname> display qos queue sp interface gigabitethernet 1/0/12
Interface: GigabitEthernet1/0/12
Output queue: Strict Priority queuing
Table 16 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 SP queuing.
Views
Interface view
Predefined user roles
network-admin
Examples
# Enable SP queuing on GigabitEthernet 1/0/12.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] 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 SP queuing configuration for all interfaces.
Examples
# Display the WRR queuing configuration of GigabitEthernet 1/0/12.
<Sysname> display qos queue wrr interface gigabitethernet 1/0/12
Interface: GigabitEthernet1/0/12
Output queue: Weighted Round Robin queuing
Queue ID Queue name Group Weight
--------------------------------------------------------
0 be 1 1
1 af1 1 1
2 af2 1 1
3 af3 1 1
4 af4 1 1
5 ef 1 1
6 cs6 1 1
7 cs7 sp N/A
Table 17 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Output queue |
Type of the current output queue. |
Group |
Number of the group a queue is assigned to. |
Weight |
Packet-based queue scheduling weight of a queue. N/A is displayed for a queue that uses the SP scheduling algorithm. |
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 | weight }
undo qos wrr { byte-count | weight }
Default
An interface uses SP queuing.
Views
Interface view
Predefined user roles
network-admin
Parameters
byte-count: Allocates bandwidth to queues in bytes.
weight: Allocates bandwidth to queues in packets.
Usage guidelines
You must enable WRR queuing before you can configure WRR queuing parameters for a queue on an interface.
Examples
# Enable weight-based WRR queuing on GigabitEthernet 1/0/12.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos wrr weight
# Enable byte-count WRR queuing on GigabitEthernet 1/0/12.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos wrr byte-count
Related commands
display qos queue wrr interface
qos wrr { byte-count | weight }
Use qos wrr { byte-count | weight } to configure the WRR queuing parameters for a queue on an interface.
Use undo qos wrr to restore the default for a queue.
Syntax
qos wrr queue-id group 1 { byte-count | weight } schedule-value
undo qos wrr queue-id
Default
All queues on a WRR-enabled interface belong to WRR group 1, and the scheduling weight of a queue is its queue ID plus 1.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
group 1: Specifies WRR group 1.
byte-count: Allocates bandwidth to queues in bytes.
weight: Allocates bandwidth to queues in packets.
schedule-value: Specifies a scheduling weight in the range of 1 to 127.
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.
The queue-id argument can be either a number or a keyword. Table 18 shows the number-keyword map.
Table 18 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 |
Examples
# Enable byte-count WRR queuing on GigabitEthernet 1/0/12, and assign queue 0, with the scheduling weight 100, to WRR group 1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos wrr byte-count
[Sysname-GigabitEthernet1/0/12] qos wrr 0 group 1 byte-count 100
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 belong to WRR group 1, and the scheduling weight of a queue is its queue ID plus 1.
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
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 configure this command on an interface.
The queue-id argument can be either a number or a keyword. Table 18 shows the number-keyword map.
Examples
# Enable WRR queuing on GigabitEthernet 1/0/12, and assign queue 0 to the SP group.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos wrr weight
[Sysname-GigabitEthernet1/0/12] 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 SP queuing configuration for all interfaces.
Examples
# Display the WFQ configuration of GigabitEthernet 1/0/12.
<Sysname> display qos wfq interface gigabitethernet 1/0/12
Interface: GigabitEthernet1/0/12
Output queue: Hardware Weighted Fair Queuing
Queue ID Queue name Group Byte count Min Bandwidth
--------------------------------------------------------------------------------
0 be 1 1 0%
1 af1 1 1 0%
2 af2 1 1 0%
3 af3 1 1 0%
4 af4 1 1 0%
5 ef 1 1 0%
6 cs6 1 1 0%
7 cs7 1 1 0%
Table 19 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Output queue |
Type of the current output queue. |
Group |
Number of the group that holds the queue. |
Byte-count |
Byte-count scheduling weight of the queue. |
Min Bandwidth |
Minimum guaranteed bandwidth for the queue. |
qos wfq
Use qos wfq to enable WFQ on an interface.
Use undo qos wfq to restore the default.
Syntax
qos wfq { byte-count | weight }
undo qos wfq { byte-count | weight }
Default
An interface uses SP queuing.
Views
Interface view
Predefined user roles
network-admin
Parameters
byte-count: Allocates bandwidth to queues in bytes.
weight: Allocates bandwidth to queues in packets.
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 weight-based WFQ on GigabitEthernet 1/0/12.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos wfq weight
# Enable byte-count WFQ on GigabitEthernet 1/0/12.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos wfq byte-count
Related commands
display qos queue wfq interface
qos wfq { byte-count | weight }
Use qos wfq { byte-count | weight } to assign a queue to a WFQ group with a certain scheduling weight.
Use undo qos wfq to restore the default for a queue.
Syntax
qos wfq queue-id group 1 { byte-count | weight } schedule-value
undo qos wfq queue-id
Default
All queues on a WFQ-enabled interface belong to WFQ group 1, and the scheduling weight of a queue is its queue ID plus 1.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
group 1: Specifies WFQ group 1.
byte-count: Allocates bandwidth to queues in bytes.
weight: Allocates bandwidth to queues in packets.
schedule-value: Specifies a scheduling weight in the range of 1 to 127.
Usage guidelines
You must use the qos wfq command to enable WFQ before you configure this command.
The queue-id argument can be either a number or a keyword. Table 18 shows the number-keyword map.
Examples
# Enable byte-count WFQ on GigabitEthernet 1/0/12, and assign queue 0, with the scheduling weight 100, to WFQ group 1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos wfq byte-count
[Sysname-GigabitEthernet1/0/12] qos wfq 0 group 1 byte-count 100
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 belong to WFQ group 1, and the scheduling weight of a queue is its queue ID plus 1.
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
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 configure this command.
The queue-id argument can be either a number or a keyword. Table 18 shows the number-keyword map.
Examples
# Enable WFQ on GigabitEthernet 1/0/12, and assign queue 0 to the SP group.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos wfq weight
[Sysname-GigabitEthernet1/0/12] qos wfq 0 group sp
Related commands
display qos queue wfq interface
qos bandwidth queue
qos wfq
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 SP queuing configuration for all interfaces.
Examples
# Display the WRED information for all interfaces.
<Sysname> display qos wred interface
Interface: GigabitEthernet1/0/15
Current WRED configuration:
Exponent: 9 (1/512)
Pre Low High Dis-prob Random-discard Tail-discard
------------------------------------------------------
0 10 30 10 0 0
1 10 30 10 0 0
2 10 30 10 0 0
3 10 30 10 0 0
4 10 30 10 0 0
5 10 30 10 0 0
6 10 30 10 0 0
7 10 30 10 0 0
Interface: GigabitEthernet1/0/14
Current WRED configuration:
Applied WRED table name: q1
Table type: Queue based WRED
QID gmin gmax gpro ymin ymax ypro rmin rmax rpro exp ECN
--------------------------------------------------------------------------------
0 100 1000 10 100 1000 10 100 1000 10 9 N
1 100 1000 10 100 1000 10 100 1000 10 9 N
2 100 1000 10 100 1000 10 100 1000 10 9 N
3 100 1000 10 100 1000 10 100 1000 10 9 N
4 100 1000 10 100 1000 10 100 1000 10 9 N
5 100 1000 10 100 1000 10 100 1000 10 9 N
6 100 1000 10 100 1000 10 100 1000 10 9 N
7 100 1000 10 100 1000 10 100 1000 10 9 N
Table 20 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Pre |
IP precedence of packets. |
Low |
Lower limit for a queue. |
High |
Upper limit for a queue. |
Dis-prob |
Drop probability. |
Random-discard |
Number of packets dropped by WRED. |
Tail-discard |
Number of packets dropped by tail drop. |
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. |
WRED table commands
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 100 1000 10 100 1000 10 100 1000 10 9 N
1 - - 10 - - 10 100 1000 10 9 N
2 100 1000 10 - 1000 10 100 1000 10 9 N
3 100 - 10 100 1000 10 100 1000 10 9 N
4 100 1000 10 100 1000 10 100 1000 10 9 N
5 100 1000 10 100 1000 10 100 1000 10 9 N
6 100 - 10 100 1000 10 100 1000 10 9 N
7 100 1000 10 100 1000 10 100 1000 10 9 N
Table 21 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. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
gmax |
Upper limit for green packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
gpro |
Drop probability for green packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
ymin |
Lower limit for yellow packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
ymax |
Upper limit for yellow packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
ypro |
Drop probability for yellow packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
rmin |
Lower limit for red packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
rmax |
Upper limit for red packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
rpro |
Drop probability for red packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
exp |
Exponent for average queue length calculation. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
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 GigabitEthernet 1/0/12.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/12
[Sysname-GigabitEthernet1/0/12] qos wred apply table1
Related commands
display qos wred interface
display qos wred table
qos wred table
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
queue: Creates a queue-based WRED table, which drops packets based on the queue when congestion occurs.
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
queue
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
No drop-related parameters are configured.
Views
WRED table view
Predefined user roles
network-admin
Parameters
all: Specifies all queues.
queue-id: Specifies a queue by its ID in the range of 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 in the range of 0 to 38000 KB.
high-limit high-limit: Specifies the upper limit for the average queue length in the range of 0 to 38000 KB. The upper limit must be greater than the lower limit.
discard-probability discard-prob: Specifies the drop probability in the range of 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 the tail drop mechanism for a queue, set the same value for the lower limit and upper limit and set the drop probability to 100%.
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 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 disabeld 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 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 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.
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 table
Global CAR commands
car name
Use car name to use a global CAR action in a traffic behavior.
Use undo car to restore the default.
Syntax
car name car-name
car name car-name cascade level level-value
undo car
Default
No global CAR action is configured in a traffic behavior.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
car-name: Specifies the name of an aggregate or multi-level CAR action. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters.
cascade level level-value: Specifies the level of the CAR action, in the range of 1 to 4. The smaller the level value, the higher the priority.
Usage guidelines
Multi-level CAR is implemented through a QoS policy. In the QoS policy, you associate different traffic classes with different-level CAR statements of a multi-level CAR action. When congestion occurs, the traffic class associated with a lower-level CAR statement receives preferential treatment over the traffic class associated with a higher-level CAR statement.
If you execute this command multiple times with the same level value, the most recent configuration takes effect.
Examples
# Use aggregate CAR action aggcar-1 in traffic behavior be1.
<Sysname> system-view
[Sysname] traffic behavior be1
[Sysname-behavior-be1] car name aggcar-1
# Configure traffic behavior be1 to use the level 1 statement of multi-level CAR action ccar.
<Sysname> system-view
[Sysname] traffic behavior be1
[Sysname-behavior-be1] car ccar cascade level 1
display qos car name
display traffic behavior user-defined
display qos car name
Use display qos car name to display information about global CAR actions.
Syntax
display qos car name [ car-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
car-name: Specifies a global CAR action by its name, which can be an aggregate CAR action or a hierarchical CAR action. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters. If you do not specify a global CAR action, this command displays information about all global CAR actions.
Examples
# Display information about all global CAR actions.
<Sysname> display qos car name
Name: a
Mode: aggregative
CIR 32 (kbps) CBS: 2048 (Bytes) PIR: 888 (kbps) EBS: 0 (Bytes)
Table 22 Command output
Field |
Description |
Name |
Name of the global CAR action. |
Mode |
Type of the CAR action: · aggregative—Aggregate CAR. · cascade—Multi-level CAR. |
Level |
Level of a statement in a multi-level CAR action. |
CIR CBS PIR EBS |
Parameters for the CAR action. |
level
Use level to configure level-specific CAR settings for a multi-level CAR action.
Use undo level to delete level-specific CAR settings.
Syntax
level level-value cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ max cir committed-information-rate ]
level level-value cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ max cir committed-information-rate max pir peak-information-rate ]
undo level level-value
Default
No level-specific CAR settings are configured for a multi-level CAR action.
Views
Multi-level CAR action view
Predefined user roles
network-admin
Parameters
level-value: Specifies the level of a CAR statement, in the range of 1 to 4.
cir committed-information-rate: Specifies the CIR in the range of 0 to 160000000 kbps, in increments of 20.
cbs committed-burst-size: Specifies the CBS in bytes in the range of 512 to 256000000 kbps, in increments of 512.
ebs excess-burst-size: Specifies the EBS in bytes in the range of 0 to 256000000 kbps, in increments of 512.
pir peak-information-rate: Specifies the PIR in the range of 20 to 160000000 kbps, in increments of 20. The PIR must be greater than or equal to the CIR.
max cir committed-information-rate: Specifies the maximum CIR in the range of 0 to 160000000 kbps, in increments of 20.
max pir peak-information-rate: Specifies the maximum PIR in the range of 20 to 160000000 kbps, in increments of 20. The maximum PIR must be greater than or equal to the maximum CIR.
Usage guidelines
If you execute this command multiple times, the most recent configuration takes effect.
A multi-level CAR action takes effect only after it is used in a QoS policy. In the QoS policy, you associate different traffic classes with different-level CAR statements of a multi-level CAR action. When congestion occurs, the traffic class associated with a lower-level CAR statement receives preferential treatment over the traffic class associated with a higher-level CAR statement.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# In multi-level CAR action ccar, configure a level-1 CAR statement (CIR 160 kbps and CBS 2048 bytes) and a level-2 CAR statement(CIR 80 kbps and CBS 1024 bytes).
<Sysname> system-view
[Sysname] qos car ccar cascade
[Sysname-qos-cascade-car-ccar] level 1 cir 160 cbs 2048
[Sysname-qos-cascade-car-ccar] level 2 cir 80 cbs 1024
Related commands
display qos car name
display traffic behavior
qos car (system view)
qos car
Use qos car to configure an aggregate or multi-level CAR action.
Use undo qos car to delete an aggregate or multi-level CAR action.
Syntax
qos car car-name aggregative cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ]
qos car car-name aggregative cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ]
qos car car-name cascade
undo qos car car-name
Default
No CAR action exists.
Views
System view
Predefined user roles
network-admin
Parameters
car-name: Specifies the name of the global CAR action. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters.
aggregative: Specifies the global CAR action as an aggregate CAR action.
cascade: Specifies the global CAR action as a multi-level CAR action.
cir committed-information-rate: Specifies the CIR in the range of 0 to 160000000 kbps, in increments of 20.
cbs committed-burst-size: Specifies the CBS in bytes in the range of 512 to 256000000 kbps, in increments of 512.
ebs excess-burst-size: Specifies the EBS in bytes in the range of 0 to 256000000 kbps, in increments of 512.
pir peak-information-rate: Specifies the PIR in the range of 20 to 160000000 kbps, in increments of 20. The PIR must be greater than or equal to the CIR.
Usage guidelines
An aggregate CAR action takes effect only after it is applied to an interface or used in a QoS policy.
A multi-level CAR action takes effect only after it is used in a QoS policy.
To use two rates for global CAR, configure the qos car command with the pir peak-information-rate option. To use one rate for global CAR, configure the qos car command without the pir peak-information-rate option.
Examples
# Configure aggregate CAR action aggcar-1, where CIR is 240 and CBS is 2048.
<Sysname> system-view
[Sysname] qos car aggcar-1 aggregative cir 240 cbs 2048
# Create a multi-level CAR action named ccar and enter its view.
<Sysname> system-view
[Sysname] qos car ccar cascade
[Sysname-qos-cascade-car-ccar]
display qos car name
reset qos car name
Use reset qos car name to clear the statistics about global CAR actions.
Syntax
reset qos car name [ car-name ]
Views
User view
Predefined user roles
network-admin
Parameters
car-name: Specifies a global CAR action by its name. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters. If you do not specify a global CAR action, this command clears statistics for all global CAR actions.
Examples
# Clear the statistics about global CAR action aggcar-1.
Queue-based accounting commands
Interface queue-based traffic statistics commands
display qos queue-statistics interface outbound
Use display qos queue-statistics interface outbound to display outgoing traffic statistics collected for interfaces on a per-queue basis.
Syntax
display qos queue-statistics interface [ interface-type interface-number ] outbound
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 outgoing traffic statistics for all interfaces.
Examples
# Display queue-based outgoing traffic statistics of GigabitEthernet 1/0/12.
<Sysname> display qos queue-statistics interface gigabitethernet 1/0/12 outbound
Interface: GigabitEthernet1/0/12
Direction: outbound
Forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Dropped: 1 packets, 1 bytes, 0 pps, 0 bps
Queue 0
Forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Dropped: 1 packets, 1 bytes, 0 pps, 0 bps
Total queue length: 0 packets
Current queue length: 0 packets, 0 bytes, 0% use ratio
Queue peak size: 0 bytes
…
Queue 7
Forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Dropped: 1 packets, 1 bytes, 0 pps, 0 bps
Total queue length: 0 packets
Current queue length: 0 packets, 0 bytes, 0% use ratio
Queue peak size: 0 bytes
Table 23 Command output
Field |
Description |
Interface |
Interface for which queue-based traffic statistics are displayed. |
Direction |
Direction of traffic for which statistics are collected. |
Forwarded |
Counts forwarded traffic in packets, bytes, pps, and bps. |
Dropped |
Counts dropped traffic in packets, bytes, pps, and bps. |
Total queue length |
Total number of packets allowed in the queue. |
Current queue length |
Current number of packets in the queue. |
use ratio |
Utilization ratio of the queue. |
Queue peak size |
Peak queue length of the queue, in bytes. |
Related commands
reset counters interface (Interface Command Reference)
display statistic mode
Use display statistic mode to display the packet counting mode.
Syntax
display statistic mode
Views
Any view
Predefined user roles
network-admin
Examples
# Display the packet counting mode.
<Sysname> display statistic mode
The packet statistic mode is queue.
statistic mode queue
statistic mode queue
Use statistic mode queue to set the packet counting mode to queue.
Use undo statistic mode queue to restore the default.
Syntax
statistic mode queue
undo statistic mode
Default
The packet counting mode is vsi.
Views
System view
Predefined user roles
network-admin
Usage guidelines
After you configure this command and the qos queue-statistics command, the device collects statistics on packets of each queue. You can use the display qos queue-statistics interface outbound command to display the statistics.
Examples
# Set the packet counting mode to queue.
<Sysname> system-view
[Sysname] statistic mode queue
Do you want to change the packet statistic mode? [Y/N]:y
Related commands
display statistic mode