What is an Access Control List (ACL) in Networking?
An Access Control List (ACL) in networking is a set of rules used to control network traffic and reduce network attacks. These rules are applied to routers and switches to filter incoming and outgoing traffic. ACLs define which packets are allowed or denied, based on criteria such as source and destination IP addresses, port numbers, and protocols.
How Access Control List (ACL) Work
ACLs operate at different layers of the OSI model, mainly at the Network Layer (Layer 3) and Transport Layer (Layer 4). The rules in an ACL are processed sequentially from top to bottom, and the first match determines whether the packet is allowed or denied. If no match is found, the default action (usually to deny the packet) is applied.
Types of Access Control List (ACL)
- Standard ACL:
- These filter traffic based on source IP addresses only. They are simpler and usually applied close to the destination.
- Extended ACL:
- These filter traffic based on both source and destination IP addresses, port numbers, and protocols. They provide more granular control and are typically applied close to the source.
- Named ACL:
- These can be either standard or extended and are identified by names rather than numbers, making them easier to manage and read.
Example of Access Control List (ACL)
Standard ACL Example
Consider a scenario where we want to allow traffic from a specific network (192.168.1.0/24) and deny all other traffic.
- Define the ACL:
access-list 10 permit 192.168.1.0 0.0.0.255
access-list 10 deny any
- Apply the ACL to an interface:
interface GigabitEthernet0/1 ip access-group 10 in
In this example:
- access-list 10 permit 192.168.1.0 0.0.0.255: Allows traffic from the network 192.168.1.0/24.
- access-list 10 deny any: Denies all other traffic.
Extended Named ACL Example
If you need to create an extended named ACL to filter traffic based on source and destination IP addresses, protocols, or ports, here’s an example:
Step 1: Create an Extended Named ACL
Router(config)# ip access-list extended FILTER_TRAFFIC
Step 2: Add Rules to the ACL
Router(config-ext-nacl)# permit tcp 192.168.1.0 0.0.0.255 any eq 80
Router(config-ext-nacl)# permit udp 192.168.2.0 0.0.0.255 any eq 53
Router(config-ext-nacl)# deny ip any any
Router(config-ext-nacl)# exit
Step 3: Apply the ACL to an Interface
Router(config)# interface GigabitEthernet0/1
Router(config-if)# ip access-group FILTER_TRAFFIC in
Router(config-if)# exit
Explanation
- Create an Extended Named ACL:
- ip access-list extended FILTER_TRAFFIC: Creates a named extended ACL called FILTER_TRAFFIC.
- Add Rules to the ACL:
- permit tcp 192.168.1.0 0.0.0.255 any eq 80: Permits TCP traffic from the 192.168.1.0/24 subnet to any destination on port 80 (HTTP).
- permit udp 192.168.2.0 0.0.0.255 any eq 53: Permits UDP traffic from the 192.168.2.0/24 subnet to any destination on port 53 (DNS).
- deny ip any any: Denies all other IP traffic.
- Apply the ACL to an Interface:
- interface GigabitEthernet0/1: Specifies the interface to which the ACL will be applied.
- ip access-group FILTER_TRAFFIC in: Applies the FILTER_TRAFFIC ACL to inbound traffic on the specified interface.
These examples should give you a good starting point for creating and applying named ACLs on a Cisco router.
Example of a Named ACL
Step 1: Create a Named ACL
Router(config)# ip access-list standard ALLOW_INTERNAL
Step 2: Add Rules to the ACL
Router(config-std-nacl)# permit 192.168.1.0 0.0.0.255
Router(config-std-nacl)# permit 192.168.2.0 0.0.0.255
Router(config-std-nacl)# deny any
Router(config-std-nacl)# exit
Step 3: Apply the ACL to an Interface
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip access-group ALLOW_INTERNAL in
Router(config-if)# exit
Explanation
- Create a Named ACL:
- ip access-list standard ALLOW_INTERNAL: Creates a named standard ACL called ALLOW_INTERNAL.
- Add Rules to the ACL:
- permit 192.168.1.0 0.0.0.255: Permits traffic from the 192.168.1.0/24 subnet.
- permit 192.168.2.0 0.0.0.255: Permits traffic from the 192.168.2.0/24 subnet.
- deny any: Denies all other traffic.
- Apply the ACL to an Interface:
- interface GigabitEthernet0/0: Specifies the interface to which the ACL will be applied.
- ip access-group ALLOW_INTERNAL in: Applies the ALLOW_INTERNAL ACL to inbound traffic on the specified interface.
Advantages of Access Control List (ACL)
- Enhanced Security:
- ACLs provide a way to enforce security policies by allowing or denying traffic based on predefined rules. This helps protect the network from unauthorized access and attacks.
- Traffic Control:
- ACLs can be used to manage and control network traffic, ensuring that only legitimate traffic is allowed, which can help optimize network performance.
- Flexibility:
- With extended ACLs, administrators can define complex rules based on multiple criteria, such as IP addresses, port numbers, and protocols, providing granular control over traffic.
- Cost-Effective:
- Implementing ACLs on existing routers and switches is a cost-effective way to enhance network security without the need for additional hardware.
Disadvantages of Access Control List (ACL)
- Complexity:
- Managing ACLs can become complex, especially in large networks with many rules. This complexity can lead to configuration errors and difficulties in troubleshooting.
- Performance Impact:
- ACLs can impact the performance of network devices, particularly if there are a large number of rules to process. Each packet must be compared against the ACL entries, which can add latency.
- Limited Scope:
- ACLs are primarily designed for layer 3 and layer 4 filtering. They are less effective at higher layers of the OSI model, such as application layer filtering, which may require more advanced security measures.
- Static Nature:
- ACLs are static and do not adapt to changing network conditions or threats. Dynamic security measures, such as firewalls with adaptive security policies, are often required to provide comprehensive protection.

Summary
Access Control List (ACL) are essential tools in network management and security. They provide a mechanism to filter and control network traffic based on IP addresses, port numbers, and protocols. By defining rules that permit or deny traffic, ACLs help enhance network security, manage traffic flow, and protect against unauthorized access and attacks.
There are different types of ACLs, including standard, extended, and named ACLs, each offering varying levels of control and flexibility. While ACLs offer significant advantages, such as enhanced security and traffic control, they also come with challenges like complexity, performance impact, and limited scope.
In summary, ACLs are a fundamental component of network security strategies. However, they should be used in conjunction with other security measures to ensure comprehensive protection. Proper management and regular review of ACL rules are essential to maintain an effective and secure network environment.
Useful Links
https://www.cisco.com/c/en/us/support/docs/security/ios-firewall/23602-confaccesslists.html
https://sanchitgurukul.com/tutorials-cat
