Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose a process in Host C has a UDP socket with port number 6789, Suppose both

ID: 3665903 • Letter: S

Question

Suppose a process in Host C has a UDP socket with port number 6789, Suppose both Host A and Host B each send a UDP segment to Host C with destination port number 6789. Will both of these segments be directed to the same socket at Host C? If so, how will the process at Host C know that these two segments originated from two different hosts?

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 passing through different sockets, do both of the sockets have port 80? Discuss and explain.

Explanation / Answer

yes both will be directed to the same socket. For each of the segements recieved at Host C the operating system will provide the process with the IP details to differentiate between the individual segments arriving at host C.

For each persistent connection, the Web server creates a connection socket.Each   connection socket on the web server is identified with a four-tuple.
It contains source ip address, source port number, destination ip address and destination port number.
Host C will check these 4 fields in the datagram and then will determine to which socket it should pass the data.
Thus the request coming from Host A and Host B will pass through different sockets.
The identifier for both of these sockets has 80 for the destination.
however, the identifiers for these sockets have different values for source addresses.
the source ip address will be specified by the socket identifier.
   

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote