Firefox/Iceweasel slow on a D-Link router? Read on...

I previously complained that my Firefox/Iceweasel browser has become unbearably slow, in that it sometimes loads pages, and sometimes stops right in the process. It looks like some kind of DNS issue, except that DNS works fine, and so do other browsers. For months I have been looking for all kinds of fixes to this issue, disabled ipv6 in Firefox, even for my network, but to no avail.

However, I always suspected it had to do with ipv6, or rather how my router handled it, I just couldn’t nail it down. Moreover, Mozilla forums couldn’t provide a solution either. Most people suggested Firefox plugins, such as AdBlockPlus, are to blame for browser sluggishness.

Anyway, while I had already switched to Google Chrome, which didn’t suffer from these issues, I kept my eyes open for a solution as it always bugged me that I couldn’t find out what was going on. And, indeed, getipv6.info not only can explain the problems I had, but also provide a really simple fix. So let me re-distribute this valuable piece of information via this blog here, so that other users, who are in the same boat, will be able to find it more easily:

Several D-Link models from the DSL series (at least DSL-584T, DSL-G604T, DSL-G624T, DSL-G664T, and DSL-G684T), do not correctly forward DNS responses for hostnames with both A and AAAA records published. What it does is to stuff the first 32 bits of the AAAA record into the A record that’s being returned to the end user’s computer. In other words, getipv6.info will incorrectly resolve to 32.1.5.0 (the 2001:0500: part of the IPv6 address). If the operating system or web browser prefers to use IPv4, it will be unable to connect to the destination. Italian ISP Wind/Infostrada is reported to have distributed the DSL-G624T to its customer base over a period of several years.

It doesn’t happen all the time - it appears to be timing-dependent. Older Mozilla Firefox browsers are hit particularly bad, due to the fact that they will request AAAA lookups even if the local host does not have an IPv6 address. Work-around: Disable DNS forwarding support in the router. This will cause the D-Link to advertise the ISP’s upstream DNS resolvers (instead of itself) in DHCPv4, and the hosts on the LAN will query them directly.

For the record: I own a D-Link DIR-632, running on firmware 1.02. The above, indeed, made Firefox work like a charm again. (Having said that, nothing’s going to make me switch from Conkeror back to Firefox again. ;-)