How to stop first DNS lookup waiting for 5 seconds for IPV6 to fail?
Chris Green
cl at isbd.net
Fri Feb 21 22:06:44 UTC 2020
I have two systems running [x]ubuntu 19.10, both of them suffer from
this problem. The first lookup of a LAN host gets the IPV4 result
quickly but the IPV6 lookup waits for 5 seconds before failing.
Subsequent lookups run quickly because the results are in the local
cache. Strangely *all* LAN lookups are speeded up after the first
one, not just the first one tried. If I reboot the client system then
the first lookup is again slow, the slow lookup also happens again
after a time (presumably the DNS cache 'life').
So, for example, I have a hosts called 'esprimo' and '2860n' on my
LAN. Here are some timings for lookups:-
chris at backup$ time host esprimo
esprimo.zbmc.eu has address 192.168.1.3
real 0m5.288s
user 0m0.000s
sys 0m0.016s
chris at backup$ time host esprimo
esprimo.zbmc.eu has address 192.168.1.3
real 0m0.020s
user 0m0.004s
sys 0m0.013s
chris at backup$ time host 2860n
2860n.zbmc.eu has address 192.168.1.1
real 0m0.017s
user 0m0.014s
sys 0m0.000s
chris at backup$
Then I reboot 'backup' and:-
chris at backup$ time host 2860n
2860n.zbmc.eu has address 192.168.1.1
real 0m5.178s
user 0m0.007s
sys 0m0.008s
chris at backup$ time host esprimo
esprimo.zbmc.eu has address 192.168.1.3
real 0m0.020s
user 0m0.004s
sys 0m0.013s
chris at backup$ time host 2860n
2860n.zbmc.eu has address 192.168.1.1
real 0m0.018s
user 0m0.007s
sys 0m0.008s
So, just the first lookup takes 5 seconds, there's a timeout waiting
for something to fail I think and looking in the logs it would appear
that it's a timeout waiting for an IPV6 address. Is there any way to
prevent this?
--
Chris Green
More information about the ubuntu-users
mailing list