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.