Subnetting Finally Clicked
I could never remember subnetting. Then I stopped trying to memorise it and started asking why. This is how it actually clicked.
I’ve heard “subnetting” my entire career. I’ve nodded along in meetings where people talk about /24s and subnet masks and CIDR notation. And I could never actually hold it in my head — I’d learn it, pass a test or whatever, and it would evaporate.
The problem was I was trying to memorise it without understanding what any of it was for.
Back to basics — what’s a host?
A host is just any device with an IP address. Your laptop, phone, a printer, a server. Anything that sends or receives data on a network.
An IP address identifies two things at once: which network the device is on, and which device on that network. Like a street name and a house number in the same address.
192.168.1.10 /24 splits like this:
192.168.1= the street.10= the house number on that street
The “host bits” are the bits reserved for the house-number part.
Why subnetting exists
Without subnetting, every device on a network would be constantly broadcasting to every other device — shouting “is this packet for you? is this for you?” to the entire network for every discovery request. Modern hardware handles 50 devices fine, but at thousands of devices in a big office, that broadcast traffic grinds things to a halt.
Subnetting puts walls up. Instead of one giant warehouse where everyone hears every shout, you divide it into rooms. A broadcast in Sales stays in Sales. HR doesn’t hear it. The router sits between the rooms and controls what crosses between them.
That’s it. Subnetting is just zoning.
The subnet mask is just a line
An IP address is 32 bits. The subnet mask just draws a line somewhere in those 32 bits — everything to the left is the network (street), everything to the right is the host (house number).
/24 means the line falls after bit 24 — the first 3 octets are the network, the last octet is for hosts.
/26 means the line falls 2 bits into the 4th octet. Which is why three addresses that look like they’re on the “same street” in decimal — 192.168.1.0, 192.168.1.64, 192.168.1.128 — are actually on different subnets. The decimal dots are for humans. The computer sees 32 bits and draws the line exactly where the mask says.
The thing that finally made this concrete for me: look at the last octet in binary.
1
2
3
192.168.1.0 → last octet: 00 | 000000
192.168.1.64 → last octet: 01 | 000000
192.168.1.128 → last octet: 10 | 000000
With /26, those first two bits (shown before the |) are part of the network. 00, 01, 10 — different street names, even though the decimal looks the same.
The formula — three steps
Everything comes from this:
Step 1: 32 - slash number = host bits
Step 2: 2^host bits - 2 = usable hosts per subnet
(minus 2 because the first address is the network address and the last is broadcast — both unusable)
Step 3: 2^host bits = jump size → build your subnet table from 0, counting up by the jump size
That’s the whole thing.
The cheat table (for the last octet, starting from /24)
| CIDR | Host bits | Jump size | Usable hosts | Subnets |
|---|---|---|---|---|
| /24 | 8 | 256 | 254 | 1 |
| /25 | 7 | 128 | 126 | 2 |
| /26 | 6 | 64 | 62 | 4 |
| /27 | 5 | 32 | 30 | 8 |
| /28 | 4 | 16 | 14 | 16 |
| /29 | 3 | 8 | 6 | 32 |
| /30 | 2 | 4 | 2 | 64 |
| /31 | 1 | 2 | 1 | 128 |
| /32 | 0 | 1 | 0 | 256 |
/32 is a real thing — it means one specific IP address. Used in routing rules when you want to route one exact address somewhere specific.
A worked example — /27
Network: 192.168.1.0 /27
- Host bits:
32 - 27 = 5 - Usable hosts:
2^5 - 2 = 30 - Jump size:
2^5 = 32
Subnet table (last octet):
1
2
3
4
5
6
7
8
0 to 31 → first subnet
32 to 63 → second subnet
64 to 95 → third subnet
96 to 127 → fourth subnet
128 to 159 → fifth subnet
160 to 191 → sixth subnet
192 to 223 → seventh subnet
224 to 255 → eighth subnet
Where does 192.168.1.100 live? Between 96 and 127 — fourth subnet.
- Network address:
192.168.1.96 - Broadcast address:
192.168.1.127 - Usable hosts:
.97to.126(30 hosts — matches what we calculated)
Another one — /29
Network: 192.168.20.0 /29
- Host bits:
32 - 29 = 3 - Usable hosts:
2^3 - 2 = 6 - Jump size:
2^3 = 8
Where does 192.168.20.50 live? Jump table goes 0, 8, 16, 24, 32, 40, 48, 56… 50 falls in the range 48 to 55 — seventh subnet.
- Network:
.48 - Broadcast:
.55 - Usable:
.49to.54
And the usable count (6) matches what we calculated in step 2. That’s your sanity check — if those two numbers don’t match, you made a mistake somewhere.
The verification trick
Always check that your usable host range contains exactly 2^host bits - 2 addresses. For /29 that’s 6. Count .49, .50, .51, .52, .53, .54 — six addresses. If it doesn’t match, start over from step 1.
What /24 actually means vs /16
This was a confusion point for me — does the subnet change at the 255.255.0.0 level?
No. The mask has nothing to do with where the decimal dots fall. /16 means the line falls after bit 16 — the first two octets are the network. So 192.168.1.x and 192.168.2.x would be on the same network at /16, but different networks at /24.
The dots are just readability. The computer doesn’t care about them.