IP address and subnet
Also called: subnet, CIDR, prefix length, subnet mask
An IP address identifies a network-layer endpoint; a prefix describes a block of addresses sharing leading bits. In slash notation, the number after the slash counts those shared bits. Subnets use address prefixes to organize local networks and inform forwarding decisions.
For example, 192.0.2.64/26 contains 64 IPv4 addresses, from 192.0.2.64 through 192.0.2.127. There are six remaining address bits because 32 − 26 = 6. That is a block size, not a promise of 64 usable host assignments: reserved addresses and deployment rules affect which addresses can be assigned.
IPv4 addresses in a /p block = 232 − p
- Read first
- IPv4
- Further reading
- IETF RFC 4632 — Classless Inter-domain Routing (CIDR)