Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Poor DNS performance
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
pettsson
n00b
n00b


Joined: 23 Dec 2006
Posts: 16

PostPosted: Wed Nov 21, 2007 9:45 pm    Post subject: Poor DNS performance Reply with quote

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
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Wed Nov 21, 2007 11:08 pm    Post subject: Reply with quote

Is a DNS server running on 192.168.0.1? If you have the bind tools installed then you could try this:
Code:
dig @192.168.0.1 +short www.ibm.com


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:
Code:
ifconfig



// SteveB
Back to top
View user's profile Send private message
gscantlen
n00b
n00b


Joined: 24 Dec 2007
Posts: 1

PostPosted: Mon Dec 24, 2007 10:12 pm    Post subject: dhcpcd nameserver=gateway Reply with quote

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
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 959
Location: /dev/null

PostPosted: Mon Dec 24, 2007 11:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum