Getting started with DNS (network domain name) resolution failure

  
In the actual application process, you may encounter DNS resolution error, that is, when we access a domain name, we can't complete the work of parsing it to IP address, and directly input the website. IP can be accessed normally, which is caused by the failure of DNS resolution. The probability of this phenomenon is relatively large, so this article will teach you some basic methods for troubleshooting DNS resolution from scratch.
First, what is the DNS resolution failure?
Generally speaking, the addresses like www.sina.com and www.45it.com are all called domain names. It is well known that any host in the network is identified by an IP address, that is, only know this. The IP address of the site can successfully implement the access operation.
However, because the IP address information is not well remembered, the name of the domain name appears on the network. When accessing, we need to input the domain name of this good memory. The network will automatically resolve the corresponding domain name into IP. The address of the server, this is the DNS server. The machine that can implement the DNS resolution function can be either its own computer or a computer in the network, but when DNS resolution is wrong, for example, parsing a domain name into a wrong IP address, or not knowing the corresponding domain name at all. When the IP address is, we can't access the corresponding site through the domain name. This is the DNS resolution failure.
The biggest symptom of DNS resolution failure is that there is no problem with accessing the IP address of the site. However, accessing his domain name will result in an error.
Second, how to solve the DNS resolution failure:
When our computer has a DNS resolution failure, do not worry, the solution is also very simple.
(1) Use nslookup to determine whether it is a DNS resolution failure:
To be 100% judged whether the DNS resolution failure needs to be solved by the system's own NSLOOKUP.
Step 1: Confirm that your system is Windows 2000 and Windows XP and above, then enter the command line mode by pressing "Start -> Run -> Enter CMD".
Step 2: Enter nslookup command and press Enter to enter the DNS resolution query interface.
The third step: The command line window will display the DNS server address used by the current system. For example, the author's DNS server IP is 202.106.0.20.
Step 4: Next enter the domain name of the site you are unable to access. For example, if the author enters www.softer.com, if it cannot be accessed, then the DNS resolution should not be normal. We will receive a prompt message for DNS request timed out, timeout was 2 seconds. This shows that our computer does have a DNS resolution failure. Www.45it.com (computer software and hardware application network)
Tip: If the DNS resolution is normal, it will feedback back to the correct IP address, for example, the author uses the address www.sohu.com for query analysis, will get the name: Sohu.com, addresses: 61.135.133.103, 61.135.133.104 information.
(2) Query whether the DNS server works normally:
At this time, we have to look at the DNS address used by our computer and query his operation.
Step 1: Confirm that your system is Windows 2000 and Windows XP and above, then enter the command line mode by pressing "Start -> Run -> Enter CMD".
Step 2: Enter the ipconfig /all command to query the network parameters.
Step 3: In the ipconfig /all display information we can see a place to write DNS SERVERS, this is our DNS server address. For example, the author is 202.106.0.20 and 202.106.46.151. From this address, it can be seen that it is an external network address. If there is a parsing error in the external network DNS, we can replace the other DNS server address to solve the problem.
Step 4: If the internal network address of your company is displayed at the DNS server, then your company's DNS resolution is done to the company's internal DNS server. In this case, we need to check the DNS server. , nslookup operation on the DNS server to see if it can be resolved normally. Solve the DNS service failure on the DNS server, and generally the problem can be solved.
(3) Clear DNS cache information method:
When the computer accesses the domain name, it is not necessary to seek help from the DNS server every time accessing. Generally, when the parsing work is completed once, the parsing entry will be saved. In the DNS cache list of the computer, if the DNS resolution changes at this time, since the DNS cache list information has not changed, the DNS server will not be connected to the latest resolution information when the computer accesses the domain name, and will be saved according to the computer. The cache correspondence is resolved, and DNS resolution failures occur. At this point we should solve the problem by clearing the DNS cache command.
Step 1: Enter the command line mode via "Start -> Run -> Enter CMD".
Step 2: In the command line mode we can see that there is a parameter named /flushdns in ipconfig /?, this is the command to clear the DNS cache information.
Step 3: Execute the ipconfig /flushdns command. When the prompt "successfully flushed the dns resolver cache" appears, the current computer's cache information has been successfully cleared.
Step 4: When we visit the domain name again, we will get the latest resolution address on the DNS server, and there will be no problem with the parsing error caused by the previous cache.
(4) Modify the HOSTS file method:
Modify the HOSTS method to modify the DNS resolution correspondence in the HOSTS file to achieve the purpose of correct parsing. Because the HOSTS file in the local system is first viewed when the local computer accesses a domain name, the resolution relationship in the HOSTS file is greater than the resolution relationship on the DNS server.
This way, when we want to bind a domain name to an IP address, we can do this by adding a parsing entry in the HOSTS file.
Step 1: Go through the "Start -> Search" and look for the file named hosts.
Step 2: Of course, readers who already know his path can go directly to the c:\\windows\\system32\\drivers\\etc directory to find the HOSTS file. If your system is Windows 2000, you should look in the c:\\winnt\\system32\\drivers\\etc directory.
Step 3: Double-click the HOSTS file and select Open with the Notepad program.
Step 4: After that we will see all the contents of the HOSTS file. By default, there is only one line of content "127.0.0.1 localhost". (Other lines with # before are not real content, just help information)
Step 5: Add the entries you want to perform DNS resolution to the HOSTS file. The specific format is to write the IP address corresponding to the domain name first. Address, then space to pick up the domain name information. For example, the author added two entries: “211.153.80.1 www.ftedu.gov.cn” and “10.82.0.1 www.ftedu.gov.cn”.
Step 6: When we visit www.ftedu.gov.cn, we will automatically analyze it according to whether it is on the internal network or the external network.
Three, summary:
Through the four steps described above, we can solve most of the DNS resolution problems, the first three of these methods are step by step to solve the DNS resolution failure step by step, and the last one Modifying the HOSTS file is an expedient measure when there is really no way. Of course, no matter which method is used, we can solve the network failure caused by DNS parsing error. I believe these methods can help IT168 readers solve more practical problems
Copyright © Windows knowledge All Rights Reserved