Subnetting Explained Simply
By ToolzHive · · 3 min read
Subnetting is the part of networking that makes people's eyes glaze over, yet the core idea is simple: split one big block of IP addresses into smaller, tidy pieces. Once the /24 notation clicks, the rest is arithmetic.
Why split a network at all
A single flat network of thousands of devices is a bad idea. Broadcast traffic floods everywhere, a problem on one machine affects all of them, and you cannot apply different security rules to different groups. Subnetting carves one address block into smaller subnets so you can separate, say, servers from staff laptops from guest Wi-Fi — each with its own range, rules and boundaries.
An address has two halves
An IPv4 address has two parts: a network portion that identifies the subnet, and a host portion that identifies a device within it. The subnet mask decides where the split falls.
The clearest way to write this is CIDR notation — the /24 you see after an address. The number is simply how many bits belong to the network. The rest are host bits.
/24→ 24 network bits, 8 host bits./16→ 16 network bits, 16 host bits./28→ 28 network bits, 4 host bits.
More network bits means more subnets but fewer hosts in each; fewer network bits means the opposite. It is a seesaw.
Counting the addresses
The host bits tell you the size. With h host bits, a subnet holds 2^h addresses:
/24has 8 host bits →2^8= 256 addresses./26has 6 host bits →2^6= 64 addresses./30has 2 host bits →2^2= 4 addresses.
Two of those are always reserved: the network address (all host bits 0, naming the subnet itself) and the broadcast address (all host bits 1, used to reach everything in the subnet). So the number of usable host addresses is 2^h − 2. A /24 gives 254 usable hosts; a /30 gives just 2 — exactly right for a point-to-point link between two routers.
A worked example
Take 192.168.1.0/24. You want four equal subnets. To make four pieces you need 2 more network bits (2^2 = 4), so you move from /24 to /26. Each /26 has 64 addresses:
192.168.1.0/26— hosts .1 to .62, broadcast .63192.168.1.64/26— hosts .65 to .126, broadcast .127192.168.1.128/26— hosts .129 to .190, broadcast .191192.168.1.192/26— hosts .193 to .254, broadcast .255
Notice the subnets step in blocks of 64 — the size of each subnet. That "block size" trick is the fast way to do subnetting in your head.
The rules of thumb
- Borrow bits from host to network to make more, smaller subnets.
- Block size = subnet size, and subnets start at multiples of it.
- Subtract 2 from the total for usable hosts.
- Size up, not down. Running out of addresses in a subnet later is painful, so leave headroom.
IPv6 is easier here
IPv6 subnetting follows the same bit-splitting logic but with so many addresses that you rarely count hosts — a /64 is the standard subnet and holds more addresses than the entire IPv4 internet. The planning shifts from "do I have enough?" to simply organising the hierarchy.
Working the maths by hand is error-prone, and an off-by-one on a boundary can take down a link. Calculating an IPv4 subnet's range, usable hosts and broadcast address, planning IPv6 subnets, and converting CIDR notation to an explicit address range all run from your browser — so you can design a clean addressing scheme and double-check every boundary before you configure a single device.