Lost networking after reboot, network interface renamed
I can't access my Linode after a reboot and networking seems to be down (can't ping it). After investigating using Lish, I see my network interface has been mapped to eth1 instead of eth0 from this log message:
virtio_net virtio2 eth1: renamed from eth0
Any idea what caused this and how to fix it?
4 Replies
This issue appears to be an unintended consequence of a recent host update we made to address an upstream kernel issue. This kernel change is causing Linodes with certain configurations to add a non-functional network interface while booting. This can be resolved as follows:
Enable Network Helper
Enabling Network Helper will ensure that your Linode is booted with a properly-configured network interface.
You can find instructions on how to do this in our Network Helper Guide.
After enabling Network Helper, reboot your Linode.
Disable Network Renaming
If you want to keep Network Helper disabled, you can instead disable network renaming by running this command on your Linode via Lish:
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
Then, reboot your Linode.
We have found that the above symlink does not address the issue in OpenSUSE systems. These commands should do the trick:
rm /etc/udev/rules.d/70-persistent-net.rules
ln -s /dev/null /etc/udev/rules.d/75-persistent-net-generator.rules
Then, review your Linode's network configuration and reboot.
If you're able to identify the new interface name, you can also try editing your /etc/network/interfaces
file and point to the new interface.
For example, if your old interface was eth0
and your new interface is eth1
, you can change instances of eth0
to read eth1
. I found a good example of how to set up your /etc/network/interfaces
file on nixCraft:
Re: this error message specifically:
virtio_net virtio2 enp0s4: renamed from eth0
This may mean that your are using the Predictable Network Interface Names scheme, which would explain why Ubuntu/Debian can't find "eth0". According to that article you have the following options for disabling this:
You can disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's
.link
file for the default policy:cp /etc/systemd/network/99-default.link /etc/systemd/network/99-default.link.bk rm /etc/systemd/network/99-default.link ln -s /dev/null /etc/systemd/network/99-default.link
Create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own
.link
files in/etc/systemd/network/
, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. See systemd.link(5) for more information.You can pass the
net.ifnames=0
on the kernel command line