What the numbers mean
- Prefix (/24) – how many bits from the left belong to the network. The rest are for devices. /24 leaves 8 bits, which is 256 addresses.
- Subnet mask (255.255.255.0) – the same thing written as an address: ones for the network part, zeros for the device part.
- Network address – the first address, the name of the network itself. It is not given to a device.
- Broadcast – the last address; a packet sent there goes to every device in the network.
- Usable hosts – everything in between. A /31 is a special case for point-to-point links (both addresses usable), a /32 is one single address.
- Wildcard mask – the inverted mask, used in firewall and router rules.
Common prefixes
| Prefix | Mask | Addresses | Usable | Typical use |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | 10.0.0.0/8 – large private networks |
| /16 | 255.255.0.0 | 65,536 | 65,534 | a company campus |
| /24 | 255.255.255.0 | 256 | 254 | a typical home network |
| /26 | 255.255.255.192 | 64 | 62 | a VLAN for smart devices or guests |
| /30 | 255.255.255.252 | 4 | 2 | a link between two routers |
| /32 | 255.255.255.255 | 1 | 1 | one single host, in firewall rules |
More about addresses, routing and DNS is in my notes Computer Networks and Troubleshooting Networks, and the commands are on the Networking cheat sheet.