weblog d’un abbe

20071213

Unable to view IPv6 site over 6to4 connection in Firefox

Filed under: Research — Tags: , , , — abbe @ 0318

If you got into such problem, which I ran into today, I’ve got the reason why it behaves so. But let me first describe the problem:

When I connect to IPv6 internet via 6to4, Firefox doesn’t display IPv6 sites (by default), those also have corresponding IPv4 site. To be precise, in spite of presence of an AAAA DNS RR for a domain name, Firefox refers to the A DNS RR. If no A DNS RR exists, then only Firefox refers to AAAA. And this happens only when I’m connected via 6to4 tunnel not on Freenet6 tunnel which offers a non 6to4 address.

When, I told about this to one of my CentOS-tic friend, who told me I should try CentOS as it works fine in IPv4 free environment. So I thought its some bug. But after posting this question on #ipv6 at irc.freenode.net, jakllsch (a nick in #ipv6) pointed me to RFC 3484. As clear from the title of RFC, Default Address Selection for Internet Protocol version 6 (IPv6) it deals with address selection. So I became confident that due to this RFC, this all is happening. But to became 100% sure, I started reading RFC, and in section Destination Address Selection, I found the solution of my problem. So following is a practical-case (filled with sample data) of my problem:

I’ve 2 addresses a 2002::/16 (a 6to4 address) and a 122.xxx.yyy.zzz (an IPv4 address). I wanted to visit website of www.sixxs.net ( 2001:838:1:1:210:dcff:fe20:7c7c, 213.197.29.32 ) . So to which destination address should Firefox try. According to the rule no. 5:

Rule 5:  Prefer matching label.
If Label(Source(DA)) = Label(DA) and Label(Source(DB)) <> Label(DB), then prefer DA. Similarly, if Label(Source(DA))<> Label(DA) and Label(Source(DB)) = Label(DB), then prefer DB.

So in my case, Label(2002::/16) <> Label(2001:838:1:1:210:dcff:fe20:7c7c) ⇒ 2 <> 1 and Label(122.xxx.yyy.zzz) = Label(213.197.29.32) ⇒ 4 = 4, Thanks to courmisch and jakllsch for confirming this. And I later discovered that its not only applicable for Firefox but also for other applications using getaddrinfo() routine of POSIX API. So mystery solved. Anyways, happy IPv6ing… :)

9 Comments »

  1. I have the same problem how ever about something more serious. I use 6to4 and I can’t visit the IPv6 site https://6to4.nro.net to get reverse DNS of my IP block on my name servers. If you have any solution to this like a firefox patch or something I’d appreciated it.
    Thanks.

    Comment by risto — 20080210 @ 0045

  2. I did an AXFR for 6to4.nro.net. to discover if there’s any AAAA only domain name, but I’ve not found any.

    abbe [~] chateau $ dig axfr 6to4.nro.net. @ns.ripe.net.

    ; <> DiG 9.4.1-P1 <> axfr 6to4.nro.net. @ns.ripe.net.
    ; (2 servers found)
    ;; global options: printcmd
    6to4.nro.net. 172800 IN SOA ns3.apnic.net. 6to4-dns-admin.nro.net. 2007102503 7200 1800 604800 172800
    6to4.nro.net. 172800 IN NS ns.ripe.net.
    6to4.nro.net. 172800 IN NS ns.lacnic.net.
    6to4.nro.net. 172800 IN NS ns3.apnic.net.
    6to4.nro.net. 172800 IN NS tinnie.arin.net.
    6to4.nro.net. 172800 IN A 203.119.0.119
    6to4.nro.net. 172800 IN AAAA 2001:dc0:2001:7:2d0:b7ff:feb7:f7f9
    ns-apnic.6to4.nro.net. 172800 IN A 202.12.28.131
    ns-apnic.6to4.nro.net. 172800 IN AAAA 2001:dc0:1:0:4777::131
    ns-arin.6to4.nro.net. 172800 IN A 168.143.101.18
    ns-lacnic.6to4.nro.net. 172800 IN A 200.160.0.7
    ns-ripe.6to4.nro.net. 172800 IN A 193.0.0.196
    ns-ripe.6to4.nro.net. 172800 IN AAAA 2001:610:240:0:53::4
    6to4.nro.net. 172800 IN SOA ns3.apnic.net. 6to4-dns-admin.nro.net. 2007102503 7200 1800 604800 172800
    ;; Query time: 572 msec
    ;; SERVER: 2001:610:240:0:53::193#53(2001:610:240:0:53::193)
    ;; WHEN: Sun Feb 10 03:13:18 2008
    ;; XFR size: 14 records (messages 1, bytes 412)

    So, an ugly work around is to grab the IPv6 address corresponding to 6to4.nro.net which is 2001:dc0:2001:7:2d0:b7ff:feb7:f7f9 and add an entry corresponding to 6to4.nro.net in your /etc/hosts file, as given below:

    2001:dc0:2001:7:2d0:b7ff:feb7:f7f9 6to4.nro.net

    Now, restart your Firefox (or web browser), and visit 6to4.nro.net, and you’ll get something like this. Happy :)

    Comment by आशीष शुक्ल — 20080210 @ 0341

  3. Clever, wonder why I didn’t think of it :) Thank you.

    Comment by risto — 20080213 @ 2046

  4. You’re welcome.

    Happy IPv6ing.

    Comment by आशीष शुक्ल — 20080213 @ 2056

  5. […] found the reason why it refuses. I wonder if there’s a registry key to change this behavior: (From Unable to view IPv6 site over 6to4 connection in Firefox _(o)-(o)_/ ) It’s basically about RFC 3484, Default Address Selection for Internet Protocol version 6. And the […]

    Pingback by Force IPv6 over IPV4 ? - Page 2 - Web Hosting Forum - Industry Discussion, Webmaster Forum, Web Host Reviews and Deals — 20080225 @ 2234

  6. It is possible to avoid this in Linux by defining your own label-list, like this:
    label ::1/128 0
    label ::/0 1
    #label 2002::/16 2
    label ::/96 3
    label ::ffff:0:0/96 4
    label fec0::/10 5
    label fc00::/7 6
    label 2001:0::/32 7

    Comment by AC — 20080810 @ 1811

  7. forgot, the definitions are in /etc/gai.conf

    Comment by AC — 20080810 @ 1811

  8. Thanks for mentioning this.

    Comment by आशीष शुक्ल — 20080811 @ 0037

  9. […] sites use IPv4 by default (even when IPv6 is available). The reason and solution is described at: http://wahjava.wordpress.com/2007/12/13/unable-to-view-ipv6-site-over-6to4-connection-in-firefox/. Initscripts also has some documentation. On my distribution it is available at […]

    Pingback by » IPv6 Olav Vitters — 20100505 @ 0318


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: