Command Manual – ACL
Quidway S3900 Series Ethernet Switches-Release 1510 Chapter 1 ACL Commands
Huawei Technologies Proprietary
1-8
rule-id: Rule ID, which must the ID of an existing ACL rule. If no other arguments are
specified, the system will completely delete this ACL rule. If any argument is given, the
system will delete only the specified information of the ACL rule.
fragment: Deletes the settings effective for non-initial fragment packets in the rule
corresponding to the rule ID.
source: Deletes the settings of the source address part in the rule corresponding to
the rule ID.
time-range: Deletes the time range settings in the rule corresponding to the rule ID.
Description
Use the rule command to define an ACL rule.
Use the undo rule command to delete an ACL rule or the attribute information of an
ACL rule.
Before you can delete a rule, you need to specify the rule ID. If you do not know the
rule ID, you can view it by the display acl command.
In the case that you specify the rule ID when defining a rule:
z If the rule corresponding to the specified rule ID already exists, you will edit the
rule, and the modified part in the rule will replace the original content, while other
parts remain unchanged.
z If the rule corresponding to the specified rule ID does not exists, you will create
and define a new rule.
z The content of a modified or created rule must not be identical with the content of
any existing rule; otherwise the rule modification or creation will fail, and the
system will prompt that the rule already exists.
If you do not specify a rule ID, you will create and define a new rule, and the system
will assign an ID for the rule automatically.
Example
# Define a rule to deny the packets whose source IP addresses are 1.1.1.1.
<Quidway> system-view
System View: return to User View with Ctrl+Z.
[Quidway] acl number 2000
[Quidway-acl-basic-2000] rule deny source 1.1.1.1 0
1.1.8 rule (Advanced ACL)
Syntax
rule [ rule-id ] { permit | deny } rule-string
undo rule rule-id [ destination ] [ destination-port ] [ dscp ] [ fragment ]
[ icmp-type ] [ precedence ] [ source ] [ source-port ] [ time-range ] [ tos ]