Calculate subnet details from IP address and CIDR notation.
CIDR /24 = 256 IPs, 254 usable hosts. /16 = 65,536 IPs. /32 = single host. Private address ranges reserved by RFC 1918: 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16. Usable hosts for /30 and larger blocks exclude the network and broadcast addresses; /31 is meant for point-to-point links only, where RFC 3021 lets both addresses be used as hosts. Sources:
RFC 1918,
RFC 3021.