Subnetting always looked like one of those topics in networking that people either pretended to understand or avoided completely. I was in the second group for a long time.
Until I found the Practical Networking channel on YouTube. Hands down, their explanation made things finally click without making me feel dumb. These are the notes I built while learning, written in simple language for anyone who struggles with subnetting like I did.
Subnetting Basics (in Plain English)
Before solving anything, you need to understand what you’re actually calculating.
Network ID
- This is where the network range starts.
Broadcast IP
- This is where the network range ends.
First Host IP
- The first usable IP address in the range. It is always Network ID + 1.
Last Host IP
- The last usable IP address in the range. It is always Broadcast IP — 1.
Next Network
- The next network starts immediately after the current Network ID.
Number of IP Addresses
- The total number of IP addresses inside the network.
CIDR / Subnet Mask
- CIDR looks like
/24. - Subnet mask looks like
255.255.255.0. - Both represent the same thing in different formats.
The Cheat Sheet that Saves Your Brain
128 64 32 16 8 4 2 1 == Group Size
128 192 224 240 248 252 254 255 == Subnet Mask
/25 /26 /27 /28 /29 /30 /31 /32 == CIDRThis table is your best friend while subnetting.
The 7-Step Subnetting Method
Once you know the CIDR, follow this method.
- Find the column using the CIDR notation
Locate the Group Size from the cheat sheet. - Start from
.0in the relevant octet of the IP address and keep adding the Group Size until you pass the target IP. - The number before the target IP is the Network ID.
- The number after the target IP is the Next Network.
- The IP before the Next Network is the Broadcast IP.
- The IP after the Network ID is the First Host IP.
- The IP before the Broadcast is the Last Host IP.
- The Group Size is the total number of IP addresses.
Example Problem
Problem:
216.221.135.229/27
Network ID: 216.221.135.224
Broadcast IP: 216.221.135.255
First Host IP: 216.221.135.225
Last Host IP: 216.221.135.254
Next Network: 216.221.136.0
Number of IP Addresses: 32
Usable Addresses: 30
CIDR / Subnet Mask: 255.255.255.224This is where subnetting actually started making sense for me.
What About CIDR Notations Before /25?
Now things get interesting.
When the CIDR is before /25, the subnetting moves to the 3rd octet.
Here’s the mapping:
/17 /18 /19 /20 /21 /22 /23 /24 == 3rd OctetThat means instead of modifying the 4th octet, your subnet mask now affects the 3rd octet.
The logic stays the same. Only the octet that changes is different.
So instead of working like this:
10.10.10.xYou start working like this:
10.10.x.0You keep increasing the Group Size in the 3rd octet until you pass the target value.
The same 7 steps still apply.
Finding the Number of IP Addresses
The formula is simple:
2^(32 - CIDR)Steps:
- Subtract the CIDR from 32
- Use the result as the power of 2
Example:
/27 → 32 - 27 = 5
2^5 = 32 IP addressesFor smaller CIDR numbers, this number becomes much larger because more bits are available for hosts.
What About the 2nd and 1st Octets?
Same logic, different octet.
/9 to /16 == 2nd Octet
/1 to /8 == 1st OctetAll that changes:
• The octet where Group Size increments
• The Subnet mask structure
• The total number of IP addresses
The process itself stays exactly the same.
Final Thoughts
Subnetting isn’t hard. It’s just badly explained most of the time.
Once you understand how Group Size works and how to move across octets, it becomes more like a pattern than a problem.
Hands down, Practical Networking made this topic feel logical instead of scary. If you’re stuck with subnetting, their explanations are worth it.
If this finally clicked for you, Welcome to the “I no longer fear CIDR” club.