Ping by name returns the wrong IP address

Posted on 2006-03-23
Last Modified: 2008-02-01
I slipped and did a big networking NO NO. I recently restored a backup of a ghost image on a computer. Somehow it slipped passed me and I connected it to our network, when the original computer was still on the network. The orginal computer is setup with a static IP address (since it's a server), therefore the restored machine was also static IP address, SAME IP ADDRESS, SAME HOSTNAME. Anyways, bells and whistles went off on the original computer when the network found the duplicate IP/Hostname, which then I disconnected the restored PC from the network. Now, when I try to ping the original computer by hostname it returns an different IP address than the static one I've given it. When I try a ping -a XX.XXX.XXX.XXX, on the static IP address, it returns a different hostname. I know this is probably a DNS issue but I'm not exactly sure where to look.  I'm running DNS and DHCP on a Windows 2000 Server machine w/ Active Directory.
Question by:Haradmin
    LVL 77

    Accepted Solution

    Open the DNS management console and under Forward look up zones for your domain delete the A record for the computer in question, or correct it. In the reverse lookup zones (if you have them) look for the Ptr record for that IP and delete or edit it.
    If using static IP's you should be OK but if you used DHCP briefly check the assigned addresses to make sure they are correct. Delete the wrong entry  if one exists.
    Then on the computer from which you were making the query you may also need to run at a command line   ipconfig  /flushdns
    This should help.
    LVL 2

    Expert Comment

    try removing all the entries in your arp table

    arp -d *

    the try a ping to
    LVL 7

    Expert Comment

    Also reboot the machine in question  (or disable then re-enable it's networking) just to ensure it re-claims it's IP.  Once you're sure the machine is on the right IP run ipconfig /registerdns  which will cause it to update all it's records in DNS
    LVL 2

    Expert Comment

    I think rob has the answer here: check the DNS entries, and then do ipconfig /flushdns. quite likely the machie you are pinging from simply has it in the DNS cache. It has nothing to do with arp, since thats about mac-ip address resolution, not name resolution.

    A reboot of the client machines will probably fix this too, so unless its affecting someone, just wait til they reboot.

    LVL 18

    Expert Comment

    by:Sam Panwar

    Have you check your local system etc/host file entries

    c:\windows\system32\driver\etc\hosts file there any entry remove it and try
    linux in etc\hosts


    Author Comment

    Thanks RobWill, that did the trick!
    LVL 77

    Expert Comment

    by:Rob Williams
    Thanks Haradmin,

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
    PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    731 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now