- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-QoS Commands | 368.04 KB |
Contents
QoS policy configuration commands
display traffic classifier user-defined
Traffic behavior configuration commands
display traffic behavior user-defined
QoS policy configuration and application commands
display qos policy control-plane
display qos policy control-plane pre-defined
display qos policy user-defined
reset qos policy control-plane
Priority mapping configuration commands
Priority mapping table configuration commands
Port priority configuration commands
Trusted packet priority type configuration commands
GTS and traffic policing configuration commands
Hardware congestion management configuration commands
Queue scheduling profile configuration commands
display qos qmprofile configuration
display qos qmprofile interface
Congestion avoidance configuration commands
Aggregate CAR configuration commands
Traffic accounting configuration commands
Enhanced QoS configuration commands
QoS pipe mode configuration commands
In this document, EB cards refer to the interface cards suffixed with EB, and EC2 cards refer to the cards suffixed with EC2.
In this document, the standard ACL mode is an ACL operation mode of EB and EC2 cards. For more information, see ACL and QoS Configuration Guide.
Class configuration commands
display traffic classifier user-defined
Syntax
display traffic classifier user-defined [ tcl-name ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
tcl-name: Class name, a string of 1 to 31 characters.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display traffic classifier user-defined to display information about user-defined classes.
If no class name is specified, this command displays information about all user-defined classes.
Examples
# Display information about all user-defined classes.
<Sysname> display traffic classifier user-defined
User Defined Classifier Information:
Classifier: tc1
Operator: AND
Rule(s) : If-match acl 2000
Table 1 Command output
Field |
Description |
Classifier |
Class name and its match criteria. |
Operator |
The match operator you set for the class. If the operator is AND, the class matches the packets that match all its match criteria. If the operator is OR, the class matches the packets that match any of its match criteria. |
Rule(s) |
Match criteria. |
if-match
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 2 shows the available criteria.
acl [ ipv6 ] { acl-number | name acl-name }: Specifies an ACL already referenced in the class by the ACL name or ACL number.
update acl [ ipv6 ] { acl-number | name acl-name }: Specifies a new ACL by its number or name to replace the ACL already referenced by the class.
Table 2 The options for the match-criteria argument
Option |
Description |
acl [ ipv6 ] { acl-number | name acl-name } |
Matches an ACL. The acl-number argument is in the range of 2000 to 5999 for an IPv4 ACL, and 2000 to 3999 for an IPv6 ACL. The acl-name argument is a case-insensitive string of 1 to 63 characters, which must start with an English letter from a to z or A to Z and cannot be all to avoid confusion. You can use a user-defined ACL in a QoS policy only to identify inbound traffic. On an EB or EC2 card operating in standard ACL mode, a QoS policy does not support a class that uses IPv6 ACLs or user-defined ACLs as match criteria. |
customer-dot1p 8021p-list |
Matches the 802.1p priority of the customer network. The 8021p-list argument is a list of up to eight 802.1p priority values. An 802.1p priority is in the range of 0 to 7. This keyword is not supported in a global QoS policy or VLAN QoS policy. On an EB or EC2 card operating in standard ACL mode, a QoS policy does not support a class that uses the 802.1p priority values of the customer network as match criteria. |
customer-vlan-id { vlan-id-list | vlan-id1 to vlan-id2 } |
Matches the VLAN IDs of customer networks. The vlan-id-list argument is a list of up to eight VLAN IDs. vlan-id1 to vlan-id2 specifies a VLAN ID range, where vlan-id1 must be smaller than vlan-id2. A VLAN ID is in the range of 1 to 4094. This keyword is not supported in a global QoS policy or VLAN QoS policy. On an EB or EC2 card operating in standard ACL mode, a QoS policy does not support a class that uses the VLAN IDs of customer networks as match criteria. |
destination-mac mac-address |
Matches a destination MAC address. On an EB or EC2 card operating in standard ACL mode, if a QoS policy that references a class using a destination MAC address as a match criterion is applied to the incoming traffic, the class does not take effect on IPv4 packets. If a QoS policy that references a class using a destination MAC address as a match criterion is applied to the outgoing traffic, the class does not take effect on IPv4 or IPv6 packets. |
dscp dscp-list |
Matches DSCP values. The dscp-list argument is a list of up to eight DSCP values. A DSCP value is in the range of 0 to 63. |
inbound-interface interface-type interface-number |
Matches an inbound interfaces specified by its type and number. A QoS policy configured with the match criteria can be applied to only a control plane. To make sure the QoS policy can be applied successfully, the inbound interface specified and the control plane that you apply the QoS policy to must be in the same slot. When you use this keyword as the match criteria of a class, you can configure only filter or car in the behavior associated with the class. |
forwarding-layer { bridge | route } |
Matches Layer 2 packets by specifying the bridge keyword or Layer 3 packets by specifying the route keyword. |
ip-precedence ip-precedence-list |
Matches IP precedence. The ip-precedence-list argument is a list of up to 8 IP precedence values. An IP precedence is in the range of 0 to 7. |
mpls-exp exp-list |
Matches outer MPLS EXP values. The exp-list argument is a list of up to 8 EXP values. An EXP value is in the range of 0 to 7. On an EB or EC2 card operating in standard ACL mode, a QoS policy applied to the outgoing traffic does not support a class that uses the MPLS EXP values as match criteria. |
mpls-label { label-id-list | label-id1 to label-id2 } |
Matches outer MPLS labels. The label-value-list argument specifies a list of up to eight MPLS label values. label-value1 to label-value2 specifies an MPLS label value range, where label-value1 must be smaller than label-value2. An MPLS label value is in the range of 1 to 1048575. On an EB or EC2 card operating in standard ACL mode, a QoS policy does not support a class that uses the MPLS labels as match criteria. |
protocol protocol-name |
Matches a protocol. The protocol-name can be ARP, IP, or IPv6. On an EB or EC2 card operating in standard ACL mode, a QoS policy does not support a class that uses the IPv6 protocol as the match criterion. |
second-mpls-exp exp-list |
Matches inner MPLS EXP values. The exp-list argument is a list of up to 8 EXP values. An EXP value is in the range of 0 to 7. On an EB or EC2 card operating in standard ACL mode, a QoS policy does not support a class that uses the inner MPLS EXP value as match criteria. |
second-mpls-label { label-id-list | label-id1 to label-id2 } |
Matches inner MPLS labels. The label-value-list argument specifies a list of up to eight MPLS label values. label-value1 to label-value2 specifies an MPLS label range, where label-value1 must be smaller than label-value2. An MPLS label is in the range of 1 to 1048575. On an EB or EC2 card operating in standard ACL mode, a QoS policy does not support a class that uses the inner MPLS labels as match criteria. |
service-dot1p 8021p-list |
Matches the 802.1p priority of the service provider network. The 8021p-list argument is a list of up to eight 802.1p priority values. An 802.1p priority is in the range of 0 to 7. |
service-vlan-id { vlan-id-list | vlan-id1 to vlan-id2 } |
Matches the VLAN IDs of ISP networks. The vlan-id-list argument is a list of up to 8 VLAN IDs. vlan-id1 to vlan-id2 specifies a VLAN ID range, where vlan-id1 must be smaller than vlan-id2. A VLAN ID is in the range of 1 to 4094. |
system-index index-value-list |
Matches a pre-defined match criterion (system-index) for packets sent to the control plane. The index-value-list argument specifies a list of up to eight system indexes. A system index is in the range of 1 to 28. To see the detailed information about a system index, use the display qos policy control-plane pre-defined command. When you configure the system index match criteria for a class to match the packets sent to the control plane, you cannot configure any other match criteria for the class, and you can associate only a behavior configured with the packet-rate command with the class. |
source-mac mac-address |
Matches a source MAC address. On an EB or EC2 card operating in standard ACL mode, if a QoS policy that references a class using a source MAC address as a match criterion is applied to the incoming traffic, the class does not take effect on IPv4 packets. If a QoS policy that references a class using a source MAC address as a match criterion is applied to the outgoing traffic, the class does not take effect on IPv4 or IPv6 packets. |
Description
Use if-match to define a match criterion.
Use undo if-match to remove the match criterion.
When defining match criteria for a class, use the guidelines described in these subsections.
Defining ACL-based match criteria
Make sure the ACL you are using has been created. If not, the class cannot be applied to hardware.
For a class with the operator as OR, you can reference an ACL twice, respectively by its name and number. For a class with the operator as AND, you can reference an ACL only once by its name or number.
Defining destination MAC address criteria
You can configure multiple destination MAC address match criteria for a class.
Defining source MAC address criteria
You can configure multiple source MAC address match criteria for a class.
Defining DSCP precedence criteria
· You can configure multiple DSCP precedence match clause for a class. They are automatically sorted in the order they are configured.
· You can configure up to eight DSCP values in one match clause. Identical DSCP values are counted as one. If a packet matches one of the DSCP values, it matches the match clause.
· To delete a DSCP match clause, execute the undo if-match command with the same list of DSCP values, not necessarily in the same order, as in the match clause.
Defining inbound interface match criteria
· You can configure multiple inbound interface match criteria for a class.
· The inbound interfaces specified as the match criteria must already exist. If a dynamic interface is specified in the inbound interface match criterion, the match criterion is deleted when the interface is deleted.
· The match criteria are available only on Ethernet interfaces.
Defining 802.1p priority criteria for matching customer-side or service provider-side traffic
· You can configure multiple 802.1p priority match clauses for a class. They are automatically sorted in the ascending number order.
· You can configure up to eight unique 802.1p priority values in one match clause. Identical 802.1p priority values are counted as one. If a packet matches one of the 802.1p priority values, it matches the match clause.
· To delete an 802.1p priority match clause, execute the undo if-match command with the same list of 802.1p priority values, not necessarily in the same order, as in the match clause.
Defining IP precedence criteria
· You can configure multiple IP precedence match clauses for a class. They are automatically sorted in the order they are configured.
· You can configure up to eight unique IP precedence values in one match clause. Identical IP precedence values are counted as one. If a packet matches one of the IP precedence values, it matches the match clause.
· To delete an IP precedence match clause, execute the undo if-match command with the same list of IP precedence values, not necessarily in the same order, as in the match clause.
Defining MPLS EXP precedence criteria
· You can configure multiple MPLS EXP precedence match clauses for a class. They are automatically sorted in ascending order.
· You can configure up to eight unique MPLS EXP precedence values in one match clause. Identical MPLS EXP precedence values are counted as one. If a packet matches one of the MPLS EXP values, it matches the match clause.
· To delete an MPLS EXP precedence match clause, execute the undo if-match command with the same list of MPLS EXP precedence values, not necessarily in the same order, as in the match clause.
· MPLS EXP match criteria apply only to MPLS packets.
· IP match criteria do not apply to MPLS packets.
Defining MPLS label criteria
· You can configure multiple MPLS label match clauses for a class. The MPLS labels are automatically sorted in ascending order.
· You can configure up to eight unique MPLS labels in one match clause. Identical MPLS labels are counted as one. If a packet matches one of the MPLS labels, it matches the match clause.
· To delete an MPLS label match clause, execute the undo if-match command with the same list of MPLS labels, not necessarily in the same order, as in the match clause.
· MPLS label criteria apply only to MPLS packets.
Defining VLAN ID criteria for matching customer VLAN or service provider VLAN traffic
· You can configure multiple VLAN ID match clauses for a class. The VLAN IDs are automatically sorted in the order they are configured.
· You can configure multiple VLAN IDs in one match clause. Identical VLAN IDs are counted as one. If a packet matches one of the VLAN IDs, it matches the match clause.
· To delete a VLAN ID match clause, execute the undo if-match command with the same list of VLAN IDs, not necessarily in the same order, as in the match clause.
Referencing a pre-define match criterion for packets sent to the control plane
· You can configure multiple match criteria in a class for packets sent to the control plane.
· You can configure multiple system indexes in one command. If the same system index is specified multiple times, the system considers them as one. If a packet matches one of the defined system indexes, it matches the if-match clause.
· To delete a criterion that matches system indexes, the specified system indexes in the command must be identical with those defined in the criterion (the sequence can be different).
· you can use the display qos policy control-plane pre-defined command to display the pre-defined match criteria for packets sent to the control plane of the device.
Defining Layer 2 or Layer 3 packet criteria
· The if-match forwarding-layer bridge and if-match forwarding-layer route commands are mutually exclusive in a class.
· You must use a forwarding-layer match criterion together with other match criteria. The other match criteria in the class cannot conflict with the forwarding-layer match criterion, regardless of the operator of the class.
Related commands: traffic classifier.
Examples
# Configure class class1 to match the packets with the destination MAC address 0050-BA27-BE88.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match destination-mac 0050-ba27-be88
# Configure class class1 to match the packets with 802.1p priority 3 in their customer VLAN tags.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match customer-dot1p 3
# Configure class class1 to match the packets with 802.1p priority 5 in their service provider VLAN tags.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match service-dot1p 5
# Configure class class1 to match the packets from customer VLAN 1.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match customer-vlan-id 1
# Configure class class1 to match the packets from customer VLAN 2.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match service-vlan-id 2
traffic classifier
Syntax
traffic classifier tcl-name [ operator { and | or } ]
undo traffic classifier tcl-name
View
System view
Default level
2: System level
Parameters
tcl-name: Specifies a class name, a string of 1 to 31 characters.
operator: Sets the match operator to logical AND or OR for the class.
and: Specifies the logical AND operator. The class matches packets that match all its criteria.
or: Specifies the logical OR operator. The class matches packets that match any of its criteria.
Description
Use traffic classifier to create a class and enter class view.
Use undo traffic classifier to delete a class.
If no match operator is specified, the default AND operator applies.
Related commands: qos policy, qos apply policy, and classifier behavior.
Examples
# Create a class class1.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1]
Traffic behavior configuration commands
accounting
Syntax
accounting { byte | packet }
undo accounting
View
Traffic behavior view
Default level
2: System level
Parameters
byte: Counts traffic in bytes.
packets: Counts traffic in packets. This keyword affects the accounting unit of CAR.
Description
Use accounting to add a traffic accounting action in the traffic behavior.
Use undo accounting to remove the traffic accounting action from the traffic behavior.
You can collect traffic statistics on a per traffic class basis by including a traffic accounting action in the traffic behavior for a class, for example, for traffic sourced from a certain IP address.
Related commands: qos policy, traffic behavior, and classifier behavior.
Examples
# Add a traffic accounting (in bytes) action to traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] accounting byte
car
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 specifies an average traffic rate. The value range for committed-information-rate is 1 to 20000000.
cbs committed-burst-size: Committed burst size (CBS) in the range of 1553 to 2147450880 bytes. By default, CBS is the amount of traffic transmitted at the rate of CIR over 500 ms. The CBS must be greater than the maximum packet length. By default, the CBS is the traffic transmitted at the rate of CIR in 500 milliseconds. If the traffic transmitted at the rate of CIR over 500 milliseconds is smaller than 1553 bytes, the default CBS is 1553 bytes.
ebs excess-burst-size: Excess burst size (EBS) in the range of 0 to 2147450880 bytes. The default is 0.
pir peak-information-rate: Peak information rate (PIR) in the range of 1 to 20000000 kbps.
red action: Specifies the action to take on the packet that conforms to neither CIR nor PIR. The default action is discard.
action: Sets the action to take on the packet:
· discard: Drops the packet.
· pass: Permits the packet to pass through.
Description
Use car to configure a CAR action in a traffic behavior.
Use undo car to delete the CAR action from the traffic behavior.
A traffic behavior can contain only one CAR action. If you configure the car command multiple times in the same traffic behavior, the most recent configuration takes effect.
Related commands: qos policy, traffic behavior, and classifier behavior.
Examples
# Configure a CAR action in traffic behavior database: set the CIR to 200 kbps and the CBS to 50000 bytes, and drop the exceeding packets.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] car cir 200 cbs 50000 red discard
display traffic behavior user-defined
Syntax
display traffic behavior user-defined [ behavior-name ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
behavior-name: Specifies a traffic behavior name, a string of 1 to 31 characters. If no traffic behavior is specified, this command displays all user-defined behaviors.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display traffic behavior user-defined to display user-defined traffic behaviors.
Examples
# Display all user-defined traffic behaviors.
<Sysname> display traffic behavior user-defined
User Defined Behavior Information:
Behavior: tb1
Committed Access Rate:
CIR 1000 (kbps), CBS 100000 (byte), EBS 0 (byte)
Red Action: discard
Marking:
Remark dot1p COS 5
Table 3 Command output
Field |
Description |
Committed Access Rate |
Information about the CAR action. |
Marking |
Information about traffic marking. |
filter
Syntax
filter { deny | permit }
undo filter
View
Traffic behavior view
Default level
2: System level
Parameters
deny: Drops packets.
permit: Permits packet to pass through.
Description
Use filter to configure a traffic filtering action in a traffic behavior.
Use undo filter to delete the traffic filtering action.
If you configure a deny filtering action, the traffic behavior drops all matching packets. If you configure a permit filtering action, the traffic behavior permits all matching packets to pass through.
Examples
# Configure a deny filtering action in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] filter deny
packet-rate
packet-rate value
undo packet-rate
View
Traffic behavior view
Default level
2: System level
Parameters
value: Protocol packet rate in the range of 1 to 1048575 pps.
Description
Use packet-rate to configure a protocol packet rate limiting action.
Use undo packet-rate to delete the action.
The protocol packet rate limiting function limits the rate of protocol packets sent to the CPU, and guarantees the normal operation of the CPU.
Examples
# Configure behavior copp to rate-limit the protocol packets sent to the CPU.
<Sysname> system-view
[Sysname] traffic behavior copp
[Sysname-behavior-copp] packet-rate 1600
primap pre-defined color
Syntax
primap pre-defined color { dot1p-dot1p | dot1p-exp | dot1p-dp | dot1p-dscp | dot1p-lp | dscp-dot1p | dscp-dp | dscp-dscp | dscp-exp | dscp-lp | exp-dot1p | exp-dp | exp-dscp | exp-exp | exp-lp | up-dscp }
undo primap pre-defined color { dot1p-dot1p | dot1p-exp | dot1p-dp | dot1p-dscp | dot1p-lp | dscp-dot1p | dscp-dp | dscp-dscp | dscp-exp | dscp-lp | exp-dot1p | exp-dp | exp-dscp | exp-exp | exp-lp | up-dscp }
View
Traffic behavior view
Default level
2: System level
Parameters
pre-defined: Specifies pre-defined priority mapping tables.
color: Specifies colored priority mapping tables.
dot1p-dot1p: 802.1p-to-802.1p mapping table.
dot1p-exp: 802.1p-to-EXP mapping table.
dot1p-dp: 802.1p-to-drop priority mapping table.
dot1p-dscp: 802.1p-to-DSCP mapping table.
dot1p-lp: 802.1p-to-local precedence mapping table.
dscp-dot1p: DSCP-to-802.1p mapping table.
dscp-dp: DSCP-to-drop priority mapping table.
dscp-dscp: DSCP-to-DSCP mapping table.
dscp-exp: DSCP-to-EXP mapping table.
dscp-lp: DSCP-to-local precedence mapping table.
exp-dot1p: EXP-to-802.1p mapping table.
exp-dp: EXP-to-drop priority mapping table.
exp-dscp: EXP-to-DSCP mapping table.
exp-exp: EXP-to-EXP mapping table.
exp-lp: EXP-to-local precedence mapping table.
up-dscp: User precedence-to-DSCP mapping table.
Description
Use primap pre-defined color to configure the action of mapping source precedence to target precedence through the specified colored priority mapping table in a traffic behavior.
Use undo primap pre-defined color to delete the action.
You must use the primap pre-defined color command together with the car command.
Related commands: display qos map-table color.
Examples
# Configure mapping DSCP precedence to drop precedence through the colored DSCP-to-drop priority mapping table in traffic behavior behavior1.
<Sysname> system-view
[Sysname] traffic behavior behavior1
[Sysname-behavior-behavior1] car cir 1600
[Sysname-behavior-behavior1] primap pre-defined color dscp-dp
redirect
Syntax
redirect { cpu | interface interface-type interface-number [ vlan vlan-id ] | next-hop { ipv4-add1 [ ipv4-add2 ] | ipv6-add1 [ interface-type interface-number ] [ ipv6-add2 [ interface-type interface-number ] ] } [ fail-action { discard | forward } ] }
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 interface-type interface-number: Redirects traffic to the interface specified by its interface number and interface type. The interface can be a normal Ethernet interface or a Layer 2 aggregate interface.
vlan vlan-id: Tags traffic redirected to an interface with the VLAN tag specified by vlan-id in the range of 1 to 4094.
next-hop: Redirects traffic to a next hop.
ipv4-add1/ipv4-add2: IPv4 address of the next hop. The ipv4-add2 argument backs up ipv4-add1. If redirecting traffic to ipv4-add1 fails, the switch redirects the traffic to ipv4-add2.
ipv6-add1/ipv6-add2: IPv6 address of the next hop. The ipv6-add2 argument backs up ipv6-add1. If redirecting traffic to ipv6-add1 fails, traffic will be redirected to ipv6-add2. If the specified next hop IPv6 address is a link-local address, you must also specify the outgoing interface. If otherwise, you do not need to specify the outgoing interface.
fail-action { discard | forward }: Specifies the action to take on a packet whose next hop address does not exist.
· discard: Drops the packet.
· forward: Forwards the packet by common routing. The fail-action keyword is forward by default.
Description
Use redirect to configure a traffic redirecting action in a traffic behavior.
Use undo redirect to delete the traffic redirecting action.
In IRF mode, the switch cannot redirect traffic to an aggregate interface.
Different from destination-based routing, QoS policy routing makes routing decisions based on the source address and other criteria. QoS policy routing takes precedence over destination-based routing. If a packet meets the match criteria, QoS policy routing applies. If not, destination-based routing applies.
In standalone mode, the switch does not support redirecting traffic to an aggregate interface on an LST1IPS2A1 card.
In IRF mode, the switch does not support redirecting traffic to the second internal port on an LST1IPS2A1 card on another member device.
To redirect traffic correctly to an internal port on an LST1IPS2A1 card by using a QoS policy, you must perform the following tasks:
· Assign the two internal ports to an aggregation group. Do not assign any other interface to the aggregation group.
· Set the minimum number of Selected ports in the aggregation group to 2.
Examples
# Configure redirecting traffic to GigabitEthernet 3/0/1 in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] redirect interface gigabitethernet 3/0/1
remark dot1p
Syntax
remark dot1p 8021p
undo remark dot1p
View
Traffic behavior view
Default level
2: System level
Parameters
8021p: Sets the 802.1p priority to be marked for packets, in the range of 0 to 7.
Description
Use remark dot1p to configure an 802.1p priority marking action in the traffic behavior.
Use undo remark dot1p to delete the action.
Related commands: qos policy, traffic behavior, and classifier behavior.
Examples
# Configure traffic behavior database to mark matching traffic with 802.1p 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark dot1p 2
remark drop-precedence
Syntax
remark drop-precedence drop-precedence-value
undo remark drop-precedence
View
Traffic behavior view
Default level
2: System level
Parameters
drop-precedence-value: Sets the drop precedence value to be marked for packets. The value range is 0 to 2: 0 for green packets, 1 for yellow packets, and 2 for red packets. The switch preferentially drops the packets with the highest drop precedence.
Description
Use remark drop-precedence to configure a drop precedence marking action.
Use undo remark drop-precedence to delete the action.
Related commands: qos policy, traffic behavior, and classifier behavior.
Examples
# Configure traffic behavior database to mark matching traffic with drop precedence 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark drop-precedence 2
remark dscp
Syntax
remark dscp dscp-value
undo remark dscp
View
Traffic behavior view
Default level
2: System level
Parameters
dscp-value: Sets the DSCP value to be marked for packets, in the range of 0 to 63. The value can also be a keyword, as shown in Table 4.
Table 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 remark dscp to configure a DSCP marking action in the traffic behavior.
Use undo remark dscp to delete the action.
Related commands: qos policy, traffic behavior, and classifier behavior.
Examples
# Configure traffic behavior database to mark matching traffic with DSCP 6.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark dscp 6
remark local-precedence
Syntax
remark local-precedence local-precedence
undo remark local-precedence
View
Traffic behavior view
Default level
2: System level
Parameters
local-precedence: Sets the local precedence value to be marked for packets, in the range of 0 to 7.
Description
Use remark local-precedence to configure a local precedence marking action in the traffic behavior.
Use undo remark local-precedence to delete the action.
Related commands: qos policy, traffic behavior, and classifier behavior.
Examples
# Configure traffic behavior database to mark matching traffic with local precedence value 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark local-precedence 2
remark mpls-exp
Syntax
remark mpls-exp exp-value
undo remark mpls-exp
View
Traffic behavior view
Default level
2: System level
Parameters
exp-value: Sets the EXP value to be marked for MPLS packets, in the range of 0 to 7.
Description
Use remark mpls-exp to configure an EXP marking action for MPLS packets.
Use undo remark mpls-exp to delete the action.
Related commands: qos policy, traffic behavior, and classifier behavior.
Examples
# Configure traffic behavior database to mark matching MPLS traffic with EXP 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark mpls-exp 2
traffic behavior
Syntax
traffic behavior behavior-name
undo traffic behavior behavior-name
View
System view
Default level
2: System level
Parameters
behavior-name: Behavior name, a string of 1 to 31 characters.
Description
Use traffic behavior to create a traffic behavior and enter traffic behavior view.
Use undo traffic behavior to delete a traffic behavior.
A traffic behavior is a set of actions, such as priority marking, dropping, rate limiting, and accounting. You provide QoS for a class of traffic by associating a traffic behavior with the class of traffic.
Related commands: qos policy, qos apply policy, and classifier behavior.
Examples
# Create traffic behavior behavior1 or enter its view.
<Sysname> system-view
[Sysname] traffic behavior behavior1
[Sysname-behavior-behavior1]
QoS policy configuration and application commands
classifier behavior
Syntax
classifier tcl-name behavior behavior-name
undo classifier tcl-name
View
Policy view
Default level
2: System level
Parameters
tcl-name: Specifies a traffic class name, a string of 1 to 31 characters.
behavior-name: Specifies a traffic behavior name, a string of 1 to 31 characters.
Description
Use classifier behavior to associate a behavior with a class in a QoS policy.
Use undo classifier to remove the class from the policy.
You can perform a set of QoS actions on a traffic class by associating a traffic behavior with the traffic class.
You can assign multiple classes to a QoS policy, and each class can associate with only one traffic behavior.
If the specified class or traffic behavior does not exist, the system creates a null class or 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]
control-plane
Syntax
In standalone mode:
control-plane slot slot-number
In IRF mode:
control-plane chassis chassis-number slot slot-number
View
System view
Default level
2: System level
Parameters
slot slot-number: Specifies a card by its slot number. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument refers to the ID of the IRF member device, and the slot-number argument refers to the number of the slot where the card resides, which can be displayed by using the display device command. (In IRF mode.)
Description
Use control-plane to enter control plane view of the specified card.
Examples
# Enter control plane view of the card in slot 3. (In standalone mode.)
<Sysname> system-view
[Sysname] control-plane slot 3
[Sysname-cp-slot3]
# Enter control plane view of the card in slot 3 on IRF member device 1. (In IRF mode.)
<Sysname> system-view
[Sysname] control-plane chassis 1 slot 3
[Sysname-cp-chassis1-slot3]
display qos policy control-plane
Syntax
In standalone mode:
display qos policy control-plane slot slot-number [ inbound ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display qos policy control-plane chassis chassis-number slot slot-number [ inbound ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
slot slot-number: Displays information about the QoS policy or policies applied to the control plane of the card specified by the slot number. (In standalone mode.)
inbound: Displays information about the QoS policy applied in the inbound direction of the control plane.
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument refers to the ID of the IRF member device, and the slot-number argument refers to the number of the slot where the card resides, which can be displayed by using the display device command. (In IRF mode.)
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos policy control-plane to display information about the QoS policy or policies applied to the specified control plane.
Examples
# Display information about the QoS policy applied in the inbound direction of the control plane of the card in slot 3. (In standalone mode.)
<Sysname> display qos policy control-plane slot 3 inbound
Control-plane slot 3
Direction: Inbound
Policy: 1
Classifier: 2
Operator: AND
Rule(s) : If-match acl 2000
Behavior: 2
Committed Access Rate:
CIR 128 (kbps), CBS 8000 (byte), EBS 0 (byte)
Red Action: discard
Green : 12928(Bytes)
Yellow: 7936(Bytes)
Red : 43904(Bytes)
# Display information about the QoS policy applied in the inbound direction of the control plane of the card in slot 3 on IRF member 1. (In IRF mode.)
<Sysname> display qos policy control-plane chassis 1 slot 3 inbound
Control-plane chassis 1 slot 3
Direction: Inbound
Policy: 1
Classifier: default-class
Matched : 0(Packets)
Rule(s) : If-match any
Behavior: be
Table 5 Command output
Field |
Description |
Control-plane |
Control plane. |
Direction |
Direction (inbound or outbound ) in which the policy is applied. |
Policy |
Policy name and its contents. |
Classifier |
Class name and its contents, which differ depending on your configuration. |
Matched |
Number of packets matching the specified criteria. |
Operator |
Logical relationship between match criteria. |
Rule(s) |
Match criteria. |
Behavior |
Name of the behavior, and the actions (which differ depending on your configuration) in the behavior. |
Committed Access Rate |
Information about CAR. |
CIR |
Committed information rate (CIR) in kbps. |
CBS |
Committed burst size in bytes, which specifies the depth of the token bucket for holding bursty traffic. |
EBS |
Excessive burst size (EBS) in bytes, which specifies the traffic exceeding CBS when two token buckets are used. |
Red Action |
Action to take on red packets. |
Green |
Statistics about green packets. |
Yellow |
Statistics about yellow packets. |
Red |
Statistics about red packets. |
none |
Indicates no other behavior is configured. |
display qos policy control-plane pre-defined
Syntax
In standalone mode:
display qos policy control-plane pre-defined [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display qos policy control-plane pre-defined [ chassis chassis-number slot slot-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
slot slot-number: Displays information about the pre-defined QoS policy applied to the control plane of the card specified by the slot number. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument refers to the ID of the IRF member device, and the slot-number argument refers to the number of the slot where the card resides, which can be displayed by using the display device command. (In IRF mode.)
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos policy control-plane pre-defined to display information about the pre-defined QoS policy applied to the control plane.
In standalone mode, if you do not specify a slot number, this command displays information about the pre-defined QoS policies applied to the control planes of all cards.
In IRF mode, if you do not specify the IRF member device ID and slot number, this command displays information about the pre-defined QoS policies applied to the control planes of all cards on all IRF member devices.
Examples
# Display information about the pre-defined QoS policy applied to the control plane of slot 3.
<Sysname> display qos policy control-plane pre-defined slot 3
Slot: 3
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Pre-defined Control-plane Policy Slot: 3
------------------------------------------------------------------------------
Index | PacketType | BandWidth(pps) | Priority
------------------------------------------------------------------------------
1 STP 200 7
2 ARP-BC 600 2
3 IGMP 2048 3
4 GVRP 100 7
5 MLD 500 3
6 PIM-MC 2000 4
7 DHCP 400 2
8 802.3ah 100 7
9 TTL(1) 20 3
10 HopLimit(1) 20 3
11 ARP-UC 600 3
12 LACP 100 7
13 CFD 20000 7
14 802.1X 4096 1
15 RRPP 300 3
16 DLDP 100 7
17 LLDP 200 7
18 Loopback 100 7
19 DHCP Snooping 600 0
20 Portal 400 1
21 VRRP/VRRP3 2000 5
22 RSVP 2000 4
23 UDP Helper 500 3
24 DHCPv6 400 2
25 ICMP ping 1000 6
26 PIM-UC 2000 4
27 SNMP 200 1
28 ISIS 1500 5
# Display information about the pre-defined QoS policy applied to the control plane of slot 3 on IRF member device 1. (In IRF mode.)
<Sysname> display qos policy control-plane pre-defined chassis 1 slot 5
Chassis 1 slot 5
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Pre-defined Control-plane Policy Chassis 1 slot 5
------------------------------------------------------------------------------
Index | PacketType | BandWidth(pps) | Priority
------------------------------------------------------------------------------
1 STP 200 7
2 ARP-BC 600 2
3 IGMP 2048 3
4 GVRP 100 7
5 MLD 500 3
6 PIM-MC 2000 4
7 DHCP 400 2
8 802.3ah 100 7
9 TTL(1) 20 3
10 HopLimit(1) 20 3
11 ARP-UC 600 3
12 LACP 100 7
13 CFD 20000 7
14 802.1X 4096 1
15 RRPP 300 3
16 DLDP 100 7
17 LLDP 200 7
18 Loopback 100 7
19 DHCP Snooping 600 0
20 Portal 400 1
21 VRRP/VRRP3 4000 5
22 RSVP 2000 4
23 UDP Helper 500 3
24 DHCPv6 400 2
25 ICMP ping 1000 6
26 PIM-UC 2000 4
27 SNMP 200 1
28 ISIS 1500 5
Table 6 Command output
Field |
Description |
Pre-defined Control-plane Policy |
Contents of the pre-defined control plane QoS policy. |
Index |
Pre-defined system index. |
Packet-type |
Matched criterion. |
display qos policy global
Syntax
In standalone mode:
display qos policy global [ slot slot-number ] [ inbound | outbound ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display qos policy global [ chassis chassis-number slot slot-number ] [ inbound | outbound ] [ | { begin | exclude | include } regular-expression ]
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.
slot slot-number: Specifies a card by its slot number. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Specifies a card on an IRF member switch. The chassis-number argument represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the card. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos policy global to display information about globally applied QoS policies.
If no direction is specified, this command displays information about global QoS policies applied in both directions.
If the slot-number argument is not specified, this command displays information about global QoS policies applied on the main processing unit.
Examples
# Display information about the global QoS policy applied in the inbound direction of the main processing unit.
<Sysname> display qos policy global inbound
Direction: Inbound
Policy: qpolicy
Classifier: tc1
Operator: AND
Rule(s) : If-match acl 2000
Behavior: tb1
Committed Access Rate:
CIR 1000 (kbps), CBS 100000 (byte), EBS 0 (byte)
Red Action: discard
Green : 0(Packets) 0(Bytes)
Yellow: 0(Packets) 0(Bytes)
Red : 0(Packets) 0(Bytes)
Marking:
Remark dot1p COS 5
Table 7 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied. |
Policy |
Policy name and its contents. |
Classifier |
Class name and its contents. |
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. |
Marking |
Information about marking. |
display qos policy interface
Syntax
display qos policy interface [ interface-type interface-number ] [ inbound | outbound ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
inbound: Displays QoS policy configuration and operational information in the inbound direction.
outbound: Displays QoS policy configuration and operational information in the outbound direction.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos policy interface to display QoS policy configuration and operational information.
Examples
# Display the QoS configuration and operational information in the inbound direction of interface GigabitEthernet 3/0/1.
<Sysname> display qos policy interface gigabitethernet 3/0/1 inbound
Interface: GigabitEthernet3/0/1
Direction: Inbound
Policy: qpolicy
Classifier: tc1
Operator: AND
Rule(s) : If-match acl 2000
Behavior: tb1
Committed Access Rate:
CIR 1000 (kbps), CBS 100000 (byte), EBS 0 (byte)
Red Action: discard
Green : 0(Packets) 0(Bytes)
Yellow: 0(Packets) 0(Bytes)
Red : 0(Packets) 0(Bytes)
Marking:
Remark dot1p COS 5
Table 8 Command output
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. |
Marking |
Marking-related information. |
display qos policy user-defined
Syntax
display qos policy user-defined [ policy-name [ classifier tcl-name ] ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
policy-name: QoS policy name, a string of 1 to 31 characters. If no policy is specified, this command displays configuration information of all the user-defined policies.
tcl-name: Class name, a string of 1 to 31 characters.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos policy user-defined to display QoS user-defined 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: qpolicy
Classifier: tc1
Behavior: tb1
Committed Access Rate:
CIR 1000 (kbps), CBS 100000 (byte), EBS 0 (byte)
Red Action: discard
Marking:
Remark dot1p COS 5
Table 9 Command output
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. For more information, see the traffic classifier command. |
Behavior |
Behavior associated with the class. A behavior is associated with a class. It can be configured with multiple actions. For more information, see the traffic behavior command. |
Committed Access Rate |
Information related to rate limit. |
CIR |
Committed information rate (in kbps) |
CBS |
Committed burst size (in bytes), that is, the depth of the token bucket for holding bursty traffic. |
EBS |
Excess burst size (in byes), that is, the burst traffic exceeding the CBS in the two-token-bucket algorithm. |
Red Action |
Action to take on red packets. |
Marking |
Information related to priority marking. |
display qos vlan-policy
Syntax
In standalone mode:
display qos vlan-policy { name policy-name | vlan [ vlan-id ] } [ slot slot-number ] [ inbound | outbound ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display qos vlan-policy { name policy-name | vlan [ vlan-id ] } [ chassis chassis-number slot slot-number ] [ inbound | outbound ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
name policy-name: Displays the information of the specified VLAN QoS policy.
vlan vlan-id: Specifies the ID of a VLAN to display the QoS policy applied to it.
slot slot-number: Specifies a card by its slot number. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Specifies a card on an IRF member switch. The chassis-number argument represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the card. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.
inbound: Displays the QoS policy applied to the inbound direction of each specified VLAN.
outbound: Displays the QoS policy applied to the outbound direction of each specified VLAN.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos vlan-policy to display VLAN QoS policy information.
· If no direction is specified, this command displays the VLAN QoS policy information in both directions.
· In standalone mode, if no slot number is specified, this command displays the VLAN QoS policy information of the switch.
· In IRF mode, if neither chassis number nor slot number is specified, this command displays the VLAN QoS policy information of the IRF fabric.
Examples
# Display the QoS policy applied to the inbound direction of VLAN 2.
<Sysname> display qos vlan-policy vlan 2 inbound
Vlan 2
Direction: Inbound
Policy: qpolicy
Classifier: tc1
Operator: AND
Rule(s) : If-match acl 2000
Behavior: tb1
Committed Access Rate:
CIR 1000 (kbps), CBS 100000 (byte), EBS 0 (byte)
Red Action: discard
Green : 0(Packets) 0(Bytes)
Yellow: 0(Packets) 0(Bytes)
Red : 0(Packets) 0(Bytes)
Marking:
Remark dot1p COS 5
Table 10 Command output
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. |
Policy |
Name of the policy. |
Classifier |
Class name and its contents. |
Operator |
Logical relationship between match criteria. |
Rule(s) |
Match criteria. |
Behavior |
Name of the behavior, and its actions. |
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. |
Marking |
Marking-related information. |
qos apply policy
Syntax
qos apply policy policy-name { inbound | outbound }
undo qos apply policy [ policy-name ] { inbound | outbound }
View
Interface view, port group view, control plane view
Default level
2: System level
Parameters
policy policy-name: Specifies a policy by its name, which is a string of 1 to 31 characters.
inbound: Applies the QoS policy in the inbound direction.
outbound: Applies the QoS policy in the outbound direction. This keyword is not available in control plane view.
Description
Use qos apply policy to apply a QoS policy to an interface, all ports in a port group, or the control plane.
Use undo qos apply policy to remove the QoS policy.
When you apply a QoS policy to the control plane of the slot where the IRF port resides, if a class in the QoS policy uses an Ethernet frame header ACL configured with rule permit to match all packets, do not configure car cir or filter deny in the behavior associated with the class. Otherwise, the IRF might split, and the switch cannot work correctly.
If you apply a QoS policy whose name is inbound (case-insensitive), outbound (case-insensitive), or the first several characters (case-insensitive) of inbound or outbound in interface view, port group view, or control plane view, to remove the QoS policy, you can only use the undo qos apply policy command without specifying the QoS policy name.
Examples
# Apply policy USER1 in the outbound direction of GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/0/1
[Sysname-GigabitEthernet3/0/1] qos apply policy USER1 outbound
# Apply QoS policy aaa to the control plane of the card in slot 3.
<Sysname> system-view
[Sysname] control-plane slot 3
[Sysname-cp-slot3] qos apply policy aaa inbound
qos apply policy global
Syntax
qos apply policy policy-name global { inbound | outbound }
undo qos apply policy [ policy-name ] 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 qos apply policy global 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 undo qos apply policy global to cancel the global application of the QoS policy.
If the hardware resources of an interface card are insufficient, applying a QoS policy globally will fail on the interface card. In this case, the system does not automatically roll back the QoS policy configuration already applied to the main processing unit or other interface cards. To ensure consistency, you must manually remove the QoS policy configuration applied to them. Do the same thing if a global QoS policy fails to update on an interface card after being dynamically modified.
If you globally apply a QoS policy whose name is global (case-insensitive) or the first several characters (case-insensitive) of global, to remove the QoS policy, you can only use the undo qos apply policy global command without specifying the QoS policy name.
Examples
# Apply the QoS policy user1 in the inbound direction globally.
<Sysname> system-view
[Sysname] qos apply policy user1 global inbound
qos policy
Syntax
qos policy policy-name
undo qos policy policy-name
View
System view
Default level
2: System level
Parameters
policy policy-name: Policy name, a string of 1 to 31 characters.
Description
Use qos policy to create a policy and enter policy view.
Use undo qos policy to remove a policy.
You cannot delete a policy that has been applied. To delete a policy that has been applied, for example, to an interface, you must remove the policy from the interface first.
Related commands: classifier behavior, qos apply policy, qos vlan-policy, and qos apply policy global.
Examples
# Define a policy named user1.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1]
qos vlan-policy
Syntax
qos vlan-policy policy-name vlan vlan-id-list { inbound | outbound }
undo qos vlan-policy [ policy-name ] 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. These VLANs must be manually created VLANs that already exist.
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 qos vlan-policy to apply a QoS policy to the specified VLAN(s).
Use undo qos vlan-policy to remove the QoS policy applied to the specified VLAN(s).
VLAN QoS policies will be applied globally to all interface cards. If the hardware resources of an interface card are insufficient, applying a QoS policy to VLANs will fail on the interface card. In this case, the system does not automatically roll back the QoS policy configuration already applied to the main processing unit or other interface cards. To ensure consistency, you must manually remove the QoS policy configuration applied to them. Do the same thing if a VLAN QoS policy fails to update on an interface card after being dynamically modified.
If you apply a QoS policy whose name is vlan (case-insensitive) or the first several characters (case-insensitive) of vlan in VLAN view, to remove the QoS policy, you can only use the undo qos vlan-policy command without specifying the QoS policy name.
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
reset qos policy control-plane
Syntax
In standalone mode:
reset qos policy control-plane slot slot-number [ inbound ]
In IRF mode:
reset qos policy control-plane chassis chassis-number slot slot-number [ inbound ]
View
User view
Default level
1: Monitor level
Parameters
slot slot-number: Clears the statistics of the QoS policy or policies applied to the control plane of the card specified by the slot number. (In standalone mode.)
inbound: Clears the statistics of the QoS policy applied to the inbound direction of the control plane.
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument refers to the ID of the IRF member device, and the slot-number argument refers to the number of the slot where the card resides, which can be displayed by using the display device command. (In IRF mode.)
Description
Use reset qos policy control-plane to clear the statistics of the QoS policy applied in a certain direction of a control plane.
Examples
# Clear the statistics of the QoS policy applied in the inbound direction of the control plane of card 3. (In standalone mode.)
<Sysname> reset qos policy control-plane slot 3 inbound
# Clear the statistics of the QoS policy applied in the inbound direction of the control plane of card 3 on IRF member 1. (In IRF mode.)
<Sysname> reset qos policy control-plane chassis 1 slot 3 inbound
reset qos policy global
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 reset qos policy global 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
reset qos vlan-policy
Syntax
reset qos vlan-policy [ vlan vlan-id ] [ inbound | outbound ]
View
User view
Default level
1: Monitor level
Parameters
vlan-id: Specifies a VLAN by its 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 reset qos vlan-policy to clear VLAN QoS policy statistics.
Examples
# Clear the QoS policy statistics of VLAN 2.
<Sysname> reset qos vlan-policy vlan 2
Priority mapping table configuration commands
display qos map-table
Syntax
display qos map-table [ inbound { dot1p-dot1p | dot1p-dp | dot1p-dscp | dot1p-exp | dot1p-lp | dscp-dot1p| dscp-dp | dscp-dscp | dscp-exp | dscp-lp | exp-dot1p | exp-dp | exp-dscp | exp-lp | up-lp | up-up } | outbound { up-dp | up-fc | up-lp | up-rpr } ] [ dot1p-dot1p | dot1p-dp | dot1p-dscp | dot1p-exp | dot1p-lp | dscp-dot1p| dscp-dp | dscp-dscp | dscp-exp | dscp-lp | exp-dot1p | exp-dp | exp-dscp | exp-lp | up-dp | up-fc | up-lp | up-rpr | up-up ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
inbound: Specifies a priority mapping table for incoming packets.
outbound: Specifies a priority mapping table for outgoing packets.
dot1p-dot1p: 802.1p-to-802.1p mapping table.
dot1p-dp: 802.1p-to-drop priority mapping table.
dot1p-dscp: 802.1p-to-DSCP mapping table.
dot1p-exp: 802.1p-to-EXP mapping table.
dot1p-lp: 802.1p-to-local precedence mapping table.
dscp-dot1p: DSCP-to-802.1p mapping table.
dscp-dp: DSCP-to-drop priority mapping table.
dscp-dscp: DSCP-to-DSCP mapping table.
dscp-exp: DSCP-to-EXP mapping table.
dscp-lp: DSCP-to-local precedence mapping table.
exp-dot1p: EXP-to-802.1p mapping table.
exp-dp: EXP-to-drop priority mapping table.
exp-dscp: EXP-to-DSCP mapping table.
exp-lp: EXP-to-local precedence mapping table.
up-dp: User precedence-to-drop priority mapping table.
up-fc: User precedence-to-forwarding-class priority mapping table.
up-lp: User precedence-to-local precedence mapping table.
up-rpr: User precedence-to-RPR priority mapping table.
up-up: User precedence-to-user precedence mapping table.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos map-table to display the configuration of a priority mapping table.
If no priority mapping table is specified, this command displays the configuration information of all priority mapping tables.
Related commands: qos map-table.
Examples
# Display the configuration information of the 802.1p-to-local precedence mapping table.
<Sysname> display qos map-table dot1p-lp
MAP-TABLE NAME: dot1p-lp TYPE: pre-define
IMPORT : EXPORT
0 : 2
1 : 0
2 : 1
3 : 3
4 : 4
5 : 5
6 : 6
7 : 7
# Display the configuration information of the 802.1p-to-drop priority mapping table.
<Sysname> display qos map-table dot1p-dp
MAP-TABLE NAME: dot1p-dp TYPE: pre-define DIRECTION: inbound
IMPORT : EXPORT
0 : 0
1 : 0
2 : 0
3 : 0
4 : 0
5 : 0
6 : 0
7 : 0
Table 11 Command output
Field |
Description |
MAP-TABLE NAME |
Name of the priority mapping table. |
TYPE |
Type of the priority mapping table. |
DIRECTION |
Direction of the priority mapping table. |
IMPORT |
Input values of the priority mapping table. |
EXPORT |
Output values of the priority mapping table. |
display qos map-table color
Syntax
display qos map-table color [ [ green | yellow | red ] [ inbound [ dot1p-dot1p | dot1p-dp | dot1p-dscp | dot1p-exp | dot1p-lp | dscp-dot1p | dscp-dp | dscp-dscp | dscp-exp | dscp-lp | exp-dot1p | exp-dp | exp-dscp | exp-exp | exp-lp ] | outbound [ dot1p-dot1p | dot1p-dscp | dot1p-exp | dscp-dot1p | dscp-dscp | dscp-exp | exp-dot1p | exp-dscp | exp-exp ] ] | up-dscp ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
green: Specifies green packets.
yellow: Specifies yellow packets.
red: Specifies red packets.
inbound: Specifies the priority mapping table for incoming packets.
outbound: Specifies the priority mapping table for outgoing packets.
dot1p-dot1p: 802.1p-to-802.1p mapping table.
dot1p-dp: 802.1p-to-drop priority mapping table. This keyword applies only to the inbound direction.
dot1p-dscp: 802.1p-to-DSCP mapping table.
dot1p-exp: 802.1p-to-EXP mapping table.
dot1p-lp: 802.1p-to-local precedence mapping table. This keyword applies only to the inbound direction.
dscp-dot1p: DSCP-to-802.1p mapping table.
dscp-dp: DSCP-to-drop priority mapping table. This keyword applies only to the inbound direction.
dscp-dscp: DSCP-to-DSCP mapping table.
dscp-exp: DSCP-to-EXP mapping table.
dscp-lp: DSCP-to-local precedence mapping table. This keyword applies only to the inbound direction.
exp-dot1p: EXP-to-802.1p mapping table.
exp-dp: EXP-to-drop priority mapping table. This keyword applies only to the inbound direction.
exp-dscp: EXP-to-DSCP mapping table.
exp-exp: EXP-to-EXP mapping table.
exp-lp: EXP-to-local precedence mapping table. This keyword applies only to the inbound direction.
up-dscp: User precedence-to-DSCP mapping table.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos map-table color to display the configuration of a colored priority mapping table.
If no priority table type is specified, this command displays the configuration of all the colored priority mapping tables.
If no color is specified, this command displays the configuration information of all the colored priority mapping tables.
If no direction is specified, this command displays the configurations of the colored priority mapping tables in both directions.
|
NOTE: The user precedence-related priority mapping tables can be configured, but do not take effect. |
Related commands: qos map-table color.
Examples
# Display the configuration of the EXP-to-local precedence mapping table for incoming green packets.
<Sysname> display qos map-table color green exp-lp
MAP-TABLE NAME: exp-lp TYPE: pre-define COLOR: green DIRECTION: inbound
IMPORT : EXPORT
0 : 0
1 : 1
2 : 2
3 : 3
4 : 4
5 : 5
6 : 6
7 : 7
Field |
Description |
MAP-TABLE NAME |
Priority mapping table name. |
TYPE |
Priority mapping table type. |
COLOR |
Priority mapping table color. |
DIRECTION |
Direction of the priority mapping table. |
IMPORT |
Input values of the priority mapping table. |
EXPORT |
Output values of the priority mapping table. |
import
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 import to configure a mapping from one or multiple input values to an output value.
Use undo import to restore the specified or all mappings to the default mappings.
Related commands: display qos map-table, display qos map-table color.
Examples
# In the inbound direction, configure the 802.1p-to-drop priority mapping table to map 802.1p priority values 4 and 5 to drop precedence 1.
<Sysname> system-view
[Sysname] qos map-table inbound dot1p-dp
[Sysname-maptbl-in-dot1p-dp] import 4 5 export 1
qos map-table
Syntax
qos map-table { { inbound { dot1p-dot1p | dot1p-dp | dot1p-dscp | dot1p-exp | dot1p-lp | dscp-dot1p | dscp-dp | dscp-dscp | dscp-exp | dscp-lp | exp-dot1p | exp-dp | exp-dscp | exp-lp | up-lp | up-up } } | { outbound { up-lp | up-dp | up-fc | up-rpr } } }
View
System view
Default level
2: System level
Parameters
inbound: Specifies the priority mapping table for incoming packets.
outbound: Specifies the priority mapping table for outgoing packets.
dot1p-dot1p: 802.1p-to-802.1p mapping table.
dot1p-dp: 802.1p-to-drop priority mapping table.
dot1p-dscp: 802.1p-to-DSCP mapping table.
dot1p-exp: 802.1p-to-EXP mapping table.
dot1p-lp: 802.1p-to-local precedence mapping table.
dscp-dot1p: DSCP-to-802.1p mapping table.
dscp-dp: DSCP-to-drop priority mapping table.
dscp-dscp: DSCP-to-DSCP mapping table.
dscp-exp: DSCP-to-EXP mapping table.
dscp-lp: DSCP-to-local precedence mapping table.
exp-dot1p: EXP-to-802.1p mapping table.
exp-dp: EXP-to-drop priority mapping table.
exp-dscp: EXP-to-DSCP mapping table.
exp-lp: EXP-to-local precedence mapping table.
up-dp: User precedence-to-drop priority mapping table.
up-fc: User-to-forwarding-class mapping table.
up-lp: User precedence-to-local precedence mapping table.
up-rpr: User-to-RPR mapping table.
up-up: User precedence-to-user precedence mapping table.
Description
Use qos map-table to enter the specified priority mapping table view.
The user precedence-related priority mapping tables can be configured, but do not take effect.
Related commands: display qos map-table.
Examples
# Enter the inbound 802.1p-to-drop priority mapping table view.
<Sysname> system-view
[Sysname] qos map-table inbound dot1p-dp
[Sysname-maptbl-in-dot1p-dp]
qos map-table color
Syntax
qos map-table color { green | yellow | red } { inbound { dot1p-dot1p | dot1p-dp | dot1p-dscp | dot1p-exp | dot1p-lp | dscp-dot1p | dscp-dp | dscp-dscp | dscp-exp | dscp-lp | exp-dot1p | exp-dp | exp-dscp | exp-exp | exp-lp } | outbound { dot1p-dot1p | dot1p-dscp | dot1p-exp | dscp-dot1p | dscp-dscp | dscp-exp | exp-dot1p | exp-dscp | exp-exp } | up-dscp }
View
System view
Default level
2: System level
Parameters
green: Specifies green packets.
yellow: Specifies yellow packets.
red: Specifies red packets.
inbound: Specifies a priority mapping table for incoming packets.
outbound: Specifies a priority mapping table for outgoing packets.
dot1p-dot1p: 802.1p-to-802.1p mapping table.
dot1p-dp: 802.1p-to-drop priority mapping table. This keyword applies only to the inbound direction.
dot1p-dscp: 802.1p-to-DSCP mapping table.
dot1p-exp: 802.1p-to-EXP mapping table.
dot1p-lp: 802.1p-to-local precedence mapping table. This keyword applies only to the inbound direction.
dscp-dot1p: DSCP-to-802.1p mapping table.
dscp-dp: DSCP-to-drop priority mapping table. This keyword applies only to the inbound direction.
dscp-dscp: DSCP-to-DSCP mapping table.
dscp-exp: DSCP-to-EXP mapping table.
dscp-lp: DSCP-to-local precedence mapping table. This keyword applies only to the inbound direction.
exp-dot1p: EXP-to-802.1p mapping table.
exp-dp: EXP-to-drop priority mapping table. This keyword applies only to the inbound direction.
exp-dscp: EXP-to-DSCP mapping table.
exp-exp: EXP-to-EXP mapping table.
exp-lp: EXP-to-local precedence mapping table. This keyword applies only to the inbound direction.
up-dscp: User precedence-to-DSCP mapping table.
Description
Use qos map-table color to enter the specified colored priority mapping table view in the specified direction.
The user precedence-related priority mapping tables can be configured, but do not take effect.
Related commands: display qos map-table color.
Examples
# Enter the green EXP-to-local precedence mapping table view in the inbound direction.
<Sysname> system-view
[Sysname] qos map-table color green inbound exp-lp
[Sysname-maptbl-green-in-exp-lp]
Port priority configuration commands
qos priority
Syntax
qos priority { dot1p | dp | dscp | exp | lp } priority-value
undo qos priority { dot1p | dp | dscp | exp | lp }
View
Ethernet interface view, port group view
Default level
2: System level
Parameters
priority-value: Port priority value. See Table 13 for the range of each type of port priority.
Table 13 Value ranges of different types of port priority
Port priority type |
Range |
Default |
dot1p (802.1p priority) |
0 to 7 |
None |
dp (drop precedence) |
0 to 2 |
0 |
dscp (DSCP precedence) |
0 to 63 |
None |
exp (EXP precedence) |
0 to 7 |
None |
lp (local precedence) |
0 to 7 |
2 |
Description
Use qos priority to configure trusting port priority and set a priority for a port.
Use undo qos priority to restore the default.
To view the port priority of a port, use the display qos trust interface command.
Examples
# Configure trusting port priority and set the 802.1p priority of GigabitEthernet 3/0/3 to 2.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/0/3
[Sysname-GigabitEthernet3/0/3] qos priority dot1p 2
Trusted packet priority type configuration commands
display qos trust interface
Syntax
display qos trust interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos trust interface to display the trusted packet priority type and port priority of an interface.
If no interface is specified, this command displays the trusted packet priority types and port priority values of all interfaces.
Examples
# Display the trusted packet priority type and port priority of port GigabitEthernet 3/0/3.
<Sysname> display qos trust interface gigabitethernet 3/0/3
Interface: GigabitEthernet3/0/3
Port priority information
Port dot1p priority: -
Port dp priority: 0
Port dscp priority: -
Port exp priority: -
Port lp priority: 2
Port priority trust type: untrust, Override: disable
Table 14 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Port priority |
Port priority. |
Port priority trust type |
Trusted precedence type. |
Override |
Whether the precedence derived through priority mapping overwrites the previous precedence carried in the packet. |
|
NOTE: In the output from the display qos trust interface command for a port which is configured with the untrust mode and not configured with the qos priority command, the lp priority field is 2, the dp priority field is 0, and the other priority fields have no default values. |
qos trust
Syntax
qos trust { auto | dot1p | dscp | exp } [ override ]
undo qos trust
View
Ethernet interface view, port group view
Default level
2: System level
Parameters
auto: Uses the precedence in the received packets for mapping. For Layer 2 packets, the 802.1p priority is used; for Layer 3 packets, the IP precedence is used preferentially; for MPLS packets, the EXP value is used preferentially.
dot1p: Trusts the 802.1p priority and uses this precedence for priority mapping.
dscp: Trusts the DSCP precedence and uses this precedence for priority mapping.
exp: Trusts the EXP value of MPLS packets and uses it for priority mapping. This keyword does not support the override keyword.
override: Indicates that the precedence derived through priority mapping overwrites the previous precedence carried in the packet. By default, this keyword is not specified. This keyword does not support the exp keyword.
Description
Use qos trust to configure the trusted packet priority type on an interface.
Use undo qos trust to restore the default.
By default, the priority trust mode of a port is untrust, that is, the port priority is trusted.
Examples
# Configure GigabitEthernet 3/0/3 to trust the 802.1p priority.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/0/3
[Sysname-GigabitEthernet3/0/3] qos trust dot1p
Traffic policing commands
display car resource
Syntax
In standalone mode:
display car resource [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display car resource [ chassis chassis-number slot slot-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
slot slot-number: Specifies a card by its slot number. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Specifies a card on an IRF member switch. The chassis-number argument represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the card. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display car resource to display CAR resources usage information.
If no slot is specified, this command displays CAR resources usage information for all in-position cards.
Examples
# Display CAR resources usage information for all in-position cards.
<Sysname> display car resource
Slot: 3
Resource Type Total Reserved Configured Remaining Start End
Number Number Number Number Port Name Port Name
------------------------------------------------------------------------------
INBOUND-CAR 4096 0 0 4096 GE3/0/1 GE3/0/24
INBOUND-COUNT 4096 0 0 4096 GE3/0/1 GE3/0/24
OUTBOUND-CAR 2048 0 0 2048 GE3/0/1 GE3/0/24
OUTBOUND-COUNT 2048 0 0 2048 GE3/0/1 GE3/0/24
Table 15 Command output
Field |
Description |
Slot |
Slot number of a card. |
Resource Type |
Resource type: INBOUND-CAR for upstream CAR resources, OUTBOUND-CAR for downstream CAR resources. |
Total Number |
Number of CAR entries supported in the specified direction. |
Reserved Number |
Number of CAR entries reserved in the specified direction. |
Configured Number |
Number of CAR entries that have been configured in the specified direction. |
Remaining Number |
Number of CAR entries left in the specified direction. |
Start Port Name |
Name of the start port. |
End Port Name |
Name of the end port. |
|
NOTE: · The upstream counter and the downstream counter share the resources. · Each CAR entry uses one CAR resource and one counter resource. |
GTS commands
display qos gts interface
Syntax
display qos gts interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos gts interface to display the generic traffic shaping (GTS) configurations on an interface.
If no interface is specified, this command displays the GTS configurations on all interfaces.
Examples
# Display the GTS configurations on all interfaces.
<Sysname> display qos gts interface
Interface: GigabitEthernet3/0/3
Rule(s): If-match any
CIR 1000 (kbps), CBS 100000 (byte)
Table 16 Command output
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, which specifies the depth of the token bucket for holding bursty traffic. |
qos gts
Syntax
qos gts { any | queue queue-number } cir committed-information-rate [ cbs committed-burst-size ]
undo qos gts { any | queue queue-number }
View
Ethernet interface view, port group view
Default level
2: System level
Parameters
any: Shapes all packets.
queue queue-number: Shapes the packets in a queue specified by its number in the range of 0 to 7.
cir committed-information-rate: Committed information rate (CIR) in kbps. The value range for the committed-information-rate argument is 1000 to 1000000 on a GE port and 2500 to 10000000 on a 10-GE port.
cbs committed-burst-size: Committed burst size (CBS) in the range of 16384 to 16777215 bytes. By default, the CBS is the traffic transmitted at the rate of CIR in 500 milliseconds.
Description
Use qos gts to set GTS parameters for traffic in a specific queue or all traffic on one interface in interface view or a group of interfaces in port group view.
Use undo qos gts to remove GTS parameters for traffic in a specific queue or all traffic on the interface or port group.
By default, no GTS parameters are configured on any interfaces.
Examples
# Set GTS parameters for all traffic on port GigabitEthernet 3/0/6.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/0/6
[Sysname-GigabitEthernet3/0/6] qos gts any cir 1200
SP queuing commands
display qos sp
Syntax
display qos sp interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos sp interface to view the strict priority (SP) queuing configuration of an interface.
If no interface is specified, this command displays the SP queuing configuration of all the interfaces.
Related commands: qos sp.
Examples
# Display the SP queuing configuration of GigabitEthernet 4/0/7.
<Sysname> display qos sp interface GigabitEthernet4/0/7
Interface: GigabitEthernet4/0/7
Output queue: Strict-priority queue
Table 17 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Output queue |
Pattern of the current output queue. |
Strict-priority queue |
SP queuing is used for queue scheduling. |
qos sp
Syntax
qos sp
undo qos sp
View
Interface view, port group view
Default level
2: System level
Parameters
None
Description
Use qos sp to configure SP queuing on an interface.
Use undo qos sp to restore the default.
The default queuing algorithm on an interface is SP queuing.
Settings in interface view take effect on the current interface. Settings in port group view take effect on all ports in the port group.
Related commands: display qos sp interface.
Examples
# Enable SP queuing on GigabitEthernet 4/0/7.
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/7
[Sysname-GigabitEthernet4/0/7] qos sp
WFQ commands
display qos wfq interface
Syntax
display qos wfq interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos wfq interface to display the weighted fair queuing (WFQ) configuration on an interface.
If no interface is specified, this command displays the WFQ configuration of all WFQ-enabled interfaces.
Related commands: qos wfq.
Examples
# Display the WFQ configuration of GigabitEthernet 2/0/1.
<Sysname> display qos wfq interface GigabitEthernet 2/0/1
Interface: GigabitEthernet2/0/1
Output queue: Hardware weighted fair queue
Queue ID Weight Min-Bandwidth
---------------------------------------------
0 1 40
1 1 200
2 1 40
3 1 40
4 1 40
5 1 40
6 1 40
7 1 40
Table 18 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Output queue |
Pattern of the current output queue. |
Queue ID |
ID of a queue. |
Min-Bandwidth |
Minimum guaranteed bandwidth in kbps for a queue. |
qos bandwidth queue
Syntax
qos bandwidth queue queue-id min bandwidth-value
undo qos bandwidth queue queue-id [ min bandwidth-value ]
View
Interface view
Default level
2: System level
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
min bandwidth-value: Sets the minimum guaranteed bandwidth (in kbps) for a queue when the port is congested.
· On a GE port, this argument is in the range of 40 to 1000000.
· On a 10-GE port, this argument is in the range of 40 to 2500000.
Description
Use qos bandwidth queue to set the minimum guaranteed bandwidth for a specified queue on the port.
Use undo qos bandwidth queue to restore the default.
By default, the minimum guaranteed bandwidth is 40 kbps for a queue.
Examples
# Set the minimum guaranteed bandwidth to 100 kbps for queue 1 on GigabitEthernet 2/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 2/0/1
[Sysname-GigabitEthernet2/0/1] qos wfq
[Sysname-GigabitEthernet2/0/1] qos bandwidth queue 1 min 100
qos wfq
Syntax
qos wfq
undo qos wfq
View
Interface view, port group view
Default level
2: System level
Parameters
Description
Use qos wfq to enable WFQ on an interface.
Use undo qos wfq to restore the default queuing algorithm on an interface.
The default queuing algorithm on an interface is SP queuing.
Settings in interface view take effect on the current interface. Settings in port group view take effect on all ports in the port group.
After you enable WFQ on an interface, each queue of the interface is a WFQ queue, and is assigned scheduling weight 1 and minimum guaranteed bandwidth 40 kbps by default.
Examples
# Enable WFQ on GigabitEthernet 2/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 2/0/1
[Sysname-GigabitEthernet2/0/1] qos wfq
qos wfq weight
Syntax
qos wfq queue-id weight schedule-value
undo qos wfq queue-id weight
View
Interface view
Default level
2: System level
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
weight schedule-value: Specifies a scheduling weight for the specified queue. The value range for the schedule-value argument is 1 to 63.
Description
Use qos wfq weight to configure the scheduling weight for a WFQ queue on an interface.
Use undo qos wfq weight to restore the default.
By default, the scheduling weight of a WFQ queue is 1.
Related commands: display qos wfq interface.
Examples
# Enable WFQ on GigabitEthernet 2/0/1, and configure the scheduling weight as 20 for queue 3 and 30 for queue 4.
<Sysname> system-view
[Sysname] interface GigabitEthernet 2/0/1
[Sysname-GigabitEthernet2/0/1] qos wfq
[Sysname-GigabitEthernet2/0/1] qos wfq 3 weight 20
[Sysname-GigabitEthernet2/0/1] qos wfq 4 weight 30
Queue scheduling profile configuration commands
display qos qmprofile configuration
Syntax
display qos qmprofile configuration [ profile-name ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
profile-name: Queue scheduling profile name, a string of 1 to 31 case-sensitive characters.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos qmprofile configuration to display queue scheduling profile configuration.
If a queue scheduling profile is specified, this command displays only the configuration of the profile. If no queue scheduling profile is specified, this command displays the configuration of all queue scheduling profiles.
Examples
# Display the configuration of queue scheduling profile myprofile.
<Sysname> display qos qmprofile configuration myprofile
Queue management profile: myprofile
Queue ID Type Group Weight
-----------------------------------
0 SP N/A N/A
1 SP N/A N/A
2 SP N/A N/A
3 SP N/A N/A
4 SP N/A N/A
5 SP N/A N/A
6 WRR 1 200
7 SP N/A N/A
Table 19 Command output
Field |
Description |
Queue management profile |
Queue scheduling profile name. |
Queue ID |
ID of a queue. |
Type |
Queue scheduling type: SP or WRR. |
Group |
For a WRR queue, this field displays the WRR priority group to which the queue belongs. For a queue using any other scheduling mechanism, this field is insignificant and N/A is displayed. |
Weight |
Scheduling weight. If the field is insignificant, N/A is displayed. |
display qos qmprofile interface
Syntax
display qos qmprofile interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos qmprofile interface to display the queue scheduling profile applied to the specified interface.
If no interface is specified, this command displays all queue scheduling profiles applied to interfaces.
Examples
# Display the queue scheduling profile applied to GigabitEthernet 3/0/1.
<Sysname> display qos qmprofile interface gigabitethernet 3/0/1
Interface: GigabitEthernet3/0/1
Queue management profile: myprofile
qos apply qmprofile
Syntax
qos apply qmprofile profile-name
undo qos apply qmprofile
View
Interface view, port group view
Default level
2: System level
Parameters
profile-name: Queue scheduling profile name, a string of 1 to 31 case-sensitive characters.
Description
Use qos apply qmprofile to apply a queue scheduling profile to an interface or port group.
Use undo qos apply qmprofile to restore the default.
By default, each queue uses the SP algorithm.
Only one queue scheduling profile can be applied to an interface.
Examples
# Apply queue scheduling profile myprofile to GigabitEthernet3/0/1
[Sysname] interface gigabitethernet 3/0/1
[Sysname-GigabitEthernet3/0/1] qos apply qmprofile myprofile
qos qmprofile
Syntax
qos qmprofile profile-name
undo qos qmprofile profile-name
View
System view
Default level
2: System level
Parameters
profile-name: Queue scheduling profile name, a string of 1 to 31 case-sensitive characters.
Description
Use qos qmprofile to create a queue scheduling profile and enter queue scheduling profile view.
Use undo qos qmprofile to delete a queue scheduling profile.
To delete a queue scheduling profile already applied to an interface, remove it from the interface first and then delete it.
Examples
# Create queue scheduling profile myprofile and enter queue scheduling profile view.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile]
queue
Syntax
queue queue-id { sp | wrr group group-id weight weight-value }
undo queue queue-id
View
Queue scheduling profile view
Default level
2: System level
Parameters
queue-id: Specifies a queue by its ID in the range of 1 to 7.
sp: Enables SP for the queue.
wrr: Enables WRR for the queue.
group-id: WRR priority group ID in the range of 1 to 2.
weight-value: Scheduling weight in the range of 1 to 250.
Description
Use queue to configure queue scheduling parameters.
Use undo queue to restore the default.
By default, each queue uses the SP algorithm.
The queue IDs in a WRR group must be successive. If not, queue scheduling might be performed inaccurately.
Examples
# Create queue scheduling profile myprofile and configure queue 0 to use SP.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] queue 0 sp
# Create queue scheduling profile myprofile, configure queue 1 to use WRR, set the scheduling weight of queue 1 to 100, and assign queue 1 to WRR priority group 0.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] queue 1 wrr group 0 weight 100
WRED configuration commands
display qos wred interface
Syntax
display qos wred interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos wred interface to display WRED configuration on the specified interface.
If no interface is specified, this command displays the WRED configuration of all interfaces.
Examples
# Display the WRED configuration and statistics of all interfaces.
<Sysname> display qos wred interface
Interface: GigabitEthernet3/0/6
Current WRED configuration:
WRED: Enable
qos wred enable
Syntax
qos wred enable
undo qos wred enable
View
Interface view, port group view
Default level
2: System level
Parameters
None
Description
Use qos wred enable to enable WRED on an interface.
Use undo qos wred enable to restore the default drop policy.
By default, tail drop is used.
Examples
# Enable WRED on interface GigabitEthernet 3/0/6.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/0/6
[Sysname-GigabitEthernet3/0/6] qos wred enable
car name
Syntax
car name car-name
undo car
View
Traffic behavior view
Default level
2: System level
Parameters
car-name: Name of an aggregate CAR action, which must already exist.
Description
Use car name to reference an aggregate CAR action for the traffic behavior.
Use undo car to remove the aggregate CAR from the traffic behavior.
Examples
# Reference the aggregate CAR action aggcar-1 for the traffic behavior be1.
<Sysname> system-view
[Sysname] traffic behavior be1
[Sysname-behavior-be1] car name aggcar-1
display qos car name
Syntax
display qos car name [ car-name ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
car-name: Name of an aggregate CAR action.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos car name to display the configuration and statistics of a specified aggregate CAR action.
If no CAR action is specified, this command displays the configuration and statistics of all the aggregate CAR actions.
Examples
# Display the configuration and statistics of aggregate CAR actions.
<Sysname> display qos car name
Name: agg1
Mode: aggregative
CIR 100(kbps) CBS: 2000(byte) EBS: 0(byte)
Red Action: discard
Green packet 0(Bytes), 0(Pkts)
Yellow packet 0(Bytes), 0(Pkts)
Red packet 0(Bytes), 0(Pkts)
Table 20 Command output
Field |
Description |
Name |
Name of the CAR action. |
Mode |
Mode of the CAR action. |
CIR CBS EBS |
Parameters for the aggregate CAR action. |
Red Action |
Action on red packets. |
Green packet |
Statistics about green packets. |
Yellow packet |
Statistics about yellow packets. |
Red packet |
Statistics about red packets. |
|
NOTE: The switch supports traffic accounting in bytes, but not traffic accounting in packets (Pkts). As a result, the counts for the Pkts fields are always 0. |
qos car aggregative
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 aggregate CAR action.
aggregative: Indicates that the global CAR action is aggregative. Only aggregate CAR is supported.
cir committed-information-rate: Committed information rate (CIR) in the range of 1 to 20000000 kbps.
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 greater than CIR. The value range for committed-burst-size is 1553 to 2147450880. The specified CBS must be larger than the maximum packet length. By default, the CBS is the traffic transmitted at the rate of CIR in 500 milliseconds. If the traffic transmitted at the rate of CIR within 500 milliseconds is smaller than 1553, the default CBS is 1553.
ebs excess-burst-size: Excess burst size (EBS) in the range of 0 to 2147450880 bytes.
pir peak-information-rate: Peak information rate (PIR) in the range of 1 to 20000000 kbps. If PIR is not configured, only one token bucket is configured for traffic policing. Otherwise, two token buckets are configured for traffic policing.
red action: Action to take on red packets. Red packets are packets whose rate exceeds CIR. The action argument can be:
· pass: Permits the packet to pass through.
Description
Use qos car aggregative to configure an aggregate CAR action.
Use undo qos car to remove an aggregate CAR action.
An aggregate CAR action does not take effect until it is referenced in a policy.
Examples
# Configure the aggregate CAR action 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
reset qos car name
Syntax
reset qos car name [ car-name ]
View
User view
Default level
2: System level
Parameters
car-name: Name of an aggregate CAR action.
Description
Use reset qos car name to clear the statistics about the specified aggregate CAR action.
If no car-name is specified, this command clears the statistics about all the aggregate CAR actions.
Examples
# Clear the statistics about the aggregate CAR action aggcar-1.
<Sysname> reset qos car name aggcar-1
display qos traffic-counter
Syntax
In standalone mode:
display qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number [ | { begin | exclude | include } regular-expression ]
In IRF mode:
display qos traffic-counter { inbound | outbound } { counter0 | counter1 } chassis chassis-number slot slot-number [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
inbound: Inbound direction.
outbound: Outbound direction.
counter0: Counter 0.
counter1: Counter 1.
slot slot-number: Specifies a card by its slot number. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Specifies a card on an IRF member switch. The chassis-number argument represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the card. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display qos traffic-counter to display the traffic statistics collected by the specified counter and display the configuration information of the counter.
Examples
# Display the outbound traffic statistics of counter 0 for the card in slot 4.
<Sysname> display qos traffic-counter outbound counter0 slot 4
Slot 4 outbound counter0 mode:
Interface: all
VLAN: all
Traffic-counter summary:
Unicast: 0 packets
Multicast: 0 packets
Broadcast: 0 packets
Control packets: 2 packets
Bridge egress filtered packets: 0 packets
Tail drop packets: 0 packets
Multicast Tail drop packets: 6 packets
Forward restrictions packets: 0 packets
Table 21 Command output
Field |
Description |
Slot 4 outbound counter0 mode |
Monitored objects of counter 0 in the outbound direction of the card in slot 4. |
Interface |
Interfaces monitored by the counter. |
VLAN |
VLANs monitored by the counter. |
Local precedence |
Local precedence values monitored by the counter. |
Drop priority |
Drop precedence values monitored by the counter. |
Traffic-counter summary |
Summary statistics collected by the counter. |
The outgoing packets |
Number of outgoing packets. |
Unicast |
Number of unicast packets. |
Multicast |
Number of multicast packets. |
Broadcast |
Number of broadcast packets. |
Control packets |
Number of control packets and mirroring packets. |
Bridge egress filtered packets |
Number of packets filtered by VLAN filtering and packets blocked by STP in the egress direction of the bridge (Layer-2) |
Tail drop packets |
Number of unicast packets dropped by tail drop. |
Multicast Tail drop packets |
Number of multicast and broadcast packets dropped by tail drop. |
Forward restrictions packets |
Number of restriction packets forwarded (this field is not supported) |
# Display the inbound traffic statistics of counter 0 on card 1.
<Sysname> display qos traffic-counter inbound counter0 slot 1
Slot 1 inbound counter0 mode:
Interface: all
VLAN: all
Traffic-counter summary:
Bridge in frames: 5490000 packets
Bridge local discarded: 0 packets
Bridge vlan ingress filter discarded: 0 packets
Bridge security filter discarded: 0 packets
Table 22 Command output
Field |
Description |
Slot 1 inbound counter0 mode |
Monitored objects of counter 0 in the inbound direction of the card in slot 1. |
Interface |
Interfaces monitored by the counter. |
VLAN |
VLANs monitored by the counter. |
Traffic-counter summary |
Summary statistics collected by the counter. |
Bridge in frames |
Number of packets received by the bridge (Layer-2) |
Bridge local discarded |
Number of packets dropped on the bridge (Layer-2) because of reasons other than bridge security filtering and VLAN ingress filtering. |
Bridge vlan ingress filter discarded |
Number of packets dropped by VLAN ingress filtering. |
Bridge security filter discarded |
Number of packets dropped by bridge (Layer-2) security filtering. |
qos traffic-counter
Syntax
In standalone mode:
qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number [ interface interface-type interface-number | vlan vlan-id | drop-priority dp-value ] *
undo qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number
In IRF mode:
qos traffic-counter { inbound | outbound } { counter0 | counter1 } chassis chassis-number slot slot-number [ interface interface-type interface-number | vlan vlan-id | drop-priority dp-value ] *
undo qos traffic-counter { inbound | outbound } { counter0 | counter1 } chassis chassis-number slot slot-number
View
System view
Default level
2: System level
Parameters
inbound: Inbound direction.
outbound: Outbound direction.
counter0: Counter 0.
counter1: Counter 1.
slot slot-number: Specifies a card by its slot number. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Specifies a card on an IRF member switch. The chassis-number argument represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the card. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.
interface-type interface-number: Type and number of the interface to be bound.
vlan-id: Specifies a VLAN by its ID in the range of 1 to 4094.
drop-priority: Drop precedence value in the range of 0 to 2.
Description
Use qos traffic-counter to enable the traffic accounting function and specify the type of traffic.
Use undo qos traffic-counter to disable the traffic accounting function.
By default, the traffic accounting function is disabled.
Each card has two traffic counters. The monitored object can be packets of a specific port, a VLAN, a local precedence value, or a drop precedence value.
· If no port is specified, the counters count traffic for all ports on the card.
· If no VLAN is specified, the counters count traffic for all VLANs on the card.
· If no drop precedence value is specified, the counters count traffic for all drop precedence values.
|
NOTE: · The drop-priority keyword applies only in the outbound direction. · If you re-define a monitored object for a counter with the qos traffic-counter command, the counter resets automatically. |
Examples
# Enable counter 0 in slot 4 to collect outbound traffic statistics on GigabitEthernet 4/0/1.
<Sysname> system-view
[Sysname] qos traffic-counter outbound counter0 slot 4 interface gigabitethernet 4/0/1
reset qos traffic-counter
Syntax
In standalone mode:
reset qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number
In IRF mode:
reset qos traffic-counter { inbound | outbound } { counter0 | counter1 } chassis chassis-number slot slot-number
View
User view
Default level
2: System level
Parameters
inbound: Inbound direction.
outbound: Outbound direction.
counter0: Counter 0.
counter1: Counter 1.
slot slot-number: Specifies a card by its slot number. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Specifies a card on an IRF member switch. The chassis-number argument represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the card. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.
Description
Use reset qos traffic-counter to clear the traffic statistics collected by a counter on a card.
Examples
# Clear the outbound traffic statistics collected by counter 0 on the card in slot 4.
<Sysname> reset qos traffic-counter outbound counter0 slot 4
enhanced-qos
Syntax
enhanced-qos enable
undo enhanced-qos enable
View
System view
Default Level
2: System level
Parameters
None
Description
Use enhanced-qos enable to enable enhanced QoS.
Use undo enhanced-qos enable to disable enhanced QoS.
By default, enhanced QoS is enabled.
You can disable enhanced QoS to reduce the forwarding delay.
Examples
# Disable enhanced QoS.
<Sysname> system-view
[Sysname] undo enhanced-qos enable
qos pipe-mode
Syntax
qos pipe-mode
undo qos pipe-mode
Views
System view
Default level
2: System level
Parameters
None
Description
Use qos pipe-mode to configure the QoS pipe mode.
Use undo qos pipe-mode to cancel the QoS pipe mode.
By default, the QoS pipe mode is not configured.
With the QoS pipe mode configured, packets can pass through any of the following networks and keep their DSCP values unchanged.
· MAC-in-MAC network
· MPLS L2VPN network
· MPLS L3VPN network
· VPLS network
As a result, the forwarding and scheduling of the IP packets on the downstream devices are not affected. For more information, see ACL and QoS Configuration Guide.
Examples
# Configure the QoS pipe mode.
<Sysname> system-view
[Sysname] qos pipe-mode