Computer Networks · M2 · formulas
Masks and address blocks
All formulas and rules in one place
M2 · symbols explained; worked examples linked below
h=32-p,\quad N=2^hp=prefix bits, h=host bits, N=total addresses.
U=2^h-2Ordinary usable-host count. /31 point-to-point and /32 are exceptions.
\text{step}=256-MM is the first mask octet not equal to 255.
\text{network}=\text{address AND mask}Bitwise AND keeps network bits and clears host bits.
\text{broadcast}=\text{network}+(N-1)Use full address arithmetic, not an overflowing final octet.