View previous topic :: View next topic |
Author |
Message |
pettsson n00b
Joined: 23 Dec 2006 Posts: 16
|
Posted: Wed Nov 21, 2007 9:45 pm Post subject: Poor DNS performance |
|
|
I've been having an irritating problem with my new laptop on my home network, DNS resolves are slow, and often times out. On other machines (Windows/MacOS) everything works fine, even on the same wire, so that's not the problem.
When connecting to the network (both by wire and wireless), dhcpcd creates an /etc/resolv.conf looking like this:
Code: |
search Hemma
nameserver 192.168.0.1
nameserver 192.168.0.1
|
Where 'Hemma' is the network name set in the router, and 192.168.0.1 is the ip of the router. The router is set up with my ISP's DNS servers.
With this configuration, DNS resolution takes ~5-10 seconds, if it succeds. However, if I change the resolv.conf to this
Code: |
nameserver 195.54.122.200
|
Where 195.54.122.200 is the primary DNS of my ISP, everything works brilliant.
Why is this? I've searched the forums, and several people have had similar problems, but either haven't solved them, or "solved" it by setting up an dns server or other workarounds. The other machines work fine with pointing their DNS to the router, so why not this computer? Is it related to dhcpcd? |
|
Back to top |
|
|
steveb Advocate
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Wed Nov 21, 2007 11:08 pm Post subject: |
|
|
Is a DNS server running on 192.168.0.1? If you have the bind tools installed then you could try this:
Does that respond quickly? Does it respond at all?
Is a DHCP server running on 192.168.0.1? Can you configure it? What is the DHCP range? What subnet mask?
Could you post the output of the following command when executed on your system:
// SteveB |
|
Back to top |
|
|
gscantlen n00b
Joined: 24 Dec 2007 Posts: 1
|
Posted: Mon Dec 24, 2007 10:12 pm Post subject: dhcpcd nameserver=gateway |
|
|
I have a similar problem,
dhcpcd puts the gateway address in as a DNS.
my resolv.conf has 2 nameserver entries.
1st is the gateway (192.168.0.1)
2nd is the ISPs DNS
my router-gateway will not answer or fwrd the name resolution requests
if I delete the 1st nameserver all works fine |
|
Back to top |
|
|
Suicidal l33t
Joined: 30 Jul 2003 Posts: 959 Location: /dev/null
|
Posted: Mon Dec 24, 2007 11:10 pm Post subject: |
|
|
A few things wrong with that config, first
search should be a fqdn like gentoo.org or yahoo.com
nameserver should not be duplicated one entry per ip address
lastly options rotate will cause queries to load balance between name servers,
My resolv.conf looks like this:
Code: | domain mydomain.com
search mydomain.com
nameserver 4.2.2.1
nameserver 4.2.2.2
options rotate |
man resolv.conf for more options. |
|
Back to top |
|
|
|