Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 stackoverflow.com Aug 3 '11 at 23:37

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

add comment

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.