Network interface name changes after update to 15.10 - udev changes
In Ubuntu 15.10 (Wily Werewolf), starting with systemd/udev will automatically assign predictable, stable network interface names for all local Ethernet, Wlan and Wwan interfaces (source).
The following different naming schemes for network interfaces are now supported by udev natively:
- Names incorporating Firmware/BIOS provided index numbers for on-board devices (example:
eno1
) - Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example:
ens1
) - Names incorporating physical/geographical location of the connector of the hardware (example:
enp2s0
) - Names incorporating the interfaces's MAC address (example:
enx78e7d1ea46da
) - Classic, unpredictable kernel-native ethX naming (example:
eth0
) - deprecated
By default, systemd will now name interfaces following policy:
- if that information from the firmware is applicable and available, falling back to
- if that information from the firmware is applicable and available, falling back to
- if applicable, falling back to
- is not used by default, but is available if the user chooses so.
- in all other cases.
How do you disable this?
You basically have the following options:
- Create your own manual naming scheme, for example by naming your interfaces internet0, or lan0. For that create your own udev rules file and set the name property for the devices. Make sure to order it before the default policy file, for example by naming it
/etc/udev/rules.d/70-my-net-names.rules
- Alter the default policy file, for picking a different naming scheme, for example for naming all interface names after their MAC address by default:
cp /lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules
, then edit the file there and change the lines as necessary. - Pass the
net.ifnames=0
on the kernel command line.
There is an easier way told by the ArchWiki Beginnersguide.
First get your devices MAC Address by
$ ip link
The output show by like
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 20:68:9d:xx:xx:xx brd ff:ff:ff:ff:ff:ff
Your devices MAC address is the
20:68:9d:xx:xx:xx
Just create the file (simply open with sudo rights in a text editor)
$ nano /etc/udev/rules.d/10-network.rules
Add following line
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="net1"
Replace name with your wanted name and aa:bb:cc:dd:ee:ff with your devices MAC address.
Now just reboot your computer and the device name should have changed.