Communications and Networking: Consider a simple application level protocol buil
ID: 3590637 • Letter: C
Question
Communications and Networking:
Consider a simple application level protocol built on top of UDP that allows a client to retrieve a file from a remote server residing at a well known address. The client first sends a request with file name, and the server responds with a sequence of data packets containing different parts of the requested file. To ensure reliability and sequenced delivery, client and server use a stop - and - wait protocol. Ignoring the obvious performance issue, do you see a problem with this protocol? Think carefully about the possibility of processes crashing.
Explanation / Answer
Yes we can see a problem in this protocol in case the processes crash. Consider the following situation:
Suppose client X sends a request to the server for file f1 and after sending the request, it crashes. Now, suppose another client Y then use the same protocol to request the server for another file f2. Now, it is possible that client Y, running on the same machine as X (with same IP address), binds its UDP socket to the same port that X was using earlier. Now suppose Y's request is lost in the process. When the server’s reply (to X’s request) arrives, client Y will receive it and assume that it is a reply its own request. So, client Y basically may receive a wrong file in such a scenario.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.