All 162 CIDR prefixes
From /0 to /32, and to /128 for IPv6. The mask, the address count and the usable hosts all follow from that one number.
IPv433
Addresses are 32 bits, so the mask is written in four dotted parts: 255.255.255.0.
IPv6129
Addresses are 128 bits, so nobody writes a mask — only the prefix length. A home gets a /56, a single network a /64.
How to read this
- /24 means the first 24 bits are the network; the remaining 8 hold the addresses inside it.
- Each extra bit splits the network in two and halves the addresses.
- Usable addresses are normally the total minus two — the network and broadcast addresses.
- IPv6 has no broadcast, so nothing is subtracted. One network is conventionally a /64.
Frequently asked questions
Q. How many bits is 255.255.255.0?
A /24 — count the ones in the mask and you get 24.
Q. How many addresses in a /24?
256, of which 254 are usable: the network and broadcast addresses are taken out.
Q. Why would anyone use a /31?
To link two routers. Such a link needs no broadcast address, so both addresses are used (RFC 3021).
Q. Why is /64 the default in IPv6?
Because the lower 64 bits are meant to be formed by the device itself. Splitting a network smaller than /64 breaks that.
Q. What is a wildcard mask?
The mask inverted. Router configurations use it to say "any value is fine in these positions".