subnetcalc(1)
π NAME π
okay bestie, meet subnetcalc β it's the IPv4/IPv6 Subnet Calculator and it lives in the General Commands Manual (that's section 1, iykyk π
). she does math so you don't have to, and she does it gloriously.
β¨ 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 πΈ
so basically? subnetcalc is an IPv4/IPv6 subnet address calculator, and she eats. π
you hand her an IPv4 or IPv6 address plus a netmask or a prefix length, and she calculates:
- the network address
- the broadcast address
- the maximum number of hosts
- the host address range
and that's not even the whole meal π . she also prints the addresses in binary format, because seeing the bits literally makes it click better (no cap). on top of that she drops useful info about specific address types β type, scope, interface ID, etc. β like the kind of notes your bestie slides you in the group chat right before a quiz. π
π ARGUMENTS π
these are the things you can hand her:
addressβ the IP address. if you put a hostname here instead, she'll try to resolve it through a DNS server and just use the first address that comes back. Internationalized Domain Names (IDN) are supported, so yes, your fancy ΓΌ's and Γ₯'s are welcome here π¦.netmaskβ the netmask. that's it, that's the whole job.prefixβ the prefix length. ranges from 0-32 for IPv4 and 0-128 for IPv6.-u|--uniquelocalβ give her an IPv6 address and she swaps the first 48 bits for a randomly chosen IPv6 Unique Local prefix insidefc00::/7(see also RFC 4193). on Linux and FreeBSD she pulls her randomness from/dev/urandom. π²-U|--uniquelocalhqβ like--uniquelocal, except she uses/dev/randomon Linux and FreeBSD for that highest-quality random number generation. on other systems this option is just equal to--uniquelocal. heads up though: reading from/dev/randomcan take a minute β³ β you can speed it up by feeding in random input, like pressing keys or wiggling the mouse. you know what to do. wiggle π-n|--noreverselookupβ turns reverse DNS lookup off.-g|--nogeoiplookupβ turns GeoIP lookup off.-c|--nocolour|--nocolorβ turns the colourised output off. (spelling both ways, she's inclusive like that π)-h|--helpβ prints the command-line parameters, aka the cheat sheet.-v|--versionβ prints the program version.
π¦ EXIT STATUS π¦
the subnetcalc tool exits with 0 when things go right, and >0 if there's an error. sad girl hours π when it's not zero.
π₯ EXAMPLES π₯
subnetcalc -vsubnetcalc 132.252.250.0 255.255.255.0subnetcalc 132.252.250.0/255.255.255.0 --nocolorsubnetcalc 132.252.250.0 24subnetcalc 132.252.250.0/24 --nocoloursubnetcalc fe80::2f0b:a04e:15c2:bc68 64subnetcalc fe80::2f0b:a04e:15c2:bc68%wlp4s0 64subnetcalc fec0:2345:6789:1111:221:6aff:fe0b:2674 56subnetcalc 2a00:1450:8007::69 64subnetcalc ff08::1:2:3subnetcalc 131.220.6.5/24subnetcalc 132.252.181.87 -nsubnetcalc www.iem.uni-due.de 24subnetcalc www.six.heise.desubnetcalc fd00:: 64 --uniquelocalsubnetcalc fd00::9876:256:7bff:fe1b:3255 56 --uniquelocalhqsubnetcalc dΓΌsseldorf.de 28subnetcalc www.kΓΆln.desubnetcalc rΓ€ksmΓΆrgΓ₯s.josefsson.org 24subnetcalc xn--smrgstrta-82ac2r.xn--domne-ira.example 26subnetcalc smΓΆrgΓ₯stΓ₯rta.domΓ€ne.example 255.255.255.240
π NOTES π
the latest version of SubNetCalc is chilling on the SubNetCalc Homepage at SubNetCalc Homepage: https://www.nntb.no/~dreibh/subnetcalc/. go visit, she's iconic π
π AUTHORS π
Thomas Dreibholz, Homepage: https://www.nntb.no/~dreibh β the actual genius behind all of this π
and that's the whole vibe, bestie π
this was subnetcalc(1) from the General Commands Manual, dated May 26, 2026. slay, go calculate something. π¦β¨π
π¦ where this page comes from
- nixpkgs unstable: subnetcalc 2.7.5
- ubuntu stonking: subnetcalc 2.7.5-1 Β· GPL-3.0-or-later
- Copyright (C) 2024-2026 by Thomas Dreibholz
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms