It doesn't seem like that
nslookup falls back to other DNS servers in Ubuntu 17.10.
DNS subsystem is now managed by
And I see the
/etc/resolv.conf is linked as below:
$ ls -l /etc/resolv.conf lrwxrwxrwx 1 root root 32 Jan 22 15:40 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
As per systemd-resolved man page it seems that it should've tried all the DNS servers in parallel, but it doesn't. It doesn't try secondary DNS name servers if first on fails.
As per the manpage
getaddrinfo() internally retries all DNS servers in parallel, but it doesn't seem like that.
socket.getaddrinfo("internal.set", 80, 0, 0, socket.IPPROTO_TCP)
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
In the case above, 'internal.set' is valid name but only accessible via secondary DNS server.
BTW, i tried setting
set fail as per nslookup man page. Wireshark still reports that only one DNS server has been tried.
$ nslookup > set fail > host internal.set Server: 220.127.116.11 Address: 18.104.22.168#53 Non-authoritative answer: *** Can't find host: No answer >