subnetcalc(1) General Commands Manual subnetcalc(1) NAME subnetcalc -- IPv4/IPv6 Subnet Calculator SYNOPSIS subnetcalc address/prefix | address/netmask | address prefix | address netmask [-u | --uniquelocal] [-U | --uniquelocalhq] [-n | --noreverselookup] [-g | --nogeoiplookup] [-c | --nocolour | --nocolor] subnetcalc [-h | --help] subnetcalc [-v | --version] DESCRIPTION subnetcalc is an IPv4/IPv6 subnet address calculator. For a 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. Fur- thermore, it prints useful information on specific address types (e.g., type, scope, interface ID, etc.). ARGUMENTS The following arguments may be provided: address The IP address. If a hostname is provided here, the program at- tempts to resolve the hostname via a DNS server, and the first re- turned address is used. Internationalized Domain Names (IDN) are supported. netmask The netmask. prefix The prefix length (0-32 for IPv4; 0-128 for IPv6). -u | --uniquelocal Given an IPv6 address, the first 48 bits of the address are re- placed by a randomly chosen IPv6 Unique Local prefix in fc00::/7 (see also RFC 4193). Under Linux and FreeBSD, /dev/urandom is used for random number generation. -U | --uniquelocalhq Like --uniquelocal, but using /dev/random instead on Linux and FreeBSD 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 mov- ing the mouse. -n | --noreverselookup Turns reverse DNS lookup off. -g | --nogeoiplookup Turns GeoIP lookup off. -c | --nocolour | --nocolor Turns colourised output off. -h | --help Prints command-line parameters. -v | --version Prints program version. EXIT STATUS The subnetcalc tool exits with 0 on success, and >0 in case of an error. EXAMPLES * subnetcalc -v * subnetcalc 132.252.250.0 255.255.255.0 * subnetcalc 132.252.250.0/255.255.255.0 --nocolor * subnetcalc 132.252.250.0 24 * subnetcalc 132.252.250.0/24 --nocolour * subnetcalc fe80::2f0b:a04e:15c2:bc68 64 * subnetcalc fe80::2f0b:a04e:15c2:bc68%wlp4s0 64 * subnetcalc fec0:2345:6789:1111:221:6aff:fe0b:2674 56 * subnetcalc 2a00:1450:8007::69 64 * subnetcalc ff08::1:2:3 * subnetcalc 131.220.6.5/24 * subnetcalc 132.252.181.87 -n * subnetcalc www.iem.uni-due.de 24 * subnetcalc www.six.heise.de * subnetcalc fd00:: 64 --uniquelocal * subnetcalc fd00::9876:256:7bff:fe1b:3255 56 --uniquelocalhq * subnetcalc dA1/4sseldorf.de 28 * subnetcalc www.kA<paragraph>ln.de * subnetcalc rAxksmA<paragraph>rgAYs.josefsson.org 24 * subnetcalc xn--smrgstrta-82ac2r.xn--domne-ira.example 26 * subnetcalc smA<paragraph>rgAYstAYrta.domAxne.example 255.255.255.240 NOTES The latest version of SubNetCalc can be found on the SubNetCalc Homepage at SubNetCalc Homepage. AUTHORS Thomas Dreibholz, Homepage subnetcalc May 26, 2026 subnetcalc(1)
NAME | SYNOPSIS | DESCRIPTION | ARGUMENTS | EXIT STATUS | EXAMPLES | NOTES | AUTHORS
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=subnetcalc&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>
