Free tech learning for everyone, from basics to pro

NoteNetworking fundamentalsBeginner

Subnetting in your head: the block-size method

In short: Find the "interesting" octet, work out the block size (256 minus the mask value in that octet), and count up in blocks. Everything else follows from that.

The method in four steps

  1. Find the interesting octet: the first octet where the mask isn't 255.
  2. Work out the block size: 256 minus the mask value in that octet.
  3. Find the network: the largest multiple of the block size that's less than or equal to the IP's value in that octet.
  4. Find the broadcast: the next network minus one.

Worked example: 172.16.45.130/26

  • /26 is 255.255.255.192, so the interesting octet is the 4th.
  • Block size: 256 − 192 = 64. Networks start at .0, .64, .128, .192.
  • 130 falls in the block starting at .128, so the network is 172.16.45.128.
  • The next block starts at .192, so the broadcast is 172.16.45.191.
  • Usable hosts: .129 to .190, which is 26 − 2 = 62.

Prefixes worth memorising

PrefixMaskBlock sizeUsable hosts
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242

Sizing a subnet for a requirement

Need at least N hosts? Find the smallest number of host bits h where 2h − 2 ≥ N. The prefix is 32 − h. For 50 hosts, h = 6 (62 hosts), so use a /26.

Practise until it's automatic: try the subnetting practice tool and the branch office challenge.

Key takeaways

  • Block size = 256 − mask value in the interesting octet.
  • Network = the block the address falls into; broadcast = next block − 1.
  • Usable hosts = 2^host bits − 2 (except /31 and /32).
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
FM TecHub Team
Role
Editorial team
Reviewer credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

The team writes practical, plain-English guides on networking, security and cloud.

More about the team →

Original content written by the FM TecHub Team. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Get free updates by email

New notes, tools, CCNA and Security+ tips and important security news from FM TecHub, explained simply. Free, about twice a month. Unsubscribe anytime; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesup

Free · no spam · past emails · powered by Buttondown