Network Device Renaming

I am trying to bring up WiFi on a system that I intend to clone many times in the future. The device is a vanilla Edimax ew-7811UN. The device shows in lsusb and the driver is reported. Both the builtin Ethernet and the Dongle are reported in ifconfig as enx, obviously renamed by udev during boot as “predictable device names.”

It is obviously impossible to configure as system for a device to be named later without knowing the MAC address of the device, which can’t be known in advance. I get the motivation for “predictable device names” for systems containing two or more wired Ethernet devices, but it is a disaster for WiFi dongles.

How can I revert to “wlan0”? None of the classical solutions solutions work for Ubuntu Mate on the RPi. Linking /etc/udev/rules.d/80-net-setup-link.rules to /dev/null, for examples, prevents renaming but breaks all networking.

See for the inverse question which you can apply :slight_smile:

Thanks, that did the trick!

1 Like

Indeed, to avoid having persistent interface names and revert back to the classic interface naming convention, simply add to the 1st command line in the file /boot/cmdline.txt the following keywords:

net.ifnames=0 biosdevname=0

Nice tip in the UbuntuMATE Flavour FAQ :wink:

Must be an undocumented feature though, since I could not find this paramter in any of the Raspberry Pi CMDLINE.TXT documentation.

OK, that worked for five months, but now something has changed and devices are getting renamed again.

My OS is Ubuntu 16.04 LTS. It continued to work after upgrading to 16.04. Whatever changed was from a relatively recent update.

I understand the logic for persistent interface names, but they are an utter disaster if you’re trying to use a single system image for multiple systems, doing something moderately complex like configuring a machine as a wireless NAT router, or, gulp, both.

Any help would be deeply appreciating.