Can I Enable Dhcp4 on All Interfaces Globally Without Knowing the Interface Names with Netplan and Networkd?
Can I Enable Dhcp4On All Interfaces Globally Without Knowing the Interface Names with Netplan? I Might Add Any Usb Connected Ethernet Nic, and I Just Want Any...
Can I enable DHCP4on all interfaces globally without knowing the interface names with netplan? I might add any USB connected ethernet NIC, and I just want any of them to get the network config via DHCP4. I know it works with NetworkManager. But I would rather use the networkd renderer.
1 Answer
It is possible to enable wifi on an interface without knowing the exact interface name by using the match syntax:
network:
version: 2
renderer: networkd
ethernets:
alleths:
match:
name: en*
dhcp4: true
Be sure to avoid any settings that would collide between multiple interfaces (and do not use set-name).