nslookup resolves, but can't ping or connect by dns host name. Can ping and connect by ip address.

I'm troubleshooting a system where i'm having a strange issue.

i can look up host names via nslookup, however ping and other apps (web browsers, command line FTP, etc.) say they cannot resolve the host name.

If i ping or connect by IP address, it works.

I have tried netsh winsock reset and netsh int ip reset, neither resolved the problem.
I have also tried ipconfig /flushdns as well as repairing the connection through the gui.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Toni UranjekConsultant/TrainerCommented:

Check %systemroot%\system32\drivers\etc\hosts file are there eny entries? Are you using proxy server?

jspazianoctoAuthor Commented:
Hosts is the default .. jusit resolving to localhost
no proxy server.
this isn't a member of a domain (it's running media center edition and was used in a home).
internet works fine for another pc connected to the network.

Toni UranjekConsultant/TrainerCommented:
Which web browser do you use?
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

jspazianoctoAuthor Commented:
basically to me it seems that something's going around that's breaking tcp connectivity in windows xp.
i actually have 3 systems i've been asked to look at that all have ths same issue.
jspazianoctoAuthor Commented:
internet explorer 7 for the web browser.  

i'm trying firefox now.

also my last commend on tcp connectivity doesn't make sense since connecting by ip address works. something's not right in dns resolution so it seems.
jspazianoctoAuthor Commented:
no luck on firefox either. I can connect to sites by ip address but not the dns hostname.
Toni UranjekConsultant/TrainerCommented:
In IE7 go to Tools, Internet Options, Advanced tab and click Reset... this should fix IE7. Did you scan computer with antispyware and antivirus software?
jspazianoctoAuthor Commented:
I did scan with the AVG rescue cd, it did find and remove a few viruses.

I have tried resetting ie to the default settings, that doesn't work either.
basically it seems that no applications (ping, web browsers, ftp clients, etc.) can resolve DNS names, but nslookup can:

C:\Documents and Settings\Administrator>nslookup google.com
Server:  DD-WRT

Non-authoritative answer:
Name:    google.com

C:\Documents and Settings\Administrator>ping google.com
Ping request could not find host google.com. Please check the name and try again.
Toni UranjekConsultant/TrainerCommented:
Can you paste output of the follwing command: ipconfig /displaydns
jspazianoctoAuthor Commented:
:\Documents and Settings\Administrator>ipconfig /displaydns

indows IP Configuration
        Record Name . . . . . :
        Record Type . . . . . : 12
        Time To Live  . . . . : 604050
        Data Length . . . . . : 4
        Section . . . . . . . : Answer
        PTR Record  . . . . . : localhost

        Record Name . . . . . : localhost
        Record Type . . . . . : 1
        Time To Live  . . . . : 604050
        Data Length . . . . . : 4
        Section . . . . . . . : Answer
        A (Host) Record . . . :
Toni UranjekConsultant/TrainerCommented:
Run "net stop dnscache" and try to ping again. After each step don't forget to run "ipconfig /flushdns".
jspazianoctoAuthor Commented:

that didn't help either. after stopping the dns client service i can resolve via nslookup but ping can't find the host name.  i can ping the ip though.
Toni UranjekConsultant/TrainerCommented:
Does it work if you ping with switch -4?
Is computer fully updated?
Did you try to reinstall NIC drivers?

PING -4 www.google.com

Open in new window

Clarification, please:
Are you trying to ping/browse/etc by name TO the mediacenter pc (mc-pc) and it fails?
Running nslookup from the non-mc-pc returns the correct ip?
Ping TO the mc-pc via ip address works?

Can you surf FROM the mc-pc?
Are there any firewall settings running on the mc-pc?
Are your other pc's using WINS, and have you checked the WINS db for the mc-pc's entry?
jspazianoctoAuthor Commented:
ping -4 doesn't work.

strangely i can't uninstall the NIC.
when i try to uninstall the nic i get an error:

failed to uninstall the device, the device might be required to boot up the computer
jspazianoctoAuthor Commented:
I am trying to ping/browse/etc FROM the mc-pc.

I have disabled the windows firewall (no other firewall is installed)
I have another pc on the network that's running wins over tcp/ip
I can ping the host name of the mc-pc.

Toni UranjekConsultant/TrainerCommented:
How about "PING -6 www.google.com"?

jspazianoctoAuthor Commented:
Still can't resolve with ping -6 either.

thanks for all your help with this.
i'm trying to figure out how to fix it rather than having to do a repair install since this particular OEM doesn't give you media that lets you do a repair install, you can only reformat/clean install to get it to factory condition.
Toni UranjekConsultant/TrainerCommented:
I would suggest that you update NIC driver first, because if you are not infected, this is very strange behaviour.
jspazianoctoAuthor Commented:
I have updated the nic.

strangely the NIC works fine.
i've been remote desktoped in to the system while performing all these steps.
it strictly seems to be related to DNS resolution for applications.

It's got to be some kind of an infection that causes this.
I have 3 systems brought to me all with the same issue.
they can ping ips but can't resolve host names.
what is the list of domains in the dns suffix list?  This can be viewed in the TCP/IP settings, or via ipconfig /all from a cmd prompt.
Maybe paste the results of ipconfig /all
jspazianoctoAuthor Commented:
Also one of my coworkers had already tried a repair install of the OS (xp pro w/ SP3) on one of the other systems before it got brought to me to look at it. A repair install didn't fix it either.  

Whatever causes this sure is nasty. It's getting to the point where it seems the only option is a reformat/reinstall.

jspazianoctoAuthor Commented:
There is no dns suffix.

C:\Documents and Settings\Administrator>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : YOUR-780C524461
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : Realtek RTL8139/810x Family Fast Eth
ernet NIC
        Physical Address. . . . . . . . . : 00-16-17-5E-26-DF
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . :
        Subnet Mask . . . . . . . . . . . :
        Default Gateway . . . . . . . . . :
        DHCP Server . . . . . . . . . . . :
        DNS Servers . . . . . . . . . . . :
        Lease Obtained. . . . . . . . . . : Wednesday, November 19, 2008 12:26:2
0 PM
        Lease Expires . . . . . . . . . . : Thursday, November 20, 2008 12:26:20
jspazianoctoAuthor Commented:
It seems that this may have been caused by a botched install of SP3.

I saw in the add/remove programs list that SP3 is listed as being installed, but when you go in to system info it's only listed as running SP2.

when logged in as administrator and installing SP3, i get an error that access is denied then a msg that windows xp has been partially updated and may not work properly.
trying to reset the file and registry default security settings, access is still denied.
perhaps this system had a malware problem in the past which screwed up security, now it's stuck in a half-updated state with sp3.

jspazianoctoAuthor Commented:
The issue was a previous falled installation of SP3.

I was able to resolve the security issues by booting in to a clean boot (use msconfig, uncheck to process win.ini and system.ini, disable all non-microsoft services and startup items).  
This system also had webroot spysweeper installed which wouldn't let me disable the service. To fix that i booted off a bootable CD and renamed the folder that the service started from.

After disabling the webroot service, running the script outlined in: http://support.microsoft.com/kb/949377  Allowed me to sucessfully install SP3. After SP3 was installed, the DNS issue was resolved.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Change DNS record for this hostname if this machine:
1. Configured for Static IP
2. Ever Change the Static IP of machine
3. This machine use Hostname that previously used for another IP address

U need to check DNS record for this machine hostname in DNS server.. if this hostname shows different IP address then correct it and try ping again..

Thank You
Thank you jspaziano!   After hours of searching, your solution worked for me too.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.