Upgrade to 22.04 broke DNS

I upgraded from 20.04 to 22.04 last night. Besides taking a long time all seemed to go well with no errors. All looked good on initial boot until I tried going to the Internet. I am able to ping ip numbers, but no DNS. I saw this post, but not sure what the fix is. Any recommendations? More details below:

Then...As I am collecting data from the various resolv files as I try various connection, my resolv file fixed itself. So I rebooted and the problem returned.

After reboot:

$ resolvectl status
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub

Link 2 (enp1s0)
Current Scopes: none
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 3 (wlp2s0)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 172.98.193.42
DNS Servers: 172.98.193.42 198.206.14.241

When working:

$ resolvectl status
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub

Link 2 (enp1s0)
Current Scopes: none
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 3 (wlp2s0)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.1.1
DNS Servers: 192.168.1.1
DNS Domain: hsd1.fl.comcast.net

I can temporarily fix the issue by switching between network connections, but that is a band-aid. And I have no idea where 172.98.193.42 198.206.14.241 came from. Any recommendations for a fix?

The public IP address 172.98.193.42 is located in Atlanta, Georgia, 30339, United States.It is assigned to the ISP Centrilogic.

2 Likes

I was able to look that up, so why did Canonical put it in my setting? I see others with my problem got the same ip #s. Seems weird to me. I got lucky upgrading from 18.04 to 20.04, but not with 20.04 to 22.04. While my issue seems fairly common for those who upgraded, especially those that started with 18.04 like I did, I have yet to find a solution except to fix DNS address into my settings. But that is a work around, not a solution.

When working, your DNS is 192.168.1.1; that is your home router. That is very common; my home network is set up the same way. Your router contains the external DNS entries; you can see what they are by logging into your router. When not working, your DNS is 172.98.193.42. As mickee pointed out, that address is assigned to Centrilogic, which I'm assuming is your ISP.

The solution is to configure your system so it always defaults to 192.168.1.1. Here is a post where I went through a similar exercise. You don't mention if you are using Network Manager; that is the default.

Thanks, I am using Network manager. Neither 172.98.193.42 or 198.206.14.241 have anything to do with my network. I assume those IP numbers came from Canonical which is a mystery in itself. As displayed in my original post, my ISP is Comcast.

Interestingly, if I disconnect my network and re-connect, the problem resolves itself, but returns on reboot.

I am willing to try the suggested solution:

$ sudo rm -f /etc/resolv.conf
$ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

But I hesitate as I do not know how to undo this change for some reason it does not work.

@jaybo, you've got two posts going in parallel. i'm going to answer you in the other one, since that has more detail:

To address your comment about hesitation to change the resolv.conf symlink, just make a note of where it is pointing originally. In my case, that was /run/systemd/resolve/stub-resolv.conf. From other comments, I believe this is the default. If you change the symlink and your system doesn't work as you wish, then just return the symlink to the original location, and you're back where you started.

2 Likes

I think you miss understood. I don't want to force Google or Cloudfare as my DNS. I am happy with the ISP DNS as 99% of my connections are various WiFi connections.

Changing the symbolic link worked.

$ sudo rm -f /etc/resolv.conf
$ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

I marked as solved.

I am still confused how/why toggling my network connection corrected the issue and why that the fix didn't hold through re-boot.

Hi, @jaybo

You wrote:

I've searched and those two IP addresses 172.98.193.42 and 198.206.14.241 seem to have been 2 Free / Public OpenNIC DNS Servers. See, for instance, the following 2019 article in the "Dunebook" web site :

From that article, I'm referring specifically to the following section:

"(...) 4. OpenNIC DNS

OpenNIC is also one of the best and fastest DNS servers around, mainly because it has the DNS Neutrality features as well. Just like the DNS WATCH, it is an excellent Gaming DNS server. It enhances the secure browsing of the Internet without having external elements interference.

Primary DNS: 198.206.14.241

Secondary DNS: 172.98.193.42
(...)"

Does that information "ring any bell" for your case? Having said that, those two IP Addresses are NOT part / no longer part of the current list of "OpenNIC Public Servers", as far as I can tell: https://servers.opennicproject.org/

2 Likes

Thanks for the info. But no, this particular laptop I keep fairly clean and typically connect Comcast via WiFi without any network tweaks. And I thought it was strange those numbers would be replaced with the correct numbers after toggling the network connectivity. Anyway, the problem cleared after changing the symbolic link. Thanks again for the reply.

1 Like