2009/05/28

how to find if a domain name is cached in a resolver

I have a task to test if a domain name is cached in a resolver. Of course, nslookup can not help and I have to turn to the more powerful dig.

#dig @1.2.3.4 www.cnn.com +norecurse

If the domain www.cnn.com has already been cached, the results will show the corresponding A records. However, if it is not, the results give the NS records of the 13 rootname servers.

No comments: