Why "ipconfig /flushdns" ?

26 10 2009

The ‘ipconfig /flushdns’ command serves an equally useful function. DNS (‘Domain Name System’) is the system that maps IP addresses to Internet addresses like http://www.pcstats.com (among other things).
By default, your computer system keeps a DNS resolver cache which stores the IP address attached to frequently used DNS names (and Internet URLs, which are essentially the same thing). This enables your system to bring up frequently accessed web pages quickly, without the need to first consult a chain of DNS servers on the Internet to find out what IP address is associated with, say http://www.pcstats.com.

If you are in a network that uses an Internal DNS server as the first point in this chain of servers, that DNS server’s IP address is going to be a more or less permanent resident of your DNS cache. So what happens if that server changes or goes down? Even if there is a backup, your system still has the original IP address in its cache, and will check that address first whenever you type in a request for a web page. Obviously, querying a non-existent DNS server is not going to get you far. Unfortunately, even if you change the address of the DNS server to a valid one in your network connection settings, your system will ignore it in favour of the entry in the cache. This can lead to much frustration.

By using the ‘ipconfig /flushdns’ command, you delete the contents of the DNS resolver cache, meaning that your system will now recheck its settings to see where it should be going to get DNS addresses. Problem solved.

The ‘ipconfig /displaydns’ command will show you the current contents of your system’s DNS resolver cache