by C. Casquatch
In this blog, I walk through the lab step-by-step and include screenshots to document my process and learning.
Using Rene Molenaar’s GNS3 Vault lab
Have you ever needed to block ping (ICMP) traffic between two devices on the same VLAN, while still allowing other types of communication? Traditional router-based ACLs won’t help in this case, because Layer 2 switches forward traffic within the same VLAN without routing it.
That’s where VACLs (VLAN Access Control Lists) come in.
VACLs apply access control policies within a VLAN, regardless of whether traffic is being bridged (switched) or routed. Unlike port-based ACLs (PACLs), which only apply to ingress traffic on a switchport, VACLs apply to all traffic within the specified VLAN(s).
This is especially useful for enforcing security policies between same-subnet hosts on a switch.
You have a topology like this:
gi0/0, IP: 192.168.10.1gi0/1, IP: 192.168.10.2🎯 Goal: Prevent DNS1 and DNS2 from pinging each other (block ICMP), but allow all other traffic.

Configure both switchports as access ports in VLAN 10.
conf t
interface gi0/0
switchport mode access
switchport access vlan 10
!
interface gi0/1
switchport mode access
switchport access vlan 10

We’ll use an extended ACL to match ICMP traffic between the two hosts.
ip access-list extended BLOCK_ICMP
deny icmp host 192.168.10.1 host 192.168.10.2
deny icmp host 192.168.10.2 host 192.168.10.1
permit ip any any
Bind the ACL to an action using a VLAN access map.
vlan access-map FILTER_VLAN10 10
match ip address BLOCK_ICMP
action drop
!
vlan access-map FILTER_VLAN10 20
action forward
vlan filter FILTER_VLAN10 vlan-list 10
Check your configuration using the following commands:
show vlan access-map
show vlan filter
show access-lists BLOCK_ICMP

ping 192.168.10.2
➡️ Should fail
telnet, ssh) to confirm it still works. (I did not have the patience to configure telnet to make sure it worked so I stopped at making sure that the pings failed in this lab.)

Happy switching! 🧠🔧
tags: GNS3 - vlans - Networking - access lists