Imagine a company operating a shared server environment.
Several customer servers connect to the same Ethernet switch.
The servers need access to a common gateway, but the company does not want one customer server to communicate directly with another customer’s server.
One possible solution is to create a separate VLAN and IP subnet for every customer.
However, this can make network design and IP address management more complicated as the number of customers increases.
What if several servers could share the same IP subnet while still having restrictions on direct Layer 2 communication?
This is one of the situations where Private VLANs (PVLANs) can help.
Private VLANs extend traditional VLAN segmentation by introducing additional forwarding restrictions between switchports.
They allow network administrators to define which endpoints can communicate directly and which endpoints must remain isolated at Layer 2.
In this article, we will understand how Private VLANs work, the differences between primary and secondary VLANs, isolated and community ports, and the role of promiscuous ports.
We will also configure a practical Cisco Private VLAN lab and verify the resulting communication restrictions.

1. What Is a Private VLAN and Why Is It Needed?
A Private VLAN is a Layer 2 switching feature that divides a primary VLAN domain into secondary VLANs with specific forwarding rules.
The feature is useful when endpoints need to share common network infrastructure but should not all be allowed to communicate directly.
Traditional VLAN vs Private VLAN
Consider three servers in VLAN 100:
| Device | IP Address | VLAN |
|---|---|---|
| Server-A | 192.168.100.10 | 100 |
| Server-B | 192.168.100.20 | 100 |
| Server-C | 192.168.100.30 | 100 |
In an ordinary VLAN, these devices can normally communicate directly at Layer 2, provided their network settings and other security controls permit it.
With Private VLANs, the administrator can configure additional isolation.
For example:
- Server-A cannot communicate directly with Server-B.
- Server-B cannot communicate directly with Server-C.
- All three servers can reach a permitted shared gateway.
Why Not Create a Separate VLAN for Every Server?
Traditional VLAN separation remains a valid design.
However, a separate VLAN and IP subnet for every endpoint can create more configuration and IP address management overhead.
Private VLANs can help share an IP address space while introducing Layer 2 host isolation.
Common Private VLAN Use Cases
Shared Hosting
Restrict direct communication between servers belonging to different customers.
Enterprise Data Centers
Provide additional Layer 2 isolation for selected workloads.
Guest or Restricted Endpoint Networks
Prevent eligible endpoints from communicating directly while allowing access to common services.
Specialized Service Provider Networks
Serve multiple isolated endpoints using a shared Layer 2 infrastructure.
Important Limitation
A Private VLAN does not guarantee that isolated hosts cannot communicate through a router or another upstream device.
If a gateway routes traffic back toward another isolated host, communication may still be possible unless appropriate Layer 3 policies prevent it.
2. Private VLAN Components — Primary, Isolated, Community and Promiscuous
Private VLAN terminology is different from ordinary VLAN terminology.
The main components are:
- Primary VLAN
- Isolated Secondary VLAN
- Community Secondary VLAN
- Promiscuous Port
- Host Port
A. Primary VLAN
The primary VLAN represents the overall Private VLAN domain.
It associates the relevant isolated and community secondary VLANs.
For example:
Primary VLAN 100
The primary VLAN is the logical parent of the secondary VLANs.
On supported Cisco multilayer switches, the primary VLAN can also provide the Layer 3 SVI, with appropriate mappings.
B. Isolated Secondary VLAN
An isolated VLAN contains host ports that must not communicate directly with one another at Layer 2.
For example:
Isolated VLAN 101
Two isolated servers connected through this secondary VLAN cannot directly exchange Layer 2 traffic.
They can communicate with mapped promiscuous ports.
An isolated VLAN also remains separated from community host ports.
C. Community Secondary VLAN
A community VLAN contains host ports allowed to communicate with other hosts in the same community.
For example:
Community VLAN 102
Server-C and Server-D can communicate directly if both belong to Community VLAN 102.
However, they cannot directly communicate at Layer 2 with isolated hosts or hosts in another community.
They can still communicate with mapped promiscuous ports.
D. Promiscuous Port
A promiscuous port is a special PVLAN port that can communicate with associated isolated and community hosts.
Typical uses include connecting:
- A shared gateway
- An authorized shared service
- A suitable upstream Layer 3 device
For example, a gateway connected to a promiscuous port can communicate with both isolated and community hosts.
The name promiscuous describes its PVLAN forwarding permissions. It does not mean the port is a SPAN monitoring destination.
E. Host Port
A host port connects an endpoint to an isolated or community secondary VLAN.
Each PVLAN host port is associated with:
- One primary VLAN
- One secondary VLAN
PVLAN Communication Matrix
| Source Port | Isolated Host | Same Community Host | Different Community Host | Promiscuous Port |
|---|---|---|---|---|
| Isolated Host | Deny | Deny | Deny | Allow |
| Community Host | Deny | Allow | Deny | Allow |
| Promiscuous Port | Allow | Allow | Allow | Allow |
The matrix describes basic permitted Layer 2 forwarding relationships. Host firewalls and other policies can still deny communication.

3. How Private VLAN Traffic Flows
Let us examine a network with five devices.
| Device | IP Address | PVLAN Port Type |
|---|---|---|
| Server-A | 192.168.100.10 | Isolated |
| Server-B | 192.168.100.20 | Isolated |
| Server-C | 192.168.100.30 | Community 102 |
| Server-D | 192.168.100.40 | Community 102 |
| Shared-Service | 192.168.100.50 | Promiscuous |
All five devices use the same /24 IPv4 subnet.
Scenario 1 — Isolated Host to Another Isolated Host
Server-A attempts to communicate with Server-B.
Both are connected to isolated host ports.
The Private VLAN forwarding rules do not permit direct Layer 2 communication between the ports.
Expected result: Direct communication is blocked.
Scenario 2 — Community Host to Another Community Host
Server-C communicates with Server-D.
Both are in Community VLAN 102.
The forwarding policy permits direct Layer 2 communication within the same community.
Expected result: Communication is permitted.
Scenario 3 — Isolated Host to Community Host
Server-A attempts to communicate with Server-C.
These ports belong to different secondary VLAN behaviors.
The switch does not permit direct Layer 2 communication between them.
Expected result: Direct communication is blocked.
Scenario 4 — Isolated Host to Promiscuous Port
Server-A communicates with the Shared-Service host.
The promiscuous port is mapped to the isolated secondary VLAN.
Expected result: Communication is permitted.
Scenario 5 — Community Host to Promiscuous Port
Server-C communicates with Shared-Service.
The promiscuous port is also mapped to the community VLAN.
Expected result: Communication is permitted.
How Does Broadcast Traffic Behave?
Private VLANs apply special forwarding rules to broadcasts as well as ordinary unicast traffic.
For example:
- An isolated host’s broadcast can reach eligible promiscuous ports but not other isolated host ports.
- A community host’s broadcast can reach its own community and mapped promiscuous ports.
- A promiscuous port can send traffic toward associated secondary VLAN hosts.
This is important for address resolution using ARP.
What About IP Subnets?
PVLAN hosts commonly share one IP subnet associated with the primary VLAN.
The secondary VLAN IDs do not automatically require separate subnets.
This is a key difference from a design that uses separate conventional VLANs and IP subnets for each group.
What About Routing?
On a compatible multilayer switch, the Layer 3 interface is generally configured on the primary VLAN rather than on the isolated or community secondary VLAN.
The relevant secondary VLANs must be mapped appropriately.
However, the following practical lab uses a Layer 2 promiscuous host so that the PVLAN forwarding rules can be demonstrated without introducing additional Layer 3 routing complexity.
4. Cisco Private VLAN Configuration — Concepts and Requirements
Cisco supports Private VLAN functionality on selected Catalyst switches and software images.
The exact features and CLI syntax vary by platform.
Basic Configuration Process
A typical supported Cisco PVLAN configuration includes:
- Create the primary VLAN.
- Create an isolated secondary VLAN.
- Create one or more community secondary VLANs.
- Associate the secondary VLANs with the primary VLAN.
- Configure isolated and community host ports.
- Configure and map a promiscuous port.
- Verify the forwarding relationships.
Example VLAN Plan
| VLAN | Type | Purpose |
|---|---|---|
| 100 | Primary | Shared PVLAN domain |
| 101 | Isolated Secondary | Isolated servers |
| 102 | Community Secondary | Servers allowed to communicate within their community |
Important Platform Requirements
On the documented Catalyst 3560 IOS implementation:
- The switch must support Private VLANs in its software feature set.
- VTP transparent mode is required when using VTP version 1 or 2.
- A primary VLAN can have one isolated secondary VLAN and multiple community secondary VLANs.
- Private VLAN ports must be configured using the appropriate PVLAN commands.
- Layer 3 SVIs, if required, belong to the primary VLAN.
- Some combinations of PVLANs with other switch features are restricted.
VTP version 3 has different PVLAN support capabilities.
Can We Use Cisco Packet Tracer?
Standard Packet Tracer switch models may not implement complete Private VLAN CLI commands or forwarding behavior.
For reliable lab verification, use:
- A compatible physical Cisco Catalyst switch with PVLAN support
- A supported virtual switching image that implements Private VLANs
- Another platform with equivalent documented PVLAN capabilities
Do not assume a normal 2960 Packet Tracer switch fully supports this feature.
Does PVLAN Work Across Multiple Switches?
Yes, on supported platforms.
However, all participating switches must correctly support the primary and secondary VLAN relationships.
The required VLANs must be carried across the trunk path.
This article keeps the practical lab on one switch to make the forwarding behavior easier to understand.
5. Practical Cisco Lab — Isolated, Community and Promiscuous Ports
This lab demonstrates how Private VLANs allow selected devices to communicate while isolating others.
Lab Objectives
- Configure one primary VLAN.
- Create isolated and community secondary VLANs.
- Configure four PVLAN host ports.
- Configure one promiscuous port.
- Verify isolated-host restrictions.
- Verify community-host communication.
- Verify access to a shared service.
- Troubleshoot incorrect PVLAN mappings.
Lab Requirements
- One supported Cisco Catalyst 3560 switch with a suitable IOS image
- Five computers or Linux hosts
- Ethernet cables
- Console access
Use a dedicated lab switch or an equivalent supported environment.
Lab Connections
| Device | Switch Interface | Role |
|---|---|---|
| Server-A | Fa0/1 | Isolated Host |
| Server-B | Fa0/2 | Isolated Host |
| Server-C | Fa0/3 | Community Host |
| Server-D | Fa0/4 | Community Host |
| Shared-Service | Fa0/5 | Promiscuous Port |
IP Addressing Plan
| Device | IP Address | Subnet Mask |
|---|---|---|
| Server-A | 192.168.100.10 | 255.255.255.0 |
| Server-B | 192.168.100.20 | 255.255.255.0 |
| Server-C | 192.168.100.30 | 255.255.255.0 |
| Server-D | 192.168.100.40 | 255.255.255.0 |
| Shared-Service | 192.168.100.50 | 255.255.255.0 |
No default gateway is needed.
The Shared-Service device is an endpoint, not a router.
Ensure endpoint firewalls allow ICMP Echo testing.
Lab Topology

Step 1 — Verify Private VLAN Support
On SW1:
enable
show version
show sdm prefer
Verify the model, software image and SDM template against its Private VLAN documentation.
For the documented Catalyst 3560 platform, Cisco recommends the default SDM template.
Changing an SDM template may require a reload. Make such a change only in the authorized lab environment.
Also check configuration mode support:
configure terminal
vlan 100
private-vlan ?
If primary, isolated or community options are not available as expected, stop and verify platform support rather than continuing with incompatible commands.
Exit any unfinished configuration mode before proceeding.
Step 2 — Configure VTP Transparent Mode
On a compatible lab switch using VTP version 1 or 2:
configure terminal
hostname SW1
vtp mode transparent
end
This prevents reliance on VTP versions that do not distribute Private VLAN configuration.
Step 3 — Create Primary VLAN 100
configure terminal
vlan 100
name PRIMARY-SERVERS
private-vlan primary
exit
end
VLAN 100 becomes the primary PVLAN.
Step 4 — Create Isolated VLAN 101
configure terminal
vlan 101
name ISOLATED-SERVERS
private-vlan isolated
exit
end
VLAN 101 is the isolated secondary VLAN.
Step 5 — Create Community VLAN 102
configure terminal
vlan 102
name COMMUNITY-SERVERS
private-vlan community
exit
end
VLAN 102 becomes the community secondary VLAN.
Step 6 — Associate the Secondary VLANs
configure terminal
vlan 100
private-vlan association 101-102
exit
end
This associates VLAN 101 and VLAN 102 with primary VLAN 100.
Step 7 — Verify the PVLAN Associations
show vlan private-vlan
Illustrative output:
Primary Secondary Type
100 101 isolated
100 102 community
Actual output formatting varies by platform.
Step 8 — Configure Server-A as an Isolated Host
configure terminal
interface FastEthernet0/1
description SERVER-A-ISOLATED
switchport mode private-vlan host
switchport private-vlan host-association 100 101
spanning-tree portfast
spanning-tree bpduguard enable
no shutdown
exit
end
Server-A belongs to isolated VLAN 101 associated with primary VLAN 100.
Step 9 — Configure Server-B as an Isolated Host
configure terminal
interface FastEthernet0/2
description SERVER-B-ISOLATED
switchport mode private-vlan host
switchport private-vlan host-association 100 101
spanning-tree portfast
spanning-tree bpduguard enable
no shutdown
exit
end
Server-A and Server-B are now assigned to isolated host ports.
Step 10 — Configure Server-C and Server-D as Community Hosts
configure terminal
interface FastEthernet0/3
description SERVER-C-COMMUNITY
switchport mode private-vlan host
switchport private-vlan host-association 100 102
spanning-tree portfast
spanning-tree bpduguard enable
no shutdown
exit
interface FastEthernet0/4
description SERVER-D-COMMUNITY
switchport mode private-vlan host
switchport private-vlan host-association 100 102
spanning-tree portfast
spanning-tree bpduguard enable
no shutdown
exit
end
Server-C and Server-D belong to the same community secondary VLAN.
Step 11 — Configure the Promiscuous Port
configure terminal
interface FastEthernet0/5
description SHARED-SERVICE
switchport mode private-vlan promiscuous
switchport private-vlan mapping 100 add 101-102
no shutdown
exit
end
The promiscuous port is mapped to primary VLAN 100 and both secondary VLANs.
It can communicate with the isolated and community hosts according to the PVLAN forwarding rules.
Do not enable PortFast or BPDU Guard on promiscuous ports merely by copying an ordinary host-port template; follow the platform’s documented guidance.
Step 12 — Configure the Endpoints
Assign the five IPv4 addresses from the lab table.
Use:
255.255.255.0
as the subnet mask.
Leave the default gateway unset.
On Linux, one example of temporary address configuration is:
sudo ip address add 192.168.100.10/24 dev eth0
sudo ip link set eth0 up
This example applies to Server-A only, assuming its interface is named eth0.
Configure the remaining hosts with their respective addresses.
Step 13 — Verify the Host-Port Configuration
On SW1:
show interfaces FastEthernet0/1 switchport
show interfaces FastEthernet0/3 switchport
show interfaces FastEthernet0/5 switchport
Confirm:
| Interface | Expected Configuration |
|---|---|
| Fa0/1 | Private-VLAN host, 100/101 |
| Fa0/3 | Private-VLAN host, 100/102 |
| Fa0/5 | Private-VLAN promiscuous, mapped to 100/101–102 |
Step 14 — Test Isolated-to-Isolated Communication
From Server-A:
ping 192.168.100.20
Expected result: Failure.
Server-A and Server-B belong to isolated PVLAN host ports.
They cannot directly exchange Layer 2 traffic.
Step 15 — Test Community-to-Community Communication
From Server-C:
ping 192.168.100.40
Expected result: Success.
Both servers belong to Community VLAN 102.
Step 16 — Test Isolated-to-Community Communication
From Server-A:
ping 192.168.100.30
Expected result: Failure.
The PVLAN forwarding rules do not permit direct communication between an isolated host and a community host.
Step 17 — Test Isolated-to-Promiscuous Communication
From Server-A:
ping 192.168.100.50
Expected result: Success.
The Shared-Service device is connected to the promiscuous port, which is mapped to the isolated secondary VLAN.
Step 18 — Test Community-to-Promiscuous Communication
From Server-C:
ping 192.168.100.50
Expected result: Success.
The promiscuous port is also mapped to Community VLAN 102.
Step 19 — Test the Reverse Direction
From Shared-Service:
ping 192.168.100.10
ping 192.168.100.30
Expected result: Both tests succeed.
The mapped promiscuous port is permitted to communicate with both secondary VLAN groups.
Step 20 — Verify MAC Address Learning
On SW1:
show mac address-table dynamic
Examine the learned MAC addresses.
On the documented Catalyst PVLAN implementation, MAC entries can appear in the associated primary and secondary VLAN contexts.
Do not assume the MAC table will look identical to an ordinary single-VLAN access-port configuration.
Step 21 — Introduce a Controlled Mapping Fault
Remove the community VLAN mapping from the promiscuous port.
configure terminal
interface FastEthernet0/5
switchport private-vlan mapping 100 remove 102
end
This is a deliberate lab fault.
Step 22 — Observe the Mapping Failure
From Server-C:
ping 192.168.100.50
Expected result: Failure.
The promiscuous port is no longer mapped to the community secondary VLAN.
From Server-A:
ping 192.168.100.50
Expected result: Success.
The isolated VLAN 101 mapping remains intact.
Step 23 — Identify the Configuration Error
On SW1:
show interfaces FastEthernet0/5 switchport
Check the Private VLAN mapping.
Confirm that VLAN 102 is missing.
Step 24 — Restore the Community Mapping
configure terminal
interface FastEthernet0/5
switchport private-vlan mapping 100 add 102
end
Verify:
show interfaces FastEthernet0/5 switchport
Then repeat:
ping 192.168.100.50
Run the ping from Server-C.
Expected result: Connectivity is restored.
Step 25 — Save the Lab Configuration
On SW1:
copy running-config startup-config
Expected Lab Results
| Source | Destination | Expected Result |
|---|---|---|
| Server-A — Isolated | Server-B — Isolated | Blocked |
| Server-A — Isolated | Server-C — Community | Blocked |
| Server-C — Community | Server-D — Same Community | Allowed |
| Server-A — Isolated | Shared-Service — Promiscuous | Allowed |
| Server-C — Community | Shared-Service — Promiscuous | Allowed |
| Shared-Service — Promiscuous | Server-A — Isolated | Allowed |
| Community Mapping Removed | Community to Shared-Service | Blocked |
| Community Mapping Restored | Community to Shared-Service | Allowed |
6. Private VLAN Troubleshooting, Limitations and Best Practices
Common Private VLAN Problems
| Symptom | Possible Cause | Verification |
|---|---|---|
| PVLAN configuration rejected | Unsupported platform or software | show version |
| Host port inactive | Missing primary/secondary VLAN or association | show vlan private-vlan |
| Isolated host cannot reach shared service | Missing promiscuous mapping | show interfaces ... switchport |
| Community hosts cannot communicate | Different community VLANs or incorrect assignments | Check host associations |
| Unexpected communication succeeds | Incorrect port role, alternative route or security design | Port, routing and policy review |
| PVLAN fails across switches | Secondary VLANs missing on trunk or incompatible configuration | VLAN and trunk verification |
| IP gateway unreachable | Missing primary SVI mapping or routing issue | SVI and PVLAN configuration |
Important Cisco Verification Commands
Display Private VLAN relationships:
show vlan private-vlan
Inspect an isolated host port:
show interfaces FastEthernet0/1 switchport
Inspect the promiscuous port:
show interfaces FastEthernet0/5 switchport
Review learned MAC addresses:
show mac address-table dynamic
Review interface state:
show interfaces status
Private VLAN vs Protected Port
Cisco also provides a protected-port feature on selected switches.
A protected port can restrict certain forwarding between protected ports.
However, protected ports and Private VLANs are not identical.
Private VLANs provide explicit primary and secondary VLAN relationships, community groups and promiscuous port mappings.
The feature capabilities and forwarding behavior must be compared on the specific switch model.
Private VLAN vs VLAN ACL
| Feature | Primary Purpose |
|---|---|
| Private VLAN | Restrict Layer 2 communication using host and promiscuous port relationships |
| VLAN Access Map — VACL | Filter supported VLAN traffic using defined matching rules |
| Routed SVI ACL | Filter routed IP traffic through an SVI |
| Stateful Firewall | Enforce traffic policies with connection-state awareness |
These technologies can complement one another.
Private VLAN Best Practices
- Plan the primary and secondary VLAN IDs clearly.
- Document all host-port associations.
- Verify promiscuous mappings.
- Confirm platform and software support.
- Use appropriate edge-port protections.
- Restrict PVLAN trunks to required VLANs.
- Avoid mixing incompatible switchport features.
- Design Layer 3 access control separately.
- Validate broadcast and ARP behavior.
- Test both allowed and blocked communication paths.
- Review platform scale and hardware limitations before deployment.
7. Key Takeaways — Private VLANs
Core Concepts
- Private VLANs provide additional Layer 2 port isolation.
- A primary VLAN represents the overall PVLAN domain.
- Isolated and community VLANs are secondary VLANs.
- The secondary VLAN type determines the host communication rules.
Port Behavior
- Isolated hosts cannot communicate directly with other isolated hosts.
- Community hosts can communicate with hosts in the same community.
- Hosts in different communities cannot communicate directly at Layer 2.
- Mapped promiscuous ports can communicate with associated secondary VLAN hosts.
Configuration and Security
- Cisco PVLAN commands are platform-dependent.
- Host ports require primary/secondary VLAN associations.
- Promiscuous ports require appropriate secondary VLAN mappings.
- PVLAN hosts can share an IP subnet.
- Layer 3 security controls remain necessary where routed isolation is required.
Conclusion — Why Private VLANs Matter
Private VLANs provide more granular Layer 2 segmentation than ordinary VLANs alone.
They are useful when multiple endpoints need access to common services but should not be permitted to communicate directly with one another.
The primary VLAN defines the common domain, while isolated and community secondary VLANs define the forwarding restrictions.
Promiscuous ports provide controlled access to shared gateways or services.
Understanding these relationships is important for enterprise network security, shared hosting and advanced switching design.
However, PVLANs do not replace routing policies, firewalls or endpoint security.
A successful deployment requires correct VLAN associations, supported switch hardware, careful configuration and practical verification.
Recommended Next Article: Cisco VLAN Access Maps Explained — VACLs, Port ACLs and Same-VLAN Traffic Filtering.
Useful Links and References
SanchitGurukul Static Resources
Official External References
Your feedback matters
Was this post helpful?
Discussion
0 approved comments
No approved comments yet. You can start the discussion below.
Leave a Comment
No login is required. Name and email are used for moderation/security. Your email is never displayed publicly. All comments require administrator approval.
Discover more from SanchitGurukul
Subscribe to get the latest posts sent to your email.
