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 of them to get the network config via DHCP4. I know it works with NetworkManager. But I would rather use the networkd renderer.

4

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).

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like