RECOMMENDED: Click here to fix Windows errors and optimize system performance
If you query the IP address of a website when your nslookup is running but the ping fails on a Windows 10 PC, there may be several reasons for this. Let’s try to solve these problems, but first here’s what nslookup.exe and ping mean in simple terms.
Just to complete things:
Nslookup only asks the specified DNS server for the assigned A record, it does NOT guarantee that the device behind this record actually has this IP.
Even if the device has the correct IP (for example, the fixed IP of the device corresponds to the one provided by the DNS), this does not guarantee that the device is configured to respond to pings. This is a common point of frustration. (I’m talking about you, Windows Firewall).
If you are crossing subnets, the router/gateway/firewall may also restrict ICMP traffic (this is what a ping is).
You must therefore always check the entire service chain, from sender to recipient and vice versa. In the case of three, there may be settings such as a) default gateway or b) routes (default). Add them to your checklist.
Force Windows to perform a DNS search using FQDN.
On your computer, go to Settings > Network and Internet > Status > Change Adapter Options.
- Right-click on the network and select Properties.
- Select Internet Protocol Version 4 from the list of available connections in the list. If you use IPv6, use it.
- Click on Properties
- Click on Advanced
- Go to the DNS tab and select “Add this DNS (in order)”.
- Click on the Add button and add. as a suffix.
Reset WINSOCK and Flush DNS
Nslookup opens a Winsock connection on the DNS port and prints a request while ping uses the DNS client service. You could try to stop this service and see if it makes a difference.
Some commands that reset different network states:
- Reset WINSOCK inputs to installation default values: netsh winsock reset catalog
- Reset the TCP/IP stack to the installation default values: netsh int ip reset reset reset reset reset reset reset.log
- Clear the DNS resolver cache: ipconfig /flushdns
- Renewing the DNS client registration and updating the DHCP lease: ipconfig /registerdns
- Flush routing table: Road /f (restart required)
Using Google Public DNS
If this doesn’t help you, use Google Public DNS and see if it works for you. You will need to explicitly modify the DNS settings of your operating system using DNS IP addresses.
- First, right-click on the Network taskbar icon and select Network and Share Center.
- Select Change adapter settings.
- Locate the network connection used to connect to the Internet; the option can be Local connection or Wireless connection.
- Right-click and select Properties.
- In the new window, select Internet Protocol 4 (TCP/IPv4), then click on the Properties button.
- Check the box “Use the following DNS server addresses” in the new window.
- Enter in 18.104.22.168 and 22.214.171.124
- Finally, click on OK and exit the program.
Restart the DNS Client service.
If nslookup works but ping fails, the problem could be one of your services. Many users claim that DNS customer service was the problem, and to solve the problem, you must restart this service.
Check your Hosts file
If the problem still exists, the problem may be the hosts file. If nslookup works, but ping fails, it is possible that the host file was edited by malware or another application, which can cause similar problems.
To solve the problem, it is a good idea to check the hosts file and make sure everything is fine. If you see the website you are trying to ping on the list, it essentially means that the Hosts files have been modified.
RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance
CCNA, Web Developer, PC Troubleshooter
I am a computer enthusiast and a practicing IT Professional. I have years of experience behind me in computer programming, hardware troubleshooting and repair. I specialise in Web Development and Database Design. I also have a CCNA certification for Network Design and Troubleshooting.