If I ping 192.168.1.4, why is 192.168.1.2 responding?

12

When I run the command ping 192.168.1.4 I get the following results:

Pinging 192.168.1.4 with 32 bytes of data:
Reply from 192.168.1.2: Destination host unreachable.
Reply from 192.168.1.2: Destination host unreachable.
Reply from 192.168.1.2: Destination host unreachable.
Reply from 192.168.1.2: Destination host unreachable.

Can anyone help me understand why in the world it's telling me that 192.168.1.2 is unreachable when that's not the IP address I typed in? I'm very confused.

Also in case it's relevant, I'm on a workgroup.

BVernon

Posted 2013-11-05T08:00:08.177

Reputation: 305

What command have you typed exactly? – gronostaj – 2013-11-05T08:01:10.207

Exactly what I wrote in quotes. – BVernon – 2013-11-05T08:01:36.027

1BVernon: it doesn't say "192.168.1.2" is unreachable. On the contrary, it is 192.168.1.2 that say that the Destination host (ie, 192.168.1.4) is unreachable. In your case .1.2 is probably your own machine. But it could also be a "hop" along the way to the destination (the last hop that was reached). It could mean that the destination is not answering ping (due to its firewall, for example. do NOT disable the firewall! just allow incoming ICMP) – Olivier Dulac – 2013-11-05T11:45:07.430

Answers

17

192.168.1.2 should be your ip, not the destination host. If the destination host is unreachable, it can not send you a reply (obviously), so the reply comes from your own machine.

This is because on the same subnet, ping sends an ARP request to get the MAC-Adress corresponding to the IP. if this cant be resolved, you get this message. If you ping a machine on another subnet, you get a time out message, because ping sends an ARP request to get the Gateway of the subnet, which should complete fine. But then the actual pinging times out

Simiil

Posted 2013-11-05T08:00:08.177

Reputation: 336

You can confirm it's your ip by typing ipconfig /all – Vijay – 2013-11-05T09:58:00.037

Ah, I feel like a dummy for not noticing that. The original problem (that it was pinging the wrong ip address for a specific computer name) has fixed itself over night. However, I still find it odd that I can't get on my router (192.168.1.1) from this machine even though it doesn't seem to be setup any different than other machines on my network. But at this point that's not slowing me down so I'll save that conundrum for another day. – BVernon – 2013-11-05T16:20:08.907

1

192.168.1.2 is some computer along the way, directly connected with your pc, telling you it cannot complete its task.

For instance, supposed your pc is cable-linked to another pc, which should be connected via wifi to a network, but the wifi connection dropped for any reason. Then the pc you are connect to do will send exactly the reply you have received.

Like Hercules' pillars, it is saying, nec plus ultra, i.e. no further than here. It means 192.168.1.2 has a connectivity problem.

MariusMatutiae

Posted 2013-11-05T08:00:08.177

Reputation: 41 321

The last sentence is true, but the first sentence misses the most simple possibility: that 192.168.1.2, the computer with connectivity problems, is the PC itself. – MSalters – 2013-11-05T10:30:19.057

Nope: when the pc issuing the ping command is the one without connection, there is no "Reply from ..." statement. – MariusMatutiae – 2013-11-05T10:39:05.543

FYI, 192.168.1.2 is the computer where the ping was originating but no it did not have a connectivity problem as I was obviously having no trouble getting on the internet and posting this question from it. – BVernon – 2013-11-05T16:24:05.393

+1 anyway though cause maybe that info will help someone with a similar but different problem down the road. – BVernon – 2013-11-05T16:24:53.647

@MariusMatutiae i explained in my answer why there is a reply in this case – Simiil – 2013-11-06T01:59:45.597