I am sending UDP packets from one PC to another. I am watching the the whole activity using Wire Shark. I notice that for some time there is smooth transmission of packets from
The reason this occurs is that there is no process on the receiver that waiting on that port.
You need to have a client, that has a socket open, and has done the bind() to that port.
One odd error that might be associated with a Port Unreachable message is seen when an otherwise normally operating conversation is interrupted by a Port Unreachable message. When you inspect the conversation you observe that the unreachable port was working without a problem. Frames were going to and from the port number when, suddenly - Port Unreachable. This is indicative of an overload condition or process priority configuration problem in the reporting host. The process in question was swapped out of memory and was not able to swap back in quickly enough to avoid the unreachable indication.
Source: https://www.savvius.com/resources/compendium/tcp_ip/unreachable#port_unreachable