IPv4 Subnetting, Part 2 —
The Magic Number, the Octet of Interest, and the Subnetting Workflow
Subnetting is one of the most important skills in networking — and one of the most intimidating when you’re first learning it. In Part 1 of this series, you learned the foundations: CIDR notation, borrowing bits, and how AND‑ing determines network boundaries.
In Part 2, we take those ideas and turn them into a repeatable, mechanical workflow you can use for any subnetting problem.
This article walks you through every concept from the lesson so you can follow along even if you haven’t watched the video yet.
1. The Subnet Mask Table —
Your Reference Point
Before you calculate anything, you need a quick way to understand how subnet masks behave. The Subnet Mask Table gives you three things:
The traditional IPv4 class ranges (A, B, C)
The value of the “bits borrowed” in the octet of interest
The binary scale (128 → 1)
Even though modern networks use CIDR, the class ranges still help you understand why certain addresses behave the way they do. When you see an address starting with 10, 172, or 192, you immediately know the “shape” of the network you’re working with.
This table becomes your anchor for the rest of the workflow.
2. The Magic Number —
Two Ways to Calculate It
The Magic Number is the key value that tells you where each subnet begins.
There are two valid ways to calculate it:
Method 1: 256 – the subnet mask value in the octet of interest
Example:
Mask = 255.255.240.0 → octet of interest = 240
Magic Number = 256 – 240 = 16
Method 2: Look at the last “1” bit in the binary scale
Binary scale: 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
If the last “1” bit is under the 16 column → Magic Number = 16
Both methods always give you the same result.
Use whichever feels more natural.
3. The Octet of Interest — What to Do With It
Once you know the prefix length (like /20 or /27), you can identify the octet of interest — the octet where subnetting actually happens.
Here’s what you do next:
All octets to the left stay the same.
Those bits are part of the network.The octet of interest and everything to the right becomes 0.
This resets the address to the beginning of the subnet.The result is your first subnetted network (the first network ID).
This step gives you a clean starting point before you begin calculating hosts and broadcasts.
4. What the Magic Number Actually Does
Once you’ve reset the address, the Magic Number takes over.
It drives the entire subnetting workflow:
1. Next Network
Start at 0 in the octet of interest.
Add the Magic Number repeatedly:
0, 16, 32, 48, 64…
Each value is the start of a new network.
2. First Host
Take the network ID and add one binary bit (+1).
This is always the first usable address.
3. Broadcast Address
Take the next network and subtract one binary bit (–1).
That gives you the broadcast.
4. Last Host
Take the broadcast and subtract one more binary bit (–1).
That’s the last usable address.
These four steps repeat for every subnet you ever calculate.
5. Putting It All Together — The Practice Workflow
In the lesson, you work through nine examples — three from each class — using the exact same steps every time:
Identify the octet of interest
Calculate the Magic Number
Reset the address to find the first network ID
Add the Magic Number to find the next network
Use +1 and –1 to find:
First host
Last host
Broadcast
Repeat for each new subnet
Every example uses a different prefix length, which helps you build speed and confidence across a wide range of scenarios.
6. Why This Workflow Works
Subnetting becomes easy when you stop trying to memorize patterns and start using a predictable process.
The Subnet Mask Table, the Octet of Interest, and the Magic Number give you a mechanical system you can apply to any IPv4 address.
By the time you finish the practice problems, the entire workflow feels automatic — and that’s exactly what you want before moving into real‑world subnet design in Part 3.
Everything I make is free, and it’s built to help you learn clearly and without noise. If this lesson helped you, share it with someone who’s learning too — it makes a real difference.
See you in Part 3.
Subnetting Part 2 slides with notes:
⭐ Watch the lesson (Subnetting Part 1)
🎥 YouTube Video:
📝 Slides + Notes for Subnetting Part 1:








