01-QoS Commands
Chapters Download (296.77 KB)
Table of Contents
1 QoS Policy Configuration Commands
Traffic Behavior Configuration Commands
QoS Policy Configuration and Application Commands
qos apply policy (interface view, port group view)
2 Priority Mapping Configuration Commands
Priority Mapping Table Configuration Commands
Port Priority Configuration Commands
Trusted Precedence Type Configuration Commands
3 Traffic Policing and GTS Configuration Commands
Traffic Policing Configuration Commands
4 Aggregation CAR Configuration Commands
Aggregation CAR Configuration Commands
5 Congestion Management Configuration Commands
6 Traffic Mirroring Configuration Commands
Traffic Mirroring Configuration Commands
7 Port Buffer Configuration Commands
Port Buffer Configuration Commands
display buffer-manage configuration
Syntax
display traffic classifier user-defined [ tcl-name ]
View
Any view
Default Level
1: Monitor level
Parameters
user-defined: Displays user-defined classes.
tcl-name: Name of a class.
Description
Use the display traffic classifier command to display information about classes.
If no class name is specified, information about all system-defined or user-defined classes is displayed.
Examples
# Display information about all user-defined classes.
<Sysname> display traffic classifier user-defined
User Defined Classifier Information:
Classifier: USER1
Operator: AND
Rule(s) : if-match ip-precedence 5
Table 1-1 display traffic classifier user-defined command output description
Field |
Description |
User Defined Classifier Information |
User-defined class information |
Classifier |
Class name and its match criteria |
Operator |
Logical relationship between match criteria |
Rule(s) |
Match criteria |
Syntax
if-match match-criteria
undo if-match match-criteria
undo if-match acl [ ipv6 ] { acl-number | name acl-name } [ update acl [ ipv6 ] { acl-number | name acl-name } ]
View
Class view
Default Level
2: System level
Parameters
match-criteria: Match criterion. Table 1-2 shows the available criteria.
acl [ ipv6 ] { acl-number | name acl-name }: Specifies an ACL currently referenced in the class by the ACL name or ACL number
update acl [ ipv6 ] { acl-number | name acl-name }: Specifies a new ACL to replace the specified current ACL by the number or name of the new ACL.
Table 1-2 The form of the match-criteria argument
Form |
Description |
acl { access-list-number | name acl-name } |
Specifies to match an IPv4 ACL. The access-list-number argument specifies an ACL by its number, which ranges from 2000 to 4999; the name acl-name keyword-argument combination specifies an ACL by its name. In a class configured with the operator and, the logical relationship between rules defined in the referenced IPv4 ACL is or. |
acl ipv6 { access-list-number | name acl-name } |
Specifies to match an IPv6 ACL. The access-list-number argument specifies an ACL by its number, which ranges from 2000 to 3999; the name acl-name keyword-argument combination specifies an ACL by its name. In a class configured with the operator and, the logical relationship between rules defined in the referenced IPv6 ACL is or. |
any |
Specifies to match all packets. |
customer-dot1p 8021p-list |
Specifies to match packets by 802.1p precedence of the customer network. The 8021p-list argument is a list of CoS values, in the range of 0 to 7. |
customer-vlan-id vlan-id-list |
Specifies to match the packets of specified VLANs of user networks. The vlan-id-list argument specifies a list of VLAN IDs, in the form of vlan-id to vlan-id or multiple discontinuous VLAN IDs (separated by space). You can specify up to eight VLAN IDs for this argument at a time. VLAN ID is in the range 1 to 4094. |
destination-mac mac-address |
Specifies to match the packets with a specified destination MAC address. |
dscp dscp-list |
Specifies to match packets by DSCP precedence. The dscp-list argument is a list of DSCP values in the range of 0 to 63. |
ip-precedence ip-precedence-list |
Specifies to match packets by IP precedence. The ip-precedence-list argument is a list of IP precedence values in the range of 0 to 7. |
protocol protocol-name |
Specifies to match the packets of a specified protocol. The protocol-name argument can be IP. |
service-dot1p 8021p-list |
Specifies to match packets by 802.1p precedence of the service provider network. The 8021p-list argument is a list of CoS values in the range of 0 to 7. |
service-vlan-id vlan-id-list |
Specifies to match the packets of the VLANs of the operator’s network. The vlan-id-list argument is a list of VLAN IDs, in the form of vlan-id to vlan-id or multiple discontinuous VLAN IDs (separated by space). You can specify up to eight VLAN IDs for this argument at a time. VLAN ID is in the range of 1 to 4094. |
source-mac mac-address |
Specifies to match the packets with a specified source MAC address. |
The matching criteria listed below must be unique in a traffic class with the operator being AND. Therefore, even though you can define multiple if-match clauses for these matching criteria or input multiple values for a list argument (such as the 8021p-list argument) listed below in a traffic class, avoid doing that. Otherwise, the QoS policy referencing the class cannot be applied to interfaces successfully.
l customer-dot1p 8021p-list
l customer-vlan-id vlan-id-list
l destination-mac mac-address (you cannot specify a MAC address list)
l dscp dscp-list
l ip-precedence ip-precedence-list
l service-dot1p 8021p-list
l service-vlan-id vlan-id-list
l source-mac mac-address (you cannot specify a MAC address list)
To create multiple if-match clauses or specify multiple values for a list argument for any of the matching criteria listed above, ensure that the operator of the class is OR.
A QoS policy referencing the clause listed below cannot be applied in the outbound direction.
l customer-dot1p 8021p-list
l customer-vlan-id vlan-id-list
l ip-precedence ip-precedence-list
Description
Use the if-match command to define a match criterion.
Use the undo if-match command to remove the match criterion.
Use the if-match not command to define a criterion for matching traffic not conforming to the specified criterion.
Use the undo if-match not command to remove the criterion for matching traffic not conforming to the specified criterion.
When defining match criteria, note the following:
1) Define an ACL-based match criterion
l If the ACL referenced in the if-match command does not exist, the class cannot be applied to hardware.
l For a class, you can reference an ACL twice by its name and number respectively with the if-match command.
2) Define a criterion to match a destination MAC address or a source MAC address
l You can configure multiple destination MAC address match criteria in a class.
3) Define a criterion to match DSCP values
l You can configure multiple DSCP match criteria in a class. All the defined DSCP values are arranged in ascending order automatically.
l You can configure up to eight DSCP values in one command line. If multiple identical DSCP values are specified, the system considers them as one. If a packet matches one of the defined DSCP values, it is considered matching the if-match clause.
l To delete a criterion matching DSCP values, the specified DSCP values must be identical with those defined in the rule (sequence may be different).
4) Define a criterion to match the 802.1p precedence values of the customer network or service provider network
l You can configure multiple 802.1p precedence match criteria in a class. All the defined 802.1p values are arranged in ascending order automatically.
l You can configure up to eight 802.1p precedence values in one command line. If the same 802.1p precedence value is specified multiple times, the system considers them as one. If a packet matches one of the defined 802.1p precedence values, it is considered matching the if-match clause.
l To delete a criterion matching 802.1p precedence values, the specified 802.1p precedence values in the command must be identical with those defined in the criterion (sequence may be different).
5) Define a criterion to match IP precedence values
l You can configure multiple IP precedence match criteria in a class. The defined IP precedence values are arranged automatically in ascending order.
l You can configure up to eight IP precedence values in one command line. If the same IP precedence is specified multiple times, the system considers them as one. If a packet matches one of the defined IP precedence values, it is considered matching the if-match clause.
l To delete a criterion matching IP precedence values, the specified IP precedence values in the command must be identical with those defined in the criterion (sequence may be different).
6) Define a criterion to match customer network VLAN IDs or service provider network VLAN IDs
l You can configure multiple VLAN ID match criteria in a class. The defined VLAN IDs are automatically arranged in ascending order.
l You can configure multiple VLAN IDs in one command line. If the same VLAN ID is specified multiple times, the system considers them as one. If a packet matches one of the defined VLAN IDs, it is considered matching the if-match clause.
l To delete a criterion matching VLAN IDs, the specified VLAN IDs in the command must be identical with those defined in the criterion (sequence may be different).
Related commands: traffic classifier.
Examples
# Define a match criterion for class class1 to match the packets with the destination MAC address 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 class class2 to match the packets with the source MAC address 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 class class1 to match ACL 3101.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl 3101
# Define a match criterion for 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 class class1 to match IPv6 ACL 3101.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match ipv6 acl 3101
# Define a match criterion for class class1 to match the IPv6 ACL named flow.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match ipv6 acl name flow
# Define a match criterion for class class1 to match all packets.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match any
# Define a match criterion for class class1 to match the packets with DSCP values 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 class class1 to match the packets with an IP precedence 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 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 class class1 to match the packets with customer network VLAN ID 1, 6, or 9.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match customer-vlan-id 1 6 9
# Change the match criterion of class class1 from ACL 2008 to ACL 2009.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] undo if-match acl 2008 update 2009
Syntax
traffic classifier tcl-name [ operator { and | or } ]
undo traffic classifier tcl-name
View
System view
Default Level
2: System level
Parameters
and: Specifies the relationship between the match criteria in the class as logical AND. That is, the packets that match all the criteria belong to this class.
or: Specifies the relationship between the criteria in the class as logical OR. That is, the packets that match any of the criteria belong to this class.
tcl-name: Class name.
Description
Use the traffic classifier command to define a class and enter class view.
Use the undo traffic classifier command to remove a class.
By default, the relationship between match criteria is and.
Related commands: qos policy, qos apply policy, classifier behavior.
Examples
# Define a class named class1.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1]
Syntax
accounting
undo accounting
View
Traffic behavior view
Default Level
2: System level
Parameters
None
Description
Use the accounting command to enable traffic accounting for the traffic behavior.
Use the undo accounting command to disable traffic accounting. You can use the display qos policy interface command and the display qos vlan-policy command to view the related statistics information.
Related commands: qos policy, traffic behavior, classifier behavior.
Examples
# Configure traffic accounting for traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] accounting
Syntax
car cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ pir peak-information-rate ] [ red action ]
undo car
View
Traffic behavior view
Default Level
2: System level
Parameters
cir committed-information-rate: Committed information rate (CIR) in kbps, which is the average traffic rate.
cbs committed-burst-size: Committed burst size (CBS) in bytes. By default, CBS is 10000.
ebs excess-burst-size: Excess burst size (EBS) in bytes. The default is 10000.
pir peak-information-rate: Peak information rate (PIR) in kbps.
red action: Action to take on packets that conforms to neither CIR nor PIR. The default action is discard.
action: Action to take on packets, which can be:
l discard: Drops the packet.
l pass: Permits the packet to pass through.
Description
Use the car command to configure a CAR policy for the traffic behavior.
Use the undo car command to remove a CAR policy from the traffic behavior.
Note that:
l If both a policy referencing CAR and the qos car command are configured on the interface, only the policy referencing CAR takes effect.
l If this command is configured multiple times for the same traffic behavior, the last configuration takes effect.
Related commands: qos policy, traffic behavior, classifier behavior.
Examples
# Configure a traffic policing action for traffic behavior database. Set the CIR to 200 kbps, CBS to 50000 bytes, and EBS to 0.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] car cir 200 cbs 50000 ebs 0
Syntax
display traffic behavior user-defined [ behavior-name ]
View
Any view
Default Level
1: Monitor level
Parameters
user-defined: Displays user-defined traffic behaviors.
behavior-name: Behavior name. If no traffic behavior is specified, the information of all the system-defined or user-defined behaviors is displayed.
Description
Use the display traffic behavior command to display traffic behavior information.
Examples
# Display user-defined traffic behaviors.
<Sysname> display traffic behavior user-defined
Behavior: test
Accounting enable
Committed Access Rate:
CIR 1000 (kbps), CBS 100000 (byte), EBS 100000 (byte)
Red Action: discard
Filter enable: deny
Mirror enable:
Mirror type: cpu
Nesting:
Nest Top-Most Vlan-ID 100
Redirect enable:
Redirect type: interface
Redirect destination: GigabitEthernet1/0/1
Marking:
Remark dot1p COS 2
Marking:
Remark IP precedence 5
Marking:
Remark local precedence 4
Marking:
Remark Service VLAN ID 10
Table 1-3 display traffic behavior user-defined command output description
Field |
Description |
User Defined Behavior Information |
User-defined behavior information. |
Behavior |
Name of a behavior. |
Accounting enable |
Traffic accounting mode. |
Committed Access Rate |
Information about the CAR policy. |
Red Action |
Action to be taken on red packets, which can be pass or discard. |
Filter enable |
Traffic filtering option: permit or deny. |
Mirror enable |
Traffic mirroring configuration information. |
Mirror type |
Traffic mirroring type, which can be CPU or interface. |
Nesting |
Information about tagging packets with a VLAN tag. |
Nest Top-Most Vlan-ID |
Tag packets with a service VLAN tag. |
Redirect enable |
Traffic redirecting configuration information. |
Redirect type |
Traffic redirecting type, which can be redirecting to the CPU, an interface, or the next-hop. |
Redirect destination |
Traffic redirecting destination, an interface name, the IP address of the next hop, or the CPU. |
Marking |
Information about priority marking |
Remark |
Type of the priority to be set, which can be DSCP, IP precedence, 802.1p precedence, local precedence, or service VLAN ID. |
Syntax
filter { deny | permit }
undo filter
View
Traffic behavior view
Default Level
2: System level
Parameters
deny: Drops the packets.
permit: Permits the packet to pass through.
Description
Use the filter command to configure a traffic filtering action for the traffic behavior.
Use the undo filter command to remove the traffic filtering action.
Examples
# Configure the traffic filtering action as deny for traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] filter deny
Syntax
nest top-most vlan-id vlan-id-value
undo nest
View
Traffic behavior view
Default Level
2: System level
Parameters
top-most: Inserts a VLAN tag into the most outer layer of a packet.
vlan-id vlan-id-value: Specifies a VLAN ID, in the range 1 to 4094.
Description
Use the nest command to configure the action of inserting a VLAN tag for the traffic behavior.
Use the undo nest command to remove the action.
Note that:
l When a VLAN tag is inserted into the most outer layer, the 802.1p precedence of the newly inserted VLAN tag adopts that of the inner VLAN tag.
l A QoS policy that references the traffic behavior can be applied only in the inbound direction of an interface.
l If this command is configured multiple times for the same traffic behavior , the last configuration takes effect.
Related commands: qos policy, traffic behavior, classifier behavior.
Examples
# Configure the action of inserting the outer VLAN tag, setting the VLAN ID to 657.
<Sysname> system-view
[Sysname] traffic behavior be1
[Sysname-behavior-be1] nest top-most vlan-id 657
Syntax
redirect { cpu | interface interface-type interface-number | next-hop { ipv4-add [ ipv4-add ] | ipv6-add [ interface-type interface-number ] [ ipv6-add [ interface-type interface-number ] ] }
undo redirect { cpu | interface interface-type interface-number | next-hop }
View
Traffic behavior view
Default Level
2: System level
Parameters
cpu: Redirects traffic to the CPU.
interface: Redirects traffic to the specified interface.
interface-type interface-number: Interface identified by an interface number and interface type.
next-hop: Redirects traffic to a next hop.
ipv4-add: IPv4 address of the next hop.
ipv6-add: IPv6 address of the next hop. If the IPv6 address is a link-local address, you must specify an interface for the IPv6 address of the next hop; if the IPv6 address is not a link-local address, you need not specify an interface for the IPv6 address of the next hop.
Description
Use the redirect command to configure a traffic redirect action for the traffic behavior.
Use the undo redirect command to remove the traffic redirect action.
The action of redirecting traffic to CPU, the action of redirecting traffic to an interface, and the action of redirecting traffic to the next hop are mutually exclusive with each other in the same traffic behavior.
Examples
# Configure the action of redirecting traffic to GigabitEthernet 1/0/1 for traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] redirect interface gigabitethernet1/0/1
Syntax
remark dot1p 8021p
undo remark dot1p
View
Traffic behavior view
Default Level
2: System level
Parameters
8021p: 802.1p precedence to be marked for packets, in the range of 0 to 7.
Description
Use the remark dot1p command to configure the action of setting the specified 802.1p precedence for packets.
Use the undo remark dot1p command to remove the action.
Related commands: qos policy, traffic behavior, classifier behavior.
Examples
# Set the 802.1p precedence to 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark dot1p 2
Syntax
remark dscp dscp-value
undo remark dscp
View
Traffic behavior view
Default Level
2: System level
Parameters
dscp-value: DSCP value, in the range of 0 to 63 or a keyword, as shown in Table 1-4.
Table 1-4 DSCP keywords and values
Keyword |
DSCP value (binary) |
DSCP value (decimal) |
default |
000000 |
0 |
af11 |
001010 |
10 |
af12 |
001100 |
12 |
af13 |
001110 |
14 |
af21 |
010010 |
18 |
af22 |
010100 |
20 |
af23 |
010110 |
22 |
af31 |
011010 |
26 |
af32 |
011100 |
28 |
af33 |
011110 |
30 |
af41 |
100010 |
34 |
af42 |
100100 |
36 |
af43 |
100110 |
38 |
cs1 |
001000 |
8 |
cs2 |
010000 |
16 |
cs3 |
011000 |
24 |
cs4 |
100000 |
32 |
cs5 |
101000 |
40 |
cs6 |
110000 |
48 |
cs7 |
111000 |
56 |
ef |
101110 |
46 |
Description
Use the remark dscp command to configure the action of setting the specified DSCP value for packets.
Use the undo remark dscp command to remove the action.
Related commands: qos policy, traffic behavior, classifier behavior.
Examples
# Set the DSCP value of packets to 6.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark dscp 6
Syntax
remark ip-precedence ip-precedence-value
undo remark ip-precedence
View
Traffic behavior view
Default Level
2: System level
Parameters
ip-precedence-value: IP precedence value to be marked for packets, in the range of 0 to 7.
Description
Use the remark ip-precedence command to configure the action of setting the specified IP precedence for packets.
Use the undo remark ip-precedence command to remove the action.
Related commands: qos policy, traffic behavior, classifier behavior.
Examples
# Set the IP precedence of packets to 6.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark ip-precedence 6
Syntax
remark local-precedence local-precedence
undo remark local-precedence
View
Traffic behavior view
Default Level
2: System level
Parameters
local-precedence: Local precedence value to be marked for packets, in the range of 0 to 7.
Description
Use the remark local-precedence command to configure the action of setting the specified local precedence for packets.
Use the undo remark local-precedence command to remove the action.
Related commands: qos policy, traffic behavior, classifier behavior.
Examples
# Set the local precedence of packets to 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark local-precedence 2
Syntax
remark service-vlan-id vlan-id-value
undo remark service-vlan-id
View
Traffic behavior view
Default Level
2: System level
Parameters
vlan-id-value: Service provider network VLAN ID to be marked for packets, in the range of 1 to 4094.
Description
Use the remark service-vlan-id command to configure the action of setting the specified service provider network VLAN ID for packets.
Use the undo remark service-vlan-id command to remove the action.
Related commands: qos policy, traffic behavior, classifier behavior.
Examples
# Configure the action of marking packets with service provider network VLAN ID 666.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] remark service-vlan-id 666
Syntax
traffic behavior behavior-name
undo traffic behavior behavior-name
View
System view
Default Level
2: System level
Parameters
behavior-name: Behavior name.
Description
Use the traffic behavior command to create a traffic behavior and enter traffic behavior view.
Use the undo traffic classifier command to remove a traffic behavior.
Related commands: qos policy, qos apply policy, classifier behavior.
Examples
# Create a traffic behavior named behavior1.
<Sysname> system-view
[Sysname] traffic behavior behavior1
[Sysname-behavior-behavior1]
Syntax
classifier tcl-name behavior behavior-name
undo classifier tcl-name
View
Policy view
Default Level
2: System level
Parameters
tcl-name: Class name.
behavior-name: Behavior name.
Description
Use the classifier behavior command to specify a behavior for a class in the policy.
Use the undo classifier command to remove a class from the policy.
Note that:
l Each class in the policy can be associated with only one behavior.
l If the class and traffic behavior specified for the command do not exist, the system creates a null class and a null traffic behavior.
Related commands: qos policy.
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
[Sysname-qospolicy-user1]
Syntax
display qos policy user-defined [ policy-name [ classifier tcl-name ] ]
View
Any view
Default Level
1: Monitor level
Parameters
user-defined: Displays user-defined QoS policies.
policy-name: QoS policy name, a string of 1 to 31 characters. If no policy is specified, configuration information of all the policies is displayed.
tcl-name: Class name.
Description
Use the display qos policy command to display system-defined or user-defined QoS policy configuration information.
Examples
# Display the configuration information of user-defined QoS policies.
<Sysname> display qos policy user-defined
User Defined QoS Policy Information:
Policy: 100
Classifier: 100
Behavior: 100
Committed Access Rate:
Car name test
Policy: test
Classifier: 1
Behavior: test
Accounting enable
Committed Access Rate:
CIR 1000 (kbps), CBS 100000 (byte), EBS 100000 (byte)
Red Action: discard
Filter enable: deny
Mirror enable:
Mirror type: cpu
Nesting:
Nest Top-Most Vlan-ID 100
Redirect enable:
Redirect type: interface
Redirect destination: GigabitEthernet1/0/1
Marking:
Remark dot1p COS 2
Marking:
Remark IP precedence 5
Marking:
Remark local precedence 4
Marking:
Remark Service VLAN ID 10
Table 1-5 display qos policy command output description
Field |
Description |
Policy |
Policy name |
Classifier |
Class name A policy can contain multiple classes, and each class is associated with a traffic behavior. A class can be configured with multiple match criteria. Refer to the traffic classifier command for related information. |
Behavior |
Behavior associated with the class. A behavior is associated with a class. It can be configured with multiple actions. Refer to the traffic behavior command for related information. |
Syntax
display qos policy global [ inbound | outbound ]
View
Any view
Default Level
1: Monitor level
Parameters
inbound: Displays the QoS policy applied globally in the inbound direction of all ports.
outbound: Displays the QoS policy applied globally in the outbound direction of all ports.
Description
Use the display qos policy global command to display information about the QoS policy applied globally in the inbound or outbound direction of all ports.
Examples
# Display information about the global QoS policy applied in the inbound direction.
<Sysname> display qos policy global inbound
Direction: Inbound
Policy: 1
Classifier: 2
Operator: AND
Rule(s) : If-match acl 2000
Behavior: 2
Accounting Enable
20864 (Bytes)
Committed Access Rate:
CIR 128 (kbps), CBS 8000 (Bytes), EBS 0 (Bytes)
Red Action: discard
Green : 12928(Bytes)
Yellow: 7936(Bytes)
Red : 43904(Bytes)
Table 1-6 display qos policy global command output description
Field |
Description |
Direction |
Indicates that the QoS policy is applied in the inbound direction or outbound direction |
Policy |
Policy name and its contents |
Classifier |
Class name and its contents. |
Mode |
Mode that the association between the class and the traffic behavior supports |
Operator |
Logical relationship between match criteria |
Rule(s) |
Match criteria |
Behavior |
Name of the traffic behavior, and the actions in the traffic behavior |
Accounting |
Traffic accounting status: enabled or disabled |
Committed Access Rate |
Information about traffic rate limiting |
CIR |
Committed information rate (CIR) in kbps |
CBS |
Committed burst size in bytes, that is, the depth of the token bucket for holding bursty traffic |
EBS |
Excessive burst size (EBS) in bytes, that is, the traffic exceeding CBS when two token buckets are adopted |
Red Action |
Action to take on red packets |
Green |
Statistics about green packets |
Yellow |
Statistics about yellow packets |
Red |
Statistics about red packets |
Syntax
display qos policy interface [ interface-type interface-number ] [ inbound | outbound ] [ pvc { pvc-name [ vpi/vci ] | vpi/vci } ]
View
Any view
Default Level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
inbound: Display information about the QoS policy applied in the inbound direction of a port or all ports.
outbound: Display information about the QoS policy applied in the outbound direction of a port or all ports.
Description
Use the display qos policy interface command to display QoS policy configuration and operational information on an interface or all interfaces.
Examples
# Display the QoS configuration and operational information on GigabitEthernet1/0/1.
<Sysname> display qos policy interface gigabitethernet 1/0/1
Interface: GigabitEthernet1/0/1
Direction: Inbound
Policy: test
Classifier: 1
Operator: OR
Rule(s) : If-match source-mac 0000-0000-0001
If-match dscp 3 4 5
Behavior: test
Accounting Enable:
0 (Bytes)
Committed Access Rate:
CIR 1000 (kbps), CBS 100000 (byte), EBS 100000 (byte)
Red Action: discard
Green : 0(Bytes)
Yellow: 0(Bytes)
Red : 0(Bytes)
Filter Enable: deny
Mirror enable:
Mirror type: cpu
Nesting:
Nest top-most vlan-id 100
Redirect enable:
Redirect type: interface
Redirect destination: GigabitEthernet1/0/1
Marking:
Remark dot1p COS 2
Marking:
Remark IP precedence 5
Marking:
Remark local precedence 4
Marking:
Remark Service VLAN ID 10
Table 1-7 display qos policy interface command output description
Field |
Description |
Interface |
Interface type and interface number |
Direction |
The direction in which the policy is applied to the interface |
Policy |
Name of the policy applied to the interface |
Classifier |
Class name and corresponding configuration information |
Operator |
Logical relationship between match criteria in the class |
Rule(s) |
Match criteria in the class |
Behavior |
Behavior name and corresponding configuration information |
Syntax
display qos vlan-policy { name policy-name | vlan [ vlan-id ] } [ inbound | outbound ]
View
Any view
Default Level
1: Monitor level
Parameters
name policy-name: Displays the information of the VLAN QoS policy specified by its name, a string of 1 to 31 characters.
vlan vlan-id: Displays the QoS policy applied to the specified VLAN.
inbound: Displays the QoS policy applied to the inbound direction of the specified VLAN.
outbound: Displays the QoS policy applied to the outbound direction of the specified VLAN.
Description
Use the display qos vlan-policy command to display VLAN QoS policy information.
Examples
# Display information about the VLAN QoS policy test.
<Sysname> display qos vlan-policy name test
Policy test
Vlan 200: inbound
Vlan 300: outbound
Table 1-8 display qos vlan-policy command output description
Field |
Description |
Policy |
Name of the QoS policy |
Vlan |
ID of the VLAN where the VLAN policy is applied |
inbound |
The QoS policy is applied in the inbound direction of the VLAN. |
outbound |
The QoS policy is applied in the outbound direction of the VLAN. |
# Display the QoS policy applied to VLAN 2.
<Sysname> display qos vlan-policy vlan 2
Vlan 2
Direction: Inbound
Policy: 1
Classifier: 2
Operator: AND
Rule(s) : If-match acl 2000
Behavior: 2
Accounting Enable
20864 (Bytes)
Committed Access Rate:
CIR 128 (kbps), CBS 8000 (byte), EBS 0 (byte)
Red Action: discard
Green : 12928(Bytes)
Yellow: 7936(Bytes)
Red : 43904(Bytes)
Table 1-9 display qos vlan-policy command output description
Field |
Description |
Vlan |
ID of the VLAN where the QoS policy is applied |
Direction |
The direction in which the QoS policy is applied for the VLAN. |
Classifier |
Class name and its contents |
Operator |
Logical relationship between match criteria |
Rule(s) |
Match criteria |
Behavior |
Name of the behavior, and its actions |
Accounting |
Traffic accounting status: enabled or disabled |
Committed Access Rate |
CAR information |
CIR |
Committed information rate (CIR) in kbps |
CBS |
Committed burst size (CBS) in bytes, that is, the depth of the token bucket for holding bursty traffic |
EBS |
Excessive burst size (EBS) in bytes, that is, the amount of traffic beyond the CBS when two token buckets are adopted |
Red Action |
Action on red packets |
Green |
Statistics about green packets |
Yellow |
Statistics about yellow packets |
Red |
Statistics about red packets |
Syntax
qos apply policy policy-name { inbound | outbound }
undo qos apply policy { inbound | outbound }
View
Interface view, port group view
Default Level
2: System level
Parameters
inbound: Inbound direction.
outbound: Outbound direction.
policy-name: Specifies a policy name, a string of 1 to 31 characters.
Description
Use the qos apply policy command to apply a QoS policy.
Use the undo qos apply policy command to remove the QoS policy.
Settings in interface view are effective on the current interface; settings in port group view are effective on all ports in the port group.
Examples
# Apply policy USER1 in the outbound direction of GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos apply policy USER1 outbound
Syntax
qos apply policy policy-name global { inbound | outbound }
undo qos apply policy global { inbound | outbound }
View
System view
Default Level
2: System level
Parameters
policy-name: Policy name, a string of 1 to 31 characters.
inbound: Applies the QoS policy to the incoming packets on all ports.
outbound: Applies the QoS policy to the outgoing packets on all ports.
Description
Use the qos apply policy global command to apply a QoS policy globally. A global QoS policy takes effect on all inbound or outbound traffic depending on the direction in which the policy is applied.
Use the undo qos apply policy global command to cancel the global application of the QoS policy.
Examples
# Apply the QoS policy user1 in the inbound direction globally.
<Sysname> system-view
[Sysname] qos apply policy user1 global inbound
Syntax
qos policy policy-name
undo qos policy policy-name
View
System view
Default Level
2: System level
Parameters
policy-name: Policy name, a string of 1 to 31 characters.
Description
Use the qos policy command to create a policy and enter policy view.
Use the undo qos policy command to remove a policy.
A policy applied to an interface cannot be deleted directly. You need to cancel application of the policy on the interface before deleting the policy with the undo qos policy command.
Related commands: classifier behavior, qos apply policy.
Examples
# Define a policy named user1.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1]
Syntax
qos vlan-policy policy-name vlan vlan-id-list { inbound | outbound }
undo qos vlan-policy vlan vlan-id-list { inbound | outbound }
View
System view
Default Level
2: System level
Parameters
policy-name: QoS policy name, a string of 1 to 31 characters.
vlan-id-list: A list of up to eight VLAN IDs in the range 1 to 4094. You can input individual discontinuous VLAN IDs and VLAN ID ranges in the form of start-vlan-id to end-vlan-id where the start VLAN ID must be smaller than the end VLAN ID. Each item in the VLAN list is separated by a space. For vlan-id-list, you can input only one VLAN range or specify up to eight VLAN IDs.
inbound: Applies the QoS policy to the incoming packets in the specified VLAN(s).
outbound: Applies the QoS policy to the outgoing packets in the specified VLAN(s).
Description
Use the qos vlan-policy command to apply a QoS policy to the specified VLAN(s).
Use the undo qos vlan-policy command to remove the QoS policy applied to the specified VLAN(s).
Examples
# Apply the QoS policy test to the inbound direction of VLAN 200, VLAN 300, VLAN 400, and VLAN 500.
<Sysname> system-view
[Sysname] qos vlan-policy test vlan 200 300 400 500 inbound
Syntax
reset qos policy global [ inbound | outbound ]
View
User view
Default Level
1: Monitor level
Parameters
inbound: Specifies the inbound direction.
outbound: Specifies the outbound direction.
Description
Use the reset qos vlan-policy command to clear the statistics of a global QoS policy.
Examples
# Clear statistics of the global QoS policy applied in the inbound direction.
<Sysname> reset qos policy global inbound
Syntax
reset qos vlan-policy [ vlan vlan-id ] [ inbound | outbound ]
View
User view
Default Level
1: Monitor level
Parameters
vlan-id: VLAN ID, in the range of 1 to 4094.
inbound: Clears the QoS policy statistics in the inbound direction of the specified VLAN.
outbound: Clears the QoS policy statistics in the outbound direction of the specified VLAN.
Description
Use the reset qos vlan-policy command to clear VLAN QoS policy statistics.
Examples
# Clear the QoS policy statistics of VLAN 2.
<Sysname> reset qos vlan-policy vlan 2
Syntax
display qos map-table [ dot1p-dscp | dot1p-lp | dscp-dot1p | dscp-lp ]
View
Any view
Default Level
1: Monitor level
Parameters
dot1p-dscp: 802.1p-precedence-to-DSCP mapping table.
dot1p-lp: 802.1p-precedence-to-local-precedence mapping table.
dscp-dot1p: DSCP-to-802.1p-precedence mapping table.
dscp-lp: DSCP-to-local-precedence mapping table.
Description
Use the display qos map-table command to display the configuration of a priority mapping table.
If no priority mapping table is specified, all priority mapping tables are displayed.
Related commands: qos map-table.
Examples
# Display the configuration information of the 802.1p-precedence-to-DSCP-precedence mapping table.
<Sysname> display qos map-table dot1p-dscp
MAP-TABLE NAME: dot1p-dscp TYPE: pre-define
IMPORT : EXPORT
0 : 0
1 : 8
2 : 16
3 : 24
4 : 32
5 : 40
6 : 48
7 : 56
Table 2-1 display qos map-table command output description
Field |
Description |
MAP-TABLE NAME |
Name of the mapping table |
TYPE |
Type of the mapping table |
IMPORT |
Input values of the mapping table |
EXPORT |
Output values of the mapping table |
Syntax
import import-value-list export export-value
undo import { import-value-list | all }
View
Priority mapping table view
Default Level
2: System level
Parameters
import-value-list: List of input values.
export-value: Output value.
all: Deletes all the mappings in the priority mapping table.
Description
Use the import command to configure a mapping from one or multiple input values to an output value.
Use the undo import command to restore the specified or all mappings to the default mappings.
Related commands: display qos map-table, display qos map-table color.
Examples
# Configure the 802.1p-precedence-to-DSCP-precedence mapping table to map 802.1p precedence values 4 and 5 to DSCP precedence 1.
<Sysname> system-view
[Sysname] qos map-table dot1p-dscp
[Sysname-maptbl-dot1p-dscp] import 4 5 export 1
Syntax
qos map-table { dot1p-dscp | dot1p-lp | dscp-dot1p | dscp-lp }
View
System view
Default Level
2: System level
Parameters
dot1p-dscp: 802.1p-precedence-to-DSCP mapping table.
dot1p-lp: 802.1p-precedence-to-local-precedence mapping table.
dscp-dot1p: DSCP-to-802.1p-precedence mapping table.
dscp-lp: DSCP-to-local-precedence mapping table.
Description
Use the qos map-table command to enter the specified priority mapping table view.
Related commands: display qos map-table.
Examples
# Enter the 802.1p-precedence-to-DSCP-precedence mapping table view.
<Sysname> system-view
[Sysname] qos map-table dot1p-dscp
[Sysname-maptbl-dot1p-dscp]
Syntax
qos priority priority-value
undo qos priority
View
Interface view, port group view
Default Level
2: System level
Parameters
priority-value: Port priority value. The port priority is local precedence, which defaults to 0 and ranges from 0 to 7.
Description
Use the qos priority command to configure a priority for the current port.
Use the undo qos priority command to restore the default value.
In interface view, the setting is effective on the current interface only; in port group view, the setting is effective on all the ports in the port group.
Examples
# Set the priority of GigabitEthernet 1/0/1 to 2.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos priority 2
Syntax
display qos trust interface [ interface-type interface-number ]
View
Any view
Default Level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the display qos trust interface command to display the trusted precedence type and priority of an interface.
If no interface is specified, the trusted precedence types on all interfaces are displayed.
Examples
# Display the trusted precedence type and 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 priority trust type: untrust
Table 2-2 display qos trust interface command output description
Field |
Description |
Interface |
Interface type and interface number |
Port priority |
Port priority |
Port priority trust type |
Port priority trust mode l dscp indicates that the DSCP precedence of the received packets is trusted l dot1p indicates that the 802.1p precedence of the received packets is trusted l untrust indicates that the port priority is trusted |
Syntax
qos trust { dot1p | dscp }
undo qos trust
View
Interface view, port group view
Default Level
2: System level
Parameters
dot1p: Trusts the 802.1p precedence and uses this priority for priority mapping.
dscp: Trusts the DSCP values and uses DSCP values for priority mapping.
Description
Use the qos trust command to configure the trusted precedence type on an interface.
Use the undo qos trust command to restore the default.
By default, the port priority is trusted.
When packets enter the device, the device assigns a set of parameters (including 802.1p precedence, DSCP values, IP precedence, local precedence, and drop precedence) to the packets as configured.
The local precedence and drop precedence are defined as follows:
l A local precedence is locally significant and corresponds to an output queue.
l A drop precedence is used for packet drop. The value 2 corresponds to red packets, the value 1 corresponds to yellow packets, and the value 0 corresponds to green packets.
In interface view, the setting is effective on the current interface only; in port group view, the setting is effective on all the ports in the port group.
Examples
# Configure GigabitEthernet 1/0/1 to trust the 802.1p precedence.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos trust dot1p
Syntax
display qos car interface [ interface-type interface-number ]
View
Any view
Default Level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the display qos car interface command to display the CAR settings and operational statistics on a specified interface.
If no interface is specified, the CAR settings and operational statistics on all the interfaces are displayed.
Examples
# Display the CAR settings and operational statistics on GigabitEthernet 1/0/1.
<Sysname> display qos car interface gigabitethernet1/0/1
Interface: GigabitEthernet1/0/1
Direction: Inbound
Rule(s): If-match acl 2000
CIR 1000 (kbps), CBS 10000 (byte), EBS 10000 (byte), PIR 1000 (kbps)
Red Action : discard
Green : 0(Bytes)
Yellow: 0(Bytes)
Red : 0(Bytes)
Table 3-1 display qos car command output description
Field |
Description |
Interface |
Interface name, including interface type and interface number |
Direction |
The direction in which traffic policing is applied |
Rule(s) |
Match criteria |
CIR |
Committed information rate (CIR) in kbps |
CBS |
Committed burst size (CBS) in bytes, that is, the depth of the token bucket for holding bursty traffic |
EBS |
Excessive burst size (EBS) in bytes, that is, the traffic exceeding CBS when two token buckets are adopted |
PIR |
Peak information rate (PIR) in kbps |
Red Action |
Action conducted to packets with the traffic rate exceeding CIR |
Green |
Number and bytes of packets with the traffic rate lower than CIR |
Yellow |
Bytes of packets with the traffic rate exceeding CIR but lower than PIR |
Red |
Number and bytes of packets with the traffic rate exceeding PIR |
Syntax
qos car inbound acl [ ipv6 ] acl-number cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ pir peak-information-rate ] [ red action ]
undo qos car inbound acl [ ipv6 ] acl-number
View
Interface view, port group view
Default Level
2: System Level
Parameters
inbound: Limit the rate of incoming packets on the interface.
acl acl-number: Limits the rate of packets matching the IPv4 ACL.
acl ipv6 acl-number: Limits the rate of packets matching IPv6 ACL.
cir committed-information-rate: Committed information rate (CIR) in kbps, which ranges from 1 to 1000000 on a Gigabit port and 1 to 10000000 on a 10-Gigabit port.
cbs committed-burst-size: Committed burst size (CBS) in bytes, that is, the size of bursty traffic when the actual average rate is not greater than CIR. CBS ranges from 1 to 10000000 and defaults to 100000.
ebs excess-burst-size: Excess burst size (EBS) in bytes, which ranges from 1 to 10000000. The default is 100000.
pir peak-information-rate: Peak information rate (PIR) in kbps, which ranges from 1 to 1000000. The default is 0.
red: Action conducted to packets when the traffic rate exceeds CIR. The default is discard.
action: Action conducted to packets, which can be:
l discard: Drops the packet.
l pass: Permits the packet to pass through.
Description
Use the qos car command to configure a CAR policy on an interface.
Use the undo qos car command to remove a CAR policy on an interface.
This command can be executed repeatedly to configure multiple CAR policies on an interface. The policies are applied in the order configured.
Settings in interface view are effective on the current interface; settings in port group view are effective on all ports in the port group.
Examples
# Perform CAR for packets matching ACL 2000 in the inbound direction of GigabitEthernet 1/0/1. Set the CIR to 200 kbps.
<Sysname> system-view
[Sysname] interface gigabitethernet1/0/1
[Sysname-GigabitEthernet1/0/1] qos car inbound acl 2000 cir 200
Syntax
display qos gts interface [ interface-type interface-number ]
View
Any view
Default Level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the display qos gts interface command to view generic traffic shaping (GTS) configuration information and operational statistics on a specified interface or all the interfaces.
If no interface is specified, the GTS configuration information and operational statistics on all the interfaces are displayed.
Examples
# Display the GTS configuration information and operational statistics on all the interfaces.
Interface: GigabitEthernet1/0/1
Rule(s): If-match any
CIR 280 (kbps), CBS 4096 (byte)
Table 3-2 display qos gts command output description
Field |
Description |
Interface |
Interface type and interface number |
Rule(s) |
Match criteria |
CIR |
Committed information rate (CIR) in kbps |
CBS |
Committed burst size in bytes, that is, the depth of the token bucket for holding bursty traffic |
Syntax
qos gts { any | queue queue-number } cir committed-information-rate [ cbs committed-burst-size ]
undo qos gts { any | queue queue-number }
View
Interface view, port group view
Default Level
2: System level
Parameters
any: Shapes all the packets.
queue queue-number: Shapes the packets in the queue.
cir committed-information-rate: Committed information rate (CIR) in kbps. Values available for the argument depend on port type.
l On a Gigabit port or port group, the argument can take a multiple of 70 in the range of 70 to 1000000. Note that on a port group this value range applies even if 10-Gigabit ports are included in the group.
l On a 10-Gigabit port, the argument can take a multiple of 1875 in the range of 1875 to 8000000.
cbs committed-burst-size: Committed burst size (CBS) in bytes, which ranges from 4096 to 8388608 and must be a multiple of 4096.
Description
Use the qos gts command to set GTS parameters for a specific class of traffic or all the traffic on the interface or port group.
Use the undo qos gts command to remove GTS parameters for a specific class of traffic or all the traffic on the interface or port group.
Use the qos gts any command to set GTS parameters for all the traffic on the interface or port group.
Use the qos gts queue command to set GTS parameters for the packets in a specific queue.
By default, no GTS parameters are configured on an interface.
Settings in interface view are effective on the current interface; settings in port group view are effective on all ports in the port group.
Related commands: acl.
Examples
# Shape the packets matching ACL 2001 on GigabitEthernet 1/0/1. The GTS parameters are as follows: CIR is 350 kbps, and CBS is 737280 bytes.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos gts acl 2001 cir 350 cbs 737280
Syntax
car name car-name
undo car
View
Traffic behavior view
Default Level
2: System level
Parameters
car-name: Name of an aggregation CAR policy.
Description
Use the car name command to reference an aggregation CAR policy for the traffic behavior.
Use the undo car command to remove the aggregation CAR from the traffic behavior.
Examples
# Reference the aggregation CAR policy aggcar-1 for the traffic behavior be1.
<Sysname> system-view
[Sysname] traffic behavior be1
[Sysname-behavior-be1] car name aggcar-1
Syntax
display qos car name [ car-name ]
View
Any view
Default Level
1: Monitor level
Parameters
car-name: Name of an aggregation CAR policy.
Description
Use the display qos car name command to display the configuration and statistics of a specified aggregation CAR policy.
If no CAR policy is specified, the configuration and statistics of all the aggregation CAR policies are displayed.
Examples
# Display the configuration and statistics of the aggregation CAR policy aggcar-1.
<Sysname> display qos car name aggcar-1
Name: aggcar-1
Mode: aggregative
CIR 100(kbps) CBS: 100000(byte) EBS: 100000(byte)
Red Action: discard
Green packet 0(Bytes)
Yellow packet 0(Bytes)
Red packet 0(Bytes)
Table 4-1 display qos car name command output description
Field |
Description |
Name |
Name of the CAR policy |
Mode |
Mode of the CAR policy |
CIR CBS EBS PIR |
Parameters for the aggregation CAR policy |
Red Action |
Action on red packets |
Green packet |
Statistics about green packets |
Yellow packet |
Statistics about yellow packets |
Red packet |
Statistics about red packets |
Syntax
qos car inbound acl [ ipv6 ] acl-number name car-name
undo qos car inbound acl [ ipv6 ] acl-number
View
Interface view, port group view
Default Level
2: System level
Parameters
inbound: Limits the rate of incoming packets.
acl acl-number: Limits the rate of packets matching an IPv4 ACL. The acl-number ranges from 2000 to 4999.
acl ipv6 acl-number: Limits the rate of packets matching an IPv6 ACL. The acl-number ranges from 2000 to 3999.
name car-name: Name of an aggregation CAR policy.
Description
Use the qos car command to apply a specified aggregation CAR policy on the current interface/port group.
Use the undo qos car command to remove the aggregation CAR policy from the interface/port group.
This command can be executed repeatedly on the interface to apply multiple aggregation CAR policies to the interface. These aggregation CAR policies are executed in the order configured.
Settings in interface view are effective on the current interface; settings in port group view are effective on all ports in the port group.
Examples
# Apply the aggregation CAR policy aggcar-1 to the inbound packets matching ACL 2000 on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] qos car inbound acl 2000 name aggcar-1
# Apply the aggregation CAR policy aggcar-1 to all the inbound packets matching ACL 2000 on all the ports in port group 1.
<Sysname> system-view
[Sysname] port-group manual 1
[Sysname-port-group-manual-1] group-member gigabitethernet 1/0/1 to gigabitethernet 1/0/6
[Sysname-port-group-manual-1] qos car inbound acl 2000 name aggcar-1
Syntax
qos car car-name aggregative cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ pir peek-information-rate ] [ red action ]
undo qos car car-name
View
System view
Default Level
2: System level
Parameters
car-name: Name of the aggregation CAR policy.
aggregative: Indicates that the global CAR policy is aggregative.
cir committed-information-rate: Committed information rate (CIR) in kbps, which ranges from 1 to 10000000.
cbs committed-burst-size: Specifies the committed burst size (CBS) in bytes, that is, the size of bursty traffic when the actual average rate is no bigger than CIR. CBS ranges from 0 to 10000000 and defaults to 100000.
ebs excess-burst-size: Excess burst size (EBS) in bytes, which ranges from 0 to 10000000.
pir peak-information-rate: Peak information rate (PIR) in kbps, which ranges from 1 to 10000000. If PIR is not configured, only one token bucket is configured for CAR. Otherwise, two token buckets are configured for CAR.
red action: Action to take on red packets. Red packets are packets whose rate exceeds CIR. The action argument can be:
l discard: Drops the packet.
l pass: Permits the packet to pass through.
Description
Use the qos car aggregative command to configure an aggregation CAR policy.
Use the undo qos car command to remove an aggregation CAR policy.
An aggregation CAR policy does not take effect until it is applied to an interface or referenced in a policy.
Examples
# Configure the aggregation CAR policy aggcar-1, where CIR is 200, CBS is 2,000, and red packets are dropped.
<Sysname> system-view
[Sysname] qos car aggcar-1 aggregative cir 200 cbs 2000 red discard
Syntax
reset qos car name [ car-name ]
View
User view
Default Level
2: System level
Parameters
car-name: Name of an aggregation CAR policy.
Description
Use the reset qos car name command to clear the statistics about the specified aggregation CAR policy.
Note that, if no car-name is specified, the statistics about all the aggregation CAR policies is cleared.
Examples
# Clear the statistics about the aggregation CAR policy aggcar-1.
<Sysname> reset qos car name aggcar-1
Syntax
display qos wrr interface [ interface-type interface-number ]
View
Any view
Default Level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the display qos wrr interface command to display the weighted round robin (WRR) queuing configuration on an interface.
If no interface is specified, the WRR queuing configuration of all the interfaces is displayed.
Related commands: qos wrr.
Examples
# Display the WRR queuing configuration of GigabitEthernet 1/0/1.
<Sysname> display qos wrr interface gigabitethernet 1/0/1
Interface: GigabitEthernet1/0/1
Output queue: Weighted round robin queue
Queue ID Group Weight
-------------------------------------
0 1 10
1 1 20
2 1 20
3 1 40
4 2 20
5 2 30
6 2 60
7 2 80
Table 5-1 display qos wrr interface command output description
Field |
Description |
Interface |
Interface type and interface number |
Output queue |
Pattern of the current output queue |
Queue ID |
ID of a queue |
Group |
Number of the group a queue is assigned to. By default, all queues belong to group 1. |
Weight |
Queue weight based on which queues are scheduled. N/A indicates that the queue adopts the SP queue scheduling algorithm. |
Syntax
qos wrr queue-id group { group-id weight queue-weight | sp }
undo qos wrr [ queue-id group { group-id weight | sp } ]
View
Interface view, port group view
Default Level
2: System level
Parameters
queue-id: Output queue ID, in the range of 0 to 7.
group group-id: Specifies a WRR priority group. The group-id argument can be 1 or 2. The WRR priority groups are scheduled by priority.
weight queue-weight: Specifies weight for the queue. The queue-weight argument is in the range 8 to 100.
sp: Specifies the SP queue scheduling algorithm.
Description
Use the qos wrr command to configure the WRR or SP + WRR queue scheduling algorithm for a port or port group.
Use the undo qos wrr command to restore the default.
By default, all the output queues of a port are scheduled using the strict priority (SP) algorithm.
A port on an S5810 switch supports eight output queues. Different queues can adopt different queue scheduling algorithms. As required, you can configure part of the queues on a port to adopt the SP queue scheduling algorithm and part of the queues to adopt the WRR queue scheduling algorithm. The SP+WRR queue scheduling algorithm is implemented by adding queues on a port to SP scheduling queues and WRR queue scheduling queues respectively. For example, queue 0 and queue 1 are in the SP queue scheduling group, and queue 2, queue 3, and queue 4 are in the WRR queue scheduling group 1, queue 5, queue 6, and queue 7 are in WRR queue scheduling group 2. Round robin is performed in WRR group 2 firstly. If no packet is to be sent in WRR group 2, round robin is performed in WRR group 1. At last, packets in the SP queue scheduling group are processed.
When you use the WRR or SP+WRR queue scheduling algorithm, make sure that the queues in the same scheduling group are consecutive.
Examples
# Configure queue 0 and queue 1 on GigabitEthernet1/0/1 to be in SP queue scheduling group. Configure queue 2, queue 3, and queue 4 on GigabitEthernet1/0/1 to be in WRR queue scheduling group 1, with the weight being 20, 70, and 100 respectively. Configure queue 5, queue 6, and queue 7 on GigabitEthernet1/0/1 to be in WRR queue scheduling group 2, with the weight being 10, 50, and 80 respectively.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos wrr 0 group sp
[Sysname-GigabitEthernet1/0/1] qos wrr 1 group sp
[Sysname-GigabitEthernet1/0/1] qos wrr 2 group 1 weight 20
[Sysname-GigabitEthernet1/0/1] qos wrr 3 group 1 weight 70
[Sysname-GigabitEthernet1/0/1] qos wrr 4 group 1 weight 100
[Sysname-GigabitEthernet1/0/1] qos wrr 5 group 2 weight 10
[Sysname-GigabitEthernet1/0/1] qos wrr 6 group 2 weight 50
[Sysname-GigabitEthernet1/0/1] qos wrr 7 group 2 weight 80
Syntax
mirror-to cpu
undo mirror-to cpu
View
Traffic behavior view
Default Level
2: System level
Parameters
cpu: Mirrors traffic to the CPU.
Description
Use the mirror-to cpu command to configure the action of mirroring traffic to the CPU for the traffic behavior.
Use the undo mirror-to cpu command to remove the action.
By default, the action of mirroring traffic to the CPU is not configured for a traffic behavior.
In a traffic behavior, the action of mirroring traffic to an interface and the action of mirroring traffic to the CPU are mutually exclusive. Therefore, you can configure only one of them for a traffic behavior.
Examples
# Configure the action of mirroring traffic to the CPU for the traffic behavior 1.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to cpu
Syntax
mirror-to interface interface-type interface-number
undo mirror-to interface interface-type interface-number
View
Traffic behavior view
Default Level
2: System level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the mirror-to interface command to configure the action of mirroring traffic to a specified interface for the traffic behavior.
Use the undo mirror-to interface command to remove the action.
By default, the action of mirroring traffic to a specified interface is not configured for a traffic behavior.
Note that the action of mirroring traffic to an interface and the action of mirroring traffic to the CPU are mutually exclusive. Therefore, you can configure only one of them for a traffic behavior.
Examples
# Configure the action of mirroring traffic to GigabitEthernet 1/0/1 for traffic behavior 1.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to interface GigabitEthernet 1/0/1
Syntax
buffer-manage { ingress | egress } share-size size-value
undo buffer-manage { ingress | egress } share-size
View
System view
Default Level
3: Manage level
Parameters
ingress: Sets the receive buffer shared by all ports on the switch.
egress: Sets the transmit buffer shared by all ports on the switch.
size-value: Sets the size in blocks of the shared receive buffer or transmit buffer. For the shared receive buffer, the value range is 0 to 2048. For the shared transmit buffer, the value range is 1776 to 7976.
Description
Use the buffer-manage share-size command to set the size in blocks of the receive or transmit buffer shared by all ports on the switch.
Use the undo buffer-manage share-size command to restore the default.
By default, there is no shared receive buffer and the size of the shared transmit buffer is 1776.
The switch supports transmit and receive buffering for ports to eliminate packet loss when traffic is arriving at a rate greater than the physical medium can support or when forwarding decision is made.
With the buffering implementation of the switch, the buffer memory is divided into a shared buffer area and a dedicated buffer area. The shared buffer area is shared by all ports and is user configurable. The remaining buffer memory after the shared buffer area is deducted is the dedicated buffer area, which is assigned evenly among the ports. The dedicated buffer memory of a port cannot be shared by any other ports and is used prior to the shared buffer. A port uses the shared buffer only when its dedicated buffer is inadequate.
You can tune the shared buffer area depending on traffic patterns. If transient large traffic bursts may occur on some ports, you can expand the shared buffer to accommodate the bursts to prevent traffic loss. If transient small traffic bursts often occur on the ports, you can decrease the shared buffer so that each port can get more dedicated buffer memory.
Examples
# Set the size of the shared transmit buffer to 2048 blocks.
<Sysname> system-view
[Sysname] buffer-manage egress share-size 2048
Syntax
burst-mode enable
undo burst-mode enable
View
System view
Parameters
None
Description
Use the burst-mode enable command to enable the burst function.
Use the undo burst-mode enable command to disable the burst function.
By default, the burst function is disabled.
You can enable the burst function to make the switch automatically configure the shared buffer size.
Examples
# Enable the burst function.
<Sysname> system-view
[Sysname] burst-mode enable
Syntax
display buffer-manage configuration
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display buffer-manage configuration command to display the configuration of the shared buffer on the switch.
Examples
# Display information about the shared buffer on the switch.
<Sysname> display buffer-manage configuration
Ingress: the number of shared buffer units for received packets
Egress: the number of shared buffer units for sent packets
Slot No. Ingress Egress
1 0 1776
Table 7-1 display buffer-manage configuration command output description
Field |
Description |
Slot No. |
Slot where the interface card resides. The S5810 is not available with interface slots. The value for the field is always 1. |
Ingress |
The size of the receive buffer shared by all ports on the switch. |
Egress |
The size of the transmit buffer shared by all ports on the switch. |