30
Description
Use the
rule comment
command to configure a description for an existing ACL rule or edit its description
for easy identification.
Use the
undo rule comment
command to delete the ACL rule description.
By default, an IPv4 ACL rule has no rule description.
Related commands:
display acl
and
display acl ipv6
.
Examples
# Create a rule in IPv4 basic ACL 2000 and configure a description for this 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 on GigabitEthernet 1/0/1.
# Create a rule in IPv6 basic ACL 2000 and configure a description for this rule.
<Sysname> system-view
[Sysname] acl ipv6 number 2000
[Sysname-acl6-basic-2000] rule 0 permit source 1001::1 128
[Sysname-acl6-basic-2000] rule 0 comment This rule is used on GigabitEthernet 1/0/1.
rule remark
Syntax
rule
[
rule-id
]
remark
text
undo
rule
[
rule-id
]
remark
[
text
]
View
IPv4 basic/advanced ACL view, IPv6 basic/advanced ACL view, Ethernet frame header ACL view
Default level
2: System level
Parameters
rule-id
: Specifies a rule ID for the remark, in the range 0 to 65534. The rule ID determines the position
of the remark. If no rule ID is provided, the system automatically assigns a rule ID. This rule ID takes the
nearest higher multiple of the numbering step to the current highest rule ID. For example, if the rule
numbering step is 5 and the current highest rule ID is 28, the remark is numbered 30.
text
: Types a remark, a case sensitive string of 1 to 63 characters.
Description
Use the
rule remark
command to configure the start or end remark for a set of consecutive rules.
Use the
undo rule remark
command to delete the specified remark. If no rule ID is specified, all remarks
are removed.
By default, no remarks are configured.
Examples
# Display the rules in ACL 2000.
<Sysname> system-view