Kaspars Zibarts

IPCALC on CLI

Discussion created by Kaspars Zibarts on Mar 14, 2018
Latest reply on Mar 16, 2018 by Oliver Fink

This migt be old news for some but definitely new news for myself

Ever wondered to quickly calculate network address, broadcast or mask from a host? Usually it's the online ipcalc but it actually lives in your GW. Good for scripting etc.

## SHOW MASK
[Expert@vsx]# ipcalc -m 190.160.3.100/28
NETMASK=255.255.255.240

## SHOW NETWORK ADDR
[Expert@vsx]# ipcalc -n 190.160.3.100/28
NETWORK=190.160.3.96

## SHOW BROADCAST ADDR
[Expert@vsx]# ipcalc -b 190.160.3.100/28
BROADCAST=190.160.3.111

Outcomes