/srv/irclogs.ubuntu.com/2022/05/12/#netplan.txt

CRCinAUHi all, so I'm mucking around with netplan on Ubuntu 20.04.....04:05
CRCinAUI'm trying to figure out how to handle a USB ethernet adapter to want to do DHCP on it04:05
CRCinAUgiven the interface name seems to contain the MAC address, all I know is that it'll be called something like: enx<mac>04:06
CRCinAUhow can I make a config statement to auto-set these up as DHCP?04:06
LukasM[m]CRCinAU: if you know the mac address, you can match it using that, e.g. via the "match.macaddress" setting. Then you can simply use "dhcp4: yes" and "dhcp6: yes" to enable DHCP09:34
LukasM[m]See https://netplan.io/reference/#common-properties-for-all-device-types09:34
LukasM[m]alternatively, you could match by driver, or by interface name (or a combination of all 3)09:35
LukasM[m]so you could for example also match on network.ethernets.usb-adapter.match.name="enx*"09:36
CRCinAUI'll be honest, I ended up just switching it to NetworkManager... For the USB ethernet parts - it just does what I wanted out of the box10:28

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!