Rule (For User-Defined Acls) - H3C s3600 series Command Manual

Hide thumbs Also See for s3600 series:
Table of Contents

Advertisement

Description
Use the rule command to define an ACL rule.
Use the undo rule command to remove an ACL rule.
To remove an ACL rule using the undo rule command, you need to provide the ID of the ACL rule. You
can obtain the ID of an ACL rule by using the display acl command.
Note that:
You can modify any existent rule of the Layer 2 ACL and the unmodified part of the ACL remains.
If you do not specify the rule-id argument when creating an ACL rule, the rule will be numbered
automatically. If the ACL has no rules, the rule is numbered 0; otherwise, the number of the rule will
be the greatest rule number plus one. If the current greatest rule number is 65534, however, the
system will display an error message and you need to specify a number for the rule.
The content of a modified or created rule cannot be identical with the content of any existing rules;
otherwise the rule modification or creation will fail, and the system prompts that the rule already
exists.
Examples
# Create Layer 2 ACL 4000 and define rule 1 to deny packets that are sourced from MAC address
000d-88f5-97ed, destined for MAC address 0011-4301-991e, and using the 802.1p priority of 3.
<Sysname> system-view
[Sysname] acl number 4000
[Sysname-acl-ethernetframe-4000] rule 1 deny cos 3 source 000d-88f5-97ed ffff-ffff-ffff dest
0011-4301-991e ffff-ffff-ffff
[Sysname-acl-ethernetframe-4000] quit
# Create Layer 2 ACL 4001 and define rule 1 to permit packets whose inner VLAN IDs are in the range
2 to 10.
[Sysname] acl number 4001
[Sysname-acl-ethernetframe-4001] rule 1 permit c-tag-vlan 2 to 10
After completing the above configuration, you can use the display acl command to view the
configuration information of the ACLs.

rule (for user-defined ACLs)

Syntax
rule [ rule-id ] { deny | permit } [ rule-string rule-mask offset ] &<1-8> [ time-range time-name ]
undo rule rule-id
View
User-defined ACL view
Parameters
rule-id: ID of an ACL rule, in the range of 0 to 65534.
rule-string: User-defined ACL rule string. It must be an even hexadecimal number comprising 2 to 160
hexadecimal numerals.
1-20

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents