Ubuntu 12.04 - problem with name resolution - IPv6 queries are sent before IPv4.

RafaƂ Radecki radecki.rafal at gmail.com
Mon Apr 27 13:50:28 UTC 2015


Hi Everyone :)

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 -

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.

I tried to disable IPv6 by:
- adding to sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
- adding to /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
- adding to /etc/modprobe.d/blacklist.conf
blacklist ipv6
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

I also tried to:
- add to /etc/gai.conf
precedence ::ffff:0:0/96  100
- add to /etc/resolv.conf
options single-request
- update all packages and kernel (and performed a reboot afterwards).
but it did not help.

Any clues? :D

BR,
Rafal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20150427/6a0319ca/attachment.html>


More information about the ubuntu-users mailing list