Can't ifdown eth0 (main interface)
ifdownan interface on Debian 6.0.5:
[email protected]:/etc/network$ sudo ifdown eth0 && sudo ifup eth0 ifdown: interface eth0 not configured SIOCADDRT: File exists Failed to bring up eth0. [email protected]:/etc/network$ cat interfaces auto lo iface lo inet loopback allow-hotplug eth0 allow-hotplug eth1 auto eth0 iface eth0 inet static address 10.0.0.1 netmask 255.255.255.0 gateway 10.0.0.254 auto eth1 iface eth1 inet manual
As requested by marco:
[email protected]:/etc/network/$ cat /run/network/ifstate lo=lo eth1=eth1
I have updated my question with the contents of this file, eth0 isn't in there. A quick "Google" is telling me the meaning of this file (as I haven't accessed it before), I think I can see where the problem is :)
Check the contents of the file
ifdownuse this file to note which network interfaces can be brought up and down. Thus,
ifupcan be easily confused when other networking tools are used to bring up an interface (e.g.
From man ifup
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 ifup and later deconfigured using
ifconfigwill still be recorded as up. To fix this you can use the
--forceoption to force
ifdownto run configuration or deconfiguration commands despite what it considers the current state of the interface to be.
To add to this answer, I had to add `eth0=eth0` to `/run/network/ifstate` to get it to recognize the interface and configure it properly. This answer helped point me to the file, but stopped short of suggesting that addition, which is what solved my similar problem.
@DavidParks Are you sure the interface is marked as `auto` in `/etc/network/interfaces`? It should appear in `/run/network/ifstate` without the need to manually modify the file.