ACL Fundamentals
An ACL manages all configured rules and provides the algorithm for matching packets.
ACL Rule Management
An ACL can contain multiple rules, each identified by a rule ID that can be set by a user or automatically generated based on the configured increment between ACL rule IDs. All rules in an ACL are arranged in ascending order of rule IDs.
As mentioned above, there is an increment that can be configured between automatically generated rule IDs. For example, if this is set to 5, rules that are automatically generated are numbered 5, 10, 15, and so on. If an ACL increment is set to 2, the system automatically generates rule IDs starting from 2. This increment makes it possible to add a new rule between existing rules.
ACL Rule Matching
When a packet reaches a device, the device retrieves information from the packet and matches it against conditions of all ACL rules. The first match determines whether the packet is permitted or denied, and then the device stops matching. If no match is found, the device does not process the packet.
ACL rules can be classified into permit rules and deny rules.
- Packets matching a permit rule
- Packets matching a deny rule
- Packets that do not match any rules
Different features process the three types of packets in different ways. For details, see licensing requirements and limitations of feature manuals.
ACL Implementations
The device supports two ACL implementations:
- Software-based ACL: applied to the interactive protocol packets sent to the local device, for example, FTP, TFTP, Telnet, SNMP, HTTP, routing, and multicast protocol packets. These packets must be sent to the CPU.
- Hardware-based ACL: applied to all packets (especially the forwarded data packets), for example, the ACLs referenced by traffic policy and ACL-based simplified traffic policy.
The differences between the two implementations are as follows:
- They filter different types of packets. Software-based ACL filters the packets to be sent to the CPU, whereas hardware-based ACL filters all packets (it is generally applied to data packets).
- They filter packets in different ways. Software-based ACL is referenced by upper-layer software and consumes CPU resources, whereas hardware-based ACL is delivered to hardware for packet filtering and consumes hardware resources. Hardware-based ACL provides faster packet filtering.