computer Networks/Ipconfig/DNS Cache Options
(Redirected from Computer Networks/Troubleshooting/Tools/Ipconfig/DNS Cache Options)
ipconfig /displaydns displays the contents of the Domain Name System (DNS) resolver cache. ipconfig /flushdns purges the DNS resolver cache. These activities will show you how to use ipconfig /displaydns and ipconfig /flushdns.
Readings
editPreparation
editTo prepare for this activity:
- Start Windows.
- Log in if necessary.
Activity 1 - View the hosts File
editHost name to IP address resolution on Windows is a combination of the contents of the hosts file and the records returned from the specified DNS server(s) in response to DNS queries, with the hosts file being queried first. To understand the entries you will see in the DNS resolver cache, you should first examine the contents of the hosts file.
Activity 2 - View DNS Server Settings
editTo display DNS server settings:
- Open a command prompt.
- Use ipconfig /all to display all IP configuration information.
- Observe the DNS Servers settings. The DNS servers are queried for any name that has to be resolved into an IP address that does not exist in the hosts file. Common examples include server names for URLs typed into an Internet browser. The DNS resolver cache will contain a history of names that have been resolved recently.
Activity 3 - Display the Contents of the DNS Resolver Cache
editTo display the contents of the DNS resolver cache:
- Type ipconfig /displaydns and press Enter.
- Observe the contents of the DNS resolver cache. It is generally not necessary to view the contents of the DNS resolver cache, but this activity may be performed as a name resolution troubleshooting method.
Activity 4 - Purge the DNS Resolver Cache
editTo purge the DNS resolver cache:
- Type ipconfig /flushdns and press Enter.
- Type ipconfig /displaydns and press Enter to observe the contents of the DNS resolver cache and verify that it has been purged. It may be necessary to purge the DNS resolver cache when updating records on a corporate DNS server or adjusting incorrect proxy server settings.
Note: After purging, the DNS resolver cache will still have records for any entry in the hosts file. - Close the command prompt to complete this activity.