- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-QoS commands | 247.06 KB |
Contents
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. · 4000 to 4999 for Layer 2 ACLs. The acl-name argument is a case-insensitive string of 1 to 63 characters, which must start with an English letter. To avoid confusion, make sure the argument is not all. |
any |
Matches all packets. |
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. |
inbound-interface interface-type interface-number |
Matches an input interface specified by its type and number. If this option is configured in a traffic class with logic AND operator, the traffic class is no longer in effect after the card or subcard where the input interface resides is removed. After the removed card or subcard is reinserted, the traffic class takes effect again. If you do not reinsert the card or subcard and add other match criteria to the traffic class, the traffic class does not take effect again. |
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, 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.
· Do not contain deny rules in the ACL. Actions in the QoS policy are not taken on traffic matching a deny rule.
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 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
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 ] * [ hierarchy-car hierarchy-car-name [ mode { and | or } ] ]
car cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ green action | red action | yellow action ] * [ hierarchy-car hierarchy-car-name [ mode { and | or } ] ]
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 bytes. The value range for committed-burst-size is 1000 to 1000000000. The default value for this argument is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the excess burst size (EBS) in bytes. The value range for excess-burst-size is 0 to 1000000000. The default EBS is 0.
pir peak-information-rate: Specifies the peak information rate (PIR) in the range of 8 to 10000000 kbps. The PIR must be specified in the same unit as 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.
action: Sets the action to take on the packet:
· discard: Drops the packet.
· pass: Permits the packet to pass through.
· remark-dot1p-pass new-cos: Sets the 802.1p priority value of the 802.1p packet to new-cos and permits the packet to pass through. The new-cos argument is in the range of 0 to 7.
· remark-dscp-pass new-dscp: Sets the DSCP value of the packet to new-dscp and permits the packet to pass through. The new-dscp argument is in the range of 0 to 63.
· remark-mpls-exp-pass new-exp: Sets the EXP field value of the MPLS packet to new-exp and permits the packet to pass through. The new-exp argument is in the range of 0 to 7.
· remark-prec-pass new-precedence: Sets the IP precedence of the packet to new-precedence and permits the packet to pass through. The new-precedence argument is in the range of 0 to 7.
hierarchy-car-name: Specifies the name of the used hierarchical CAR action.
mode: Specifies the collaborating mode of the hierarchical CAR action and the common CAR action:
· and: Specifies the AND mode (the default mode). In this mode, the traffic rate of a flow is limited by both the common CAR and the total traffic rate defined with hierarchical CAR.
· or: Specifies the OR mode. In this mode, a flow can perform one of the following operations:
¡ Pass through at the rate equal to the common CAR applied to it.
¡ Pass through at a higher rate if the total traffic rate of all flows does not exceed the hierarchical CAR.
Usage guidelines
To use two rates for traffic policing, configure the car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the car command without the pir peak-information-rate option.
If you execute the car command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure a CAR action in traffic behavior database:
· Set the CIR to 200 kbps, CBS to 51200 bytes, and EBS to 0.
· Transmit the conforming packets, and mark the excess packets with DSCP value 0 and transmit them.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] car cir 200 cbs 51200 ebs 0 green pass red remark-dscp-pass 0
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. |
Yellow action |
Action to take on yellow 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 customer-vlan-id
Use remark customer-vlan-id to configure a CVLAN marking action in a traffic behavior.
Use undo remark customer-vlan-id to restore the default.
Syntax
remark customer-vlan-id vlan-id
undo remark customer-vlan-id
Default
No CVLAN marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
vlan-id: Specifies a CVLAN ID in the range of 1 to 4094.
Examples
# Configure traffic behavior b1 to mark matching packets with CVLAN 111.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] remark customer-vlan-id 111
remark 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 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 service-vlan-id
Use remark service-vlan-id to configure an SVLAN marking action in a traffic behavior.
Use undo remark service-vlan-id to restore the default.
Syntax
remark service-vlan-id vlan-id
undo remark service-vlan-id
Default
No SVLAN marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
vlan-id: Specifies an SVLAN ID in the range of 1 to 4094.
Examples
# Configure traffic behavior b1 to mark matching packets with SVLAN 222.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] remark service-vlan-id 222
traffic behavior
Use traffic behavior to create a traffic behavior and enter its view, or enter the view of an existing traffic behavior.
Use undo traffic behavior to delete a traffic behavior.
Syntax
traffic behavior behavior-name
undo traffic behavior behavior-name
Default
No traffic behaviors exist.
Views
System view
Predefined user roles
network-admin
Parameters
behavior-name: Specifies a name for the traffic behavior, a case-sensitive string of 1 to 31 characters.
Examples
# Create a traffic behavior named behavior1.
<Sysname> system-view
[Sysname] traffic behavior behavior1
[Sysname-behavior-behavior1]
Related commands
display traffic behavior
QoS policy commands
classifier behavior
Use classifier behavior to associate a traffic behavior with a traffic class in a QoS policy.
Use undo classifier to delete a class-behavior association from a QoS policy.
Syntax
classifier classifier-name behavior behavior-name [ 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.
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), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
# 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
-none-
Classifier: af1 (ID 2)
Behavior: af
-none-
Classifier: af2 (ID 3)
Behavior: af
-none-
Classifier: af3 (ID 4)
Behavior: af
-none-
Classifier: af4 (ID 5)
Behavior: af
-none-
Table 5 Command output
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 global
Use display qos policy global to display QoS policies applied globally.
Syntax
display qos policy global [ inbound | outbound ]
The following compatibility matrix shows the support of hardware platforms for this command:
Hardware series |
Model |
Command compatibility |
WA6600 series |
WA6638 WA6638i WA6636 WA6630X WA6628 WA6628X WA6628E-T WA6622 WA6620 WA6620X |
No |
WA6300 series |
WA6338 WA6338-HI WA6338-LI WA6330 WA6330-LI WA6322 WA6322H WA6322H-HI WA6322H-LI WA6320 WA6320-C WA6320-D WA6320-SI WA6320H WA6320H-LI WA6320H-XEPON |
Yes |
WAP922 series |
WAP922E |
Yes |
WAP923 series |
WAP923 |
Yes |
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
inbound: Specifies the QoS policy applied in the inbound direction.
outbound: Specifies the QoS policy applied in the outbound direction.
Usage guidelines
If you do not specify a direction, this command displays both inbound and outbound global QoS policies.
Examples
# Display QoS policies applied globally.
<Sysname> display qos policy global
Direction: Inbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 51200 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
Yellow packets: 0 (Packets) 0 (Bytes)
Red packets : 0 (Packets) 0 (Bytes)
Classifier: 3
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 6 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied. |
Green packets |
Statistics about green packets. |
Yellow packets |
Statistics about yellow packets. |
Red packets |
Statistics about red packets. |
For the description of other fields, see Table 1 and Table 3.
display qos policy interface
Use display qos policy interface to display the QoS policies applied to interfaces.
Syntax
display qos policy interface [ interface-type interface-number ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays QoS policies applied to all interfaces.
inbound: Specifies the QoS policy applied to incoming traffic.
outbound: Specifies the QoS policy applied to outgoing traffic.
Usage guidelines
If you do not specify a direction, this command displays the QoS policy applied to incoming traffic and the QoS policy applied to outgoing traffic.
Examples
# Display the QoS policy applied to the incoming traffic of 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), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
Yellow packets: 0 (Packets) 0 (Bytes)
Red packets : 0 (Packets) 0 (Bytes)
Classifier: 3
Matched : 0 (Packets) 0 (Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 7 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. |
Yellow packets |
Traffic statistics for yellow packets. |
Red packets |
Traffic statistics for red packets. |
For the description of other fields, see Table 1 and Table 3.
display qos policy 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, 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
slot 1:
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 8 Command output
Field |
Description |
local |
Indicates a local user, who comes online from a physical interface. |
EBS |
EBS in bytes. |
Matched |
Number of packets that meet match criteria. |
Direction |
Direction in which the QoS policy is applied. |
Green packets |
Statistics about green packets. |
Yellow packets |
Statistics about yellow packets. |
Red packets |
Statistics about red packets. |
For the description of other fields, see Table 1 and Table 3.
qos apply policy (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 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 }
The following compatibility matrix shows the support of hardware platforms for this command:
Hardware series |
Model |
Command compatibility |
WA6600 series |
WA6638 WA6638i WA6636 WA6630X WA6628 WA6628X WA6628E-T WA6622 WA6620 WA6620X |
No |
WA6300 series |
WA6338 WA6338-HI WA6338-LI WA6330 WA6330-LI WA6322 WA6322H WA6322H-HI WA6322H-LI WA6320 WA6320-C WA6320-D WA6320-SI WA6320H WA6320H-LI WA6320H-XEPON |
Yes |
WAP922 series |
WAP922E |
Yes |
WAP923 series |
WAP923 |
Yes |
Default
No QoS policy is applied globally.
Views
System view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
inbound: Applies the QoS policy to the incoming packets on all interfaces.
outbound: Applies the QoS policy to the outgoing packets on all interfaces.
Usage guidelines
A global QoS policy takes effect on all incoming or outgoing traffic depending on the direction in which the QoS policy is applied.
# 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.
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
reset qos policy global
Use reset qos policy global to clear the statistics of a global QoS policy.
Syntax
reset qos policy global [ inbound | outbound ]
The following compatibility matrix shows the support of hardware platforms for this command:
Hardware series |
Model |
Command compatibility |
WA6600 series |
WA6638 WA6638i WA6636 WA6630X WA6628 WA6628X WA6628E-T WA6622 WA6620 WA6620X |
No |
WA6300 series |
WA6338 WA6338-HI WA6338-LI WA6330 WA6330-LI WA6322 WA6322H WA6322H-HI WA6322H-LI WA6320 WA6320-C WA6320-D WA6320-SI WA6320H WA6320H-LI WA6320H-XEPON |
Yes |
WAP922 series |
WAP922E |
Yes |
WAP923 series |
WAP923 |
Yes |
Views
User view
Predefined user roles
network-admin
Parameters
inbound: Clears the statistics of the global QoS policy applied to incoming traffic globally.
outbound: Clears the statistics of the global QoS policy applied to outgoing traffic globally.
Usage guidelines
If you do not specify a direction, this command clears the statistics of the global QoS policies in both directions.
Examples
# Clear the statistics of the global QoS policy applied to the incoming traffic globally.
<Sysname> reset qos policy global inbound
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, including colored and uncolored priority maps.
If you do not specify a direction, this command displays the priority maps in both directions, including colored and uncolored 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 DIRECTION: inbound
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 DIRECTION: outbound
IMPORT : EXPORT
0 : 2
1 : 0
2 : 1
3 : 3
4 : 4
5 : 5
6 : 6
7 : 7
Table 10 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 9.
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 information
Port priority: 0
Port dot1p priority: -
Port dscp priority: -
Port priority trust type: none
Table 11 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.
|
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
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
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 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 policing commands
Traffic policing commands
display qos car interface
Use display qos car interface to display the CAR configuration and statistics for interfaces.
Syntax
display qos car interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the CAR configuration and statistics for all interfaces except VA interfaces. For information about VA interfaces, see PPPoE in Layer 2—WAN Access Configuration Guide.
Usage guidelines
If you specify a VT interface, this command displays the CAR configuration and statistics of each VA interface of the VT interface. It does not display QoS information about the VT interface.
Examples
# Display the CAR configuration and statistics for GigabitEthernet 1/0/1.
<Sysname> display qos car interface gigabitethernet 1/0/1
Interface: GigabitEthernet1/0/1
Direction: inbound
Rule: If-match any
CIR 128 (kbps), CBS 5120 (Bytes), PIR 128 (kbps), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
# Display the CAR information on GigabitEthernet 1/0/2.
<Sysname> display qos car interface gigabitethernet 1/0/2
Interface: GigabitEthernet1/0/2
Direction: inbound
Rule: If-match any
CIR 50 (%), CBS 600 (ms), EBS 0 (ms), PIR 50 (%)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Table 12 Command output
Field |
Description |
Interface |
Interface name, including interface type and interface number. |
Direction |
Direction in which traffic policing is applied. |
Rule |
Match criteria. |
CIR |
CIR in kbps (if the CIR is specified in absolute value) or in percentage (if the CIR is specified in percentage). |
CBS |
CBS in bytes (if the CBS is specified in absolute value) or in ms (if the CBS is specified in milliseconds). When the CBS is specified in milliseconds, the actual CBS value is cbs-time × the actual CIR value. |
EBS |
EBS in bytes (if the EBS is specified in absolute value) or in ms (if the EBS is specified in milliseconds). When the EBS is specified in milliseconds, the actual EBS value is ebs-time × the actual CIR value. |
PIR |
PIR in kbps (if the PIR is specified in absolute value) or in percentage (if the PIR is specified in percentage). |
Green action |
Action to take on green packets. |
Yellow action |
Action to take on yellow packets. |
Red action |
Action to take on red packets. |
display qos carl
Use display qos carl to display CAR lists.
Syntax
display qos carl [ carl-index ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
carl-index: Specifies a CAR list by its number in the range of 1 to 199. If you do not specify a CAR list, this command displays all CAR lists.
Examples
# Display all CAR lists.
<Sysname> display qos carl
List Rules
1 destination-ip-address range 1.1.1.1 to 1.1.1.2 per-address shared-bandwidth
2 destination-ip-address subnet 1.1.1.1 22 per-address shared-bandwidth
4 dscp 1 2 3 4 5 6 7 cs1
5 mac 0000-0000-0000
6 mpls-exp 0 1 2
9 precedence 0 1 2 3 4 5 6 7
10 source-ip-address range 1.1.1.1 to 1.1.1.2
11 source-ip-address subnet 1.1.1.1 31
qos car (interface view)
Use qos car to configure a CAR policy on an interface.
Use undo qos car to delete a CAR policy from an interface.
Syntax
qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number | carl carl-index } cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ green action | red action | yellow action ] *
qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number | carl carl-index } cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ green action | red action | yellow action ] *
undo qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number | carl carl-index }
Default
No CAR policy is configured.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Performs CAR for incoming packets on the interface.
outbound: Performs CAR for outgoing packets on the interface.
any: Performs CAR for all IP packets in the specified direction.
acl [ ipv6 ] acl-number: Performs CAR for packets matching an ACL specified by its number. The value range for the acl-number argument is 2000 to 2999 for basic ACLs and 3000 to 3999 for advanced ACLs. If you do not specify ipv6, this option specifies an IPv4 ACL. If you specify ipv6, this option specifies an IPv6 ACL.
carl carl-index: Performs CAR for packets matching a CAR list specified by its number in the range of 1 to 199.
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 CBS in bytes, which is the size of bursty traffic when the actual average rate is not greater than the CIR. The value range for committed-burst-size is 1000 to 1000000000. The default CBS is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the EBS in bytes. The value range for excess-burst-size is 0 to 1000000000. The default EBS is 0.
pir peak-information-rate: Specifies the PIR in kbps. The value range for peak-information-rate is 8 to 10000000.
green: Specifies the action to take on packets when the traffic rate conforms to the CIR. The default is pass.
red: Specifies the action to take on packets when the traffic rate conforms to neither CIR nor PIR. The default is discard.
yellow: Specifies the action to take on packets when the traffic rate exceeds the CIR but conforms to the PIR. The default is pass.
action: Specifies the action to take on packets:
· continue: Continues to process the packet by using the next CAR policy.
· discard: Drops the packet.
· pass: Permits the packet to pass through.
· remark-dot1p-continue new-cos: Sets the 802.1p priority value of the 802.1p packet to new-cos and continues to process the packet by using the next CAR policy. The new-cos argument is in the range of 0 to 7.
· remark-dot1p-pass new-cos: Sets the 802.1p priority value of the 802.1p packet to new-cos and permits the packet to pass through. The new-cos argument is in the range of 0 to 7.
· remark-dscp-continue new-dscp: Remarks the packet with a new DSCP value and continues to process the packet by using the next CAR policy. The new-dscp argument is in the range of 0 to 63. Alternatively, you can specify the new-dscp argument with af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, or ef.
· remark-dscp-pass new-dscp: Remarks the packet with a new DSCP value and permits the packet to pass through. The new-dscp argument is in the range of 0 to 63. Alternatively, you can specify the new-dscp argument with af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, or ef.
· remark-mpls-exp-continue new-exp: Sets the EXP field value of the MPLS packet to new-exp and continues to process the packet by using the next CAR policy. The new-exp argument is in the range of 0 to 7.
· remark-mpls-exp-pass new-exp: Sets the EXP field value of the MPLS packet to new-exp and permits the packet to pass through. The new-exp argument is in the range of 0 to 7.
· remark-prec-continue new-precedence: Re-marks the packet with a new IP precedence and continues to process the packet by using the next CAR policy. The new-precedence argument is in the range of 0 to 7.
· remark-prec-pass new-precedence: Re-marks the packet with a new IP precedence and permits the packet to pass through. The new-precedence argument is in the range of 0 to 7.
Usage guidelines
To use two rates for traffic policing, configure the qos car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the qos car command without the pir peak-information-rate option.
You can configure multiple qos car commands on an interface to define multiple CAR policies. These CAR policies are executed in their configuration order.
Examples
# Perform CAR for all packets in the outbound direction of GigabitEthernet 1/0/1. The CAR parameters are as follows:
· CIR is 200 kbps.
· CBS is 5120 bytes.
· EBS is 0.
· Conforming packets are transmitted.
· Excess packets are set with an IP precedence of 0 and transmitted.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos car outbound any cir 200 cbs 5000 ebs 0 green pass red remark-prec-pass 0
Related commands
display qos car interface
qos carl
qos car any
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 [ ebs excess-burst-size ] ]
qos car { inbound | outbound } any cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ]
undo qos car { inbound | outbound }
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.
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.
pir peak-information-rate: Specifies the PIR in kbps. The value range for peak-information-rate is 8 to 10000000.
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
qos car percent (interface view)
Use qos car percent to configure a CAR policy in percentage on an interface.
Use undo qos car to delete a CAR policy from an interface.
Syntax
qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number | carl carl-index } percent cir cir-percent [ cbs cbs-time [ ebs ebs-time ] ] [ green action | red action | yellow action ] *
qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number | carl carl-index } percent cir cir-percent [ cbs cbs-time ] pir pir-percent [ ebs ebs-time ] [ green action | red action | yellow action ] *
undo qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number | carl carl-index }
Default
No CAR policy is configured in percentage.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Performs CAR for incoming packets on the interface.
outbound: Performs CAR for outgoing packets on the interface.
any: Performs CAR for all IP data packets in the specified direction.
acl [ ipv6 ] acl-number: Performs CAR for packets matching an ACL specified by its number. The value range for the acl-number argument is 2000 to 2999 for basic ACLs and 3000 to 3999 for advanced ACLs. If you do not specify ipv6, this option specifies an IPv4 ACL. If you specify ipv6, this option specifies an IPv6 ACL.
carl carl-index: Performs CAR for packets matching a CAR list specified by its number in the range of 1 to 199.
percent cir cir-percent: Specifies the CIR in percentage, in the range of 1 to 100. The actual CIR value is cir-percent × interface bandwidth.
cbs cbs-time: Specifies the CBS in milliseconds. The actual CBS value is cbs-time × the actual CIR value. The value range for the cbs-time argument is 50 to 2000. The default value is 500.
ebs ebs-time: Specifies the EBS in milliseconds. The actual EBS value is ebs-time × the actual CIR value. The value range for the ebs-time argument is 0 to 2000. The default value is 0.
pir pir-percent: Specifies the PIR in percentage, in the range of 1 to 100. The value for the pir-percent argument must be greater than or equal to the value for the cir-percent argument.
green: Specifies the action to take on packets when the traffic rate conforms to CIR. The default is pass.
red: Specifies the action to take on packets when the traffic rate conforms to neither CIR nor PIR. The default is discard.
yellow: Specifies the action to take on packets when the traffic rate exceeds CIR but conforms to PIR. The default is pass.
action: Specifies the action to take on packets:
· continue: Continues to process the packet by using the next CAR policy.
· discard: Drops the packet.
· pass: Permits the packet to pass through.
· remark-dot1p-continue new-cos: Sets the 802.1p priority value of the packet to new-cos and continues to process the packet by using the next CAR policy. The new-cos argument is in the range of 0 to 7.
· remark-dot1p-pass new-cos: Sets the 802.1p priority value of the packet to new-cos and permits the packet to pass through. The new-cos argument is in the range of 0 to 7.
· remark-dscp-continue new-dscp: Sets the DSCP value of the packet and continues to process the packet by using the next CAR policy. The new-dscp argument is in the range of 0 to 63. Alternatively, you can specify the new-dscp argument with af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, or ef.
· remark-dscp-pass new-dscp: Sets the DSCP value of the packet and permits the packet to pass through. The new-dscp argument is in the range of 0 to 63. Alternatively, you can specify the new-dscp argument with af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, or ef.
· remark-mpls-exp-continue new-exp: Sets the EXP field value of the MPLS packet to new-exp and continues to process the packet by using the next CAR policy. The new-exp argument is in the range of 0 to 7.
· remark-mpls-exp-pass new-exp: Sets the EXP field value of the MPLS packet to new-exp and permits the packet to pass through. The new-exp argument is in the range of 0 to 7.
· remark-prec-continue new-precedence: Sets the IP precedence of the packet and continues to process the packet by using the next CAR policy. The new-precedence argument is in the range of 0 to 7.
· remark-prec-pass new-precedence: Sets the IP precedence of the packet and permits the packet to pass through. The new-precedence argument is in the range of 0 to 7.
Usage guidelines
To use two rates for traffic policing, configure the qos car percent command with the pir pir-percent option. To use one rate for traffic policing, configure the qos car percent command without the pir pir-percent option.
You can configure multiple qos car percent commands on an interface to define multiple CAR policies. These CAR policies are executed in their configuration order.
Examples
# Perform CAR for all outgoing packets on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos car outbound any percent cir 50 cbs 1000
qos carl
Use qos carl to create or modify a CAR list.
Use undo qos carl to delete a CAR list.
Syntax
qos carl carl-index { dscp dscp-list | mac mac-address | mpls-exp mpls-exp-value | precedence precedence-value | { destination-ip-address | source-ip-address } { range start-ip-address to end-ip-address | subnet ip-address mask-length } [ per-address [ shared-bandwidth ] ] }
undo qos carl carl-index
Default
No CAR list is configured.
Views
System view
Predefined user roles
network-admin
Parameters
carl-index: Specifies a CAR list by its number in the range of 1 to 199.
dscp dscp-list: Specifies a list of DSCP values. A DSCP value can be a number from 0 to 63 or any of the following keywords af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, or ef. You can configure up to eight DSCP values in one command line. If the same DSCP value is specified multiple times, the system considers the values to be one value. If a packet matches one of the defined DSCP values, it matches the if-match clause.
mac mac-address: Specifies a MAC address in hexadecimal format.
mpls-exp mpls-exp-value: Specifies an MPLS EXP value in the range of 0 to 7. You can configure up to eight MPLS EXP values in one command line. If the same MPLS EXP value is specified multiple times, the system considers the values to be one value. If a packet matches one of the defined MPLS EXP values, it matches the if-match clause.
precedence precedence: Specifies a precedence value in the range of 0 to 7. You can configure up to eight IP precedence values in one command line. If the same IP precedence value is specified multiple times, the system considers the values to be one value. If a packet matches one of the defined IP precedence values, it matches the if-match clause.
destination-ip-address: Configures a destination IP address-based CAR list.
source-ip-address: Configures a source IP address-based CAR list.
range start-ip-address to end-ip-address: Specifies an IP address range by the start address and end address. The value for end-ip-address must be greater than the value for start-ip-address. The maximum number of IP addresses that an IP address range can accommodate is 1024.
subnet ip-address mask-length: Specifies a subnet by the IP subnet address and IP subnet address mask length. The value range for mask-length is 22 to 31.
per-address: Performs per-IP address rate limiting within the network segment. When this keyword is specified, the CIR is dedicated bandwidth for each IP address and is not shared by any other IP address. If you do not specify this keyword, the following events occur:
· Rate limiting is performed for the entire network segment.
· All of the CIR is allocated among all IP addresses in proportion to the traffic load of each IP address.
shared-bandwidth: Specifies that traffic of all IP addresses within the network segment shares the remaining bandwidth (the CIR). If you specify this keyword, all of the CIR is allocated evenly among all IP addresses with traffic load.
Usage guidelines
You can create a CAR list based on IP precedence, MAC address, MPLS EXP, DSCP, or IP network segment.
If you execute this command multiple times for the same CAR list, the most recent configuration takes effect. If you execute this command multiple times for different CAR lists, multiple CAR lists are created.
To perform rate limiting for a single IP address, use the qos car acl command in interface view.
Examples
# Apply CAR list 1 to the outbound direction of GigabitEthernet 1/0/1 to meet the following requirements:
· The rate of each host on the subnet 1.1.1.0/24 is limited to 512 kbps.
· Traffic of IP addresses in the subnet does not share the remaining bandwidth.
<Sysname> system-view
[Sysname] qos carl 1 source-ip-address subnet 1.1.1.0 24 per-address
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos car outbound carl 1 cir 512 cbs 5120 ebs 0 green pass red discard
# Apply CAR list 2 to the outbound direction of GigabitEthernet 1/0/1 to meet the following requirements:
· The rate of each host in the IP address range of 1.1.2.100 to 1.1.2.199 is limited to 5 Mbps.
· Traffic of IP addresses in the subnet shares the remaining bandwidth.
<Sysname> system-view
[Sysname] qos carl 2 source-ip-address range 1.1.2.100 to 1.1.2.199 per-address shared-bandwidth
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos car outbound carl 2 cir 5120 cbs 51200 ebs 51200 green pass red discard
Related commands
display qos carl
qos car
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 [ hierarchy-car hierarchy-car-name [ mode { and | or } ] ]
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 CAR action. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters.
hierarchy-car hierarchy-car-name: Specifies a hierarchical CAR action by its name, a case-sensitive string of 1 to 31 characters. This argument must start with a letter.
mode: Specifies a collaborating mode between the hierarchical CAR action and the aggregate CAR action, which can be AND (the default) or OR. If you do not specify a collaborating mode, the AND mode applies.
· and: Specifies the AND mode (the default mode). In this mode, the rate of a flow is limited by both aggregate CAR and the total traffic rate defined with hierarchical CAR.
· or: Specifies the OR mode. In this mode, a flow can perform one of the following operations:
¡ Pass through at the rate equal to the aggregate CAR applied to it.
¡ Pass through at a higher rate if the total traffic rate of all flows does not exceed the hierarchical CAR.
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 aggregate CAR action aggcar-1 and hierarchical CAR action hcar, with the collaborating mode as or.
<Sysname> system-view
[Sysname] traffic behavior be1
[Sysname-behavior-be1] car name aggcar-1 hierarchy-car hcar mode or
Related commands
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. 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, including aggregate CAR actions and hierarchical 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)
Green action : pass
Yellow action : pass
Red action : discard
Slot 0:
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Name: b
Mode: hierarchy
CIR 64 (kbps) CBS: 2048 (Bytes) PIR: 888 (kbps) EBS: 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Slot 0:
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Table 13 Command output
Field |
Description |
Name |
Name of the global CAR action. |
Mode |
Type of the CAR action, which can be aggregative or hierarchy. |
CIR CBS PIR EBS |
Parameters for the CAR action. |
Green action |
Action to take on green packets: · discard—Drops the packets. · pass—Permits the packets to pass through. |
Yellow action |
Action to take on yellow packets: · discard—Drops the packets. · pass—Permits the packets to pass through. |
Red action |
Action to take on red packets: · discard—Drops the packets. · pass—Permits the packets to pass through. |
Green packet |
Statistics about green packets. |
Yellow packet |
Statistics about yellow packets. |
Red packet |
Statistics about red packets. |
qos car (interface view)
Use qos car to apply an aggregate CAR action to an interface.
Use undo qos car to remove an aggregate CAR action from an interface.
Syntax
qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number } name car-name
undo qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number }
Default
No aggregate CAR action is applied to an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Performs aggregate CAR for incoming packets.
outbound: Performs aggregate CAR for outgoing packets.
any: Performs aggregate CAR for all IP packets.
acl acl-number: Performs aggregate CAR for packets matching an IPv4 ACL. The value range for acl-number is 2000 to 5999.
acl ipv6 acl-number: Performs aggregate CAR for packets matching an IPv6 ACL. The acl-number is in the range of 2000 to 3999.
name car-name: Specifies the name of an aggregate CAR action. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters.
Usage guidelines
You can apply multiple aggregate CAR actions to an interface. These aggregate CAR actions are executed in the order they are configured.
Examples
# Apply aggregate CAR action aggcar-1 to the inbound packets matching CAR list 1 on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos car inbound carl 1 name aggcar-1
display qos car interface
qos car (system view)
Use qos car aggregative to configure an aggregate or hierarchical CAR action.
Use undo qos car to delete an aggregate or hierarchical CAR action.
Syntax
qos car car-name { aggregative | hierarchy } cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ green action | red action | yellow action ] *
qos car car-name { aggregative | hierarchy } cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ green action | red action | yellow action ] *
undo qos car car-name
Default
No aggregate or hierarchical CAR action is configured.
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.
hierarchy: Specifies the global CAR action as a hierarchical CAR action.
cir committed-information-rate: Specifies the CIR in kbps, which is an average traffic rate. The value range for committed-information-rate is 8 to 10000000.
cbs committed-burst-size: Specifies the CBS in bytes. The value range for committed-burst-size is 1000 to 1000000000. The default value for this argument is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the EBS in bytes. The value range for excess-burst-size is 0 to 1000000000. The default EBS is 0.
pir peak-information-rate: Specifies the PIR in kbps. The value range for peak-information-rate is 8 to 10000000.
green action: Specifies the action to take on packets that conform to CIR. The default setting is pass.
red action: Specifies the action to take on the packet that conforms to neither CIR nor PIR. The default setting is discard.
yellow action: Specifies the action to take on packets that conform to PIR but not to CIR. The default setting is pass.
action: Specifies the action to take on packets:
· discard: Drops the packet.
· pass: Permits the packet to pass through.
· remark-dot1p-pass new-cos: Sets the 802.1p priority value of the 802.1p packet to new-cos and permits the packet to pass through. The new-cos argument is in the range of 0 to 7.
· remark-dscp-pass new-dscp: Sets the packet with a new DSCP value and permits the packet to pass through. The new-dscp argument is in the range of 0 to 63. Alternatively, you can specify the new-dscp argument with af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, or ef.
Usage guidelines
To use two rates for aggregate CAR, configure the qos car command with the pir peak-information-rate option. To use one rate for aggregate CAR, configure the qos car command without the pir peak-information-rate option.
An aggregate CAR action takes effect only after it is applied to an interface or used in a QoS policy.
A hierarchical CAR action takes effect only after it is used in a QoS policy.
Examples
# Configure aggregate CAR action aggcar-1, where CIR is 25600, CBS is 512000, and red packets are dropped.
<Sysname> system-view
[Sysname] qos car aggcar-1 aggregative cir 25600 cbs 512000 red discard
# Configure hierarchical CAR action h-car, where CIR is 120 and CBS is 51200.
<Sysname> system-view
[Sysname] qos car h-car hierarchy cir 120 cbs 51200
Related commands
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, including aggregate CAR actions and hierarchical CAR actions.
Examples
# Clear the statistics about global CAR action aggcar-1.
<Sysname> reset qos car name aggcar-1