Find the network, broadcast, mask, and usable hosts for any IPv4 subnet.
An IPv4 subnet splits an address range into a network part and a host part. The CIDR prefix says how many of the 32 bits are the network: /24 means the first 24 bits are the network and the last 8 bits are hosts. The subnet mask has 1s in the network bits and 0s in the host bits — /24 is 255.255.255.0.
The network address is the IP address with all host bits set to zero; the broadcast address has all host bits set to one. The usable host range is everything between them, and the number of usable hosts is 2 raised to the number of host bits, minus 2 (the network and broadcast addresses themselves). A /24 therefore has 254 usable hosts.