2

I am on Windows and LAN using the command line PING in this format:

ping -a -n 5 -S <source ip> <destination ip>

For the most part, it does what it is supposed to do but I have noticed 3 issues that I am curious to better understand.

Two machines, both offline, respond differently

  • One says: Reply from <source ip>: Destination host unreachable.
  • Other says: Request timed out.

Now my understanding is that unreachable means exactly what it says, can't be reached (obviously its off) but the other suggests that it is on, but just not responding (which shouldn't be the case here as it IS off) so why the difference in the way the result is reported?

Additionally, as you can see in the command, the option -a is set which means it is supposed to resolve to machine name, but its not doing that in the results. I suspect it might be a NetBIOS issue but wanted to confirm.

GµårÐïåñ
  • 165
  • 1
  • 2
  • 8
  • destination host unteachable does not have to mean that the machine is off it may also be behind a firewall, be configured not to respond to icmp ping packets, etc – Cyclonecode Oct 23 '15 at 05:25
  • I know that, but in this case I KNOW for a fact they are off, they are on my LAN :) – GµårÐïåñ Oct 23 '15 at 18:11

1 Answers1

3

Destination host unreachable occurs when the local system or a remote system responsible for routing the packet was unable to determine a route to the destination. If the destination host is in the same subnet but does not respond to ARP, it will also trigger a host unreachable error. So basically this is your computer saying "I don't know where to send this packet, the host is either offline and did not respond to ARP, or I don't know where to route it".

Request Timed Out occurs when there was no echo reply received within the time-out period. This could be due to something like a firewall blocking the request, or network congestion. This usually occurs when a route to the destination is present, but something else is blocking the ping. This is basically your computer saying "I know where to send this packet, I have sent it, but I never received a reply".

blacklight
  • 1,389
  • 1
  • 10
  • 19
  • Thank you, that's what I thought too but since both machines are OFF shouldn't they logically have the same response? Unreachable? because .67 and .72 machines are both turned off. Now since my machine has an echo block, then someone pinging ME should get the timed out because my machine won't respond but these two are just off at the time of pinging. Hence my confusion. – GµårÐïåñ Oct 23 '15 at 00:20
  • 1
    If the destination MAC address is already/still in the ARP cache on your source machine then that would explain why you got **Request Timed Out** instead of **Destination host unreachable**. A **Destination host unreachable** occurs when no ARP response is received but if the destination MAC address is already/still in the ARP cache then there's no ARP broadcast necessary, so a **Request Timed Out** would be the expected result. – joeqwerty Oct 23 '15 at 00:49
  • Additionally, from my experience, using `-a` while pinging an ip address (as opposed to pinging a name) will cause ping to issue a rDNS query to the source machines configured DNS server. If no rDNS zone exists or a PTR record for the ip address in question doesn't exist then the ip address can't be resolved to a name. There's no `reverse` lookup functionality for NetBIOS that I'm aware of. – joeqwerty Oct 23 '15 at 00:52
  • Ok, that's something to consider. I can clear the caches, and try again and see. Thank you for that. Just to confirm, I think `ipconfig /flushdns` should do the trick, right? – GµårÐïåñ Oct 23 '15 at 18:11
  • @GµårÐïåñ That is correct. – blacklight Oct 24 '15 at 06:45