LAB: ACL Configuration
You have learned what ACLs are, how wildcard masks work, and why order and placement matter. Now you type it all onto a real (or simulated) router: a standard ACL that blocks one subnet at the destination edge, and an extended ACL near the source that stops a specific service. You will prove each rule with ping and read the verdict back from show access-lists.
- Build a two-router lab and reach full connectivity first.
- Configure a standard ACL and place it close to the destination.
- Configure an extended ACL to permit/deny specific traffic by protocol and port.
- Apply ACLs with ip access-group in the correct direction.
- Verify with show access-lists, show ip interface, and ping tests.
- Troubleshoot the classic mistakes: direction, order, and the missing permit any.
Overview and goal
Two LANs face each other across a single router’s interfaces. The goal is controlled in three stages: first prove the network works with no ACLs; then add a standard ACL that blocks the entire management subnet from the server LAN; finally add an extended ACL that permits web traffic (HTTP/HTTPS) and denies Telnet to the server while leaving everything else intact. If an ACL change breaks a host that should still pass traffic, your first suspect is direction, your second is ordering, and your third is the missing catch-all.
permit any.
Topology
Addressing plan
| Device | Interface | Address / mask | Gateway |
|---|---|---|---|
| Host A | NIC | 192.168.1.10 / 255.255.255.0 | 192.168.1.1 |
| Host M | NIC | 192.168.2.10 / 255.255.255.0 | 192.168.2.1 |
| R1 | Gi0/0 | 192.168.1.1 / 255.255.255.0 | — |
| R1 | Gi0/1 | 10.10.10.1 / 255.255.255.0 | — |
| Server | NIC | 10.10.10.10 / 255.255.255.0 | 10.10.10.1 |
Wildcard masks: /24 → 0.0.0.255. The individual hosts use host syntax in
the extended ACL.
Step 1 — Build and verify connectivity
Start from scratch. Configure the addresses above and a default gateway on each host, then confirm both hosts can reach the server before any ACL exists:
R1(config)# interface gigabitEthernet0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitEthernet0/1 R1(config-if)# ip address 10.10.10.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# end ! From Host A and Host M: the server must answer both pings C:\> ping 10.10.10.10 Reply from 10.10.10.10: bytes=32 time<1ms TTL=127
Step 2 — Standard ACL: block one subnet
Policy: 192.168.2.0/24 (Host M’s subnet) may not reach the server LAN at all; 192.168.1.0/24 continues normally. A standard ACL knows only the source, so the textbook placement is on R1’s Gi0/1, outbound — the last router before the server LAN:
R1(config)# access-list 10 deny 192.168.2.0 0.0.0.255 R1(config)# access-list 10 permit any R1(config)# interface gigabitEthernet0/1 R1(config-if)# ip access-group 10 out R1(config-if)# end
Note the order: the specific deny comes first, the permit any second. Reverse
them and the permit swallows everything. The list is deliberately on Gi0/1: traffic leaving toward the
server LAN is filtered; traffic from 192.168.2.0 to anywhere else is untouched.
Step 3 — Test the standard ACL
Test from both sides of the rule:
! Host M (192.168.2.10) is blocked C:\> ping 10.10.10.10 Request timed out. Request timed out. ! Host A (192.168.1.10) still passes C:\> ping 10.10.10.10 Reply from 10.10.10.10: bytes=32 time<1ms TTL=127 R1# show access-lists Standard IP access list 10 10 deny 192.168.2.0, wildcard bits 0.0.0.255 (matches 4) 20 permit any (matches 12)
show ip interface to confirm which interface actually carries the rule.
Step 4 — Extended ACL: control the web ports
New policy: the server provides HTTP and HTTPS to everyone; Telnet to the server is forbidden from the user side; everything else is permitted. An extended ACL can see the destination and ports, so it belongs inbound on Gi0/0 — close to the sources — where the unwanted Telnet traffic is killed before it reaches the server LAN:
! Remove the standard test ACL first, or disable it on the interface R1(config)# interface gigabitEthernet0/1 R1(config-if)# no ip access-group 10 out R1(config-if)# exit R1(config)# access-list 101 deny tcp any host 10.10.10.10 eq 23 R1(config)# access-list 101 permit tcp any host 10.10.10.10 eq 80 R1(config)# access-list 101 permit tcp any host 10.10.10.10 eq 443 R1(config)# access-list 101 permit icmp any any R1(config)# access-list 101 permit ip any any R1(config)# interface gigabitEthernet0/0 R1(config-if)# ip access-group 101 in R1(config-if)# end
Read each line: deny Telnet (23) to the server; permit HTTP (80) and HTTPS (443); permit ICMP so ping
still works for testing; and the final permit ip any any explicitly re-instates everything
else that implicit deny would otherwise remove. Order matters absolutely — the deny must precede the
broad permits for the same destination.
Step 5 — Verify with show access-lists
Now exercise every rule and read the counters. Even for routers without a Telnet client, the pattern holds: ping tests ICMP, an HTTP request tests port 80, and a crafted TCP test to port 23 (or connecting from a host) should be refused:
R1# show access-lists Extended IP access list 101 10 deny tcp any host 10.10.10.10 eq telnet (3 matches) 20 permit tcp any host 10.10.10.10 eq www (5 matches) 30 permit tcp any host 10.10.10.10 eq 443 (7 matches) 40 permit icmp any any (4 matches) 50 permit ip any any (16 matches) R1# show ip interface gigabitEthernet0/0 GigabitEthernet0/0 is up, line protocol is up Inbound access list is 101 Outgoing access list is not set
| Test | Expected | Counter you check |
|---|---|---|
| ping from Host A to 10.10.10.10 | Reply (ICMP permitted) | Line 40 increases |
| Web browser to http://10.10.10.10 | Page loads | Line 20 increases |
| Telnet 10.10.10.10 from Host M | Connection refused / no prompt | Line 10 increases |
| ping from Host M to 10.10.10.10 | Reply (ICMP is open to all) | Line 40 increases |
Zero on a line that should be rising is the clue: the packet is either hitting an earlier line (reorder), or crossing a different interface/direction than the one you bound (re-verify).
Troubleshooting guide
- Blocked subnet still pings (standard ACL): check
show ip interfaceon every interface; the outbound ACL must be on the interface toward the destination (Gi0/1), not the source. - Everything stopped working: you removed the
permit anycatch-all and implicit deny took over. Re-add the last line. - A rule you added does nothing: numbered ACLs append at the end. If a broad
permit any anyalready sits above your new deny, the deny never runs — reorder or switch to a named ACL. - Service works one direction only: check the return traffic. A one-direction filter (inbound allow, implicit deny on outbound) breaks conversations asymmetrically.
- Port filter wrong:
eq 23binds to the nearest address. Written after the source, it matches source ports, not the destination’s.
The vocabulary you need
Every term below appears in the lesson text above. Select one to read its definition, then use the quiz at the end to check what stuck.
Review
Check what you have learned with these review questions.
Sources & references
- Cisco. CCNA (200-301) Exam Topics. cisco.com.
- IETF. Request for Comments (RFCs). rfc-editor.org.
- IANA. Internet Assigned Numbers Authority registries. iana.org.
Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.