Subnet Math With ipcalc

Work out network, broadcast, host range and mask for a CIDR block.

LinuxnetworkipDiagnosticsLow risk
Run ipcalc 192.168.1.10/24 to print the network details for that address.

01Command

Command
$ ipcalc 192.168.1.10/24

02What it does

ipcalc takes an address with a prefix and reports the network address, netmask, broadcast, usable host range and class, optionally with colored output. It is much less error-prone than doing subnet math by hand.

03Risk

RiskLow risk
Requirementssudo apt install ipcalc
!Warning: Double-check the prefix you pass; a wrong mask silently yields a different network and host range.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • ipcalc
    Official project · vendor-doc · 2026-09-20
    Evidence: Debian packages ipcalc, a subnet calculator that prints network details for an address.
  • Debian package: ipcalc
    Debian · vendor-doc · 2026-09-20
    Evidence: Debian packages ipcalc, a subnet calculator that prints network details for an address.

Last verified: 2026-09-22 · Category: Network

06Related solutions