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^hLaTeX: h=32-p,\quad N=2^h

p=prefix bits, h=host bits, N=total addresses.

U=2^h-2LaTeX: U=2^h-2

Ordinary usable-host count. /31 point-to-point and /32 are exceptions.

\text{step}=256-MLaTeX: \text{step}=256-M

M is the first mask octet not equal to 255.

\text{network}=\text{address AND mask}LaTeX: \text{network}=\text{address AND mask}

Bitwise AND keeps network bits and clears host bits.

\text{broadcast}=\text{network}+(N-1)LaTeX: \text{broadcast}=\text{network}+(N-1)

Use full address arithmetic, not an overflowing final octet.

Learn it with complete solutions

Nine complete address-block examples