Export (0) Print
Expand All

Configuring Caching and Negative Caching

When the Windows 2000 resolver receives a positive or negative response to a query, it adds that positive or negative response to its cache. The resolver always checks the cache before querying any DNS servers, so if a name is in the cache, the resolver uses the name from the cache rather than querying a server. This expedites queries and decreases network traffic for DNS queries.

You can use the command-line tool Ipconfig to view and flush the cache.

To view the resolver cache

  • At the command prompt, type the following and then press ENTER:
    ipconfig /displaydns

Ipconfig displays the contents of the DNS resolver cache, including names that are preloaded from the Hosts file and any recently queried names resolved by the system.

After a certain amount of time, specified by the time to live (TTL) associated with the name, the resolver discards the name from the cache. You can view and change the TTL associated with the record from within the DNS console.

To view the TTL for a record

  1. In the DNS console, point to View and click Advanced to select Advanced View.
    This step is not necessary to view the TTL for a start of authority (SOA) record.

  2. Right-click the record, and click Properties .

You can also flush the cache manually. After you flush the cache, the computer needs to query DNS servers.

To flush the cache manually by using Ipconfig

  • At the command prompt, type the following and then press ENTER:
    ipconfig /flushdns

The local Hosts file is preloaded into the resolver's cache and reloaded into the cache whenever the local Hosts file is updated.

note-icon Note

The resolver cache and server cache are maintained separately. For information about the server cache, see Windows 2000 Server Help.

The length of time for which a positive or negative response is cached on a DNS client depends on the values in the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services \DNSCache\Parameters

caution-icon

Caution

Do not use a registry editor to edit the registry directly unless you have no alternative. The registry editors bypass the standard safeguards provided by administrative tools. These safeguards prevent you from entering conflicting settings or settings that are likely to degrade performance or damage your system. Editing the registry directly can have serious, unexpected consequences that can prevent the system from starting and require that you reinstall Windows 2000. To configure or customize Windows 2000, use the programs in Control Panel or Microsoft Management Console (MMC) whenever possible.

Positive responses are cached for the number of seconds specified in the query response that the resolver received, but never for longer than the value of the MaxCacheEntryTtlLimit (DWORD) registry entry. The default value is 86,400 seconds.

Windows 2000 supports negative caching, as specified in RFC 2308 with some modifications in the resolver cache. In the resolver cache, negative responses are cached for the number of seconds specified in the NegativeCacheTime value (DWORD). The default data is 300 seconds. If you do not want negative responses to be cached at all, set the value of NegativeCacheTime to 0.

note-icon Note

The Windows 2000 DNS server caches negative responses according to the minimum TTL in the SOA record. However, it cannot be less than one minute or greater than 15 minutes. Thus, if the minimum TTL in the SOA record is 20 minutes, the negative response is cached for only 15 minutes. You can use the DNS console or Dnscmd.exe to change the minimum TTL.

If all DNS servers on an adapter are queried and none of them reply, either positively or negatively, all subsequent name queries to any server listed on that adapter fail instantly and continue to fail for a default of 30 seconds. This feature decreases network traffic. It is available only on Windows 2000 Professional.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft