Next: logger
: Send messages to system log, Previous: hostname
: Show or set system host name., Up: GNU Inetutils [Contents][Index]
ifconfig
: Configure network interfacesifconfig
is a program to retrieve and to set selected
properties of network interfaces. It is best viewed as a tool to
get information, rather than for changing the behaviour of adapters,
since it is hard to support property setting in a portable manner.
Synopsis:
ifconfig iface [arg…] ifconfig -i iface [option…] [-i iface2 [option…]]
Display all available interfaces, including those that not are marked as ‘up’, i.e., also the inactive interfaces.
Set address of selected interface to addr.
Set broadcast address of selected interface to addr.
Set destination (peer) address of selected interface.
Deactivate the selected interface.
Change those interface flags mentioned in list.
The argument is a comma separated list of one ore more
flag names to be set, or in case the name is prepended
with ‘no’, the corresponding flag is cleared.
The output of ifconfig
with the option --help
contains a list of available flag names.
Select output format; the value ‘help’ prints a list of all available formats.
Select the named interface for any following action.
List, with name only, all available interfaces, or only those selected should at least one option -i have specified.
Set netmask of selected interface to mask.
Set the metric of selected interface to the number n.
Set MTU of selected interface to the number n.
Use short output format. This is identical to specifying ‘--format=netstat’.
Activate the selected interface.
Print informational messages when configuring an interface.
Observe that the use of program options is the only manner
in which ifconfig
is able to handle multiple
interfaces in one invocation. Once a particular interface
has been selected using -i, it is affected by any
following option until replaced by another interface selector.
This is also the main cause, that ifconfig
is
unable to treat options independently of their order, as is
mostly the case in other GNU software.
The status of one or more interfaces can be presented in a number of different formats. A list of them is printed by the option --format=help. In the following table the valid formats are given, each is used in the form --format=name.
Place holders for the ability to check whether the interfaces selected by one or more options -i are determining existing interfaces in the running system. No output in case of success, an error message in case of a failure.
Standard GNU output format.
Like the previous format, but with intermediary newlines removed.
Display a list of valid formats, together with a short description for each choice.
Imitation of presentation used by the implementation in ‘net-tools’. Default format for GNU/Linux.
Terse output with statistics, similar to that of netstat -i
.
Format variant of ‘unix’ preferred by OSF’s implementation.
Traditional UNIX type format. Default for BSD, HPUX and Solaris.
The traditional mode of invoking ifconfig
is via
a parsed command line, without all use of program switches
and options, relying fully on argument parsing. This mode
of use is supported also in the present implementation,
but keep in mind that only one interface can be manipulated
using this legacy syntax.
ifconfig NAME [ADDR [DSTADDR]] [broadcast BRDADDR] [netmask MASK] [metric N] [mtu N] [up|down]
As is conventional, only the primary address and possibly the peer destination address are stated as bare arguments, without a specifying keyword. Some slight variation on this syntax will depend on the target system for which the program is being built, as not all platforms support identical abilities. The best information is found via the usage massage ‘ifconfig --usage’.
Next: logger
: Send messages to system log, Previous: hostname
: Show or set system host name., Up: GNU Inetutils [Contents][Index]