ipcalc is a CIDR range calculator.
You must have Go installed and $GOPATH/bin must be in your path. For example:
export PATH=$PATH:$(go env GOPATH)/bin
Download and install the ipcalc
binary
go install github.com/andy-trimble/ipcalc@latest
> ipcalc 10.1.0.0/24
CIDR Range: 10.1.0.0/24
Netmask: 255.255.255.0
First IP: 10.1.0.0
Last IP: 10.1.0.255
Addresses: 256
> echo "10.1.0.0/24" | ipcalc
CIDR Range: 10.1.0.0/24
Netmask: 255.255.255.0
First IP: 10.1.0.0
Last IP: 10.1.0.255
Addresses: 256