Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

migrated from Aug 3 '11 at 23:37

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

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

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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