Posted: Mon Aug 11, 2008 16:16 Post subject: dnsmasq: slow DNS lookup
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,
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?
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...
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