I would like to use DHCP to assign an IP address to my server, but specify the DNS servers manually. I tried the following simple configuration:
network: version: 2 renderer: networkd ethernets: enp0s3: dhcp4: yes nameservers: [22.214.171.124,126.96.36.199]
netplan apply I check the nameservers with
systemd-resolve --status and it shows:
DNS Servers: 188.8.131.52 184.108.40.206 192.168.1.1
The last is the DNS server provided by DHCP, which I do not want to be in the list.
Does netplan have a way to accomplish this?