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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses

764 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