[Gllug] Is my cheapo router really caching DNS?

Adrian McMenamin adrian at newgolddream.dyndns.info
Sun Aug 31 15:49:52 UTC 2008


On Sat, 2008-08-30 at 22:33 +0100, Alistair Mann wrote:

> 
> I've seen a twelve-quid router use linux, so I've no problem thinking 
> that it probably does cache. The simple way to tell is to use dig and 
> some google-fu.
> 

My router doesn't use Linux afaics - but some proprietary OS (WAP D-Link
reports zenmap)

> First visit altavista, or any search engine, and search on your name and 
> this date. Note the domain name of the first returned entry. Your 
> purpose here is to obtain an FQDN that is both valid and unlikely to 
> have recently been visited. That way we can be fairly sure that it 
> doesn't already exist in the cache, if the cache exists.
> 
> Assuming the router has indeed not looked for the above domain name, it 
> will report nothing.
> 
> [am at localhost ~]$ dig +norecurse +short @192.168.0.1 mail.google.com
> [am at localhost ~]$
> 
> Now force a lookup::
> 
> [am at localhost ~]$ ping -c 1 mail.google.com
> [am at localhost ~]$
> 
> Now repeat the first dig
> 
> [am at localhost ~]$ dig +norecurse +short @192.168.0.1 mail.google.com
> 66.249.91.83
> 66.249.91.19
> 66.249.91.18
> 66.249.91.17
> [am at localhost ~]$
> 
> We know that the router is caching then, because only the router was 
> asked (use of '@'), it wasn't allowed to refer to anyone else (use of 
> +norecurse) and it didn't know until forced to look it up. If it had 
> nocache, it would have not had an answer at the second time of asking.
> 
Did the above (results below) and does indeed suggest that the router is
caching DNS. But wouldn't I get the same results if it was transparently
proxying for the ISP's DNS servers?

adrian at bossclass:~$ dig +norecurse +short @192.168.62.1 www.lkml.org
adrian at bossclass:~$ ping -c 1 www.lkml.org
PING www.lkml.org (87.253.128.202) 56(84) bytes of data.
64 bytes from pimp.vs19.net (87.253.128.202): icmp_seq=1 ttl=55
time=33.7 ms

--- www.lkml.org ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 33.744/33.744/33.744/0.000 ms
adrian at bossclass:~$ dig +norecurse +short @192.168.62.1 www.lkml.org
87.253.128.202


> HTH,
> -- 
> Alistair Mann

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list