Subnetting Worked Examples: Splitting a /24 Without the Headache
You have one /24 and three departments asking for addresses. Subnetting looks like binary-math gymnastics until you notice that almost every split comes down to one rule: the block size. Below are two complete worked examples — an even split into four subnets, then a split sized to what each department needs — plus three sanity checks. Every number here can be verified with the subnet calculator.
The block-size shortcut (forget binary math)
Every IPv4 address is 32 bits long. The prefix after the slash counts how many bits belong to the network; the rest belong to hosts. A block always contains a power-of-two number of addresses, and the sizes you need fit one short list: /25 blocks are 128 addresses, /26 are 64, /27 are 32, /28 are 16, and /30 are 4.
The shortcut: in the last octet, every network address must be a multiple of the block size. Carving /26s out of a /24 means each network ends in 0, 64, 128, or 192 — anything else, like 192.168.1.32/26, is not a network address at all. One rule replaces all the binary math.
Worked example: four equal subnets from one /24
Start with 192.168.1.0/24. Four equal subnets means borrowing two host bits, which moves the prefix from /24 to /26 and gives a block size of 64. Walk the last octet in steps of 64 and the four subnets write themselves.
| Subnet | Usable hosts | Broadcast |
|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 192.168.1.63 |
| 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 192.168.1.127 |
| 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 |
| 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 192.168.1.255 |
Each subnet holds 64 addresses, 62 of them usable — the network and broadcast addresses are reserved. In dotted-decimal form, /26 is 255.255.255.192, and each broadcast address is one less than the next network address.
Worked example: fitting subnets to departments
Equal splits waste addresses. When requirements differ, allocate from the largest need downward, because every block must be a power of two. Take 10.10.0.0/24: Sales needs 100 hosts, Engineering 50, Guests 25, and a WAN link needs 2.
Sales needs 100 usable addresses, so the next power of two up is 128 — a /25 with 126 usable, taking 10.10.0.0/25. Engineering's 50 hosts fit a /26 (62 usable) at 10.10.0.128/26, the next multiple of 64. Guests need 25, so a /27 with 30 usable at 10.10.0.192/27. The WAN link takes a /30 — exactly two usable addresses — at 10.10.0.224/30. Everything from 10.10.0.228 up stays free for growth.
| Department | Requirement | Subnet | Usable range | Broadcast |
|---|---|---|---|---|
| Sales | 100 hosts | 10.10.0.0/25 | 10.10.0.1 – 10.10.0.126 | 10.10.0.127 |
| Engineering | 50 hosts | 10.10.0.128/26 | 10.10.0.129 – 10.10.0.190 | 10.10.0.191 |
| Guests | 25 hosts | 10.10.0.192/27 | 10.10.0.193 – 10.10.0.222 | 10.10.0.223 |
| WAN link | 2 addresses | 10.10.0.224/30 | 10.10.0.225 – 10.10.0.226 | 10.10.0.227 |
This technique — variable-length subnet masking, or VLSM — keeps a /24 from running out after the first two departments. Order matters: place the /25 last and it will not fit around the smaller blocks.
Checking your work: the three sanity checks
First, the multiples rule: every network address ends in a multiple of its block size. Second, broadcast arithmetic: each broadcast address is one less than the next network address, so overlapping or unexplained gaps mean a mistake. Third, capacity: usable hosts per subnet are 2^(32 − prefix) − 2, and your blocks must total no more than the 256 addresses you started with.
One practical habit remains: check the answer against the requirement — a department with 60 laptops does not fit in a /27. Once the numbers pass all three checks, paste them into your router config with confidence — and if you are working from a start and end range instead of a prefix, run them through the IP range to CIDR converter first.
Subnet Calculator — enter any IPv4 address with a prefix to get the network, broadcast, usable host range, and mask, with every boundary calculated instantly.
Related tools: CIDR Calculator · IP Range to CIDR