Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityAdvanced

Private VLANs, protected ports and VLAN ACLs: isolating hosts inside one subnet

In short: Normally every device in a VLAN can reach every other. Private VLANs split one VLAN and subnet into isolated and community groups that can only reach a promiscuous port such as the gateway. Protected ports give a simpler, single-switch version. VLAN ACLs filter any traffic inside a VLAN, including traffic that is never routed.

The problem: neighbours in one subnet

A VLAN is one broadcast domain, and devices inside it talk to each other directly through the switch. That is usually what you want, but not always. Guests in a hotel, tenants in a shared office or servers in a hosting DMZ all need to reach the gateway, yet have no reason to reach each other. Giving each one its own VLAN and subnet wastes addresses and creates a lot of configuration. The features below isolate devices while they stay in one subnet.

Private VLANs

A private VLAN (PVLAN) divides a primary VLAN into secondary VLANs. All of them share the primary VLAN's IP subnet.

Private VLAN structurePrimary VLAN 100Promiscuous portgateway, talks toallIsolated VLAN 101hosts reach only thegatewayCommunity VLAN 102hosts reach eachother and gatewayCommunity VLAN 103a second group
Figure 1. Secondary VLANs live inside one primary VLAN and share its subnet. Only promiscuous ports can talk to everyone.
  • Isolated secondary VLAN: hosts can only talk to promiscuous ports, never to each other. There is one isolated VLAN per primary.
  • Community secondary VLAN: hosts can talk to each other and to promiscuous ports, but not to other communities or isolated hosts. You can have several.
  • Promiscuous port: usually the router, firewall or SVI. It can talk to every port in the primary VLAN.
vtp mode transparent
vlan 101
 private-vlan isolated
vlan 102
 private-vlan community
vlan 100
 private-vlan primary
 private-vlan association 101,102
interface GigabitEthernet1/0/5
 switchport mode private-vlan host
 switchport private-vlan host-association 100 101
interface GigabitEthernet1/0/48
 switchport mode private-vlan promiscuous
 switchport private-vlan mapping 100 101,102
interface Vlan100
 ip address 10.50.0.1 255.255.255.0
 private-vlan mapping 101,102

With VTP versions 1 and 2 the switch must be in transparent mode; VTP version 3 can carry private VLANs. Check with show vlan private-vlan. Across several switches, the private VLANs are carried on normal trunks, and each switch must know the same associations.

Protected ports

A protected port is a lightweight alternative. Traffic cannot pass directly between two protected ports on the same switch; it can only go to unprotected ports such as the uplink. The feature only works within one switch, and a protected port on one switch can still talk to a protected port on another.

interface range GigabitEthernet1/0/1 - 40
 switchport protected

It suits a single-switch guest area or a set of kiosks where you do not want the complexity of private VLANs.

VLAN ACLs (VACLs)

A router ACL only sees traffic that is routed in or out of an interface. Traffic between two hosts in the same VLAN never reaches it. A VLAN access map (VACL) is applied to the whole VLAN, so it filters every frame that enters the VLAN, whether it is bridged or routed.

ip access-list extended BLOCK-SMB
 permit tcp any any eq 445
vlan access-map GUEST-FILTER 10
 match ip address BLOCK-SMB
 action drop
vlan access-map GUEST-FILTER 20
 action forward
vlan filter GUEST-FILTER vlan-list 30

Note the logic: the ACL selects traffic, and the access map's action decides what happens. Without a final entry that forwards everything else, all other traffic is dropped. A common surprise is that a VACL matching a MAC access list does not filter IP packets: on Catalyst switches MAC ACLs only apply to non-IP frames, so to filter IP traffic you must match an IP ACL.

Real-world example: a co-working space

A co-working building gives forty small businesses wired desks on one floor. The network team puts every desk port in the isolated VLAN of a private VLAN, with the firewall as the promiscuous port, so no tenant can browse another's laptops or printers. Two firms that share an office suite are placed together in a community VLAN so their printers keep working. A VACL on the same VLAN drops file-sharing ports as an extra safety net. Everyone shares one /23 subnet, which keeps DHCP and firewall rules simple. For broader segmentation ideas, see zero trust and segmentation.

Practice

Which hosts can a device in an isolated secondary VLAN reach?
Only promiscuous ports, such as the gateway or firewall. It cannot reach other isolated or community hosts.
What is the main limitation of protected ports?
They only isolate ports on the same switch; protected ports on different switches can still talk.
Why might a VACL be needed when a router ACL already exists?
Traffic between hosts in the same VLAN is never routed, so the router ACL never sees it; a VACL filters inside the VLAN.

Key takeaways

  • Private VLANs split one VLAN and subnet into isolated and community groups.
  • Promiscuous ports, normally the gateway, can talk to every host.
  • Protected ports give simple isolation on a single switch.
  • VACLs filter all traffic in a VLAN, using an ACL to match and an action to drop or forward.
  • MAC ACLs in a VACL do not filter IP packets; match an IP ACL for those.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.