Consider a Web server that uses persistent connections runs in Host C on the port 80. The Web server receives the requests from the Host A and Host B. For every persistent connection of a Web server, a separate connection socket will be created.
Each connection socket contains source port number, destination port number, source and destination IP addresses. The Web server runs on Host C. The Host C checks the source port number, destination port number, source and destination IP addresses of the datagram to determine the socket through which the payload should be passed. Thus, the requests may pass through different sockets.
Therefore, all the requests from the Host A and Host B does not pass through the same socket at Host C.
Yes, even though the requests pass through different sockets, both sockets have the same port number 80. This is because, the web server runs in Host C on port 80. Thus, the Web server receives the requests from the Host A and Host B through port 80 i.e., the destination port number for both sockets is 80.
Therefore, the requests passed through the different sockets have the same port number 80.
Please leave a comment below and share with other students in your network if you found this answer helpful. Happy learning!