Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


ping and nslookup return different answers - why?

Posted on 2003-03-26
Medium Priority
Last Modified: 2008-02-01
I've got a very strange thing that only seems to be happening for one person's computer out of hundreds.  His web browsers do not seem to be using the correct name resolution.  If he types in his server name (www.foo.com, to protect him), the browser resolves incorrectly.  If he uses the IP, it works fine, so i know it must be a resolver issue.  I would have suspected that Windows (I'm a unix geek) would use the same resolver library for everything.  However, this problem is directly characterized and illustrated with ping and nslookup at the command prompt - each seems to return a different value for IP resolution of the name - nslookup is correct, and ping returns another IP on the subnet (a DHCP address that isn't even being used at the time).  Any ideas on why this occurs, and more importantly, how to resolve it (no pun intended :) )?

System running Win XP, gets it's address and name service info via DHCP.  Has had different IP's assigned and even been moved to a different subnet.  Other machines on both subnets with configs from the same DHCP pool do not have this problem.  This system is connected network wise the same as plenty of other machines.  He has no problems resolving any other local or remote hosts - this one seems to be the only one (and is local to his network).  Has been occuring for quite awhile, flushes , reboots, and all of the above - none seem to help. No hosts file in ...\Drivers\etc, but it seems to have to be something with this system.

Thanks for any help,
ivo (goop at scs DOT unr DOT edu)

Here is a little info directly from the prompt (note the differing addresses):

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


Windows IP Configuration

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : foo.com
        IP Address. . . . . . . . . . . . :
        Subnet Mask . . . . . . . . . . . :
        Default Gateway . . . . . . . . . :

C:\>nslookup www.foo.com
Server:  ns1.foo.com

Name:    www.foo.com

C:\>ping www.foo.com

Pinging www.foo.com [] with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Question by:zenforge
  • 2
LVL 12

Expert Comment

ID: 8216981
run ipconfig /all on the offending machine and check the dns servers.

Accepted Solution

rex007 earned 225 total points
ID: 8255970
try to run
nbtstat -R  (case sensitive)
ipconfig /flushdns
ipconfig /registerdns

all in that specific order


Author Comment

ID: 8257802
Thanks for the advice.  Neither one worked, however, or returned anything conclusive.  We're about at the end of our rope with this machine, and really think something is just corrupt internally.  We're at the point of completely scraping the box and re-installing.

If anyone has a pointer to documentation that verifies that ping/nslookup use the same resolver library, I'll accept that as a good enough answer.  Otherwise, rex007 gets the points for atleast providing the most complete troubleshooting ideas.  Either way, thanks to everyone who thought about this.  :)

Author Comment

ID: 8271577
Troubleshooting steps provided were great, and even though they didn't work, I think it is because the machine was possesed.  :)  We exorcised the box (e.g. wiped the disk and re-installed the OS from scratch) and now do not have the problem.

Thanks rex007 for providing an answer that I'm sure normally would have cleared things up.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month10 days, 2 hours left to enroll

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question