Calculate the IPv4 /30 ending at 255.255.255.255
Follow a high-address CIDR through unsigned IPv4 arithmetic and verify its final address without signed 32-bit overflow.
Try these inputsWorked calculation
- The input address equals 4,294,967,294 as an unsigned integer. The /30 block size is four.
- Round to the lower multiple of four, 4,294,967,292, for 255.255.255.252/30.
- Add three for 4,294,967,295, the top of IPv4 space. This example exercises address arithmetic on a special-use range.
Results
- Network CIDR
- 255.255.255.252/30
- Usable in parent
- 2
- Total in parent
- 4
IPv4 address-space map
- Parent range
- Network
- 255.255.255.252
- Broadcast
- 255.255.255.255
- First usable
- 255.255.255.253
- Last usable
- 255.255.255.254
- Subnet mask
- 255.255.255.252
- Wildcard
- 0.0.0.3
- Input bits
- 11111111 11111111 11111111 11111110
- Mask bits
- 11111111 11111111 11111111 11111100
- Network bits
- 11111111 11111111 11111111 11111100
Questions
Why can JavaScript show a negative value for a high IPv4 address?
Many bitwise operators interpret the top bit as a sign bit. The range calculation uses unsigned-safe values for addresses.
What does the all-ones last IPv4 address signify?
255.255.255.255 is the limited broadcast address. Its presence in this arithmetic example does not make the range suitable for a host network.