Very slow DNS lookup with NetworkManager and dnsmasq
- From: Jarmo Hurri <jarmo hurri syk fi>
- To: networkmanager-list gnome org
- Subject: Very slow DNS lookup with NetworkManager and dnsmasq
- Date: Wed, 14 Sep 2011 16:26:08 +0300
Greetings.
I have run out of tricks to solve the following problem: I am frequently
spending _long_ times waiting for DNS lookups even though
1. all the Windows machines in the same network perform fast DNS lookups
2. I have NetworkManager using dnsmasq.
My setup is the following:
- Fedora 14, kernel 2.6.35.14-96.fc14.x86_64
- NetworkManager 0.8.4
- dnsmasq 2.52.1.fc13
In /etc/NetworkManager/NetworkManager.conf I have included the line
dns=dnsmasq
and, accordingly, my /etc/resolv.conf looks like this:
# Generated by NetworkManager
nameserver 127.0.0.1
dnsmasq seems to work: the last lines of output from command "dig
fedoraproject.org" are
;; Query time: 3498 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
As you can see from the above, I had to wait quite a while for the
response. Running the same command immediately again gives
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
Which makes sense, since the address is now in the cache.
I have two problems:
1. The system seems to "forget" cached addresses, so that address
lookup for a frequently used address - say www.google.com - often
initiates a new search that again takes several seconds. This
happens very often, several times in a day. What is causing this?
Can it be related to DHCP lease time? (It is the only idea I have at
the moment.)
2. Earlier, before I found the dns=dnsmasq option of NetworkManager, I
had a different configuration that enabled the use of dnsmasq with
NetworkManager: adding 127.0.0.1 as one of the servers in
/etc/resolv.conf. Then I could see the name servers obtained from
DHCP. By testing these I noticed that they could be divided into two
classes: really slow servers (no idea why they are so slow), and
acceptably fast servers. The current lookup behaviour, having to wait
3.5 seconds for a response, suggests that when dnsmasq does not know
the address, it queries the slower servers. Is there some way for me
to control (filter) the set of servers obtained from DHCP? How can I
see the servers that dnsmasq is currently using?
We have Windows computers in the same network; none of them have the
same problem. Any ideas of why I have this Linux-specific problem?
Eagerly _waiting_ for your ideas.
---
Jarmo Hurri
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]