Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implementation of a reliable data transfer protocol on top of UDP sockets using Go-Back-N protocol with window size equal to 4 packets Build a simple

Implementation of a reliable data transfer protocol on top of UDP sockets using Go-Back-N protocol with window size equal to 4 packets

Build a simple File Transfer Service that consists of a client and server. The server exports a set of files from the computer on which it runs to be downloaded on the client computer. That is: a client requests a file from the server and the server responds to the client by sending the file. Client will request one file at a time. Server will send the contents of the file followed by the end-of-transmission packet and then exits. Client must save the file on the local computer with the same file name. Server records all file download activities in a log file. Build the MFTP on UDP ports. Use sequence number on data blocks to enforce reliability.

The message from the client and the response from the server are transmitted as the content of UDP datagrams. Each message is identified by a packet type as follows:

Packet type| Explanation

0 | ACK packet(i.e., acknowledgement packet). 1 | Request a file to be read from the server i.e., this packet carries file name to be downloaded. 2 | Data packet, i.e, contains data being transferred 3 | Reports an error [error message: File not found] 4 | EOT packet, i.e., it is an end-of-transmission (EOT) packet

Format of the UDP packet being transmitted between the client and the server is:

Type of the packet Sequence number Length (data size) Data (<= 16 bytes), depending on the packet type. The EOT packet is in the same format as a regular data packet, except that its type field is set to 4 and its length is set to zero. The server can close its connection and exit only after it has received ACKs for all data packets it has sent. The length field specifies the number of characters carried in the data field. It should be in the range of 0 to 15.

For ACK packets, length should be set to zero. Implementation: Both client and server will run from the command line as follows: >client >server The is the name of the file to be downloaded from the server.

The RN is used by the server to emulate lost packets as,

If RN = 0 all packets are received by the receiver,

If RN = 1 first packet of the current winodw is lost,

If RN = 2 all packets of the current window are lost.

Output: In order to observe the performance of the sliding window protocol and to check whether the implementation is working properly, collect statistics. Collect statistics for both the client and server. After transferring a file print out the following suggested statistics 1. the total number of data packets transmitted 2. the total number of retransmissions 3. the total number of acknowledgments sent 4. the total number of acknowledgments received 5. the total number of duplicate packets received 6. the total amount of data sent. 7. A log file of actions, recording all activities between the client and server.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions

Question

2. Compare the sales and service departments at Auto World.

Answered: 1 week ago