Scroll to navigation

NETCALC(1) General Commands Manual NETCALC(1)

NAME

netcalcIP subnet calculator

SYNOPSIS

netcalc [-cehnrv] [-s MASK] [-S MASK] ⟨ADDRESS/LEN | - | NETWORK [NETMASK]⟩

DESCRIPTION

netcalc is a simple network calculator derived from sipcalc. netcalc takes an IP address and a subnet mask, or an IP address and prefix mask in CIDR notation and outputs information about the subnet. Both IPv4 and IPv6 addresses are supported.

FEATURES

  • Multiple address and netmask input formats
  • Classful and CIDR output
  • Output of broadcast address, network class, Cisco wildcard, hosts/range, network range
  • Output of multiple types of bitmaps
  • Support for multiple networks input from commandline
  • Support for reading newline separated list of networks from standard input (STDIN)
  • Ability to split a network into smaller ones
  • Compressed and expanded IPv6 input addresses
  • Compressed and expanded IPv6 output
  • Support for v4 in v6 output

OPTIONS

Validate (check) IP address argument
IPv4 compatible IPv6 information
Print a summary of the options and exit
Disable (no) colorization of output
IPv6 reverse DNS output
MIN:MAX
Show offset IPv4 network Range from MIN to MAX
MASK
Split the IPv4 network into subnets of MASK size
MASK
Split the IPv6 network into subnets of MASK size
Show version information

IPv4 (network) addresses must be given in standard dotted quad format, i.e., xxx.xxx.xxx.xxx with an optional netmask that can be given in three different ways:

  • CIDR, e.g. /n, where n >= 0 <= 32
  • Dotted quad, e.g. xxx.xxx.xxx.xxx
  • A hexadecimal value, e.g. 0xnnnnnnnn or nnnnnnnn

IPv6 addresses may be given in any of the forms defined in RFC2373, the netmask (prefix) must be given in CIDR notation. Valid values for the netmask range from n >= 0 <= 128, default value if netmask is omitted is 128.

netcalc also accepts arguments from stdin, this can be useful for using cat(1) on a list of addresses stored in a file. Each line should contain an address netmask pair or address/len tuple. In this mode colorization is automatically disabled.

BUGS

Use the project's GitHub page to file bug reports, feature requests or patches (preferably as GitHub pull requests!), or questions at ⟨https://github.com/troglobit/netcalc⟩

AUTHORS

Simon Ekstrand ⟨mailto:simon@routemeister.net⟩ (sipcalc)
Joachim Nilsson ⟨mailto:troglobit@gmail.com⟩ (netcalc)

6 June, 2020 Linux 5.14.21-150500.55.52-default