Hi everyone, an office network usually has a few groups of users, for example staff and guests. Staff are allowed to reach the internal server, while guests only need the internet. If every network is plugged into the same router with no rules at all, guests can reach the server too. To restrict that, we use an ACL (Access Control List), which is a list of permit and deny rules applied on the router.
In this article I practice an extended ACL in Cisco Packet Tracer 8.2.1: guests are blocked from the server, but they can still talk to the other networks. If you are new to Cisco routers, read my guide on Cisco router configuration in Packet Tracer first.
The Topology and Cables Used
One router for three networks

This time I use a Cisco 2911 router because it has three GigabitEthernet ports, which is enough for three networks at once. Below it are 3 Cisco 2960-24TT switches, 2 PCs for the staff, 2 laptops for the guests, and 1 server.

The green box is the staff network (labeled STAF) 192.168.10.0/24, the pink box is the guest network (labeled TAMU) 192.168.20.0/24, and the purple box is the server network (labeled SERVER) 192.168.30.0/24, with the server at 192.168.30.10.
Router0 Gig0/0 -> Switch0 Gig0/1 (straight, STAF)
Router0 Gig0/1 -> Switch1 Gig0/1 (straight, TAMU)
Router0 Gig0/2 -> Switch2 Gig0/1 (straight, SERVER)
PC0, PC1 -> Switch0 Fa0/1-2 (straight)
Laptop0, Laptop1 -> Switch1 Fa0/1-2 (straight)
Server0 -> Switch2 Fa0/1 (straight)Router cables to the three switches

Every cable is Copper Straight-Through, because each link connects two different kinds of devices: router to switch, and switch to PC, laptop, or server. In Packet Tracer a laptop connects through its FastEthernet0 port, just like a regular PC.
Configuring the Router IPs
Open the Router0 CLI

Click Router0 at the top of the topology, which I marked with a red circle.

In the Router0 window, click the CLI tab, then answer no to the initial configuration dialog.
Gateway IPs for the three networks

enable
configure terminal
hostname Router0
interface gigabitEthernet0/0
ip address 192.168.10.1 255.255.255.0
no shutdown
exit
interface gigabitEthernet0/1
ip address 192.168.20.1 255.255.255.0
no shutdown
exit
interface gigabitEthernet0/2
ip address 192.168.30.1 255.255.255.0
no shutdown
endEach router port becomes the gateway for one network. Gig0/0 is for the staff, Gig0/1 is for the guests, and Gig0/2 is for the server.
Setting the Server, PC, and Laptop IPs
Open Server0

Close the Router0 window, then click Server0 inside the purple box.

Click the Desktop tab and then click IP Configuration.
The server IP

Enter 192.168.30.10 as the IPv4 Address, 255.255.255.0 as the Subnet Mask, and 192.168.30.1 as the Default Gateway.
Open PC0 on the staff network

Close the server window, then click PC0 inside the green box.

Click the Desktop tab. We will use IP Configuration to set the IP and Command Prompt for the ping tests.
Click IP Configuration, then enter 192.168.10.10 with the gateway 192.168.10.1. Repeat this on PC1 with the IP 192.168.10.11.
Open Laptop0 on the guest network

Close the PC window, then click Laptop0 inside the pink box.

The laptop Desktop tab looks exactly like the one on a PC. Click IP Configuration.
Guest laptop IPs

Enter 192.168.20.10 as the IPv4 Address, 255.255.255.0 as the Subnet Mask, and 192.168.20.1 as the Default Gateway. Repeat this on Laptop1 with the IP 192.168.20.11.
Testing Before the ACL Is Applied
Guests can still reach the server

Close IP Configuration on Laptop0, open the Command Prompt, then ping the server.
ping 192.168.30.10The ping succeeds. This is exactly what we want to prevent, because guests should not be able to reach the internal server.
Creating and Applying the Extended ACL
ACL rules on Router0

Open the Router0 CLI again and type the following commands.
configure terminal
access-list 100 deny ip 192.168.20.0 0.0.0.255 host 192.168.30.10
access-list 100 permit ip any any
interface gigabitEthernet0/1
ip access-group 100 in
end
write memoryThe number 100 marks this as an extended ACL. A standard ACL (numbers 1 to 99) only looks at the source address, while an extended ACL can check both the source and the destination address at the same time.
The first line denies every packet from the guest network 192.168.20.0/24 that is heading to the host 192.168.30.10. The second line permits everything else. This permit line is required, because every ACL ends with a hidden deny any rule that blocks any packet that does not match one of the rules above it.
The ACL is applied on Gig0/1 in the inbound direction, which is the port where packets from the guests enter the router. An extended ACL is best placed as close to the source as possible, so denied traffic never gets the chance to travel across other networks.
Testing After the ACL Is Applied
Guests are blocked from the server but can still reach staff

Go back to the Laptop0 Command Prompt and run the following commands.
ping 192.168.30.10
ping 192.168.10.10The ping to the server now gets a Destination host unreachable reply from 192.168.20.1, which means the router is dropping those packets. The ping to PC0 on the staff network still succeeds, because our rule only blocks the server as a destination.
Staff can still reach the server

Open the Command Prompt on PC0 and ping the server.
ping 192.168.30.10Every ping from the staff side succeeds, because staff packets enter through Gig0/0, which has no ACL applied.
Check the number of matching packets

In the Router0 CLI, run the following command.
show access-listsThe match number on each line shows how many packets matched that rule. The deny line has 4 matches from the guest ping to the server, and the permit line has 4 matches from the guest ping to the staff PC.
Common Problems and How to Fix Them
All guest traffic is blocked after the ACL is applied
Usually the line access-list 100 permit ip any any was never typed, so the hidden deny any rule blocks everything.
The ACL has no effect at all
Check the interface and direction with show ip interface gigabitEthernet0/1. Make sure it says Inbound access list is 100. If the ACL sits on the wrong port or in the out direction, guest packets are never checked.
The rules are in the wrong order
An ACL is read from top to bottom and stops at the first rule that matches. If permit ip any any was typed first, the deny rule below it will never be used. Remove the list with no access-list 100 and type it again in the correct order.
At this point the guest network can no longer reach the server, while the staff still can. In the next article we cover port security on the switch, which is how you stop unknown devices from being plugged into the office network ports. If you run into any other error while trying this, just leave a comment below.












