Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I start an ubuntu 12.10 instance, eth0 is NOT getting configured.

davidparks21@MySqlDB:~$ cat /run/network/ifstate

When I manually edit ifstate and add eth0=eth0 and service restart networking then eth0 gets configured properly and we're all happy.

Reboot though, and I loose the configuration and have to manually edit ifstate and add it again and restart networking.

What configuration might I be missing here?

root@prodweb1:~# cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
share|improve this question
Does ifup -a brings the interface up? – SkyDan Jun 10 '14 at 19:55
What's the output of ip a s eth0? – laebshade Dec 30 '14 at 0:55

To start your eth0 at reboot you need to add an entry in /etc/network/interfaces like below for eth0.

auto eth0
iface eth0 inet dhcp
share|improve this answer
I should have mentioned that I have auto eth0 iface eth0 inet static and all of the parameters configured. They take effect when I add eth0=eth0 to /run/network/ifstate correctly. But reboot and it doesn't configure eth0 properly. – David Parks Apr 4 '13 at 11:17

have you error messages related to eth0 at boot time? (look with dmesg)

maybe the driver for your ethernet card isn't loaded when the boot time configuration runs.

share|improve this answer
The only "error" I see in dmesg is [20277.511852] type=1400 audit(1365069410.434:54): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 parent=18836 profile="lxc-container-default" name="/" pid=18847 comm="mount" flags="ro, remount", because this is an LXC container and mounts aren't allowed, but this doesn't seem related. – David Parks Apr 5 '13 at 2:29
I also see this [ 13.985304] igb: em1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX, perhaps it has something to do with me renaming em1 on the host to eth0 on the LXC container. – David Parks Apr 5 '13 at 2:33
after googling a bit it seems the em# names are the new kernel naming for motherboard embedded ethernet cards. And there is a kernel boot option to disable that behaviour; so try adding biosdevname=0 to the kernel booting options. alternatively, you could try configuring "em1" instead of "eth0" in /etc/network/interfaces file. – Pablo Saratxaga Apr 5 '13 at 22:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.