rule [ rule-id ] { deny | permit } ipv6-ah [ destination { destination-ipv6-address prefix-length | destination-ipv6-address/prefix-length | destination-ipv6-address postfix postfix-length | any } | dscp dscp | fragment | logging | precedence precedence | source { source-ipv6-address prefix-length | source-ipv6-address/prefix-length | source-ipv6-address postfix postfix-length | any } | time-range time-name | tos tos | vpn-instance vpn-instance-name ] *
rule [ rule-id ] { deny | permit } ipv6-esp [ destination { destination-ipv6-address prefix-length | destination-ipv6-address/prefix-length | destination-ipv6-address postfix postfix-length | any } | dscp dscp | fragment | logging | precedence precedence | source { source-ipv6-address prefix-length | source-ipv6-address/prefix-length | source-ipv6-address postfix postfix-length | any } | time-range time-name | tos tos | vpn-instance vpn-instance-name ] *
Parameter |
Description |
Value |
---|---|---|
rule-id |
Indicates the ID of an ACL6 rule. |
The value ranges from 0 to 2047.
|
deny |
Discards packets that do not match ACL rules. |
- |
permit |
Allows packets to pass. |
- |
ipv6-ah |
Indicates the protocol type. |
- |
ipv6-esp |
Indicates the protocol type. |
- |
destination { destination-ipv6-address prefix-length | destination-ipv6-address/prefix-length | any } | Indicates the destination address and prefix of a packet. | destination-ipv6-address is expressed in hexadecimal notation. The value of prefix-length is an integer that ranges from 1 to 128. You can also use any to represent any destination address. |
destination destination-ipv6-address postfix postfix-length | Indicates the destination address and the length of destination address postfix. | destination-ipv6-address indicates the destination address and is expressed in hexadecimal notation. postfix-length is an integer that ranges from 1 to 64. |
dscp dscp |
Specifies the value of a Differentiated Services CodePoint (DSCP). |
The value ranges from 0 to 63. |
fragment |
Indicates that the rule is valid for only non-initial fragments. |
- |
logging |
Indicates whether to record logs for packets that meet ACL rules. |
Log contents include the ACL rule ID, pass or discard of packets, type of the protocol over IP, source or destination address, source or destination port number, and number of packets. |
precedence precedence |
Filters packets by priority. |
The value is a name or a digit that ranges from 0 to 7. |
source { source-ipv6-address prefix-length | source-ipv6-address/prefix-length | any } | Indicates the source address and prefix of a packet. | source-ipv6-address indicates the source address and is expressed in hexadecimal notation. prefix-length is an integer that ranges from 1 to 128. You can also use any to represent any source address. |
source source-ipv6-address postfix postfix-length | Indicates the source address and the length of source address postfix. | source-ipv6-address indicates the source address and is expressed in hexadecimal notation. postfix-length is an integer that ranges from 1 to 64. |
time-range time-name |
Specifies the time range only in which ACL6 rules are effective. time-name indicates the name of the time range. |
The value is a string of 1 to 32 characters. |
tos tos |
Filters packets by Type of Service (ToS). |
The value is a name or a digit that ranges from 0 to 15. |
vpn-instance vpn-instance-name | Specifies the name of a VPN instance. | The vpn-instance must already exist. |
Usage Scenario
Advanced ACL6s classify data packets based on the source IP address, destination IP address, source port number, destination port number, and protocol type.
Prerequisites
An ACL6 has been created before the rule is configured.
Precautions
If the specified rule ID already exists and the new rule conflicts with the original rule, the new rule replaces the original rule.
To modify an existing rule, delete the old rule, and then create a new rule. Otherwise, the configuration result may be incorrect.
When you use the undo rule command to delete an ACL6 rule, the rule ID must exist. If the rule ID is unknown, you can use the display acl ipv6 command to view the rule ID.
The undo rule command deletes an ACL6 rule even if the ACL6 rule is referenced. Exercise caution when you run the undo rule command.