> Sorry thought I was using dig at your request... yes, sorry - dig is useful *but* it does only what you ask it specifically to do (i.e. lookup the specific hostname you ask it for, without appending any search domains to it). this is different from everything else on your system, which uses getaddrinfo(), which will append search domains listed in /etc/resolv.conf.
> ping often works when nslookup fails i can't say *exactly* why this is, but I suspect it's because you had two nameservers listed in /etc/resolv.conf; your router (which *will* resolve the hostname without any domain suffix) and your local systemd- resolved resolver (which *will not* resolve the hostname without a domain suffix, since it won't pass the "single label" hostname to your router nameserver). i believe (don't remember the specifics of the glibc internals tho) that getaddrinfo() will do round-robin queries of each nameserver you list in /etc/resolv.conf, so it may be random chance that one thing looks up your host right, and the next request doesn't. > so clearly the domain is set that will let you do "single label" lookups *from your router only*. setting the router's search domain(s) will have *no effect at all* on lookups from any other system. just make sure: -your router's dhcp configuration includes your local subnet domain (i.e. provides it to your dhcp clients) -your router's dnsmasq (or whatever public nameserver program) has your local subnet hosts *including local subnet domain* defined -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1821491 Title: DNS lookup fails for local hosts To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1821491/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
