ipcalc

Perform simple operations and calculations on IP addresses and networks. More information: https://manned.org/ipcalc.

ipcalc 1.2.3.4 255.255.255.0

ipcalc 1.2.3.4/24

ipcalc -b 1.2.3.4/30

ipcalc -n 1.2.3.4/24

ipcalc -g 1.2.3.4