This is a companion to an AskUbuntu question I posted before I had learned enough to ask this question.
(This is for Ubuntu 18.04)
By watching the debug output from
systemd-resolved, I can do queries like:
and see that what's happening is that
systemd-resolved is deferring to my local DNS server (in my router) with a UDP query. That comes back with a response that convinces
systemd to create a
NODATA cache entry.
However, when I do:
host -a foo.mycompany.com
to request an
ANY query, the debug output clearly indicates that the UDP response packet was truncated, so it falls back to a TCP query. When that returns,
systemd apparently sees a valid address and creates a positive cache entry.
You can check the linked question, but the bottom line is that it makes some domain names only work (for a while) if I do a
host -a lookup for the domain.
What I don't know is what it is that might be messed up that would cause this behavior. I don't think it has anything to do with
systemd-resolved itself, because if I bypass that and go straight from my machine to the router DNS the results are the same (though I can't see the debug trace of course). I don't think my router is part of the problem, since a co-worker was able to see the same effect (and he's not in my house).