Splitting a network into rooms
A subnet is a logical division of an IP network. Subnetting lets you break a large address space into smaller, manageable groups for organization, security, and routing. Every IP has two parts: the network portion (which subnet it belongs to) and the host portion (which device within that subnet). The subnet mask draws the line between the two halves.
Subnet masks, decoded
A subnet mask looks like an IP address: 255.255.255.0. The 255 octets mark the network portion; the 0 octets mark the host portion. With 255.255.255.0:
- Network: first 3 octets (e.g.
192.168.1) - Host: last octet (
.0–.255) - Total addresses: 256 — but two are reserved:
.0= network address,.255= broadcast. - Usable hosts: 254
CIDR — the compact form
CIDR (Classless Inter-Domain Routing) replaces the dotted mask with a single number after a slash: the number of network bits. 255.255.255.0 becomes /24 — 24 network bits, 8 host bits.
| CIDR | Mask | Total | Usable hosts |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 (a single address) |
| /30 | 255.255.255.252 | 4 | 2 (point-to-point) |
| /24 | 255.255.255.0 | 256 | 254 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
192.168.1.0/24 means "every address from 192.168.1.0 through 192.168.1.255." Your home router almost certainly hands out a /24. If you ever build VLANs, mesh VPNs, or a homelab, you'll juggle multiple subnets to keep traffic separated — server LAN at 10.0.1.0/24, IoT at 10.0.2.0/24, guests at 10.0.3.0/24, and so on.