Skip to content

Sizing the largest subnet

The situation

A college is given the block `172.16.8.0/22` and must split it between four departments:

| Department | Hosts needed | |---|---| | Computer Science | 500 | | Electronics | 200 | | Mechanical | 100 | | Administration | 50 |

The plan is to give each department its own subnet, sized to what it needs rather than splitting the block into four equal pieces, because equal pieces would give Administration the same space as Computer Science and run out.

This is VLSM: variable length subnet masking. The rule is to allocate the largest requirement first, from the start of the block.

Computer Science needs 500 usable hosts.

What is the smallest prefix that fits, and what is the subnet?