In Ubuntu 18.04,

I have an ethernet adapter that I rename to primary-eth, in a bridge called primary-bridge.

I renamed my network adapter with a file at /etc/udev/rules.d/70-persistent-net.rules

containing the single line: SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="primary-eth" (where aa:bb... is the actual MAC address of my ethernet adapter)

It was working, but then one time I booted up and found primary-bridge empty, and an unwanted additional bridge called rename3 containing primary-eth.

I received advice that my rule is too vague and that udev was likely trying to rename primary-bridge to primary-eth in a race-condition. (because primary-bridge receives it's MAC address from primary-eth, so they both have the same MAC address)

So after looking at udevadm info /sys/class/net/primary-bridge So I added the parameter DEVTYPE!="bridge" But then my primary-eth wasn't being renamed reliably on every boot.

So now I'm using DRIVERS=="?*" instead of DEVTYPE!="bridge", and it has worked fine for the last 2 reboots, but I don't know if it will continue to work reliably.

  1. What does ?* mean in DRIVERS=="?*"? How can it match anything when do I not have a parameter called DRIVERS=... in my udevadm info for neither the primary-bridge nor primary-eth?

  2. Why does DEVTYPE!="bridge" not work? Is there something wrong with this != syntax?

  3. I've also seen the parameter KERNEL=="eth*" being used, which apparently refers to the kernel's real name for the ethernet adapter, which always starts with "eth". If I want to rename a wifi adapter using the same method, would I need to write KERNEL=="wlan*"?

  • in addition to describe the issue, please, show your network configuration files. – c4f4t0r Mar 13 at 13:40

Your Answer

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

Browse other questions tagged or ask your own question.