Ubuntu 12.04 - problem with name resolution - IPv6 queries are sent before IPv4.
Karl Auer
kauer at biplane.com.au
Mon Apr 27 22:19:20 UTC 2015
On Mon, 2015-04-27 at 15:50 +0200, RafaĆ Radecki wrote:
> I have a quite annoying problem on several ubuntu 12.04 servers. When I
> force a dns query using:
>
> time wget --waitretry=1 http://xxx.yyy -O -
The best way to avoid attempting to connect via IPv6 is to stop the
particular application using IPv6. In the case of wget, try the "-4" or
"--inet4-only" options. You could also use the "--prefer-family=IPv4"
option.
> I get (tcpdump & wireshark) the info that an AAAA IPv6 query is first send
> to a DNS server from /etc/resolv.conf. The server is only serving IPv4
> queries so it responds with an error. Then an IPv4 query is sent. Overall
> the process takes ~10 seconds every time so its painful.
The "IPv6 then IPv4" lookup is normal. Taking 10 seconds to fail a
lookup is not normal. 10 seconds is a very strange delay - too short to
be most things and too long to be most other things :-) Where exactly is
the delay?
> I tried to disable IPv6 by:
Almost always the wrong approach.
> and then I run update-grub an performed a restart. The server is not using
> IPv6 anymore BUT the IPv6 queries are still performed before IPv4 queries
> for each dns lookup which I perform with wget/curl or from inside my
> node.js application. From my point of view it is quite strange :D I
> disabled IPv6 and still see IPv6 queries :D
Not strange - that's DNS doing lookups, and DNS works on either
protocol. The protocol used to make a query or deliver a response is
completely independent of the content of the query or the content of the
response. Without IPv6 available, the queries will be sent and received
via IPv4 - but the queries and responses may contain IPv6 information.
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389
GPG fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
Old fingerprint: EC67 61E2 C2F6 EB55 884B E129 072B 0AF0 72AA 9882
More information about the ubuntu-users
mailing list