0

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

2 Answers2

1

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

1

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

Karoly Horvath
  • 334
  • 1
  • 4
  • 14