Study

Subnetting, CIDR, and VLSM

Card 2 of 11

The two formulas that cover most subnetting arithmetic are 2^n and 2^n minus 2. What decides which one applies?

Answer

Whether you are counting hosts or counting networks — hosts count host bits and subtract two, networks count network bits and subtract nothing

Mixing these up is the easiest arithmetic mistake available here. The subtraction exists because two host addresses are spoken for — the network address and the broadcast address — and that reasoning applies only when you are counting hosts. Counting how many subnets a set of network bits yields has no such reservation, so nothing is subtracted. The distinction has nothing to do with whether the addressing is classful, where the prefix falls relative to /24, or whether anything on the segment is actually sending broadcasts; the broadcast address is reserved regardless of use.

Where this is explained