Subnet Masks
Kite Studio has outgrown one flat network: guests on the Wi-Fi can see the file server, and the printer is drowning in broadcasts. The fix is to split 192.168.10.0 into smaller subnets. Every subnet plan rests on one small tool, the subnet mask, which tells a device which part of an address names the network and which part names the host.
The rule
Mask ones mark the network; mask zeros count the hosts.
A subnet mask is 32 bits, like an IPv4 address: a run of 1s followed by a run of 0s. Where the mask has 1s, the address bits are the network part; where it has 0s, they are the host part.
Address 192.168.10.57 11000000.10101000.00001010.00111001
Mask 255.255.255.0 11111111.11111111.11111111.00000000
Network 192.168.10.0 (keep the bits where the mask is 1)With host bits there are addresses in the subnet, and two are reserved:
- network address — all host bits 0 (
192.168.10.0), the name of the subnet; - broadcast address — all host bits 1 (
192.168.10.255), "everyone on this subnet".
So usable hosts = . Kite Studio's 255.255.255.0 has 8 host bits: 256 addresses, 254 usable, .1 to .254.
A mask octet can only be one of nine values, because the 1s must be continuous from the left:
| 1-bits in the octet | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|---|
| Octet value | 0 | 128 | 192 | 224 | 240 | 248 | 252 | 254 | 255 |