How to Flush DNS |
|
Most DNS clients cache the results of name resolution requests. This means that the DNS clients will temporarily store the website names that you have been visiting lately. This process speeds up name resolution if multiple lookups are done to the same address, such as is common when browsing the web. Hence, if you visit Yahoo.com second time, the DNS client will already have the name mapped and hence will retrieve the mapping quickly. Sometimes a bad DNS entry will be cached and you will need to either flush the DNS cache to get rid of it, or wait up to 24 hours for it to be dropped from the cache automatically. Given below is a comprehensive step-by-step process to flush the DNS. How to Flush DNS in Microsoft WindowsIn Microsoft Windows, you can use the command ipconfig /flushdns to flush the DNS resolver cache. Open the command prompt and type the following:
The above command will completely flush the DNS, deleting any incorrect entries too. You can also use the command ipconfig /displaydns to view the DNS resolver cache.
Turning Off DNS Caching under Microsoft WindowsIf you experience frequent issues with DNS caching under Microsoft Windows, you can disable client-side DNS caching with either of these two commands:
This will disable DNS caching until the next reboot. To make the change permanent, use the Service Controller tool or the Services tool to set the DNS Client service startup type to Disabled. You can permanently disable DNS Client by following the below steps:
Tuning DNS Caching under Microsoft WindowsYou can modify the behavior of the Microsoft Windows DNS caching algorithm by setting two registry entries in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters registry key. The MaxCacheTtl represents the maximum time that the results of a DNS lookup will be cached. The default value is 86,400 seconds. If you set this value to 1, DNS entries will only be cashed for a single second. MaxNegativeCacheTtl represents the maximim time that the results of a failed DNS lookup will be cached. The default value is 900 seconds. If you set this value to 0, failed DNS lookups will not be cached. Flush DNS in Mac OSXIn Mac OSX Leopard, you can use the command dscacheutil -flushcache to flush the DNS resolver cache:
In Mac OSX versions 10.5.1 and before, the command lookupd -flushcache performed the same task:
Flush DNS in LinuxIn Linux, the nscd daemon manages the DNS cache. To flush the DNS cache, restart the nscd daemon. To restart the nscd daemon, use the command `/etc/init.d/nscd restart`. blog comments powered by Disqus |
Discuss How to Flush DNS in the forums.

