Network Segmentation Explained with Real-World Example

It is 2:00 AM. The SOC analyst on shift sees a SIEM alert: a laptop in the marketing department is scanning the server subnet. Minutes later, the EDR platform flags an unknown PowerShell script running on a database server. One compromised laptop has already reached a system it never needed to talk to.

That is what happens in a flat network. Once an attacker gets one foothold, every other device is reachable. Network segmentation changes that by putting controlled boundaries between groups of systems, so a single infected machine cannot reach everything else.

This guide explains how network segmentation works, the four levels you can apply, how segmentation differs from a VLAN, and a complete worked example with a zone plan, a policy matrix and a sample ACL. It finishes with how to roll segmentation out safely, how to test it, and how to troubleshoot the problems it usually causes.

Key takeaways

  • Segmentation limits lateral movement, which is how a single compromise turns into a ransomware outbreak.
  • A VLAN on its own separates traffic but does not filter it. Security comes from the policy enforced between segments.
  • Start with a few broad zones, allow only the traffic you can justify, and test in log-only mode before you enforce.
  • Microsegmentation and Zero Trust access tools apply the same idea per application and per user instead of per subnet.

What is network segmentation?

Network segmentation is the practice of dividing a network into smaller zones and controlling which traffic is allowed to cross between them. Each zone groups systems with a similar function and risk level, such as user laptops, servers, guest Wi-Fi or IoT devices.

Traffic inside a zone is usually allowed. Traffic between zones must pass through an enforcement point, such as a firewall, a router access control list (ACL) or a Zero Trust access broker, where a policy decides whether it is permitted.

MITRE ATT&CK lists network segmentation as a formal mitigation, M1030, against a wide range of attacker techniques, and recommends periodic penetration tests to confirm that unauthorized access between segments is actually blocked.

Why flat networks make ransomware worse

In a flat network, most devices share the same address space and can reach each other directly. Attackers rarely land on their final target. They land on a laptop through phishing or a stolen credential (see initial access attack vectors), then explore. MITRE groups this phase under the Lateral Movement tactic (TA0008).

Typical lateral movement uses ordinary admin protocols: SMB (TCP 445), RDP (TCP 3389), WinRM (TCP 5985/5986) and SSH (TCP 22). In a flat network, nothing stops a marketing laptop from opening these ports on a domain controller or a backup server. That is how one infected endpoint becomes encrypted file servers and deleted backups.

Hand-drawn sketch of an internal firewall blocking a compromised workstation from moving laterally to servers during a ransomware attack

Segmentation does not stop the first compromise. It shrinks the blast radius: the set of systems the attacker can reach from that first foothold. It also creates choke points where unusual connection attempts get logged, which gives your SOC a chance to detect the attack early.

The four levels of network segmentation

Segmentation is not one technology. It is a set of controls you can layer, from coarse to very fine-grained.

LevelWhere it worksWhat it separatesMain limitation
VLANsLayer 2 (switches)Broadcast domainsNo filtering by itself
Subnets, VRFs and ACLsLayer 3 (routers, L3 switches)IP ranges and routing tablesACLs are usually stateless and hard to manage at scale
Internal firewall zonesLayer 3 to Layer 7Security zones with stateful, application-aware rulesCost and rule sprawl
Microsegmentation / Zero Trust accessPer workload, user or applicationIndividual apps and serversNeeds good application inventory and identity data

Level 1: VLANs (Layer 2)

A VLAN splits one physical switch into several logical ones. Devices in VLAN 10 cannot reach devices in VLAN 20 directly at Layer 2. Traffic between them has to be routed.

The common mistake is to stop here. If a Layer 3 switch routes between all VLANs with no ACLs, every VLAN can still reach every other VLAN. You have organised the network, but you have not secured it.

Level 2: Subnets, VRFs and ACLs (Layer 3)

Each VLAN normally maps to its own IP subnet. The router or Layer 3 switch that connects them is where you apply ACLs to permit or deny traffic by source, destination, protocol and port. Larger networks also use VRFs (Virtual Routing and Forwarding) to give a business unit or tenant its own routing table, so its routes are not even visible to the others.

Whiteboard diagram of VLANs mapped to separate IP subnets with routing between them

Level 3: Internal firewall zones

An internal firewall placed between zones (users, servers, data centre, OT) adds what ACLs lack: stateful inspection, application identification, user-based rules and detailed logging. This is the usual choice for protecting high-value zones such as the server farm or a payment environment. If you are new to how firewalls make these decisions, the firewall types guide covers the basics.

Level 4: Microsegmentation and Zero Trust access

Microsegmentation applies policy to individual workloads or applications instead of whole subnets. Two servers in the same subnet can be prevented from talking to each other unless a rule allows it. This is one of the building blocks of the Zero Trust model described in NIST SP 800-207, which narrows protection from the network perimeter to individual resources.

Zero Trust Network Access (ZTNA) takes this further for users. With Zscaler Private Access (ZPA), for example, an administrator defines an application by FQDN or IP address and port, places it in an application segment, and writes access policies against segment groups. A finance user can reach the finance application on TCP 443 and nothing else. The user is never placed on the server network, so there is no subnet to scan or move across.

Diagram of identity-based microsegmentation where a verified user reaches only one approved application

For a deeper look at how this fits into a wider strategy, read the Zero Trust security guide.

Network segmentation vs VLAN: what is the difference?

A VLAN is one tool. Network segmentation is the security outcome: separated zones with enforced rules between them.

VLANNetwork segmentation
What it isA Layer 2 technique that splits a switch into logical networksA security design that limits traffic between zones
Filters traffic?No, not on its ownYes, through ACLs, firewalls or access policies
Typical tools802.1Q tagging on switchesVLANs plus ACLs, firewalls, NAC, ZTNA, host firewalls
Stops lateral movement?Only if inter-VLAN routing is restrictedYes, when policies are least-privilege

In short: you can have VLANs without segmentation, and you can have segmentation without VLANs (for example, ZTNA or host-based microsegmentation). Most enterprise networks use both.

Worked example: segmenting a 200-person office

The design below is a textbook example, not a real client network. The addresses are private ranges chosen for illustration. It shows how the concepts above turn into an actual plan.

Step A: Define the zones

ZoneVLANSubnetWhat lives here
Users1010.10.10.0/24Employee laptops and desktops
Servers5010.10.50.0/24DNS, Active Directory, file and application servers
Printers and IoT7010.10.70.0/24Printers, cameras, meeting room displays
Guest Wi-Fi90172.16.90.0/24Visitor devices, internet only
Management9910.10.99.0/24Switch, firewall and server management interfaces

Step B: Build the inter-zone policy matrix

Before writing a single rule, decide in plain language who may talk to whom. Anything not listed is denied.

From \ ToServersPrinters and IoTManagementInternet
UsersOnly required services (DNS, AD, file, app ports)Print ports only (TCP 9100, 631)DeniedAllowed through web proxy
ServersAllowed where needed (e.g. app to database)DeniedDeniedUpdates only
Printers and IoTPrint server onlyAllowedDeniedVendor update hosts only
Guest Wi-FiDeniedDeniedDeniedAllowed
ManagementSSH/RDP from admin jump hostAllowedAllowedUpdates only
Summary diagram of enterprise security zones for users, servers, IoT, guest and management networks

Step C: Translate the matrix into rules

Here is how the Users row might look as an extended ACL on a Cisco IOS Layer 3 switch, applied inbound on the users VLAN interface. The server addresses (10.10.50.10 for DNS, 10.10.50.20 for an internal web app) are examples.

ip access-list extended USERS-IN
 remark --- Allow DNS to internal resolver only ---
 permit udp 10.10.10.0 0.0.0.255 host 10.10.50.10 eq domain
 permit tcp 10.10.10.0 0.0.0.255 host 10.10.50.10 eq domain
 remark --- Allow internal web application ---
 permit tcp 10.10.10.0 0.0.0.255 host 10.10.50.20 eq 443
 remark --- Allow printing ---
 permit tcp 10.10.10.0 0.0.0.255 10.10.70.0 0.0.0.255 eq 9100
 remark --- Block and log everything else to internal ranges ---
 deny   ip 10.10.10.0 0.0.0.255 10.0.0.0 0.255.255.255 log
 deny   ip 10.10.10.0 0.0.0.255 172.16.0.0 0.15.255.255 log
 remark --- Remaining traffic goes to the internet edge ---
 permit ip 10.10.10.0 0.0.0.255 any
!
interface Vlan10
 ip access-group USERS-IN in

Three things to notice:

  • Order matters. ACLs are read top to bottom and stop at the first match, so specific permits come before the broad deny.
  • The log keyword on the deny lines sends blocked attempts to syslog, which you can forward to your SIEM to detect scanning.
  • Standard ACLs are stateless. They do not track connections. For sensitive zones, a stateful firewall is safer and easier to maintain. Real Active Directory traffic also needs more ports than shown here, so check them against Microsoft’s port requirements before enforcing.

How to roll out segmentation without breaking things

Most failed segmentation projects fail because a rule blocked something nobody knew about. This order avoids that.

  1. Inventory assets. List servers, endpoints, printers, IoT, network devices and cloud workloads. You cannot place a device in a zone if you do not know it exists.
  2. Map real traffic flows. Use firewall logs, NetFlow or your EDR’s network telemetry to see what actually talks to what over a few weeks, including month-end jobs and backups.
  3. Start with broad zones. Users, servers, IoT, guest and management are enough for a first phase. Add finer zones only when there is a clear risk or compliance reason.
  4. Write allow rules from the policy matrix. Each rule should have an owner and a business reason recorded next to it.
  5. Run in log-only mode. Put the default-deny rule in monitor mode first and review what it would have blocked. Fix missing rules before enforcing.
  6. Enforce zone by zone. Start with low-risk zones such as guest Wi-Fi, then IoT, then users to servers. Keep a rollback plan for each change window.
  7. Review regularly. Remove rules for retired systems and check for new any-to-any rules added as quick fixes.

How to test that segmentation actually works

A rule on paper is not proof. Test from inside each zone, with written approval from the network owner before you run any scan.

  • Port checks from a test machine. From a guest Wi-Fi laptop, try to reach a server port that should be blocked. On Windows: Test-NetConnection 10.10.50.10 -Port 445. The result should show TcpTestSucceeded : False.
  • Targeted scans. From each zone, scan the zones it should not reach, for example nmap -Pn -p 22,445,3389,5985 10.10.50.0/24. Filtered or closed results are what you want.
  • Log review. Confirm the denied attempts appear in the firewall or ACL logs. If they do not, you have a visibility gap even if the block works.
  • Periodic penetration tests. As MITRE recommends for M1030, include segmentation in your regular pen tests so drift is caught.

Troubleshooting: when segmentation blocks legitimate traffic

Case 1: A new server cannot resolve names

A junior engineer reports that a newly deployed marketing server cannot reach the internet. The proxy logs show no requests at all, so the problem happens earlier. The internal firewall log shows:

DENY  src=10.10.20.5 (Marketing)  dst=8.8.8.8  proto=UDP  dport=53
Whiteboard sketch of a firewall log entry denying DNS traffic from a newly segmented server

The marketing VLAN was isolated correctly, but the server was configured with a public DNS resolver and no rule allows it. The right fix is not to open UDP 53 to the internet. Point the server at the approved internal DNS resolvers and allow only that flow. Verify with nslookup technaga.com 10.10.50.10.

Lesson: always confirm the shared services every zone depends on (DNS, DHCP, NTP, authentication, patching) before enforcing a default-deny rule. The network protocols and ports guide is a useful checklist.

Case 2: Domain join or Group Policy fails after segmentation

Users in a newly segmented VLAN can browse the web but cannot log on with domain credentials, or Group Policy stops applying. Active Directory depends on several services, including Kerberos (TCP/UDP 88), LDAP (TCP/UDP 389), SMB (TCP 445), RPC Endpoint Mapper (TCP 135) and a dynamic RPC port range. Test each one from a client:

Test-NetConnection dc01.corp.example -Port 88
Test-NetConnection dc01.corp.example -Port 389
Test-NetConnection dc01.corp.example -Port 445
Test-NetConnection dc01.corp.example -Port 135

Whichever port fails is the missing rule. Allow it only from the user zone to the domain controllers, not to the whole server subnet.

Case 3: Traffic works in one direction only

A connection opens but immediately hangs, or works from A to B but not from B to A. Two usual causes:

  • Stateless ACLs. The request is permitted, but an ACL on the return path drops the reply. Either add the matching return rule or move that boundary to a stateful firewall.
  • Asymmetric routing. The request passes through one firewall and the reply returns through another path. The second firewall has no session for it and drops it. Use tracert or traceroute from both ends to compare the paths.

For a structured layer-by-layer approach to problems like these, see the OSI model troubleshooting guide.

Common network segmentation mistakes

  • Treating VLANs as security. Inter-VLAN routing with no ACLs or firewall gives you separate broadcast domains and no protection.
  • Leaving trunk ports at defaults. Using VLAN 1 as the native VLAN and allowing all VLANs on every trunk makes VLAN hopping (double tagging) easier. Set the native VLAN to an unused ID, tag it, and prune the allowed VLAN list on each trunk.
  • Over-segmenting too early. On one deployment I worked on, more than fifty VLANs had been created for an organisation with fewer than a hundred people. Nobody had an accurate diagram, and simple routing problems took hours to trace. Five well-documented zones would have been more secure in practice.
  • Forgetting the management plane. If switch and firewall admin interfaces are reachable from the user VLAN, an attacker can bypass the segmentation by reconfiguring it.
  • Temporary any-any rules. Emergency rules added during an outage and never removed slowly turn a segmented network back into a flat one.

Frequently asked questions

Does network segmentation replace a firewall?

No. Segmentation is the design, and firewalls (or ACLs, or ZTNA policies) are how you enforce it. You need both.

Is microsegmentation replacing VLANs?

Not entirely. VLANs remain useful for organising wired and wireless networks. Microsegmentation and ZTNA add finer control on top, especially for data centres, cloud workloads and remote users.

Is network segmentation required for PCI DSS?

PCI DSS does not make segmentation mandatory, but it strongly affects scope. The PCI Security Standards Council’s scoping and segmentation guidance advises starting from the assumption that everything is in scope until verified otherwise. Effective segmentation is how you prove that systems outside the cardholder data environment are out of scope.

How many segments should a small business start with?

Usually four or five: users, servers, guest Wi-Fi, IoT and printers, and a management network. Add more only when a specific risk justifies the extra rules and documentation.

Conclusion

Network segmentation will not stop every intrusion, but it decides how far an intrusion can spread. Start with a small set of zones, write a policy matrix in plain language, enforce least-privilege rules between zones, and prove the boundaries work by testing them. As your environment moves to cloud and remote work, extend the same idea with microsegmentation and Zero Trust access so that users and workloads reach only what they need.

Related TechNaga guides

References

4 thoughts on “Network Segmentation Explained with Real-World Example”

Leave a Comment