I installed ubuntu server on a node of a small linux cluster. By default, the internet connection does not work. I tried to do this manually, by editing


and my file looks like this

auto eth0
iface eth0 inet static
address xxx.168.11.4
network xxx.168.11.0
broadcast xxx.168.11.255
gateway xxx.168.11.1
dns-nameserver xxx.231.25.33

# This is an autoconfigured IPv6 interface
# auto em1
# iface em1 inet6 auto

but, if I type ifconfig -a, I get practically nothing. Instead of eth0, I get em1, em2 that don't have a static IP address anyway (sorry for not pasting the result here, but the java server interface doesn't allow me to do copy/paste.

When I type ifup eth0, I get

$ifup eth0
Cannot find device "eth0"
Failed to bring up eth0.

The reason I got this installed only on one server node is that I have no experience installing ubuntu server and I was hoping to learn a little before I attempt server-wide installation.

The question is how to get eth0 to work. I should mention that right now I have no internet connection from that node.

There is a related question I found here Ubuntu 14.04 Server Install Unable to Connect to Network via Ethernet

But, it still doesn't give me the answer I'm looking for.


Revert to the old eth*/wlan* names on 14.04:

Solution 1:

sudo apt-get remove biosdevname
sudo update-initramfs -u

Solution 2:

Edit /etc/default/grub and add biosdevname=0 to the following variables:


Then run:

sudo update-grub

Solution 3:

Edit /etc/udev/rules.d/70-persistent-net.rules and name the cards as you wish, then reboot.

Revert to the old eth*/wlan* names on 15.10:

Solution 1:

Edit /etc/default/grub and add net.ifnames=0 biosdevname=0 to the following variables:

GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0"
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

Then run:

sudo update-grub
  • 1
    I tried the first solution and it worked. Now I get the correct names for the interface. I still have to figure out how to connect from the node to an outside server, but I can ssh now from the main node without any trouble. – Magicsowon Oct 7 '15 at 14:25
  • 1
    OMG!, I did the solution 1 in 15.10 and it works!!! I have no idea what does these lines means! it is really good idea to explain it. – Hossein Nasr Dec 19 '16 at 9:46
  • For many, many years, the network interfaces in Linux were named ethX (eth0, eth1, eth2 etc.) so for most computers with only 1 network card, the name would be, predictably, eth0. Recently the name was changed to emX for network cards embedded on the motherboard, and pXpY for PCI network cards, breaking most configs. All for dubious "predictability" gains on machines with many network cards, which almost nobody has. And those users who do have them, know how to identify their network cards by MAC address, or if they don't, maybe should consider another career. – o9000 Dec 19 '16 at 19:01
  • (cont) This turns off the new "feature", letting you access your card by the name eth0 again, "fixing" your old config. – o9000 Dec 19 '16 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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