Subnetting Without a Calculator

CIDR notation demystified. Learn the handful of powers of two that let you split and size networks in your head, with a reference table you'll actually remember.

· 1 min read · beginner

Subnetting scares people because it is taught as arithmetic. It is really just counting in powers of two. Learn one small table and you can do it in your head.

What the /n actually means

An IPv4 address is 32 bits. In CIDR notation, /24 means "the first 24 bits are the network, the remaining 8 identify hosts." The smaller the number after the slash, the bigger the network.

text
192.168.1.0/24
└──────┬─────┘ └┬┘
   network    host part = 32 − 24 = 8 bits → 256 addresses

The only table you need

Each row is a "mask octet" value and how many addresses that block holds.

CIDRMaskBlock 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

*Usable = block size − 2 (one network address, one broadcast). The mask values are just 256 − block size.

The two-step mental method

Question: which subnet does 192.168.1.100/26 belong to, and what's its range?

  1. Block size for /26 is 64 (from the table).
  2. Count in steps of 64 in the last octet: 0, 64, 128, 192. 100 falls between 64 and 128, so it lives in the 64 block.

So the subnet is 192.168.1.64/26:

  • Network address: .64
  • First usable host: .65
  • Last usable host: .126
  • Broadcast: .127

That's it. No binary conversion, no long division.

Splitting a network

You have 10.0.0.0/24 and need four equal subnets. Four = 2², so borrow 2 host bits: /24 + 2 = /26, block size 64:

text
10.0.0.0/26    → .0   – .63
10.0.0.64/26   → .64  – .127
10.0.0.128/26  → .128 – .191
10.0.0.192/26  → .192 – .255

Need subnets sized for ~30 hosts each? 30 usable needs block size 32 → /27. Always round up to the next power of two.

IPv6, briefly

IPv6 subnetting is mercifully simpler in practice: you are almost always handed a /64 per network and everything is hex. The CIDR logic is identical — it is just that addresses are so abundant you rarely carve below /64.

Takeaways

  • The number after the slash counts network bits; 32 minus it gives host bits.
  • Memorise the block-size table (256 → 2, halving each step).
  • Block size is both the subnet count step and the key to every range question.

Related

Networking beginner

DNS, From Query to Answer

How a name becomes an address — resolvers, the root/TLD/authoritative hierarchy, the record types that matter, and why DNS changes take time.

· 2 min read
Networking beginner

What Happens When You Load a URL

The full journey from pressing Enter to seeing a page — DNS, TCP, TLS and HTTP — tied together so every layer finally makes sense.

· 2 min read