Skip to content
TR EN
5 min read · · UK Bilişim Network Engineering Team

Subnetting for Network Security: DMZ and Isolated Network Design

For many network administrators and students, subnetting first looks like a purely mathematical exercise for using a limited number of IP addresses efficiently. In modern security architecture, however, subnetting is much more than an addressing method: it is the foundation the network's defensive lines are built on.

In a "flat network", where every device sits in the same broadcast domain, an attacker who gets in once can easily reach every other device. This is where subnetting for network security comes in: it shrinks the attack surface and brings traffic under control.

Network Segmentation and Cybersecurity

Network segmentation means splitting a large network into smaller, isolated parts. From a security perspective its biggest benefit is reducing the risk of lateral movement.

Lateral movement is how an attacker who has compromised a poorly protected device (for example a printer or an old PC) jumps to critical servers or databases in the same segment. If your network is properly divided into subnets with strict traffic rules between them, the first obstacle the attacker meets, the segment boundary, stops their progress or gets them detected.

Key benefits of segmentation:

  • Smaller blast radius: when a breach happens, the impact is limited to the affected subnet.
  • Better performance: broadcast traffic stays inside its own subnet instead of flooding the whole network.
  • Auditability: when departments or services live in different subnets, it is much easier to analyze which source is trying to reach what.

What Is a DMZ and How Do You Plan One?

A DMZ (demilitarized zone) is an intermediate zone where services that must be reachable from the internet are fully isolated from the internal LAN. Web servers, FTP servers and email gateways usually live here.

The logic: outside users need to reach your website, but they must never reach the internal file server or accounting system.

DMZ planning strategy:

  1. Isolation: define the DMZ with a CIDR block separate from the internal network.
  2. Two-sided control: filter traffic from the internet to the DMZ, and control traffic from the DMZ to the internal network with far stricter rules (or block it entirely).
  3. Least privilege: apply firewall rules so that if a DMZ server is compromised, the attacker cannot move into the internal network.

Choosing the Right Subnet Size for the Management Network

One of the biggest mistakes in enterprise networks is keeping the management interfaces of switches, routers, firewalls and servers (SSH, HTTPS, SNMP) in the same subnet as regular users. Any user can then reach the login screens of network devices, by accident or on purpose.

A management network is a separate subnet that only authorized administrators can reach; its most secure form is an out-of-band (OOB) management network that is also physically separated from user traffic. It usually holds few devices, so large blocks are unnecessary. For example, in an environment with 10 network devices, small specific prefixes such as /28 (14 usable hosts) or /29 (6 usable hosts) keep things tidy and easy to manage.

Isolating IoT and Guest Networks from the Main Network

Smart cameras, sensors and guest Wi-Fi create serious security gaps today. Cheap IoT devices in particular are rarely updated and full of vulnerabilities.

  • IoT subnet: smart devices should be confined to their own subnet and allowed out only to the cloud services they need. They should have no access to internal resources.
  • Guest subnet: internet access for guests must be completely cut off from server segments holding company data. A guest network usually reaches only the internet gateway and is closed to every internal subnet.

Worked Example: Security-Focused CIDR Plan for a Company Network

Say you are designing a network for a mid-sized business and have a 192.168.10.0/24 block. With a security-first approach you could split it like this:

Segment Purpose Preferred Prefix Usable Hosts Why This Size?
User network Staff PCs /25 126 Most endpoints live here.
Server zone Critical data/DB /26 62 Few servers but high security needs.
DMZ Web/mail servers /27 30 Only a few internet-facing services.
Management Switch/router MGMT /28 14 Enough for network equipment only.
IoT/Other Cameras/sensors /28 14 A small but isolated group.

How it adds up: the table applies variable length subnet masking (VLSM) based on need. Placing the blocks from largest to smallest fills the /24 exactly (128 + 64 + 32 + 16 + 16 = 256 addresses):

Segment Subnet Usable range Broadcast
User network 192.168.10.0/25 .1 – .126 .127
Server zone 192.168.10.128/26 .129 – .190 .191
DMZ 192.168.10.192/27 .193 – .222 .223
Management 192.168.10.224/28 .225 – .238 .239
IoT/Other 192.168.10.240/28 .241 – .254 .255

For example, choosing /28 for the management network gives 2^(32−28) = 16 total addresses and 16 − 2 = 14 usable hosts (the network and broadcast addresses are excluded). Because the block is completely full, there is no room to grow; a real design might prefer a larger block (for example a separate /24 per segment).

Traffic Control After Segmentation: ACLs and Firewalls

Remember that splitting into subnets does not provide security on its own. Routers forward traffic between subnets by default. Real security comes from the access control list (ACL) and firewall rules placed on those boundaries.

Security scenario:

  • Rule 1: User_Subnet → Server_Subnet (only ports 443 and 80 allowed, everything else DENY).
  • Rule 2: DMZ_Subnet → Internal_LAN (ALWAYS DENY).
  • Rule 3: Any → Management_Subnet (allowed only from specific admin IPs).

With these rules you get an ecosystem where segments are logically separated and secure even though they are physically connected.

Security Risks of Poor Subnet Planning

A badly planned subnet layout causes more than performance problems:

  1. Overlapping ranges: overlapping IP ranges send traffic to the wrong destination or leave some devices unreachable.
  2. Oversized subnets: subnets much larger than needed (for example making everything a /16) increase broadcast traffic, let an attacker scan the network unhindered and make lateral movement easier.
  3. Undocumented configuration: if nobody records which CIDR block serves which purpose, it becomes hard to decide which port to shut down in an emergency.

To check your calculations quickly while you plan your network, use the subnet calculator. Enter CIDR values to see network addresses, broadcast details and wildcard masks instantly.

Frequently Asked Questions (FAQ)

Does subnetting slow down internet speed? →

No. It does not affect internet speed; on the local network it usually helps, because it limits broadcast traffic. Traffic between subnets passes through a router or firewall, so that device needs enough capacity.

Should I create a separate subnet for every device? →

No, that leads to unmanageable complexity. The right approach is to group devices with similar security levels and access needs (for example, putting all accounting PCs in one subnet).

Does a DMZ require a separate physical switch? →

Not necessarily. Modern networks use VLANs to create fully isolated subnets on the same physical hardware.

When are /30 or /31 prefixes used? →

On direct links between two points (point-to-point), such as WAN links between two routers; /31 eliminates address waste entirely (/31 and RFC 3021).

Network Engineering Toolset

All calculations execute client-side in your browser.

11 tools