Because DNS is a C/S structure and everyone is familiar with the concept of DNS server, it is easy to misunderstand that "DNS Client Service" is the DNS Client. If the "DNS Client Service" Client is disabled, the domain name cannot be resolved.
The cause of misunderstanding lies in Microsoft's misleading situation. In Windows Service Management, Microsoft claims that "DNS Client Service" is "the name of the computer's DNS system for resolving and caching the domain name. If the service is stopped, the computer cannot resolve the DNS name and locate the Active Directory domain controller. If this service is disabled, any service that explicitly depends on it cannot be started ." Microsoft is very irresponsible.
In fact, "DNS Client Service" is only the Client's cache service for DNS resolution content. Disabling "DNS Client Service" does not affect DNS resolution, but the Client does not cache DNS resolution content. The command ipconfig/displaydns displays the local DNS cache, but fails when "DNS Client Service" is disabled.
Whether or not this service is disabled does not have a major impact. In terms of security, enabling it may leak your cached content and determine the website you have visited. In terms of speed, disabling it may reduce the reaction speed, but it generally has little impact.
When the client encounters a domain name that needs to be resolved, the query order is:
1. DNS cache (if the DNS Client service is enabled );
2. Local hosts file;
3. Main DNS servers;
4. Secondary DNS server.
After the hosts file of the local machine is modified, it is sometimes necessary to restart the browser to take effect, which may be the reason for DNS cache.
Q: Is there a way to clear the dns cache using the command line to make the modified hosts file take effect without restarting the browser?
A: run the command ipconfig/flushdns to clear the local DNS cache.
If the hosts file still does not work after ipconfig/flushdns is executed, you may need to wait
From Qingfeng Xiaozhu-Linux