Cisco Private VLAN (PVLAN) Port Isolation
Isolate client devices within local subnets using switch port protection while keeping default gateway routing active.
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).
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 |
Figure 2. Dual-Path Traffic Confinement: Blocked Peer Traffic vs Active Default Gateway Uplink
Step-by-Step Hands-On Configuration Walkthrough
Create Departmental VLANs on Switch SW1
Enter configuration mode on SW1 and create the three departmental VLANs with their respective identification numbers:
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:
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:
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:
- 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.
