Networking Forums

Networking Forums > Computer Networking > Linux Networking > Slow DNS lookup

Reply
Thread Tools Display Modes

Slow DNS lookup

 
 
gk
Guest
Posts: n/a

 
      07-23-2003, 09:05 AM
I have a number of PCs connected to the internet via DSL router. They
are all set up with static addresses in the 192.168.0.0 network with
the router as the gateway.
The problem I'm having is that on the Linux boxes (SuSE 8.2) the DNS
lookup is very slow compared to the Windows boxes... e.g. a Windows
lookup is almost instantaneous, whereas a Linux lookup can take
upwards of 20 seconds. Obviously, this isn't doing my case for
switching completely to Linux any favours.

Where should I be looking to sort this out?

- gerry
 
Reply With Quote
 
 
 
 
/dev/rob0
Guest
Posts: n/a

 
      07-23-2003, 04:54 PM
In article <(E-Mail Removed)>, gk wrote:
> are all set up with static addresses in the 192.168.0.0 network with
> the router as the gateway.


What did you assign for DNS server[s]? Doesn't your router do DHCP?

> Where should I be looking to sort this out?


/etc/resolv.conf
man 5 resolver
/etc/host.conf
YAST and SuSE documentation
--
/dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
or put "not-spam" or "/dev/rob0" in Subject header to reply
 
Reply With Quote
 
SPAM_FREE
Guest
Posts: n/a

 
      07-24-2003, 12:52 AM
gk wrote:
> I have a number of PCs connected to the internet via DSL router. They
> are all set up with static addresses in the 192.168.0.0 network with
> the router as the gateway.
> The problem I'm having is that on the Linux boxes (SuSE 8.2) the DNS
> lookup is very slow compared to the Windows boxes... e.g. a Windows
> lookup is almost instantaneous, whereas a Linux lookup can take
> upwards of 20 seconds. Obviously, this isn't doing my case for
> switching completely to Linux any favours.
>
> Where should I be looking to sort this out?
>
> - gerry


what's in your /etc/resolve ???
does it have the same nameserve listed that winblows uses ??

 
Reply With Quote
 
Skylar Thompson
Guest
Posts: n/a

 
      07-24-2003, 01:12 AM
On Wed, 23 Jul 2003 10:05:13 +0100, gk <(E-Mail Removed)> wrote:
> I have a number of PCs connected to the internet via DSL router. They
> are all set up with static addresses in the 192.168.0.0 network with
> the router as the gateway.
> The problem I'm having is that on the Linux boxes (SuSE 8.2) the DNS
> lookup is very slow compared to the Windows boxes... e.g. a Windows
> lookup is almost instantaneous, whereas a Linux lookup can take
> upwards of 20 seconds. Obviously, this isn't doing my case for
> switching completely to Linux any favours.
>
> Where should I be looking to sort this out?


What is in the /etc/resolv.conf file on the SuSE box?

--
-- Skylar Thompson ((E-Mail Removed))
-- http://os2.dhs.org/~skylar/
 
Reply With Quote
 
Gerryk
Guest
Posts: n/a

 
      07-24-2003, 02:10 PM
/etc/resolv.conf reads:

nameserver 159.134.248.17
nameserver 159.134.237.6

which is the same as my windows box.

/etc/host.conf reads:

order hosts, bind
multi on

/etc/nsswitch.conf reads:

passwd: compat
group: compat

hosts: dns files
networks: dns files

services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files

bootparams: files
automount: files nis
aliases: files

(hosts and networks had files and dns in the opposite order, changing to
the current config made no difference)

any other files I should check?

- Gerryk



Skylar Thompson wrote:
> On Wed, 23 Jul 2003 10:05:13 +0100, gk <(E-Mail Removed)> wrote:
>
>>I have a number of PCs connected to the internet via DSL router. They
>>are all set up with static addresses in the 192.168.0.0 network with
>>the router as the gateway.
>>The problem I'm having is that on the Linux boxes (SuSE 8.2) the DNS
>>lookup is very slow compared to the Windows boxes... e.g. a Windows
>>lookup is almost instantaneous, whereas a Linux lookup can take
>>upwards of 20 seconds. Obviously, this isn't doing my case for
>>switching completely to Linux any favours.
>>
>>Where should I be looking to sort this out?

>
>
> What is in the /etc/resolv.conf file on the SuSE box?
>


 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      07-24-2003, 02:26 PM
On Thu, 24 Jul 2003 15:10:45 +0100, Gerryk wrote:
>
> /etc/nsswitch.conf reads:
>
> hosts: dns files


I would try files dns if it was me.
 
Reply With Quote
 
Gerryk
Guest
Posts: n/a

 
      07-24-2003, 03:30 PM
it was files dns originally, and I switched them to see if it would make
a difference. Either way around is just as slow.

- Gerry

Bit Twister wrote:
> On Thu, 24 Jul 2003 15:10:45 +0100, Gerryk wrote:
>
>>/etc/nsswitch.conf reads:
>>
>>hosts: dns files

>
>
> I would try files dns if it was me.


 
Reply With Quote
 
Stefano
Guest
Posts: n/a

 
      07-25-2003, 08:54 AM
On Wed, 23 Jul 2003 10:05:13 +0100, gk wrote:

> I have a number of PCs connected to the internet via DSL router. They
> are all set up with static addresses in the 192.168.0.0 network with the
> router as the gateway.
> The problem I'm having is that on the Linux boxes (SuSE 8.2) the DNS
> lookup is very slow compared to the Windows boxes... e.g. a Windows
> lookup is almost instantaneous, whereas a Linux lookup can take upwards
> of 20 seconds. Obviously, this isn't doing my case for switching
> completely to Linux any favours.


I've already switched completely to linux since some year, but only
recently I started having problems with slow dns lookups. The problems
affects telnet, links, w3m, lynx, and many command line apps (apt-get,
aptitude, ecc). Doing ping, dns lookups are instantaneous, and under
Konqueror, Mozilla or Opera I can't notice any slowness either.

xchat, on the other hand seems as if it can't resolv names any more. If I
put the IP directly, the connection is immediate.

My resolv.conf, hosts, and nsswitch.conf seems OK, and I didn't change
anything.

It's not a network problem: windows computers in the same network don't
have any problem (actually, many apps on my sys don't have any problem,
just some of them).
Any idea?

Thanx,
S

--
Remove the dashes from my mail address.

 
Reply With Quote
 
Mica
Guest
Posts: n/a

 
      07-25-2003, 08:37 PM
<snip>
> > I have a number of PCs connected to the internet via DSL router. They
> > are all set up with static addresses in the 192.168.0.0 network with the
> > router as the gateway.

<snip>

Can you check the route table ? is the detault gateway configured properly ?

Also, using TCPdump or Ethereal, you can see if there are lots of broadcasts
or ARP lookups.

Regards,
Navin.
 
Reply With Quote
 
Stefano
Guest
Posts: n/a

 
      07-26-2003, 09:14 AM
On Fri, 25 Jul 2003 13:37:28 -0700, Mica wrote:

> <snip>
>> > I have a number of PCs connected to the internet via DSL router. They
>> > are all set up with static addresses in the 192.168.0.0 network with
>> > the router as the gateway.

> <snip>
>
> Can you check the route table ? is the detault gateway configured
> properly ?
>
> Also, using TCPdump or Ethereal, you can see if there are lots of
> broadcasts or ARP lookups.


The routing table is OK or ping, Konqueror, Netscape, and so on wouldn't
work at all. The only problem is the great slowness with some command line
apps. I suspect this has something to do with libc6: I can see ping and
fetchmail use libresolv and their lookups are fast as they should be,
while links, lynx, w3m, apt-get etc don't.

I tried doing a "strace telnet mysite.com 80" and I noticed it stops here
for quite a long time:

munmap(0x40012000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=43577, ...}) = 0
old_mmap(NULL, 43577, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40012000
close(3) = 0
open("/lib/libnss_dns.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0L\ 16\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=12828, ...}) = 0
old_mmap(NULL, 15732, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40249000
mprotect(0x4024c000, 3444, PROT_NONE) = 0
old_mmap(0x4024c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x4024c000
close(3) = 0
open("/lib/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0(( \0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=56652, ...}) = 0
old_mmap(NULL, 65412, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4024d000
mprotect(0x4025a000, 12164, PROT_NONE) = 0
old_mmap(0x4025a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x4025a000
old_mmap(0x4025b000, 8068, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4025b000
close(3) = 0
munmap(0x40012000, 43577) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("212.216.172.62")}, 28) = 0
send(3, "\\\306\1\0\0\1\0\0\0\0\0\0\txxxxxxx\2it\0\0\34\0\ 1", 30, 0) = 30
gettimeofday({1059210551, 758420}, NULL) = 0
poll(

right after the "poll", waiting 3-4 secs. After many slow "polls"

poll([{fd=3, events=POLLIN}], 1, 5000) = 0

the application goes on, gets the name right and connects to the site.

What could be?
S
 
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 DNS Lookup (and no IPv6-issue???) info@cheffestl.de Linux Networking 18 07-09-2008 10:39 AM
Exceptionally slow ping times, slow DNS lookup and slow download on router Martin Underwood Broadband 1 01-24-2007 12:05 AM
Slow DNS Lookup - Debian mrnull Linux Networking 20 12-13-2005 02:59 PM
lookup problems rocketman768@gmail.com Network Routers 0 10-17-2005 05:01 PM
DNS-Lookup very slow Tobias Mueller Windows Networking 3 09-29-2004 07:50 PM



1 2 3 4 5 6 7 8 9 10 11