Blame ipcalc.1

Packit 71e9d6
.TH IPCALC 1 "Oct 1 2018" "Red Hat, Inc." \" -*- nroff -*-
Packit 71e9d6
.SH NAME
Packit 71e9d6
ipcalc \- perform simple operations on IP addresses and networks
Packit 71e9d6
.SH SYNOPSIS
Packit 71e9d6
.B ipcalc
Packit 71e9d6
[\fIOPTION\fR]... <\fBIP address\fR>[\fI/prefix\fR] [\fInetmask\fR]
Packit 71e9d6
Packit 71e9d6
.SH DESCRIPTION
Packit 71e9d6
\fBipcalc\fR provides a simple way to calculate IP information for a host
Packit 71e9d6
or network. Depending on the options specified, it may be used to provide
Packit 71e9d6
IP network information in human readable format, in a format suitable for
Packit 71e9d6
parsing in scripts, generate random private addresses, resolve an IP address,
Packit 71e9d6
or check the validity of an address.
Packit 71e9d6
Packit 71e9d6
By default or when the \fB\-\-info\fR or \fB\-\-all\-info\fR parameters
Packit 71e9d6
are specified the information provided is free form and human readable. Otherwise,
Packit 71e9d6
when specific options are given (e.g., \fB\-\-prefix\fR) the output is
Packit 71e9d6
in the VAR=VALUE format.
Packit 71e9d6
Packit 71e9d6
The various options specify what information \fBipcalc\fR should display
Packit 71e9d6
on standard output. Multiple options may be specified.  It is required
Packit 71e9d6
to specify an IP address; several operations require
Packit 71e9d6
a netmask or a CIDR prefix as well.
Packit 71e9d6
Packit 71e9d6
.SH OPTIONS
Packit 71e9d6
.TP
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-c\fR, \fB\-\-check\fR
Packit 71e9d6
Validate the IP address under the specified family. 
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-i\fR, \fB\-\-info\fR 
Packit 71e9d6
Display generic information on the provided network in human readable format.
Packit 71e9d6
This is the default option if no other options are provided.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-\-all\-info\fR 
Packit 71e9d6
Display verbose information on the provided network and addresses in human
Packit 71e9d6
readable format. That includes GeoIP information.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-S\fR, \fB\-\-split\fR
Packit 71e9d6
Split the provided network using the specified prefix or netmask. That is,
Packit 71e9d6
split up the network into smaller chunks of a specified prefix. When
Packit 71e9d6
combined with no-decorate mode (\fB\-\-no\-decorate\fR), the split networks
Packit 71e9d6
will be printed in raw form.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-r\fR, \fB\-\-random-private\fR
Packit 71e9d6
Generate a random private address using the supplied prefix or mask. By default
Packit 71e9d6
it displays output in human readable format, but may be combined with 
Packit 71e9d6
other options (e.g., \fB\-\-network\fR) to display specific information in
Packit 71e9d6
VAR=VALUE format.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-h\fR, \fB\-\-hostname\fR
Packit 71e9d6
Display the hostname for the given IP address.
Packit 71e9d6
The variable exposed is HOSTNAME.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-h\fR, \fB\-\-lookup-host\fR
Packit 71e9d6
Display the IP address for the given hostname.
Packit 71e9d6
The variable exposed is ADDRESS.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-4\fR, \fB\-\-ipv4\fR
Packit 71e9d6
Explicitly specify the IPv4 address family.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-6\fR, \fB\-\-ipv6\fR
Packit 71e9d6
Explicitly specify the IPv6 address family.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-b\fR, \fB\-\-broadcast\fR
Packit 71e9d6
Display the broadcast address for the given IP address and netmask.
Packit 71e9d6
The variable exposed is BROADCAST (if available).
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-g\fR, \fB\-\-geoinfo\fR
Packit 71e9d6
Display geographic information for the given IP address. This option
Packit 71e9d6
requires libGeoIP/libmaxminddb to be available. The variables exposed are
Packit 71e9d6
COUNTRYCODE, COUNTRY, CITY and COORDINATES (when available).
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-m\fR, \fB\-\-netmask\fR
Packit 71e9d6
Calculate the netmask for the given IP address. If no mask or prefix
Packit 71e9d6
is provided, in IPv6 a 128-bit mask is assumed, while in IPv4 it assumes
Packit 71e9d6
that the IP address is in a complete class A, B, or C network. Note, 
Packit 71e9d6
however, that many networks no longer use the default netmasks in IPv4.
Packit 71e9d6
The variable exposed is NETMASK.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-p\fR, \fB\-\-prefix\fR
Packit 71e9d6
Show the prefix for the given mask/IP address.
Packit 71e9d6
The variable exposed is PREFIX.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\   \fR \fB\-\-class\-prefix\fR
Packit 71e9d6
Assign the netmask of the provided IPv4 address based on the address
Packit 71e9d6
class. This was the default in previous versions of this software.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-n\fR, \fB\-\-network\fR 
Packit 71e9d6
Display the network address for the given IP address and netmask.
Packit 71e9d6
The variable exposed is NETWORK.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-n\fR, \fB\-\-reverse-dns\fR 
Packit 71e9d6
Display the reverse DNS for the given IP address and netmask.
Packit 71e9d6
The variable exposed is REVERSEDNS.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\   \fR \fB\-\-minaddr\fR 
Packit 71e9d6
Display the minimum host address in the provided network.
Packit 71e9d6
The variable exposed is MINADDR.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\   \fR \fB\-\-maxaddr\fR 
Packit 71e9d6
Display the maximum host address in the provided network.
Packit 71e9d6
The variable exposed is MAXADDR.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\   \fR \fB\-\-addresses\fR 
Packit 71e9d6
Display the number of host addresses in the provided network.
Packit 71e9d6
The variable exposed is ADDRESSES.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\   \fR \fB\-\-addrspace\fR 
Packit 71e9d6
Display address space allocation information for the provided network.
Packit 71e9d6
The variable exposed is ADDRSPACE.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\   \fR \fB\-\-no\-decorate\fR
Packit 71e9d6
Print only the requested information. That when combined with
Packit 71e9d6
split networks option, will only print the networks without any
Packit 71e9d6
additions for readability.
Packit 71e9d6
Packit 71e9d6
.TP
Packit 71e9d6
\fB\-s\fR, \fB\-\-silent\fR 
Packit 71e9d6
Don't ever display error messages.
Packit 71e9d6
Packit 71e9d6
.SH AUTHORS
Packit 71e9d6
.nf
Packit 71e9d6
Nikos Mavrogiannopoulos <nmav@redhat.com>
Packit 71e9d6
.nf
Packit 71e9d6
Erik Troan <ewt@redhat.com>
Packit 71e9d6
.nf
Packit 71e9d6
Preston Brown <pbrown@redhat.com>
Packit 71e9d6
.nf
Packit 71e9d6
David Cantrell <dcantrell@redhat.com>
Packit 71e9d6
Packit 71e9d6
Packit 71e9d6
.fi
Packit 71e9d6
.SH "REPORTING BUGS"
Packit 71e9d6
Report bugs at https://gitlab.com/ipcalc/ipcalc/issues
Packit 71e9d6
.SH COPYRIGHT
Packit 71e9d6
Copyright \(co 1997-2018 Red Hat, Inc.
Packit 71e9d6
.br
Packit 71e9d6
This is free software; see the source for copying conditions.  There is NO
Packit 71e9d6
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
Packit 71e9d6
PURPOSE.