Subnet calculators are useful, but a small set of binary patterns makes their output easier to verify. These methods are checks, not substitutes for confirming the real allocation and routing policy.
Subnetting · Lesson 4
Subnetting Cheats
Learn compact binary and block-size methods for checking IPv4 subnet calculations.
Octet Bit Values
An IPv4 octet uses these place values:
bit: 1 1 1 1 1 1 1 1
value: 128 64 32 16 8 4 2 1
Adding all eight values produces 255. Decimal 192 is 128 + 64, so its binary representation is 11000000.
What is decimal 192 in eight-bit binary?
Common Partial-Octet Masks
Contiguous prefix bits produce a short mask sequence:
bits set: 0 1 2 3 4 5 6 7 8
decimal: 0 128 192 224 240 248 252 254 255
For example, /19 contains 16 full prefix bits plus three bits in the third octet, so its mask is 255.255.224.0.
Which mask corresponds to IPv4 /19?
Block Sizes
In the first mask octet that is not 255, subtract the mask value from 256 to get the subnet increment. A /27 mask ends in 224, giving block size 256 - 224 = 32. Boundaries in the final octet are therefore 0, 32, 64, 96, 128, 160, 192, and 224.
Address 198.51.100.77/27 lies in the 64-through-95 block.
What is the network address for 198.51.100.77/27?
Converting an Arbitrary Octet
To convert decimal 123, select the largest remaining values without exceeding it:
123 = 64 + 32 + 16 + 8 + 2 + 1
= 01111011
Convert back by adding only the place values whose bits are one. Always keep all eight positions when working inside an IPv4 octet.
Which eight-bit value equals decimal 123?
Lesson complete
You finished Subnetting Cheats
You can now check common IPv4 calculations with compact binary patterns.
Use the eight octet place values from 128 through 1.
Recall the sequence of contiguous partial-octet masks.
Derive block size by subtracting the partial mask from 256.
Keep eight bits when converting individual octets.
Keep your learning progress
Create a free account to save this lesson and continue learning on any device.
Create a free account