0 votes
4.4k views
in Computer Networks by (user.guest)

Suppose that a Web server runs in Host C on port 80. Suppose this Web server uses persistent connections, and is currently receiving requests from two different Hosts, A and B. Are all of the requests being sent through the same socket at Host C? If they are being passed through different sockets, do both of the sockets have port 80? Discuss and explain.

1 Answer

+1 vote
by (user.guest)
 
Best answer

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!

Related questions

Welcome to CPEN Talk
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

...