You are not logged in.

#1 2012-03-24 05:09:51

hzqtc
Member
From: Hangzhou, China
Registered: 2008-01-22
Posts: 22

How to prefer ipv6 dns over ipv4

Hi,

I have both ipv6 and ipv4 internet access here.

$ ping6 ipv6.google.com -c 5
PING ipv6.google.com(2404:6800:400a:802::1014) 56 data bytes
64 bytes from 2404:6800:400a:802::1014: icmp_seq=1 ttl=47 time=139 ms
64 bytes from 2404:6800:400a:802::1014: icmp_seq=2 ttl=47 time=138 ms
64 bytes from 2404:6800:400a:802::1014: icmp_seq=3 ttl=47 time=137 ms
64 bytes from 2404:6800:400a:802::1014: icmp_seq=4 ttl=47 time=141 ms
64 bytes from 2404:6800:400a:802::1014: icmp_seq=5 ttl=47 time=141 ms

--- ipv6.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 137.283/139.671/141.738/1.707 ms

And I set DNS to Google's public dns: 8.8.8.8 and 8.8.4.4, which report ipv6 address.

$ host twitter.com
twitter.com has address 159.106.121.75
twitter.com has address 37.61.54.158
twitter.com has address 159.24.3.173

$ host -6 twitter.com
twitter.com has address 159.106.121.75
twitter.com has IPv6 address 2001:778:0:ffff:64:0:c73b:9452
twitter.com has address 93.46.8.89

And I'm wondering if I can config my arch linux to perfer ipv6 dns over ipv4.
I tried to add "options inet6" in my resolv.conf but no luck.

Last edited by hzqtc (2012-03-24 05:18:25)

Offline

#2 2012-03-25 23:12:18

_saiko
Member
From: systemreich
Registered: 2007-08-06
Posts: 91
Website

Re: How to prefer ipv6 dns over ipv4

Depends on the software.
Browsers such as Firefox prefer ipv6 and both A/AAAA queries are made. If AAAA response is received it tries to connect to that IPv6 address.
Doesn't matter that the 'host' command asks only A per default.


cat.7 - where crosstalk is not an issue anymore :'(

Offline

#3 2012-03-26 22:43:23

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: How to prefer ipv6 dns over ipv4

IPv6 is preferred by default over IPv4, in applications that support IPv6.

Most current applications tend to have support for IPv6, so if you have an IPv6 enabled host, and the DNS entries for what you are trying to access have AAAA records then IPv6 will be used. The second part is important; for example Google are well on the way to IPv6, but they do not publish AAAA records on google.com so when you try to access google.com, you will only get A (IPv4) answers. I believe they will add AAAA records to google.com permanently on this coming World IPv6 day.

There are also still applications that don't support IPv6; for example I am still running RabbitMQ over IPv4 only because the client tools I have don't support IPv6 yet.

_saiko wrote:

Doesn't matter that the 'host' command asks only A per default.

My `host` will resolve both by default (on a dual-stack host)

~ $ host ipv6.internode.on.net
ipv6.internode.on.net has address 203.16.214.6
ipv6.internode.on.net has IPv6 address 2001:44b8:8020:f501:250:56ff:feb3:6633

Offline

Board footer

Powered by FluxBB