I have a DNS server (pfSense) for my LAN, working perfectly, but some timeouts occur that I can't explain. Especially the "host" command gives the correct answer immediately, but then tries 2 times more with timeouts:
charles3@cluj:~ » host -v cluj.int.acme.fr
Trying "cluj.int.acme.fr"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14189
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;cluj.int.acme.fr. IN A
;; ANSWER SECTION:
cluj.int.acme.fr. 1 IN A 192.168.1.113
Received 52 bytes from 192.168.1.1#53 in 0 ms
Trying "cluj.int.acme.fr"
;; connection timed out; no servers could be reached
Trying "cluj.int.acme.fr"
;; connection timed out; no servers could be reached
The timeouts happens during last 4 lines of the output. This happens on the two different machines I have (Mac and Linux).
How can I know why are there two trials while answer has already been given?
A complete answer from
host
could include IPv6 addresses.strace -f host
on Linux suggest these arrive in a separate packet.It looks like host also queries MX addresses (
kernel.org mail is handled by 30 ns4.kernel.org.
), which requires another packet.So that would explain how you can have two more requests after the first one. I.e. the first-level question, of how this is even possible :).
Dnsmasq used on consumer routers used to have a bug, triggered by the pattern of simultaneous ipv4/ipv6 queries used by the polipo web proxy, and the ipv6 result. I think the second query was ignored & timed out.
I don't know what else would tend to cause this. A working local resolver should be returning
SERVFAIL
if necessary. Hopefully pfsense support forums would know more.You could confirm / narrow it down slightly
man host
Better use
-a
option if you want to perform an ANY request because-v
sends several queries.host -a example.com
host -v example.com
Check your firewall if there is any rules that can block sequential DNS queries (port 53).