Whenever a computer has problems in network communication such as able to access shares via IP address but not computer name, the first thing I’d do is to flush the DNS resolver cache and restart the computer. It is a simple yet effective command that has helped me fixed a couple of network problems.
If you go to Services window, you will see a DNS Client name with the description “Resolves and caches Domain Name System (DNS) names for this computer. If this service is stopped, this computer will not be able to resolve DNS names and locate Active Directory domain controllers. If this service is disabled, any services that explicitly depend on it will fail to start.”
To flush a computer’s DNS resolver cache, just go to Start > Run and type CMD to launch command prompt. Then type the following command:
However, if you get an error that says Could not flush the DNS Resolved Cache: Function failed during execution”, here is how to fix it.
The reason why you’re unable to flush a Windows computer DNS cache is if the DNS Service is not running. Go to Start > Run and type services.msc. Double click the DNS Client to bring up DNS Client properties window. Make sure the startup type is set to Automatic and service status is Started. If not, just select the drop down menu, select Automatic and then click the Start button.
Now if you run the ipconfig /flushdns command in command prompt, you should see “Successfully flushed the DNS Resolver Cache”.
Some security experts believe that it is better to turn off DNS Client service because it is useless and dangerous but in my opinion, it is better to leave it turned on and make sure you have installed the latest Windows updates. The DNS Client is not specifically required to use the internet. What it does do is try to improve your internet experience. The most basic way it does this is by caching domain name addresses, which speeds up the browsing experience. This service also determines if an IPv4 or IPv6 address would be more appropriate for a domain name. In an enterprise, it can also be useful in letting the network know your PC’s domain name, which can simplify finding shared resources. Though it is safe to disable this service, most users will likely end up with slower internet browsing, as well as other minor DNS related issues, so it’s best to leave this one on.
In Microsoft Knowledge Base website, it did mention that “The overall performance of the client computer decreases and the network traffic for DNS queries increases if the DNS resolver cache is deactivated.
The DNS Client service optimizes the performance of DNS name resolution by storing previously resolved names in memory. If the DNS Client service is turned off, the computer can still resolve DNS names by using the network’s DNS servers.
When the Windows resolver receives a positive or negative response to a query, it adds that positive or negative response to its cache, and as a result, creates a DNS resource record. The resolver always checks the cache before querying any DNS server. If a DNS resource record is in the cache, the resolver uses the record from the cache instead of querying a server. This behavior expedites queries and decreases network traffic for DNS queries.”