IPv4 has 32 bits. A CIDR prefix /p assigns the first p bits to the network and leaves 32 − p host bits. The range contains2^(32 − p) addresses.
Boundary calculation
- Convert the four decimal octets to one unsigned 32-bit value.
- Create a mask with the leading prefix bits set to one.
- Apply the mask to get the network address.
- Set every host bit to one to get the upper or broadcast field.
Worked /24 example
For 192.168.1.42/24, 24 network bits leave eight host bits. The block contains 256 addresses from 192.168.1.0 to 192.168.1.255. Under traditional subnet semantics, hosts run from .1 through.254.
Point-to-point and host routes
RFC 3021 permits both addresses in a /31 on a point-to-point link; neither acts as broadcast. A/32 identifies one host route, so this tool reports one usable address and explains that the displayed boundaries coincide.
Limits
- This release accepts dotted-decimal IPv4 only, with no ambiguous leading zeroes.
- It does not apply cloud-provider reserved-address rules.
- It does not validate whether an address is routed, assigned or appropriate for a device.
- IPv6, VLSM planning, aggregation and overlap analysis are future separate tools.