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
BeginnerFor a /26 mask, print all the last-octet subnet boundaries on one line, separated by single spaces, lowest first.
Expected output:
0 64 128 192Try it yourself
All lessons in IP Addressing and Subnetting
10Capstone - The Office
The Floor PlanSizing Each TeamCarving the BlockThe Router's ViewRecap - Ship the Plan6Subnetting Drills
The Block Size TrickWhich Subnet Am I InSplitting a /24Splitting AgainRecap - Subnetting DrillsPractice on your own: Terminal playground