You are not logged in.

#1 2012-07-27 10:07:03

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

My system prefers IPv6 addresses over IPv4, why?

Hello,
today I noticed a strange behaviour on my Arch system.

This is my network configuration:

$ ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
        inet 192.168.244.113  netmask 255.255.255.0  broadcast 192.168.244.255
        inet6 fe80::f2bf:97ff:fedf:20b0  prefixlen 64  scopeid 0x20<link>

As you can see, I do not have a globally-routable IPv6 address.

Now, if I try to connect to a dual stack site, e.g. google.com, this is what happens:

$ telnet google.com 80
Trying 2a00:1450:4002:802::1007...
^C

While connecting with Chromium is fine.

Looking at the network interaction with the local DNS server, both IPv4 and IPv6 addresses are returned, but Chromium prefers the IPv4 one (correctly, since I don't have a Internet-accessible IPv6 address), while everything else prefers IPv6 address.

This didn't happen a few days ago, and many scripts of mine connecting to dual stack servers now hang waiting for the IPv6 connection to be established.

Any idea?

Last edited by eazy (2012-07-27 10:07:56)


no masters to rule us, no gods to fool us

Offline

#2 2012-07-29 20:30:56

Lennie
Member
From: Sweden
Registered: 2011-10-12
Posts: 146

Re: My system prefers IPv6 addresses over IPv4, why?

You can disable ipv6 by adding 'ipv6.disable=1' on your kernel line in Grub (or whatever bootloader you use). https://wiki.archlinux.org/index.php/IPv6

Offline

#3 2012-07-29 23:20:42

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

Re: My system prefers IPv6 addresses over IPv4, why?

eazy wrote:

Hello,
today I noticed a strange behaviour on my Arch system.

It's not strange, preference for IPv6 over IPv4 is by design.

eazy wrote:

Hello,
While connecting with Chromium is fine.

Looking at the network interaction with the local DNS server, both IPv4 and IPv6 addresses are returned, but Chromium prefers the IPv4 one (correctly, since I don't have a Internet-accessible IPv6 address), while everything else prefers IPv6 address.

Expected behaviour. Chrome/Chromium has a much shorter timeout for failing over from IPv6 to IPv4. It's called Happy Eyeballs: http://en.wikipedia.org/wiki/Happy_Eyeballs

Offline

#4 2012-07-30 11:21:36

ghen
Member
From: Belgium
Registered: 2010-08-31
Posts: 124

Re: My system prefers IPv6 addresses over IPv4, why?

Perhaps you have IPv6 on another interface, what does "ip -6 addr" say?

Offline

Board footer

Powered by FluxBB