When a Windows 2000 (NT 5.0), Windows XP (NT 5.1), or Windows .NET Server (NT 5.2) queries a DNS server, it caches the positive and negative responses in the local DNS cache. This prevents these DNS clients from having to query the DNS server for the same address. The positive responses are stored in the DNS cache for 24 hours and the negative responses are stored for 5 minutes.
To display the contents of the DNS cache, which also include entries that were preloaded from the Hosts file, open a CMD prompt and type ipconfig /displaydns. The display includes the remaining Time To Live (TTL), in seconds.
You can clear the DNS cache by typing ipconfig /flushdns.
You can configure the default TTL:
1. Use the Registry Editor to navigate to:
2. Double-click the MaxCacheEntryTtlLimit Value Name, a REG_DWORD data type, and change the positive response limit, using the Decimal Radix, from 86400 Seconds (24 hours) to the TTL value you desire.
3. Double-click the NegativeCacheTime Value Name, a REG_DWORD data type, and change the negative response limit, using the Decimal Radix, from 300 Seconds (5 minutes) to the TTL value you desire. You can set the data value to 0 to prevent caching negative responses.
4. Exit the Registry Editor.
5. Open a CMD prompt and type:
net stop dnscache
net start dnscache
NOTE: This will flush the DNS cache, reloading the entries from the Hosts file, and cause your changes to take affect.