Why ping by PC-name results a different IP address from the address manually set

jana
jana used Ask the Experts™
on
We have two (2) Windows 10 Pro computers.  Both have Hyper-V VMs installed and in use (very low usage maybe 1 or 2 a week).  Both have their IP set manually in "Use the following IP address".  Finally, there is communication between the 2 computers in file sharing  and RDP.

The problem we are facing is that when Computer-1 Ping Computer-2, Computer-2 display a total different IP.   Yet when Computer-2 Ping Computer-1, it display the correct IP.

Please advice on how to identify cause and  how to fix.

Thank you in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Check the DNS server, evidently that name (A) record has a different IP.
Jeremy WeisingerSenior Network Consultant / Engineer
Commented:
On computer 2, run ipconfig /all and verify there is only the one IP configured. Also note the physical address for the NIC.

On computer 1, ping computer 2 by name. Then run arp -a and look for the IP address showed when pinging computer 2. Compare the MAC address for the IP pinged to the physical address you noted above. These should match. If they don't then you're pinging a different computer.
ITSysTechSenior Systems Administrator

Commented:
"when Computer-1 Ping Computer-2, Computer-2 display a total different IP"

How many NIC cards does Computer-2 have? Is it using wireless as well?
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Author

Commented:
Jorge,
  • How do I Check the DNS server, evidently that name (A) record has a different IP?

Jeremy,

  • ran ipconfig /all on both.
  • there is only the one IP configured per computer.
  • the IP on both computers are from Hyper-V Virtual Ethernet Adapter created when Hyper-V was installed.
  • ran arp -a on both computers and look for the "false" IP address (when pinging computer 2 by name) and it's there.
  • compared the MAC address for the "false" IP pinged to the physical address found for the physical NIC they are different - no match

ITSysTech,
  • Computer-2 has one NIC (but remember it has Hyper-V which creates virtual NICS, if we can say it like this).

Note:
  • By "false" IP I mean the IP displayed when doing a Ping by pc-name Computer-1 to Computer-2.
  • Ran arp -a on both computers and the "false" ip is presente and both has the  same physical address and type  which is "dynamic".

Also, since when doing Ping by name to Computer-2 gave me that "false" IP, I tested something: I turned off Computer-2 and ping again  Computer-2 by its pc-name and it gave results.  I ping the actual manually set IP and no results.  So this means that is something in Computer-1?

Please advice.
Jeremy WeisingerSenior Network Consultant / Engineer
Commented:
I imagine that all computers would not be able to ping computer 2 by name.

There are two possibilities.
1. There's a computer on the network that has the same name as computer 2
2. There's an erroneous A record in DNS pointing to the "false" IP.

I would say that number 2 is more likely. If you administer the DNS server, you can look for and remove the erroneous record:
- Open DNS.msc on the server
- Expand the forward lookup zone for your domain
- Look for a record called computer-2 (or whatever the actual computer name is)
- If it says static, delete it. If it says dynamic then it's possible there's another computer with the same name. If the record is very old then it's probably from a computer that is no longer active.

Author

Commented:
You gave me an idea, ping Computer-2 from a mobile device.  Turns out that the "false" IP belongs to a Smart Tv we have next office 'LGSmartTV'.  We  connected to the routers apps and confirmed its 'LGSmartTV'.  So when we ping Computer-2, it displays 'LGSmartTV' IP.

So its #2 'There's an erroneous A record in DNS pointing to the "false" IP'

Weill try your suggestions and get back to u.

Author

Commented:
Note we don't have a server. the WLAN is a 4 computer small network where 2 are on at this point and also connected to the WLAN are 3 mobile devices.
Jeremy WeisingerSenior Network Consultant / Engineer

Commented:
If you don't have a server then the problem is most likely the smart tv has the same hostname as computer-2. Can you change the hostname of the smart TV or the computer?

Author

Commented:
Don;t think the smart tv has the Computer-2 host name, the smart tv name comes up as 'LGSmartTV' in both the routers software (192.168.0.1) and in IP scanner apps in the all the mobile devices we have connected to the wifi.

Note,
It's definitely is the smart tv.  Just turned it off and ping Computer-2 again and it display "Destination host unreachable".

What else can we do? Something is mixing up theses 2 devices IP.

Author

Commented:
Can we flush or clear cache of the router (which is a cable-modem)?
Jeremy WeisingerSenior Network Consultant / Engineer
Commented:
To test, follow these steps:

1. Turn off the smart tv
2. On computer-1 run ipconfig /flushdns
3. Turn on computer-2
4. On computer-1, ping computer-2

If it shows the smart TV IP still then there's we'll need to track down where that info is coming from.

Author

Commented:
Will do...

Author

Commented:
Didn't work.

I have done as recommended and even  changed the IP of the smart TV and its name.  But when ping Computer-2 shows the same "false" ip but it with "Destination host unreachable" as if  not exist the IP.

But why it display when ping:
ex.

Pinging Computer-2 ["false IP"] with 32 bytes of data:
Reply from "false IP": Destination host unreachable.
Reply from "false IP": Destination host unreachable.
Reply from "false IP": Destination host unreachable.
Reply from "false IP": Destination host unreachable.


what is going on? So strange!
Commented:
SUCCESS!!!! FOUND THE PROBLEM!!!

The file C:\Windows\System32\drivers\etc\hosts

It had a line,
192.168.0.14 Computer-2  # My Computer
(So this was the "False" IP all the time)

Deleted the line and ping Computer-2  and gave the manual IP set.

Thanx all!!
Jeremy WeisingerSenior Network Consultant / Engineer

Commented:
Glad you found the issue. :)

Author

Commented:
Chose our entry as solution because it solve the problem.

Awarded Jeremy because it was super troubleshooting steps!

Thanx!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial