Very slow resolution when using a router for DNS

Bug #92040 reported by Chris Rowson
10
Affects Status Importance Assigned to Milestone
bind9 (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Edgy by Chris Rowson
Nominated for Feisty by Chris Rowson

Bug Description

When using a adsl modem router as a gateway for DNS, Domain name resolution is extremely slow indeed.

Running nslookup returns a 'reply from unexpected source' message. The router works with a Windows XP computer.

The workaround for this problem is to replace DNS entries with external DNS server addresses to replace the gateway IP. Looks a little like Ubuntu is expecting to see DNS returned in a different manner than Windows perhaps?

Revision history for this message
Chris Rowson (christopherrowson) wrote :

Tested on Ubuntu Edgy, Xubuntu Edgy & Windows XP.

Revision history for this message
Alan (mrintegrity) wrote :

I can confirm this bug on two different computers (both laptops of different brands) on ethernet and wifi connections. Same issue on edgy, feisty but works fine on windows XP.

Workaround of putting external dns server addresses seems to work at this point.

Router is a Belkin F5D7230-4 wireless G

Revision history for this message
Tom Inglis (tominglis) wrote :

Hi Guys,

I have been having this problem aswell on my desktop and two laptops, with Dapper, Edgy, and Feisty.

I think networkmanager is assigning the IP of the router as the top DNS server in resolv.conf. If I leave it there, DNS lookups are really slow, whatever the application (browser, imap, apt-get etc), adding 10 to 15 seconds to the resolution time, and also hindering multiple simultaneous requests from succeeding, especially say opening websites in different tabs in quick succession. Removing this IP from the config file fixes this problem, and resolutions occur in a second or so.

If you take a look at Wireshark captures, it seems that there may be a problem with IPv6 which is enabled by default in Ubuntu, and particular routers. I was told on #ubuntu+1 that this is likely to be the result of "your router's DNS responds to AAAA requests with A results and this seems to delay ubuntu from trying an A lookup", but I don't really understand such things.

I really hope that you can fix this, and do let me know if there is more info that I can supply?

Thanks,

Tom

Revision history for this message
Tom Inglis (tominglis) wrote :

PS - I also have Belkin F5D7230-4 Version 6000 Firmware 8.01.09. I have spoken to Belkin about this and they are looking into it, but didn't seem to know what was wrong when I spoke to their escalation team on the phone.

PPS - Windows XP SP2 works fine with the router on my laptop (and presumably would also on my other machines).

Revision history for this message
Alan (mrintegrity) wrote : Re: [Bug 92040] Re: Very slow resolution when using a router for DNS

Hi Tom,

Yes, turns out it is because of ipv6 with some routers. I disabled ipv6
support with ubuntu and DNS resolution is very fast again. You can do that
by editing the file /etc/modprobe.d/aliases

Change the line that says "alias net-pf-10 ipv6 " to "alias net-pf-10 off"

And enjoy your nice fast DNS resolution :)

Alan

On 4/4/07, Tom Inglis <email address hidden> wrote:
>
> Hi Guys,
>
> I have been having this problem aswell on my desktop and two laptops,
> with Dapper, Edgy, and Feisty.
>
> I think networkmanager is assigning the IP of the router as the top DNS
> server in resolv.conf. If I leave it there, DNS lookups are really slow,
> whatever the application (browser, imap, apt-get etc), adding 10 to 15
> seconds to the resolution time, and also hindering multiple simultaneous
> requests from succeeding, especially say opening websites in different
> tabs in quick succession. Removing this IP from the config file fixes
> this problem, and resolutions occur in a second or so.
>
> If you take a look at Wireshark captures, it seems that there may be a
> problem with IPv6 which is enabled by default in Ubuntu, and particular
> routers. I was told on #ubuntu+1 that this is likely to be the result of
> "your router's DNS responds to AAAA requests with A results and this
> seems to delay ubuntu from trying an A lookup", but I don't really
> understand such things.
>
> I really hope that you can fix this, and do let me know if there is more
> info that I can supply?
>
> Thanks,
>
> Tom
>
> ** Attachment added: "Wireshark Capture with Router IP as DNS"
> http://librarian.launchpad.net/7133681/capture
>
> --
> Very slow resolution when using a router for DNS
> https://bugs.launchpad.net/bugs/92040
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Chris Crane (chris-crane) wrote :

Hi All,

I had a different cause that had exactly the same effect on my Edgy install. In /etc/resolv.conf a reference to my internal Windows domain was added as the first line. The second line was my DSL router's internal IP address. The fix was to remove the first line leaving only the one for my router. Worked a treat, from 5+ seconds for every lookup to < 1.

Cheers,
Chris

Revision history for this message
Tom Inglis (tominglis) wrote :

Hi Guys,

This bug seems to have been corrected in a recent update. It no longer affects any of my machines, but I have made no changes to the configuration.

Thanks,

Tom

Revision history for this message
Chris Rowson (christopherrowson) wrote :

Agreed - Recent release of Feisty seems to have fixed my error.

Revision history for this message
Mathias Gug (mathiaz) wrote :

glibc (2.5-0ubuntu13) feisty; urgency=low

  * debian/patches/any/local-ipv6-sanity.diff: Only do AAAA lookups if we
    have an interface with better than link-local addresses available.

Changed in bind9:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.