weblog d’un abbe

20071219

How IPv6 tunnelling keeps me connected with IRC servers

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

These days I used to IRC a lot. And also these days, my dynamic IPv4 based ADSL Broadband connection disconnects frequently, couple of time it is at ADSL level, sometimes its at PPPoE level. IRCing over an IPv6 tunnel keeps me logged-in to IRC even when my ADSL links goes down, and I was waiting for it to up. But this works with only my freenet6 tunnel, not 6to4. How all this happens ?

  1. I connect to Internet by PPPoE dialing to my ISP.
  2. I start my freenet6 tunnel (IPv6-over-UDP-over-IPv4).
  3. Now, I connect to IPv6 IRC servers like (ipv6.chat.freenode.net, or irc6.oftc.net) using my IRC client.
  4. ADSL links goes down after some time.
  5. PPPoE connection also times out, destroying my IPv6 tunnel .
  6. Within 10-15 seconds ADSL link is up.
  7. PPPoE session is re-established.
  8. freenet6 IPv6 tunnel is re-established.
  9. I check my IRC client to see whether I was disconnected or not. To my surprise, I am still online, getting all messages. never disconnected.

Why I was not disconnected from IRC despite my IPv6 tunnel get destroyed, my IPv4 address changed ? Is my IRC client doing any magic ? No, its not anything special my IRC client does, its all due to my OS, GNU/Linux‘s network stack. Hmm…? Yes, when my IPv6 tunnel (underlying channel) goes down, TCP connection to IRC servers stays in ESTABLISHED state until TCP connection times out. Now another question is why, IRC server hasn’t disconnected from its side ? Because my link went down suddenly, so no time for tunnel client to send the message to the remote endpoint to close the tunnel. So, for remote endpoint (i.e. freenet6 server) I’m still up, its just that I’m not sending ACK packets, so it’ll keep transmitting retransmitted packets (from IRC server) until tunnel times out. For IRC server also, I’m still up, its just that I’m not sending ACK packets, so it’ll keep retransmitting packets unless, (i) I acknowledge with ACK packets, or (ii) TCP retransmission timeout happens at IRC server’s end, or (iii, not sure on this, as I don’t how its all happening at tunnel broker’s end) freenet6 server sends an ICMPv6 Destination Unreachable to IRC server, when tunnel timeout happens. BtW, its no special treatment for IPv6 tunnels its there for other networks also, provided address of your network interface is static and you regain connectivity before retransmission timeout happens :) . Not sure, if this is part of Internet Host Requirements RFCs. I’ll read them soon as I get some time, anyways happy IPv6ing… :)

Advertisements

20071215

Wanna USENET

Filed under: Fun — abbe @ 1419
if (USENET != SPAM) {

USENET is one of my favorite services on Internet. I’d my first NNTP access to a newsgroup around 2000 AD and subscribed to some newsgroup in microsoft.public.* hierarchy via nntp://msnews.microsoft.com. That time I was a Microsoft fanboy, using Outlook Express, quite new to Internet, and was unable to find any free NNTP posting hosts. Unable to find alt.* or comp.* hierarchy, I started reading USENET via Deja News, and found it really cool, and worth the time and money. Anyways USENET still rocks.

And now, with the help of dmoz, I’m able to find out couple of public USENET NNTP servers which allow free posting. So I’m on USENET over NNTP. With some research I also figured that one can easily setup a USENET server. Provided he/she needs to have enough bandwidth, good administration capabilities (this I’m not sure as I never got any chance to administer any NNTP server, but just heard from few of USENET server admins). The USENET peerings are available for free. There’re couple of hosts ready to peer with you for free, including sharing of alt.binaries.* hierarchy. I’m running an instance of Leafnode, though soon I’ll install Inn, when I find some time. To find which NNTP servers I use, you can trace path of any of my USENET posting. So what’re you waiting for get, set, and USENET :) .

P.S. BtW, Gmane is not part of USENET.

}

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… :)

20071204

The Count of Monte Cristo

Filed under: Yippee!! — abbe @ 1824

For the fans of Alexandre Dumas, there is a good news. LibriVox has released an audiobook of The Count of Monte Cristo. Its available in MP3 , and Ogg Vorbis over HTTP and FTP. I wish if it is also available in Speex. I tried encoding one Ogg Vorbis file in Speex, and output is good. A 11 MiB Vorbis audio got reduced to 7.5 MiB Speex audio, with no tweaks, simply oggdec -o - input.ogg |speexenc - output.spx. Anyways, thanks to Raj Shekhar for making me aware of this in his blog post. Its under public domain, so if anyone sitting on fat pipe can publish a torrent and seed that, it will be cool :). I think Internet Archive (where this audiobook is hosted) should offer Bittorrent also. I’ve downloaded around 75 Oggs, and still downloading. Anyways, thanks to volunteers at LibriVox :).

Create a free website or blog at WordPress.com.