An advanced ACL is an extension of a basic ACL. An advanced ACL filters traffic by source IP address, destination IP address, time range, and protocol type. An advanced ACL is used for accurate traffic matching.
Table 1 describes the matching conditions of advanced ACL rules.
Matching Condition |
Parameter |
Description |
|---|---|---|
Protocol type |
protocol | You can specify a protocol using either of the following parameters:
|
Source/Destination IP address |
source or destination |
|
| TCP/UDP port range | source-port or destination-port | Specify the port range by the operator expression. operator supported comparison operations include eq (equal to), gt (greater than), lt (lower than), and range (between). If the operator is range, two port numbers are used. |
ICMP Type |
icmp-type | You can specify an ICMP message type using either of the following parameters:
|
| Time range | time-range |
For details of time ranges, see Schedule. |
| Service | service-set |
For details of services, see Service and Service Group. |
| Precedence field value in a packet | precedence |
The precedence field in an IP packet header marks the forwarding priority of the packet and is widely applied to quality of service (QoS). The precedence value can be in either of the following formats:
|
| ToS field value in a packet | tos |
The ToS field in an IP packet header marks the service type of the packet and is widely applied to QoS. The tos value can be in either of the following formats:
|
| Differentiated Services CodePoint field value in a packet | dscp |
DSCP is stored in the first six bits of the ToS field in an IP packet. During packet transmission, an intermediate device can grant different processing priorities to packets based on DSCP values, ensuring that important packets are prioritized when the network is busy. The value can be an integer or a string. That is, the value can be an integer ranging from 0 to 63, or a character string, which can be AF11, AF12, AF13, AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43, CS1, CS2, CS3, CS4, CS5, CS6, CS7, EF, or default. |
TCP flag bit |
tcp-flag | You can specify the TCP flag bit to perform access control over corresponding traffic. In this way, you can implement TCP flag bit-based QoS. Three ways are available:
|
acl [ number ] acl-number [ vpn-instance vpn-instance-name ]
acl-number determines the type of an ACL. The advanced ACL number ranges from 3000 to 3999.
description description
Appropriate descriptions of ACLs help you to further manage the ACLs.
step step
The default step is 5.
After you set a step for the ACL, the system can automatically assign rule IDs if you do not specify the rule IDs. The automatically assigned rule IDs are multiple of the step in ascending order. The step allows you to insert rules between two rules.
You can set a step for an ACL only when no rule is configured for the ACL. After you configure an ACL rule, you are not allowed to change the step.
Run the rule [ rule-id ] { permit | deny } protocol [ source { source-ip-address { 0 | source-wildcard } | address-set address-set-name | any } | destination { destination-ip-address { 0 | destination-wildcard } | address-set address-set-name | any } | source-port operator port [ port2 ] | destination-port operator port [ port2 ] | icmp-type { icmp-type-name | icmp-type-number icmp-code } | precedence precedence | tos tos | time-range time-name | logging | dscp dscp-value | tcp-flag { tcp-flag [ mask mask-value ] | established | { ack | fin | psh | rst | syn | urg } * } ] * [ description description ] command to configure an advanced ACL rule with specified protocol information.
The parameters vary according to protocol. You can select tcp-flag only when TCP is selected, select source-port and destination-port only when TCP/UDP is selected, and select icmp-type only when ICMP is selected.