Q. How can I disable the caching of failed DNS lookups?
September 18, 2006
Windows 2000, Windows XP, Windows Server 2003, and future Windows Operating Systems added the ability to cache DNS lookup results in the client's cache. This lowers the activity on the LAN and on the Web, but if a failed query is due to incorrect configuration, the client must use ipconfig /flushdns to remove it from the cache once fixed.
NOTE: To see the cache, type ipconfig /displaydns in the CMD.EXE window. You will see a display like:
Windows IP Configuration www.scrubtheweb.com ---------------------------------------- Record Name . . . . . : www.scrubtheweb.com Record Type . . . . . : 1 Time To Live . . . . : 2802 Data Length . . . . . : 4 Section . . . . . . . : Answer A (Host) Record . . . : 66.93.156.37 pagead.l.google.com ---------------------------------------- Record Name . . . . . : pagead.l.google.com Record Type . . . . . : 1 Time To Live . . . . : 121 Data Length . . . . . : 4 Section . . . . . . . : Answer A (Host) Record . . . : 64.233.169.104 ns02.penton.com ---------------------------------------- Record Name . . . . . : ns02.penton.com Record Type . . . . . : 1 Time To Live . . . . : 81145 Data Length . . . . . : 4 Section . . . . . . . : Answer A (Host) Record . . . : 63.167.165.7 .... snip ......
If you wish to avoid caching failed DNS lookup results, you can set the NegativeCacheTime Value Name, a REG_DWORD data type, to 0 at HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesDnscacheParameters using PolicyMaker™ Registry Extension freeware, or you can include the following in a Startup script:
REG.EXE ADD HKLMSYSTEMCurrentControlSetServicesDnscacheParameters /V NegativeCacheTime /T REG_DWORD /F /D 0
NOTE: REG.EXE is built into Windows XP, Windows Server 2003, and later operating systems, or installed from the Windows 2000 Support Tools.
About the Author
You May Also Like