Networking Forums

Networking Forums > Computer Networking > Linux Networking > SuSE 8.0 and slow DNS resolution

Reply
Thread Tools Display Modes

SuSE 8.0 and slow DNS resolution

 
 
E Drake
Guest
Posts: n/a

 
      07-09-2004, 10:25 AM
Yes, I know this is a topic that has been discussed over and over again,
but after lots of browsing, I find no answer that really helps me.

Everything that uses DNS is slow. The difference between a ping to
yahoo.com and a ping to the corresponding IP adress is huge. >5 secs
compared to 0.1 sec. So my conclusion is that it must be the DNS
lookup that takes time, for some reason (Mozilla alsa says "resolving..."
for the 5+ seconds, indicating the same). And given the time it takes,
I assume it is involving waiting tiome somewhere (a timeout), implying
some request is just simply incorrect and gets no reply.

I tried things I found in the various groups, but apart from not working,
several of the suggestions are not solutions but workarounds to me. I
can live with a workaround, but would like to know whatthe problem is,
and what a proper solution would be

I have router with a DHCP server in it, and get the contents for the
resolve.conf from that, and it looks ok to me, except I am not sure if
the first line should be there. the 10.0.0.6 and 213.204.128.170 are
the primary and secondary DNS of my ISP. 192.168.1.254 is my router:

search myhome
nameserver 192.168.1.254
nameserver 10.0.0.6
nameserver 213.204.128.170

(the "myhome") is set (by me) in the router, and used to be "domain"; and i must
admit I don't know what should be there. it seems one of the advices is
to remove the line? I think it is kind of a workaround, anyway, since it means
I must also disallow dhcpd to modify resolve.conf, and then any changes
in my ISP DNS adresses would not get through to me....)

I also (based on other posts) modified modules.conf so that the
following lines are in there:

# alias net-pf-10 ipv6
alias net-pf-10 off

So, now my questions are:

1. Is there a real solution to this? Which does not involve workarounds
either disabling other things, or implying running your own DNS server
or something?

2. What is really the problem? The reason for a delay of several seconds
must be known, when so many apparently noted it over such a long period?

Regards
jeff
 
Reply With Quote
 
 
 
 
Gerard Wassink
Guest
Posts: n/a

 
      07-09-2004, 10:43 AM
On 9 Jul 2004 03:25:28 -0700, E Drake scribbled:

> So, now my questions are:
>
> 1. Is there a real solution to this? Which does not involve workarounds
> either disabling other things, or implying running your own DNS server
> or something?


> 2. What is really the problem? The reason for a delay of several seconds
> must be known, when so many apparently noted it over such a long period?
>
> Regards
> jeff


Okay. Look at the reason why you specified "myhome" as your domain name. It
suggests to the resolver that there is a DNS available for this domain.

Please give us the output of 'uname -a' (minus the quotes ofcourse).


--
GerardLinux ay tee filternet dee oo tee ann el

|
\ /
.---.
'-. | | .-'
___| |___
-= [ ] =-
`---. .---'
__||__ | | __||__
'-..-' | | '-..-'
|| | | ||
||_.-| |-,_||
.-"` `"`'` `"-.
.' '.

Jesus is alive, I spoke with Him this morning!
 
Reply With Quote
 
Christoph Scheurer
Guest
Posts: n/a

 
      07-09-2004, 02:10 PM
On 9 Jul 2004 03:25:28 -0700
(E-Mail Removed) (E Drake) wrote:


>
> I have router with a DHCP server in it, and get the contents for the
> resolve.conf from that, and it looks ok to me, except I am not sure if
> the first line should be there. the 10.0.0.6 and 213.204.128.170 are
> the primary and secondary DNS of my ISP. 192.168.1.254 is my router:
>
> search myhome
> nameserver 192.168.1.254
> nameserver 10.0.0.6
> nameserver 213.204.128.170
>
> (the "myhome") is set (by me) in the router, and used to be "domain"; and i must
> admit I don't know what should be there. it seems one of the advices is
> to remove the line? I think it is kind of a workaround, anyway, since it means
> I must also disallow dhcpd to modify resolve.conf, and then any changes
> in my ISP DNS adresses would not get through to me....


If there is no DNS-Server running on your Router, remove the search
line and the nameserver line with the ip of your router.

Then try again. If it don't work right, try and remove the line with
the 10.x.x.x IP, since this is a private adress.

Greets Chris
 
Reply With Quote
 
Yas
Guest
Posts: n/a

 
      07-09-2004, 02:51 PM
You could 'dig' to see how quick/slow to took for your machine to do a
namelookup...

gandalf:~# dig www.google.com

; <<>> DiG 9.2.4rc5 <<>> www.google.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60801
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 11, ADDITIONAL: 1

;; QUESTION SECTION:
;www.google.com. IN A

;; ANSWER SECTION:
www.google.com. 900 IN CNAME www.google.akadns.net.

<SNIP>

;; Query time: 2461 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Jul 9 08:47:13 2004
;; MSG SIZE rcvd: 338

Query time tells you how loong it took. You can specify different DNS
servers with dig by using @ like this...

dig www.google.com @some.dns.server

Hope that helps...

ps.... the line 'search myhome' in your resolv.conf doesnt look very
good... unless of course you have a DNS domain called myhome, but iam
guessing you may have confused this with your windows domain.

Yas



On Fri, 09 Jul 2004 16:10:55 +0200, Christoph Scheurer wrote:

> On 9 Jul 2004 03:25:28 -0700
> (E-Mail Removed) (E Drake) wrote:
>
>
>>
>> I have router with a DHCP server in it, and get the contents for the
>> resolve.conf from that, and it looks ok to me, except I am not sure if
>> the first line should be there. the 10.0.0.6 and 213.204.128.170 are
>> the primary and secondary DNS of my ISP. 192.168.1.254 is my router:
>>
>> search myhome
>> nameserver 192.168.1.254
>> nameserver 10.0.0.6
>> nameserver 213.204.128.170
>>
>> (the "myhome") is set (by me) in the router, and used to be "domain"; and i must
>> admit I don't know what should be there. it seems one of the advices is
>> to remove the line? I think it is kind of a workaround, anyway, since it means
>> I must also disallow dhcpd to modify resolve.conf, and then any changes
>> in my ISP DNS adresses would not get through to me....

>
> If there is no DNS-Server running on your Router, remove the search
> line and the nameserver line with the ip of your router.
>
> Then try again. If it don't work right, try and remove the line with
> the 10.x.x.x IP, since this is a private adress.
>
> Greets Chris


 
Reply With Quote
 
E Drake
Guest
Posts: n/a

 
      07-09-2004, 05:43 PM
>
> Okay. Look at the reason why you specified "myhome" as your domain name. It
> suggests to the resolver that there is a DNS available for this domain.
>
> Please give us the output of 'uname -a' (minus the quotes ofcourse).


the my home is the current value after trying to
1. remove the line
2. put various domains there
3. put only "search" and no domainname
but no difference. And anyway, it should not make a difference as long
as the address given in the request is a full url including the dots,
as far as I know

uname -a I'll come back with, I am not at the right machine now

/jeff
 
Reply With Quote
 
E Drake
Guest
Posts: n/a

 
      07-09-2004, 05:46 PM
>
> If there is no DNS-Server running on your Router, remove the search
> line and the nameserver line with the ip of your router.


I have tried, but honestly do not see why it would give any positive effect.,
I am looking for an explanation as much as a solution, by the way....

>
> Then try again. If it don't work right, try and remove the line with
> the 10.x.x.x IP, since this is a private adress.


10.0.0.6 is the adress that the DHCP server at the ISP gives for the
DNS. I know it is private, but that's how they do it.

Cheers /jeff
 
Reply With Quote
 
E Drake
Guest
Posts: n/a

 
      07-09-2004, 05:51 PM
> <SNIP>
>
> ;; Query time: 2461 msec
> ;; SERVER: 127.0.0.1#53(127.0.0.1)
> ;; WHEN: Fri Jul 9 08:47:13 2004
> ;; MSG SIZE rcvd: 338
>
> Query time tells you how loong it took. You can specify different DNS
> servers with dig by using @ like this...
>
> dig www.google.com @some.dns.server
>
> Hope that helps...



the DNS responds swiftly when used from windows. So that is not the
problem, as far as I can tell.

>
> ps.... the line 'search myhome' in your resolv.conf doesnt look very
> good... unless of course you have a DNS domain called myhome, but iam
> guessing you may have confused this with your windows domain.


It is actually just a randomly picked value. The default value in the
router (which has the DHCP server that the PC uses) was "Domain", which is
equally pointless (and probably not intended as a value, but rather as an
hint about what should be there).

Anyway, even if that IS the problem, why does it work so well in Windows (XP),
and so bad in Linux? It suggests that Linux is more picky about something,
or that there IS something wrong with the Linux DNS resolving

/jeff
 
Reply With Quote
 
E Drake
Guest
Posts: n/a

 
      07-09-2004, 06:09 PM
Yas <(E-Mail Removed)> wrote in message

> ps.... the line 'search myhome' in your resolv.conf doesnt look very
> good... unless of course you have a DNS domain called myhome, but iam
> guessing you may have confused this with your windows domain.


Thinking about it, the suggestion to remove this line is part of the
problem.

To my understanding, what is in the resolve.conf is actually received
from
my routers DHCP server. . And the "search" line is part of it. If I
remove it, it is still put there when I get the answer over DHCP, and
my change ends up in a backup file. To get around that, I could set
options for dhcpd so that it won't modify the resolve.conf. But that
assumes I know the DNS IP address of my
ISP, which is against the whole concept of receiving it over DHCP.

And, again, why would the search line matter at all?? I thought the
search
line was meant to complete incomplete names before passing them to the
DNS?
So it would mess upp things slightly if I chose to type "mail" when I
meant
"mail.yahoo.com", unless I actually put "search yahoo.com" in there.

rgrds /jeff
 
Reply With Quote
 
E Drake
Guest
Posts: n/a

 
      07-09-2004, 06:33 PM
Additional info

linux:~ # uname -a
Linux linux 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown


linux:~ # dig www.google.com

;; Total query time: 5012 msec
;; FROM: linux to SERVER: default -- 192.168.1.254
;; WHEN: Fri Jul 9 20:17:25 2004
;; MSG SIZE sent: 32 rcvd: 482



linux:~ # dig www.google.com @10.0.0.6

;; Total query time: 16 msec
;; FROM: linux to SERVER: 10.0.0.6
;; WHEN: Fri Jul 9 20:24:22 2004
;; MSG SIZE sent: 32 rcvd: 482



linux:~ # dig www.google.com @213.204.128.170

; <<>> DiG 8.3 <<>> www.google.com @213.204.128.170
; (1 server found)
;; res options: init recurs defnam dnsrch
;; res_nsend to server 213.204.128.170: Connection timed out



Apparently, 10.0.0.6 is the working DNS (i guess the secondary one
might be down). Also, it seems the resolve.conf is not good enough
in the shape created by dhcpcd (not dhcpd, which I think I mistakenly
wrote previously). My guess is that the 5.012 seconds come from a 5
sec timeout when trying to use 192.168.1.254, which gives the same result as
213.204.128.170 (i.e. time out), plus the few milliseconds it takes to
get an answer from the 10.0.0.6.

But still, WHY?? This now seems as if the router puts its own addrerss
there in the responce to the dhcp request, and messes the resolve.conf up?
would it do that if it was a known fact that the result was like this?
Apparently to windows XP it does not matter. WHat is correct?

/jeff, increasingly puzzled, but stil lwanting to know why
 
Reply With Quote
 
E Drake
Guest
Posts: n/a

 
      07-09-2004, 07:01 PM
I now manually edited the resolv.conf file, to contain no
reference to my routers IP address, and no "search" line.

plus I set
DHCLIENT_MODIFY_RESOLVE_CONF = "no"
in /etc/sysconfig/network/dhcp

it works....! However, wen my ISP decides to chnage the IP address of
their DNS; I have to manually change my resolve.conf, which is not
very nice...

(note that the way dhcpcd creates a backup of resolve.conf may cause
you to edit the wrong file, amd not see your changes taking effect,
because once the DHCLIENT_MODIFY_RESOLVE_CONF is set to "no", there
is no such backing up anymore. Not until then you can see the real
contents of "your" resolve.conf in "resolve.conf", rather than hte backup.)


Question remains, though:

why is dhcpcd (based on what is received form the DHCP server in the router)
setting values in resolve.conf that does not work? And why does the exact same
setting in the router work with XP? Is there a fault in the router, or the
router settings, that is not causing troubles in XP, but in Linux? Or
is there something wrong with the dhcpcdin Linux, while the dhcp client
in XP is ok?

/jeff

Thanks for answering and helping out!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow IPv6 name resolution Alexandru Burciu Windows Networking 0 09-12-2007 03:44 AM
Slow DNS resolution ryan@ryankaskel.com Linux Networking 5 05-17-2005 04:28 PM
Why is my name resolution so slow? park_ Linux Networking 3 11-25-2004 11:36 AM
Is SBC-Yahoo DNS resolution slow? Al. C Linux Networking 2 11-09-2004 02:00 AM
Slow Name Resolution Chrisbo Windows Networking 1 06-07-2004 09:08 PM



1 2 3 4 5 6 7 8 9 10 11