I can ping server by name but can't map drive to it

12,617

The problem has to do with name resolution. Check the following:

  1. Hosts file in C:\windows\system32\drivers\etc\hosts

  2. LMHosts file in C:\windows\system32\drivers\etc\lmhosts

  3. DNS Server. Open up DNS Management, Right click on server, go to Scavenge Resource Records. Now restart netlogon service on file server, DC, and client

Then try again.

Share:
12,617
johnnyb10
Author by

johnnyb10

Updated on September 17, 2022

Comments

  • johnnyb10
    johnnyb10 over 1 year

    I'm having an issue with a laptop (Windows XP SP3, member of a domain) where I can ping one of our file servers (Windows Server 2003) by IP address and by name, but if I try to map a drive to a folder on that server, it doesn't work. It used to work, but we've made some network changes this weekend (added a server, changed IP addresses), and now I can't get it to work. All of our other computers have been able to connect since the change; this is the only one having this problem. Any ideas as to why this might be happening? Thanks.

    EDIT: Note that I CAN map the drive if I use the IP address, just not the server name. But I need to get the server name to work.

  • johnnyb10
    johnnyb10 almost 14 years
    Thanks for the response. Unfortunately, I just tried this and it didn't clear up the problem. I also forgot to mention that I CAN map the drive if I use the IP address, but I need to be able to do it with the server name also.
  • Jason Berg
    Jason Berg almost 14 years
    Have you checked your DNS server settings on the client and dns records on the dns server?
  • johnnyb10
    johnnyb10 almost 14 years
    Yes, and they seem correct, however there is no PTR record for this computer in the Reverse Lookup Zone in DNS. There are PTR records for the other users in the office. Could that be it? Should I just add a PTR record? Also, using Wireshark, I see that when I try to map the drive using the IP address, the computer first sends 4 packets to the correct IP address. But when I use the server name, it sends the 4 packets to the wrong IP address. That must be the problem, but where is it getting that IP address from? I can't find it in any DNS record or in the hosts file.
  • Jason Berg
    Jason Berg almost 14 years
    Wouldn't be the PTR record. Did you check the lmhosts file as well?
  • johnnyb10
    johnnyb10 almost 14 years
    That IP address that it's using is the OLD IP address of the server. But when I look at the local DNS cache, it shows the correct (new) IP address for that server. And I can ping the server fine. Why is it pulling up this old address only when I try to map a drive?
  • emtunc
    emtunc almost 14 years
    I may be off target here but have you checked the WINS servers on the client machine? DNS and WINS seem the likely culprits here.
  • johnnyb10
    johnnyb10 almost 14 years
    I think you found it! I just checked the lmhosts file, which I didn't even think was being used, and there were the old addresses. I'm not quite sure how to deal with it though. Should I just delete/rename lmhosts and then reboot?
  • johnnyb10
    johnnyb10 almost 14 years
    Jason, thanks so much. That fixed my problem. Should you edit your answer to add the lmhosts solution, so I can mark it answered? Or add a new answer.
  • johnnyb10
    johnnyb10 almost 14 years
    To clarify, it's not the lmhosts.sam file; that's just a sample that doesn't do anything. It's the lmhosts file itself that I had to change/delete.
  • Jason Berg
    Jason Berg almost 14 years
    @johnnyb10, Thanks. It's been a while since I've messed with lmhosts, so I was just going off what was on my computer. It's fixed now.