DNS issues after upgrading to 20.04

After upgrading to 20.04, both my wired and wireless networking lost access to the internet. I confirmed my drivers were working when I was able to resolve a ping to the Google nameserver 8.8.8.8. Now, every time I reboot, I have to manually edit /etc/resolv.conf and add line:

nameserver 8.8.8.8

I have been unable to get to a permanent resolution in both the network manager and netplan.

IPV4 tab in network manager under DNS set to manual

8.8.8.8, 8.8.4.4

/etc/netplan/01.yaml*

network:
version: 2
renderer: networkd
ethernets:
   wlp58s0:
      dhcp4: true
      nameservers:
         addresses: [8.8.8.8, 8.8.4.4]

If someone could please advise me on how to get my DNS settings configured properly, I would greatly appreciate it. Thanks.


The following worked for me.

sudo systemd-resolve --set-dns=8.8.8.8 --interface=<interface name>

E.g. sudo systemd-resolve --set-dns=8.8.8.8 --interface=eth0


In Ubuntu 20.04, the expected configuration of /etc/resolv.conf is to point to a local systemd-networkd resolver:

nameserver 127.0.0.53

To check which upstream nameservers your local resolver is configured for, you can check the output of resolvectl status. This should show, for each of your network interfaces, the nameservers that have been associated.

You also show a netplan config that says to use the networkd renderer, but mention Network Manager in your question. If you are expecting your wireless interface to be manageable through NetworkManager, then you need to change this netplan config (or else, you have other netplan config already on your system that you didn't list here).