CCNP · Lesson 4 of 5

Private VLANs: Isolating Hosts Inside the Same VLAN

How do you make 50 servers share the same subnet and gateway but not talk to each other? With Private VLANs.

By topologia.appUpdated: Nov 13, 2026⏱ 7 min❓ 4 questions📶 Level advanced

In a nutshell

A Private VLAN splits a VLAN into sub-VLANs. Isolated ports only talk to the gateway; community ports talk to their group and the gateway; the promiscuous port talks to everyone.

In this lesson
  1. The idea
  2. VLAN and port types
  3. Configuration
  4. What you must remember
  5. Exam-style questions

The idea

In a DMZ or a hotel network you want everyone on the same subnet (so you do not waste addresses) but hosts must not see each other. A Private VLAN (PVLAN) does this by splitting a primary VLAN into secondary VLANs.

COMMUNITY 101ISOLATED 102 GW SW · PVLAN promiscuous · primary 100 SRV-A SRV-B SRV-C SRV-D ✕✓
SRV-A and SRV-B (community 101) see each other and the gateway. SRV-C and SRV-D (isolated 102) only see the gateway.

VLAN and port types

ElementWho it can talk to
Promiscuous port (gateway, firewall)Everyone: primary, isolated and community.
Host in an isolated VLANOnly the promiscuous port. Not even other isolated hosts.
Host in a community VLANIts own community and the promiscuous port.

Each primary VLAN supports only one isolated VLAN and several community VLANs.

Configuration

SW1(config)# vtp mode transparent  ← required with VTP v1/v2
SW1(config)# vlan 101
SW1(config-vlan)# private-vlan community
SW1(config)# vlan 102
SW1(config-vlan)# private-vlan isolated
SW1(config)# vlan 100
SW1(config-vlan)# private-vlan primary
SW1(config-vlan)# private-vlan association 101,102

SW1(config)# interface gi1/0/1  ← towards the gateway
SW1(config-if)# switchport mode private-vlan promiscuous
SW1(config-if)# switchport private-vlan mapping 100 101,102

SW1(config)# interface gi1/0/10  ← isolated server
SW1(config-if)# switchport mode private-vlan host
SW1(config-if)# switchport private-vlan host-association 100 102

SW1# show vlan private-vlan
Primary Secondary Type              Ports
------- --------- ----------------- ----------------
100     101       community         Gi1/0/5, Gi1/0/6
100     102       isolated          Gi1/0/10, Gi1/0/11

If the gateway is an SVI on the same switch, use private-vlan mapping 101,102 inside interface vlan 100.

Requirement

With VTP v1 or v2 the switch must be in transparent mode. VTPv3 can propagate PVLANs.

What you must remember

  • The primary VLAN contains isolated and community secondaries.
  • Isolated: only talk to the promiscuous port. Community: their group and the promiscuous port.
  • Only one isolated VLAN per primary.
  • With VTP v1/v2, transparent mode is required.

Check what you learned

4 exam-style questions. Some have one answer and others ask you to choose several. Answer them all to complete the lesson.

Question 1 of 4 · One answerA server on a host port of an isolated VLAN can communicate with which ports?
Question 2 of 4 · Choose twoWhich two statements about community VLANs are correct? (Choose two.)
Question 3 of 4 · One answerWhich command associates secondary VLANs 101 and 102 with primary VLAN 100?
Question 4 of 4 · One answerWhich VTP requirement applies to configuring Private VLANs on a switch running VTP version 2?