Menu
CoddyTech

The Block Size Trick

Lesson 24 of 46 in Coddy's IP Addressing and Subnetting course.

Here is the trick that turns subnetting from binary arithmetic into mental math: 256 minus the interesting mask octet = the block size, and subnets start at multiples of that block.

Mask 255.255.255.192 (/26): 256 - 192 = 64. So in the last octet, subnets begin at 0, 64, 128 and 192. Mask ending in 240 (/28): 256 - 240 = 16, so boundaries land every 16.

To place any address, you no longer AND bits: you just ask which multiple of the block size it falls on. The next lessons drill exactly that.

challenge icon

Challenge

Beginner

For a /26 mask, print all the last-octet subnet boundaries on one line, separated by single spaces, lowest first.

Expected output:

0 64 128 192

Try it yourself

Terminal

All lessons in IP Addressing and Subnetting

Practice on your own: Terminal playground