I know that UDP has no real error control facilties outside of silent discard of packets failing checksums.

Am I correct in thinking that a UDP packet with a TTL=1 reaching a router will generate an ICMP Time Exceeded message, and a UDP packet arriving with an unused port # (54823 or something) at an end host will be rejected, causing an ICMP Port Unreachable message - and that both of those ICMP messages would be sent back to the originator of the message?

I'm pretty sure that's how it works, but I wanted to make sure I wasn't confusing myself somehow


Yes, you're right. That is also how traceroute does it.


That's right, but if you want to receive those messages in your app you have to use connect for the socket.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.