I seem to have the opposite problem of the internet. When you search for predictable network names not working all you find for the love of god is how to go back to wlan0, eth0 etc and disable it.
I do have the opposite problem. I have a freshly installed Ubuntu 22.04 server on Raspberry 4 and it will not use predictable net names. In fact I have heavy problems with interfaces wlan0 and wlan1 randomly switching their places.
There is nothing in /etc/systemd/network.
On /etc/default/grub.d/50-cloudimg-settings.cfg nothing suspicious like net.ifnames=0 is passed to the kernel command line.
Any advice on where to start digging, why this is not working?
Thanks
Best Answer
If you run
raspi-config
, select "Advanced Options", then "Network Interface Names", you will be prompted to enable predictable device names. This works by manipulating files in/etc/systemd/network
to mask the corresponding units in/usr/lib/systemd/network
. With predictable device names disabled, we see:Those symlinks to
/dev/null
mask the files with the same name in/usr/lib/systemd/network
. When we enable predictable device names, those masking files are removed.If you're familiar with predictable device names on other systems, you may be disappointed; on my Pi, with two wireless interfaces (the built-in interface and a USB interface), I get:
What that tells us is that the Pi simply doesn't provide the information that systemd generally uses to create predictable device names on other systems (bus, device id, etc). It might be sufficient for what you're doing: in the above output, the devices that were previously
eth0
andwlan1
have been replaced with device names using the MAC address.