Results
FAQ
What is the difference between the network and broadcast address?
The network address identifies the subnet itself, while the broadcast address distributes packets to every host in that subnet.
Why do /31 and /32 behave differently?
/31 subnets are designed for point-to-point links so both addresses are usable. A /32 describes a single host where network and broadcast share the same value.
How is the subnet mask derived from CIDR?
The prefix length sets the leading bits of a 32-bit mask to 1 and the remaining bits to 0, producing dotted-decimal masks like 255.255.255.0.
How it’s calculated
- The prefix length /n expands to a 32‑bit subnet mask with n leading 1s and the rest 0s (e.g. /24 → 255.255.255.0).
- Network = address & mask; Broadcast = address | (~mask).
- Usable range runs from the first host after the network to the last before broadcast (except for /31 and /32 special cases).
- Total hosts = max(2^(32−n)−2, 0) with exceptions for /31 (two usable) and /32 (single host).