Session multiplexing tracks multiple communication sessions at the same time by assigning each client connection a distinct transport-layer source port. A browser selects an ephemeral port for each session, allowing responses to return to the correct application. section 22.1.2
A session is identified by two sockets: the client socket and server socket. Together, their client and server IP addresses, port numbers, and TCP or UDP protocol form a five-tuple. For example, a client using 192.168.1.1:50000 can connect to a server at 203.0.113.1:443. section 22.1.2
Port-number behavior supports multiplexing across transport protocols:
- TCP and UDP both provide Layer 4 addressing and session multiplexing through port numbers. section 22.2.2
- Ephemeral ports 49152–65535 commonly serve as client source ports, while HTTPS commonly listens on TCP port 443. section 22.1.2 section 22.3
Figure 22.3 Session multiplexing is achieved through port numbers. PC1 selects a unique source port for each communication session with SRV1, which addresses each response to the same port from which the corresponding request originated.
Shows how a client selects a unique source port for each session and how the server addresses each response to that port. section 22.1.2
