ifup
, ifdown
, and ifquery
are shipped with Ubuntu to manage network interfaces. The interface configurations are set in /etc/network/interfaces
. See also man interfaces
.
The state of the interfaces is located in /run/network/interfaces
. If one is up or down, but not showing in the list with ifquery
or in the file, you can use –force
to have it be recorded in a certain state.
For example, if you brought an interface up (or down) using another program, and ifup
or ifdown
don't show the same state in ifquery
or the run
file, set the state directly using –force
.
auto
file
instead of /etc/network/interfaces
interfaces
filefile
instead of /etc/network/interfaces
If you want to force reset an interface completely, so that you can restart from scratch using the configuration in interfaces
, here's how:
First, remove the IP address from the interface:
ifconfig eth0 0
Then, force the device to not be considered as up by ifup
, ifdown
or ifquery
:
ifdown --force eth0
Finally, bring it back online using interfaces
config:
ifup eth0