Course contentsShow
← Security
Lesson 2649 of 3,05250. Secure Architecture and DesignFree lesson

VLAN and Subnet Segmentation

Using VLANs and subnets to create network boundaries, including configuration best practices and common pitfalls.

VLAN and Subnet Segmentation

What you'll learn: How to use VLANs and subnets to create strong network boundaries that limit lateral movement and contain breaches.

The Core Idea

VLANs (Virtual Local Area Networks) and subnets are two complementary techniques for dividing a network into isolated segments. Think of them as creating separate "rooms" within your network building—instead of one open floor plan where everyone can see and access everything, you build walls that control who can communicate with whom.

Subnets operate at Layer 3 (IP addressing), dividing networks into logical groups using IP address ranges (e.g., 10.0.1.0/24 for HR, 10.0.2.0/24 for Finance). VLANs operate at Layer 2 (switching), creating broadcast domains that isolate traffic even on the same physical switch.

Configuration Best Practices

  • Match VLANs to subnets: Each VLAN should correspond to a specific subnet for clearer boundaries
  • Minimize inter-VLAN routing: Force traffic between VLANs through firewalls, not simple routing
  • Use VLAN tagging (802.1Q) on trunk ports to maintain separation across switches
  • Implement Private VLANs (PVLANs) for additional isolation within a VLAN
  • Document your segmentation scheme clearly—complexity without documentation creates blind spots
  • Segment by trust level and function: Separate guest networks, IoT devices, servers, and user workstations

Common Pitfalls

VLAN hopping attacks: Attackers exploit misconfigured trunk ports to jump between VLANs. Always disable Dynamic Trunking Protocol (DTP) and explicitly configure access vs. trunk ports.

Default VLAN usage: Never use VLAN 1 for production traffic—it's a security risk and management nightmare.

Overly complex designs: Too many tiny segments create management overhead and increase misconfiguration risk.

Key Takeaway: VLANs and subnets create network boundaries that enforce the principle of least privilege at the network level—users and systems only communicate with what they absolutely need, limiting blast radius when breaches occur.