Suppose that the message you are sending does not reach the destination, such as a ping. Is the content of that message protected? How is a retransmission accomplished?
2Thank you for your question. As phrased, it's a bit unclear what you mean by protected; could you elaborate?– Mike PenningtonJan 15, 2014 at 15:45
Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.– Ron Maupin ♦Aug 7, 2017 at 18:04
IP protocol provides no guarantee that packets will arrive, arrive on time, or arrive in the proper order. The only thing IP can verify is that the packet header is intact (due to the header checksum). So if a ping is lost, it is...lost. It is up to the sending program to detect that no corresponding reply was received. If you want to guarantee delivery, you need to rely on layer 4 protocols, namely TCP.
The content of that message isn't any more protected as when you sent it out. Unless you're using some sort of encryption mechanism to provide confidentiality, anyone along that path (presumably with malicious intent) can snoop in on your packet.
Retransmission is accomplished by TCP. The same can't be said about UDP, it just gets discarded since retransmission is often times not wanted (i.e. packets arrive out of sync).
When an ICMP Echo message is lost, it is lost indefinitely. The message will not be retransmitted because ICMP rides on top of IP, which does not provide reliability.
Think about issuing a ping over a path that may have packet loss. Some pings will be lost, while others may receive a reply. If ICMP provided reliability and was able to retransmit, you would never see a ping fail over a degraded path, although the default timeout of most ping utilities is 2 seconds.
Ping is ICMP. While in transit if the TTL (Time to Live) expires the packet is dropped. See http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol