[arch-general] Why does network interface sometimes change name?
I am running Arch as a guest in VMware Player on Win7X64. On every odd boot, the name of the network interface changes. Sometimes it is: eno16777736 Sometimes it is: eth0 This makes it really hard to configure a fixed IP, which I do by having in `/etc/dhcpcd.conf`: interface eno16777736 static ip_address=192.168.101.10/24 static routers=192.168.101.2 static domain_name_servers=192.168.101.2 I have to change back and forth the interface name in that configuration file.
On Mon, Apr 6, 2015 at 5:36 PM, Felix E. Klee
I am running Arch as a guest in VMware Player on Win7X64. On every odd boot, the name of the network interface changes. Sometimes it is:
eno16777736
Sometimes it is:
eth0
This makes it really hard to configure a fixed IP, which I do by having in `/etc/dhcpcd.conf`:
interface eno16777736 static ip_address=192.168.101.10/24 static routers=192.168.101.2 static domain_name_servers=192.168.101.2
I have to change back and forth the interface name in that configuration file.
It is probably caused by those fancy Predictable Network Interface Names [1], that in your case become unpredictable. Just do: # ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules And you will get the good old "eth0" every time. Unless you have more than one network interface, of course... If that is the case you can use the MAC address to build the interface name, but I forgot the details... [1]: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterface...
On Mon, Apr 6, 2015 at 1:01 PM, Rodrigo Rivas
On Mon, Apr 6, 2015 at 5:36 PM, Felix E. Klee
wrote: I have to change back and forth the interface name in that configuration file.
It is probably caused by those fancy Predictable Network Interface Names [1], that in your case become unpredictable.
You can also disable both of them on the kernel commandline, which is handy when you have thousands of servers and can't afford to deal with the names changing (think mass automation) if a PCI card is plugged into slot6 when you thought it was in slot5 or whatnot. net.ifnames=0 This will stop systemd ("enp0s25" etc.) biosdevname=0 This will stop udev ("em1" etc.) Add those to your GRUB_CMDLINE_LINUX_DEFAULT (or GRUB_CMDLINE_LINUX) in /etc/default/grub and rebuild your grub config file (grub-mkconfig). This is a portable solution that should work on any distro, not just Arch. hth, -te
Op 6 apr. 2015 17:37 schreef "Felix E. Klee"
I am running Arch as a guest in VMware Player on Win7X64. On every odd boot, the name of the network interface changes.
First make sure that vmware always uses the same mac address for this vm. When done, check archwiki for persists nic names. The second step is easy, but gets frustrated when the mac address changes randomly (which is not unusual with virtualization). Mvg, Guus
On Mon, Apr 6, 2015 at 7:34 PM, Guus Snijders
First make sure that vmware always uses the same mac address for this vm.
If the MAC address changes, I would expect the name to change from
`eno16777736` to something like `eno52423433`. I wouldn’t expect it to
change to `eth0`.
Anyhow, it could be interesting to watch for changes. Currently the
interface is named `eth0` with `00:0c:29:12:0e:9e` as MAC address:
$ ifconfig eth0
eth0: flags=4163
After a reboot (due to BSOD in the Windows host - faulty RAM) the
interface name changed from eth0 to eno16777736:
$ ifconfig eno16777736
eno16777736: flags=4163
On Mon, Apr 6, 2015 at 4:36 PM, Felix E. Klee
I am running Arch as a guest in VMware Player on Win7X64. On every odd boot, the name of the network interface changes. Sometimes it is:
eno16777736
Sometimes it is:
eth0
I had the corresponding issue on a machine with two nics (not vm though), and what fixed it for me was to add a udev rule (though it does depend on having consistent mac address for each nic): # cat /etc/udev/rules.d/10-network.rules SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="4c:72:b9:32:45:30", NAME="eno1" SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="4c:72:b9:32:45:32", NAME="eno2" If you want to associate a specific nic to a name chosen by you then this may help. -- mike c
participants (5)
-
Felix E. Klee
-
Guus Snijders
-
Mike Cloaked
-
Rodrigo Rivas
-
Troy Engel