- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-QoS Commands | 396.17 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
Queue-based WRED table configuration commands
Aggregate CAR configuration commands
Traffic accounting configuration commands
Per-port queue-based accounting displaying commands
display qos queue-statistics interface
QoS pipe mode configuration commands
|
NOTE: · The switch operates in IRF or standalone (the default) mode. For more information about the IRF mode, see IRF Configuration Guide. · For more information about the subcards and Ethernet interface cards mentioned in this document, see the installation 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 the display traffic classifier user-defined command 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 Output description
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 ranges from 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. |
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 ranges from 0 to 7. This keyword is not supported in a global QoS policy or VLAN QoS policy. |
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 ranges from 1 to 4094. This keyword is not supported in a global QoS policy or VLAN QoS policy. |
destination-mac mac-address |
Matches a destination MAC address |
dscp dscp-list |
Matches DSCP values. The dscp-list argument is a list of up to eight DSCP values. A DSCP value ranges from 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 that 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. The forwarding-layer keyword is not available for the POS and RPR subcards. |
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 ranges from 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 ranges from 0 to 7. |
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 ranges from 1 to 1048575. The mpls-label keyword is not available for the POS and RPR subcards. |
protocol protocol-name |
Matches a protocol. The protocol-name can be ARP, IP, or IPv6. |
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 ranges from 0 to 7. The second-mpls-exp keyword is not available for the POS and RPR subcards. |
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 ranges from 1 to 1048575. The second-mpls-label keyword is not available for the POS and RPR subcards. |
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 ranges from 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 ranges from 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 ranges from 1 to 28. To see the detailed information about a system index, use the display qos policy control-plane pre-defined command. This option is available only on Ethernet interface cards. 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 |
Description
Use the if-match command to define a match criterion.
Use the undo if-match command 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 that the ACL you are using has been created. If not, the class cannot be applied to hardware.
For a class, you can reference an ACL twice, respectively by its name and 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 and POS 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 may 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 may be different).
· On an Ethernet interface card, 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.
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 VLANs 1, 6, and 9.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match customer-vlan-id 1 6 9
# Configure class class1 to match the packets from customer VLANs 2, 7, and 10.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match service-vlan-id 2 7 10
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 the traffic classifier command to create a class and enter class view.
Use the undo traffic classifier command 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 the accounting command to add a traffic accounting action in the traffic behavior.
Use the undo accounting command 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 bytes, which ranges from 1553 to 2147450880. By default, CBS is the amount of traffic transmitted at the rate of CIR over 500 ms. The CBS must be larger than the maximum packet length. By default, the CBS is the traffic transmitted at the rate of CIR within 500 milliseconds. If the traffic transmitted at the rate of CIR over 500 milliseconds is smaller than 1553, the default CBS is 1553.
ebs excess-burst-size: Excess burst size (EBS) in bytes, which ranges from 0 to 2147450880. The default is 0.
pir peak-information-rate: Peak information rate (PIR) in kbps, which ranges from 1 to 20000000.
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 the car command to configure a CAR action in a traffic behavior.
Use the undo car command 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 last 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 the display traffic behavior user-defined command 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 Output description
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 the filter command to configure a traffic filtering action in a traffic behavior.
Use the undo filter command 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 pps), which ranges from 1 to 1048575.
Description
Use the packet-rate command to configure a protocol packet rate limiting action.
Use the undo packet-rate command 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 the primap pre-defined color command to configure the action of mapping source precedence to target precedence through the specified colored priority mapping table in a traffic behavior.
Use the undo primap pre-defined color command 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 Layer 2 aggregate interface.
vlan vlan-id: Tags traffic redirected to an interface with the VLAN tag specified by vlan-id, which ranges from 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 the redirect command to configure a traffic redirecting action in a traffic behavior.
Use the undo redirect command 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.
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, which ranges from 0 to 7.
Description
Use the remark dot1p command to configure an 802.1p priority marking action in the traffic behavior.
Use the undo remark dot1p command 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 the remark drop-precedence command to configure a drop precedence marking action.
Use the undo remark drop-precedence command 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, which ranges from 0 to 63, or takes 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 the remark dscp command to configure a DSCP marking action in the traffic behavior.
Use the undo remark dscp command 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, which ranges from 0 to 7.
Description
Use the remark local-precedence command to configure a local precedence marking action in the traffic behavior.
Use the undo remark local-precedence command 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, which ranges from 0 to 7.
Description
Use the remark mpls-exp command to configure an EXP marking action for MPLS packets.
Use the undo remark mpls-exp command 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 the traffic behavior command to create a traffic behavior and enter traffic behavior view.
Use the undo traffic behavior command 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 the classifier behavior command to associate a behavior with a class in a QoS policy.
Use the undo classifier command 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 the control-plane command 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 the display qos policy control-plane command to display information about the QoS policy or policies applied to the specified control plane.
This command is available on only Ethernet interface cards.
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 Output description
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 |
The 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 the display qos policy control-plane pre-defined command to display information about the pre-defined QoS policy applied to the control plane.
This command is available on only Ethernet interface cards.
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 Output description
Field |
Description |
Pre-defined Control-plane Policy |
Contents of the pre-defined control plane QoS policy |
Index |
The 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 the display qos policy global command 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.
A global QoS policy is not available on the POS and RPR subcards.
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 Output description
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 the display qos policy interface command 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 Output description
Field |
Description |
Interface |
Interface type and interface number |
Direction |
The direction in which the policy is applied to the interface |
Policy |
Name of the policy applied to the interface |
Classifier |
Class name and corresponding configuration information |
Operator |
Logical relationship between match criteria in the class |
Rule(s) |
Match criteria in the class |
Behavior |
Behavior name and corresponding configuration information |
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 the display qos policy user-defined command 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 Output description
Field |
Description |
Policy |
Policy name |
Classifier |
Class name A policy can contain multiple classes, and each class is associated with a traffic behavior. A class can be configured with multiple match criteria. 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 the display qos vlan-policy command 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 Output description
Field |
Description |
Vlan |
ID of the VLAN where the QoS policy is applied |
Direction |
The direction in which the QoS policy is applied for the VLAN. |
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 { inbound | outbound }
View
Interface view, port group 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.
Description
Use the qos apply policy command to apply a QoS policy to an interface, all ports in a port group, or the control plane.
Use the undo qos apply policy command to remove the QoS policy.
You can apply a QoS policy to the control plane of only an Ethernet interface card.
A QoS policy to be applied to a logical RPR interface can be configured with only the filter action or mirror-to action. For more information about logical RPR interfaces, see High Availability Configuration Guide. For more information about the mirror-to action, see Network Management and Monitoring Configuration Guide.
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 properly.
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 global { inbound | outbound }
View
System view
Default level
2: System level
Parameters
policy-name: Policy name, a string of 1 to 31 characters.
inbound: Applies the QoS policy to the incoming packets on all ports.
outbound: Applies the QoS policy to the outgoing packets on all ports.
Description
Use the qos apply policy global command to apply a QoS policy globally. A global QoS policy takes effect on all inbound or outbound traffic depending on the direction in which the policy is applied.
Use the undo qos apply policy global command to cancel the global application of the QoS policy.
|
NOTE: If the hardware resources of an interface card are insufficient, applying a QoS policy globally may 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. |
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 the qos policy command to create a policy and enter policy view.
Use the undo qos policy command 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 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 the qos vlan-policy command to apply a QoS policy to the specified VLAN(s).
Use the undo qos vlan-policy command to remove the QoS policy applied to the specified VLAN(s).
|
NOTE: 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 may 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. |
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 the reset qos policy control-plane command 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 the reset qos policy global command to clear the statistics of a global QoS policy.
Examples
# Clear statistics of the global QoS policy applied in the inbound direction.
<Sysname> reset qos policy global inbound
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: VLAN ID, which ranges from 1 to 4094.
inbound: Clears the QoS policy statistics in the inbound direction of the specified VLAN.
outbound: Clears the QoS policy statistics in the outbound direction of the specified VLAN.
Description
Use the reset qos vlan-policy command to clear VLAN QoS policy statistics.
Examples
# Clear the QoS policy statistics of VLAN 2.
<Sysname> reset qos vlan-policy vlan 2
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 the display qos map-table command 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 Output description
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 the display qos map-table color command 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.
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 the import command to configure a mapping from one or multiple input values to an output value.
Use the undo import command to restore the specified or all mappings to the default mappings.
Related commands: display qos map-table, display qos map-table color.
Examples
# 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-lp: User precedence-to-local precedence mapping table.
up-up: User precedence-to-user precedence mapping table.
Description
Use the qos map-table command to enter the specified priority mapping table view.
Related commands: display qos map-table.
|
NOTE: The user precedence-related priority mapping tables are available only on the POS and RPR subcards. The DSCP-to-DSCP mapping table is available on both the POS and RPR subcards and Ethernet interface cards, however, you can use the DSCP-to-DSCP mapping table in only the primap pre-defined dscp-dscp command on the POS and RPR subcards. The other priority mapping tables are available only on the Ethernet interface cards. |
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 the qos map-table color command to enter the specified colored priority mapping table view in the specified direction.
Related commands: display qos map-table color.
|
NOTE: The user precedence-related priority mapping tables are available only on the POS and RPR subcards. The other priority mapping tables are available only on the Ethernet interface cards. |
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, POS interface view, RPR interface 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 |
0 |
dp (drop precedence) |
0 to 2 |
0 |
dscp (DSCP precedence) |
0 to 63 |
0 |
exp (EXP precedence) |
0 to 7 |
0 |
lp (local precedence) |
0 to 7 |
2 |
Description
Use the qos priority command to configure trusting port priority and set a priority for a port.
Use the undo qos priority command to restore the default.
To view the port priority of a port, use the display qos trust interface command.
|
NOTE: The dot1p, dp, dscp, exp, and lp keywords are available only on the Ethernet interface cards. |
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 the display qos trust interface command 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 Output description
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 of 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, POS interface view, RPR interface 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 the qos trust command to configure the trusted packet priority type on an interface.
Use the undo qos trust command to restore the default.
By default, the priority trust mode of a port is untrust, that is, the port priority is trusted.
|
NOTE: Among the keywords of the qos trust command, only the auto keyword is available on the POS and RPR subcards. In addition, the undo qos trust command is available on the POS and RPR subcards. |
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 the 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 Output description
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 downstream CAR, 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 the display qos gts interface command 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 Output description
Field |
Description |
Interface |
Interface type and interface number |
Rule(s) |
Match criteria |
CIR |
Committed information rate (CIR) in kbps |
CBS |
Committed burst size in bytes, 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 the specified queue. The queue-number takes a number ranging from 0 to 7.
cir committed-information-rate: Committed information rate (CIR) in kbps. The value range for the committed-information-rate argument is 300 to 1000000 on a GE or POS port and 2500 to 10000000 on a 10-GE port.
cbs committed-burst-size: Committed burst size (CBS) in bytes, which ranges from 16384 to 16777215. By default, the CBS is the traffic transmitted at the rate of CIR within 500 milliseconds.
Description
Use the qos gts command 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 the undo qos gts command 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
|
NOTE: The commands in this chapter are available only on the POS subcards. |
WFQ configuration 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 the display qos wfq interface command to display the weighted fair queuing (WFQ) configuration on an interface.
If no interface is specified, this command displays the WFQ configuration of all the interfaces.
Related commands: qos wfq.
Examples
# Display the WFQ configuration of POS 2/1/1.
<Sysname> display qos wfq interface Pos 2/1/1
Interface: Pos2/1/1
Output queue: Hardware weighted fair queue
Queue ID Weight Min-Bandwidth
---------------------------------------------
0 1 NA
1 1 200
2 1 NA
3 1 NA
4 1 NA
5 1 NA
6 1 NA
7 1 NA
Table 17 Output description
Field |
Description |
Interface |
Interface type and interface number |
Output queue |
Type of the current output queue |
Queue ID |
ID of a queue |
Weight |
Queue weight based on which queues are scheduled |
Min-Bandwidth |
The minimum guaranteed bandwidth for the queue. NA indicates that no configuration is available. |
qos bandwidth queue
Syntax
qos bandwidth queue queue min bandwidth-value
undo qos bandwidth queue queue [ min bandwidth-value ]
View
Interface view
Default level
2: System level
Parameters
queue: Queue specified by the queue argument, which can be a number or keyword. The number-keyword mapping is shown in Table 18. Queue 0 (queue be) does not support the minimum guaranteed bandwidth configuration.
Table 18 Description on the queue argument
Keyword |
Queue number (decimal) |
af1 |
1 |
af2 |
2 |
af3 |
3 |
af4 |
4 |
be |
0 |
cs6 |
6 |
cs7 |
7 |
ef |
5 |
min bandwidth-value: Specifies the minimum guaranteed bandwidth (in kbps), that is, the minimum bandwidth guaranteed for a queue when the port is congested. The value range for this argument varies by the subcard model.
Description
Use the qos bandwidth queue command to set the minimum guaranteed bandwidth for a queue on a port.
Use the undo qos bandwidth queue command to cancel the configuration.
By default, no minimum guaranteed bandwidth is configured for a port.
This command is not available on Ethernet interface cards.
Examples
# Set the minimum guaranteed bandwidth to 100 kbps for queue 1 on Pos 2/1/1.
[Sysname] interface Pos 2/1/1
[Sysname-Pos2/1/1] qos bandwidth queue 1 min 100
qos wfq weight
Syntax
qos wfq queue weight schedule-value
undo qos wfq queue weight
View
Interface view
Default level
2: System level
Parameters
queue: Queue specified by the queue argument, which can be a number or keyword. The number-keyword mapping is shown in Table 18.
weight schedule-value: Specifies the scheduling weight for the specified queue, which ranges from 1 to 63.
Description
Use the qos wfq weight command to configure a scheduling weight for an HWFQ queue on a port.
Use the undo qos wfq weight command to restore the default scheduling weight for an HWFQ queue on a port.
This command is not available on Ethernet interface cards.
Related commands: display qos wfq interface.
Examples
# Set the scheduling weight of queue 3 and queue 4 to 20 and 30 on Pos 2/1/1.
<Sysname> system-view
[Sysname] interface Pos2/1/1
[Sysname-Pos2/1/1] qos wfq 3 weight 20
[Sysname-Pos2/1/1] qos wfq 4 weight 30
CBQ configuration commands
queue af
Syntax
queue af bandwidth bandwidth
undo queue af
View
Traffic behavior view
Default level
2: System level
Parameters
bandwidth: Guaranteed bandwidth for assured forwarding (AF), which ranges from 64 to 10000000 in kbps.
Description
Use the queue af command to enable assured-forwarding (AF) and set the guaranteed bandwidth.
Use the undo queue af command to remove the configuration from the traffic behavior.
Related commands: queue ef bandwidth.
Examples
# Configure AF and set the guaranteed bandwidth to 5120 kbps for behavior af_behav.
<Sysname> system-view
[Sysname] traffic behavior af_behav
[Sysname-behavior-af_behav] queue af bandwidth 5120
[Sysname-behavior-af_behav] quit
queue ef
Syntax
queue ef bandwidth bandwidth [ cbs burst ]
undo queue ef
View
Traffic behavior view
Default level
2: System level
Parameters
bandwidth: Guaranteed bandwidth for expedited forwarding (EF), which ranges from 64 to 10000000 in kbps.
cbs burst: Sets the committed burst size (CBS) in bytes, which specifies the maximum burst traffic size permitted when the average traffic rate conforms to the configured bandwidth. CBS ranges from 1600 to 1000000000 bytes, and defaults to bandwidth×25. The CBS should be greater than traffic transmitted within 50 ms at the rate of bandwidth. Otherwise, the burst traffic rate is too low, and the burst traffic transmission is affected.
Description
Use the queue ef command to enable expedited forwarding (EF) and set the guaranteed bandwidth.
Related commands: queue af bandwidth.
Examples
# Configure EF and set the guaranteed bandwidth to 30720 kbps for behavior ef_behav.
<Sysname> system-view
[Sysname] traffic behavior ef_behav
[Sysname-behavior-ef_behav] queue ef bandwidth 30720
[Sysname-behavior-ef_behav] quit
queue wfq
Syntax
queue wfq
undo queue wfq
View
Traffic behavior view
Default level
2: System level
Parameters
None
Description
Use the queue wfq command to configure WFQ in the traffic behavior.
Use the undo queue wfq command to cancel the configuration.
Examples
# Configure WFQ for behavior be_behav.
[Sysname] traffic behavior be_behav
[Sysname-behavior-be_behav] queue wfq
wred
Syntax
wred [ dscp | ip-precedence ]
undo wred
View
Traffic behavior view
Default level
2: System level
Parameters
dscp: Uses DSCP for calculating drop probability for a packet.
ip-precedence: Uses IP precedence for calculating drop probability for a packet.
Description
Use the wred command to enable WRED drop in a traffic behavior.
Use the undo wred command to remove the configuration from a traffic behavior.
Before configuring the wred command, make sure that the queue af or queue wfq command has been configured.
Examples
# Configure WRED for behavior af_behav.
<Sysname> system-view
[Sysname] traffic behavior af_behav
[Sysname-behavior-af_behav] queue af bandwidth 5120
[Sysname-behavior-af_behav] wred
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 the display qos qmprofile configuration command 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 Output description
Field |
Description |
Queue management profile |
Queue scheduling profile name |
Queue ID |
ID of a queue |
Type |
Queue scheduling type, which can be 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 the display qos qmprofile interface command 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.
|
NOTE: This command is available only on the Ethernet interface cards. |
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 the qos apply qmprofile command to apply a queue scheduling profile to an interface or port group.
Use the undo qos apply qmprofile command to restore the default.
By default, each queue uses the SP algorithm.
Only one queue scheduling profile can be applied to an interface.
|
NOTE: This command is available only on the Ethernet interface cards. |
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 the qos qmprofile command to create a queue scheduling profile and enter queue scheduling profile view.
Use the undo qos qmprofile command 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: ID of a queue. The range for the queue-id is 1 to 7.
sp: Enables SP for the queue.
wrr: Enables WRR for the queue.
group-id: WRR priority group ID, which ranges from 1 to 2.
weight-value: Scheduling weight, which ranges from 1 to 250.
Description
Use the queue command to configure queue scheduling parameters.
Use the undo queue command 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 may 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 the display qos wred interface command 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: Pos3/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 the qos wred enable command to enable WRED on an interface.
Use the undo qos wred enable command to restore the default drop policy.
By default, tail drop is used.
|
NOTE: This command is available only on Ethernet interface cards. |
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
Queue-based WRED table configuration commands
|
NOTE: The queue-based WRED table feature is available only on the POS subcards. |
display qos wred table
Syntax
display qos wred table [ table-name ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
table-name: Name of the WRED table to be displayed.
|: 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 the display qos wred table command to display the WRED table configuration.
If no WRED table name is specified, this command displays configurations of all WRED tables.
Examples
# Display the configuration of WRED table 1.
<Sysname> display qos wred table 1
Table Name: qu
Table Type: Queue based WRED
QID: gmin gmax gprob ymin ymax yprob rmin rmax rprob exponent
-----------------------------------------------------------------------
0 10224 10240 100 10224 10240 100 10224 10240 100 8
1 10224 10240 100 10224 10240 100 10224 10240 100 8
2 10224 10240 100 10224 10240 100 10224 10240 100 8
3 10224 10240 100 10224 10240 100 10224 10240 100 8
4 10224 10240 100 10224 10240 100 10224 10240 100 8
5 10224 10240 100 10224 10240 100 10224 10240 100 8
6 10224 10240 100 10224 10240 100 10224 10240 100 8
7 10224 10240 100 10224 10240 100 10224 10240 100 8
Table 20 Output description
Field |
Description |
Table name |
Name of a WRED table |
Table type |
Type of a WRED table |
QID |
Queue ID |
gmin |
Lower threshold for green packets |
gmax |
Upper threshold for green packets |
gprob |
Drop probability for green packets |
ymin |
Lower threshold for yellow packets |
ymax |
Upper threshold for yellow packets |
yprob |
Drop probability for yellow packets |
rmin |
Lower threshold for red packets |
rmax |
Upper threshold for red packets |
rprob |
Drop probability for red packets |
exponent |
Exponent for average length calculation |
qos wred apply
Syntax
qos wred apply table-name
undo qos wred apply
View
Interface view, port group view
Default level
2: System level
Parameters
table-name: Name of a global WRED table.
Description
Use the qos wred apply command to apply a global WRED table on a port/port group.
Use the undo qos wred apply command to restore the default.
By default, the tail drop mode is used on a port.
In interface view, the setting is effective on the port only. In port group view, the setting is effective on all the ports in the port group.
Related commands: display qos wred interface, display qos wred table, qos wred table.
|
NOTE: This command is available only on the POS subcards. |
Examples
# Apply the queue-based WRED table queue-table1 to POS 2/1/1.
<Sysname> system-view
[Sysname] interface Pos2/1/1
[Sysname-Pos2/1/1] qos wred apply queue-table1
qos wred table
Syntax
qos wred queue table table-name
undo qos wred table table-name
View
System view
Default level
2: System level
Parameters
table table-name: Specifies an name for the table.
Description
Use the qos wred table command to create a WRED table and enter WRED table view.
Use the undo qos wred table command to remove a global WRED table.
By default, no global WRED table is created.
A WRED table in use cannot be removed.
Related commands: qos wred enable, display qos wred interface.
Examples
# Create a WRED table named abc.
<Sysname> system-view
[Sysname] qos wred queue table abc
[Sysname-wred-table-abc]
queue
Syntax
queue queue-value [ drop-level drop-level ] low-limit low-limit high-limit high-limit [ discard-probability discard-prob ]
undo queue { queue-value | all }
View
WRED table view
Default level
2: System level
Parameters
queue-value: Queue number.
drop-level drop-level: Specifies a drop level. If this argument is not specified, the subsequent configuration takes effect on the packets in the queue regardless of the drop level.
low-limit low-limit: Lower limit, which is 10224 by default.
high-limit high-limit: Upper limit, which is 10240 by default.
discard-probability discard-prob: Denominator for drop probability. Each drop level corresponds to an independent denominator. The discard-prob argument is 100 by default.
Description
Use the queue command to configure the drop parameters for a specified queue in the queue-based WRED table.
Use the undo queue command to restore the default.
By default, a global queue-based WRED table has a set of default available parameters.
Related commands: qos wred table.
Examples
# Configure the drop parameters for packets with drop level 1 in queue 1 for the global queue-based WRED table queue-table1.
<Sysname> system-view
[Sysname] qos wred queue table queue-table1
[Sysname-wred-table-queue-table1] queue 1 drop-level 1 low-limit 10 high-limit 20 discard-probability 30
queue weighting-constant
Syntax
queue queue-value weighting-constant exponent
undo queue queue-value weighting-constant
View
WRED table view
Default level
2: System level
Parameters
queue-value: Queue number This argument is available only on Layer 2 ports.
weighting-constant exponent: Specifies the exponent for average queue length calculation, which ranges from 0 to 21.
Description
Use the queue weighting-constant command to specify an exponent for average queue length calculation for a specified queue.
Use the undo queue weighting-constant command to restore the default.
Related commands: qos wred table.
Examples
# Set the exponent for average queue length calculation to 12 for queue 1 in the queue-based WRED table queue-table1.
<Sysname> system-view
[Sysname] qos wred queue table queue-table1
[Sysname-wred-table-queue-table1] queue 1 weighting-constant 12
[Sysname-wred-table-queue-table1]
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 policy, which must already exist.
Description
Use the car name command to reference an aggregate CAR policy for the traffic behavior.
Use the undo car command to remove the aggregate CAR from the traffic behavior.
Examples
# Reference the aggregate CAR policy 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 policy.
|: 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 the display qos car name command to display the configuration and statistics of a specified aggregate CAR policy.
If no CAR policy is specified, this command displays the configuration and statistics of all the aggregate CAR policies.
Examples
# Display the configuration and statistics of aggregate CAR policies.
<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 21 Output description
Field |
Description |
Name |
Name of the CAR policy |
Mode |
Mode of the CAR policy |
CIR CBS EBS |
Parameters for the aggregate CAR policy |
Red Action |
Action on red packets |
Green packet |
Statistics about green packets |
Yellow packet |
Statistics about yellow packets |
Red packet |
Statistics about red packets |
|
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 policy.
aggregative: Indicates that the global CAR policy is aggregative. Only aggregate CAR is supported.
cir committed-information-rate: Committed information rate (CIR) in kbps, which ranges from 1 to 20000000.
cbs committed-burst-size: Specifies the committed burst size (CBS) in bytes, that is, the size of bursty traffic when the actual average rate is no bigger than CIR. CBS ranges from 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 within 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 bytes, which ranges from 0 to 2147450880.
pir peak-information-rate: Peak information rate (PIR) in kbps, which ranges from 1 to 20000000. 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 the qos car aggregative command to configure an aggregate CAR policy.
Use the undo qos car command to remove an aggregate CAR policy.
An aggregate CAR policy does not take effect until it is referenced in a policy.
Examples
# Configure the aggregate CAR policy aggcar-1, where CIR is 200, CBS is 2,000, and red packets are dropped.
<Sysname> system-view
[Sysname] qos car aggcar-1 aggregative cir 200 cbs 2000 red discard
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 policy.
Description
Use the reset qos car name command to clear the statistics about the specified aggregate CAR policy.
If no car-name is specified, this command clears the statistics about all the aggregate CAR policies.
Examples
# Clear the statistics about the aggregate CAR policy 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 the display qos traffic-counter command to display the traffic statistics collected by the specified counter and display the configuration information of the counter.
|
NOTE: This command is available only on Ethernet interface cards. |
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 22 Output description
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 23 Output description
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 | local-precedence lp-value | 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 | local-precedence lp-value | 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: VLAN ID, which ranges from 1 to 4094.
lp-value: Local precedence, which ranges from 0 to 7.
drop-priority: Drop precedence, which ranges from 0 to 2.
Description
Use the qos traffic-counter command to enable the traffic accounting function and specify the type of traffic.
Use the undo qos traffic-counter command to disable the traffic accounting function.
By default, the traffic accounting function is disabled.
The S9500E provides each slot with 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 local precedence is specified, the counters count traffic for all local precedence values on the card.
· If no drop precedence value is specified, the counters count traffic for all drop precedence values.
|
NOTE: · This command is available only on Ethernet interface cards. · The local-precedence and drop-priority keywords apply on 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 the reset qos traffic-counter command to clear the traffic statistics collected by a counter on a card.
|
NOTE: This command is available only on the Ethernet interface cards. |
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
display qos queue-statistics interface
Syntax
display qos queue-statistics interface [ interface-type interface-number ] [ 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.
outbound: Displays queue-based outbound traffic statistics for the interface.
|: 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 the display qos queue-statistics interface command to display statistics collected for an interface on a per-queue basis.
· If no interface is specified, this command displays statistics for all interfaces.
· You can use the reset counters interface command to clear traffic statistics. For more information about the reset counters interface command, see Interface Command Reference.
Examples
# Display queue-based traffic statistics in the outbound direction of GigabitEthernet 4/0/15 on an Ethernet interface card.
<Sysname> display qos queue-statistics interface GigabitEthernet4/0/15
Interface: GigabitEthernet4/0/15
Direction: Outbound
Pass: 332804174 packets, 42598954200 bytes
Drop: 0 packets, 0 bytes
Queue 0
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Green pass: 0 packets, 0 bytes
Green drop: 0 packets, 0 bytes
Yellow pass: 0 packets, 0 bytes
Yellow drop: 0 packets, 0 bytes
Red pass: 0 packets, 0 bytes
Red drop: 0 packets, 0 bytes
Queue 1
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Green pass: 0 packets, 0 bytes
Green drop: 0 packets, 0 bytes
Yellow pass: 0 packets, 0 bytes
Yellow drop: 0 packets, 0 bytes
Red pass: 0 packets, 0 bytes
Red drop: 0 packets, 0 bytes
Queue 2
Pass: 332802075 packets, 42598665728 bytes
Drop: 0 packets, 0 bytes
Green pass: 332802075 packets, 42598665728 bytes
Green drop: 0 packets, 0 bytes
Yellow pass: 0 packets, 0 bytes
Yellow drop: 0 packets, 0 bytes
Red pass: 0 packets, 0 bytes
Red drop: 0 packets, 0 bytes
Queue 3
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Green pass: 0 packets, 0 bytes
Green drop: 0 packets, 0 bytes
Yellow pass: 0 packets, 0 bytes
Yellow drop: 0 packets, 0 bytes
Red pass: 0 packets, 0 bytes
Red drop: 0 packets, 0 bytes
Queue 4
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Green pass: 0 packets, 0 bytes
Green drop: 0 packets, 0 bytes
Yellow pass: 0 packets, 0 bytes
Yellow drop: 0 packets, 0 bytes
Red pass: 0 packets, 0 bytes
Red drop: 0 packets, 0 bytes
Queue 5
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Green pass: 0 packets, 0 bytes
Green drop: 0 packets, 0 bytes
Yellow pass: 0 packets, 0 bytes
Yellow drop: 0 packets, 0 bytes
Red pass: 0 packets, 0 bytes
Red drop: 0 packets, 0 bytes
Queue 6
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Green pass: 0 packets, 0 bytes
Green drop: 0 packets, 0 bytes
Yellow pass: 0 packets, 0 bytes
Yellow drop: 0 packets, 0 bytes
Red pass: 0 packets, 0 bytes
Red drop: 0 packets, 0 bytes
Queue 7
Pass: 2099 packets, 288472 bytes
Drop: 0 packets, 0 bytes
Green pass: 2099 packets, 288472 bytes
Green drop: 0 packets, 0 bytes
Yellow pass: 0 packets, 0 bytes
Yellow drop: 0 packets, 0 bytes
Red pass: 0 packets, 0 bytes
Table 24 Output description
Field |
Description |
Interface |
Interface whose statistics are collected |
Direction |
Direction of the traffic whose statistics are collected |
pass |
Forwarded traffic in packets and in bytes |
drop |
Dropped traffic in packets and in bytes |
Queue |
Number of a queue |
Green, Yellow, Red |
Color of packets |
# Display queue-based traffic statistics of Pos 2/1/3 on a POS subcard.
<Sysname>display qos queue-statistics interface pos 2/1/1
Interface: Pos2/1/1
Direction: Outbound
Pass: 30378290 packets, 3836819895 bytes
Drop: 0 packets, 0 bytes
Data Flow:
Queue 0:
Pass: 30235282 packets, 3688702676 bytes
Drop: 0 packets, 0 bytes
Total queue length : 4096 packets
Current queue length: 0 packets, 0% use ratio
Queue 1:
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Total queue length : 2048 packets
Current queue length: 0 packets, 0% use ratio
Queue 2:
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Total queue length : 2048 packets
Current queue length: 0 packets, 0% use ratio
Queue 3:
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Total queue length : 2048 packets
Current queue length: 0 packets, 0% use ratio
Queue 4:
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Total queue length : 2048 packets
Current queue length: 0 packets, 0% use ratio
Queue 5:
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Total queue length : 512 packets
Current queue length: 0 packets, 0% use ratio
Queue 6:
Pass: 40 packets, 2136 bytes
Drop: 0 packets, 0 bytes
Total queue length : 512 packets
Current queue length: 0 packets, 0% use ratio
Queue 7:
Pass: 0 packets, 0 bytes
Drop: 0 packets, 0 bytes
Total queue length : 8192 packets
Current queue length: 0 packets, 0% use ratio
Table 25 Output description
Field |
Description |
Interface |
Interface whose statistics are collected |
Direction |
Direction of the traffic whose statistics are collected |
Queue |
Number of the queue |
Pass |
Forwarded traffic in packets and in bytes |
Drop |
Dropped traffic in packets and in bytes |
Total queue length |
Total length of the queue |
Current queue length |
Current length of the queue |
use ratio |
Usage of the queue |
qos pipe-mode
Syntax
qos pipe-mode
undo qos pipe-mode
Views
System view
Default level
2: System level
Parameters
None
Description
Use the qos pipe-mode command to configure the QoS pipe mode.
Use the undo qos pipe-mode command 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