When Ubuntu Server restarts eth0 Doesn't come back up

Every time I restart my Ubuntu Server 11.10 I can't ssh into it because ETH0 doesn't come up automatically. I never had this problem before upgrading to 11.10. I have to login to the server and start the ETH0 manually. I would appreciate it any help. Thanks.

Here is my /etc/network/interfaces file:

#The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface

iface eth0 inet static
    address 192.168.1.102
    netmask 255.255.255.0
    broadcast 192.168.1.255
    network 192.168.1.0
    gateway 192.168.1.1

Solution 1:

Joel, add a line with auto eth0 before the iface eth0 inet static line, that should bring it up on boot.

Solution 2:

I had, and solved, a similar problem--perhaps my solution will work for you. The problem in my case was that in /etc/network/interfaces I had both eth0 and vin to auto as shown below:

# The primary network interface
auto eth0
iface eth0 inet dhcp

# The INside Virtual Network
auto vin
iface vin inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0

After I commented out the first line, changing it to

#auto vin

the eth0 worked.

Solution 3:

found a link with the answer.

It seems the move from /var/run to /run did not work during the upgrade process.

I fixed with this:

cd /var mv run _run ln -s /run .

Solution 4:

Well, as it says, it could not find /run/network. That's why it doesn't start with /etc/init.d/networking start

I have the same problem, just a few days ago and still trace the failure since the directory gets destroyed every reboot.

If you simply create the /run/network directory you'll be able to start the network with a configured ethX but you'll lose it again next reboot. I haven't figured out what service is so persistent to destroy my work every time. Try it, creating a directory can't hurt too much.