IPCALC-NG(1)
π IPCALC-NG(1) β the ipcalc-ng manual, but make it cute π
okay bestie, welcome to ipcalc-ng, a General Commands Manual situation, and honestly? it's giving calculator but for IP addresses. no cap.
β¨ NAME β¨
ipcalc-ng β do simple little operations on IP addresses and networks π
πΈ SYNOPSIS πΈ
ipcalc-ng [OPTION]... IP address[/prefix] [netmask]
π¦ DESCRIPTION π¦
ipcalc-ng gives you a simple way to calculate IP info for a host or a network. Depending on the options you pick, you can use it to:
- spit out IP network info in human readable format
- spit it out in a format that's suitable for parsing in scripts
- generate random private addresses
- resolve an IP address
- check the validity of an address
By default, or when the --info or --all-info parameters are specified, the info it gives you is free form and human readable β¨ Otherwise the output is JSON formatted when -j is specified, or when specific options are given (e.g., --prefix) the output is in the VAR=VALUE format.
The various options specify what information ipcalc-ng should display on standard output. Multiple options may be specified. It is required to specify an IP address; several operations require a netmask or a CIDR prefix as well. so like, don't skip that part bestie π
π OPTIONS π
-c,--checkβ validate the IP address under the specified family. vibe check, but for addresses π«Ά-i,--infoβ display generic information on the provided network in human readable format. This is the default option if no other options are provided. the no-thoughts-just-vibes default π--all-infoβ display verbose information on the provided network and addresses in human readable format. That includes GeoIP information π-S,--splitβ split the provided network using the specified prefix or netmask. That is, split up the network into smaller chunks of a specified prefix. When combined with no-decorate mode (--no-decorate), the split networks will be printed in raw form. Example"ipcalc-ng -S 26 192.168.1.0/24". chop chop βοΈ-d,--deaggregateβ deaggregates the provided address range. That is, print the networks that cover the range. The range is given using the'-'separator, e.g.,"192.168.1.3-192.168.1.23". When combined with no-decorate mode (--no-decorate), the networks are printed in raw form.-r,--random-privateβ generate a random private address using the supplied prefix or mask. By default it displays output in human readable format, but may be combined with other options (e.g.,--network) to display specific information inVAR=VALUEformat. surprise address, but make it private π-h,--hostnameβ display the hostname for the given IP address. The variable exposed isHOSTNAME.-o,--lookup-hostβ display the IP address for the given hostname. The variable exposed isADDRESS.-4,--ipv4β explicitly specify the IPv4 address family.-6,--ipv6β explicitly specify the IPv6 address family.-b,--broadcastβ display the broadcast address for the given IP address and netmask. The variable exposed isBROADCAST(if available).-a,--addressβ display the IP address for the given input. The variable exposed isADDRESS(if available).-g,--geoinfoβ display geographic information for the given IP address. This option requireslibGeoIP/libmaxminddbto be available. The variables exposed areCOUNTRYCODE,COUNTRY,CITYandCOORDINATES(when available). stalker mode, but geographically πΊοΈ-m,--netmaskβ calculate the netmask for the given IP address. If no mask or prefix is provided, in IPv6 a 128-bit mask is assumed, while in IPv4 it assumes that the IP address is in a complete class A, B, or C network. Note, however, that many networks no longer use the default netmasks in IPv4. The variable exposed isNETMASK.-p,--prefixβ show the prefix for the given mask/IP address. The variable exposed isPREFIX.--class-prefixβ assign the netmask of the provided IPv4 address based on the address class. This was the default in previous versions of this software. throwback era π°οΈ-n,--networkβ display the network address for the given IP address and netmask. The variable exposed isNETWORK.--reverse-dnsβ display the reverse DNS for the given IP address and netmask. The variable exposed isREVERSEDNS.--minaddrβ display the minimum host address in the provided network. The variable exposed isMINADDR.--maxaddrβ display the maximum host address in the provided network. The variable exposed isMAXADDR.--addressesβ display the number of host addresses in the provided network. The variable exposed isADDRESSES.--addrspaceβ display address space allocation information for the provided network. The variable exposed isADDRSPACE.--no-decorateβ print only the requested information. That when combined with split networks option, will only print the networks without any additions for readability. no frills, no fluff, just the facts β¨-j,--jsonβ when used with-ior-S, print the info as a JSON object instead of the usual output format.-s,--silentβ don't ever display error messages. π€«
π EXAMPLES π
π Display all information of an IPv4
$ ipcalc-ng --all-info 193.92.150.2/24
Address: 193.92.150.2
Network: 193.92.150.0/24
Netmask: 255.255.255.0 = 24
Broadcast: 193.92.150.255
Reverse DNS: 150.92.193.in-addr.arpa.
Address space: Internet
Address class: Class C
HostMin: 193.92.150.1
HostMax: 193.92.150.254
Hosts/Net: 254
Country code: GR
Country: Greece
π Display information in key-value format
$ ipcalc-ng -pnmb --minaddr --maxaddr --geoinfo --addrspace 193.92.150.2/255.255.255.224
NETMASK=255.255.255.224
PREFIX=27
BROADCAST=193.92.150.31
NETWORK=193.92.150.0
MINADDR=193.92.150.1
MAXADDR=193.92.150.30
ADDRSPACE="Internet"
COUNTRY="Greece"
π§ Display all information of an IPv6
$ ipcalc-ng --all-info 2a03:2880:20:4f06:face:b00c:0:14/64
Full Address: 2a03:2880:0020:4f06:face:b00c:0000:0014
Address: 2a03:2880:20:4f06:face:b00c:0:14
Full Network: 2a03:2880:0020:4f06:0000:0000:0000:0000/64
Network: 2a03:2880:20:4f06::/64
Netmask: ffff:ffff:ffff:ffff:: = 64
Reverse DNS: 6.0.f.4.0.2.0.0.0.8.8.2.3.0.a.2.ip6.arpa.
Address space: Global Unicast
HostMin: 2a03:2880:20:4f06::
HostMax: 2a03:2880:20:4f06:ffff:ffff:ffff:ffff
Hosts/Net: 2^(64) = 18446744073709551616
Country code: IE
Country: Ireland
π Display JSON output
$ ipcalc-ng --all-info -j 2a03:2880:20:4f06:face:b00c:0:14/64
{
"FULLADDRESS":"2a03:2880:0020:4f06:face:b00c:0000:0014",
"ADDRESS":"2a03:2880:20:4f06:face:b00c:0:14",
"FULLNETWORK":"2a03:2880:0020:4f06:0000:0000:0000:0000",
"NETWORK":"2a03:2880:20:4f06::",
"NETMASK":"ffff:ffff:ffff:ffff::",
"PREFIX":"64",
"REVERSEDNS":"6.0.f.4.0.2.0.0.0.8.8.2.3.0.a.2.ip6.arpa.",
"ADDRSPACE":"Global Unicast",
"MINADDR":"2a03:2880:20:4f06::",
"MAXADDR":"2a03:2880:20:4f06:ffff:ffff:ffff:ffff",
"ADDRESSES":"18446744073709551616",
"COUNTRYCODE":"IE",
"COUNTRY":"Ireland",
"COORDINATES":"53.000000,-8.000000"
}
π¦ Lookup of a hostname
$ ipcalc-ng --lookup-host localhost --no-decorate
::1
πΈ IPv4 lookup of a hostname
$ ipcalc-ng --lookup-host localhost --no-decorate -4
127.0.0.1
β Reverse lookup of a hostname
$ ipcalc-ng -h 127.0.0.1 --no-decorate
localhost
π AUTHORS π
the icons who built this:
- Nikos Mavrogiannopoulos
n.mavrogiannopoulos@gmail.com - Erik Troan
ewt@redhat.com - Preston Brown
pbrown@redhat.com - David Cantrell
dcantrell@redhat.com
π REPORTING BUGS π
found a bug? report it at https://gitlab.com/ipcalc/ipcalc/issues β we're listening, bestie π«Ά
π COPYRIGHT π
Copyright Β© 1997-2020 Red Hat, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
okay so the fine print: this page is from the IPCALC-NG(1) manual, in the General Commands Manual section, dated January 2026. that's the version, that's the date, slay π bye bestie, go subnet some stuff β¨
π¦ where this page comes from
- ubuntu resolute: ipcalc-ng 1.0.3-2build1 Β· GPL-2.0-only
- ubuntu stonking: ipcalc-ng 1.0.3-2build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms