NETCALC(1)

NAME
netcalc - IP subnet calculator

SYNOPSIS
netcalc [opts] [args]

  Options
netcalc [-cehnrv] [-s MASKLEN] [-S LEN] [..]

  Arguments
netcalc [opts] NETWORK [NETMASK] [..]
netcalc [opts] NETWORK/LEN [..]
cat FILE | netcalc [opts] -

DESCRIPTION
netcalc is a simple network calculator derived from sipcalc(1). 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 networks from standard input (newline separated)
•   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

-c  Validate (check) IP address argument

-e  IPv4 compatible IPv6 information

-h  Print a summary of the options and exit

-n  Disable (no) colorization of output

-r  IPv6 reverse DNS output

-R MIN:MAX
    Show offset IPv4 network Range from MIN to MAX

-s MASKLEN
    Split the IPv4 network into subnets of MASKLEN size, where MASKLEN is either in netmask (dotted quad) or prefix length format (/LEN)

-S LEN
    Split the IPv6 network into subnets of LEN size, where LEN is in prefix length format (/LEN)

-v  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 supports reading networks 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.

BUGS
Use the project page to file bug reports, feature requests, patches, or questions at GitHub: https://github.com/troglobit/netcalc

AUTHORS
Simon Ekstrand <mailto:simon@routemeister.net> (sipcalc) Joachim Wiberg <mailto:troglobit@gmail.com> (netcalc)