1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
|
.\" network-test.1 - check the network and test if everything is OK
.\" Copyright (C) 2006-2011 Javier Fernandez-Sanguino
.\" Everybody is allowed to distribute this manual page,
.\" to modify it, and to distribute modifed versions of it.
.TH network-test 1 "September 19 2020" "ifupdown\-extra" "ifupdown\-extra"
.SH NAME
network-test \- check the network and test if everything is fine
.SH SYNOPSIS
.B network-test
.RI -s
.RI [-v verbose level]
.SH DESCRIPTION
The
.B network-test
program will test your system's network configuration using basic
tests and providing both information (\fBINFO\fP), warnings (\fBWARN\fP)
and possible errors (\fBERR\fP) based on the results of these tests.
It will check and report on:
.RS
* Status of the network interfaces of the system including: link status,
IP addressing and number of transmitted packets and error rates.
* Accessibility to configured routes to external networks,
including the default network route, checking the routers configured
to give access to the network
* Proper host resolution, testing DNS resolution against a known host.
* Proper network connectivity, testing reachability of remote hosts using
ICMP and simulating a web connections to a remote web server (the web server
used for the tests can be configured through the environment, see below)
* Extra information of network connectivity using calls to external API services
including the actual Internet IPv4 address, IPv6 address as well as GeoIP information
(only if enabled by the user in the highest verbose level)
.RE
.P
The program does not need special privileges to run as it does not
do any system change.
However, the behaviour of the program when running as an unprivileged user is
not the same as running as system administrator (i.e. root). If the
program is run as system administrator it will try to run some tools
that are only available to it to speed up some of the tests.
.P
The program relies on the use of \fBip\fR, \fBnetstat\fR, \fBifconfig\fR,
\fBarp\fR, \fBnmcli\fR, and (when running as root and using Ethernet interfaces)
\fBethtool\fR or \fBmii-tool\fR, to obtain information about the system's
networking configuration (status of available interfaces and configured network
routes). It also uses \fBping\fR, \fBhost\fR, \fBcurl\fR, and \fBnc\fR (netcat)
to do tests of the network connectivity and ensure that the host can connect to
the Internet.
.SH OPTIONS
.TP
.B \-s
The log messages are sent also to the \fBlocal3\fR syslog facility. This is
useful if the script is run periodically (from \fBcron\fR) and the system
administrator wants to preserve the output in syslog
.TP
.B \-v verbosity
Verbosity level is a value that defines the level of output information that
the script should use. Valid values are: 0 (silent run), 1 (show only error
messages), 2 (Show error and warning messages), 3 (default level - show
informational messages), 4 (show detailed information) and 5 (Show information
from external APIs -IP address and GeoIP).
As the privacy policies of different external services vary. These services are
only queried if the user selects the highest verbosity level (5).
.SH ENVIRONMENT
The program will, by default, check
.B www.debian.org
and its associated web server. If you want to use a different check host you
can setup the environment as follows:
.br
.TP
.B CHECK_HOST
The name of a host to use when testing DNS resolution.
By default 'www.debian.org'
.TP
.B CHECK_IP_ADRESS
The
.B CHECK_HOST
\'s IP address. By default defined with the following value: 194.109.137.218
.TP
.B CHECK_WEB_HOST
The web server to use for testing purposes when testing network connectivity.
By default it will use 'www.debian.org'
.TP
.B CHECK_WEB_PORT
The web server port of server
.B CHECK_WEB_HOST
that will be used for testing. By default it will use TCP port 80..
.TP
.B CHECK_WEB_URL
A web service to test network connectivity by downloading some content. By default
it will use 'http://network-test.debian.org/moo'
.TP
.B CHECK_WEB_MD5
The MD5sum value of the content being checked.
.TP
.B CHECK_IP_URL
A web service used to determine the system's public IPv4 address. By default
it will use 'https://api.ipify.org'
.TP
.B CHECK_IP6_URL
A web service used to determine the system's public IPv6 address. By default
it will use 'https://api6.ipify.org'
.TP
.B CHECK_GEOIP_URL
A web service used to determine the system's Geographical information based on public databases.
By default it will use 'http://api.geoiplookup.net/'
.SH EXIT STATUS
The program will exit with error (1) if any of the network checks fail.
.SH BUGS
This program does not have \fIsuper cow powers\fP so it is unable to fix the
errors by itself. It is also unable to detect if the network is failing due to
a local firewall policy been in place so make sure you check your system logs
with
.B dmesg (1)
to detect if some of the active tests are being dropped due to your local
firewall.
Other known issues that might make the program not work reliable are:
.RS
* IPv6: The program does not yet explicitly handle IPv6 only hosts, some of the
tests might be biased towards IPv4 and might fail in IPv6 environments.
* Proxies: The program does not check network connectivity for hosts that
connect through the Internet using a proxy gateway for services. The program
might report issues in hosts using proxies even when these might
connect to the Internet properly through proxied services.
* Firewall environments: some of the tests rely on direct connectivity
to external hosts, which are tested using ICMP queries (through the use of
\fBping\fR. These tests might fail in hosts installed in networking
environments with firewalls that block outbound ICMP communication.
.RE
.SH SEE ALSO
.B ip (8),
.B ncmli (1),
.B netstat (8),
.B ifconfig (8),
.B ethtool (8),
.B mii-tool (8),
.B ping (8),
.B nc (1),
.B curl (1), and
.B host (1).
.SH AUTHOR
.B network-test
was written by Javier Fernandez-Sanguino for the Debian
GNU/Linux distribution.
.SH COPYRIGHT AND LICENCE
Copyright (C) 2005-2020 Javier Fernandez-Sanguino <jfs@debian.org>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
On Debian systems, a copy of the GNU General Public License may be
found in /usr/share/common-licenses/GPL.
|