We have renamed our machine [Windows 2008 R2] name and it asked for restart. we did it.

But still we are able to ping the old machine name and it responds.

Strange thing is even we are able to ping the new machine name and it also responds.

[I checked that whether it is different machine or not by verifying the IP address. But IP address is same. So it should be the same machine]

How it occurs? How to make it recognize only new machine name?

If some scripts are run, our application should work even after machine rename.

But we are unable to test this as we are unsure whether machine rename takes effect.

4 Answers 4


I imagine the answer for this is in your DNS records.

  1. Make sure your domain controllers have no record of the old machine name in your forward lookup zones.

  2. Make sure there is not entry in the DHCP table.

  3. Make sure the DNS entry is not locally cached, you can check if it is on a windows machine by opening command prompt and typing ipconfig /displaydns and clear it out of the list using ipconfig /flushdns. If it stays in your dns list, make sure you do not have a host file entry for this server.


This is the microsoft way to manage the name resolution:

  1. the client checks to see if the name queried is its own. Troubleshooting: in this case no, you have renamed and rebooted the machine.

  2. the dns resolver cache is used to resolve the hostname. Troubleshooting: maybe? Is the old name reloaded from a misconfigured dns?

  3. the DNS servers are queried. Troubleshooting: maybe? Have you reconfigured your DNS servers and restarted the services?

  4. the NetBios name cache is used. Troubleshooting: maybe? Is the old name reloaded from a wins server not updated?

  5. if all fail to resolve the name, the Wins server service is used. Troubleshooting: maybe? Have you restarted the wins server or waited that the name is refreshed?

  6. NetBios broadcasts from other server. Troubleshooting: no. Beccause it search for himself.

  7. the client then searches a local Hosts file, lmhosts or hosts wich is in the %Systemroot%\System32\Drivers\Etc directory. Troubleshooting: no(?).





Because there's probably a DNS A record for the old name that hasn't been scavenged yet (if you have scavenging enabled).


If there's really no old DNS record or old entries in the cache this should fix it.

There are two registry settings containing still the old hostname:

AlternateComputerNames in HKLM\SYSTEM\CurrentControlSet\services\Dnscache\Parameters


OptionalNames in HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters

Change both values to the new servername, reboot the machine and it won't appear in the computer network list with the old name.

It's even not accessable via \oldservername in an explorer window.

Worked for me. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.