I have an aging router which exhibits some sort of stack overflow issue under load when it's used as a DNS source. So I'm instead telling my machines to use a local (Debian) dnmasq server with 1.0.0.1 as a backup.
And I'm looking at the dmasq logfiles when I do something on any of my Xubuntu 18.04 or 20.04beta machines like:
nslookup netbsd.org
What I'm seeing is that dnmasq keeps answering these queries, initially from its designated (Google) nameservers, and subsequently from its cache. So .. why aren't the subsequent queries being answered directly from the systemd-resolved caches on the Xubuntu machines?
And a related question .. libnss-resolve doesn't get installed by default on either of the above Xubuntu machines. Why would I want to install it? It doesn't seem to make any difference to the systemd-resolved cache behavior.
It seems that the problem is that NetworkManager calls dhclient which then constructs /etc/resolv.conf ..
To make DNS lookups look first at the local cache, you need to edit the line:
so that it reads:
I still don't know why I might want to install libnss-resolve. Anyone?