- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-QoS commands | 615.54 KB |
Contents
display qos policy control-plane
display qos policy control-plane pre-defined
display qos policy user-profile
qos apply policy (interface view, control plane view)
qos apply policy (user profile view)
reset qos policy control-plane
QoS SNMP notification commands
display qos exclusive-bandwidth interface outbound
Interface channelization commands
display mode channel-bandwidth interface
display qos map-table interface
import (flexible priority map view)
Traffic policing, GTS, and rate limit commands
display qos car control-plane whitelist
qos car any (cross-connect PW view, VSI LDP PW view, VSI static PW view)
qos car any (user profile view)
qos car percent (interface view)
reset qos car control-plane whitelist
qos gts (user group profile view)
qos gts (session group profile view)
Hardware congestion management commands
Congestion management commands
Queue scheduling profile commands
display qos qmprofile configuration
display qos qmprofile interface
qos apply qmprofile (interface view)
qos apply qmprofile(user group profile view, session group profile view)
Queue-based accounting commands
Interface queue-based traffic statistics commands
display qos queue-statistics interface outbound
User queue-based traffic statistics commands
display qos queue-statistics user-id
reset qos queue-statistics user-id
Control plane packet-drop logging commands
QoS policy commands
Traffic class commands
description
Use description to configure a description for a traffic class.
Use undo description to delete the description of a traffic class.
Syntax
description text
undo description
Default
No description is configured for a traffic class.
Views
Traffic class view
Predefined user roles
network-admin
Parameters
text: Specifies a description, a case-sensitive string of 1 to 127 characters.
Usage guidelines
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Configure the description as classifier for traffic class class1.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] description classifier
display traffic classifier
Use display traffic classifier to display traffic classes.
Syntax
display traffic classifier user-defined [ classifier-name ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
user-defined: Specifies user-defined traffic classes.
classifier-name: Specifies a traffic class by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a traffic class, this command displays all traffic classes.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays the traffic classes for the active MPU.
Examples
# Display all user-defined traffic classes.
<Sysname> display traffic classifier user-defined
User-defined classifier information:
Classifier: 1 (ID 100)
Operator: AND
Rule(s) :
If-match acl 2000
Classifier: 2 (ID 101)
Operator: AND
Rule(s) :
If-match protocol ipv6
Classifier: 3 (ID 102)
Operator: AND
Rule(s) :
-none-
Field |
Description |
Classifier |
Traffic class name and its match criteria. |
Operator |
Match operator you set for the traffic class. If the operator is AND, the traffic class matches the packets that match all its match criteria. If the operator is OR, the traffic class matches the packets that match any of its match criteria. |
Rule(s) |
Match criteria. |
if-match
Use if-match to define a match criterion.
Use undo if-match to delete a match criterion.
Syntax
if-match match-criteria
undo if-match match-criteria
Default
No match criterion is configured.
Views
Traffic class view
Predefined user roles
network-admin
Parameters
match-criteria: Specifies a match criterion. Table 2 shows the available match criteria.
Table 2 Available match criteria
Option |
Description |
acl [ ipv6 | mac ] { acl-number | name acl-name } [ mpls-inner ] |
Matches an ACL. The following are available value ranges for the acl-number argument: · 2000 to 2999 for basic ACLs. · 3000 to 3999 for advanced ACLs. · 4000 to 4999 for Layer 2 ACLs. The acl-name argument is a case-insensitive string of 1 to 63 characters, which must start with an English letter. To avoid confusion, make sure the argument is not all. The mpls-inner keyword matches the inner header information of MPLS packets with one explicit null label. If you do not specify this keyword, the ACL matches the header information of non-encapsulated packets or the outer header information of MPLS packets. This keyword takes effect if the following conditions exist: · The ACL is an advanced IPv4 ACL. · The QoS policy is applied to the inbound direction of an interface on the egress node in an MPLS network. If no VPN instance is specified in an ACL rule, the rule applies to both non-VPN packets and VPN packets. |
any |
Matches all packets. |
authenticated-user |
Matches the packets of users that pass IPoE, portal, or PPPoE authentication. |
control-plane protocol protocol-name&<1-8> |
Matches control plane protocols. The protocol-name&<1-8> argument specifies a space-separated list of up to eight system-defined control plane protocols. For available system-defined control plane protocols, see Table 3. This option matches only protocol packets that use a well-known port number as the destination port number. |
control-plane protocol-group protocol-group-name |
Matches a control plane protocol group. The protocol-group-name argument can be critical, important, management, monitor, normal, or redirect. |
customer-dot1p dot1p-value&<1-8> |
Matches 802.1p priority values in inner VLAN tags of double-tagged packets. The dot1p-value&<1-8> argument specifies a space-separated list of up to eight 802.1p priority values. The value range for the dot1p-value argument is 0 to 7. |
customer-vlan-id vlan-id-list |
Matches VLAN IDs in inner VLAN tags of double-tagged packets. The vlan-id-list argument specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN or a range of VLANs in the form of vlan-id1 to vlan-id2. The value for vlan-id2 must be greater than or equal to the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094. This option does not take effect in the outbound direction. In an MPLS L2VPN, this option can be used on a Layer 3 Ethernet interface associated with an AC to match the outer VLAN ID. |
destination-mac mac-address |
Matches a destination MAC address. This option takes effect only on Ethernet interfaces. |
dscp dscp-value&<1-8> |
Matches DSCP values. The dscp-value&<1-8> argument specifies a space-separated list of up to eight DSCP values. The value range for the dscp-value argument is 0 to 63 or keywords shown in Table 6. |
inbound-interface interface-type interface-number |
Matches an input interface specified by its type and number. |
ip-precedence ip-precedence-value&<1-8> |
Matches IP precedence values. The ip-precedence-value&<1-8> argument specifies a space-separated list of up to eight IP precedence values. The value range for the ip-precedence-value argument is 0 to 7. |
mpls-exp exp-value&<1-8> |
Matches MPLS EXP values. The exp-value&<1-8> argument specifies a space-separated list of up to eight EXP values. The value range for the exp-value argument is 0 to 7. This option takes effect only on MPLS packets. |
protocol protocol-name |
Matches a protocol. The protocol-name argument can be arp, ipv6, or ip. |
qos-local-id local-id-value |
Matches a local QoS ID in the range of 1 to 4095. |
service-dot1p dot1p-value&<1-8> |
Matches 802.1p priority values in outer VLAN tags. The dot1p-value&<1-8> argument is a space-separated list of up to eight 802.1p priority values. The value range for the dot1p-value argument is 0 to 7. |
service-vlan-id vlan-id-list |
Matches VLAN IDs in outer VLAN tags. The vlan-id-list argument specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN or a range of VLANs in the form of vlan-id1 to vlan-id2. The value for vlan-id2 must be greater than or equal to the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094. You can use this option to match single-tagged packets. In an MPLS L2VPN network, a Layer 3 interface associated with an AC cannot match the outer VLAN ID of packets. |
source-mac mac-address |
Matches a source MAC address. This option takes effect only on Ethernet interfaces. |
vxlan { any | vxlan-id } |
Matches a VXLAN ID in the range of 0 to 16777215. If you configure this option and then execute the vxlan udp-port command to modify the UDP port, you must execute the undo if-match vxlan and if-match vxlan commands to redefine a VXLAN ID match criterion. For information about the vxlan udp-port command, see VXLAN Command Reference. |
Table 3 Available system-defined control plane protocols
Protocol |
Description |
default |
Protocol packets other than the following packet types |
arp |
ARP packets |
arp-snooping |
ARP snooping packets |
bgp4+ |
IPv6 BGP packets |
dhcp-snooping |
DHCP snooping packets |
dldp |
DLDP packets |
dot1x |
802.1X packets |
hoplimit-expires |
Hop-limit expire packets |
igmp |
IGMP packets |
ip-option |
IPv4 packets with the Options field |
ipv6-option |
IPv6 packets with the Options field |
isis |
IS-IS packets |
lacp |
LACP packets |
lldp |
LLDP packets |
mvrp |
MVRP packets (including GVRP packets) |
nqa-icmp |
NQA ICMP packets |
nqa-tcp |
NQA TCP packets |
nqa-udp |
NQA UDP packets |
ospf-multicast |
OSPF multicast packets |
ospf3-multicast |
OSPFv3 multicast packets |
ospf3-unicast |
OSPFv3 unicast packets |
radius |
RADIUS packets |
stp |
STP packets |
tacacs |
TACACS packets |
ttl-expires |
TTL expire packets |
vrrp |
VRRP packets |
vrrp6 |
IPv6 VRRP packets |
Usage guidelines
In a traffic class with the logical OR operator, you can configure multiple if match commands for any of the available match criteria.
When you configure a match criterion that can have multiple values in one if-match command, follow these restrictions and guidelines:
· You can specify up to eight values for any of the following match criteria in one if-match command:
¡ 802.1p priority.
¡ DSCP.
¡ IP precedence.
¡ MPLS EXP.
¡ VLAN ID.
· If a packet matches one of the specified values, it matches the if-match command.
· To delete a criterion that has multiple values, the specified values in the undo if-match command must be the same as those specified in the if-match command. The order of the values can be different.
When you configure ACL-based match criteria, follow these restrictions and guidelines:
· The ACL used as a match criterion must already exist.
· Before defining a criterion to match the inner packet information of VXLAN packets in a traffic class, you must use the if-match vxlan command to define a VXLAN ID match criterion.
· The ACL is used for classification only and the permit/deny actions in ACL rules are ignored. Actions taken on matching packets are defined in traffic behaviors.
You can use both AND and OR operators to define the match relationships between the criteria for a class. For example, you can define relationships among three match criteria in traffic class classA as follows:
traffic classifier classB operator and
if-match criterion 1
if-match criterion 2
traffic classifier classA operator or
if-match criterion 3
if-match classifier classB
Examples
# Define a match criterion for traffic class class1 to match the packets with a destination MAC address of 0050-ba27-bed3.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match destination-mac 0050-ba27-bed3
# Define a match criterion for traffic class class2 to match the packets with a source MAC address of 0050-ba27-bed2.
<Sysname> system-view
[Sysname] traffic classifier class2
[Sysname-classifier-class2] if-match source-mac 0050-ba27-bed2
# Define a match criterion for traffic class class1 to match the double-tagged packets with 802.1p priority 3 in the inner VLAN tag.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match customer-dot1p 3
# Define a match criterion for traffic class class1 to match the packets with 802.1p priority 5 in the outer VLAN tag.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match service-dot1p 5
# Define a match criterion for traffic class class1 to match the advanced ACL 3101.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl 3101
# Define a match criterion for traffic class class1 to match the ACL named flow.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl name flow
# Define a match criterion for traffic class class1 to match the advanced IPv6 ACL 3101.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl ipv6 3101
# Define a match criterion for traffic class class1 to match the IPv6 ACL named flow.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl ipv6 name flow
# Define a match criterion for traffic class class1 to match all packets.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match any
# Define a match criterion for traffic class class1 to match the packets with a DSCP value of 1, 6, or 9.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match dscp 1 6 9
# Define a match criterion for traffic class class1 to match the packets with an IP precedence value of 1 or 6.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match ip-precedence 1 6
# Define a match criterion for traffic class class1 to match IP packets.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match protocol ip
# Define a match criterion for traffic class class1 to match double-tagged packets with VLAN ID 1, 6, or 9 in the inner VLAN tag.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match customer-vlan-id 1 6 9
# Define a match criterion for traffic class class1 to match the packets with VLAN ID 2, 7, or 10 in the outer VLAN tag.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match service-vlan-id 2 7 10
# Define a match criterion for traffic class class1 to match the packets with a local QoS ID of 3.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match qos-local-id 3
traffic classifier
Use traffic classifier to create a traffic class and enter its view, or enter the view of an existing traffic class.
Use undo traffic classifier to delete a traffic class.
Syntax
traffic classifier classifier-name [ operator { and | or } ]
undo traffic classifier classifier-name
Default
No traffic classes exist.
Views
System view
Predefined user roles
network-admin
Parameters
classifier-name: Specifies a name for the traffic class, a case-sensitive string of 1 to 31 characters.
operator: Sets the operator to logic AND (the default) or OR for the traffic class.
and: Specifies the logic AND operator. The traffic class matches the packets that match all its criteria.
or: Specifies the logic OR operator. The traffic class matches the packets that match any of its criteria.
Examples
# Create a traffic class named class1.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1]
Related commands
display traffic classifier
Traffic behavior commands
accounting
Use accounting to configure a traffic accounting action in a traffic behavior.
Use undo accounting to restore the default.
Syntax
accounting { byte | packet }
undo accounting
Default
No traffic accounting action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
byte: Counts traffic in bytes.
packet: Counts traffic in packets.
Examples
# Configure a traffic accounting action in traffic behavior database to count traffic in bytes.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] accounting byte
bind nat-instance
Use bind nat-instance to configure a NAT instance binding action in a traffic behavior.
Use undo bind nat-instance to restore the default.
Syntax
bind nat-instance instance-name
undo bind nat-instance instance-name
Default
No NAT instance binding action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
instance-name: Specifies a NAT instance by its name, a case-sensitive string of 1 to 31 characters.
Usage guidelines
NAT supports interface-based NAT and global NAT. By redirecting traffic that requires NAT to the specified NAT instance, this command implements global NAT. For more information about NAT, see NAT Configuration Guide.
This command and the redirect failover-group command are mutually exclusive.
Examples
# Configure a NAT instance binding action in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] bind nat-instance test
Related commands
nat instance (NAT Command Reference)
car
Use car to configure a CAR action in absolute value in a traffic behavior.
Use undo car to restore the default.
Syntax
car cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ green action | red action | yellow action ] *
car cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ green action | red action | yellow action ] *
undo car
Default
No CAR action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
cir committed-information-rate: Specifies the committed information rate (CIR) in the range of 1 to 300000000 kbps.
cbs committed-burst-size: Specifies the committed burst size (CBS) in the range of 512 to 256000000 bytes. The default value for this argument is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the excess burst size (EBS) in the range of 0 to 256000000 bytes. The default value for this argument is the product of 62.5 and the PIR.
pir peak-information-rate: Specifies the peak information rate (PIR) in kbps or pps. If you specify the pps keyword, the PIR is specified in pps. If you do not specify the pps keyword, the PIR is specified in kbps. The PIR must be specified in the same unit as the CIR. The value range for peak-information-rate is 1 to 300000000.
green action: Specifies the action to take on packets that conform to the CIR. The default setting is pass.
red action: Specifies the action to take on packets that conform to neither CIR nor PIR. The default setting is discard.
yellow action: Specifies the action to take on packets that conform to the PIR but not to the CIR. The default setting is pass.
action: Sets the action to take on the packet:
· discard: Drops the packet.
· pass: Permits the packet to pass through.
Usage guidelines
To use two rates for traffic policing, configure the car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the car command without the pir peak-information-rate option.
A QoS policy that uses a traffic behavior configured with CAR can be applied in either the inbound direction or outbound direction of an interface.
If you execute the car command multiple times in the same traffic behavior, the most recent configuration takes effect.
Only the default action is supported for green packets and yellow packets. The discard and pass actions are supported for red packets.
Examples
# Configure a CAR action in traffic behavior database:
· Set the CIR to 200 kbps, CBS to 51200 bytes, and EBS to 0.
· Transmit the conforming packets, and mark the excess packets with DSCP value 0 and transmit them.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] car cir 200 cbs 51200 ebs 0 green pass red remark-dscp-pass 0
display traffic behavior
Use display traffic behavior to display traffic behaviors.
Syntax
display traffic behavior user-defined [ behavior-name ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
user-defined: Specifies user-defined traffic behaviors.
behavior-name: Specifies a behavior by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a traffic behavior, this command displays all traffic behaviors.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays traffic behaviors for the active MPU.
Examples
# Display all user-defined traffic behaviors.
<Sysname> display traffic behavior user-defined
User-defined behavior information:
Behavior: 1 (ID 100)
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Primap pre-defined color table: dscp-dp
Behavior: 2 (ID 101)
Accounting enable: Packet
Filter enable: Permit
Marking:
Remark mpls-exp 4
Redirect to SR-TE policy:
Endpoint: 10.0.0.2
Color : 123464
Redirect to SRv6-TE policy:
Endpoint: 56::44
Color : 123464
SID : 5a::13
Behavior: 3 (ID 102)
-none-
Behavior: 5 (ID 104)
Mirroring:
Mirror to the interface: Ten-GigabitEthernet3/0/1 pop-label loopback
Behavior: 6 (ID 105)
Redirecting:
Redirect to access-vpn vpna track 1 vpnb track 2
Field |
Description |
Behavior |
Name and contents of a traffic behavior. |
Marking |
Information about priority marking. |
Remark dscp |
Action of setting the DSCP value for packets. |
Committed Access Rate |
Information about the CAR action. |
Green action |
Action to take on green packets. |
Yellow action |
Action to take on yellow packets. |
Red action |
Action to take on red packets. |
Primap color-map-dp |
Information about colored priority maps. |
Primap pre-defined color table |
Information about pre-defined colored priority maps. For more information, see "Priority map commands." |
Accounting enable |
Traffic accounting action. |
Filter enable |
Traffic filtering action. |
Remark mpls-exp |
Action of setting the MPLS EXP value for packets. |
Redirecting |
Information about traffic redirecting. |
none |
No other traffic behavior is configured. |
Redirect to SR-TE policy |
Redirects traffic to an SR-MPLS TE policy: · Endpoint—Endpoint IPv4 address of the SR-MPLS TE policy. · Color—Color attribute value of the SR-MPLS TE policy. |
Redirect to SRv6-TE policy |
Redirects traffic to an SRv6 TE policy: · Endpoint—Endpoint IPv6 address of the SRv6 TE policy. · Color—Color attribute value of the SRv6 TE policy. |
Redirect to access-vpn vpna track 1 vpnb track 2 |
Redirects traffic to a VPN instance: · vpna track 1—Primary VPN instance and the associated track entry. · vpnb track 2—Backup VPN instance and the associated track entry. |
filter
Use filter to configure a traffic filtering action in a traffic behavior.
Use undo filter to restore the default.
Syntax
filter { deny | permit }
undo filter
Default
No traffic filtering action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
deny: Drops packets.
permit: Transmits packets.
Examples
# Configure a traffic filtering action as deny in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] filter deny
free account
Use free account to configure the traffic permission action in a traffic behavior.
Use undo free account to restore the default.
Syntax
free account
undo free account
Default
The traffic permission action is not configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Examples
# Configure the traffic permission action in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] free account
primap color-map-dp
Use primap color-map-dp to configure the action of mapping packet colors to drop priority values in a traffic behavior.
Use undo primap color-map-dp to restore the default.
Syntax
primap color-map-dp
undo primap color-map-dp
Default
No priority mapping action is configured in a traffic behavior.
Views
Traffic behavior view
Predefined user roles
network-admin
This command must be used in conjunction with the car command.
The packet color-to-drop priority mappings are fixed.
· The color red is mapped to drop priority 2.
· The color yellow is mapped to drop priority 1.
· The color green is mapped to drop priority 0.
Examples
# Configure the action of mapping packet colors to drop priority values in traffic behavior behavior1.
<Sysname> system-view
[Sysname] traffic behavior behavior1
[Sysname-behavior-behavior1] car cir 1600
[Sysname-behavior-behavior1] primap color-map-dp
Related commands
primap pre-defined color
Use primap pre-defined color to configure the action of mapping source precedence to target precedence through the specified colored priority mapping table for a traffic behavior.
Use undo primap pre-defined color to delete the action.
Syntax
primap pre-defined color { 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 }
undo primap pre-defined color { 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 }
Default
No priority mapping action is configured in a traffic behavior.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
pre-defined: Specifies predefined priority mapping tables.
color: Uses colored priority mapping tables for priority mapping.
The device provides the following types of priority map.
Table 5 Priority maps
Priority mapping |
Description |
dot1p-dot1p |
802.1p-802.1p priority map. |
dot1p-dp |
802.1p-drop priority map. |
dot1p-dscp |
802.1p-DSCP priority map. |
dot1p-exp |
802.1p-EXP priority map. |
dot1p-lp |
802.1p-local priority map. |
dscp-dot1p |
DSCP-802.1p priority map. |
dscp-dp |
DSCP-drop priority map. |
dscp-dscp |
DSCP-DSCP priority map. |
dscp-exp |
DSCP-EXP priority map. |
dscp-lp |
DSCP-local priority map. |
exp-dot1p |
EXP-802.1p priority map. |
exp-dp |
EXP-drop priority map. |
exp-dscp |
EXP-DSCP priority map. |
exp-exp |
EXP-EXP priority map. |
exp-lp |
EXP-local priority map. |
Usage guidelines
This command must be used in conjunction with the car command.
Examples
# Configure the action of mapping DSCP values to drop priority through the colored DSCP-to-drop 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
display qos map-table color
primap color-map-dp
redirect
Use redirect to configure a traffic redirecting action in a traffic behavior.
Use undo redirect to restore the default.
Syntax
redirect { access-vpn vpn-instance vpn-instance-name1 [ track track-entry-number ] [ vpn-instance-name2 [ track track-entry-number ] ] | cpu | dhcp-to-cpu | http-to-cpu | https-to-cpu | interface interface-type interface-number | local | next-hop [ vpn-instance vpn-instance-name ] { ipv4-add1 [ track track-entry-number ] [ ipv4-add2 [ track track-entry-number ] ] | ipv6-add1 [ track track-entry-number ] [ ipv6-add2 [ track track-entry-number ] ] } }
undo redirect { access-vpn | cpu | dhcp-to-cpu | http-to-cpu | https-to-cpu | interface interface-type interface-number | local| next-hop }
redirect { sr-policy endpoint color | srv6-policy endpoint color [ { sid | vpnsid } sid ] }
undo redirect { sr-policy | srv6-policy }
Default
No traffic redirecting action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
access-vpn: Redirects traffic to an MPLS L3VPN instance.
vpn-instance-name1: Specifies the primary VPN instance by its name, a case-sensitive string of 1 to 31 characters.
vpn-instance-name2: Specifies the backup VPN instance by its name, a case-sensitive string of 1 to 31 characters. If the primary VPN instance does not exist or its associated track entry is in abnormal state, traffic will be redirected to the backup VPN instance.
track track-entry-number: Specifies a track entry by its ID in the range of 1 to 1024. The primary and and backup VPN instances can be associated with the same or different track entries. By specifying track entries, you can associate traffic redirection with detection modules, such as NQA and BFD (see High Availability Configuration Guide).
cpu: Redirects traffic to the CPU.
dhcp-to-cpu: Redirects DHCP packets to the CPU.
http-to-cpu: Redirects HTTP requests to the CPU.
https-to-cpu: Redirects HTTPS requests to the CPU.
interface interface-type interface-number: Redirects traffic to an interface specified by its type and number. To redirect traffic to a tunnel interface, set the interface type to tunnel. To redirect traffic to a Layer 2 aggregate interface, set the interface type to bridge-aggregation. To redirect traffic to a Layer 3 aggregate interface, set the interface type to route-aggregation.
local: Redirects traffic to the local device.
next-hop: Redirects traffic to a next hop. For successful traffic redirection, make sure the next hop IP address is reachable. If both primary and secondary next hop IP addresses are specified, make sure a minimum of one IP address is reachable. The redirection feature periodically looks up the routing table to verify the reachability of next hop IP addresses. If track entries are specified, the redirection feature verifies the reachability of the next hop IP addresses based on the Track detection result. If both primary and secondary next hop IP addresses are unreachable, traffic redirection to a next hop does not take effect.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN instance to which the next hop belongs. The vpn-instance-name argument represents the VPN instance name, a case-sensitive string of 1 to 31 characters. If the next hop belongs to the public network, do not specify this option.
ipv4-add1: Specifies the primary next hop IPv4 address. If traffic fails to be redirected to this IPv4 address, the traffic is redirected to the secondary IPv4 address.
ipv4-add2: Specifies the secondary next hop IPv4 address.
ipv6-add1: Specifies the primary next hop IPv6 address. If traffic fails to be redirected to this IPv6 address, the traffic is redirected to the secondary IPv6 address.
ipv6-add2: Specifies the secondary next hop IPv6 address.
track track-entry-number: Specifies a track entry by its ID in the range of 1 to 1024. Different track entries can be specified for primary and secondary IP addresses. By specifying track entries, you can associate traffic redirection with detection modules, such as NQA and BFD (see High Availability Configuration Guide).
sr-policy endpoint color: Redirects traffic to an SR-MPLS TE policy. The endpoint argument represents the endpoint IPv4 address of the SR-MPLS TE policy. The color argument represents the color attribute value of the SR-MPLS TE policy, in the range of 0 to 4294967295.
srv6-policy endpoint color [ { sid | vpnsid } sid ]: Redirects traffic to an SRv6 TE policy. The endpoint argument represents the endpoint IPv6 address of the SRv6 TE policy. The color argument represents the color attribute value of the SRv6 TE policy, in the range of 0 to 4294967295. The sid sid argument represents the public network SRv6 SID (an IPv6 address) of the egress node. Packets continue to be forwarded in the public network after they are forwarded through the SRv6 TE policy. The vpnsid sid argument represents the private network SRv6 SID (an IPv6 address) of the egress node. Packets continue to be forwarded in the private network after they are forwarded through the SRv6 TE policy. The device adds the SRv6 SID to the SRH header and places it after the SID list. After the packets are forwarded to the egress node, the egress node takes the forwarding action based on the SRv6 SID.
Usage guidelines
If you execute the redirect command multiple times in the same traffic behavior, all configured actions take effect at the same time. Exceptions are that the redirect cpu, redirect http-to-cpu, and redirect https-to-cpu commands are mutually exclusive.
For IPoE Web authentication, you must configure the redirect http-to-cpu or redirect https-to-cpu command. If a user performs IPoE Web authentication through the Web browser but the HTTP request is not destined for the portal Web server, the access device redirects the request to the CPU. The CPU pushes the Web authentication page to the user.
To prevent the CPU from receiving a large number of HTTP requests during IPoE Web authentication, use the ip subscriber http-fast-reply enable command to enable the HTTP request fast reply function. This function reduces the CPU load by identifying HTTP requests in hardware and automatically replying with HTTP responses. For more information about the ip subscriber http-fast-reply enable command, see IPoE commands in see BRAS Services Command Reference.
The device supports redirecting traffic to Layer 3 Ethernet interfaces and loopback interfaces, and does not support redirecting traffic to Layer 3 aggregate interfaces.
In UCM, packets need to be redirected to the CPU when a management user comes online or troubleshooting is performed.
In a NAT scenario, the redirect slot command can redirect matching packets to the specified card or device for address translation and forward the packets according to NAT entries. On a device with active and standby cards, only the active card processes NAT traffic. The redirect local command can redirect matching packets to the new active card or device after an active/standby switchover.
The redirect local command does not take effect on IPv6 packets.
You can only redirect traffic to the public network by redirecting the traffic to an SR-MPLS TE policy. You can redirect traffic to the public network or a VPN instance by redirecting the traffic to an SRv6 TE policy. If you do not specify the { sid | vpnsid } sid option, traffic is redirected to the public network.
Make sure the specified SRv6 SID is correct. This value in packets does not indicate the public or private network attribute. The destination node forwards the packets according to the local SID table.
Examples
# Configure redirecting traffic to Ten-GigabitEthernet 3/0/1 in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] redirect interface ten-gigabitethernet 3/0/1
# Configure redirecting traffic to a next hop in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] redirect next-hop 10.55.66.1 track 1 10.55.88.1 track 2
# Configure redirecting traffic to VPN instance vpn1 in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] redirect access-vpn vpn-instance vpn1
# Configure redirecting HTTP requests to the CPU in traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] redirect http-to-cpu
# Configure redirecting traffic to an SR-MPLS TE policy in traffic behavior 1.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-database] redirect sr-policy 192.168.32.32 5
# Configure redirecting traffic to an SRv6 TE policy in traffic behavior 1.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-database] redirect srv6-policy 2::2 2 sid 2::1
Related commands
qos policy
traffic behavior
remark account-level
Use remark account-level to configure an accounting level marking action in a traffic behavior.
Use undo remark account-level to restore the default.
Syntax
remark account-level account-level
undo remark account-level
Default
No accounting level marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
account-level: Specifies an accounting level in the range of 1 to 8.
Usage guidelines
If QoS policies that contain accounting level marking actions are applied globally, to an interface, and to a user profile, configure an ITA policy for each accounting level. For information about ITA policies, see AAA in BRAS Services Configuration Guide and BRAS Services Command Reference.
The remark account-level command takes effect only on packets from users that are configured with the same accounting level in an ITA policy.
Examples
# Configure traffic behavior database to mark matching packets with accounting level 3.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark account-level 3
remark dot1p
Use remark dot1p to configure an 802.1p priority marking action in a traffic behavior.
Use undo remark dot1p to restore the default.
Syntax
remark dot1p dot1p-value
undo remark dot1p
Default
No marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
dot1p-value: Specifies the 802.1p priority to be marked for packets, in the range of 0 to 7.
Usage guidelines
If you execute the remark dot1p dot1p-value command multiple times, the most recent configuration takes effect.
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
Use remark drop-precedence to configure a drop priority marking action in a traffic behavior.
Use undo remark drop-precedence to restore the default.
Syntax
remark drop-precedence drop-precedence-value
undo remark drop-precedence
Default
No drop priority marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
drop-precedence-value: Specifies the drop priority to be marked for packets, in the range of 0 to 2.
Usage guidelines
If you execute this command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure traffic behavior database to mark matching traffic with drop priority 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark drop-precedence 2
remark dscp
Use remark dscp to configure a DSCP marking action in a traffic behavior.
Use undo remark dscp to restore the default.
Syntax
remark dscp dscp-value
undo remark dscp
Default
No DSCP marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
dscp-value: Specifies a DSCP value, which can be a number from 0 to 63 or a keyword in Table 6.
Table 6 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 |
Usage guidelines
The remark tunnel-dscp command is mutually exclusive with the remark dscp command in a traffic behavior.
If you execute the remark dscp command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure traffic behavior database to mark matching traffic with DSCP 6.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark dscp 6
remark ip-precedence
Use remark ip-precedence to configure an IP precedence marking action in a traffic behavior.
Use undo remark ip-precedence to restore the default.
Syntax
remark ip-precedence ip-precedence-value
undo remark ip-precedence
Default
No IP precedence marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
ip-precedence-value: Specifies the IP precedence value to be marked for packets, in the range of 0 to 7.
Usage guidelines
The remark tunnel-dscp command is mutually exclusive with the remark ip-precedence command in a traffic behavior.
If you execute the remark ip-precedence command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Set the IP precedence to 6 for packets.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark ip-precedence 6
remark local-precedence
Use remark local-precedence to configure a local precedence marking action in a traffic behavior.
Use undo remark local-precedence to restore the default.
Syntax
remark local-precedence local-precedence-value
undo remark local-precedence
Default
No local precedence marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
local-precedence-value: Specifies the local precedence to be marked for packets, in the range of 0 to 7.
Usage guidelines
By marking the local precedence, you assign matching packets to the queue corresponding to the local precedence value. You can use the display qos queue-statistics interface outbound command to display outgoing traffic statistics collected for interfaces on a per-queue basis. The outgoing traffic statistics are displayed only if you have enabled queue-based traffic accounting in the outbound direction and set the packet counting mode to queue.
Examples
# Configure traffic behavior database to mark matching traffic with local precedence 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark local-precedence 2
Related commands
display qos queue-statistics interface outbound
qos queue-statistics
remark qos-local-id
Use remark qos-local-id to configure a local QoS ID marking action in a traffic behavior.
Use undo remark qos-local-id to restore the default.
Syntax
remark qos-local-id local-id-value
undo remark qos-local-id
Default
No local QoS ID marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
local-id-value: Specifies the local QoS ID to be marked for packets, in the range of 1 to 4095.
Usage guidelines
You can use one QoS policy to mark the local QoS ID for packets in the inbound direction. Then, you can use another QoS policy to apply other QoS features in the outbound direction based on the marked local QoS ID.
If you execute this command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure the action of marking packet with local QoS ID 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark qos-local-id 2
remark service-class
Use remark service-class to configure an action of marking the MPLS TE service class in a traffic behavior.
Use undo remark service-class to restore the default.
Syntax
remark service-class service-class-value
undo remark service-class
Default
No MPLS TE service class marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
service-class-value: Specifies the MPLS TE service class in the range of 1 to 15.
Usage guidelines
If the remark service-class command is configured in a QoS policy:
· The QoS policy can be applied only to an interface. The remark service-class command takes effect only in the inbound direction of an interface. To identify the traffic behaviors that do not take effect, use the display qos policy interface command.
· Only one MPLS TE service class marking action can be configured for packets with the same MPLS EXP value on an interface. To modify the MPLS TE service class to be marked, you must remove the existing service class setting and configure a new service class value.
If you execute the remark service-class command multiple times in the same traffic behavior, the most recent configuration takes effect.
You can use the mpls te service-class command to set the MPLS TE service class. For more information, see MPLS TE commands in MPLS Command Reference.
Examples
# Configure an action of marking the MPLS TE service class as 2.
<Sysname> system-view
[Sysname] traffic behavior data
[Sysname-behavior-data] remark service-class 2
remark service-id
Use remark service-id to configure an action of marking the EDSG service ID in a traffic behavior.
Use undo remark service-id to restore the default.
Syntax
remark service-id service-id
undo remark service-id
Default
No EDSG service ID marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
service-id: Specifies the EDSG service ID in the range of 1 to 8. The supported value range is 1 to 4.
Usage guidelines
If you execute the remark service-id command multiple times in the same traffic behavior, the most recent configuration takes effect.
The action of marking the EDSG service ID takes effect only when the QoS policy is applied to an interface or globally.
Examples
# Configure an action of marking the EDSG service ID as 2.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark service-id 2
Related commands
service policy (BRAS Services Command Reference)
service-id (BRAS Services Command Reference)
remark tunnel-dscp
Use remark tunnel-dscp to configure an outer DSCP marking action in a traffic behavior.
Use undo remark tunnel-dscp to restore the default.
Syntax
remark tunnel-dscp dscp-value
undo remark tunnel-dscp
Default
No outer DSCP marking action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
dscp-value: Specifies the DSCP value to be set for the outer IP header of tunneled packets. The DSCP value can be a number from 0 to 63 or a keyword in Table 6.
Usage guidelines
This command takes effect on the following packets:
· GRE packets.
· VXLAN packets.
· IPv4 over IPv4 tunneled packets.
· IPv6 over IPv4 tunneled packets.
· IPv6 tunneled packets.
· MPLS TE tunneled packets.
The outer DSCP value marking action takes effect only when the QoS policy is applied to an interface or globally.
The remark tunnel-dscp command is mutually exclusive with the remark dscp or remark ip-precedence command in one traffic behavior.
If you execute the remark tunnel-dscp command multiple times in the same traffic behavior, the most recent configuration takes effect.
The remark tunnel-dscp command does not take effect on multicast or broadcast traffic transmitted over a tunnel.
Examples
# Configure traffic behavior data to mark matching packets with DSCP value 2 in the outer IP header of tunneled packets.
<Sysname> system-view
[Sysname] traffic behavior data
[Sysname-behavior-data] remark tunnel-dscp 2
traffic behavior
Use traffic behavior to create a traffic behavior and enter its view, or enter the view of an existing traffic behavior.
Use undo traffic behavior to delete a traffic behavior.
Syntax
traffic behavior behavior-name
undo traffic behavior behavior-name
Default
No traffic behaviors exist.
Views
System view
Predefined user roles
network-admin
Parameters
behavior-name: Specifies a name for the traffic behavior, a case-sensitive string of 1 to 31 characters.
Examples
# Create a traffic behavior named behavior1.
<Sysname> system-view
[Sysname] traffic behavior behavior1
[Sysname-behavior-behavior1]
Related commands
display traffic behavior
QoS policy commands
classifier behavior
Use classifier behavior to associate a traffic behavior with a traffic class in a QoS policy.
Use undo classifier to delete a class-behavior association from a QoS policy.
Syntax
classifier classifier-name behavior behavior-name [ [ mode qppb-manipulation | insert-before before-classifier-name ] *insert-before before-classifier-name ] *
undo classifier classifier-name
Default
No traffic behavior is associated with a traffic class.
Views
QoS policy view
Predefined user roles
network-admin
Parameters
classifier-name: Specifies a traffic class by its name, a case-sensitive string of 1 to 31 characters.
behavior-name: Specifies a traffic behavior by its name, a case-sensitive string of 1 to 31 characters.
mode qppb-manipulation: Specifies that the class-behavior association applies only to QPPB. The if-match qos-local-id command in the class sets the same local QoS ID as the apply qos-local-id command in the BGP routing policy. For more information about routing policies, see Layer 3—IP Routing Configuration Guide.
insert-before before-classifier-name: Inserts the new traffic class before an existing traffic class in the QoS policy. The before-classifier-name argument specifies an existing traffic class by its name, a case-sensitive string of 1 to 31 characters. If you do not specify the insert-before before-classifier-name option, the new traffic class is placed at the end of the QoS policy.
Usage guidelines
A traffic class can be associated only with one traffic behavior in a QoS policy.
If the specified traffic class or traffic behavior does not exist, the system defines a null traffic class or traffic behavior.
The undo classifier default-class command performs the following operations:
· Deletes the existing class-behavior association for the system-defined class default-class.
· Associates the system-defined class default-class with the system-defined behavior be.
The mode qppb-manipulation keyword does not support matching the IP precedence in a BGP routing policy. This keyword supports matching the local QoS ID and other match criteria.
Examples
# Associate traffic class database with traffic behavior test in QoS policy user1.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1] classifier database behavior test
# Associate traffic class database with traffic behavior test in QoS policy user1, and specify that the class-behavior association applies only to QPPB.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1] classifier database behavior test mode qppb-manipulation
# Associate traffic class database with traffic behavior test in QoS policy user1, and insert traffic class database before an existing traffic class named class-a.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1] classifier database behavior test insert-before class-a
Related commands
qos policy
control-plane
Use control-plane to enter control plane view.
Syntax
control-plane
Views
System view
Predefined user roles
network-admin
Parameters
Usage guidelines
A QoS policy applied in control plane view takes effect on all packets to the control plane except the packets sent from the management interface.
Examples
# Enter the control plane view.
<Sysname> system-view
[Sysname] control-plane
[Sysname-cp]
display qos policy
Use display qos policy to display QoS policies.
Syntax
display qos policy user-defined [ policy-name [ classifier classifier-name ] ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
user-defined: Specifies user-defined QoS policies.
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a QoS policy, this command displays all user-defined QoS policies.
classifier classifier-name: Specifies a traffic class by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a traffic class, this command displays all traffic classes.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays the QoS policies for the active MPU.
Examples
# Display all user-defined QoS policies.
<Sysname> display qos policy user-defined
User-defined QoS policy information:
Policy: 1 (ID 100)
Classifier: 1 (ID 100)
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Classifier: 2 (ID 101)
Behavior: 2
Accounting enable: Packet
Filter enable: Permit
Marking:
Remark mpls-exp 4
Classifier: 3 (ID 102)
Behavior: 3
-none-
Classifier: 4 (ID 103)
Behavior: 4
Redirecting:
Redirect to SR-TE policy:
Endpoint: 10.0.0.3
Color : 123464
Redirect to SRv6-TE policy:
Endpoint: 56::44
Color : 123464
SID : 5a::13
Classifier: 5 (ID 104)
Behavior: 5
Redirecting:
Redirect to access-vpn vpna track 1 vpnb track 2
Table 7 Command output
Field |
Description |
User-defined QoS policy information |
Information about user-defined QoS policies. |
Policy |
User-defined generic QoS policy name or system-defined QoS policy name. |
For the description of other fields, see Table 1 and Table 4.
display qos policy control-plane
Use display qos policy control-plane to display QoS policies applied to a control plane.
Syntax
display qos policy control-plane slot slot-number
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies a card by its slot number.
Examples
# Display the QoS policy applied to the control plane of slot 1.
<Sysname> display qos policy control-plane slot 1
Control plane slot 1
Direction: Inbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Yellow packets: 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Red packets : 0 (Packets) 0 (Bytes)
0 (pps) 0 (bps)
Classifier: 2
Operator: AND
Rule(s) :
If-match not protocol ipv6
Behavior: 2
Accounting enable:
0 (Packets)
0 (pps)
Filter enable: Permit
Marking:
Remark mpls-exp 4
Classifier: 3
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 8 Command output
Field |
Description |
Direction |
Inbound direction on the control plane. |
Green packets |
Total number of bytes for green packets and average rate of green packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Yellow packets |
Total number of bytes for yellow packets and average rate of yellow packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Red packets |
Total number of bytes for red packets and average rate of red packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
For the description of other fields, see Table 1 and Table 4.
display qos policy control-plane pre-defined
Use display qos policy control-plane pre-defined to display predefined control plane QoS policies of cards.
Syntax
display qos policy control-plane pre-defined [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays the predefined control plane QoS policies for all cards.
Examples
# Display the predefined control plane QoS policy of slot 1.
<Sysname> display qos policy control-plane pre-defined slot 1
Pre-defined policy information slot 1
Protocol Priority Bandwidth Group
Default N/A 7168 (kbps) N/A
IS-IS 29 8192 (kbps) critical
VRRP 36 512 (kbps) important
OSPF Multicast 30 5120 (kbps) critical
IGMP 18 512 (kbps) important
OSPFv3 Unicast 30 5120 (kbps) critical
OSPFv3 Multicast 30 5120 (kbps) critical
VRRPv6 36 512 (kbps) important
ARP 12 1024 (kbps) normal
DHCP Snooping 18 3072 (kbps) redirect
802.1x 12 128 (kbps) important
STP 36 256 (kbps) critical
LACP 36 64 (kbps) critical
MVRP 18 256 (kbps) critical
TTL Expires 18 64 (kbps) monitor
IPOPTION 18 64 (kbps) normal
BGPv6 24 1024 (kbps) critical
Hop Limit Expires 18 64 (kbps) monitor
IPOPTIONv6 18 64 (kbps) normal
LLDP 24 64 (kbps) important
DLDP 24 64 (kbps) critical
ARP Snooping 18 1024 (kbps) redirect
DHCPv6 18 3072 (kbps) normal
Table 9 Command output
Field |
Description |
Pre-defined control plane policy |
Contents of the pre-defined control plane QoS policy. |
Group |
Protocol group to which the protocol belongs: · normal · critical · management · monitor · important · critical · N/A |
display qos policy global
Use display qos policy global to display QoS policies applied globally.
Syntax
display qos policy global [ slot slot-number ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
inbound: Specifies the QoS policy applied in the inbound direction globally.
outbound: Specifies the QoS policy applied in the outbound direction globally.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays global QoS policies for the active MPU.
Usage guidelines
If you do not specify a direction, this command displays both QoS policies applied globally.
Examples
# Display generic QoS policies applied globally.
<Sysname> display qos policy global
Direction: Inbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Bytes)
0 (bps)
Yellow packets: 0 (Bytes)
0 (bps)
Red packets : 0 (Bytes)
0 (bps)
Table 10 Command output
Field |
Description |
Direction |
Direction (inbound or outbound ) in which the QoS policy is applied. |
Policy |
User-defined generic QoS policy name. |
Green packets |
Total number of bytes for green packets and average rate of green packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Yellow packets |
Total number of bytes for yellow packets and average rate of yellow packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Red packets |
Total number of bytes for red packets and average rate of red packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
For the description of other fields, see Table 1 and Table 4.
display qos policy interface
Use display qos policy interface to display the QoS policies applied to interfaces or PVCs.
Syntax
display qos policy interface [ interface-type interface-number ] [ slot slot-number | all ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays QoS policies applied to all interfaces.
slot slot-number: Specifies a card by its slot number. Only virtual interfaces such as VLAN interfaces and aggregate interfaces support this option. If you do not specify a card, this command displays QoS policies on the active MPU.
all: Displays information about QoS policies applied to a logical interface on all cards. If you do not specify this keyword, the command displays information about QoS policies applied to a logical interface on the global active MPU.
inbound: Specifies the QoS policies applied to the inbound direction.
outbound: Specifies the QoS policies applied to the outbound direction.
Usage guidelines
If you do not specify a direction, this command displays both the QoS policies applied to the inbound direction and the QoS policies applied to the outbound direction.
Examples
# Display the generic QoS policy applied to the incoming traffic of Ten-GigabitEthernet 3/0/1.
<Sysname> display qos policy interface ten-gigabitethernet 3/0/1 inbound
Interface: Ten-GigabitEthernet3/0/1
Direction: Inbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Bytes)
0 (bps)
Yellow packets: 0 (Bytes)
0 (bps)
Red packets : 0 (Bytes)
0 (bps)
Classifier: 2
Operator: AND
Rule(s) :
If-match acl 3000
Behavior: 2
Assured Forwarding:
Bandwidth 30000 (kbps) CBS 750000 (Bytes)
Matched : 0 (Packets) 0 (Bytes)
Enqueued : 0 (Packets) 0 (Bytes)
Discarded: 0 (Packets) 0 (Bytes)
Discarded Method: WRED
Discarded: 0 (Packets) 0 (Bytes)
Discard Method: Tail drop
Classifier: 3
Matched : 10 (Packets) 8000 (Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Operator: AND
Rule(s) :
If-match acl 3001
Behavior: 4
Redirecting:
Redirect to SR-TE policy:
NID : 123464
Redirect to SRv6-TE policy:
Forwarding ID: 123464
SID : 25::5a
# Display the generic QoS policies applied to all interfaces.
<Sysname> display qos policy interface
Interface: Ten-GigabitEthernet3/0/1
Direction: Inbound
Mode : Share
Policy: a
Classifier: a
Operator: AND
Rule(s) :
If-match any
Behavior: a
Committed Access Rate:
CIR 112 (kbps), CBS 5120 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Bytes)
0 (bps)
Yellow packets: 0 (Bytes)
0 (bps)
Red packets : 0 (Bytes)
0 (bps)
Table 11 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied to the interface. |
Policy |
User-defined generic QoS policy name. |
Mode |
Sharing mode for QoS and ACL resources. This field appears only if a QoS policy is applied with the share-mode or share-mode-both keyword specified. |
Matched |
Number of matching packets. |
Forwarded |
Average rate of successfully forwarded matching packets in a statistics collection period. |
Dropped |
Average rate of dropped matching packets in a statistics collection period. |
Green packets |
Total number of bytes for green packets and average rate of green packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Yellow packets |
Total number of bytes for yellow packets and average rate of yellow packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Red packets |
Total number of bytes for red packets and average rate of red packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Redirect to access-vpn |
Redirect traffic to a VPN instance. If the VPN instance does not exist, this field is displayed as Redirect to access-vpn N/A. |
Redirect to next-hop |
Redirect traffic to a next hop. If the next hop does not exist, this field is displayed as Redirect to next-hop N/A. |
Redirect to SR-TE policy |
Redirect traffic to an SR-MPLS TE policy. The NID field indicates the Next Hop Label Forwarding Entry (NHLFE) entry index of the SR-MPLS TE policy. |
Redirect to SRv6-TE policy |
Redirect traffic to an SRv6 TE policy: · Forwarding ID—Forwarding entry index of the SRv6 TE policy. · SID—SRv6 SID of the egress node. |
Enqueued |
Number of packets enqueued into the AF queue. |
Discarded |
Number of packets dropped for the AF queue. |
Discard Method |
Discard method for the AF queue: Tail drop or WRED. |
For the description of other fields, see Table 1 and Table 4.
display qos policy user-profile
Use display qos policy user-profile to display QoS policies applied to user profiles.
Syntax
display qos policy user-profile [ name profile-name ] [ user-id user-id ] [ slot slot-number ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name profile-name: Specifies a user profile by its name, a case-sensitive string of 1 to 31 characters. Valid characters include English letters, digits, underscores (_), minus signs (–), and dots (.). The name can start with an English letter or a number and must be unique. The name cannot contain only numbers. If you do not specify a user profile, this command displays QoS policies applied to all user profiles.
user-id user-id: Specifies an online user by its hexadecimal ID in the range of 1 to 7fffff. If you do not specify an online user, this command displays QoS policies applied to user profiles for all online users.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays QoS policies applied to user profiles for all cards.
inbound: Specifies the QoS policies applied to the inbound direction.
outbound: Specifies the QoS policies applied to the outbound direction.
Usage guidelines
If you do not specify a direction, this command displays both the QoS policies applied to the inbound direction and the QoS policies applied to the outbound direction.
Examples
# Display the QoS policy applied to user profile abc for a user.
<Sysname> display qos policy user-profile name abc user-id 300000 inbound
User-Profile: abc
User ID: 0x300000
Direction: Inbound
Policy: p1
Classifier: default-class
Matched : 0 (Packets) 0 (Bytes)
Operator: AND
Rule(s) :
If-match any
Behavior: be
-none-
Table 12 Command output
Field |
Description |
Matched |
Number of packets that meet match criteria. |
Green packets |
Total number of bytes for green packets and average rate of green packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Yellow packets |
Total number of bytes for yellow packets and average rate of yellow packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Red packets |
Total number of bytes for red packets and average rate of red packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
For the description of other fields, see Table 1 and Table 4.
display qos vlan-policy
Use display qos vlan-policy to display QoS policies applied to VLANs.
Syntax
display qos vlan-policy { name policy-name | vlan [ vlan-id ] } [ slot slot-number ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
vlan vlan-id: Specifies a VLAN by its ID in the range of 1 to 4094.
inbound: Specifies the QoS policies applied to the inbound direction.
outbound: Specifies the QoS policies applied to the outbound direction.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays QoS policies applied to VLANs for the active MPU.
Usage guidelines
If you do not specify a direction, this command displays the QoS policies applied to the inbound direction and the QoS policies applied to the outbound direction.
Examples
# Display QoS policies applied to VLAN 2.
<Sysname> display qos vlan-policy vlan 2
Vlan 2
Direction: Outbound
Policy: 1
Classifier: 1
Operator: AND
Rule(s) :
If-match acl 2000
Behavior: 1
Marking:
Remark dscp 3
Committed Access Rate:
CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0(Bytes)
0 (bps)
Yellow packets: 0(Bytes)
0 (bps)
Red packets : 0(Bytes)
0 (bps)
Classifier: 2
Operator: AND
Rule(s) :
If-match protocol ipv6
Behavior: 2
3268134 (Packets)
1000 (pps)
Filter enable: Permit
Marking:
Classifier: 3
Operator: AND
Rule(s) :
-none-
Behavior: 3
-none-
Table 13 Command output
Field |
Description |
Direction |
Direction in which the QoS policy is applied for the VLAN. |
Green packets |
Total number of bytes for green packets and average rate of green packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Yellow packets |
Total number of bytes for yellow packets and average rate of yellow packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
Red packets |
Total number of bytes for red packets and average rate of red packets in the most recent statistics collection interval. The interval is set by using the flow-interval command (see Ethernet interface commands in Interface Command Reference). |
For the description of other fields, see Table 1 and Table 4.
qos apply policy (interface view, control plane view)
Use qos apply policy to apply a QoS policy to an interface or control plane.
Use undo qos apply policy to remove an applied QoS policy.
Syntax
qos apply policy policy-name { inbound | outbound } [ preorder preorder-value ] [ share-mode | share-mode-both ]
undo qos apply policy [ policy-name ] { inbound | outbound }
Default
No QoS policy is applied.
Views
Control plane view
Interface view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a QoS policy when executing the undo qos apply policy command on an interface, all applied QoS policies will be removed from the interface. You must specify a QoS policy when executing the undo qos apply policy command on any other object.
inbound: Applies the QoS policy to the inbound direction.
outbound: Applies the QoS policy to the outbound direction. This keyword is not supported in control plane view.
preorder preorder-value: Specifies the order in which QoS policies applied to the inbound direction of an interface are executed. The greater the value, the higher the priority. The value for the preorder-value argument can only be 1. This option is supported only in interface view.
share-mode: Applies the QoS policy in sharing mode to a Layer 2 or Layer 3 Ethernet interface. In this mode, all interfaces on an interface card with the same QoS policy applied in one direction share one QoS and ACL resource.
share-mode-both: Applies the QoS policy in direction-independent sharing mode to a Layer 2 or Layer 3 Ethernet interface. In this mode, all interfaces on an interface card with the same QoS policy applied share one QoS and ACL resource.
Usage guidelines
A QoS policy applied to the inbound direction of an interface cannot contain any of these queuing actions: queue ef, queue af, or queue wfq.
If you apply QoS policies separately to an aggregate interface and a member port of the aggregate interface, the QoS policy applied to the aggregate interface takes effect. The QoS policy applied to the member port takes effect after it leaves the aggregation group.
You can specify the preorder preorder-value option only when you apply a QoS policy to the inbound direction of an interface.
A QoS policy applied with the preorder preorder-value option specified has higher priority than that applied without the preorder preorder-value option.
A QoS policy configured with CBQ is not supported in control plane view.
You can use the following commands to match protocol packets sent to the CPU for a QoS policy applied to a control plane:
· if-match control-plane protocol
· if-match acl
When you use the if-match acl command to match protocol packets sent to the CPU, follow these restrictions and guidelines:
¡ The used ACL must be an advanced ACL.
¡ You must specify TCP or UDP for the protocol argument in the rule.
¡ You must specify a source port or destination port by using the eq operator in the rule.
For example, an IPv4 advanced ACL that contains a rule permit tcp source-port eq 80 statement can match TCP packets sent to the CPU.
If you specify the share-mode or share-mode-both keyword when applying a QoS policy to an interface, follow these restrictions and guidelines:
· If you specify the share-mode keyword, all interfaces on an interface module with the QoS policy applied in one direction share one QoS and ACL resource. If you specify the share-mode-both keyword, all interfaces on an interface module with the QoS policy applied share one QoS and ACL resource.
If the share-mode or share-mode-both keyword is not specified, each interface uses one QoS and ACL resource in one direction.
· All interfaces that share one QoS and ACL resource evenly share the set CIR if a traffic policing action is configured in the QoS policy.
If the share-mode or share-mode-both keyword is not specified, the bandwidth of each interface can be limited to the CIR.
· You cannot specify the share-mode or share-mode-both keyword when applying an ACL to the same direction of the interface. For more information about applying an ACL to an interface, see the packet-filter (interface view) command in ACL commands.
The display qos policy interface command output for an interface also contains packet statistics for all interfaces that share the QoS and ACL resource with the interface.
You cannot change the sharing mode dynamically after a QoS policy is applied to an interface. To change the sharing mode for an applied QoS policy, perform the following tasks:
1. Remove the QoS policy from the interface.
2. Reapply the QoS policy with or without the share-mode or share-mode-both keyword specified.
Examples
# Apply generic QoS policy USER1 to the incoming traffic of Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos apply policy USER1 inbound
# Apply generic QoS policy abc with order value 1 to the incoming traffic of Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos apply policy abc inbound preorder 1
# Apply generic QoS policy aaa to the incoming traffic of the control plane.
<Sysname> system-view
[Sysname] control-plane
[Sysname-cp] qos apply policy aaa inbound
# Apply generic QoS policy aaa in sharing mode to the outgoing traffic of Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos apply policy aaa outbound share-mode
# Apply generic QoS policy aaa in direction-independent sharing mode to the outgoing traffic of Ten-GigabitEthernet 3/0/1 and incoming traffic of Ten-GigabitEthernet 3/0/2.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos apply policy aaa outbound share-mode-both
[Sysname] interface ten-gigabitethernet 3/0/2
[Sysname-Ten-GigabitEthernet3/0/2] qos apply policy aaa inbound share-mode-both
qos apply policy (user profile view)
Use qos apply policy to apply a QoS policy to a user profile.
Use undo qos apply policy to remove a QoS policy applied to a user profile.
Syntax
qos apply policy policy-name { inbound | outbound }
undo qos apply policy policy-name { inbound | outbound }
Default
No QoS policy is applied to a user profile.
Views
User profile view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
inbound: Applies the QoS policy to the inbound direction.
outbound: Applies the QoS policy to the outbound direction.
Usage guidelines
Deleting a user profile also removes the QoS policies applied to the user profile.
Examples
# Apply QoS policy test to incoming traffic of user profile user.
<Sysname> system-view
[Sysname] user-profile user
[Sysname-user-profile-user] qos apply policy test outbound
qos apply policy global
Use qos apply policy global to apply a QoS policy globally.
Use undo qos apply policy global to remove a globally applied QoS policy.
Syntax
qos apply policy policy-name global { inbound | outbound } [ preorder preorder-value ]
undo qos apply policy policy-name global { inbound | outbound }
Default
No QoS policy is applied globally.
Views
System view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
inbound: Applies the QoS policy to the inbound direction.
outbound: Applies the QoS policy to the outbound direction.
preorder preorder-value: Specifies the order in which QoS policies applied globally in the same direction are executed. The greater the value, the higher the priority. The value for the preorder-value argument can only be 1.
Usage guidelines
A QoS policy applied globally takes effect on traffic of all interfaces.
You can specify the preorder preorder-value option only when you apply a QoS policy to the inbound direction globally.
A QoS policy applied with the preorder preorder-value option specified has higher priority than that applied without the preorder preorder-value option
# Globally apply generic QoS policy abc with order value 1 to the incoming traffic.
<Sysname> system-view
[Sysname] qos apply policy abc global inbound preorder 1
qos policy
Use qos policy to create a QoS policy and enter its view, or enter the view of an existing QoS policy.
Use undo qos policy to delete a QoS policy.
Syntax
qos policy policy-name
undo qos policy policy-name
Default
No QoS policies exist.
Views
System view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a name for the QoS policy, a case-sensitive string of 1 to 31 characters.
To delete a QoS policy that has been applied to an object, you must first remove the QoS policy from the object.
Examples
# Create a generic QoS policy named user1.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1]
Related commands
classifier behavior
qos apply policy
qos apply policy global
qos vlan-policy
qos vlan-policy
Use qos vlan-policy to apply a QoS policy to the specified VLANs.
Use undo qos vlan-policy to remove a QoS policy from the specified VLANs.
Syntax
qos vlan-policy policy-name vlan vlan-id-list { inbound | outbound }
undo qos vlan-policy policy-name vlan vlan-id-list { inbound | outbound }
Default
No QoS policy is applied to a VLAN.
Views
System view
Predefined user roles
network-admin
Parameters
policy-name: Specifies a QoS policy by its name, a case-sensitive string of 1 to 31 characters.
vlan vlan-id-list: Specifies a space-separated list of up to eight VLAN IDs or a VLAN ID range in the form of vlan-id1 to vlan-id2. The value for vlan-id2 must be greater than or equal to the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094.
inbound: Applies the QoS policy to the inbound direction.
outbound: Applies the QoS policy to the outbound direction.
Examples
# Apply QoS policy test to the incoming traffic 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
Use reset qos policy control-plane to clear the statistics of the QoS policy applied to a control plane.
Syntax
reset qos policy control-plane
Views
User view
Predefined user roles
network-admin
Parameters
Examples
# Clear the statistics of the QoS policy applied to the control plane of slot 1.
<Sysname> reset qos policy control-plane
reset qos policy global
Use reset qos policy global to clear the statistics for QoS policies applied globally.
Syntax
reset qos policy global [ inbound | outbound ]
Views
User view
Predefined user roles
network-admin
Parameters
inbound: Specifies the QoS policy applied to the inbound direction globally.
outbound: Specifies the QoS policy applied to the outbound direction globally.
Usage guidelines
If you do not specify a direction, this command clears the statistics for both QoS policies applied globally.
Examples
# Clear the statistics for the generic QoS policy applied to the incoming traffic globally.
<Sysname> reset qos policy global inbound
reset qos vlan-policy
Use reset qos vlan-policy to clear the statistics for QoS policies applied to VLANs.
Syntax
reset qos vlan-policy [ vlan vlan-id ] [ inbound | outbound ]
Views
User view
Predefined user roles
network-admin
Parameters
vlan vlan-id: Specifies a VLAN ID in the range of 1 to 4094.
inbound: Specifies the QoS policies applied to the inbound direction.
outbound: Specifies the QoS policies applied to the outbound direction.
Usage guidelines
If you do not specify a direction, this command clears the statistics for both the QoS policies applied to the inbound direction and the QoS policies applied to the outbound direction.
Examples
# Clear the statistics of QoS policies applied to VLAN 2.
<Sysname> reset qos vlan-policy vlan 2
QoS SNMP notification commands
snmp-agent trap enable qos
Use snmp-agent trap enable qos to enable SNMP notifications for QoS.
Use undo snmp-agent trap enable qos to disable SNMP notifications for QoS.
Syntax
snmp-agent trap enable qos
undo snmp-agent trap enable qos
Default
SNMP notifications are disabled for QoS.
Views
System view
Predefined user roles
network-admin
Usage guidelines
Execute this command to report critical QoS events by sending SNMP notifications.
For QoS notifications to be sent correctly, you must also configure SNMP on the device. For more information about SNMP configuration, see the network management and monitoring configuration guide for the device.
Examples
# Enable SNMP notifications for QoS.
<Sysname> system-view
[Sysname] snmp-agent trap enable qos
Exclusive bandwidth commands
display qos exclusive-bandwidth interface outbound
Use display qos exclusive-bandwidth interface outbound to display exclusive bandwidth settings for interfaces.
Syntax
display qos exclusive-bandwidth interface [ interface-type interface-number ] outbound [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays exclusive bandwidth settings for all interfaces.
slot slot-number: Specifies a card by its slot number. Only aggregate interfaces support this option.
Examples
# Display the exclusive bandwidth setting for Ten-GigabitEthernet 3/0/1.
<Sysname> display qos exclusive-bandwidth interface ten-gigabitethernet 3/0/1 outbound
Ten-GigabitEthernet3/0/1 exclusive-bandwidth: 100 kbps
Outbound traffic statistics:
Total passed: 1 packets, 2 bytes
Total discarded: 3 packets, 4 bytes
Last 30 seconds pass rate: 0 pps, 0 bps
Last 30 seconds discard rate: 0 pps, 0 bps
Table 14 Command output
Field |
Description |
Total passed |
Total number of packets and total number of bytes allowed to pass. |
Total discarded |
Total number of packets and total number of bytes dropped. |
Last 30 seconds pass rate |
Number of packets and number of bytes allowed to pass per second in the last 30 seconds. |
Last 30 seconds discard rate |
Number of packets and number of bytes dropped per second in the last 30 seconds. |
Related commands
qos exclusive-bandwidth
qos exclusive-bandwidth
Use qos exclusive-bandwidth to set the exclusive bandwidth on an interface.
Use undo qos exclusive-bandwidth to cancel the exclusive bandwidth setting on an interface.
Syntax
qos exclusive-bandwidth bandwidth-value
undo qos exclusive-bandwidth
Default
No exclusive bandwidth is set on an interface.
Views
Layer 3 Ethernet interface view
Layer 3 aggregate interface view
Predefined user roles
network-admin
Parameters
bandwidth-value: Specifies the exclusive bandwidth value in kbps. The value range for this argument is:
· 300 to 950000 for GE interfaces.
· 300 to 9500000 for 10-GE interfaces.
· 300 to 38000000 for 40-GE interfaces.
· 300 to 95000000 for 100-GE interfaces.
· 300 to 95000000 for Layer 3 aggregate interfaces.
Usage guidelines
The exclusive bandwidth on an interface is reserved for specific features and cannot be shared with other features. The amount of exclusive bandwidth is deducted from the interface bandwidth. For example, if you set the exclusive bandwidth for CRLSP, the exclusive bandwidth can only be used by CRLSP. For more information about the CRLSP exclusive bandwidth, see static CRLSP configuration in MPLS Configuration Guide.
The exclusive bandwidth feature is mutually exclusive with the HQoS feature. If one feature has been configured on an interface, the other feature cannot be configured successfully.
Examples
# Set the exclusive bandwidth to 100 kbps on Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos exclusive-bandwidth 100
Related commands
display qos exclusive-bandwidth interface outbound
Interface channelization commands
display mode channel-bandwidth interface
Use display mode channel-bandwidth interface to display interface channelization configuration.
Syntax
display mode channel-bandwidth interface [ interface-type { interface-number | interface-number.subnumber } ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type: Specifies an interface type. If you do not specify an interface, this command displays the interface channelization configuration for all subinterfaces.
interface-number: Specifies an interface number.
interface-number.subnumber: Specifies a subinterface number. The value range for the subnumber argument is 1 to 99999999.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays the interface channelization configuration for all cards.
Examples
# Display the interface channelization configuration for Ten-GigabitEthernet 3/0/1.1.
<Sysname> display mode channel-bandwidth interface ten-gigabitethernet 3/0/1.1
Subinterface : XGE3/0/1.1 Channelized bandwidth : 100 kbps
# Display the interface channelization configuration for a Layer 3 aggregate interface.
<Sysname> display mode channel-bandwidth interface route-aggregation 1
Slot 1
Interface : RAGG 1 Total bandwidth : 1000000 kbps
Total channelized bandwidth : 300 kbps
Subinterface : RAGG 1.1 Channelized bandwidth : 100 kbps
Subinterface : RAGG 1.2 Channelized bandwidth : 200 kbps
Subinterface : RAGG 1.3 Channelized bandwidth : 300 kbps(Failed)
Slot 1
Interface : RAGG 1 Total bandwidth : 1000000 kbps
Total channelized bandwidth : 300 kbps
Subinterface : RAGG 1.1 Channelized bandwidth : 100 kbps
Subinterface : RAGG 1.2 Channelized bandwidth : 200 kbps
Subinterface : RAGG 1.3 Channelized bandwidth : 300 kbps(Failed)
# Display the interface channelization configuration for all interfaces.
<Sysname> display mode channel-bandwidth interface
Interface : XGE3/0/1 Total bandwidth : 1000000 kbps
Total channelized bandwidth : 600 kbps
Subinterface : XGE3/0/1.1 Channelized bandwidth : 100 kbps
Subinterface : XGE3/0/1.2 Channelized bandwidth : 200 kbps
Subinterface : XGE3/0/1.3 Channelized bandwidth : 300 kbps
Interface : XGE3/0/2 Total bandwidth : 1000000 kbps
Total channelized bandwidth : 600 kbps
Subinterface : XGE3/0/2.1 Channelized bandwidth : 100 kbps
Subinterface : XGE3/0/2.2 Channelized bandwidth : 200 kbps
Subinterface : XGE3/0/2.3 Channelized bandwidth : 300 kbps
…
Table 15 Command output
Field |
Description |
Channelized bandwidth |
Channelized bandwidth of the subinterface. For a Layer 3 aggregate subinterface, this field displays Failed if the channelized bandwidth fails to be configured. |
Slot |
Number of the slot where the aggregate interface resides. |
Interface |
Main interface. |
Total bandwidth |
Total bandwidth of the main interface. The bandwidth is the value configured by using the bandwidth or qos lr command, whichever is smaller. |
Total channelized bandwidth |
Total channelized bandwidth of all subinerfaces configured. |
Related commands
mode channel-bandwidth
mode channel-bandwidth
Use mode channel-bandwidth to set the channelized bandwidth for a subinterface.
Use undo mode channel-bandwidth to restore the default.
Syntax
mode channel-bandwidth bandwidth-value
undo mode channel-bandwidth
Default
The channelized bandwidth is not set for a subinterface.
Views
Subinterface view
Predefined user roles
network-admin
Parameters
bandwidth-value: Specifies the channelized bandwidth in kbps. The value range for this argument is 300 to 950000.
Usage guidelines
By default, all subinterfaces of a main interface share and contend for the bandwidth of the main interface. Subinterfaces that carry key services cannot be guaranteed enough bandwidth. This feature allows subinterfaces of a physical interface or aggregate interface to exclusively use the specified amount of bandwidth.
Before configuring the channelized bandwidth for a Layer 3 aggregate subinterface, you must execute the bandwidth command on the aggregate interface.
The total channelized bandwidth of subinterfaces cannot exceed the actual bandwidth of the main interface plus 1 Mbps. The channelized bandwidth takes effect only in the outbound direction.
This feature is mutually exclusive with the exclusive bandwidth setting.
This feature is mutually exclusive with configuring the maximum reservable bandwidth for MPLS TE. For more information about configuring the maximum reservable bandwidth for MPLS TE, see MPLS TE configuration in MPLS Configuration Guide.
This feature is mutually exclusive with HQoS. For more information about HQoS, see ACL and QoS Configuration Guide.
Examples
# Set the channelized bandwidth to 100 kbps for Ten-GigabitEthernet 3/0/1.1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1.1
[Sysname-Ten-GigabitEthernet3/0/1.1] mode channel-bandwidth 100
Related commands
display mode channel-bandwidth interface
mpls te max-reservable-bandwidth (MPLS Command Reference)
qos apply scheduler-policy
qos exclusive-bandwidth
Priority mapping commands
Priority map commands
display qos map-table
Use display qos map-table to display the configuration of priority maps.
Syntax
display qos map-table[ 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 ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
inbound: Specifies priority maps for the inbound direction.
The device provides the following types of priority map.
Priority mapping |
Description |
dot1p-dot1p |
802.1p-802.1p priority map. |
dot1p-dp |
802.1p-drop priority map. |
dot1p-dscp |
802.1p-DSCP priority map. |
dot1p-exp |
802.1p-EXP priority map. |
dot1p-lp |
802.1p-local priority map. |
dscp-dot1p |
DSCP-802.1p priority map. |
dscp-dp |
DSCP-drop priority map. |
dscp-dscp |
DSCP-DSCP priority map. |
dscp-exp |
DSCP-EXP priority map. |
dscp-lp |
DSCP-local priority map. |
exp-dot1p |
EXP-802.1p priority map. |
exp-dp |
EXP-drop priority map. |
exp-dscp |
EXP-DSCP priority map. |
exp-exp |
EXP-EXP priority map. |
exp-lp |
EXP-local priority map. |
Usage guidelines
If you do not specify a priority map, this command displays the configuration of all uncolored priority maps.
If you do not specify any parameters, this command displays the configuration of all priority maps, including colored and uncolored priority maps.
Examples
# Display the configuration of the 802.1p-local priority map.
<Sysname> display qos map-table dot1p-lp
MAP-TABLE NAME: dot1p-lp TYPE: pre-define DIRECTION: inbound
IMPORT : EXPORT
0 : 0
1 : 1
2 : 2
3 : 3
4 : 4
5 : 5
6 : 6
7 : 7
Table 17 Command output
Field |
Description |
MAP-TABLE NAME |
Name of the priority map. |
TYPE |
Type of the priority map. |
DIRECTION |
Direction of the priority map. |
IMPORT |
Input values of the priority map. |
EXPORT |
Output values of the priority map. |
display qos map-table color
Use display qos map-table color to display the configuration of a colored priority map.
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 ] }
network-admin
network-operator
green: Specifies green packets.
yellow: Specifies yellow packets.
red: Specifies red packets.
inbound: Specifies priority maps for the inbound direction.
For the description of other keywords, see Table 16.
Packets processed by traffic policing are colored green, yellow, or red. To perform priority mapping for packets in different colors, the device provides colored priority maps, each of which is a priority map specific to a color. For how traffic policing processes and colors packets, see ACL and QoS Configuration Guide.
If you do not specify a color, this command displays the configuration of priority maps for all three colors.
If you do not specify a priority map, this command displays the configuration of all colored priority maps.
# Display the configuration of the EXP-local priority map for incoming green packets.
<Sysname> display qos map-table color green inbound exp-lp
MAP-TABLE NAME: exp-lp TYPE: pre-define COLOR: green DIRECTION: inbound
Priority map name. |
|
Priority map type. |
|
Priority map color. |
|
Direction of the priority map. |
|
Input values of the priority map. |
|
Output values of the priority map. |
display qos map-table interface
Use display qos map-table interface to display flexible priority maps applied to interfaces.
Syntax
display qos map-table interface [ interface-type interface-number ] [ inbound | outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays flexible priority maps applied to all interfaces.
inbound: Specifies flexible priority maps applied to the inbound direction.
outbound: Specifies flexible priority maps applied to the outbound direction.
Usage guidelines
If you do not specify a direction, this command displays both the flexible priority maps applied to the inbound direction and the flexible priority maps applied to the outbound direction.
Examples
# Display the flexible priority map applied to Ten-GigabitEthernet 3/0/1.
<Sysname> display qos map-table interface ten-gigabitethernet 3/0/1
Interface: Ten-GigabitEthernet3/0/1
Direction: Inbound
Map table name: user1
Related commands
display qos map-table name
qos map-table name
display qos map-table name
Use display qos map-table name to display the configuration of flexible priority maps.
Syntax
display qos map-table name [ map-table-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
map-table-name: Specifies a flexible priority map by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a flexible priority map, this command displays the configuration of all flexible priority maps.
Examples
# Display the configuration of flexible priority map user1.
<Sysname> display qos map-table name user1
Map table name: user1 Item: 6
Type Import Import Color Export Export Color
dot1p-lp 0 Green 2 None
dot1p-lp 0 Red 3 None
dot1p-lp 0 Yellow 4 None
dot1p-lp 1 Red 0 None
dscp-dp 2 None 1 Yellow
dscp-dp 3 None 3 Green
Table 19 Command output
Field |
Description |
MAP-TABLE NAME |
Priority map name. |
TYPE |
Priority map type. |
COLOR |
Priority map color. |
IMPORT |
Input values of the priority map. |
EXPORT |
Output values of the priority map. |
Import Color |
Input color of the priority map. None indicates that the packet color is ignored. |
Import Color |
Output color of the priority map. None indicates that the packet color is ignored. |
Related commands
display qos map-table interface
qos map-table name
import (flexible priority map view)
Use import to configure mappings for a flexible priority map.
Use undo import to delete mappings of a flexible priority map.
Syntax
{ 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 } import import-value-list export export-value color { green | red | yellow }
{ lp-dot1p | lp-dp | lp-dscp | lp-exp | lp-phb } import import-value-list color { green | red | yellow } export export-value
undo { 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 } import import-value-list
undo { lp-dot1p | lp-dp | lp-dscp | lp-exp | lp-phb } import import-value-list color { green | red | yellow }
Default
No mappings exist in a flexible priority map.
Views
Flexible priority map view
Predefined user roles
network-admin
Parameters
import-value-list: Specifies a list of input values.
export-value: Specifies the output value.
green: Specifies the green color.
red: Specifies the red color.
yellow: Specifies the yellow color.
Priority mapping |
Description |
dot1p-dot1p |
802.1p-802.1p priority map. |
dot1p-dp |
802.1p-drop priority map. |
dot1p-dscp |
802.1p-DSCP priority map. |
dot1p-exp |
802.1p-EXP priority map. |
dot1p-lp |
802.1p-local priority map. |
dscp-dot1p |
DSCP-802.1p priority map. |
dscp-dp |
DSCP-drop priority map. |
dscp-dscp |
DSCP-DSCP priority map. |
dscp-exp |
DSCP-EXP priority map. |
dscp-lp |
DSCP-local priority map. |
exp-dot1p |
EXP-802.1p priority map. |
exp-dp |
EXP-drop priority map. |
exp-dscp |
EXP-DSCP priority map. |
exp-exp |
EXP-EXP priority map. |
exp-lp |
EXP-local priority map. |
lp-dot1p |
Local-802.1p priority map. |
lp-dp |
Local-drop priority map. |
lp-dscp |
Local-DSCP priority map. |
lp-exp |
Local-EXP priority map. |
lp-phb |
Local-PHB priority map. |
Usage guidelines
If you execute this command multiple times and enter the same input values and the same color for one priority map, the most recent configuration takes effect.
You can specify different output values for different colors with the same input value.
Examples
# Configure a mapping from DSCP priority 2 to local precedence 4 for flexible priority map user1.
<Sysname> system-view
[Sysname] qos map-table name user1
[Sysname-flexmaptbl-user1] dscp-lp import 2 export 4
Related commands
display qos map-table interface
qos map-table name
import (priority map view)
Use import to configure mappings for a priority map.
Use undo import to restore the specified or all mappings to the default for a priority map.
Syntax
import import-value-list export export-value
undo import { import-value-list | all }
Default
The default priority maps are used. For more information, see ACL and QoS Configuration Guide.
Views
Priority map view
Predefined user roles
network-admin
Parameters
import-value-list: Specifies a list of input values.
export-value: Specifies the output value.
all: Restores all mappings in the priority map to the default.
Usage guidelines
If you have configured a priority map and applied the flexible priority map to an interface, the flexible priority map takes priority on the interface.
Examples
# Configure the 802.1p-drop priority map to map 802.1p priority values 4 and 5 to drop priority 1.
<Sysname> system-view
[Sysname] qos map-table dot1p-dp
[Sysname-maptbl-dot1p-dp] import 4 5 export 1
Related commands
display qos map-table
display qos map-table color
qos apply map-table name
Use qos apply map-table name to apply a flexible priority map to an interface.
Use undo qos apply map-table name to remove a flexible priority map from an interface.
Syntax
qos apply map-table name map-table-name { inbound | outbound }
undo qos apply map-table name map-table-name { inbound | outbound }
Default
No flexible priority map is applied to an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
map-table-name: Specifies a flexible priority map by its name, a case-sensitive string of 1 to 31 characters. The specified flexible priority map must already exist.
inbound: Applies the flexible priority map to the inbound direction.
outbound: Applies the flexible priority map to the outbound direction.
Usage guidelines
If you do not specify a direction, this command applies the flexible priority map to the inbound direction.
Only one flexible priority map can be applied to one direction of an interface.
If you have configured a priority map and applied the flexible priority map to an interface, the flexible priority map takes priority on the interface.
Only the following priority maps can be applied to the inbound direction of an interface:
· 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
Only the following priority maps can be applied to the outbound direction of an interface:
· lp-dot1p
· lp-dp
· lp-dscp
· lp-exp
· lp-php
Examples
# Apply flexible priority map user1 to Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos apply map-table name user1
Related commands
display qos map-table interface
qos map-table name
qos map-table
Use qos map-table to enter the specified priority map view.
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-exp | exp-lp }
Views
System view
Predefined user roles
network-admin
Parameters
inbound: Specifies the priority map for the inbound direction.
For the description of other keywords, see Table 16.
Examples
# Enter the inbound 802.1p-drop priority map view.
<Sysname> system-view
[Sysname] qos map-table inbound dot1p-dp
[Sysname-maptbl-in-dot1p-dp]
Related commands
display qos map-table
import
qos map-table color
Use qos map-table color to enter the specified colored priority map view.
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 } }
Views
System view
Predefined user roles
network-admin
Parameters
green: Specifies green packets.
yellow: Specifies yellow packets.
red: Specifies red packets.
inbound: Specifies the priority map for the inbound direction.
outbound: Specifies the priority map for the outbound direction.
For the description of other keywords, see Table 16.
Usage guidelines
Packets processed by traffic policing are colored green, yellow, or red. To perform priority mapping for packets in different colors, the device provides colored priority maps, each of which is a priority map specific to a color. For how traffic policing processes and colors packets, see ACL and QoS Configuration Guide.
Examples
# Enter the green EXP-local priority map view.
<Sysname> system-view
[Sysname] qos map-table color green exp-lp
[Sysname-maptbl-green-exp-lp]
# Enter the view of the DSCP-local priority map for incoming red packets.
<Sysname> system-view
[Sysname] qos map-table color red inbound dscp-lp
[Sysname-maptbl-red-in-dscp-lp]
Related commands
display qos map-table color
import
qos map-table name
Use qos map-table name to create a flexible priority map and enter its view, or enter the view of an existing flexible priority map.
Use undo qos map-table name to delete a flexible priority map.
Syntax
qos map-table name map-table-name
undo qos map-table name map-table-name
Default
No flexible priority maps exist.
Views
System view
Predefined user roles
network-admin
Parameters
map-table-name: Specifies a flexible priority map name, a case-sensitive string of 1 to 31 characters.
Usage guidelines
A flexible priority map applied to an interface cannot be deleted directly. To delete an applied flexible priority map, first remove the flexible priority map from the interface by using the undo qos apply map-table name command.
Examples
# Create a flexible priority map named user1 and enter its view.
<Sysname> system-view
[Sysname] qos map-table name user1
[Sysname-map-tbl-user1]
Related commands
display qos map-table name
qos apply map-table name
Priority trust mode commands
display qos trust interface
Use display qos trust interface to display the priority trust mode and port priorities of an interface.
Syntax
display qos trust interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the priority trust mode and port priorities of all interfaces.
Examples
# Display the priority trust mode and port priorities of Ten-GigabitEthernet 3/0/1.
<Sysname> display qos trust interface ten-gigabitethernet 3/0/1
Interface: Ten-GigabitEthernet3/0/1
Port priority trust information
Port priority: 0
Port dot1p priority: -
Port dscp priority: -
Port exp priority: -
Port priority trust type: exp, Override: disable
Table 21 Command output
Field |
Description |
Interface |
Interface type and interface number. |
Port priority |
Port priority |
Port dot1p priority |
802.1p priority of the port. |
Port dscp priority |
DSCP value of the port. |
Port exp priority |
EXP value of the port. |
Port priority trust type |
Priority trust mode: auto, inner-dot1p, dot1p, dscp, exp, or none. If the trust mode is none, the port priority is used for priority mapping. |
Override |
Indicates whether the priority derived through priority mapping overwrites the priority carried in the packet. |
qos trust
Use qos trust to configure the priority trust mode for an interface.
Use undo qos trust to restore the default.
Syntax
qos trust { auto | dot1p | dscp | exp | inner-dot1p }[ override ]
undo qos trust
Default
An interface trusts the port priority.
Views
Interface view
Predefined user roles
network-admin
Parameters
auto: Uses the priority in incoming packets for priority mapping. For Layer 2 packets, the 802.1p priority is used. For Layer 3 packets, the IP precedence is used. For MPLS packets, the EXP value is used.
dot1p: Uses the 802.1p priority in incoming packets for priority mapping.
dscp: Uses the DSCP value in incoming packets for priority mapping.
exp: Uses the EXP value in incoming MPLS packets for priority mapping.
inner-dot1p: Uses the 802.1p priority in the inner header of received QinQ packets for mapping.
override: Uses the priority derived through priority mapping to overwrite the original priority carried in the packet. This keyword is optional. By default, this feature is disabled.
Usage guidelines
If you do not specify the override keyword, the device obtains the EXP value through priority mapping when an IP packet enters an MPLS network.
For Layer 3 packets, the outer 802.1p priority value is overwritten according to the priority trust mode, regardless of whether the override keyword is specified.
The qos trust dot1p or qos trust dscp command does not take effect on MPLS packets from the public network. The device uses the EXP value in the MPLS packets for priority mapping.
Examples
# Set the priority trust mode to 802.1p priority on Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos trust dot1p
Related commands
Port priority commands
qos priority
Use qos priority to change the port priority of an interface.
Use undo qos priority to restore the default.
Syntax
qos priority [ dot1p | dscp | exp ] priority-value
undo qos priority [ dot1p | dscp | exp ]
Default
The port priority is 0.
Views
Interface view
Predefined user roles
network-admin
Parameters
priority-value: Specifies the port priority value.
· If you do not specify a port priority type, the port priority is in the range of 0 to 7.
· If you specify a port priority type, see Table 22 for the value range for each type of port priority.
Table 22 Value ranges for different types of port priority
Port priority type |
Value range |
Remarks |
802.1p |
0 to 7 |
N/A |
DSCP |
0 to 63 |
N/A |
EXP |
0 to 7 |
N/A |
Examples
# Set the DSCP port priority of Ten-GigabitEthernet 3/0/1 to 20.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos priority dscp 20
Related commands
display qos trust interface
Traffic policing, GTS, and rate limit commands
Traffic policing commands
display qos car control-plane whitelist
Use display qos car control-plane whitelist to display ACL whitelist-based control plane CAR configuration and statistics.
Syntax
display qos car control-plane whitelist [ ipv6 ] slot slot-number
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ipv6: Specifies the IPv6 ACL whitelist. If you do not specify this keyword, the command displays IPv4 ACL whitelist-based control plane CAR configuration and statistics.
slot slot-number: Specifies a card by its slot number.
Usage guidelines
To protect traffic matching the ACL whitelist, make sure ACL whitelist-based control plane CAR is enabled. This command displays ACL whitelist-based control plane CAR configuration and statistics by queue.
An ACL whitelist can be statically configured or dynamically generated according to existing TCP connections or other protocol sessions.
To view ACL rules in an ACL whitelist, use the display acl whitelist command.
Examples
# Display ACL whitelist-based control plane CAR configuration and statistics for slot 1.
<Sysname> display qos car control-plane whitelist slot 1
Slot 1
Whitelist-based traffic policing: Enabled
Queue name: default
CIR 30720 (kbps), CBS 8192 (Bytes)
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Queue name: ftp
CIR 1024 (kbps), CBS 8192 (Bytes)
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Queue name: telnet
CIR 1024 (kbps), CBS 8192 (Bytes)
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Table 23 Command output
Field |
Description |
Whitelist-based traffic policing |
Whether ACL whitelist-based traffic policing for the control plane is enabled: Enabled or Disabled. |
Failed rule ID |
IDs of rules that failed to take effect. |
Green packets |
Traffic statistics for green packets. |
Yellow packets |
Traffic statistics for yellow packets. |
Red packets |
Traffic statistics for red packets. |
Related commands
display acl whitelist
qos car whitelist enable
display qos car interface
Use display qos car interface to display the CAR information for interfaces.
Syntax
display qos car interface [ interface-type interface-number [ slot slot-number ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the CAR information for all interfaces.
Examples
# Display the CAR information for Ten-GigabitEthernet 3/0/1.
<Sysname> display qos car interface ten-gigabitethernet 3/0/1
Interface: Ten-GigabitEthernet3/0/1
Direction: inbound
Rule: If-match any
CIR 128 (kbps), CBS 5120 (Bytes), PIR 128 (kbps), EBS 512 (Bytes)
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
# Display the CAR information on Ten-GigabitEthernet 3/0/2.
<Sysname> display qos car interface ten-gigabitethernet 3/0/2
Interface: Ten-GigabitEthernet3/0/2
Direction: inbound
Rule: If-match any
CIR 50 (%), CBS 600 (ms), EBS 0 (ms), PIR 50 (%)
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Table 24 Command output
Field |
Description |
Interface |
Interface name, including interface type and interface number. |
Direction |
Direction in which traffic policing is applied. |
Rule |
Match criteria. |
CIR |
CIR in kbps (if the CIR is specified in absolute value) or in percentage (if the CIR is specified in percentage). |
CBS |
CBS in bytes (if the CBS is specified in absolute value) or in ms (if the CBS is specified in milliseconds). When the CBS is specified in milliseconds, the actual CBS value is cbs-time × the actual CIR value. |
EBS |
EBS in bytes (if the EBS is specified in absolute value) or in ms (if the EBS is specified in milliseconds). When the EBS is specified in milliseconds, the actual EBS value is ebs-time × the actual CIR value. |
PIR |
PIR in kbps (if the PIR is specified in absolute value) or in percentage (if the PIR is specified in percentage). |
display qos car l2vpn-pw
Use display qos car l2vpn-pw to display the CAR information for PWs.
Syntax
display qos car l2vpn-pw [ peer ip-address pw-id pw-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
peer ip-address pw-id pw-id: Specifies a PW by its peer PE LSR ID and its PW ID. The ip-address argument represents the LSR ID of the peer PE of the PW. The value range for the pw-id argument is 1 to 4294967295. If you do not specify a PW, this command displays the CAR information of all PWs.
Examples
# Display the CAR information of all PWs.
<Sysname> display qos car l2vpn-pw
L2VPN-PW: peer 1.2.3.4, pw-id 1
Direction: outbound
Rule: If-match any
CIR 128 (kbps), CBS 5120 (Bytes), PIR 128 (kbps), EBS 512 (Bytes)
Green packets : 0 (Packets), 0 (Bytes)
Yellow packets: 0 (Packets), 0 (Bytes)
Red packets : 0 (Packets), 0 (Bytes)
Table 25 Command output
Field |
Description |
L2VPN-PW |
A PW is uniquely identified by a combination of the peer PE IP address and PW ID. |
Direction |
Direction in which traffic policing is applied. In the current software version, only outbound is supported. |
Rule |
Match criteria. In the current software version, only the if-match any rule is supported, which matches all packets. |
CIR |
CIR in kbps. |
CBS |
CBS in bytes. |
PIR |
PIR in kbps. |
EBS |
EBS in bytes. |
Green packets |
Total number of bytes for green packets. |
Yellow packets |
Total number of bytes for yellow packets. |
Red packets |
Total number of bytes for red packets. |
qos car (control plane view)
Use qos car to configure a CAR policy for a control plane.
Use undo qos car to delete a CAR policy from a control plane.
Syntax
qos car { any | user } cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ]
qos car { any | user } cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ]
undo qos car { any | user }
Default
No CAR policy is configured.
Views
Control plane view
Predefined user roles
network-admin
Parameters
any: Performs CAR for all control plane traffic.
user: Performs CAR for the control plane traffic from all online users.
cir committed-information-rate: Specifies the CIR in kbps. The committed-information-rate argument has the following value ranges:
· 8 to 300000000 for traffic policing for all control plane traffic. Only the range 8 to 1000000 is supported in the current software version.
· 8 to 300000000 for online user-based traffic policing.
· 8 to 300000000 for whitelist-based traffic policing. Only the range 8 to 100000 is supported in the current software version.
cbs committed-burst-size: Specifies the CBS in the range of 512 to 256000000 bytes. The default is the product of 62.5 and the CIR value.
ebs excess-burst-size: Specifies the EBS in the range of 0 to 256000000 bytes. The default is the product of 62.5 and the PIR value..
pir peak-information-rate: Specifies the PIR in kbps. The peak-information-rate argument has the following value ranges:
· 8 to 300000000 for traffic policing for all control plane traffic. Only the range 8 to 1000000 is supported in the current software version.
· 8 to 300000000 for online user-based traffic policing.
Usage guidelines
To use two rates for traffic policing, configure the qos car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the qos car command without the pir peak-information-rate option.
For online user-based traffic policing, the CIR is the rate of control plane traffic from each online user.
Examples
# Perform CAR for all control plane traffic. The CAR parameters are as follows:
· The CIR is 2000 kbps.
· The CBS is 150000 bytes.
· The EBS is 0 bytes.
<Sysname> system-view
[Sysname] control-plane
[Sysname-cp] qos car any cir 2000 cbs 150000 ebs 0
# Perform CAR for the control plane traffic from all online users. The CAR parameters are as follows:
· The CIR is 200 kbps.
· The CBS is 15000 bytes.
· The EBS is 0 bytes.
<Sysname> system-view
[Sysname] control-plane
[Sysname-cp] qos car user cir 200 cbs 15000 ebs 0
qos car (interface view)
Use qos car to configure a CAR policy on an interface.
Use undo qos car to delete a CAR policy from an interface.
Syntax
qos car { inbound | outbound } any cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ]
qos car { inbound | outbound } any cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ]
undo qos car { inbound | outbound } any
Default
No CAR policy is configured.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Performs CAR in the inbound direction.
outbound: Performs CAR in the outbound direction.
any: Performs CAR for all IP packets in the specified direction.
cir committed-information-rate: Specifies the CIR in kbps. The value range for the committed-information-rate argument is 8 to 1000000 for GE interfaces, 8 to 10000000 for 10-GE interfaces, 8 to 40000000 for 40-GE interfaces, 8 to 100000000 for 100-GE interfaces, 8 to 300000000 for Layer 3 aggregate interfaces, and 8 to 100000000 for FlexE interfaces.
cbs committed-burst-size: Specifies the CBS in the range of 512 to 256000000 bytes. The default value for this argument is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the EBS in the range of 0 to 256000000 bytes. The default is 0.
pir peak-information-rate: Specifies the PIR in kbps. The value range for the peak-information-rate argument is 8 to 1000000 for GE interfaces, 8 to 10000000 for 10-GE interfaces, 8 to 40000000 for 40-GE interfaces, 8 to 100000000 for 100-GE interfaces, 8 to 300000000 for Layer 3 aggregate interfaces, and 8 to 100000000 for FlexE interfaces.
Usage guidelines
To use two rates for traffic policing, configure the qos car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the qos car command without the pir peak-information-rate option.
Examples
# Perform CAR for all packets in the outbound direction of Ten-GigabitEthernet 3/0/1. The CAR parameters are as follows:
· CIR is 200 kbps.
· CBS is 5120 bytes.
· EBS is 0.
· Conforming packets are transmitted.
· Excess packets are set with an IP precedence of 0 and transmitted.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos car outbound any cir 200 cbs 5120 ebs 0 green pass red remark-prec-pass 0
Related commands
display qos car interface
qos car any (cross-connect PW view, VSI LDP PW view, VSI static PW view)
Use qos car any to configure a CAR policy for all packets of a PW.
Use undo qos car to delete a CAR policy from a PW.
Syntax
qos car outbound any cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ]
qos car outbound any cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ]
undo qos car outbound any
Default
No CAR policy is configured for a PW.
Views
Cross-connect PW view
VSI LDP PW view
VSI static PW view
Predefined user roles
network-admin
Parameters
outbound: Performs CAR in the outbound direction.
cir committed-information-rate: Specifies the CIR in kbps. The value range for committed-information-rate is 8 to 300000000.
cbs committee-burst-size: Specifies the CBS in bytes.
· If you specify this option, the value range for the CBS is 512 to 256000000 bytes.
· If you do not specify this option, the default CBS is the value nearest to 62.5 × committed-information-rate and not smaller than multiples of the minimum value in the value range. The default value cannot be greater than the maximum value in the value range.
pir peak-information-rate: Specifies the PIR in kbps. The value range for peak-information-rate is 8 to 300000000.
ebs excess-burst-size: Specifies the EBS in bytes.
· If you specify this option, the value range for the EBS is 0 to 256000000.
· If you do not specify this option, the default EBS is the value nearest to 62.5 × peak-information-rate and not smaller than multiples of the minimum value in the value range. The default value cannot be greater than the maximum value in the value range.
Examples
# Perform CAR for outgoing packets on cross-connect PW pw2pw. The CAR parameters are as follows:
· The CIR is 200 kbps.
· The CBS is 51200 bytes.
· The PIR is 500 kbps.
· The EBS is 0 bytes.
<Sysname> system-view
[Sysname] xconnect-group vpn1
[Sysname-xcg-vpn1] connection pw2pw
[Sysname-xcg-vpn1-pw2pw] peer 5.5.5.5 pw-id 200 in-label 100 out-label 200
[Sysname-xcg-vpn1-pw2pw-5.5.5.5-200] qos car outbound any cir 200 cbs 51200 pir 500 ebs 0
# Perform CAR for outgoing packets on VSI static PW vpn1. The CAR parameters are as follows:
· The CIR is 200 kbps.
· The CBS is 51200 bytes.
· The PIR is 500 kbps.
· The EBS is 0 bytes.
<Sysname> system-view
[Sysname] vsi vpn1
[Sysname-vsi-vpn1] pwsignaling static
[Sysname-vsi-vpn1-static] peer 5.5.5.5 pw-id 200 in-label 100 out-label 200
[Sysname-xcg-vpn1-static-5.5.5.5-200] qos car outbound any cir 200 cbs 51200 pir 500 ebs 0
# Perform CAR for outgoing packets on LDP PW vpn1. The CAR parameters are as follows:
· The CIR is 200 kbps.
· The CBS is 51200 bytes.
· The PIR is 500 kbps.
· The EBS is 0 bytes.
<Sysname> system-view
[Sysname] vsi vpn1
[Sysname-vsi-vpn1] pwsignaling ldp
[Sysname-vsi-vpn1-ldp] peer 4.4.4.4 pw-id 100
[Sysname-vsi-vpn1-ldp-4.4.4.4-100] qos car outbound any cir 200 cbs 51200 pir 500 ebs 0
Related commands
display qos car l2vpn-pw
qos car any (user profile view)
Use qos car any to configure a CAR policy for all packets of a user profile.
Use undo qos car to delete a CAR policy from a user profile.
Syntax
qos car { inbound | outbound } any cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ]
qos car { inbound | outbound } any cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ]
undo qos car { inbound | outbound }
Default
No CAR policy is configured for a user profile or session group profile.
Views
User profile view
Predefined user roles
network-admin
Parameters
inbound: Performs CAR in the inbound direction.
outbound: Performs CAR in the outbound direction.
cbs committed-burst-size: Specifies the CBS in the range of 512 to 256000000 bytes. The default is the product of 62.5 and the CIR value.
cbs committed-burst-size: Specifies the committed burst size (CBS) in the range of 512 to 256000000 bytes. The default value for this argument is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the excess burst size (EBS) in the range of 0 to 256000000 bytes. The default is 0.
pir peak-information-rate: Specifies the PIR in the range of 8 to 300000000 kbps.
Usage guidelines
To use two rates for traffic policing, configure the qos car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the qos car command without the pir peak-information-rate option.
The conforming traffic is permitted to pass through, and the excess traffic is dropped.
If you execute the qos car command multiple times for the same user profile or session group profile, the most recent configuration takes effect.
Examples
# Perform CAR for packets received by user profile user. The CAR parameters are as follows:
· The CIR is 200 kbps.
· The CBS is 51200 bytes.
<Sysname> system-view
[Sysname] user-profile user
[Sysname-user-profile-user] qos car outbound any cir 200 cbs 51200
qos car percent (interface view)
Use qos car percent to configure a CAR policy in percentage on an interface.
Use undo qos car to delete a CAR policy from an interface.
Syntax
qos car { inbound | outbound } any percent cir cir-percent [ cbs cbs-time [ ebs ebs-time ] ]
qos car { inbound | outbound } any percent cir cir-percent [ cbs cbs-time ] pir pir-percent [ ebs ebs-time ]
undo qos car { inbound | outbound } any
Default
No CAR policy is configured in percentage.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Performs CAR in the inbound direction.
outbound: Performs CAR in the outbound direction.
any: Performs CAR for all IP data packets in the specified direction.
percent cir cir-percent: Specifies the CIR in percentage, in the range of 1 to 100. The actual CIR value is cir-percent × interface bandwidth.
cbs cbs-time: Specifies the CBS in the range of 50 to 2000 milliseconds. The actual CBS value is cbs-time × the actual CIR value.
ebs ebs-time: Specifies the EBS in the range of 0 to 2000 milliseconds. The actual EBS value is cbs-time × the actual CIR value.
pir pir-percent: Specifies the PIR in percentage, in the range of 1 to 100. The value for the pir-percent argument must be greater than or equal to the value for the cir-percent argument.
Usage guidelines
You can execute multiple qos car percent commands on an interface to define multiple CAR policies. These CAR policies are executed in their configuration order.
Before executing this command, use the bandwidth command to configure the expected bandwidth of the interface. For more information about the bandwidth command, see Ethernet interface commands in Interface Command Reference.
To use two rates for traffic policing, configure the qos car percent command with the pir pir-percent option. To use one rate for traffic policing, configure the qos car percent command without the pir pir-percent option.
Examples
# Perform CAR for all outgoing packets on Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos car outbound any percent cir 50 cbs 1000
qos car whitelist enable
Use qos car whitelist enable to enable ACL whitelist-based traffic policing for the control plane.
Use undo qos car whitelist enable to disable ACL whitelist-based traffic policing for the control plane.
Syntax
qos car whitelist [ ipv6 ] enable
undo qos car whitelist [ ipv6 ] enable
Default
Whitelist-based traffic policing is enabled, and the device uses the default rate limit values to police matching traffic.
Views
Control plane view
Predefined user roles
network-admin
Parameters
ipv6: Enables whitelist-based traffic policing for the IPv6 dynamic whitelist. If you do not specify this keyword, the command enables whitelist-based traffic policing for the IPv4 dynamic whitelist.
Usage guidelines
To perform ACL whitelist-based traffic policing, make sure ACL whitelist-based traffic policing is enabled.
Examples
# Enable ACL whitelist-based traffic policing for the control plane.
<Sysname> system-view
[Sysname] control-plane
[Sysname-cp] qos car whitelist enable
Related commands
qos car (control plane view)
reset qos car control-plane whitelist
Use reset qos car control-plane whitelist to clear ACL whitelist-based control plane CAR statistics.
Syntax
reset qos car control-plane whitelist [ ipv6 ]
Views
User view
Predefined user roles
network-admin
Parameters
ipv6: Specifies the IPv6 ACL whitelist. If you do not specify this keyword, the command clears IPv4 ACL whitelist-based control plane CAR statistics.
Examples
# Clear ACL whitelist-based control plane CAR statistics.
<Sysname> reset qos car control-plane whitelist
GTS commands
display qos gts interface
Use display qos gts interface to display the GTS information for interfaces.
Syntax
display qos gts interface [ interface-type interface-number [ slot slot-number ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the GTS information for all interfaces.
slot slot-number: Specifies a card by its slot number. This option is available only for Layer 3 aggregate interfaces. If you do not specify a card, this command displays the GTS information for the active MPU.
Examples
# Display the GTS information for all interfaces.
<Sysname> display qos gts interface
Interface: Ten-GigabitEthernet3/0/1
Rule: If-match queue 1
CIR 10000 (kbps), CBS 625000 (Bytes)
Table 26 Command output
Field |
Description |
Interface |
Interface name, including the interface type and interface number. |
Rule |
Match criteria. |
qos gts (interface view)
Use qos gts to set GTS parameters on an interface.
Use undo qos gts to delete the GTS configuration on an interface.
Syntax
qos gts queue queue-id cir committed-information-rate [ cbs committed-burst-size ]
undo qos gts queue queue-id
Default
No GTS parameters are configured.
Views
Interface view
Predefined user roles
network-admin
Parameters
queue queue-id: Shapes the packets in a queue specified by its ID. The value range for queue-id is 0 to 7.
cir committed-information-rate: Specifies the CIR in kbps. The committed-information-rate argument has the following value ranges: 300 to 1000000 for GE interfaces, 300 to 10000000 for 10-GE interfaces, and 2500 to 100000000 for 100-GE interfaces. For 100-GE interfaces, the actual maximum value is 10000000.
cbs committed-burst-size: Specifies the CBS in the range of 4096 to 133169152 bytes. The default is the product of 62.5 and the CIR.
Usage guidelines
To use two rates for traffic shaping, configure the qos gts command with the pir peak-information-rate option. To use one rate for traffic shaping, configure the qos gts command without the pir peak-information-rate option.
Examples
# Shape the packets in queue 1 on Ten-GigabitEthernet 3/0/1. The GTS parameters are as follows:
· The CIR is 6400 kbps.
· The CBS is 51200 bytes.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos gts queue 1 cir 6400 cbs 51200
qos gts (user group profile view)
Use qos gts to set GTS parameters for a user group profile.
Use undo qos gts to restore the default.
Syntax
qos gts [ inbound ] any cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ queue-length queue-length ]
qos gts [ inbound ] any cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ queue-length queue-length ]
undo qos gts [ inbound ] any
Default
No GTS parameters are set.
Views
User group profile view
Predefined user roles
network-admin
Parameters
inbound: Shapes incoming packets. If you do not specify this keyword, the command shapes outgoing packets.
any: Shapes all packets.
cir committed-information-rate: Specifies the CIR in the range of 300 to 300000000 kbps.
cbs committed-burst-size: Specifies the committed burst size (CBS) in the range of 4096 to 133169152 bytes. The default value for this argument is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the excess burst size (EBS) in the range of 0 to 256000000 bytes.
pir peak-information-rate: Specifies the PIR in the range of 300 to 300000000 kbps.
queue-length queue-length: Specifies the maximum number of packets that can be queued, in the range of 1 to 29296875. The default is 4096. The queue length cannot be greater than the integer that is closest to and greater than the CIR multiplied by 0.078125.
Examples
# Shape all packets sent by session group profile aaa. The GTS parameters are as follows:
· The CIR is 200 kbps.
· The CBS is 51200 bytes.
<Sysname> system-view
[Sysname] user-group-profile aaa
[Sysname-user-group-profile-aaa] qos gts any cir 2000 cbs 51200
qos gts (session group profile view)
Use qos gts to set GTS parameters for a session group profile.
Use undo qos gts to delete GTS settings for a session group profile.
Syntax
qos gts { any | queue queue-id } cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ queue-length queue-length ]
qos gts { any | queue queue-id } cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ queue-length queue-length ]
undo qos gts { any | queue queue-id }
Default
No GTS parameters are set.
Views
Session group profile view
Predefined user roles
network-admin
Parameters
any: Shapes all packets.
queue queue-id: Shapes the packets in a queue specified by its ID. The value range for queue-id is 0 to 7.
cir committed-information-rate: Specifies the CIR in the range of 300 to 300000000 kbps.
cbs committed-burst-size: Specifies the CBS in the range of 4096 to 133169152 bytes. The default is the product of 62.5 and the CIR value.
ebs excess-burst-size: Specifies the EBS in the range of 0 to 256000000 bytes. The default is 0.
pir peak-information-rate: Specifies the PIR in the range of 300 to 300000000 kbps. The PIR cannot be smaller than the CIR.
queue-length queue-length: Specifies the maximum number of packets that can be queued, in the range of 1 to 29296875. The default is 4096. The queue length cannot be greater than the integer that is closest to and greater than the CIR multiplied by 0.078125.
Usage guidelines
This command takes effect only on outgoing traffic.
Examples
# Shape the packets received by session group profile aaa in queue 1. The GTS parameters are as follows:
· The CIR is 400 kbps.
· The CBS is 51200 bytes.
<Sysname> system-view
[Sysname] user-profile aaa type session-group
[Sysname-session-group-profile-aaa] qos gts queue 1 cir 400 cbs 51200
Rate limit commands
display qos lr
Use display qos lr to display the rate limit information for interfaces.
Syntax
display qos lr interface [ interface-type interface-number [ slot slot-number ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the rate limit information for all interfaces.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays the rate limit information for the active MPU.
Examples
# Display the rate limit information for all interfaces.
<Sysname> display qos lr interface
Interface: Ten-GigabitEthernet3/0/1
Direction: Outbound
CIR 10000 (kbps), CBS 625000 (Bytes)
Interface: Ten-GigabitEthernet3/0/2
Direction: Outbound
CIR 60 (%), CBS 1000 (ms)
Table 27 Command output
Field |
Description |
Interface |
Interface name, including the interface type and interface number. |
Direction |
Direction to which the rate limit configuration is applied: inbound or outbound. |
CIR |
CIR in kbps (if the CIR is specified in absolute value) or in percentage (if the CIR is specified in percentage). |
CBS |
CBS in bytes (if the CBS is specified in absolute value) or in ms (if the CBS is specified in milliseconds). When the CBS is specified in milliseconds, the actual CBS value is cbs-time × the actual CIR value. |
qos lr
Use qos lr to configure rate limiting on an interface.
Use undo qos lr to delete the rate limit configuration on an interface.
Syntax
qos lr { inbound | outbound } cir committed-information-rate [ cbs committed-burst-size ]
undo qos lr { inbound | outbound }
Default
No rate limit is configured.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Limits the rate in the inbound direction.
outbound: Limits the rate in the outbound direction.
cir committed-information-rate: Specifies the CIR in kbps. The committed-information-rate argument has the following value ranges:
· 300 to 1000000 for GE interfaces.
· 300 to 10000000 for 10-GE interfaces.
· 2500 to 100000000 for 100-GE interfaces.
· 160 to 300000000 for Layer 3 aggregate interfaces and tunnel interfaces.
cbs committed-burst-size: Specifies the CBS in bytes. The committed-burst-size argument has the following value ranges:
· 1024 to 133169152 for Layer 3 aggregate interfaces and tunnel interfaces.
· 4096 to 133169152 for other interfaces.
The default is the product of 62.5 and the CIR value.
Examples
# Limit the rate of outgoing packets on Ten-GigabitEthernet 3/0/1, with CIR 200 kbps and CBS 51200 bytes.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos lr outbound cir 200 cbs 51200
qos lr percent
Use qos lr percent to configure percentage-based rate limiting on an interface.
Use undo qos lr to delete the rate limiting configuration on an interface.
Syntax
qos lr { inbound | outbound } percent cir cir-percent [ cbs cbs-time ]
undo qos lr { inbound | outbound }
Default
Percentage-based rate limiting is not configured.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Limits the rate in the inbound direction.
outbound: Limits the rate in the outbound direction.
percent cir cir-percent: Specifies the CIR in percentage, in the range of 1 to 100. The actual CIR value is cir-percent × interface bandwidth.
cbs cbs-time: Specifies the CBS in the range of 50 to 2000 milliseconds. The actual CBS value is cbs-time × the actual CIR value.
Usage guidelines
Before executing this command, execute the bandwidth command o set the expected bandwidth of the interface. For more information about this command, see Ethernet interface commands in Interface Command Reference.
Examples
# Limit the rate of outgoing packets on Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos lr outbound percent cir 50 cbs 1000
qos overhead layer
Use qos overhead layer physical to include the physical layer header in calculating the packet length for rate limiting.
Use undo qos overhead layer physical to restore the default.
Syntax
qos overhead layer physical
undo qos overhead layer physical
Default
The device calculates the packet length for rate limiting based on the data link layer frame.
Views
System view
Predefined user roles
network-admin
Usage guidelines
This command allows the device to include a 24-byte physical layer header in calculating the packet length for rate limiting. As a best practice, execute this command in scenarios where packets are small and precise rate limiting is required. To save computing resources, do not execute this command if the device processes large packets.
This command takes effect only on Layer 3 Ethernet interfaces and Layer 3 aggregate interfaces.
This command does not take effect if the mirroring-group car command is executed.
Examples
# Include the physical layer header in calculating the packet length for rate limiting.
<Sysname> system-view
[Sysname] qos overhead layer physical
Related commands
display qos lr
qos lr
qos lr percent
Hardware congestion management commands
Congestion management commands
display qos queue interface
Use display qos queue interface to display the queuing information for interfaces.
Syntax
display qos queue interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the queuing information for all interfaces.
Examples
# Display the queuing information for all interfaces.
<Sysname> display qos queue interface
Interface: GigabitEthernet1/0/1
Output queue: Strict Priority queuing
Interface: GigabitEthernet1/0/2
Output queue: Strict Priority queuing
Interface: GigabitEthernet1/0/3
Output queue: Strict Priority queuing
Interface: GigabitEthernet1/0/4
Output queue: Strict Priority queuing
Interface: GigabitEthernet1/0/5
Output queue: Strict Priority queuing
Table 28 Command output
Field |
Description |
Interface |
Interface name, including the interface type and interface number. |
Output queue |
Type of the output queue. |
display qos-queue resource
Use display qos-queue resource to display the usage of queue resources on a card.
Syntax
display qos-queue resource slot slot-number { inbound | outbound }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies a card by its slot number.
inbound: Specifies the inbound direction.
outbound: Specifies the outbound direction.
Usage guidelines
If the specified card does not support counting QoS queue resources, the usage of queue resources is not displayed.
Examples
# Display the usage of queue resources in the outbound direction of the card in slot 10.
<Sysname> display qos-queue resource slot 10 outbound
Chip 0
------------------------------------------------------------
Res-Pool Type Total Used Free
------------------------------------------------------------
TM0 UserGroup 22126 0 22126 (share with each other)
Hqos 22126 0 22126 (share with each other)
PortQos 22126 0 22126 (share with each other)
AdvancedUser22126 0 22126 (share with each other)
BasicUser 33174 0 33174 (share with each other)
Table 29 Command output
Field |
Description |
Res-Pool |
TM chip. |
Type |
Resource type. |
Total |
Total number of resources. |
Used |
Number of used resources. |
Free |
Number of available resources. |
Queue scheduling profile commands
bandwidth queue
Use bandwidth queue to set the minimum guaranteed bandwidth for a queue.
Use undo bandwidth queue to restore the default.
Syntax
bandwidth queue queue-id min { bandwidth-value | percent percent }
undo bandwidth queue queue-id
Default
A queue does not have a minimum guaranteed bandwidth.
Views
Queue scheduling profile view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
min bandwidth-value: Specifies the minimum guaranteed bandwidth in the range of 300 to 300000000 kbps.
percent percent: Specifies the minimum guaranteed bandwidth in percentage, in the range of 1 to 100. The actual minimum guaranteed bandwidth is the interface bandwidth multiplied by the percentage value.
Usage guidelines
The minimum guaranteed bandwidth is the amount of bandwidth guaranteed for a queue when the interface is congested.
Examples
# Set the minimum guaranteed bandwidth to 128 kbps for queue 1.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] bandwidth queue 1 min 128
# Set the minimum guaranteed bandwidth percentage to 10% for queue 1.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] bandwidth queue 1 min percent 10
display qos qmprofile configuration
Use display qos qmprofile configuration to display the queue scheduling profile configuration.
Syntax
display qos qmprofile configuration [ profile-name ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
profile-name: Specifies a queue scheduling profile by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a queue scheduling profile, this command displays the configuration of all queue scheduling profiles.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays the queue scheduling profile configuration for the active MPU.
Examples
# Display the configuration of queue scheduling profile myprofile.
<Sysname> display qos qmprofile configuration myprofile
Queue scheduling profile: myprofile (ID 1)
Queue ID Applied WRED profile
-----------------------------------------------------------------------------
be aaa
af1 bbb
Queue ID Type Group Schedule Schedule Min Max
unit value bandwidth bandwidth
---------------------------------------------------------------------
be SP N/A N/A N/A 0 N/A
af1 SP N/A N/A N/A 0 N/A
af2 SP N/A N/A N/A 1000 N/A
af3 SP N/A N/A N/A 0 N/A
af4 SP N/A N/A N/A 0 N/A
ef SP N/A N/A N/A 0 N/A
cs6 SP N/A N/A N/A 0 N/A
cs7 SP N/A N/A N/A 0 N/A
Table 30 Command output
Field |
Description |
Queue scheduling profile |
Queue scheduling profile name. |
Basic |
This word indicates a basic queue scheduling profile. If this word is absent, the queue scheduling profile is advanced. |
Applied WRED profile |
Name of the applied WRED profile. |
Type |
Queue scheduling type: · SP. · WRR. · WFQ. |
Group |
Priority group to which the queue belongs. N/A indicates this field is ignored. |
Schedule unit |
Scheduling unit: weight or byte-count. N/A indicates that this field is ignored. |
Schedule value |
This field indicates: · Weight value for the weight scheduling unit. · Number of bytes for the byte-count scheduling unit. N/A indicates that this field is ignored. |
Min bandwidth |
Minimum guaranteed bandwidth in number of kbps or in percentage for the queue. |
Max bandwidth |
Maximum allowed bandwidth in number of kbps or in percentage for the queue. |
display qos qmprofile interface
Use display qos qmprofile interface to display the queue scheduling profile applied to an interface.
Syntax
display qos qmprofile interface [ interface-type interface-number ] [ slot slot-number ] ] [ inbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the queue scheduling profiles applied to all interfaces.
slot slot-number: Specifies a card by its slot number. This option is available only for Layer 3 aggregate interfaces. If you do not specify a card, this command displays the queue scheduling profile information for the active MPU.
inbound: Displays the queue scheduling profile applied to the inbound direction. If you do not specify this keyword, the command displays both the queue scheduling profile applied to the inbound direction and that applied to the outbound direction.
Examples
# Display the queue scheduling profile applied to Ten-GigabitEthernet 3/0/1.
<Sysname> display qos qmprofile interface ten-gigabitethernet 3/0/1
Interface: Ten-GigabitEthernet3/0/1
Direction: Inbound
Queue scheduling profile: myprofile
Interface: Ten-GigabitEthernet3/0/1
Direction: Outbound
Queue scheduling profile: myprofile
Queue ID Applied WRED profile
-----------------------------------------------------------------------------
be w1(Active)
af1 w2(Inactive)
Queue Type Group Schedule Schedule Min Max
ID unit value bandwidth bandwidth
-----------------------------------------------------------------------------
be SP N/A N/A N/A 64 10000
af1 WFQ 1 byte-count N/A 100 10000
af2 WRR 1 weight 100 100 10000
af3 WRR 1 weight 100 100 10000
af4 WRR 1 weight 50 10% 10000
ef WRR 1 weight 50 100 10%
cs6 WRR 1 weight 100 100 10000
cs7 WRR 1 weight 50 100 10000
Table 31 Command output
Field |
Description |
Direction |
Direction in which the queue scheduling profile is applied. |
Queue scheduling profile |
Name of the queue scheduling profile applied to the interface. |
Applied WRED profile |
Name of the applied WRED profile. Active in the following parentheses indicates that the WRED profile has taken effect. Inactive in the following parentheses indicates that the WRED profile has not taken effect. |
group
Use group to set the maximum bandwidth allowed for a group.
Use undo group to restore the default.
Syntax
group group-id max-bandwidth { bandwidth-value | percent percent }
undo group group-id max-bandwidth
Default
The maximum bandwidth is not set for a group.
Views
Queue scheduling profile view
Predefined user roles
network-admin
Parameters
group group-id: Specifies a group by its ID in the range of 1 to 4.
max-bandwidth bandwidth-value: Specifies the maximum bandwidth in the range of 300 to 300000000 kbps.
percent percent: Specifies the maximum bandwidth in percentage, in the range of 1 to 100. The actual maximum bandwidth is the interface bandwidth multiplied by the percentage value.
Examples
# Create an advanced queue scheduling profile named myprofile, and set the maximum bandwidth to 200000 kbps for group 1.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] queue 1 wrr group 1 weight 1
[Sysname-qmprofile-myprofile] group 1 max-bandwidth 200000
# Create an advanced queue scheduling profile named myprofile, and set the maximum bandwidth percentage to 20% for group 1.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] queue 1 wrr group 1 weight 1
[Sysname-qmprofile-myprofile] group 1 max-bandwidth percent 20
Related commands
display qos qmprofile interface
qos qmprofile
qos apply qmprofile (interface view)
Use qos apply qmprofile to apply a queue scheduling profile to an interface.
Use undo qos apply qmprofile to restore the default.
Syntax
qos apply qmprofile profile-name [ inbound ]
undo qos apply qmprofile [ inbound ]
Default
An interface uses SP queuing.
Views
Interface view
Predefined user roles
network-admin
Parameters
profile-name: Specifies a queue scheduling profile by its name, a case-sensitive string of 1 to 31 characters.
inbound: Applies the queue scheduling profile to the inbound direction. If you do not specify this keyword, the command applies the queue scheduling profile to the outbound direction.
Usage guidelines
You can apply only one queue scheduling profile to one direction of an interface.
When both this command and the qos apply wred-profile command are executed on an interface, the WRED profile applied by using the qos apply wred-profile command takes priority.
When both this command and the qos wred apply command are executed on an interface, the WRED table applied by using the qos wred apply command takes priority.
Examples
# Apply queue scheduling profile myprofile to the outbound direction of Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos apply qmprofile myprofile
# Apply queue scheduling profile myprofile to the inbound direction of Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos apply qmprofile myprofile inbound
Related commands
display qos qmprofile interface
qos apply wred-profile
qos wred apply
qos apply qmprofile(user group profile view, session group profile view)
Use qos apply qmprofile to apply a queue scheduling profile to a user group profile or session group profile.
Use undo qos apply qmprofile to restore the default.
Syntax
qos apply qmprofile profile-name [ inbound ]
undo qos apply qmprofile [ inbound ]
Default
No queue scheduling profile is applied to a user group profile or session group profile.
Views
User group profile view
Session group profile view
Predefined user roles
network-admin
Parameters
profile-name: Specifies a queue scheduling profile by its name, a case-sensitive string of 1 to 31 characters.
inbound: Applies the queue scheduling profile to the packets sent by the user group profile or session group profile. If you do not specify this keyword, the command applies the queue scheduling profile to the packets received by the user group profile or session group profile.
Usage guidelines
You can apply only one queue scheduling profile to one direction of a user profile, user group profile, or session group profile. The queue scheduling profile to be applied must already exist.
To delete a queue scheduling profile applied to a user profile, user group profile, or session group profile, first remove the applied queue scheduling profile.
Examples
# Apply 8-queue scheduling profile myprofile to the packets received by session group profile a123.
<Sysname> system-view
[Sysname] user-profile a123 type session-group
[Sysname-session-group-profile-a123] qos apply qmprofile myprofile
# Apply 8-queue scheduling profile myprofile to the packets sent by session group profile a123.
<Sysname> system-view
[Sysname] user-profile a123 type session-group
[Sysname-session-group-profile-a123] qos apply qmprofile myprofile inbound
Related commands
display qos qmprofile interface
qos qmprofile
Use qos qmprofile to create a queue scheduling profile and enter its view, or enter the view of an existing queue scheduling profile.
Use undo qos qmprofile to delete a queue scheduling profile.
Syntax
qos qmprofile profile-name [ basic ]
undo qos qmprofile profile-name
Default
No user-created queue scheduling profiles exist.
Views
System view
Predefined user roles
network-admin
Parameters
profile-name: Specifies a name for the queue scheduling profile, a case-sensitive string of 1 to 31 characters.
basic: Specifies the queue scheduling profile as basic. If you do not specify this keyword, the command creates an advanced queue scheduling profile.
Usage guidelines
To delete a queue scheduling profile already applied to an object, first remove it from the object.
Examples
# Create a basic queue scheduling profile named myprofile and enter queue scheduling profile view.
<Sysname> system-view
[Sysname] qos qmprofile myprofile basic
[Sysname-qmprofile-myprofile]
# Create an advanced queue scheduling profile named myprofile and enter queue scheduling profile view.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile]
Related commands
display qos qmprofile interface
queue
queue
Use queue to configure queue scheduling parameters.
Use undo queue to delete queue scheduling parameter settings.
Syntax
queue queue-id { sp | wrr group group-id weight schedule-value } [ max-bandwidth { bandwidth-value | percent percent } | wred-profile profile-name ] *
undo queue queue-id
Default
All queues in a queue scheduling profile are SP queues.
Views
Queue scheduling profile view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID in the range of 0 to 7.
sp: Enables SP for the queue.
wrr: Enables WRR for the queue.
group group-id: Specifies a group by its ID in the range of 1 to 4.
weight: Allocates bandwidth to queues in packets.
schedule-value: Specifies the number of packets that can be sent each time, in the range of 0 to 310.
max-bandwidth: Specifies the maximum allowed bandwidth.
bandwidth-value: Specifies the bandwidth value in kbps.
percent percent: Specifies the bandwidth in percentage, in the range of 1 to 100. The actual bandwidth is the interface bandwidth multiplied by the percentage value.
wred-profile profile-name: Specifies a WRED profile by its name, a case-sensitive string of 1 to 32 characters.
Usage guidelines
The queue-id argument can be either a number or a keyword. Table 32 shows the number-keyword map.
Table 32 The number-keyword map for the queue-id argument
Number |
Keyword |
0 |
be |
1 |
af1 |
2 |
af2 |
3 |
af3 |
4 |
af4 |
5 |
ef |
6 |
cs6 |
7 |
cs7 |
A queue with a weight of 0 cannot be configured with the minimum guaranteed bandwidth and has the lowest priority. Queues with a weight of 0 are scheduled in a round robin manner.
If a large CIR (for example, 30 Gbps) is configured in a traffic policing action or rate limit on a 100-GE interface, configure the weights as multiples of 10 in this command as a best practice. The weight values affect the granularity of bandwidth allocation during queue scheduling. The device cannot correctly allocate bandwidth to queues on an interface according to small weight values.
Examples
# Create a queue scheduling profile named myprofile, and configure queue 0 to use SP.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] queue 0 sp
# Create a queue scheduling profile named myprofile. Configure queue 1 to meet the following requirements:
· The WRR queuing is used.
· The WRR group is group 1.
· The scheduling weight is 100.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] queue 1 wrr group 1 weight 100
# Create a queue scheduling profile named myprofile. Configure queue 1 to meet the following requirements:
· The WRR queuing is used.
· The WRR group is group 1.
· The scheduling weight is 100.
· The maximum bandwidth percentage is 30%.
<Sysname> system-view
[Sysname] qos qmprofile myprofile
[Sysname-qmprofile-myprofile] queue 1 wrr group 1 weight 100 max-bandwidth percent 30
Related commands
display qos qmprofile interface
qos qmprofile
CBQ commands
qos reserved-bandwidth
Use qos reserved-bandwidth to set the maximum reserved bandwidth as a percentage of available bandwidth on an interface or PVC.
Use undo qos reserved-bandwidth to restore the default.
Syntax
qos reserved-bandwidth pct percent
undo qos reserved-bandwidth
Default
The maximum reserved bandwidth is 80% of available bandwidth on an interface or PVC.
Views
Interface view
Predefined user roles
network-admin
Parameters
percent: Specifies the percentage of available bandwidth to be reserved. The value range for this argument is 1 to 100.
Usage guidelines
The maximum reserved bandwidth is set on a per-interface or per-PVC basis. It decides the maximum bandwidth assignable for the QoS queues on an interface or PVC. It is typically set no greater than 80% of available bandwidth, considering the bandwidth for control traffic and Layer 2 frame headers.
Use the default maximum reserved bandwidth setting in most situations. If you adjust the setting, make sure the Layer 2 frame header plus the data traffic is under the maximum available bandwidth of the interface.
The maximum available bandwidth of an interface can be set by using the bandwidth command. For more information about this command, see Interface Command Reference.
If you execute the qos reserved-bandwidth pct command multiple times, the most recent configuration takes effect.
Examples
# Set the maximum reserved bandwidth to 70% of available bandwidth on Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos reserved-bandwidth pct 70
queue af
Use queue af to enable assured-forwarding (AF) and set the minimum guaranteed bandwidth for AF.
Use undo queue af to restore the default.
Syntax
queue af bandwidth { bandwidth [ pir peak-information-rate ] | pct percentage }
undo queue af
Default
AF is not configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
bandwidth: Specifies the minimum guaranteed bandwidth in the range of 64 to 300000000 kbps.
pir peak-information-rate: Specifies the PIR in the range of 64 to 300000000 kbps.
pct percentage: Specifies the percentage of the available bandwidth, in the range of 1 to 100.
Usage guidelines
If you specify the pct percentage option, the actual minimum guaranteed bandwidth is the maximum reserved bandwidth (configured by using the qos reserved-bandwidth command) multiplied by this option.
To associate the traffic behavior configured with the queue af command with a class in a policy, you must follow these requirements:
· The total bandwidth assigned to AF and EF queues in a policy cannot exceed the maximum available bandwidth of the interface where the policy is applied.
· The total percentage of bandwidth assigned to AF and EF in a policy cannot exceed 100.
· The bandwidth assigned to AF and EF in a policy must use the same form, either as an absolute bandwidth value or as a percentage.
If you execute this command multiple times in the same traffic behavior, the most recent configuration takes effect.
You cannot configure the queue af command together with the queue ef or queue wfq command in the same traffic behavior.
If you execute this command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Enable AF in traffic behavior database and set the minimum guaranteed bandwidth to 200 kbps for AF.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] queue af bandwidth 200
queue ef
Use queue ef to enable expedited forwarding (EF) and set the maximum bandwidth for EF.
Use undo queue ef to restore the default.
Syntax
queue ef bandwidth { bandwidth [ cbs burst ] [ pir peak-information-rate ] | pct percentage [ cbs-ratio ratio ] }
undo queue ef
Default
EF is not configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
bandwidth: Specifies the maximum bandwidth in the range of 64 to 300000000 kbps.
cbs burst: Specifies the CBS in the range of 1600 to 1000000000 bytes. The default is the bandwidth value multiplied by 25. To accommodate bursts, you must set the CBS to be greater than the amount of traffic transmitted at the bandwidth over 50 milliseconds.
pir peak-information-rate: Specifies the PIR in the range of 64 to 300000000 kbps.
pct percentage: Specifies the percentage of the available bandwidth, in the range of 1 to 100.
cbs-ratio ratio: Sets the allowed burst ratio in the range of 25 to 500. This default is 25.
Usage guidelines
If you specify the pct percentage option, the actual maximum bandwidth is the maximum reserved bandwidth (configured by using the qos reserved-bandwidth command) multiplied by this option.
The total bandwidth assigned to AF and EF in a policy cannot exceed the maximum available bandwidth of the interface where the policy is applied.
The total percentage of the maximum available bandwidth assigned to AF and EF in a policy cannot exceed 100.
The bandwidths assigned to AF and EF in a policy must have the same type, in kbps or in percentage.
If the queue ef bandwidth pct percentage [ cbs-ratio ratio ] command is used, the CBS equals (Interface available bandwidth × percentage × ratio)/100.
If the queue ef bandwidth bandwidth [ cbs burst ] command is used, the CBS equals burst. If the cbs burst option is not specified, the CBS equals bandwidth × 25.
This command and the queue af command are mutually exclusive in one traffic behavior.
If you execute this command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure EF in traffic behavior database, with the maximum bandwidth as 200 kbps and CBS as 5000 bytes.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] queue ef bandwidth 200 cbs 5000
queue wfq
Use queue wfq to configure WFQ for the default class.
Use undo queue wfq to restore the default.
Syntax
queue wfq
undo queue wfq
Default
WFQ is not configured for the default class.
Views
Traffic behavior view
Predefined user roles
network-admin
Usage guidelines
You cannot execute the queue wfq command together with the queue af or queue ef command in the same traffic behavior.
Examples
# Configure the default class to use WFQ.
<Sysname> system-view
[Sysname] traffic behavior test
[Sysname-behavior-test] queue wfq
queue-length
Use queue-length to set the queue length used for tail drop.
Use undo queue-length to restore the default.
Syntax
queue-length queue-length
undo queue-length
Default
The queue length used for tail drop is 4096.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
queue-length: Specifies the maximum number of packets allowed in the FIFO queue, in the range of 0 to 29296875.
Usage guidelines
Before executing this command, make sure the queue af command or the queue wfq command has been executed.
The undo queue af, undo queue wfq, or undo queue ef command deletes the queue length configured by using the queue-length command.
If you execute the queue-length command multiple times, the most recent configuration takes effect.
Examples
# Set the maximum queue length to 16 and specify tail drop for AF.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] queue af bandwidth 200
[Sysname-behavior-database] queue-length 16
Related commands
queue af
queue ef
queue wfq
weight
Use weight to set the WFQ weight.
Use undo weight to restore the default.
Syntax
weight weight-value
undo weight
Default
The WFQ weight is 1 for AF and EF. The WFQ weight is 0 for BE.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
weight-value: Specifies the weight value in the range of 1 to 63.
Usage guidelines
The following traffic is scheduled by using WFQ:
· Traffic between the minimum guaranteed bandwidth and PIR.
· Traffic between the maximum bandwidth and PIR.
If you execute this command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure traffic behavior database as follows:
· Enable AF, and set the minimum guaranteed bandwidth to 200 kbps and the PIR to 500 kbps.
· Set the WFQ weight to 100 for traffic between 200 kbps and 500 kbps.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] queue af bandwidth 200
[Sysname-behavior-database] queue-length 16
# Configure traffic behavior database2 as follows:
· Enable EF, and set the maximum bandwidth to 400 kbps and the PIR to 800 kbps.
· Set the WFQ weight to 200 for traffic between 400 kbps and 800 kbps.
<Sysname> system-view
[Sysname] traffic behavior database2
[Sysname-behavior-database2] queue ef bandwidth 400 pir 800
[Sysname-behavior-database2] weight 200
Subinterface weight commands
display qos weight
Use display qos weight to display weight values for subinterfaces.
Syntax
display qos weight interface [ interface-type [ interface-number | interface-number.subnumber ] ] [ outbound ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type: Specifies an interface type.
interface-number: Specifies an interface by its number.
interface-number.subnumber: Specifies a subinterface. The interface-number argument represents the number of the main interface. The subnumber argument represents the number of the subinterface. The value range for the subnumber argument is 1 to 4096.
outbound: Specifies the weight values for the outbound direction.
Usage guidelines
If you do not specify the interface-type argument, this command displays the weight values for subinterfaces on all interfaces.
If you specify the interface-type argument without the interface-number argument, this command displays the weight values for subinterfaces on all interfaces of the specified interface type.
If you specify the interface-type interface-number argument without the interface-number.subnumber argument, this command displays the weight values for all subinterfaces on the specified interface.
Examples
# Display the weight value for a Layer 3 aggregate subinterface named Route-Aggregation 1.1.
<Sysname> display qos weight interface route-aggregation 1.1
Interface: Route-Aggregation 1.1
Direction: Outbound
Weight: 1
Status: Successful
# Display the weight values for all subinterfaces on the Layer 3 aggregate interface Route-Aggregation1.
<Sysname> display qos weight interface route-aggregation 1
Interface: Route-Aggregation1
Direction: Outbound
Interface Route-Aggregation1.1 weight 2
Interface Route-Aggregation1.2 weight 2
Interface Route-Aggregation1.3 weight 2
# Display the weight values for subinterfaces on all Layer 3 aggregate interfaces.
<Sysname> display qos weight interface
Interface: Route-Aggregation1
Direction: Outbound
Interface Route-Aggregation1.1 weight 2
Interface Route-Aggregation1.2 weight 2
Interface Route-Aggregation1.3 weight 2
Interface: Route-Aggregation2
Direction: Outbound
Interface Route-Aggregation2.1 weight 2
Interface Route-Aggregation2.2 weight 2
Interface Route-Aggregation2.3 weight 2 (Failed)
Table 33 Command output
Field |
Description |
Direction |
Direction in which the weight value applies. |
Status |
Indicates whether the weight is applied successfully: Successful or Failed. |
qos weight
Use qos weight to set a scheduling weight for a subinterface.
Use undo qos weight to restore the default.
Syntax
qos weight weight-value outbound
undo qos weight outbound
Default
No scheduling weight is set for a subinterface.
Views
Subinterface view
Predefined user roles
network-admin
Parameters
weight-value: Specifies a weight value in the range of 1 to 15.
outbound: Applies the weight value to the outbound direction.
Usage guidelines
This command must be used with HQoS to implement hierarchical scheduling of user traffic.
Examples
# Set a scheduling weight to 3 for Ten-GigabitEthernet 3/0/1.1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1.1
[Sysname-Ten-GigabitEthernet3/0/1.1] qos weight 3 outbound
Congestion avoidance commands
WRED commands
display qos wred interface
Use display qos wred interface to display the WRED information for interfaces or PVCs.
Syntax
display qos wred interface [ interface-type interface-number | [ slot slot-number ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the WRED information for all interfaces.
slot slot-number: Specifies a card by its slot number. This option is available only for Layer 3 aggregate interfaces. If you do not specify a card, this command displays the WRED information for the active MPU.
Examples
# Display the WRED information for all interfaces.
<Sysname> display qos wred interface
Interface: Ten-GigabitEthernet3/0/4
Current WRED configuration:
Applied WRED table name: q1
Table 34 Command output
Field |
Description |
Interface |
Interface type and interface number. |
QID |
Queue ID. |
gmin |
Lower limit for green packets. |
gmax |
Upper limit for green packets. |
gpro |
Drop probability for green packets. |
ymin |
Lower limit for yellow packets. |
ymax |
Upper limit for yellow packets. |
ypro |
Drop probability for yellow packets. |
rmin |
Lower limit for red packets. |
rmax |
Upper limit for red packets. |
rpro |
Drop probability for red packets. |
exp |
Exponent for average queue length calculation. |
ECN |
Indicates whether ECN is enabled for the queue: · Y—Enabled. · N—Disabled. |
Length |
Queue length. |
Applied WRED profile |
Name of the applied WRED profile. Active in the following parentheses indicates that the WRED profile has taken effect. Inactive in the following parentheses indicates that the WRED profile has not taken effect. |
WRED table commands
display qos wred table
Use display qos wred table to display the WRED table configuration.
Syntax
display qos wred table [ name table-name ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
name table-name: Specifies a WRED table by its name, a case-sensitive string of 1 to 32 characters. If you do not specify a WRED table, this command displays the configuration of all WRED tables.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays the WRED table configuration for the active MPU.
Examples
# Display the configuration of WRED table 1.
<Sysname> display qos wred table name 1
Table name: 1
Table type: Queue based WRED
QID gmin gmax gpro ymin ymax ypro rmin rmax rpro exp ECN
--------------------------------------------------------------------------------
0 100 1000 10 100 1000 10 100 1000 10 9 N
1 - - 10 - - 10 100 1000 10 9 N
2 100 1000 10 - 1000 10 100 1000 10 9 N
3 100 - 10 100 1000 10 100 1000 10 9 N
4 100 1000 10 100 1000 10 100 1000 10 9 N
5 100 1000 10 100 1000 10 100 1000 10 9 N
6 100 - 10 100 1000 10 100 1000 10 9 N
7 100 1000 10 100 1000 10 100 1000 10 9 N
Table 35 Command output
Field |
Description |
Table name |
Name of a WRED table. |
Table type |
Type of a WRED table. |
QID |
Queue ID. |
gmin |
Lower limit for green packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
gmax |
Upper limit for green packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
gpro |
Drop probability for green packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
ymin |
Lower limit for yellow packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
ymax |
Upper limit for yellow packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
ypro |
Drop probability for yellow packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
rmin |
Lower limit for red packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
rmax |
Upper limit for red packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
rpro |
Drop probability for red packets. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
exp |
This field is not supported in the current software version. Exponent for average queue length calculation. A hyphen (-) indicates that this parameter is not configured and the default value of the interface is used when the table is applied to that interface. |
ECN |
This field is not supported in the current software version. Indicates whether ECN is enabled for the queue: · Y—Enabled. · N—Disabled. |
qos wred apply
Use qos wred apply to apply a WRED table to an interface.
Use undo qos wred apply to restore the default.
Syntax
qos wred apply [ table-name ]
undo qos wred apply
Default
No WRED table is applied to an interface, and the tail drop mode is used on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
table-name: Specifies a WRED table by its name, a case-sensitive string of 1 to 32 characters. If you do not specify a WRED table, this command applies the default WRED table to the interface.
Usage guidelines
This command and the qos apply wred-profile command are mutually exclusive.
When both this command and the qos apply qmprofile command containing a WRED profile are executed on an interface, the settings in the applied WRED table take priority.
Examples
# Apply WRED table table1 to Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos wred apply table1
Related commands
display qos wred interface
display qos wred table
qos apply wred-profile
qos wred table
qos wred queue table
Use qos wred queue table to create a WRED table and enter its view, or enter the view of an existing WRED table.
Use undo qos wred queue table to delete a WRED table.
Syntax
qos wred queue table table-name
undo qos wred queue table table-name
Default
No WRED tables exist.
Views
System view
Predefined user roles
network-admin
Parameters
queue: Creates a queue-based WRED table, which drops packets based on the queue when congestion occurs.
table table-name: Specifies a name for the WRED table, a case-sensitive string of 1 to 32 characters.
Usage guidelines
You cannot delete a WRED table in use. To delete it, first remove it from the specified interface.
Examples
# Create a queue-based WRED table named queue-table1.
<Sysname> system-view
[Sysname] qos wred queue table queue-table1
[Sysname-wred-table-queue-table1]
Related commands
display qos wred table
queue
Use queue to configure the drop-related parameters for a queue in the queue-based WRED table.
Use undo queue to restore the default.
Syntax
queue queue-id [ drop-level drop-level ] low-limit low-limit high-limit high-limit [ discard-probability discard-prob ]
undo queue { queue-id [ drop-level drop-level ] | all }
Default
The lower limit is 100, the higher limit is 1000, and the drop probability denominator is 10.
Views
WRED table view
Predefined user roles
network-admin
Parameters
all: Specifies all queues.
queue-id: Specifies a queue by its ID in the range of 0 to 7.
drop-level drop-level: Specifies a drop level. This argument is a consideration for dropping packets. The value 0 corresponds to green packets, the value 1 corresponds to yellow packets, and the value 2 corresponds to red packets. If you do not specify a drop level, the subsequent configuration takes effect on the packets in the queue regardless of the drop level.
low-limit low-limit: Specifies the lower limit for the average queue length in the range of 0 to 29296875 packets.
high-limit high-limit: Specifies the lower limit for the average queue length in the range of 0 to 29296875 packets. The upper limit must be greater than the lower limit. The upper limit should not be greater than 12582912.
discard-probability discard-prob: Specifies the drop probability in percentage, in the range of 0 to 100. When the average queue size is between the lower limit and the upper limit, packets are dropped according to this drop probability.
Usage guidelines
When the average queue size is smaller than the lower threshold, no packet is dropped. When the average queue size is between the lower threshold and the upper threshold, the packets are dropped at random. The longer the queue is, the higher the drop probability is. When the average queue size exceeds the upper threshold, subsequent packets are dropped.
To use the tail drop mechanism for a queue, set the same value for the lower limit and upper limit and set the drop probability to 100%.
Examples
# In queue-based WRED table queue-table1, configure the following drop-related parameters for packets in queue 1:
· The drop level is 1.
· The lower limit for the average queue length is 10.
· The upper limit for the average queue length is 20.
· The drop probability is 30%.
<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
Related commands
display qos wred table
qos wred table
WRED profile commands
display qos wred-profile
Use display qos wred-profile to display information about WRED profiles.
Syntax
display qos wred-profile [ profile-name ]
Views
Any view
Predefined user roles
network-admin
Parameters
profile-name: Specifies a WRED profile by its name.
Usage guidelines
If you do not specify a WRED profile, this command displays the configuration of all WRED profiles.
For a WRED profile without any configuration, this command displays only its name.
Examples
# Display the configuration of all WRED profiles.
<Sysname> display qos wred-profile
WRED profile: myprofile
gmin gmax gpro ymin ymax ypro rmin rmax rpro
exp ECN Length
--------------------------------------------------------------------------------
100 1000 10 100 1000 10 100 1000 10
- Y 1024
Table 36 Command output
Field |
Description |
gmin |
Lower limit for green packets. |
gmax |
Upper limit for green packets. |
gpro |
Drop probability for green packets. |
ymin |
Lower limit for yellow packets. |
ymax |
Upper limit for yellow packets. |
ypro |
Drop probability for yellow packets. |
rmin |
Lower limit for red packets. |
rmax |
Upper limit for red packets. |
rpro |
Drop probability for red packets. |
exp |
Exponent for average queue length calculation. |
ECN |
Indicates whether ECN is enabled for the queue: · Y—Enabled. · N—Disabled. |
Length |
Queue length. |
qos apply wred-profile
Use qos apply wred-profile to apply a WRED profile to a queue on an interface.
Use undo qos apply wred-profile to remove WRED profiles from a queue on an interface.
Syntax
qos apply wred-profile profile-name queue queue-id
undo qos apply wred-profile { queue-id | all }
Default
No WRED profile is applied to a queue.
Views
Interface view
Predefined user roles
network-admin
Parameters
profile-name: Specifies a WRED profile by its name, a case-sensitive string of 1 to 32 characters.
queue-id: Specifies a queue ID. The value range for queue-id is 0 to 7.
Usage guidelines
Make sure the WRED profile to be applied already exists.
This command and the qos wred apply command are mutually exclusive.
When both this command and the qos apply qmprofile command are executed on an interface, this command takes priority.
Examples
# Apply WRED profile profile1 to queue 1 on Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] qos apply wred-profile profile1 queue 1
Related commands
display qos wred-profile
qos apply qmprofile (interface view)
qos wred apply
qos wred-profile
qos wred-profile
Use qos wred-profile to create a WRED profile and enter its view, or enter the view of an existing WRED profile.
Use undo qos wred-profile to delete a WRED profile.
Syntax
qos wred-profile profile-name
undo qos wred-profile profile-name
Default
No WRED profile exists on the device.
Views
System view
Predefined user roles
network-admin
Parameters
profile-name: Specifies a WRED profile by its name, a case-sensitive string of 1 to 32 characters.
Usage guidelines
You cannot delete a WRED profile in use. To delete it, first remove it from the specified interface.
Examples
# Create WRED profile queue-profile1.
<Sysname> system-view
[Sysname] qos wred-profile queue-profile1
[Sysname-wred-profile-queue-profile1]
Related commands
display qos wred-profile
queue (WRED profile view)
Use queue to configure the drop-related parameters for a WRED profile.
Use undo queue to restore the default.
Syntax
queue [ drop-level drop-level ] [ limit-percent ] low-limit low-limit high-limit high-limit [ discard-probability discard-prob ]
queue low-limit low-limit high-limit high-limit [ discard-probability discard-prob ]
queue limit-percent low-limit low-limit high-limit high-limit [ discard-probability discard-prob ] [ queue-length length ]
undo queue [ drop-level drop-level ]
Default
No drop-related parameters are configured for a WRED profile.
Views
WRED profile view
Predefined user roles
network-admin
Parameters
drop-level drop-level: Specifies a drop level. This argument is a consideration for dropping packets. The value 0 corresponds to green packets, the value 1 corresponds to yellow packets, and the value 2 corresponds to red packets. If you do not specify a drop level, the subsequent configuration takes effect on packets regardless of the drop level.
limit-percent: Specifies the upper limit and lower limit for the average queue length in percentage. If you do not specify this keyword, the upper limit and lower limit for the average queue length are specified in absolute value.
low-limit low-limit: Specifies the lower limit for the average queue length.
· If you specify the limit-percent keyword, the value range is 1 to 100 in % The lower limit for the average queue length is low-limit × queue length.
· If you do not specify the limit-percent keyword, the value range for low-limit is 0 to 29296875 packets.
high-limit high-limit: Specifies the upper limit for the average queue length.
· If you specify the limit-percent keyword, the value range is 1 to 100 in % The upper limit for the average queue length is high-limit × queue length.
· If you do not specify the limit-percent keyword, the value range for high-limit is 0 to 29296875 packets.
discard-probability discard-prob: Specifies the drop probability. The value range for discard-prob is 0 to 100 in percenrtage.
queue-length length: Specifies the queue length. The value range for length is 0 to 29296875.
Usage guidelines
When the queue size is shorter than the lower threshold, no packet is dropped. When the queue size is between the lower threshold and the upper threshold, the received packets are dropped at random. The drop probability in a queue increases along with the queue size under the maximum drop probability. When the queue size reaches the upper threshold, all subsequent packets are dropped.
For packets with the same drop level, the upper limit and lower limit for the average queue length must be configured in the same unit, either percentage or absolute value.
If you do not specify a drop level, this command is issued to each drop level, and three configuration entries are generated on the device.
You can specify the queue length either by the queue-length length option in this command or the queue length command. You need to specify the queue length only when you configure the upper threshold and lower threshold for the average queue length in percentage. Otherwise, the command will fail to be issued.
Examples
# Configure the following WRED parameters for packets with drop level 1 in WRED profile queue-profile1: lower limit 10, upper limit 20, and drop probability 30.
<Sysname> system-view
[Sysname] qos wred-profile queue-profile1
[Sysname-wred-profile-queue-profile1] queue drop-level 1 low-limit 10 high-limit 20 discard-probability 30
Related commands
display qos wred-profile
queue length
queue length
Use queue length to specify the queue length.
Use undo queue length to restore the default.
Syntax
queue length length
undo queue length
Default
The queue length is not configured.
Views
WRED profile view
Predefined user roles
network-admin
Parameters
length: Specifies the queue length. The value range for length is 1 to 29296875 packets.
Usage guidelines
You can specify the queue length either by this command or the queue-length length option in the queue (WRED profile view) command.
You need to execute this command only when you configure the upper threshold and lower threshold for the average queue length in percentage. Otherwise, the command will fail to be issued.
Examples
# Set the queue length to 10.
<Sysname> system-view
[Sysname] qos wred-profile queue-profile1
[Sysname-wred-profile-queue-profile1] queue length 10
Related commands
display qos wred-profile
queue (WRED profile view)
Global CAR commands
car name
Use car name to use a global CAR action in a traffic behavior.
Use undo car to restore the default.
Syntax
car name car-name
undo car
Default
No global CAR action is configured in a traffic behavior.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
car-name: Specifies the name of CAR action. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters.
Examples
# Use aggregate CAR action aggcar-1 in traffic behavior be1.
<Sysname> system-view
[Sysname] traffic behavior be1
[Sysname-behavior-be1] car name aggcar-1
display qos car name
display traffic behavior user-defined
display qos car name
Use display qos car name to display information about global CAR actions.
Syntax
display qos car name [ car-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
car-name: Specifies a global CAR action by its name. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters. If you do not specify a global CAR action, this command displays information about all global CAR actions.
Examples
# Display information about all global CAR actions.
<Sysname> display qos car name
Name: a
Mode: aggregative
CIR 32 (kbps) CBS: 2048 (Bytes) PIR: 888 (kbps) EBS: 0 (Bytes)
Table 37 Command output
Field |
Description |
Name |
Name of the global CAR action. |
Mode |
Type of the CAR action. |
CIR CBS PIR EBS |
Parameters for the CAR action. |
qos car (system view)
Use qos car to configure an aggregate CAR action.
Use undo qos car to delete an aggregate CAR action.
Syntax
qos car car-name aggregative cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ]
qos car car-name aggregative cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ]
undo qos car car-name
Default
No aggregate CAR action exists.
Views
System view
Predefined user roles
network-admin
Parameters
car-name: Specifies the name of the global CAR action. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters.
aggregative: Specifies the global CAR action as an aggregate CAR action.
cir committed-information-rate: Specifies the CIR in the range of 1 to 300000000 kbps.
cbs committed-burst-size: Specifies the CBS in bytes in the range of 512 to 256000000 kbps. The default is the product of 62.5 and the CIR.
ebs excess-burst-size: Specifies the EBS in bytes in the range of 0 to 256000000 kbps.
pir peak-information-rate: Specifies the PIR in the range of 1 to 300000000 kbps.
Usage guidelines
An aggregate CAR action takes effect only after it is applied to an interface or used in a QoS policy.
To use two rates for global CAR, configure the qos car command with the pir peak-information-rate option. To use one rate for global CAR, configure the qos car command without the pir peak-information-rate option.
Examples
# Configure aggregate CAR action aggcar-1, where CIR is 200, CBS is 2048, and red packets are dropped.
<Sysname> system-view
[Sysname] qos car aggcar-1 aggregative cir 200 cbs 2048 red discard
display qos car name
reset qos car name
Use reset qos car name to clear the statistics about global CAR actions.
Syntax
reset qos car name [ car-name ]
Views
User view
Predefined user roles
network-admin
Parameters
car-name: Specifies a global CAR action by its name. This argument must start with a letter, and is a case-sensitive string of 1 to 31 characters. If you do not specify a global CAR action, this command clears statistics for all global CAR actions.
Examples
# Clear the statistics about global CAR action aggcar-1.
Queue-based accounting commands
Interface queue-based traffic statistics commands
display qos queue-statistics interface outbound
Use display qos queue-statistics interface outbound to display outgoing traffic statistics collected for interfaces on a per-queue basis.
Syntax
display qos queue-statistics interface [ interface-type interface-number [ slot slot-number ] ] outbound
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays the outgoing traffic statistics for all interfaces.
slot slot-number: Specifies a card by its slot number. This option is available only for Layer 3 aggregate interfaces. If you do not specify a card, this command displays the outgoing traffic statistics for the active MPU.
Examples
# Display queue-based outgoing traffic statistics of Ten-GigabitEthernet 3/0/1.
<Sysname> display qos queue-statistics interface ten-gigabitethernet 3/0/1 outbound
Interface: Ten-GigabitEthernet3/0/1
Direction: Outbound
Forwarded: 10077 packets, 864466 bytes, 0 pps, 0 bps
Dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Queue 0
Forwarded: 61 packets, 4758 bytes, 0 pps, 0 bps
Dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Green forwarded: 61 packets, 4758 bytes, 0 pps, 0 bps
Green dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Yellow forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Yellow dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Red forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Red dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Total queue length: 0 packets, 0 bytes
Current queue length: 0 packets, 0 bytes
Queue 1
Forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Green forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Green dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Yellow forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Yellow dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Red forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Red dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Total queue length: 0 packets, 0 bytes
Current queue length: 0 packets, 0 bytes
…
Queue 7
Forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Green forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Green dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Yellow forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Yellow dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Red forwarded: 0 packets, 0 bytes, 0 pps, 0 bps
Red dropped: 0 packets, 0 bytes, 0 pps, 0 bps
Total queue length: 0 packets, 0 bytes
Current queue length: 0 packets, 0 bytes
Table 38 Command output
Field |
Description |
Interface |
Interface for which queue-based traffic statistics are displayed. |
Direction |
Direction of traffic for which statistics are collected. |
Forwarded |
Counts forwarded traffic in packets, bytes, pps, and bps. |
Dropped |
Counts dropped traffic in packets, bytes, pps, and bps. |
Green forwarded |
Counts forwarded green packets in packets, bytes, pps, and bps. |
Green dropped |
Counts dropped green packets in packets, bytes, pps, and bps. |
Yellow forwarded |
Counts forwarded yellow packets in packets, bytes, pps, and bps. |
Yellow dropped |
Counts dropped yellow packets in packets, bytes, pps, and bps. |
Red forwarded |
Counts forwarded red packets in packets, bytes, pps, and bps. |
Red dropped |
Counts dropped red packets in packets, bytes, pps, and bps. |
Total queue length |
Total number of packets allowed in the queue. |
Current queue length |
Current number of packets in the queue. |
Related commands
reset counters interface (Interface Command Reference)
qos queue-statistics
Use qos queue-statistics to enable queue-based traffic accounting.
Use undo qos queue-statistics to disable queue-based traffic accounting.
Syntax
qos queue-statistics { inbound | outbound }
undo qos queue-statistics { inbound | outbound }
Default
Queue-based traffic accounting is enabled.
Views
System view
Predefined user roles
network-admin
Parameters
inbound: Specifies the inbound direction. This keyword does not take effect.
outbound: Specifies the outbound direction.
Examples
# Enable queue-based outgoing traffic accounting.
<Sysname> system-view
[Sysname] qos queue-statistics outbound
User queue-based traffic statistics commands
display qos queue-statistics user-id
Use display queue-statistics user-id to display queue-based statistics for a user.
Syntax
display qos queue-statistics user-id user-id [ slot slot-number ] outbound
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
user-id user-id: Specifies an online user by its hexadecimal ID. The value range for the user-id argument is 1 to 7fffff.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays information for all cards.
outbound: Specifies queue-based statistics for the outbound direction.
Examples
# Display queue-based statistics for the online user with user ID 400000.
<Sysname> display qos queue-statistics user-id 400000
slot 1
User ID: 0x400000
Direction: Outbound
Forwarded: 6756832 packets, 891901824 bytes
Dropped: 49648521 packets, 6553604772 bytes
Queue 0
Forwarded: 1333037 packets, 175960884 bytes
Dropped: 5721125 packets, 755188500 bytes
Green forwarded: 1333037 packets, 175960884 bytes
Green dropped: 0 packets, 0 bytes
Yellow forwarded: 0 packets, 0 bytes
Yellow dropped: 0 packets, 0 bytes
Red forwarded: 0 packets, 0 bytes
Red dropped: 5721125 packets, 755188500 bytes
Current queue length: 999 packets
…
Queue 7
Forwarded: 2308849 packets, 304768068 bytes
Dropped: 4734509 packets, 624955188 bytes
Green forwarded: 2308849 packets, 304768068 bytes
Green dropped: 0 packets, 0 bytes
Yellow forwarded: 0 packets, 0 bytes
Yellow dropped: 0 packets, 0 bytes
Red forwarded: 0 packets, 0 bytes
Red dropped: 4734509 packets, 624955188 bytes
Current queue length: 12276 packets
Table 39 Command output
Field |
Description |
Forwarded |
Total number of packets forwarded and total number of bytes forwarded. |
Dropped |
Total number of packets dropped and total number of bytes dropped. |
Green forwarded |
Number of green packets forwarded and number of bytes forwarded for green packets. |
Green dropped |
Number of green packets dropped and number of bytes dropped for green packets. |
Yellow forwarded |
Number of yellow packets forwarded and number of bytes forwarded for yellow packets. |
Yellow dropped |
Number of yellow packets dropped and number of bytes dropped for yellow packets. |
Red forwarded |
Number of red packets forwarded and number of bytes forwarded for red packets. |
Red dropped |
Number of red packets dropped and number of bytes dropped for red packets. |
Current queue length |
Number of packets in the queue. |
reset qos queue-statistics user-id
Use reset queue-statistics user-id to clear queue-based statistics for a user.
Syntax
reset qos queue-statistics user-id user-id outbound
Views
Any view
Predefined user roles
network-admin
Parameters
user-id user-id: Specifies an online user by its hexadecimal ID. The value range for the user-id argument is 1 to 7fffff.
outbound: Specifies queue-based statistics for the outbound direction.
Usage guidelines
If you do not specify a direction, this command clears queue-based statistics in both the inbound and outbound directions.
When you clear queue-based statistics for one user of a home user, queue-based statistics for all other users of the home user are also cleared.
Examples
# Clear queue-based statistics for the online user with user ID 400000.
<Sysname> reset qos queue-statistics user-id 400000
QPPB commands
bgp-policy
Use bgp-policy to enable QPPB, which transmits the apply ip-precedence and apply qos-local-id configuration through BGP routing policies.
Use undo bgp-policy to restore the default.
Syntax
bgp-policy { destination | source } ip-prec-map ip-qos-map
undo bgp-policy { destination | source } [ ip-prec-map ip-qos-map ]
Default
QPPB is disabled.
Views
Interface view
Predefined user roles
network-admin
Parameters
destination: Searches the routing table by destination IP address.
source: Searches the routing table by source IP address. If the source keyword is specified, the source IP address is used as the destination address for inverse lookup.
ip-prec-map: Sets an IP precedence value for matching packets.
ip-qos-map: Sets a local QoS ID for matching packets.
Usage guidelines
In an MPLS L3VPN, the bgp-policy command is executed after the QoS features are performed in the inbound direction of the PE's public network interface. In any other case, the bgp-policy command is executed before the QoS features.
If you configure either of the following bgp-policy command pairs, both commands in the pair take effect:
· bgp-policy destination ip-prec-map and bgp-policy source ip-qos-map.
· bgp-policy source ip-prec-map and bgp-policy destination ip-qos-map.
If you configure either of the following bgp-policy command pairs, the command with the destination keyword in the pair takes effect:
· bgp-policy destination ip-prec-map and bgp-policy source ip-prec-map.
· bgp-policy destination ip-qos-map and bgp-policy source ip-qos-map.
Examples
# Configure Ten-GigabitEthernet 3/0/1 to get the IP precedence and local QoS ID by looking up routes based on source IP address.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] bgp-policy source ip-prec-map ip-qos-map
Related commands
apply ip-precedence (Layer 3—IP Routing Command Reference)
apply qos-local-id (Layer 3—IP Routing Command Reference)
route-policy (Layer 3—IP Routing Command Reference)
Control plane packet-drop logging commands
display qos control-plane logging
Use display qos control-plane logging to display the packet-drop logging configuration for control plane traffic.
Syntax
display qos control-plane logging [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays the packet-drop logging configuration for the active MPU.
Examples
# Display the packet-drop logging configuration for control plane traffic of slot 10.
<Sysname> display qos control-plane logging slot 10
Control plane slot 10
user-defined-flow:
Logging status : Enabled
Logging parameters:
Interval : 600 seconds
Count threshold: 30000 packets
Rate threshold : 50 packets/min
whitelist:
Logging status : Enabled
Logging parameters:
Interval : 600 seconds
Count threshold: 30000 packets
Rate threshold : 50 packets/min
logging packet-drop enable
Use logging packet-drop enable to enable packet-drop logging for control plane traffic.
Use undo logging packet-drop enable to disable packet-drop logging for control plane traffic.
Syntax
logging packet-drop { user-defined-flow | whitelist } enable
undo logging packet-drop { user-defined-flow | whitelist } enable
Default
Packet-drop logging is enabled for control plane traffic.
Views
Control plane view
Predefined user roles
network-admin
Parameters
user-defined-flow: Enables packet-drop logging for traffic matching the QoS policy applied to the control plane.
whitelist: Enables packet-drop logging for traffic matching the IPv4 dynamic whitelist.
Usage guidelines
When the number of dropped packets reaches a set threshold during the set interval, the system generates and sends logs to the information center. For information about configuring the information center, see Network Management and Monitoring Configuration Guide.
Examples
# Enables packet-drop logging for traffic matching the QoS policy applied to the control plane of slot 10.
<Sysname> system-view
[Sysname] control-plane slot 10
[Sysname-cp-slot10] logging packet-drop user-defined-flow enable
Related commands
display acl whitelist
display qos car control-plane whitelist
display qos control-plane logging
display qos policy control-plane
logging packet-drop interval
Use logging packet-drop interval to set the interval for sending packet-drop logs.
Use undo logging packet-drop interval to restore the default.
Syntax
logging packet-drop { user-defined-flow | whitelist } interval interval-value
undo logging packet-drop { user-defined-flow | whitelist } [ interval ]
Default
The interval for sending packet-drop logs is 600 seconds.
Views
Control plane view
Predefined user roles
network-admin
Parameters
user-defined-flow: Enables packet-drop logging for traffic matching the QoS policy applied to the control plane.
whitelist: Enables packet-drop logging for traffic matching the IPv4 dynamic whitelist.
interval-value: Specifies the interval for sending packet-drop logs. The value range for this argument is 60 to 3600 seconds.
Usage guidelines
If you specify the interval keyword when executing the undo form of this command, only the interval is restored to the default value. If you do not specify the interval keyword, both the interval and the packet thresholds are restored to the default values.
Examples
# Set the interval for sending packet-drop logs to 600 seconds for traffic matching the QoS policy applied to the control plane.
<Sysname> system-view
[Sysname] control-plane
[Sysname-cp] logging packet-drop user-defined-flow interval 600
Related commands
display qos control-plane logging
logging packet-drop enable
logging packet-drop { count-threshold | rate-threshold } *
logging packet-drop { count-threshold | rate-threshold } *
Use logging packet-drop { count-threshold | rate-threshold } * to set the packet thresholds for sending packet-drop logs.
Use undo logging packet-drop to restore the default.
Syntax
logging packet-drop { user-defined-flow | whitelist } { count-threshold count-threshold-value | rate-threshold rate-threshold-value } *
undo logging packet-drop { user-defined-flow | whitelist } [ count-threshold | rate-threshold ]
Default
The packet count threshold and packet rate threshold for sending packet-drop logs are 30000 packets and 50 packets per minute, respectively.
Views
Control plane view
Predefined user roles
network-admin
Parameters
user-defined-flow: Enables packet-drop logging for traffic matching the QoS policy applied to the control plane.
whitelist: Enables packet-drop logging for traffic matching the IPv4 dynamic whitelist.
count-threshold count-threshold-value: Specifies the maximum number of dropped packets for sending packet-drop logs. The value range for the count-threshold-value argument is 1 to 1000000.
rate-threshold rate-threshold-value: Specifies the maximum number of packets dropped per minute for sending packet-drop logs. The value range for the rate-threshold-value argument is 0 to 1000000.
Usage guidelines
If you specify a keyword when executing the undo form of this command, only the related parameter is restored to the default value. If you do not specify the interval keyword, both the interval and the packet thresholds are restored to the default values.
Examples
# Set the maximum number of packets dropped per minute to 100 seconds.
<Sysname> system-view
[Sysname] control-plane
[Sysname-cp] logging packet-drop user-defined-flow rate-threshold 100
Related commands
display qos control-plane logging
logging packet-drop enable
logging packet-drop interval