5.6 Configure and verify access control lists (ACLs)
CCNA 200-301 v1.1 · 5.0 Security Fundamentals
An access control list is an ordered list of permit and deny statements. Applied to an interface, it filters packets; used elsewhere, it identifies traffic for NAT, VTY access, QoS or routing. For the CCNA you write standard and extended, numbered and named ACLs, place them in the right spot, and read the hit counters.
What you must know
- Explain top-down processing, the first match and the implicit deny at the end.
- Write a standard ACL (source only) and an extended ACL (protocol, source, destination, ports).
- Use wildcard masks,
hostandany. - Apply an ACL in the right direction on the right interface, and follow the placement rule.
- Edit a named ACL by sequence number and verify with the counters.
How an ACL is processed
The router compares a packet with each line from the top. The first match decides, and no later line is read. A packet that matches nothing hits the invisible implicit deny any at the end, so an ACL with only deny lines blocks everything. Wildcard masks are inverted masks: 0 bits must match, 1 bits are ignored. 0.0.0.255 matches a /24; host 10.1.1.5 means 10.1.1.5 0.0.0.0; any means 0.0.0.0 255.255.255.255.
Standard and extended ACLs
| Type | Numbers | Matches on | Place it |
|---|---|---|---|
| Standard | 1–99, 1300–1999 | Source address only | Close to the destination |
| Extended | 100–199, 2000–2699 | Protocol, source, destination, ports | Close to the source |
ip access-list extended BRANCH-IN
10 permit tcp 10.1.10.0 0.0.0.255 host 10.0.50.80 eq 443
20 deny tcp 10.1.10.0 0.0.0.255 host 10.0.50.80 eq 22
30 permit icmp 10.1.10.0 0.0.0.255 any echo
40 deny ip any any log
!
interface GigabitEthernet0/1
ip access-group BRANCH-IN inPC1's HTTPS request matches line 10 and reaches the server (1). Its SSH attempt matches line 20 and is dropped as it enters R1 (2), before it uses any more bandwidth: that is why extended ACLs go near the source.
Applying and editing
One ACL per interface, per direction, per protocol. In filters packets arriving on the interface, before routing; out filters packets leaving it, after routing. Named ACLs can be edited by sequence number: no 20 removes a line, 15 permit … inserts one between 10 and 20.
R1# show access-lists BRANCH-IN
Extended IP access list BRANCH-IN
10 permit tcp 10.1.10.0 0.0.0.255 host 10.0.50.80 eq 443 (1288 matches)
20 deny tcp 10.1.10.0 0.0.0.255 host 10.0.50.80 eq 22 (4 matches)
30 permit icmp 10.1.10.0 0.0.0.255 any echo (12 matches)
40 deny ip any any logCommands
show access-lists | Every ACL with its lines, sequence numbers and match counters. |
show ip interface Gi0/1 | Which ACLs are applied in and out on the interface. |
clear access-list counters | Resets the counters before a test. |
ip access-group NAME in|out | Applies an ACL to an interface. |
Exam traps
- Every ACL ends with an implicit
deny any; a list of only denies blocks everything. - Order matters: put specific lines before general ones.
- ACLs use wildcard masks: /26 is
0.0.0.63. - An outbound ACL does not filter traffic the router itself generates.
- Standard ACLs near the destination, extended ACLs near the source.
- Applying an ACL that does not exist yet permits everything (it is treated as empty) until you create it.
Check yourself
- Write the wildcard mask for 172.16.32.0/20.
- 0.0.15.255.
- An ACL has
deny 10.1.1.0 0.0.0.255and nothing else. What does it do on an interface? - It blocks everything: 10.1.1.0/24 by the explicit line, all else by the implicit deny.
- Where do you place a standard ACL that stops one subnet from reaching one server?
- As close to the server (the destination) as possible, outbound toward it, so the subnet can still reach everything else.
- How do you insert a line between 10 and 20 in a named ACL?
- Enter the ACL and type
15 <permit|deny …>.
Labs
Try it live: Filter traffic with standard and extended ACLs
More topics in 5.0 Security Fundamentals
- 5.1 Define the basic security vocabulary: threat, vulnerability, exploit, mitigation
- 5.2 Describe the non-technical side of a security program: awareness, training, physical access
- 5.3 Configure and verify local-password protection of device access
- 5.4 Describe password policy elements and alternatives: MFA, certificates, biometrics
- 5.8 Compare the roles of authentication, authorization and accounting
- 5.9 Describe how WPA, WPA2 and WPA3 differ
- 5.10 Configure and verify a WPA2-PSK WLAN in the controller GUI