Updated: 22 May 2004Index
Return to Main Contents
ifup - bring a network interface up
ifdown - take a network interface down
ifquery - parse interface configuration
commands may be used to configure (or, respectively, deconfigure) network
interfaces based on interface definitions in the file
command may be used to parse interfaces configuration.
A summary of options is included below.
- -a, --all
If given to ifup, affect all interfaces marked auto.
Interfaces are brought up in the order in which they are defined
Combined with --allow, acts on all interfaces of a specified class
If given to ifdown, affect all defined interfaces.
Interfaces are brought down in the order in which they are
currently listed in the state file. Only interfaces defined
will be brought down.
Force configuration or deconfiguration of the interface.
If any of the commands of scripts fails, continue.
- -h, --help
Show summary of options.
Only allow interfaces listed in an
/etc/network/interfaces to be acted upon.
- -i FILE, --interfaces=FILE
Read interface definitions from
instead of from
- -X PATTERN, --exclude=PATTERN
Exclude interfaces from the list of interfaces to operate on by the PATTERN.
PATTERN uses a usual shell glob syntax. If shell wildcards are not used, it
must match the exact interface name. This option may be specified multiple times
resulting in more than one pattern being excluded.
- -o OPTION=VALUE
Set OPTION to VALUE as though it were in
- -n, --no-act
Don't configure any interfaces or run any "up" or "down" commands.
Don't run any mappings. See
for more information about the mapping feature.
Don't run any scripts under /etc/network/if-*.d/
Disable special handling of the loopback interface. By default, the loopback interface
(lo on Linux) is predefined internally as an auto interface, so it's brought up
on ifup -a automatically. In the case the loopback device is redefined by user,
the interface is configured just once anyway. If, however, another interface is also
defined as loopback, it's configured as usual. Specifying this option disables this
behaviour, so the loopback interface won't be configured automatically.
- -V, --version
Show copyright and version information.
- -v, --verbose
Show commands as they are executed.
- -l, --list
For ifquery, list all the interfaces which match the specified class.
If no class specified, prints all the interfaces listed as auto.
For ifquery, dump the state of the interfaces. When no interfaces specified,
lists all interfaces brought up together with logical interfaces assigned to them and
exits with a status code indicating success. If one or more interfaces specified,
display state of these interfaces only; successful code is returned if all of interfaces
given as arguments are up. Otherwise, 0 is returned.
- ifup -a
Bring up all the interfaces defined with
- ifup eth0
Bring up interface
- ifup eth0=home
Bring up interface
as logical interface
- ifdown -a
Bring down all interfaces that are currently up.
- ifquery -l
Print names of all interfaces specified with the auto keyword.
- ifquery -l --allow=hotplug
Print names of all interfaces specified with the allow-hotplug keyword.
- ifquery eth0
Display the interface options as specified in the ifupdown
configuration. Each key-value pair is printed out on individual
line using ": " as separator.
are actually the same program called by different names.
The program does not configure network interfaces directly;
it runs low level utilities such as
to do its dirty work.
is still running. In that case,
is sent to ifup.
During interface deconfiguration,
ignores errors the same way as if
definitions of network interfaces
for more information.
current state of network interfaces
The program keeps records of whether network interfaces are up or down.
Under exceptional circumstances these records can become
inconsistent with the real states of the interfaces.
For example, an interface that was brought up using
and later deconfigured using
will still be recorded as up.
To fix this you can use the
option to force
to run configuration or deconfiguration commands despite what
it considers the current state of the interface to be.
must be writable for
to work properly.
If that location is not writable
(for example, because the root filesystem is mounted read-only
for system recovery)
should be made a symbolic link to a writable location.
If that is not possible then you can use the
option to run configuration or deconfiguration commands
without updating the file.
Note that the program does not run automatically:
alone does not bring up interfaces
that appear as a result of hardware being installed and
alone does not bring down interfaces
that disappear as a result of hardware being removed.
To automate the configuration of network interfaces you need to
install other packages such as
The ifupdown suite was written by Anthony Towns <firstname.lastname@example.org
- KNOWN BUGS/LIMITATIONS
- SEE ALSO