How subnet division works
Dividing a block is just borrowing bits from the host part and handing them to the network part. Every bit you borrow doubles the number of subnets and halves their size. Go from a /16 to a /24 and you borrow 8 bits — 2^8 = 256 equal subnets, each with 8 host bits left.
subnets = 2^(child prefix − parent prefix)
addresses per subnet = 2^(host bits) · host bits = 32 − child prefix (IPv4) or 128 − child prefix (IPv6)
Worked example
Split 10.0.0.0/16 into /24 subnets:
Borrowed bits: 24 − 16 = 8 Subnets: 2^8 = 256 (10.0.0.0/24 … 10.0.255.0/24) Addresses: 2^(32 − 24) = 256 per subnet Usable hosts: 256 − 2 = 254 (drop network & broadcast)
IPv4 removes two addresses per subnet — the network and the broadcast — except a /31, which uses both as a point-to-point link (RFC 3021), and a /32, a single host. IPv6 has no broadcast, so the whole block is addressable.
Related
- Subnet Calculator — mask, hosts, and broadcast for a single subnet.
- CIDR Calculator — expand a block, or aggregate many back into one.