1

If I do ping 8.8.8.8 sometimes it returns the following for a period of time: From 172.22.1.1 icmp_seq=36 Destination Host Unreachable

But at other times it does reach the target and yet it says there is packet loss. Even if I do a ping and the aforementioned error message is never produced, it says about 30% packet loss when the ping session is stopped.

Someone told me this could mean that the packets are going through eventually because the unreachable message is not shown. Is this true?

I Newton
  • 11
  • 2
  • I even get 0% loss for some unused IPs on my home LAN: `ping 192.168.ghost.ip` reports: ... `Reply from 192.168.ghost.ip: Destination host unreachable.` ... `Ping statistics for 192.168.ghost.ip: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),`... WTF? – Sz. Jan 06 '23 at 14:08

2 Answers2

0

If the message is "Destination Host Unreachable," then there is no route from the local system, and the packets to be sent were never put on the wire. Those requests will be reported as 0% loss, since nothing was ever sent out.

Now, if the message says "From 10.x.x.x icmp_seq=1 Destination Host Unreachable" (10.x.x.x being an IP other than your own), the packets will be reported as a loss. Because those packets let your machine, but for some reason were blocked along the line.

Also, if you do not receive one or more ping requests back, without that error message, that could be for any number of reasons. Those will be reported as packet loss.

Bert
  • 2,863
  • 12
  • 13
0

The packets may or may not go through eventually, but you don't get a response for them. From your point of view, it doesn't make a difference. The fact that you don't get an error message doesn't mean that the packet will eventually reach its destination.

If you don't get a reply to your ping, either your packet got lost, or the reply to your packet got lost.

A packet may be just silently lost, or an error message may be returned. It the return packet is lost, an error message may be sent to the sender (the destination of your ping), but it will not reach you.

You can think of the packets similar to a letter or parcel sent in the mail. You write an address on the envelope, drop it in the mailbox and hope for the best. There are three possible results:

  • The packet may arrive.
  • The packet may be silently dropped.
  • The packet may be dropped but a error message is returned to the sender.

The case with the error message is usually when a packet is not dropped because of overload but because of some specific problems with the destination of the packet.

As the sender you can't distinguish whether the packet arrived or not. But in the case of a ping (and with most other protocols), the sender will send a reply. This reply also may or may not arrive. With most protocols other than ping, the sender will retry a few times until either a response arrives or the sender gives up.

RalfFriedl
  • 3,108
  • 4
  • 13
  • 17