No part of this documentation may be reproduced or transmitted in any form or by any means without
prior written consent of Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained
herein or for incidental or consequential damages in connection with the furnishing, performance, or
use of this material.
The only warranties for HP products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as constituting an
additional warranty. HP shall not be liable for technical or editorial errors or omissions contained
herein.
Traffic class commands ················································································································································· 36
Port priority commands ·················································································································································· 73
display qos lr interface ········································································································································· 77
qos lr ······································································································································································· 78
Aggregate CAR commands ···································································································································· 103
car name ······························································································································································ 103
display qos car name ········································································································································· 103
qos car ·································································································································································· 104
reset qos car name ·············································································································································· 106
Time range commands ··········································································································································· 107
Data buffer commands ··········································································································································· 109
Index ········································································································································································ 118
iii
ACL commands
acl
Use acl to create an ACL, and enter its view. If the ACL has been created, you directly enter its view.
Use undoacl to delete the specified or all ACLs.
Syntax
acl [ ipv6 ] number acl-number [ name acl-name ] [ match-order { auto | config } ]
undo acl [ ipv6 ] { all | name acl-name | number acl-number }
Default
No ACL exists.
Views
System view
Predefined user roles
network-admin
Parameters
ipv6: Specifies IPv6 ACLs.
number acl-number: Specifies the number of an ACL.
• 2000 to 2999 for basic ACLs.
• 3000 to 3999 for advanced ACLs.
• 4000 to 4999 for Ethernet frame header ACLs. You cannot create an Ethernet frame header ACL if
• 5000 to 5999 for user-defined ACLs. You cannot create a user-defined ACL if the ipv6 keyword is
name acl-name: Assigns a name to the ACL for easy identification. The acl-name argument is a
case-insensitive string of 1 to 63 characters. It must start with an English letter and to avoid confusion, it
cannot be all.
match-order: Sets the order in which ACL rules are compared against packets.
• auto: Compares ACL rules in depth-first order. The depth-first order varies by ACL category. For
• config: Compares ACL rules in ascending order of rule ID. The rule with a smaller ID has higher
all: Specifies all ACLs.
the ipv6 keyword is specified.
specified.
more information, see ACL and QoS Configuration Guide.
priority. If you do not specify a match order, the config-order applies by default.
• If the ipv6 keyword is not specified, all ACLs refer to all IPv4 basic, IPv4 advanced, and Ethernet
frame header ACLs.
• If the ipv6 keyword is specified, all ACLs refer to all IPv6 basic and IPv6 advanced ACLs.
1
Usage guidelines
You can assign a name to an ACL only when you create it. After an ACL is created with a name, you
cannot rename it or remove its name.
You can change the match order only for ACLs that do not contain any rules.
Examples
# Create IPv4 basic ACL 2000, and enter its view.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000]
# Create IPv4 basic ACL 2001 with the name flow, and enter its view.
<Sysname> system-view
[Sysname] acl number 2001 name flow
[Sysname-acl-basic-2001-flow]
Related commands
display acl
acl copy
Use acl copy to create an ACL by copying an ACL that already exists.
Syntax
acl [ ipv6 ] copy { source-acl-number | name source-acl-name } to { dest-acl-number | name
dest-acl-name }
Views
System view
Predefined user roles
network-admin
Parameters
ipv6: Specifies IPv6 ACLs.
source-acl-number: Specifies an existing source ACL by its number.
• 2000 to 2999 for basic ACLs.
• 3000 to 3999 for advanced ACLs.
• 4000 to 4999 for Ethernet frame header ACLs. You cannot specify an Ethernet frame header ACL
if the ipv6 keyword is specified.
• 5000 to 5999 for user-defined ACLs. You cannot specify a user-defined ACL if the ipv6 keyword is
specified.
name source-acl-name: Specifies an existing source ACL by its name. The source-acl-name argument is
a case-insensitive string of 1 to 63 characters.
dest-acl-number: Assigns a unique number to the ACL you are creating. This number must be from the
same ACL category as the source ACL. If you do not specify an ACL number, the system automatically
picks the smallest number from all available numbers in the same ACL category as the source ACL.
Available value ranges include:
2
• 2000 to 2999 for basic ACLs.
• 3000 to 3999 for advanced ACLs.
• 4000 to 4999 for Ethernet frame header ACLs. You cannot create an Ethernet frame header ACL if
the ipv6 keyword is specified.
• 5000 to 5999 for user-defined ACLs. You cannot create a user-defined ACL if the ipv6 keyword is
specified.
name dest-acl-name: Assigns a unique name to the ACL you are creating. The dest-acl-name is a
case-insensitive string of 1 to 63 characters. It must start with an English letter and to avoid confusion, it
cannot be all. If you do not specify an ACL name, the system does not name the ACL.
Usage guidelines
The new ACL has the same properties and content as the source ACL, but not the same ACL number and
name.
You can assign a name to an ACL only when you create it. After an ACL is created with a name, you
cannot rename it or remove its name.
<Sysname> system-view
[Sysname] acl copy 2001 to 2002
acl logging interval
Use acl logging interval to set the interval for generating and outputting packet filtering logs. The log
information includes the number of matching packets and the matched ACL rules.
Use undo acl logging interval to restore the default.
Syntax
acl [ ipv6 ] logging interval interval
undo acl [ ipv6 ] logging interval
Default
The interval is 0. No packet filtering logs are generated.
Views
System view
Predefined user roles
network-admin
Parameters
interval: Specifies the interval in minutes at which packet filtering logs are generated and output. It must
be a multiple of 5 and in the range of 0 to 1440. To disable generating packet filtering logs, assign 0
to the argument.
Usage guidelines
The system collects packet filtering logs only for IPv4 basic, IPv4 advanced, IPv6 basic, and IPv6
advanced ACL rules that have the logging keyword.
3
• When the ipv6 keyword is not specified, this command sets the interval for generating and
outputting IPv4 packet filtering logs.
• When the ipv6 keyword is specified, this command sets the interval for generating and outputting
IPv6 packet filtering logs.
Examples
# Enable the device to generate and output IPv4 packet filtering logs at 10-minute intervals.
Use acl name to enter the view of an ACL that has a name.
Syntax
acl [ ipv6 ] name acl-name
Views
System view
Predefined user roles
network-admin
Parameters
acl-name: Specifies the name of an ACL, a case-insensitive string of 1 to 63 characters. It must start with
an English letter. The ACL must already exist. For a basic ACL or advanced ACL, if you do not specify the
ipv6 keyword, this option specifies the name of an IPv4 basic ACL or advanced ACL. If you specify the
ipv6 keyword, this option specifies the name of an IPv6 basic ACL or advanced ACL.
Examples
# Enter the view of IPv4 basic ACL flow, which already exists.
<Sysname> system-view
[Sysname] acl name flow
[Sysname-acl-basic-2001-flow]
# Enter the view of IPv6 basic ACL flow, which already exists.
<Sysname> system-view
[Sysname] acl ipv6 name flow
[Sysname-acl6-basic-2001-flow]
Related commands
acl
4
description
Use description to configure a description for an ACL.
Use undo description to delete an ACL description.
Syntax
description text
undo description
Default
An ACL has no description.
Views
IPv4/IPv6 basic ACL view
IPv4/IPv6 advanced ACL view
Ethernet frame header ACL view
User-defined ACL view
Predefined user roles
network-admin
Parameters
text: Configures a description for the ACL, a case-sensitive string of 1 to 127 characters.
Examples
# Configure a description for IPv4 basic ACL 2000.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] description This is an IPv4 basic ACL.
Related commands
display acl
display acl
Use displayacl to display configuration and match statistics for ACLs.
Syntax
display acl [ ipv6 ] { acl-number | all | name acl-name }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ipv6: Specifies IPv6 ACLs.
5
acl-number: Specifies an ACL by its number.
p
• 2000 to 2999 for basic ACLs.
• 3000 to 3999 for advanced ACLs.
• 4000 to 4999 for Ethernet frame header ACLs. You cannot specify an Ethernet frame header ACL
if the ipv6 keyword is specified.
• 5000 to 5999 for user-defined ACLs. You cannot specify a user-defined ACL if the ipv6 keyword is
specified.
all: Displays information about all IPv4 basic, IPv4 advanced, and Ethernet frame header ACLs if you do
not specify the ipv6 keyword, or displays information about all IPv6 basic and IPv6 advanced ACLs if
you specify the ipv6 keyword.
name acl-name: Specifies an ACL by its name. The acl-name argument is a case-insensitive string of 1 to
63 characters. It must start with an English letter.
Usage guidelines
This command displays ACL rules in config or depth-first order, whichever is configured.
Examples
# Display configuration and match statistics for IPv4 basic ACL 2001.
<Sysname> display acl 2001
Basic ACL 2001, named flow, 1 rule, match-order is auto,
This is an IPv4 basic ACL.
ACL's step is 5
rule 5 permit source 1.1.1.1 0 (5 times matched)
rule 5 comment This rule is used on FortyGigE 1/1/1.
Table 1 Command output
Field
Descri
Basic ACL 2001
named flow
1 rule The ACL contains one rule.
match-order is auto
This is an IPv4 basic ACL. Description of this ACL.
ACL's step is 5 The rule numbering step is 5.
rule 5 permit source 1.1.1.1 0 Content of rule 5.
5 times matched
rule 5 comment This rule is used
on FortyGigE 1/1/1.
Category and number of the ACL. The following field information is about
IPv4 basic ACL 2000.
The name of the ACL is flow. If the ACL is not named, this field displays
-none-.
The match order for the ACL is auto, which sorts ACL rules in depth-first
order. This field is not present when the match order is config.
There have been five matches for the rule. The statistic counts only ACL
matches performed in software.
This field is not displayed when no packets matched the rule.
Comment of ACL rule 5.
tion
6
display packet-filter
p
Use display packet-filter to display whether an ACL has been successfully applied to an interface for
packet filtering.
interface [ interface-type interface-number ]: Specifies an interface by its type and number. VLAN
interfaces are not supported. If you do not specify an interface, this command displays ACL application
information on all interfaces except VLAN interfaces for packet filtering.
interface vlan-interface vlan-interface-number: Specifies a VLAN interface by its number.
inbound: Specifies the inbound direction.
outbound: Specifies the outbound direction.
slot slot-number: Specifies an IRF member device. The slot-number argument represents the ID of the IRF
member device. If you do not specify an IRF member device, this command displays ACL application
information for packet filtering on the master.
Usage guidelines
If neither the inbound keyword nor the outbound keyword is specified, this command displays the ACL
application information for both incoming and outgoing packet filtering.
Examples
# Display ACL application information for incoming packet filtering on interface FortyGigE
1/1/1.
Packet filter default action for packets that do not match any IPv4
ACLs. This field is displayed only when the default action is deny.
Packet filter default action for packets that do not match any IPv6
ACLs. This field is displayed only when the default action is deny.
Packet filter default action for packets that do not match any Ethernet
frame header ACLs. This field is displayed only when the default
action is deny.
display packet-filter statistics
Use displaypacket-filterstatistics to display match statistics of ACLs for packet filtering.
Totally 0% permitted, 0% denied Ratios of permitted and denied packets to all packets.
IPv4 default action
IPv6 default action
MAC default action
Start time and end time of the statistics.
Number of packets permitted and denied by the ACL.
Packet filter default action for packets that do not match any IPv4
ACLs. This field is displayed only when the default action is deny.
Packet filter default action for packets that do not match any IPv6
ACLs. This field is displayed only when the default action is deny.
Packet filter default action for packets that do not match any
Ethernet frame header ACLs. This field is displayed only when the
default action is deny.
tion
9
Related commands
reset packet-filter statistics
display packet-filter statistics sum
Use displaypacket-filterstatistics sum to display accumulated packet filtering ACL statistics.
inbound: Displays the statistics in the inbound direction.
outbound: Displays the statistics in the outbound direction.
Examples
ipv6: Specifies IPv6 ACLs.
acl-number: Specifies an ACL by its number.
• 2000 to 2999 for basic ACLs.
• 3000 to 3999 for advanced ACLs.
• 4000 to 4999 for Ethernet frame header ACLs. You cannot specify an Ethernet frame header ACL
if the ipv6 keyword is specified.
• 5000 to 5999 for user-defined ACLs. You cannot specify a user-defined ACL if the ipv6 keyword is
specified.
nameacl-name: Specifies an ACL by its name. The acl-name argument is a case-insensitive string of 1 to
63 characters. It must start with an English letter.
interface interface-typeinterface-number: Specifies an interface by its type and number.
inbound: Specifies the inbound direction.
outbound: Specifies the outbound direction.
ipv6: Specifies IPv6 ACLs.
acl-number: Specifies an ACL by its number.
• 2000 to 2999 for basic ACLs.
• 3000 to 3999 for advanced ACLs.
• 4000 to 4999 for Ethernet frame header ACLs. You cannot specify an Ethernet frame header ACL
if the ipv6 keyword is specified.
• 5000 to 5999 for user-defined ACLs. You cannot specify a user-defined ACL if the ipv6 keyword is
specified.
11
name acl-name: Specifies an ACL by its name. The acl-name argument is a case-insensitive string of 1 to
p
63 characters. It must start with an English letter.
slotslot-number: Specifies an IRF member device. The slot-number argument represents the ID of the IRF
member device. If you do not specify an IRF member device, this command displays ACL application
details for packet filtering on the master.
Usage guidelines
When none of acl-number and name acl-name is specified, this command displays application details of
all ACLs for packet filtering.
• If the ipv6 keyword is not specified, all ACLs refer to all IPv4 basic, IPv4 advanced, and Ethernet
frame header ACLs.
•If the ipv6 keyword is specified, all ACLs refer to all IPv6 basic and IPv6 advanced ACLs.
Examples
# Display application details of all ACLs (IPv4 basic, IPv4 advanced, and Ethernet frame header ACLs)
for incoming packet filtering on FortyGigE 1/1/1.
Packet filter default action for packets that do not match any IPv4
IPv4 default action
IPv6 default action
ACLs. This field is displayed only when the default action is
deny.
Packet filter default action for packets that do not match any IPv6
ACLs. This field is displayed only when the default action is
deny.
tion
12
Field Description
p
MAC default action
display qos-acl resource
Use display qos-acl resource to display QoS and ACL resource usage.
Syntax
display qos-acl resource [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies an IRF member device. The slot-number argument represents the ID of the IRF
member device. If you do not specify an IRF member device, this command displays QoS and ACL
resource usage on all member devices.
Packet filter default action for packets that do not match any
Ethernet frame header ACLs. This field is displayed only when
the default action is deny.
Examples
# Display QoS and ACL resource usage.
<Sysname> display qos-acl resource
Interfaces: XGE1/0/1 to XGE1/0/45, FGE1/1/1 to FGE1/1/4
---------------------------------------------------------------------
Type Total Reserved Configured Remaining Usage
Configured Number of resource that has been applied.
Remaining Number of resource that you can apply.
Usage
packet-filter
Resource type:
•VFP ACL—ACL rules for local QoS ID remarking before Layer 2
forwarding.
• IFP ACL—ACL rules applied to inbound traffic.
• IFP Meter—Traffic policing rules for inbound traffic.
• IFP Counter—Traffic counting rules for inbound traffic.
• EFP Meter—Traffic policing rules for outbound traffic.
• EFP Counter—Traffic counting rules for outbound traffic.
Configured and reserved resources as a percentage of total resources. If the
percentage is not an integer, this field displays the integer part. For example,
if the actual usage is 50.8%, this field displays 50%.
Use packet-filter to apply an ACL to an interface to filter packets.
Use undo packet-filter to remove an ACL application from an interface.
• 4000 to 4999 for Ethernet frame header ACLs. You cannot specify an Ethernet frame header ACL
if the ipv6 keyword is specified.
• 5000 to 5999 for user-defined ACLs. You cannot specify a user-defined ACL if the ipv6 keyword is
specified.
nameacl-name: Specifies an ACL by its name. The acl-name argument is a case-insensitive string of 1 to
63 characters. It must start with an English letter.
inbound: Filters incoming packets.
outbound: Filters outgoing packets.
hardware-count: Enables counting ACL rule matches performed in hardware. This keyword enables
match counting for all rules in an ACL, and the counting keyword in the rule command enables match
counting specific to rules. If the hardware-count keyword is not specified, rule matches for the ACL are
not counted.
Examples
# Apply IPv4 basic ACL 2001 to filter incoming traffic on FortyGigE 1/1/1, and enable counting ACL
rule matches performed in hardware.
Use packet-filterdefaultdeny to set the packet filtering default action to deny. The packet filter denies
packets that do not match any ACL rule.
Use undopacket-filterdefaultdeny to restore the default.
Syntax
packet-filter default deny
undo packet-filter default deny
Default
The packet filter permits packets that do not match any ACL rule.
Views
System view
Predefined user roles
network-admin
Usage guidelines
The packet filter applies the default action to all ACL applications for packet filtering. The default action
appears in the display command output for packet filtering.
reset acl counter [ ipv6 ] { acl-number | all | name acl-name }
Views
User view
Predefined user roles
network-admin
Parameters
ipv6: Specifies IPv6 ACLs.
acl-number: Specifies an ACL by its number.
• 2000 to 2999 for basic ACLs.
• 3000 to 3999 for advanced ACLs.
• 4000 to 4999 for Ethernet frame header ACLs. You cannot specify an Ethernet frame header ACL
• 5000 to 5999 for user-defined ACLs. You cannot specify a user-defined ACL if the ipv6 keyword is
all: Clears statistics for all IPv4 basic, IPv4 advanced, and Ethernet frame header ACLs if you do not
specify the ipv6 keyword, or clears statistics for all IPv6 basic and IPv6 advanced ACLs if you specify the
ipv6 keyword.
name acl-name: Clears statistics of an ACL specified by its name. The acl-name argument is a
case-insensitive string of 1 to 63 characters. It must start with an English letter.
Examples
# Clear statistics for IPv4 basic ACL 2001.
<Sysname> reset acl counter 2001
if the ipv6 keyword is specified.
specified.
Related commands
display acl
16
reset packet-filter statistics
Use resetpacket-filterstatistics to clear the match statistics (including the accumulated statistics) of ACLs
for packet filtering.
interface [ interface-type interface-number ]: Specifies an interface by its type and number. If you do not
specify an interface, this command clears packet filtering ACL statistics on all interfaces.
inbound: Specifies the inbound direction.
outbound: Specifies the outbound direction.
ipv6: Specifies IPv6 ACLs.
acl-number: Specifies an ACL by its number.
• 2000 to 2999 for basic ACLs.
• 3000 to 3999 for advanced ACLs.
• 4000 to 4999 for Ethernet frame header ACLs. You cannot specify an Ethernet frame header ACL
if the ipv6 keyword is specified.
• 5000 to 5999 for user-defined ACLs. You cannot specify a user-defined ACL if the ipv6 keyword is
specified.
name acl-name: Specifies an ACL by its name. The acl-name argument is a case-insensitive string of 1 to
63 characters. It must start with an English letter.
Usage guidelines
When neither of acl-number and name acl-name is specified, this command clears the match statistics of
all ACLs for packet filtering.
• If the ipv6 keyword is not specified, all ACLs refer to all IPv4 basic, IPv4 advanced, and Ethernet
frame header ACLs.
•If the ipv6 keyword is specified, all ACLs refer to all IPv6 basic and IPv6 advanced ACLs.
Examples
# Clear IPv4 basic ACL 2001 statistics for incoming packet filtering of interface FortyGigE 1/1/1.
An Ethernet frame header ACL does not contain any rule.
Views
Ethernet frame header ACL view
Predefined user roles
network-admin
Parameters
rule-id: Specifies a rule ID in the range of 0 to 65534. If you do not specify a rule ID when creating an
ACL rule, the system automatically assigns it a rule ID. This rule ID is the nearest higher multiple of the
numbering step to the current highest rule ID, starting from 0. For example, if the rule numbering step is
5 and the current highest rule ID is 28, the rule is numbered 30.
deny: Denies matching packets.
permit: Allows matching packets to pass.
cos vlan-pri: Matches an 802.1p priority. The vlan-pri argument can be a number in the range of 0 to 7, or in words, best-effort (0), background (1), spare (2), excellent-effort (3), controlled-load (4), video (5),
voice (6), or network-management (7).
counting: Counts the number of times the Ethernet frame header ACL rule has been matched. The
counting keyword enables match counting specific to rules, and the hardware-count keyword in the
packet-filter command enables match counting for all rules in an ACL. If the counting keyword is not
specified, matches for the rule are not counted.
dest-mac dest-address dest-mask: Matches a destination MAC address range. The dest-address and
dest-mask arguments represent a destination MAC address and mask in the H-H-H format.
lsap lsap-type lsap-type-mask: Matches the DSAP and SSAP fields in LLC encapsulation. The lsap-type
argument is a 16-bit hexadecimal number that represents the encapsulation format. The lsap-type-mask
argument is a 16-bit hexadecimal number that represents the LSAP mask.
type protocol-type protocol-type-mask: Matches one or more protocols in the Ethernet frame header. The
protocol-type argument is a 16-bit hexadecimal number that represents a protocol type in Ethernet_II and
Ethernet_SNAP frames. The protocol-type-mask argument is a 16-bit hexadecimal number that represents
a protocol type mask.
source-macsource-addresssource-mask: Matches a source MAC address range. The source-address
argument represents a source MAC address, and the sour-mask argument represents a mask in the H-H-H
format.
18
time-rangetime-range-name: Specifies a time range for the rule. The time-range-name argument is a
case-insensitive string of 1 to 32 characters. It must start with an English letter. If the time range is not
configured, the system creates the rule. However, the rule using the time range can take effect only after
you configure the timer range. For more information about time range, see ACL and QoS Configuration Guide.
Usage guidelines
When an Ethernet frame header ACL with the lsap keyword specified is used for QoS traffic classification
or packet filtering, the lsap-type argument must be AAAA and the lsap-type-mask argument must be FFFF.
Otherwise, the ACL cannot be applied successfully.
Within an ACL, the permit or deny state ment of each ru le must be un iqu e. If the ACL rule you are creatin g
or editing has the same deny or permit statement as another rule in the ACL, the rule will not be created
or changed.
You can edit ACL rules only when the match order is config.
• If you do not specify any optional keywords, the undo rule command deletes the entire rule.
• If you specify optional keywords or arguments, the undo rule command deletes the specified
attributes.
To view rules in an ACL and their rule IDs, use the display acl all command.
Examples
# Create a rule in Ethernet frame header ACL 4000 to permit ARP packets and deny RARP packets.
<Sysname> system-view
[Sysname] acl number 4000
[Sysname-acl-ethernetframe-4000] rule permit type 0806 ffff
[Sysname-acl-ethernetframe-4000] rule deny type 8035 ffff
Related commands
• acl
• display acl
• step
• time-range
rule (IPv4 advanced ACL view)
Use rule to create or edit an IPv4 advanced ACL rule.
Use undorule to delete an entire IPv4 advanced ACL rule or some attributes in the rule.
rule-id: Specifies a rule ID in the range of 0 to 65534. If you do not specify a rule ID when creating an
ACL rule, the system automatically assigns it a rule ID. This rule ID is the nearest higher multiple of the
numbering step to the current highest rule ID, starting from 0. For example, if the rule numbering step is
5 and the current highest rule ID is 28, the rule is numbered 30.
deny: Denies matching packets.
permit: Allows matching packets to pass.
protocol: Specifies a protocol number in the range of 0 to 255, or specifies a protocol by its name, gre
(47), icmp (1) , igmp (2), ip, ipinip (4), ospf (89), tcp (6), or udp (17) . Th e ip keyword specifies all
protocols. Table 7 d
argument.
Table 7 Match criteria and other rule information for IPv4 advanced ACL rules
escribes the parameters that you can specify regardless of the value for the protocol
Parameters Function Descri
source
{ source-address
source-wildcard |
any }
destination
{ dest-address
dest-wildcard |
any }
counting
precedence
precedence
tostosSpecifies a ToS preference.
Specifies a source address.
Specifies a destination
address.
Counts the number of times the
IPv4 advanced ACL rule has
been matched.
Specifies an IP precedence
value.
The source-address source-wildcard arguments
represent a source IP address and wildcard mask in
dotted decimal notation. An all-zero wildcard specifies
a host address.
The any keyword specifies any source IP address.
The dest-address dest-wildcard arguments represent a
destination IP address and wildcard mask in dotted
decimal notation. An all-zero wildcard specifies a host
address.
The any keyword represents any destination IP address.
The counting keyword enables match counting specific
to rules, and the hardware-count keyword in the
packet-filter command enables match counting for all
ru l e s in an ACL. If the counting keyword is not specified,
matches for the rule are not counted.
The precedence argument can be a number in the range
of 0 to 7, or in words, routine (0), priority (1),
immediate (2), flash (3), flash-override (4), critical (5),
internet (6), or network (7).
The tos argument can be a number in the range of 0 to
15, or in words, max-reliability (2), max-throughput
(4), min-delay (8), min-monetary-cost (1), or normal
(0).
tion
20
Parameters Function Description
p
The dscp argument can be a number in the range of 0 to
63, or in words, af11 (10), af12 (12), af13 (14), af21
If you do not specify this keyword, the rule applies to all
fragments and non-fragments.
This function requires that the module (for example,
packet filtering) that uses the ACL supports logging.
The time-range-name argument is a case-insensitive
string of 1 to 32 characters. It must start with an English
letter. If the time range is not configured, the system
creates the rule. However, the rule using the time range
can take effect only after you configure the timer range.
For more information about time range, see ACL and QoS Configuration Guide.
The vpn-instance-name argument is a case-sensitive
string of 1 to 31 characters.
If you do not specify a VPN instance, the rule applies
only to non-VPN packets.
If the protocol argument is tcp (6) or udp (7), set the parameters shown in Table 8.
Table 8 TCP/UDP-specific parameters for IPv4 advanced ACL rules
Parameters Function Descri
The operator argument can be lt (lower than), gt (greater than), eq
(equal to), neq (not equal to), or range (inclusive range).
source-portoperatorport1
[ port2 ]
destination-port
operator port1
[ port2 ]
Specifies one or
more UDP or TCP
source ports.
Specifies one or
more UDP or TCP
destination ports.
The port1 and port2 arguments are TCP or UDP port numbers in the
range of 0 to 65535. port2 is needed only when the operator
argument is range.
Specifies one or
more TCP flags
including ACK,
FIN, PSH, RST,
SYN, and URG.
Specifies the flags
for indicating the
established status
of a TCP
connection.
Parameters specific to TCP.
The value for each argument can be 0 (flag bit not set) or 1 (flag bit
set).
The TCP flags in a rule are ANDed. For example, a rule configured
with ack 0 psh 1 matches packets that have the ACK flag bit not set
and the PSH flag bit set.
Parameter specific to TCP.
The rule matches TCP connection packets with the ACK or RST flag bit
set.
If the protocol argument is icmp (1), set the parameters shown in Table 9.
Table 9 ICMP-specific parameters for IPv4 advanced ACL rules
Parameters Function Descri
The icmp-type argument is in the range of 0 to 255.
icmp-type { icmp-type
icmp-code |
icmp-message }
Specifies the ICMP
message type and
code.
The icmp-code argument is in the range of 0 to 255.
The icmp-message argument specifies a message name.
Supported ICMP message names and their corresponding
type and code values are listed in Table 10.
If an ACL is for QoS traffic classification or packet filtering:
• Do not specify the vpn-instance keyword if the ACL is for outbound QoS traffic classification or
outbound packet filtering.
• Do not specify neq for the operator argument.
Within an ACL, the permit or deny state ment of each ru le must be un iqu e. If the ACL rule you are creatin g
or editing has the same deny or permit statement as another rule in the ACL, the rule will not be created
or changed.
You can edit ACL rules only when the match order is config.
• If you do not specify any optional keywords, the undo rule command deletes the entire rule.
• If you specify optional keywords or arguments, the undo rule command deletes the specified
attributes.
ICMP message code
Examples
To view rules in an ACL and their rule IDs, use the display acl all command.
# Create an IPv4 advanced ACL rule to permit TCP packets with the destination port 80 from
rule-id: Specifies a rule ID in the range of 0 to 65534. If you do not specify a rule ID when creating an
ACL rule, the system automatically assigns it a rule ID. This rule ID is the nearest higher multiple of the
numbering step to the current highest rule ID, starting from 0. For example, if the rule numbering step is
5 and the current highest rule ID is 28, the rule is numbered 30.
deny: Denies matching packets.
permit: Allows matching packets to pass.
counting: Counts the number of times the IPv4 basic ACL rule has been matched. The counting keyword
enables match counting specific to rules, and the hardware-count keyword in the packet-filter command
enables match counting for all rules in an ACL. If the counting keyword is not specified, matches for the
rule are not counted.
fragment: Applies the rule only to non -first fragments. If you do not specify this keyword, the rule applies
to both fragments and non-fragments.
logging: Logs matching packets. This function is available only when the application module (for
example, packet filtering) that uses the ACL supports the logging function.
24
source { source-address source-wildcard | any }: Matches a source address. The source-address
source-wildcard arguments represent a source IP address and wildcard mask in dotted decimal notation.
A wildcard mask of zeros specifies a host address. The any keyword represents any source IP address.
time-range time-range-name: Specifies a time range for the rule. The time-range-name argument is a
case-insensitive string of 1 to 32 characters. It must start with an English letter. If the time range is not
configured, the system creates the rule. However, the rule using the time range can take effect only after
you configure the timer range. For more information about time range, see ACL and QoS Configuration Guide.
vpn-instance vpn-instance-name: Applies the rule to a VPN instance. The vpn-instance-name argument is
a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, the rule applies only
to non-VPN packets.
Usage guidelines
If an ACL is for outbound QoS traffic classification or outbound packet filtering, do not specify the
vpn-instance keyword.
Within an ACL, the permit or deny state ment of each ru le must be un iqu e. If the ACL rule you are creatin g
or editing has the same deny or permit statement as another rule in the ACL, the rule will not be created
or changed.
You can edit ACL rules only when the match order is config.
• If you do not specify any optional keywords, the undo rule command deletes the entire rule.
• If you specify optional keywords or arguments, the undo rule command deletes the specified
attributes.
To view rules in an ACL and their rule IDs, use the display acl all command.
Examples
# Create a rule in IPv4 basic ACL 2000 to deny the packets from any source IP segment but 10.0.0.0/8,
rule-id: Specifies a rule ID in the range of 0 to 65534. If you do not specify a rule ID when creating an
ACL rule, the system automatically assigns it a rule ID. This rule ID is the nearest higher multiple of the
numbering step to the current highest rule ID, starting from 0. For example, if the rule numbering step is
5 and the current highest rule ID is 28, the rule is numbered 30.
deny: Denies matching packets.
permit: Allows matching packets to pass.
protocol: Specifies a protocol number in the range of 0 to 255, or specifies a protocol by its name, gre
(47), icmpv6 (58), ipv6, ipv6-ah (51), ipv6-esp (50), ospf (89), tcp (6), or udp (17) . Th e ipv6 keyword
specifies all protocols.
You can set the protocol argument to one of the values in Table 11 to
match packets with the
corresponding IPv6 extended header.
Table 11 Protocol values of IPv6 extended headers
Value of the
0 Hop-by-Hop Options Header.
43 Routing Header.
44 Fragment Header.
50 Encapsulating Security Payload Header.
51 Authentication Header.
rotoco
argument IPv6 extended header
60 Destination Options Header.
Table 12 describes the parameters that you can specify regardless of the value for the protocol argument.
26
Table 12 Match criteria and other rule information for IPv6 advanced ACL rules
p
Parameters Function Descri
source
{ source-address
source-prefix |
source-address/so
urce-prefix | any }
destination
{ dest-address
dest-prefix |
dest-address/destprefix | any }
counting
dscp dscp
Specifies a source IPv6
address.
Specifies a destination IPv6
address.
Counts the number of times
the IPv6 advanced ACL rule
has been matched.
Specifies a DSCP
preference.
The source-address and source-prefix arguments represent
an IPv6 source address, and prefix length in the range of 1
to 128.
The any keyword represents any IPv6 source address.
The dest-address and dest-prefix arguments represent a
destination IPv6 address, and prefix length in the range of
1 to 128.
The any keyword specifies any IPv6 destination address.
The counting keyword enables match counting specific to
rules, and the hardware-count keyword in the packet-filter ipv6 command enables match counting for all rules in an
ACL. If the counting keyword is not specified, matches for
the rule are not counted.
The dscp argument can be a number in the range of 0 to
63, or in words, af11 (10), af12 (12), af13 (14), af21
(18), af22 (20), af23 (22), af31 (26), af32 (28), af33
(30), af41 (34), af42 (36), af43 (38), cs1 (8), cs2 (16), cs3
(24), cs4 (32), cs5 (40), cs6 (48), cs7 (56), default (0), or
ef (46).
tion
flow-label
flow-label-value
fragment
logging Logs matching packets.
routing [ type
routing-type ]
hop-by-hop [ type
hop-type ]
time-range
time-range-name
Specifies a flow label value
in an IPv6 packet header.
Applies the rule only to
non-first fragments.
Specifies an IPv6 routing
header type.
Specifies an IPv6
Hop-by-Hop Options
header type.
Specifies a time range for
the rule.
The flow-label-value argument is in the range of 0 to
1048575.
If you do not specify this keyword, the rule applies to all
fragments and non-fragments.
This function requires that the module (for example, packet
filtering) that uses the ACL supports logging.
routing-type: Value of the IPv6 routing header type, in the
range of 0 to 255.
If you specify the type routing-type option, the rule applies
to the specified type of IPv6 routing header. Otherwise, the
rule applies to all types of IPv6 routing header.
hop-type: Value of the IPv6 Hop-by-Hop Options header
type, in the range of 0 to 255.
If you specify the type hop-type option, the rule applies to
the specified type of IPv6 Hop-by-Hop Options header.
Otherwise, the rule applies to all types of IPv6 Hop-by-Hop
Options header.
The time-range-name argument is a case-insensitive string
of 1 to 32 characters. It must start with an English letter. If
the time range is not configured, the system creates the
rule. However, the rule using the time range can take effect
only after you configure the timer range.
For more information about time range, see ACL and QoS Configuration Guide.
27
Parameters Function Description
p
p
The vpn-instance-name argument is a case-sensitive string
vpn-instance
vpn-instance-name
Applies the rule to a VPN
instance.
of 1 to 31 characters.
If you do not specify a VPN instance, the rule applies only
to non-VPN packets.
If the protocol argument is tcp (6) or udp (17), set the parameters shown in Table 13.
Table 13 TCP/UDP-specific parameters for IPv6 advanced ACL rules
UDP port numbers can be represented as: biff (512), bootpcbootps (67), discard (9), dns (53), dnsix (90), echo (7), mobilip-ag
(434), mobilip-mn (435), nameserver (42), netbios-dgm (138),
netbios-ns (137), netbios-ssn (139), ntp (123), rip (520), snmp
(161), snmptrap (162), sunrpc (111), syslog (514), tacacs-ds (65), talk (517), tftp (69), time (37), who (513), and xdmcp (177).
Parameters specific to TCP.
The value for each argument can be 0 (flag bit not set) or 1 (flag bit
set).
The TCP flags in a rule are ANDed. For example, a rule configured
with ack 0 psh 1 matches packets that have the ACK flag bit not set
and the PSH flag bit set.
tion
(68),
established
Specifies the flags for
indicating the
established status of a
TCP connection.
Parameter specific to TCP.
The rule matches TCP connection packets with the ACK or RST flag
bit set.
If the protocol argument is icmpv6 (58), set the parameters shown in Table 14.
Table 14 ICMPv6-specific parameters for IPv6 advanced ACL rules
Parameters Function Descri
The icmp6-type argument is in the range of 0 to 255.
If an ACL is for QoS traffic classification or packet filtering:
• Do not specify the fragment keyword.
• Do not specify neq for the operator argument.
• Do not specify the vpn-instance, routing, hop-by-hop, or flow-label keyword if the ACL is for
outbound QoS traffic classification or outbound packet filtering.
•Do not specify ipv6-ah for the protocol argument, nor set its value to 0, 43, 44, 51, or 60, if the ACL
is for outbound QoS traffic classification or outbound packet filtering.
If an ACL is to match information in the IPv6 packet payload, it can only match packets with one
extension header. It cannot match packets with two or more extension headers or with the Encapsulating
Security Payload Header.
Within an ACL, the permit or deny state ment of each ru le must be un iqu e. If the ACL rule you are creatin g
or editing has the same deny or permit statement as another rule in the ACL, the rule will not be created
or changed.
You can edit ACL rules only when the match order is config.
• If you do not specify any optional keywords, the undo rule command deletes the entire rule.
• If you specify optional keywords or arguments, the undo rule command deletes the specified
attributes.
To view rules in an ACL and their rule IDs, use the display acl ipv6 all command.
29
Examples
# Create an IPv6 advanced ACL rule to permit TCP packets with the destination port 80 from
2030:5060::/64 to FE80:5060::/96.
# Create IPv6 advanced ACL 3004, and configure two rules: one permits packets with the Hop-by-Hop
Options header type as 5, and the other one denies packets with other Hop-by-Hop Options header
types.
<Sysname> system-view
[Sysname] acl ipv6 number 3004
[Sysname-acl6-adv-3004] rule permit ipv6 hop-by-hop type 5
[Sysname-acl6-adv-3004] rule deny ipv6 hop-by-hop
Related commands
• acl
• acl logging interval
• display acl
• step
• time-range
rule (IPv6 basic ACL view)
Use rule to create or edit an IPv6 basic ACL rule.
Use undorule to delete an entire IPv6 basic ACL rule or some attributes in the rule.
rule-id: Specifies a rule ID in the range of 0 to 65534. If you do not specify a rule ID when creating an
ACL rule, the system automatically assigns it a rule ID. This rule ID is the nearest higher multiple of the
numbering step to the current highest rule ID, starting from 0. For example, if the rule numbering step is
5 and the current highest rule ID is 28, the rule is numbered 30.
deny: Denies matching packets.
permit: Allows matching packets to pass.
counting: Counts the number of times the IPv6 basic ACL rule has been matched. The counting keyword
enables match counting specific to rules, and the hardware-count keyword in the packet-filter ipv6
command enables match counting for all rules in an ACL. If the counting keyword is not specified,
matches for the rule are not counted.
fragment: Applies the rule only to non -first fragments. If you do not specify this keyword, the rule applies
to both fragments and non-fragments.
logging: Logs matching packets. This function is available only when the application module (for
example, packet filtering) that uses the ACL supports the logging function.
routing [ typerouting-type ]: Applies the rule to the specified type of routing header or all types of routing
header. The routing-type argument specifies the value of the routing header type, which is in the range
of 0 to 255. If you specify the type routing-type option, the rule applies to the specified type of routing
header. Otherwise, the rule applies to any type of routing header.
source { source-address source-prefix | source-address/source-prefix | any }: Matches a source IP
address. The ipv6-address and prefix-length arguments represent a source IPv6 address and address
prefix length in the range of 1 to 128. The any keyword represents any IPv6 source address.
time-rangetime-range-name: Specifies a time range for the rule. The time-range-name argument is a
case-insensitive string of 1 to 32 characters. It must start with an English letter. If the time range is not
configured, the system creates the rule. However, the rule using the time range can take effect only after
you configure the timer range. For more information about time range, see ACL and QoS Configuration Guide.
vpn-instance vpn-instance-name: Applies the rule to a VPN instance. The vpn-instance-name argument is
a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, the rule applies only
to non-VPN packets.
31
Usage guidelines
If an ACL is for QoS traffic classification or packet filtering:
• Do not specify the fragment keyword.
• Do not specify the vpn-instance or routing keyword if the ACL is for outbound QoS traffic
classification or outbound packet filtering.
Within an ACL, the permit or deny state ment of each ru le must be un iqu e. If the ACL rule you are creatin g
or editing has the same deny or permit statement as another rule in the ACL, the rule will not be created
or changed.
You can edit ACL rules only when the match order is config.
• If you do not specify any optional keywords, the undo rule command deletes the entire rule.
• If you specify optional keywords or arguments, the undo rule command deletes the specified
attributes.
To view rules in an ACL and their rule IDs, use the display acl ipv6 all command.
Examples
# Create an IPv6 basic ACL rule to deny the packets from any source IP segment but 1001::/16,
312 4 :1123::/32, or FE80:5060:1001::/48.
rule-id: Specifies a rule ID in the range of 0 to 65534. If you do not specify a rule ID when creating an
ACL rule, the system automatically assigns it a rule ID. This rule ID is the nearest higher multiple of the
numbering step to the current highest rule ID, starting from 0. For example, if the rule numbering step is
5 and the current highest rule ID is 28, the rule is numbered 30.
deny: Denies matching packets.
permit: Allows matching packets to pass.
l2: Specifies that the offset is relative to the beginning of the Layer 2 frame header.
rule-string: Defines a match pattern in hexadecimal format. Its length must be a multiple of two.
rule-mask: Defines a match pattern mask in hexadecimal format. Its length must be the same as that of the
match pattern. A match pattern mask is used for ANDing the selected string of a packet.
offset: Specifies an offset in bytes after which the match operation begins.
&<1-8>: Specifies that up to eight match patterns can be defined in the ACL rule.
counting: Counts the number of times the user-defined ACL rule has been matched. The counting
keyword enables match counting specific to rules, and the hardware-count keyword in the packet-filter
command enables match counting for all rules in an ACL. If the counting keyword is not specified,
matches for the rule are not counted.
time-rangetime-range-name: Specifies a time range for the rule. The time-range-name argument is a
case-insensitive string of 1 to 32 characters. It must start with an English letter. If the time range is not
configured, the system creates the rule. However, the rule using the time range can take effect only after
you configure the timer range. For more information about time range, see ACL and QoS Configuration Guide.
Usage guidelines
Within an ACL, the permit or deny state ment of each ru le must be un iqu e. If the ACL rule you are creatin g
or editing has the same deny or permit statement as another rule in the ACL, the rule will not be created
or changed.
To view rules in an ACL and their rule IDs, use the display acl all command.
Examples
# Create a rule for user-defined ACL 5005 to permit packets in which the 13th and 14th bytes starting
from the Layer 2 header are 0x0806 (the ARP packets).
Use rule comment to add a comment about an existing ACL rule or edit its comment to make the rule easy
to understand.
Use undo rule comment to delete an ACL rule comment.
Syntax
rule rule-id comment text
undo rule rule-id comment
Default
An ACL has not rule comment.
Views
IPv4/IPv6 basic ACL view
IPv4/IPv6 advanced ACL view
Ethernet frame header ACL view
User-defined ACL view
Predefined user roles
network-admin
Parameters
rule-id: Specifies an ACL rule ID in the range of 0 to 65534. The ACL rule must already exist.
text: Specifies a comment about the ACL rule, a case-sensitive string of 1 to 127 characters.
Examples
# Create a rule for IPv4 basic ACL 2000, and add a comment about the rule.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule 0 deny source 1.1.1.1 0
[Sysname-acl-basic-2000] rule 0 comment This rule is used for telnet.
Related commands
display acl
step
Use step to set a rule numbering step for an ACL.
Use undo step to restore the default.
Syntax
step step-value
Default
undo step
The rule numbering step is five.
34
Views
IPv4/IPv6 basic ACL view
IPv4/IPv6 advanced ACL view
Ethernet frame header ACL view
Predefined user roles
network-admin
Parameters
step-value: ACL rule numbering step in the range of 1 to 20.
Usage guidelines
The rule numbering step sets the increment by which the system numbers rules automatically. For example,
the default ACL rule numbering step is 5. If you do not assign IDs to rules you are creating, they are
numbered 0, 5, 10, 15, and so on. The wider the numbering step, the more rules you can insert between
two rules. Whenever the step changes, the rules are renumbered, starting from 0. For example, if there
are five rules numbered 5, 10, 13, 15, and 20, changing the step from 5 to 2 causes the rules to be
renumbered 0, 2, 4, 6, and 8.
Examples
# Set the rule numbering step to 2 for IPv4 basic ACL 2000.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] step 2
Related commands
display acl
35
QoS policy commands
Traffic class commands
display traffic classifier
Use display traffic classifier to display 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.
slotslot-number: Specifies an IRF member device by its member ID (slot number). If you do not specify an
IRF member device, this command displays traffic classes on all IRF member devices.
# 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-
36
Table 16 Command output
p
p
Field Descri
Classifier Traffic class name and its match criteria.
Operator
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
tion
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.
Traffic class view
Predefined user roles
network-admin
Parameters
match-criteria: Specifies a match criterion. Table 17 shows the available match criteria.
Table 17 Available match criteria
O
tion Description
acl [ ipv6 ] { acl-number | name
acl-name }
any Matches all packets.
control-plane protocol
protocol-name&<1-8>
Matches an ACL.
The acl-number argument has the following value ranges:
• 2000 to 3999 for IPv4 ACLs.
• 2000 to 3999 for IPv6 ACLs.
• 4000 to 4999 for Ethernet frame header ACLs.
• 5000 to 5999 for user-defined 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, the argument
cannot be all.
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 18.
37
p
tion Description
p
O
control-plane protocol-group
protocol-group-name
customer-dot1p
dot1p-value&<1-8>
customer-vlan-id vlan-id-list
destination-mac mac-addressMatches a destination MAC address.
dscp dscp-value&<1-8>
ip-precedence
ip-precedence-value&<1-8>
Matches a control plane protocol group.
The protocol-group-name argument can be critical, important, management, monitor, normal, or redirect.
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.
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-id1tovlan-id2. The value for vlan-id2 must be equal to or greater than
the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094.
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 20.
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.
protocol protocol-name
qos-local-id local-id-value
service-dot1p
dot1p-value&<1-8>
service-vlan-id vlan-id-list
source-mac mac-addressMatches a source MAC address.
Matches a protocol.
The protocol-name argument can be IP or IPv6.
Matches a local QoS ID in the range of 1 to 4095. The switch supports local
QoS IDs in the range of 1 to 3999.
Matches 802.1p priority values in outer VLAN tags.
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.
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-id1tovlan-id2. The value for vlan-id2 must be equal to or greater than
the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094.
Table 18 Available system-defined control plane protocols
Protocol Descri
arp ARP packets
arp-snooping ARP snooping packets
tion
bfd BFD packets
bgp BGP packets
38
Protocol Descri
p
bgp4+ IPv6 BGP packets
bpdu-tunnel BPDU tunnel packets
dhcp DHCP packets
dhcp-snooping DHCP snooping packets
dhcp6 IPv6 DHCP packets
dldp DLDP packets
dot1x 802.1X packets
mvrp MVRP packets (including GVRP packets)
hop limit expires ICMPv6 time exceeded packets
http HTTP packets
https HTTPS packets
icmp ICMP packets
icmp6 ICMP snooping packets
igmp IGMP packets
ip-option IPv4 packets with the Options field
tion
ipv6-option IPv6 packets with the Options field
isis IS-IS packets
lacp LACP packets
lldp LLDP packets
ospf-multicast OSPF multicast packets
ospf-unicast OSPF unicast packets
ospf3-multicast OSPFv3 multicast packets
ospf3-unicast OSPFv3 unicast packets
radius RADIUS packets
snmp SNMP packets
ssh SSH packets
stp STP packets
tacacs TACACS packets
telnet Telnet packets
ttl expires ICMP time exceeded packets
vrrp VRRP packets
vrrp6 IPv6 VRRP packets
Usage guidelines
When an ACL is referenced by a QoS policy for traffic classification, the action (permit or deny) in the
ACL is ignored, and the actions in the associated traffic behavior are performed.
39
If a class that uses the AND operator has multiple if-match acl, if-match acl ipv6, if-match customer-vlan-id or if-matchservice-vlan-id clauses, a packet that matches any of the clauses matches
the class.
To successfully execute the traffic behavior associated with a traffic class that uses the AND operator,
define only one if-match clause for any of the following match criteria, and enter only one value for any
of the following list arguments (for example, the 8021p-list argument):
• customer-dot1p 8021p-list.
• destination-mac mac-address.
• dscp dscp-list.
• ip-precedence ip-precedence-list.
• service-dot1p 8021p-list.
• source-mac mac-address.
• control-plane protocolprotocol-name.
To create multiple if-match clauses for these match criteria or specify multiple values for the list arguments,
specify the operator of the class as OR and use the if-match command multiple times.
If a match criterion includes the if-match control-plane protocol or if-match control-plane protocol-group
clause, the QoS policy that references this match criterion can be applied only to the control plane.
Defining an ACL-based match criterion
•If the ACL referenced in the if-match command does not exist, the relevant QoS policy cannot be
applied normally.
• You can configure multiple ACLs for a class.
• For a traffic class, you can reference an ACL twice by its name and number with the if-match
command, respectively.
Defining a criterion to match a destination MAC address
You can configure multiple destination MAC address match criteria for a traffic class.
Defining a criterion to match a source MAC address
You can configure multiple source MAC address match criteria for a traffic class.
Defining a criterion to match DSCP values
• You can configure multiple DSCP match criteria for a traffic class. All defined DSCP values are
automatically sorted in ascending order.
• To delete a criterion that matches DSCP values, the specified DSCP values must be identical with
those defined in the criterion (the sequence can be different).
Defining a criterion to match 802.1p priority values in inner or outer VLAN tags
• You can configure multiple 802.1p priority match criteria for a traffic class. All the defined 802.1p
values are automatically arranged in ascending order.
• To delete a criterion that matches 802.1p priority values, the specified 802.1p priority values in the
command must be identical with those defined in the criterion (the sequence can be different).
Defining a criterion to match IP precedence values
• You can configure multiple IP precedence match criteria for a traffic class. The defined IP
precedence values are automatically arranged in ascending order.
40
• To delete a criterion that matches IP precedence values, the specified IP precedence values in the
command must be identical with those defined in the criterion (the sequence can be different).
Defining a criterion to match VLAN IDs in inner or outer VLAN tags
• You can configure multiple VLAN ID match criteria for a traffic class. The defined VLAN IDs are
automatically arranged in ascending order.
• You can configure multiple VLAN IDs in one command line. If the same VLAN ID is specified
multiple times, the system considers the VLAN IDs as one. If a packet matches one of the defined
VLAN IDs, it matches the if-match clause.
• To delete a criterion that matches VLAN IDs, the specified VLAN IDs in the command must be
identical with those defined in the criterion (the sequence can be different).
• You can use the VLAN ID in the outer VLAN tag to match single-tagged packets.
Defining a criterion to match control plane protocols
• You can configure multiple control plane protocol match criteria for a traffic class.
• This criterion cannot coexist with other criteria in a traffic class. Otherwise, the relevant QoS policy
cannot be applied normally.
• You can configure multiple control plane protocols in one command line. If the same control plane
protocol is specified multiple times, the system considers them as one. If a packet matches one of the
defined control plane protocols, it matches the if-match clause.
• To delete a criterion that matches control plane protocols, the specified control plane protocols in
the command must be identical with those defined in the criterion (the sequence can be different).
Examples
# Define a match criterion for traffic class class1 to match the packets with their destination MAC
addresses being 0050-ba27-bed3.
Use car to configure a CAR action in a traffic behavior.
Use undo car to delete the action.
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
Views
No CAR action is configured.
Traffic behavior view
44
Predefined user roles
network-admin
Parameters
cir committed-information-rate: Specifies the committed information rate (CIR) in kbps, which specifies an
average traffic rate. The value range for the committed-information-rate argument is an integral multiple
of 8 between 8 and 160000000.
cbs committed-burst-size: Specifies the committed burst size (CBS) in bytes. The value range for the
committed-burst-size argument is an integral multiple of 512 between 512 and 256000000. The default
value for this argument is the product of 62.5 and the CIR and must be an integral multiple of 512. When
the product is not an integral multiple of 512, it is rounded up to the nearest integral multiple of 512. A
default value greater than 256000000 is converted to 256000000.
ebs excess-burst-size: Specifies the excess burst size (EBS) in bytes. The value range for the
excess-burst-size argument is an integral multiple of 512 between 0 and 256000000, and the default
value is 512.
pir peak-information-rate: Specifies the peak information rate (PIR) in kbps. The value range for the
peak-information-rate argument is an integral multiple of 8 between 8 and 160000000. If the PIR is
configured, two rates are used for traffic policing. Otherwise, one rate is used.
green action: Specifies the action to take on packets that conform to CIR. The default setting is pass.
red action: Specifies the action to take on the packet that conforms to neither CIR nor PIR. The default setting is discard.
yellow action: Action to take on packets that conform to PIR but not to CIR. The default setting is pass.
action: Sets the action to take on the packet:
• discard: Drops the packet.
• pass: Permits the packet to pass through.
• remark-dot1p-pass new-cos: Sets the 802.1p priority value of the 802.1p packet to new-cos and
permits the packet to pass through. The new-cos argument is in the range of 0 to 7.
•remark-dscp-pass new-dscp: Sets the DSCP value of the packet to new-dscp and permits the packet
to pass through. The new-dscp argument is in the range of 0 to 63.
•remark-lp-pass new-local-precedence: Sets the local precedence value of the packet to
new-local-precedence and permits the packet to pass through. The new-local-precedence argument
is in the range of 0 to 7.
Usage guidelines
A QoS policy that references the traffic behavior can be applied in either the inbound direction or
outbound direction of an interface.
If you configure the car command multiple times in the same traffic behavior, the most recent
configuration takes effect.
Examples
# Configure a CAR action in traffic behavior database as follows:
• 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
behavior-name: Specifies a traffic behavior by its name, a case-sensitive string of 1 to 31 characters. If
you do not specify a traffic behavior, this command displays all traffic behaviors.
Examples
slot slot-number: Specifies an IRF member device by its member ID (slot number). If you do not specify an
IRF member device, this command displays traffic behaviors on all IRF member devices.
# 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 128 (kbps), CBS 8192 (Bytes), EBS 512 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Behavior: 2 (ID 101)
Accounting enable: Packet
Filter enable: Permit
Marking:
Remark dot1p 4
Redirecting:
Redirect to the CPU
Behavior: 3 (ID 102)
-none-
46
Table 19 Command output
p
Field Descri
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.
CIR CIR in kbps, which specifies the average traffic rate.
CBS
EBS
Green action Action to take on green packets.
Yellow action Action to take on yellow packets.
Red action Action to take on red packets.
Accounting enable Traffic accounting action.
Filter enable Traffic filtering action.
None No other traffic behavior is configured.
CBS in bytes, which specifies the amount of bursty traffic allowed at a
time.
EBS in bytes, which specifies the amount of traffic exceeding CBS when
two token buckets are used.
tion
filter
Use filter to configure a traffic filtering action in a traffic behavior.
Use undo filter to delete the action.
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 the packets.
Examples
# Configure a traffic filtering action as deny in traffic behavior database.
Use redirect to configure a traffic redirecting action in the traffic behavior.
Use undo redirect to delete action.
Syntax
redirect { cpu | interface interface-type interface-number }
undo redirect { cpu | interface interface-type interface-number }
Default
Views
No traffic redirecting action is configured.
Traffic behavior view
48
Predefined user roles
network-admin
Parameters
cpu: Redirects traffic to the CPU.
interface: Redirects traffic to an interface.
interface-type interface-number: Specifies an interface by its type and number.
Usage guidelines
Redirecting traffic to the CPU and redirecting traffic to an interface are mutually exclusive with each other
in the same traffic behavior. The most recently configured redirecting action takes effect.
Examples
# Configure redirecting traffic to FortyGigE 1/1/1 in traffic behavior database.
Use remark dot1p to configure an 802.1p priority marking action or an inner-to-outer tag priority
copying action in a traffic behavior..
Use undo remark dot1p to delete the action.
Syntax
remark [ green | red | yellow ] dot1p dot1p-value
undo remark [ green | red | yellow ] dot1p
remark dot1p customer-dot1p-trust
undo remark dot1p
Default
No 802.1p priority marking action or inner-to-outer tag priority copying action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
green: Specifies green packets.
red: Specifies red packets.
yellow: Specifies yellow packets.
dot1p-value: Specifies the 802.1p priority to be marked for packets, in the range of 0 to 7.
customer-dot1p-trust: Copies the 802.1p priority value in the inner VLAN tag to the outer VLAN tag after
the QoS policy is applied to an interface.
Usage guidelines
The remark dot1p dot1p-value and remark dot1p customer-dot1p-trust commands are mutually
exclusive. The most recent configuration of them takes effect.
The remark dot1p customer-dot1p-trust command does not take effect on single-tagged packets.
Examples
# Configure traffic behavior database to mark matching traffic with 802.1p 2.
Use remark qos-local-id to configure a local QoS ID marking action in a traffic behavior.
Use undo remark qos-local-id to delete the action.
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. The value range for this argument is
1 to 4095. The switch supports local QoS IDs in the range of 1 to 3999.
Usage guidelines
Remarking local QoS IDs combines different traffic classes into one new class, which is indicated by a
local QoS ID. You can configure a traffic behavior for this new class to implement two levels of actions
on a traffic class.
Remarking local QoS IDs applies only to the incoming traffic.
Examples
# Configure the action of marking packet with local QoS ID 2.
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 dcbx: Specifies that the class-behavior association applies only to DCBX. For more information
about DCBX, see Layer 2—LAN Switching Configuration Guide.
insert-beforebefore-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-beforebefore-classifier-name option, the new
traffic class is placed at the end of the QoS policy.
Usage guidelines
A traffic class can be associated with only 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.
You cannot change the position of an existing traffic class in a QoS policy.
Examples
# Associate traffic class database with traffic behavior test in QoS policy user1.
# Associate the traffic class database with the traffic behavior test in the QoS policy user1, and insert the
traffic class database before an existing traffic class class-a.
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.
slotslot-number: Specifies an IRF member device by its member ID (slot number). If you do not specify an
IRF member device, this command displays QoS policies on all IRF member devices.
Examples
# Display all user-defined QoS policies.
57
<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 128 (kbps), CBS 8192 (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 dot1p 4
Classifier: 3 (ID 102)
Behavior: 3
-none-
display qos policy control-plane
Use display qos policy control-plane to display the QoS policy 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 an IRF member device by its member ID (slot number).
Examples
# Display the QoS policy applied to the control plane of IRF member device 1.
inbound: Displays the inbound global QoS policy. An inbound global QoS policy applies to the
incoming traffic globally.
outbound: Displays the outbound global QoS policy. An outbound global QoS policy applies to the
outgoing traffic globally.
slot slot-number: Specifies an IRF member device by its member ID (slot number). If you do not specify an
IRF member device, this command displays global QoS policies on the master device.
Usage guidelines
If you do not specify a direction, this command displays both inbound and outbound global QoS
policies.
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an
interface, this command displays priority trust mode and port priority information of all interfaces.
Examples
# Display the priority trust mode and port priority information of FortyGigE 1/1/1.
<Sysname> display qos trust interface FortyGigE 1/1/1
Interface: FortyGigE1/1/1
Port priority information
Port priority: 0
Port priority trust type: none
Table 28 Command output
Field Descri
Interface Interface type and interface number.
Port priority Port priority set for the interface.
tion
Port priority trust type
Priority trust mode on the interface: dot1p, dscp, or none. If the trust mode is
none, the port priority is used for priority mapping.
qos trust
Use qos trust to configure the priority trust mode for an interface.
74
Use undo qos trust to restore the default priority trust mode.
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an
interface, this command displays the GTS configuration of all interfaces.
Examples
# Display the GTS configuration of all interfaces.
queue queue-id: Specifies a queue by its ID in the range of 0 to 7.
cir committed-information-rate: Specifies the CIR in kbps. The value range for the
committed-information-rate argument is 8 to 41943040 for 40-GE interfaces, in integral multiples of 8.
cbs committed-burst-size: Specifies the CBS in bytes. The value range for the committed-burst-size
argument is an integral multiple of 512 between 512 and 16777216. The default value for this argument
is the product of 62.5 and the CIR and must be an integral mult iple of 512. If the product is not an integ ral
multiple of 512, it is rounded up to the nearest integral multiple of 512.
Examples
# Shape the packets in queue 1 on FortyGigE 1/1/1. The GTS parameters are as follows: CIR is 6400
kbps and CBS is 51200 bytes.
Use display qos lr interface to display the rate limit configuration of interfaces.
Syntax
display qos lr interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
77
p
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 configuration of all interfaces.
Examples
# Display the rate limit configuration of all interfaces.
<Sysname> display qos lr interface
Interface: FortyGigE1/1/1
Direction: Outbound
CIR 12800 (kbps), CBS 800256 (Bytes)
Interface: FortyGigE1/1/2
Direction: Outbound
CIR 25600 (kbps), CBS 1600000 (Bytes)
Table 30 Command output
qos lr
Syntax
Default
Views
Field Descri
Interface Interface type and interface number.
Direction Direction to which the rate limit configuration is applied: inbound or outbound.
CIR CIR in kbps, which specifies the average traffic rate.
CBS CBS in bytes, which specifies the amount of bursty traffic allowed at a time.
tion
Use qos lr to limit the rate of packets on an interface.
Use undo qos lr to remove rate limit settings on an interface.
qos lr { inbound | outbound } cir committed-information-rate [ cbs committed-burst-size ]
inbound: Limits the rate of incoming packets on the interface.
outbound: Limits the rate of outgoing packets on the interface.
cir committed-information-rate: Specifies the CIR in kbps. The value range for the
committed-information-rate argument is 8 to 41943040 for 40-GE interfaces, in integral multiples of 8.
78
Examples
cbs committed-burst-size: Specifies the CBS in bytes. The value range for the committed-burst-size
argument is an inte gral multiple of 512 between 512 and 134217728. The default value for this argument
is the product of 62.5 and the CIR and must be an integral mult iple of 512. If the product is not an integ ral
multiple of 512, it is rounded up to the nearest integral multiple of 512.
# Limit the rate of outgoing packets on FortyGigE 1/1/1, with CIR 25600 kbps and CBS 512000 bytes.
<Sysname> system-view
[Sysname] interface FortyGigE 1/1/1
[Sysname-FortyGigE1/1/1] qos lr outbound cir 25600 cbs 512000
79
p
Congestion management commands
SP commands
display qos queue sp interface
Use display qos queue sp interface to display the SP queuing configuration of an interface.
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an
interface, this command displays the SP queuing configuration of all the interfaces.
Examples
# Display the SP queuing configuration of FortyGigE 1/1/1.
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an
interface, this command displays the WRR queuing configuration of all the interfaces.
Examples
# Display the WRR queuing configuration of FortyGigE 1/1/1.
<Sysname> display qos queue wrr interface FortyGigE 1/1/1
Interface: FortyGigE1/1/1
Output queue: Weighted Round Robin queuing
Queue ID Group Byte-count
An interface uses the byte-count WRR queuing algorithm, and queues 0 through 7 are in WRR group 1,
with their weights of 1, 2, 3, 4, 5, 9, 13, and 15, respectively.
queue-id: Specifies a queue by its ID. The value is an integer in the range of 0 to 7 or a keyword listed
in Table 33.
gr
oup { 1 | 2 }: Specifies WRR group 1 or 2. If you do not specify a group, group 1 applies.
byte-count: Allocates bandwidth to queues in terms of bytes.
weight: Allocates bandwidth to queues in terms of packets.
schedule-value: Specifies a scheduling weight for the specified queue in WRR queuing, in the range of
1 to 15.
Usage guidelines
You must use the qos wrr command to enable WRR queuing before you can configure WRR queuing
parameters for a queue on an interface.
The queue-id argument can be either a number or a keyword. Table 33 sh
Table 33 The number-keyword map for the
queue-id
ows the number-keyword map.
argument
Number Ke
0 be
1 af1
2 af2
word
83
Number Keyword
3 af3
4 af4
5 ef
6 cs6
7 cs7
Examples
# Enable byte-count WRR queui ng on FortyGigE 1/1/ 1, assign queue 0, with the scheduli ng weight 10,
to WRR group 1, and assign queue 1, with the scheduling weight 5, to WRR group 2.
queue-id: Specifies a queue by its ID. The value is an integer in the range of 0 to 7 or a keyword listed
in Table 33.
sp: As
signs a queue to the SP group, which uses the SP queue scheduling algorithm.
Usage guidelines
You must use the qos wrr command to enable WRR queuing before you can configure this command on
an interface.
84
This command is available only on a WRR-enabled interface. Queues in the SP group are scheduled with
SP. The SP group has higher scheduling priority than the WRR group. Queues in a WRR group are
scheduled according to user-configured weights, and WRR groups are scheduled at a 1:1 ratio.
Examples
# Enable packet-based WRR queuing on FortyGigE 1/1/1, and assign queue 0 to the SP group.
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an
interface, this command displays the WFQ configuration of all the interfaces.
Examples
# Display the WFQ configuration of FortyGigE 1/1/1.
queue-id: Specifies a queue by its ID. The value is an integer in the range of 0 to 7 or a keyword listed
in Table 33.
gr
oup { 1 | 2 }: Specifies WFQ group 1 or 2. If you do not specify a group, group 1 applies.
byte-count: Allocates bandwidth to queues in terms of bytes.
weight: Allocates bandwidth to queues in terms of packets.
schedule-value: Specifies a scheduling weight for the specified queue in WFQ queuing, in the range of
1 to 15.
Usage guidelines
You must use the qos wfq command to enable WFQ first before you configure this command.
Examples
# Enable byte-count WFQ on interface FortyGigE 1/1/1, assign queue 0, with the scheduling weight 10,
to WFQ group 1, and assign queue 1, with the scheduling weight 5, to WFQ group 2.
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.
90
p
Examples
slot slot-number: Specifies an IRF member device. The slot-number argument represents the ID of the IRF
member device. If you do not specify an IRF member device, this command displays the configuration of
queue scheduling profiles on the master.
# Display the configuration of the queue scheduling profile myprofile.
<Sysname> display qos qmprofile configuration myprofile
Queue management profile: myprofile (ID 1)
Queue ID Type Group Schedule-unit Schedule-value Bandwidth
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.
Examples
# Display the queue scheduling profile applied to FortyGigE 1/1/1.
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.
Examples
# Display queue-based outgoing traffic statistics for FortyGigE 1/1/1.