1. Library
  2. Routing and Networks
  3. Vlans

Updated 10 hours ago

Most networks are one compromised laptop away from total breach. An attacker who gets a foothold on any device can reach every other device—the database servers, the payment systems, the domain controllers. Everything talks to everything.

Network segmentation changes this equation. Instead of one big network where any device can reach any other, you create compartments. When (not if) something gets compromised, the walls contain the damage.

Think of it like compartments in a ship. Water will eventually get in somewhere—a collision, a leak, a mistake. The question isn't whether the hull will be breached. The question is whether one breach sinks the ship or just floods one compartment while the rest stays dry.

The Core Principles

Assume breach. Design your segmentation assuming attackers will eventually compromise something. Your job is containing that breach, not preventing all breaches (impossible) but limiting how far they spread.

Least privilege at the network level. Devices and users should only reach what they need. The HR workstation doesn't need access to the production database. The guest laptop doesn't need to see internal file servers. Segmentation enforces this.

Defense in depth. Segmentation is one layer. Even if attackers cross a segment boundary, they face firewalls, authentication requirements, and encryption. Multiple walls, not just one.

Trust-Based Segmentation

The most fundamental division is by trust level:

Trusted segments contain corporate-managed devices with full security controls—your employees' company-issued workstations.

Semi-trusted segments hold devices with some management but higher risk—employee personal phones on BYOD programs, partner systems with limited access.

Untrusted segments isolate devices with no corporate management—guest Wi-Fi users, visitor laptops, many IoT devices.

High-security segments protect your most sensitive systems—payment processing, customer databases, proprietary research. Strictest access controls, most monitoring.

Infrastructure segments separate your network equipment's management interfaces from everything else. If attackers compromise a user workstation, they shouldn't be able to reconfigure your switches.

Functional Segmentation

Within trust levels, segment by function:

By department: Engineering, Sales, HR, and Finance each get segments with access to their resources and restrictions on reaching others.

By server type: Web servers, database servers, application servers, and file servers in separate segments. A compromised web server can't directly attack the database.

By device type: Workstations, phones, printers, IoT devices, building automation—each with policies appropriate to that device category.

By environment: Production, development, testing, and staging in separate segments. A developer's experiment can't accidentally take down production.

By compliance requirement: PCI DSS mandates payment card data isolation. HIPAA requires protected health information segmentation. These aren't optional.

Guest and BYOD: Complete Isolation

Guest networks should reach the Internet and nothing else. Guests can browse the web and check email. They cannot reach your file servers, your printers, or your internal applications. Period.

BYOD sits in the middle—more access than guests (maybe email and collaboration tools) but less than corporate devices (no access to sensitive systems).

Make the segmentation obvious. "Company-Employees" and "Company-Guest" as separate SSIDs tell users what they're connecting to. Behind the scenes, these map to completely isolated VLANs.

Rate-limit guest and BYOD segments so someone streaming video doesn't consume bandwidth your business systems need.

IoT: Assume the Worst

IoT devices are often unmanageable—you can't install security software on a smart thermostat or actively monitor a networked camera. Segmentation becomes your primary security control.

IoT devices typically need to reach specific cloud services and nothing else. They don't need access to your internal network. They don't need to browse the arbitrary Internet. Firewall rules enforce these narrow paths.

Printers deserve special mention. They're common attack vectors with full network stacks and often poor security. Put them in their own segment where users can print but the printers can't reach sensitive systems.

Operational technology—industrial controls, building automation, physical security systems—gets the strongest isolation. A compromised corporate workstation must not be able to reach the factory floor or the HVAC controls.

The Critical Rule: Default Deny

Start with the assumption that no communication between segments is permitted. Then explicitly allow only what's required.

This is the opposite of how most networks evolve. Usually everything can talk to everything, and administrators occasionally block specific bad things. That's default allow. It's easy to set up and catastrophic when breached.

Default deny means documenting every permitted flow: "Workstations need HTTPS to these specific web servers for application access." It means opening only the ports and protocols required—not entire subnets, but specific services to specific destinations.

This creates work upfront. Applications break during implementation because they relied on implicit access that's now blocked. But you discover those dependencies and document them, and you end up with a network where you actually know what's supposed to communicate with what.

VLAN Implementation Details

Subnet sizing: A /24 (254 addresses) works for most segments. Large segments might need /23 or /22. Very small segments can use /28 or /29.

Numbering schemes: Be consistent. Number by location (VLANs 10-19 for building 1, 20-29 for building 2) or by function (10s for users, 20s for servers, 30s for voice). Either works; inconsistency doesn't.

Native VLAN security: Change the native VLAN from default VLAN 1 to an unused VLAN. This prevents certain VLAN hopping attacks. Don't use the native VLAN for production traffic.

VLAN pruning: Only allow necessary VLANs on trunk links. If a switch only has devices in VLANs 10, 20, and 30, prune everything else from its trunks.

Remember Layer 3: VLANs provide Layer 2 segmentation only. Without proper routing policies and access controls, devices in different VLANs can still communicate freely through your router. VLANs without firewall rules are walls without doors locked.

Wireless Considerations

Multiple SSIDs map to different VLANs. Corporate employees join one network; guests join another. The segmentation is invisible to users but absolute.

Dynamic VLAN assignment goes further—the same SSID places different users in different VLANs based on their authentication. An IT admin and a guest contractor might join the same "Company-Secure" network but end up in completely different segments based on their credentials.

Client isolation prevents wireless devices from talking directly to each other, even within the same segment. This matters most for guest and BYOD networks where you don't control the devices.

Micro-Segmentation: Going Further

Traditional segmentation divides networks into subnets. Micro-segmentation goes smaller—isolating individual applications, workloads, or even processes.

In a three-tier web application, the web servers, application servers, and databases might each be micro-segments. The web servers can talk to the application tier. The application tier can talk to the database. Nothing else can reach the database directly.

Zero Trust architecture assumes all networks are hostile, requiring authentication and authorization for every access regardless of source. Micro-segmentation enforces these policies at a granular level.

Software-defined networking makes this practical by automating policy enforcement as workloads spin up, move, or disappear.

Monitoring: Seeing What's Happening

Segmentation without visibility is guessing. You need to know what traffic flows between segments, what's normal, and what's anomalous.

Flow monitoring (NetFlow, sFlow, IPFIX) reveals traffic patterns. Log inter-segment traffic—both permitted and denied. Integrate with your SIEM to correlate network events with other security signals.

Establish baselines. When you know what normal looks like, abnormal patterns stand out. If the guest segment suddenly shows traffic toward your database segment, something is very wrong—that should never happen.

Alert on unexpected flows. Don't just log; actively notify when segmentation is violated or when traffic patterns deviate from baseline.

Common Mistakes

Over-segmentation: Fifty VLANs when ten would suffice creates operational complexity without security benefit. Every segment needs management, documentation, and policy maintenance.

Under-segmentation: One VLAN for all servers means compromising any server gives access to all servers. Flat networks provide no containment.

Inconsistent implementation: Segmentation enforced in some places but not others gives false confidence. Attackers find the gaps.

Forgetting Layer 3: VLANs separate broadcast domains but don't prevent routing. Without access controls on your router or firewall, segmentation is theater.

No documentation: Future administrators need to understand what segments exist, why they exist, and what belongs in each. Undocumented segmentation becomes unmaintainable.

Set and forget: Networks evolve. Applications change. New devices appear. Segmentation requires periodic review, not just initial implementation.

Migration: Getting There from Here

Moving from a flat network to proper segmentation takes planning.

Start with easy, low-risk segments—guest networks are ideal. Get comfortable with the process before tackling production-critical systems.

Run segmented infrastructure in parallel with existing networks during migration. Move devices gradually, watching for breakage.

Communicate with application owners. They know what their systems need to reach. Segmentation will block implicit dependencies they never documented—better to discover these in planning than in production outages.

Monitor heavily during migration. When applications break, you need to quickly identify what communication was allowed before and blocked now.

Validation: Proving It Works

Test your segmentation. Penetration testers should attempt lateral movement between segments, verifying isolation actually works.

Regularly validate policies—allowed traffic should work, blocked traffic should fail. Configuration drift happens; verify periodically.

Check documentation against reality. What's configured should match what's documented. Discrepancies indicate either documentation or configuration errors.

Frequently Asked Questions About Network Segmentation

Was this page helpful?

😔
🤨
😃
Network Segmentation Best Practices • Library • Connected