Lambda Blade, Ubuntu 18.04 and Ubuntu 20.04
The ID of our primary ethernet interface frequently changes after a software update, adding a GPU, etc. The result is that DHCP is not used and there is no network connectivity. Running sudo dhclient -r; sudo dhclient
fixes it until the next reboot but that is just a temporary fix.
How can we configure things so that the interfaces always use DHCP at startup? Currently, the file /etc/netplan/01-netcfg.yaml
looks like this:
network:
version: 2
renderer: networkd
ethernets:
eno0:
dhcp4: true
enp96s0f0:
dhcp4: true
enp97s0f0:
dhcp4: true
We are only using one interface, but every time a new interface ID shows up, we add it to this file to try to catch it next time. This is obviously just a hack and is not robust. What is the right way to do this?