Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

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

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
 address 10.1.3.10
 netmask 255.255.0.0
 broadcast 10.1.255.255
 gateway 10.1.0.1
 dns-nameservers 8.8.8.8
 dns-nameservers 8.8.4.4
share|improve this question
    
    
Does ifup -a brings the interface up? –  SkyDan Jun 10 at 19:55
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.