Ubuntu 20.04 not resolving local network hostnames

An Ubuntu 20.04 laptop installation started not being able to resolve the names of hosts in the same local network. Although the host names were registered with the router, the laptop wouldn’t be able to resolve those host names. Surprisingly, neither netbios resolution worked (although nbtscan would find those hosts).

The solution is to bypass the caching local nameserver. /etc/resolv.conf shows a nameserver at 127.0.0.53. I didn’t find a way to configure that nameserver, since afaik I’m not using bind9 or the likes. What helped was deleting /etc/resolv.conf and replacing it with a link to /run/systemd/resolve/resolv.conf which for my system looks like this:

nameserver 192.168.1.1
nameserver fe80::1%3
search local

2 thoughts on “Ubuntu 20.04 not resolving local network hostnames

  1. I just wanted to let you know that I also had this issue and discovered that the issue is with using “.local” as that is a top level domain reserved by RFC 6762 for mDNS/multicast traffic. That is why things have broken in Ubuntu after they switched to using netplan and resolved together.

    So yes, I just wanted to let others know since there are issues that can arise by using .local and this is one of those issues. ^^;

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.