Recently a need arose to clear out old information in the Doman Name Service(DNS) Cache on a couple of PC’s. That being the case we needed to “Flush the Cache”.

Short story:

Vista: Run “Command Prompt” as administrator |  Enter “ipconfig /flushdns’ | | | Help

XP:  Run “Command Prompt”  |  Enter “ipconfig /flushdns’ | | | Help

Mac OS X 10.6:  Run terminal.app (its in the utilities folder) | enter ‘dscacheutil -flushcache’  | | | Help

Logn Story:

DNS is like a  huge number of databases all connected (via the internet) and talking on a “need to know” basis.

Works like this:

Situation: I want to go to the web page for MICROSOFT.COM.  So I type http://www.microsoft.com into the address line of my web browser (ie. Internet Explorer).

My computer has a DNS cache that tells the browser what IP address to go to for www.microsoft.com.  My computer then sends a request for information to my gateway (my router) that “says go to this ip address and get me this information”.

What happens if my computer’s DNS cache does not know the IP address.  Well, the computer then works through a series of searches to find the IP address.  The computer looks at its HOSTS file to see if something about www.microsoft.com is there.  It asks the designated DNS server if it knows. The DNS server is a router in my office or server out on the internet.  The DNS server replies with the information or asks other DNS servers (it knows about).  This progresses on up the chain.  Each DNS server asking the next one up if it knows the location of www.microsoft.com.

If a DNS server is down or slow to respond , you get a slow response on getting the webpage up – unrelated to the speed at which the webpage is dished out so to speak. However, many webpages have references to other media (youtube videos, weather, image servers, etc) which cause yet another DNS query or lookup and the cycle continues until the page is completed.  Slow or poorly connected or non-functioning DNS servers can slow things down quite a bit since the problem multiples given the number of external references a page has.

Secondary DNS servers are needed and valuable (and required at times) as they are a fallback in case the Primary DNS server dies or does not respond. But, that means there may be a delay in performance as the computer switches to using the Secondary DNS server or a DNS server up the line has to switch to using a Secondary DNS server. Imagine the delay if a couple of DNS servers have to switch to Secondary DNS servers up the line.

Back at the top, sometimes the DNS cache on a PC has bad information so it needs to be flushed. Many times this works by just rebooting the computer. Other times you can just flush the cache at the command line (see references at the top of this article).  Other situations include the wrong DNS servers to ask where things are.  In this case our technicians will frequently ask clients to e4xamine DNS settings on their computers or routers to confirm they are setup correctly.

Hope you day is less mind boggling then mine!

Rick