Very slow DNS lookup with NetworkManager and dnsmasq


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
- NetworkManager 0.8.4
- dnsmasq 2.52.1.fc13

In /etc/NetworkManager/NetworkManager.conf I have included the line


and, accordingly, my /etc/resolv.conf looks like this:

# Generated by NetworkManager

dnsmasq seems to work: the last lines of output from command "dig" are

;; Query time: 3498 msec

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

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 - 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 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]