Artificial intelligent assistant

UDP Sessions and Ephemeral Port Selection I would like to ask community to help me finding answers to the following questions: 1. According to RFC 6056 an operating system should pseudo-randomly select ephemeral ports for each transport layer connection. For TCP, which is stateful protocol, the situation is clear: the ephemeral port is assigned to 5 tuple {protocol, source_ip, source_port, destination_ip, destination_port} until the connection is dropped. However, UDP is a stateless protocol, there is no UDP connection. Therefore, for me it is not clear how an ephemeral port is assigned in case of UDP. Is it different for every request? Is it randomly assigned to 5 tuple and preserved until no packets received during a TIMEOUT? 2. Are the differences in the implementations of various operating systems, e.g., Windows, Unix, Linux? I asked the same question on serverfault.com, but maybe it is more relevant here.

On clients, each socket is bound either explicitly or implicitly to a local port. This binding lasts as long as the socket does. Whether the same socket is used for multiple requests or a new socket is created for each request is up to the application developer.

On network address translators a timeout based policy is normally used. If no packets are seen for a given mapping during the timeout period then the mapping is discarded.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy b5c23ab60a6631d48ff41c6a09fee85d