eth0 not being configured automatically

38,276

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:
38,276

Related videos on Youtube

alok chauve
Author by

alok chauve

Updated on September 18, 2022

Comments

  • alok chauve
    alok chauve over 1 year

    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
    
  • alok chauve
    alok chauve about 11 years
    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.
  • alok chauve
    alok chauve about 11 years
    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.
  • alok chauve
    alok chauve about 11 years
    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.
  • Pablo Saratxaga
    Pablo Saratxaga about 11 years
    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.