> $ dig phspi05.phs @192.168.2.1
...
> ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21263
hmm, so, i'm confused now, in the description you said dig works when
querying your router directly? I guess that's not the case?
It certainly seems like this is not a issue with systemd - your problem
appears to be with your router dns configuration. I'll mark this bug as
invalid, but let me know if you disagree.
> So is it perhaps that my naive expectation that without a domain the host is
> assumed to be local is not consistently followed by different
> programs/devices?
Appending of the "search domains" is done only through the getaddrinfo()
(and related) glibc functions. This is the call that uses the
/etc/resolv.conf file for configuration to perform its lookup. You can
see "man resolv.conf" for specific details on the process, but in most
cases it will lookup the hostname you ask for first, and then if that
fails it will try looking up the hostname using each 'search' domain you
specify.
Since modern systems using systemd almost always configure resolv.conf
to send all traffic to the local stub resolver (i.e. 127.0.0.53), this
in effect means systemd-resolved is responsible for actually talking to
all upstream name servers.
Note that any program that *does not* use getaddrinfo() completely
bypasses this and is free to perform lookups however it wants; dig does
just that, by querying *exactly* what you are searching for, to
*exactly* the nameserver you specify. You can tell dig to use any
search domains specified in /etc/resolv.conf, with the +search
parameter; by default it does not use any search domains, and queries
only what you ask it for.
> Also I now realise that my laptop doesn't know what domain it is part of:
> $ domainname
> (none)
Unless you don't have 'domain' or 'search' defined in /etc/resolv.conf,
this doesn't matter for dns resolution.
** Changed in: systemd (Ubuntu)
Status: New => Invalid
--
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