Packet Path/

Subnetting in Minutes: The Cheatsheet That Sticks

One trick — the block size — answers 95% of subnet questions. Masks, ranges, host counts, and design, in one page you'll actually use.

TCP/IP · Beginner · 9 min · September 30, 2026

Illustration of binary subnet blocks branching from an IP address tree

The only trick you need

Every IPv4 subnet question reduces to one number: the block size in the "interesting" octet (the last octet that isn't all 1s or all 0s in the mask):

Block-size ruleBlock size = 256 − (interesting-octet mask value). Networks step by the block size: 0, block, 2×block, … up to 255.

Example: 192.168.7.129/26. Mask = 255.255.255.192; interesting octet is the 4th: 256 − 192 = 64. Boundaries: 0, 64, 128, 192, 256. Address 129 sits in the 192.168.7.128/26 network; broadcast is one before the next boundary: 192.168.7.191; usable hosts run .129–.190 (62 hosts).

The table to memorize

/CIDRMaskBlock/24 splitsUsable hosts
/24255.255.255.02561254
/25255.255.255.1281282126
/26255.255.255.19264462
/27255.255.255.22432830
/28255.255.255.240161614
/29255.255.255.2488326
/30255.255.255.2524642
/31255.255.255.25421282*
/32255.255.255.25512561*

Handy larger masks: /23 = 255.255.254.0 (512 addresses), /22 = 255.255.252.0 (1,024), /20 = 255.255.240.0 (4,096), /16 = 255.255.0.0 (65,536).

/31 and /32 aren't exceptions to forget/31 links (RFC 3021) give two usable hosts with no broadcast — perfect for point-to-point links. /32 is a single host route, used for loopbacks and precise routes.

Designing subnets (VLSM)

Say you get 10.20.0.0/16 and need networks of 200, 60, 12, and a few point-to-point links:

  1. Host bits: 2n − 2 ≥ needed hosts → 200 hosts need 8 bits (254 usable), 60 need 6 bits (62), 12 need 4 bits (14), links need /31 (2 usable) or /30.
  2. Order largest first: allocate the /24, then /26, then /28, then /31s. Largest-first is what prevents the "puzzle pieces don't fit" problem.
  3. Walk the boundaries: 10.20.0.0/24, then 10.20.1.0/26, 10.20.1.64/26 is free… the next is 10.20.1.128 — but you only need a /26 for 60: 10.20.1.0/26, /28 at 10.20.1.64/28, and /31s at 10.20.1.80/31, .82/31, …

Worked example: the third octet

10.14.23.44/20. Mask: 255.255.240.0; interesting octet = 3rd: block = 256 − 240 = 16. Boundaries: 16, 32 — 23 falls in the 10.14.16.0/20 network. Broadcast: 10.14.31.255. Usable: 10.14.16.1 – 10.14.31.254 (4,094 hosts).

Make it stickOpen the subnet calculator, work the answer by hand first, then check. When the calculator is slower than your head, run the subnet quiz until you can't get them wrong.
Key takeaways

Keep reading