If I ping 192.168.1.4, why is 192.168.1.2 responding?
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