dnsmasq: slow DNS lookup

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
spidey3
DD-WRT User


Joined: 22 Jul 2007
Posts: 72

PostPosted: Mon Aug 11, 2008 16:16    Post subject: dnsmasq: slow DNS lookup Reply with quote
Greetings:

I am using DD-WRT v24-sp1 (07/27/08) mega (SVN revision 10012) on a Linksys WRT350N, and am noticing some odd behavior with dnsmasq:

For certain DNS names, lookups are very fast when performed from machines on my LAN, but if I log into the router and run nslookup there is a long delay in getting a result.

For instance: When run on my desktop machine nslookup www.statefarm.com returns instantly, even if I have cleared the DNS cache. If I run the same query when logged into the router via ssh, the query consistently takes 20 seconds. On the other hand, nslookup www.google.com returns instantly on both.

While this may seem an academic matter to some, the real impact of the problem is seen when I use this router as a target node for SOCKS tunneling via ssh. In this case, DNS lookups must be tunneled through the SOCKS/ssh connection, and thus are delayed similarly to when nslookup is run directly on the router.

My router is configured as follows:

Setup->Basic Setup->
  • DHCP Type: DHCP Server
  • DHCP Server: Enabled
  • Use DNSMasq for DHCP: True
  • Use DNSMasq for DNS: True
  • DHCP-Authoritative: True
Services->Services->
  • DNSMasq: Enabled
  • Local DNS: Enabled
  • Additional DNSMasq Options: <empty>
I look forward to the assistance of anyone who can help,

Spidey!!!
Sponsor
spidey3
DD-WRT User


Joined: 22 Jul 2007
Posts: 72

PostPosted: Mon Aug 11, 2008 16:25    Post subject: Reply with quote
Some more information:

My ISP is Cablevision Optimum Online.

Unfortunately, when I try nslookup www.statefarm.com 167.206.251.129 to force nslookup to use Optimum's DNS server directly, I see the same 20 second delay.

But why would this be fast on the machines on my LAN?

Spidey!!!


[/b]
spidey3
DD-WRT User


Joined: 22 Jul 2007
Posts: 72

PostPosted: Tue Aug 12, 2008 13:02    Post subject: Reply with quote
Anyone?
spidey3
DD-WRT User


Joined: 22 Jul 2007
Posts: 72

PostPosted: Mon Oct 20, 2008 15:35    Post subject: Reply with quote
Well, I never got an answer to this, and the problem seems to have now resolved itself.

I am guessing that it was some kind of configuration error on Optimum Online's DNS server -- but I would still love to know exactly what caused the problem...

Spidey!!!
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Mon Oct 20, 2008 16:52    Post subject: Reply with quote
It could be (not sure) that an nslookup would force dnsmasq to get an answer from your ISP's DNS-server.
A query from the LAN would get an answer from the cache.

If this is true it could be the reason of the behaviour you were describing (in combination with a bad ISP DNS-server).

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
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
You can attach files in this forum
You can download files in this forum