It is just me that didn't know Linux network device names could change?

I set up an Ubuntu machine about two years ago and it had been running without a reboot since then. Its netplan config looked like this. It got a fixed IP from my pi-hole in DHCP mode:

network:
  ethernets:
    enp1s0:
      dhcp4: true
  version: 2

I recently rebooted it but it didn't come back onto the network because enp1s0 had changed to something different. So now I've added this to the config:

network:
  ethernets:
    lan:
      match:
        macaddress: x:x:x:x:x:x
      set-name: eth0
      dhcp4: true
  version: 2

Now every time it boots it'll be called eth0. I had to also track down some things that had been using enp1s0 so they'd work again too.

Bit of a crazy gotcha.

https://askubuntu.com/a/1437920

I'm not sure I understand - in my case the "predictable" name changed between reboots (running Ubuntu 22.04). Isn't that not supposed to happen? I note the reply on that link doesn't include the approach I took. Hm.

A lot of users still don’t find out that new Linux uses predictable network interface naming and not the old eth0 style. Interfaces are named according to hardware specifics which might be PCI location or firmware data, thus they might get changed after updates, change of hardware, or in virtualized environments. The whole thing was introduced to avoid the situation where interfaces swap names randomly at each boot.

Yes, but the thing I don't undertand is that the system I referred to was (as far as I know) using predictable network interface naming already, and not the old eth0 style. I had to use the macaddress match to get it to stabilise.

You should change it in the UDEV configuration IIRC from the days I use to fix this crap that sadly got introduced at some point in the past… :wink:

The Raspberry Pi OS distro has a easy way to fix it via raspi-config I believe in case someone needs it in the future!