Depending on what that switch actually supports for ACLs (can't find any manual), port-bound ACLs should do the trick - no VLANs or routing required. I'm assuming hosts are configured statically, without DHCP. The syntax likely varies but I hop you get the idea. Simply apply the ACL to all ports on all switches. Alternatively, applying the ACL to the default VLAN might also work.
- hosts 1A-5A use IP addresses 192.168.1.1/24 - 192.168.1.5/24
- hosts 1B-5B use IP addresses 192.168.1.11/24 - 192.168.1.15/24
- hosts 1C-5C use IP addresses 192.168.1.21/24 - 192.168.1.25/24
- hosts 1D-5D use IP addresses 192.168.1.31/24 - 192.168.1.35/24
ACL:
1000 permit ip 192.168.1.1/32 192.168.1.2/32
1010 deny ip 192.168.1.2/32 192.168.1.11/32
1020 deny ip 192.168.1.2/32 192.168.1.21/32
1030 permit ip 192.168.1.2/32 any
1040 permit ip 192.168.1.11/32 192.168.1.12/32
1050 deny ip 192.168.1.12/32 192.168.1.1/32
1060 deny ip 192.168.1.12/32 192.168.1.21/32
1070 permit ip 192.168.1.12/32 any
1080 permit ip 192.168.1.21/32 192.168.1.22/32
1090 deny 192.168.1.22/32 192.168.1.1/32
1100 deny 192.168.1.22/32 192.168.1.11/32
1110 permit 192.168.1.22/32 any
Note that there's an implied deny any any
rule at the end of the ACL, so if you don't explicitly permit something it's denied. You need to permit both directions of a communication - ACLs are stateless. Rules are evaluated on a first fit basis from top to bottom, so if a previous deny
matches, a subsequent permit
isn't used.
If the switch doesn't accept the /32
(no wildcard bits) you need to use 0.0.0.0
instead. The wildcard bits have no direct relation to the subnet mask. Instead, they define bits that are ignored while matching. 192.168.1.2/31
or 192.168.1.2 0.0.0.1
matches 192.168.1.2 and 192.168.1.3. 192. 192.168.1.3 0.0.0.2
matches 192.168.1.1 and 192.168.1.3.