Cisco Private VLAN (PVLAN) Port Isolation

M. Ichsanul Fadhil•November 21, 2026•7 min read

Isolate client devices within local subnets using switch port protection while keeping default gateway routing active.

private-vlan.simneta
Topology Preview

In modern networks, separating departments into distinct VLANs is a standard design. Engineers assign Engineering to VLAN 10, HR to VLAN 20, and Sales to VLAN 30. An inter-VLAN router or firewall prevents users in Sales from inspecting private files in Engineering.

However, this design leaves a critical blindspot within each broadcast domain: horizontal peer-to-peer traffic. In typical hotels, shared co-working spaces, and multi-tenant cloud hosting, dozens of devices share the exact same subnet. If one guest laptop gets infected with worm malware or ransomware, the infected computer scans and attacks adjacent computers in the same VLAN within seconds over local ARP and SMB ports.

Traditional subnets permit all devices on the same wire to communicate directly without passing through a router. To stop malware from jumping sideways between neighbors, we need hardware-level port confinement: Cisco Private VLAN Edge (Protected Ports).

Lateral Movement Attack Containment: Standard VLAN Vulnerability vs Private VLAN Edge

Figure 1. The Lateral Movement Threat: Standard VLAN Vulnerability vs Private VLAN Edge Protection

Cisco Protected Port Architecture: Layer 2 Forwarding Rules

Cisco Private VLAN Edge (also known as protected ports) isolates client interfaces on Catalyst switches at Layer 2. The switch hardware ASIC enforces three strict traffic forwarding rules:

Traffic Direction Forwarding Status Switch Behavior & Hardware Action
Protected → Protected BLOCKED (Drop) Switch drops all L2 unicast, multicast, and broadcast frames.
Protected → Unprotected PERMITTED (Forward) Client traffic forwards out uplink ports to default gateway.
Unprotected → Protected PERMITTED (Forward) Return traffic from gateway router delivers downstream to clients.

This architectural design saves valuable IP address space. Instead of slicing a network into tiny /30 subnets with separate gateway addresses, an entire building of 200 users can sit inside a single /24 subnet while remaining completely isolated from each other.

Departmental VLAN Mapping & Addressing Plan

Our topology centers on access switch SW1 connected to distribution router R1. Six user workstations are spread across three distinct departments:

Device Interface IP Address / Role Port Security Mode
R1 Gi0/0 10.0.0.62/26 VLAN 10 Engineering Gateway
R1 Gi0/1 10.0.0.126/26 VLAN 20 HR Gateway
R1 Gi0/2 10.0.0.190/26 VLAN 30 Sales Gateway
SW1 Gi0/1 - Gi2/1 Gateway Uplinks to R1 Unprotected Uplink
PC1, PC2 Fa3/1, Fa4/1 10.0.0.1, 10.0.0.2 VLAN 10 Protected
PC3, PC4 Fa5/1, Fa6/1 10.0.0.65, 10.0.0.66 VLAN 20 Protected
PC5, PC6 Fa7/1, Fa8/1 10.0.0.129, 10.0.0.130 VLAN 30 Protected
Dual-Path Traffic Confinement: Blocked Peer Traffic vs Active Default Gateway Uplink

Figure 2. Dual-Path Traffic Confinement: Blocked Peer Traffic vs Active Default Gateway Uplink

Step-by-Step Hands-On Configuration Walkthrough

1

Create Departmental VLANs on Switch SW1

Enter configuration mode on SW1 and create the three departmental VLANs with their respective identification numbers:

# Configure departmental VLANs:
SW1(config)# vlan 10
SW1(config-vlan)# name Engineering
SW1(config-vlan)# vlan 20
SW1(config-vlan)# name HR
SW1(config-vlan)# vlan 30
SW1(config-vlan)# name Sales
SW1(config-vlan)# exit
2

Assign Access Ports and Gateway Uplinks

Place each client-facing interface into its corresponding access VLAN, and connect the GigabitEthernet uplink interfaces to router R1:

# Assign VLAN 10 ports:
SW1(config)# interface range FastEthernet3/1 - 4/1
SW1(config-if-range)# switchport mode access
SW1(config-if-range)# switchport access vlan 10
# Assign VLAN 20 and 30 ports:
SW1(config)# interface range FastEthernet5/1 - 6/1
SW1(config-if-range)# switchport mode access
SW1(config-if-range)# switchport access vlan 20
SW1(config)# interface range FastEthernet7/1 - 8/1
SW1(config-if-range)# switchport mode access
SW1(config-if-range)# switchport access vlan 30
3

Enable Private VLAN Edge Port Protection

Turn on port protection on all client-facing access interfaces. Keep the router uplink interfaces (Gi0/1, Gi1/1, Gi2/1) unprotected so downstream clients can forward packets upstream:

# Enable switchport protection across client interfaces:
SW1(config)# interface range FastEthernet3/1 - 8/1
SW1(config-if-range)# switchport protected
SW1(config-if-range)# exit
# Verify port status:
SW1# show interfaces FastEthernet3/1 switchport
Administrative Mode: static access
Operational Mode: static access
Protected: true
4

Verify Intra-Subnet Isolation & Gateway Reachability

Test horizontal isolation from PC1 to its neighbor PC2 in VLAN 10. The switch ASIC drops the frame immediately. Next, ping default gateway 10.0.0.62 to confirm upstream communication works normally:

# 1. Test ping to neighbor in the same VLAN (Blocked):
PC1> ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)
# 2. Test ping to default gateway (Permitted):
PC1> ping 10.0.0.62
Pinging 10.0.0.62 with 32 bytes of data:
Reply from 10.0.0.62: bytes=32 time<1ms TTL=255
Reply from 10.0.0.62: bytes=32 time<1ms TTL=255
Reply from 10.0.0.62: bytes=32 time<1ms TTL=255
Reply from 10.0.0.62: bytes=32 time<1ms TTL=255
Ping statistics: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Key Takeaways: Cisco Private VLAN Edge
  • Lateral Attack Surface Elimination: Protected ports prevent infected workstations from probing or compromising other hosts in the same subnet.
  • Hardware ASIC Dropping: Traffic between protected ports is dropped directly in switch hardware, offloading work from upstream routers and firewalls.
  • IP Address Conservation: Enables micro-segmentation across hundreds of endpoints within a single subnet without consuming multiple IP blocks.
  • Unprotected Gateway Uplinks: Upstream ports connected to routers or core switches must stay unprotected so clients can access default gateways and internet services.

Discussion & Community Notes

Ask questions, share configuration solutions, or discuss this practice lab.

0 Comments
Posting as Guest • 1-level replies supported