subnetcalc - Man Page

IPv4/IPv6 Subnet Calculator

Synopsis

subnetcalc[Address] [Netmask/Prefix] [-n] [-uniquelocal] [-uniquelocalhq] [-nocolour|-nocolor]

Description

subnetcalc is an IPv4/IPv6 subnet address calculator. For given IPv4 or IPv6 address and netmask or prefix length, it calculates network address, broadcast address, maximum number of hosts and host address range. Also, it prints the addresses in binary format for better understandability. Furthermore, it prints useful information on specific address types (e.g. type, scope, interface ID, etc.).

Arguments

The following arguments have to be provided:

Address

The IP address. If a hostname is provided here, it is tried to resolve the address by a DNS server and the first returned address is used. Internationalized Domain Names (IDN) are supported.

Netmask/Prefix

The netmask or prefix length (0-32 for IPv4; 0-128 for IPv6).

-n

Skip trying a reverse DNS lookup.

-uniquelocal

Given an IPv6 address, the first 48 bits of the address are replaced by a randomly chosen IPv6 Unique Local prefix in fc00::/7 (see also RFC 4193). Under Linux, /dev/urandom is used for random number generation.

-uniquelocalhq

Like -uniquelocal, but using /dev/random instead on Linux systems for highest-quality random number generation. On other systems, this option is equal to -uniquelocal. Note, that reading from /dev/random may take some time. You can speed up this process by delivering random input e.g. by pressing keys or moving the mouse.

-nocolour|-nocolor

Turns colourised output off.

Examples

Authors

Thomas Dreibholz
https://www.nntb.no/~dreibh/subnetcalc
mailto://thomas.dreibholz@gmail.com

Info

July 24, 2014