- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-QoS commands | 262.56 KB |
display qos policy user-profile
qos apply policy (interface view)
qos apply policy (user profile view)
QoS policy-based traffic rate statistics collection period commands
QoS policy commands
Traffic class commands
display traffic classifier
Use display traffic classifier to display traffic classes.
Syntax
display traffic classifier { system-defined | user-defined } [ classifier-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
system-defined: Specifies system-defined traffic classes.
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.
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-
# Display the system-defined traffic class (default-class).
<Sysname> display traffic classifier system-defined default-class
System-defined classifier information:
Classifier: default-class (ID 0)
Operator: AND
Rule(s) :
If-match any
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 [ not ] match-criteria
undo if-match [ not ] match-criteria
Default
No match criterion is configured.
Views
Traffic class view
Predefined user roles
network-admin
Parameters
not: Matches packets that do not conform to the specified criterion.
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. 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. |
app-group group-name |
Matches an application group. The group-name argument specifies an application group by its name. The application group must have been created. A nonexistent application group cannot match packets. For more information about creating application groups, see APR in Security Configuration Guide. |
application app-name |
Matches an application. The app-name argument specifies a user-created application by its name. |
any |
Matches all packets. |
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 |
Matches a destination MAC address. This option takes effect only on Ethernet interfaces. |
dscp dscp-value&<1-8> |
Matches DSCP values. 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. |
ip-precedence ip-precedence-value&<1-8> |
Matches IP precedence values. 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. |
local-precedence local-precedence-value&<1-8> |
Matches local precedence values. The local-precedence-value&<1-8> argument specifies a space-separated list of up to eight local precedence values. The value range for the local-precedence-value argument is 0 to 7. |
protocol protocol-name |
Matches a protocol. The protocol-name argument can be arp, ip, bittorrent, or ipv6. |
source-mac mac-address |
Matches a source MAC address. This option takes effect only on Ethernet interfaces. |
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:
¡ DSCP.
¡ IP precedence.
¡ Local precedence.
· 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 must already exist.
· A deny rule does not take effect and cannot match packets.
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 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 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 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 of the application group multimedia.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match app-group multimedia
# Define a match criterion for traffic class class1 to match the packets of the application 3link.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match application 3link
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 ] [ green action | red 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 8 to 10000000 kbps.
cbs committed-burst-size: Specifies the committed burst size (CBS) in the range of 1000 to 1000000000 bytes. The default value for this argument is the product of 62.5 and 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.
action: Sets the action to take on the packet:
· discard: Drops the packet.
· pass: Permits the packet to pass through.
Usage guidelines
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: CIR is 200 kbps and CBS is 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 { system-defined | user-defined } [ behavior-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
system-defined: Specifies system-defined traffic behaviors.
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.
Examples
# Display all user-defined traffic behaviors.
<Sysname> display traffic behavior user-defined
User-defined behavior information:
Behavior: 1 (ID 100)
Committed Access Rate:
CIR 2222 (kbps), CBS 22222222 (Bytes)
Green action : pass
Red action : discard
# Display all system-defined traffic behaviors.
<Sysname> display traffic behavior system-defined
System-defined behavior information:
Behavior: be (ID 0)
-none-
Behavior: af (ID 1)
-none-
Behavior: ef (ID 2)
-none-
Behavior: be-flow-based (ID 3)
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. |
Red action |
Action to take on red packets. |
Filter enable |
Traffic filtering action. |
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.
Examples
# Configure a traffic filtering action as deny in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] filter deny
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 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 |
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 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.
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
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 [ 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.
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.
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
display qos policy
Use display qos policy to display QoS policies.
Syntax
display qos policy { system-defined | user-defined } [ policy-name [ classifier classifier-name ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
system-defined: Specifies system-defined QoS policies.
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.
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)
Green action : pass
Red action : discard
Classifier: 2 (ID 101)
Behavior: 2
-none-
# Display the system-defined QoS policy (default).
<Sysname> display qos policy system-defined
System-defined QoS policy information:
Policy: default (ID 0)
Classifier: default-class (ID 0)
Behavior: be
-none-
Classifier: ef (ID 1)
Behavior: ef
Expedited Forwarding:
Bandwidth 20 (%) Cbs-ratio 25
Classifier: af1 (ID 2)
Behavior: af
Assured Forwarding:
Bandwidth 20 (%)
Discard Method: Tail
Classifier: af2 (ID 3)
Behavior: af
Assured Forwarding:
Bandwidth 20 (%)
Discard Method: Tail
Classifier: af3 (ID 4)
Behavior: af
Assured Forwarding:
Bandwidth 20 (%)
Discard Method: Tail
Classifier: af4 (ID 5)
Behavior: af
Assured Forwarding:
Bandwidth 20 (%)
Discard Method: Tail
Field |
Description |
User-defined QoS policy information |
Information about a user-defined QoS policy. |
System-defined QoS policy information |
Information about a system-defined QoS policy. |
Policy |
User-defined QoS policy name or system-defined QoS policy name. |
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. If you do not specify an interface, this command displays QoS policies applied to all interfaces except VA interfaces.If you do not specify an interface, this command displays QoS policies applied to all interfaces. If you do not specify an interface, this command displays QoS policies applied to all interfaces. For information about VA interfaces, see PPP in Network Connectivity Configuration Guide.
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.
If you specify a VT interface, this command displays the QoS policies applied to each VA interface of the VT interface. It does not display QoS information about the VT interface.
Examples
# Display the QoS policy applied to the incoming traffic of GigabitEthernet 1/0/1.
<Sysname> display qos policy interface gigabitethernet 1/0/1 inbound
Interface: GigabitEthernet1/0/1
Direction: Inbound
Policy: 1
Classifier: 1
Matched : 0 (Packets) 0 (Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 51200 (Bytes)
Green action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
Red packets : 0 (Packets) 0 (Bytes)
Table 6 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied. |
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 |
Traffic statistics for green packets. |
Red packets |
Traffic statistics for red packets. |
For the description of other fields, see Table 1, Table 3, and Table 5.
display qos policy user-profile
Use display qos policy user-profile to display QoS policies applied to user profiles.
Syntax
display qos policy user-profile [ name profile-name ] [ user-id user-id ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name profile-name: Specifies a user profile by its name, a case-sensitive string of 1 to 31 characters. Valid characters include English letters, digits, hyphens (-), and underscores (_). The name must start with an English letter and must be unique. If you do not specify a user profile, this command displays QoS policies applied to all user profiles.
user-id user-id: Specifies an online user by a system-assigned, hexadecimal ID in the range of 0 to fffffffe. If you do not specify an online user, this command displays QoS policies applied to user profiles for all online users.
inbound: Specifies QoS policies applied to incoming traffic.
outbound: Specifies QoS policies applied to outgoing traffic.
Usage guidelines
If you do not specify a direction, this command displays QoS policies applied in the inbound direction and QoS policies applied in the outbound direction.
Examples
# Display the QoS policies applied to all user profiles.
<Sysname> display qos policy user-profile
User-Profile: abc
User ID: 0x30000000(local)
Direction: Inbound
Policy: p1
Classifier: default-class
Matched : 0 (Packets) 0 (Bytes)
Operator: AND
Rule(s) :
If-match any
Behavior: be
-none-
Table 7 Command output
Field |
Description |
Matched |
Number of packets that meet match criteria. |
Direction |
Direction in which the QoS policy is applied. |
Green packets |
Statistics about green packets. |
Red packets |
Statistics about red packets. |
For the description of other fields, see Table 1 and Table 3.
qos apply policy (interface view)
Use qos apply policy to apply a QoS policy to an interface.
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
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.
inbound: Applies the QoS policy to incoming traffic.
outbound: Applies the QoS policy to outgoing traffic.
Usage guidelines
The bandwidth assigned to AF and EF queues in the QoS policy must be smaller than the available bandwidth of the interface. Otherwise, the QoS policy cannot be successfully applied to the interface.
If you modify the available bandwidth of the interface to be smaller than the bandwidth for AF and EF queues, the applied QoS policy is removed.
Examples
# Apply QoS policy USER1 to the incoming traffic of GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos apply policy USER1 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.
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 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.
Usage guidelines
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 policy-based traffic rate statistics collection period commands
qos flow-interval
Use qos flow-interval to set the QoS policy-based traffic rate statistics collection period for an interface.
Use undo qos flow-interval to restore the default.
Syntax
qos flow-interval interval
undo qos flow-interval
Default
The QoS policy-based traffic rate statistics collection period is 5 minutes on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
interval: Sets the QoS policy-based traffic rate statistics collection period in minutes. The value range for this argument is 1 to 10.
Usage guidelines
You can enable collection of per-class traffic statistics over a period of time, including the average forwarding rate and drop rate. For example, if you set the statistics collection period to 10 minutes, the system performs the following operations:
· Collects traffic statistics for the most recent 10 minutes.
· Refreshes the statistics every 10/5 minutes, 2 minutes.
The traffic rate statistics collection period of a subinterface is the same as the period configured on the main interface.
Examples
# Set the QoS policy-based traffic rate statistics collection period to 10 minutes on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos flow-interval 10
Related commands
display qos policy interface
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 [ dot11e-lp | dot1p-lp | dscp-lp | lp-dot11e | lp-dot1p | lp-dscp ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
The device provides the following types of priority map.
Priority mapping |
Description |
dot11e-lp |
802.11e-local priority map. |
dot1p-lp |
802.1p-local priority map. |
dscp-lp |
DSCP-local priority map. |
lp-dot11e |
Local-802.11e priority map. |
lp-dot1p |
Local-802.1p priority map. |
lp-dscp |
Local-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 9 Command output
Field |
Description |
MAP-TABLE NAME |
Name of the priority map. |
TYPE |
Type of the priority map. |
DIRECTION |
Direction 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 { dot11e-lp | dot1p-lp | dscp-lp | lp-dot11e | lp-dot1p | lp-dscp }
Views
System view
Predefined user roles
network-admin
Parameters
For the description of other keywords, see Table 8.
Examples
# Enter 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 GigabitEthernet 1/0/1.
<Sysname> display qos trust interface gigabitethernet 1/0/1
Interface: GigabitEthernet1/0/1
Port priority trust information
Port priority: 0
Port dot1p priority: -
Port dscp priority: -
Port priority trust type: none
Table 10 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 trusts the port priority.
Views
Interface view
Configuration profile-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/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos trust dot1p
# Create a configuration profile named ap1, and set the priority trust mode to 802.1p priority on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] configuration profile ap1 model WA6320
[Sysname-config-profile-ap1] interface gigabitethernet 1/0/1
[Sysname-config-profile-ap1-GigabitEthernet1/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 priority-value
undo qos priority
Default
The port priority is 0.
Views
Interface view
Configuration profile-interface view
Predefined user roles
network-admin
Parameters
priority-value: Specifies the port priority value in the range of 0 to 7.
Examples
# Set the port priority of GigabitEthernet 1/0/1 to 2.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos priority 2
Related commands
display qos trust interface
Traffic limit commands
Traffic policing commands
qos car
Use qos car any to configure a CAR policy for all packets of 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 ]
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 8 to 10000000.
cbs committed-burst-size: Specifies the committed burst size (CBS) in the range of 1000 to 1000000000 bytes. The default CBS is the product of 62.5 and the CIR.
Usage guidelines
The conforming traffic is permitted to pass through, and the excess traffic is dropped.
If you execute the qos car command multiple times for the same user profile or session group profile, the most recent configuration takes effect.
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
Rate limit commands
display qos lr
Use display qos lr to display the rate limit configuration and statistics 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 configuration and statistics for all interfaces except VA interfaces. For information about VA interfaces, see PPP in Network Connectivity Configuration Guide.
Usage guidelines
If you specify a VT interface, this command displays the rate limit configuration and statistics of each VA interface of the VT interface. It does not display QoS information about the VT interface.
Examples
# Display the rate limit configuration and statistics for all interfaces.
<Sysname> display qos lr interface
Interface: GigabitEthernet1/0/1
Direction: Outbound
CIR 2000 (kbps), CBS 20480 (Bytes), EBS 0 (Bytes)
Passed : 1000 (Packets) 1000 (Bytes)
Discarded: 1000 (Packets) 1000 (Bytes)
Delayed : 1000 (Packets) 1000 (Bytes)
Active shaping: No
Interface: GigabitEthernet1/0/2
Direction: Outbound
CIR 64 (kbps), CBS 512 (Bytes), EBS 0 (Bytes)
Passed : 1000 (Packets) 1000 (Bytes)
Discarded: 1000 (Packets) 1000 (Bytes)
Delayed : 1000 (Packets) 1000 (Bytes)
Active shaping: No
Table 11 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. |
Passed |
Number and bytes of packets that have passed. |
Discarded |
Number and bytes of dropped packets. |
Delayed |
Number and bytes of delayed packets. |
Active shaping |
Indicates whether the rate limit configuration is activated: · Yes—Activated. · No—Not activated. |
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 [ ebs excess-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 of outgoing packets.
cir committed-information-rate: Specifies the CIR in kbps. The value range for committed-information-rate is 8 to 1000000.
cbs committed-burst-size: Specifies the CBS in the range of 1000 to 19375000 bytes. The default CBS is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the EBS in bytes, which is the traffic exceeding CBS when two token buckets are used. The value range for excess-burst-size is 0 to 1000000000. The default is 0.
Examples
# Limit the rate of outgoing packets on GigabitEthernet 1/0/1, with CIR 256 kbps and CBS 51200 bytes.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos lr outbound cir 256 cbs 51200
Congestion management commands
Common commands
display qos queue interface
Use display qos queue interface to display the queuing information for interfaces.
Syntax
display qos queue 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 queuing information for all interfaces except VA interfaces. For information about VA interfaces, see PPP in Network Connectivity Configuration Guide.
Usage guidelines
If you specify a VT interface, this command displays the queuing information of each VA interface of the VT interface. It does not display QoS information about the VT interface.
Examples
# Display the queuing information for all interfaces.
<Sysname> display qos queue interface
Interface: GigabitEthernet1/0/1
Output queue - Urgent queuing: Size/Length/Discards 0/100/0
Output queue - Protocol queuing: Size/Length/Discards 0/500/0
Output queue - Weighted Fair queuing: Size/Length/Discards 0/64/0
Interface: GigabitEthernet1/0/2
Output queue - Urgent queuing: Size/Length/Discards 0/100/0
Output queue - Protocol queuing: Size/Length/Discards 0/500/0
Output queue - FIFO queuing: Size/Length/Discards 0/75/0
Table 12 Command output
Field |
Description |
Interface |
Interface name, including the interface type and interface number. |
Output queue |
Type of the current output queue. |
Group |
Number of the group that holds the queue. |
CBQ commands
display qos queue cbq
Use display qos queue cbq to display the CBQ information for interfaces.
Syntax
display qos queue cbq 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 the CBQ information for all interfaces except VA interfaces. For information about VA interfaces, see PPP in Network Connectivity Configuration Guide.
Usage guidelines
If you specify a VT interface, this command displays the CBQ information for all VA interfaces of the VT interface. It does not display QoS information about the VT interface.
Examples
# Display the CBQ information for all interfaces.
<Sysname> display qos queue cbq interface
Interface: GigabitEthernet1/0/1
Output queue - Urgent queuing: Size/Length/Discards 0/100/0
Output queue - Protocol queuing: Size/Length/Discards 0/500/0
Output queue - Class Based Queuing: Size/Discards 0/0
Queue Size: EF/AF/BE 0/0/0
BE Queues: Active/Max active/Total 0/0/256
AF Queues: Allocated 1
Bandwidth(kbps): Available/Max reserve 74992/75000
Table 13 Command output
Field |
Description |
Interface |
Interface name, including the interface type and interface number. |
Size |
Total number of bytes of packets in all queues. |
Length |
Number of packets allowed in each queue. |
Discards |
Number of dropped packets. |
EF |
EF queue. |
AF |
AF queue. |
BE |
BE queue. |
Active |
Number of active BE queues. |
Max active |
Maximum number of active BE queues allowed. |
Total |
Total number of BE queues. |
Available |
Available bandwidth for CBQ. |
Max reserve |
Maximum reserved bandwidth for CBQ. |
queue af
Use queue af to enable assured-forwarding (AF) and set its minimum guaranteed bandwidth.
Use undo queue af to restore the default.
Syntax
queue af bandwidth { bandwidth | pct percentage | remaining-pct remaining-percentage }
undo queue af
Default
AF is not configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
bandwidth: Specifies the bandwidth in kbps. The value range for this argument is 8 to 1000000.
pct percentage: Specifies the percentage of the available bandwidth, in the range of 1 to 100.
remaining-pct remaining-percentage: Specifies the percentage of the remaining bandwidth, in the range of 1 to 100.
Usage guidelines
To associate the traffic behavior configured with the queue af command with a class in a policy, you must follow these requirements:
· The total bandwidth assigned to AF and EF queues in a policy cannot exceed the maximum available bandwidth of the interface where the policy is applied.
· The total percentage of bandwidth assigned to AF and EF in a policy cannot exceed 100.
· The bandwidth assigned to AF and EF in a policy must use the same form, either as an absolute bandwidth value or as a percentage.
If you execute the queue af command multiple times, the most recent configuration takes effect.
Examples
# Configure AF in traffic behavior database and assign the minimum guaranteed bandwidth 200 kbps to it.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] queue af bandwidth 200
Related commands
display qos queue cbq interface
traffic behavior
queue ef
Use queue ef to configure expedited forwarding (EF) and assign its maximum bandwidth.
Use undo queue ef to restore the default.
Syntax
queue ef bandwidth { bandwidth [ cbs burst ] | pct percentage [ cbs-ratio ratio ] }
undo queue ef
Default
EF is not configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
bandwidth: Specifies the bandwidth in kbps. The value range for this argument is 8 to 1000000.
cbs burst: Sets the CBS in bytes. The value range for this argument is 32 to 1000000000. The default is bandwidth × 25.
pct percentage: Specifies the percentage of the available bandwidth, in the range of 1 to 100.
cbs-ratio ratio: Sets the allowed burst ratio in the range of 25 to 500. This default is 25.
Usage guidelines
You cannot use this command in conjunction with the queue af or queue-length command in the same traffic behavior.
In a policy, the default class cannot be associated with the traffic behavior that has the queue ef command.
The total bandwidth assigned to AF and EF in a policy cannot exceed the maximum available bandwidth of the interface where the policy is applied.
The total percentage of the maximum available bandwidth assigned to AF and EF in a policy cannot exceed 100.
The bandwidths assigned to AF and EF in a policy must have the same type, bandwidth or percentage.
After the queue ef bandwidth pct percentage [ cbs-ratio ratio ] command is used, CBS equals (Interface available bandwidth × percentage × ratio)/100/1000.
After the queue ef bandwidth bandwidth [ cbs burst ] command is used, CBS equals burst. If the burst argument is not specified, CBS equals bandwidth × 25.
If you execute the queue ef command multiple times, the most recent configuration takes effect.
Examples
# Configure EF in traffic behavior database, with the maximum bandwidth as 200 kbps and CBS as 5000 bytes.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] queue ef bandwidth 200 cbs 5000
Related commands
display qos queue cbq interface
traffic behavior
queue-length
Use queue-length to set the queue length used for tail drop.
Use undo queue-length to restore the default.
Syntax
queue-length queue-length
undo queue-length
Default
The queue length used for tail drop is 64.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
queue-length: Specifies the maximum number of packets allowed in the FIFO queue. The value range for this argument is 1 to 1024.
Usage guidelines
Before configuring this command, make sure the queue af command or the queue wfq command has been configured.
The undo queue af or undo queue wfq command deletes the queue length configured by using the queue-length command.
If you execute the queue-length command multiple times, the most recent configuration takes effect.
Examples
# Set the maximum queue length to 16 and specify tail drop for AF.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] queue af bandwidth 200
[Sysname-behavior-database] queue-length 16
Related commands
queue af
queue wfq