LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Why is Resolving taking so long? (http://www.linuxquestions.org/questions/linux-networking-3/why-is-resolving-taking-so-long-215051/)

DevilDust 08-08-2004 02:04 PM

Why is Resolving taking so long?
 
Here's the issue, any DNS that needs to be resolved ie. google.com takes between 15-60 seconds, and sometimes just simply fails. When going to the IP itself it is fast, like it should be. Downloads are fullspeed as well, as soon as resolving is done.

I used ndis-wrapper to install my motorola WPCI810G PCI card, which worked perfectly. I'm connecting to a motorla WR850G router. And distro I'm on is Mandrake 10.

Here's some info I've gathered that may help.

Settings in Manage Connections - wlan0 (Mandrake Control Center 10)
-------------------------------------------------------------------
DHCP Selected

IP: 192.168.10.2
Netmask: 255.255.255.0
Gate: 192.168.10.1

DNS Servers: 192.168.10.1
Search Domain: localhost

Output of ifconfig
------------------
wlan0 Link encap:Ethernet HWaddr 00:0C:E5:45:CA:F1
inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:e5ff:fe45:caf1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:163266 errors:0 dropped:0 overruns:0 frame:0
TX packets:144120 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10928899 (10.4 Mb) TX bytes:11779684 (11.2 Mb)
Interrupt:3 Memory:ea000000-ea001fff


Output of route
---------------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 * 255.255.255.0 U 0 0 0 wlan0
default wr850g.motorola 0.0.0.0 UG 0 0 0 wlan0

Settings In Router
------------------
Connection Mode: Cable Modem(dhcp)

IP Address: 68.188.x.x
Subnet Mask: 255.255.255.0
Default Gateway: 68.188.x.x

obtain DNS servers automatically: checked

Primary DNS: 66.168.128.20
Secondary DNS: 66.168.128.21
Tertiary DNS: Blank

Host Name: Blank
Domain Name: Blank

If anyone could help me figure this out, I would appreciate it very much.

Thanks,
DevilDust

david_ross 08-08-2004 02:24 PM

Welcome to LQ.

Does this only happen when using a particular browser?

Can you post the output from:
time dig www.linuxquestions.org

Does your router have any diagnostic tools? If so then try a dns lookup from the router itself and see if that is any faster.

amfoster 08-08-2004 02:30 PM

Just a quick check...

There are listings in the /etc/resolv.conf file right?

The resolver will "resolve" addresses using the dns servers according to their order.

Put the valid out there in the world address first and that shud speed things up.

DevilDust 08-08-2004 05:13 PM

The slow resolving has happened with konquerer, firefox browsers... and chat programs: x-chat, kopete. Basically I used anything where the DNS resolves as quick as it should. As far as in the router, yeah DNS or traceroute in the router works just fine.

Output from Resolv.conf
---------------------------------
nameserver 192.168.10.1
search localhost

Output from dig www.linuxquestions.org
------------------------------------------------------

; <<>> DiG 9.2.3 <<>> www.linuxquestions.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7606
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.linuxquestions.org. IN A

;; ANSWER SECTION:
www.linuxquestions.org. 3462 IN A 64.179.4.149

;; Query time: 3 msec
;; SERVER: 192.168.10.1#53(192.168.10.1)
;; WHEN: Sun Aug 8 17:10:09 2004
;; MSG SIZE rcvd: 56

NOTE: Browser was at www.linuxquestions.org when dig was done... I just tried dig wwwgoogle.com, and it wouldn't go through, says no servers chould be reached.

UPDATE: okay, so dig www.google.com finally worked.. it's taking between 240-300 msec to resolve... that isn't very long is it?

tekhead2 08-08-2004 05:32 PM

It looks like your dns server is also your router. Does your router keep a dns table or something? If it does you may need to flush it or something. also try to do and nslookup on an address and see what dns address your really using and how long it takes.

Ninaw 08-08-2004 08:24 PM

what is the effect of removing the line search localhost from resolv.conf? I had problems in the past with similar entries so I removed them. I have a router too and I use the address of the router as my nameserver and I have no problems whatsoever.

DevilDust 08-08-2004 08:38 PM

router address is: 192.168.10.1 and is set to nameserver in resolv.conf

tried taking search localhost out of resolv.conf and then i lost my connection..

Ninaw 08-08-2004 08:43 PM

ok...so that was not a good idea :D
are you on dynamic or static IP/DNS settings?

Cedrik 08-08-2004 08:48 PM

Does the command ' dig @192.168.10.1 google.com A ' take much time ? And is there ' ANSWER: 1 ' in output ?

I would try to add my ISP nameserver in /etc/resolv.conf too in case of...

Ninaw 08-08-2004 08:51 PM

Quote:

Originally posted by Cedrik
Does the command ' dig @192.168.10.1 google.com A ' take much time ? And is there ' ANSWER: 1 ' in output ?

I would try to add my ISP nameserver in /etc/resolv.conf too in case of...

I agree sometimes the ISP's nameservers work too. if you get the settings dynamically you won't even have to know their servers

DevilDust 08-08-2004 09:08 PM

I got Answer: 3 ... and took 289 msec

since I'd just been to google I tried linux.com:
got Answer: 1 ... and took 330 msec

.. not sure what that means.. maybe yall can interpret for me

btw, I tried putting in ISP nameservers, that I took from working Windows machine like:

nameserver 192.168.10.1
nameserver isp nameserver 1 (the IPs, i forgot them)
nameserver isp nameserver 2

didn't seem to matter much, maybe i should take out the router ip as nameserver.. and just put isp nameservers back in?

comp12345 08-08-2004 11:55 PM

Quote:

Originally posted by DevilDust
btw, I tried putting in ISP nameservers, that I took from working Windows machine like:

nameserver 192.168.10.1
nameserver isp nameserver 1 (the IPs, i forgot them)
nameserver isp nameserver 2

didn't seem to matter much, maybe i should take out the router ip as nameserver.. and just put isp nameservers back in?

That wouldn't matter because it would search for the entries at 192.168.10.1 before going to nameserver 1 and 2. Put nameserver 1 first and see if the times improve.


All times are GMT -5. The time now is 05:40 AM.