Computer Networks and Applications
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
COMP3331/9331 Computer Networks and Applications
Version 1.0
1. Due date:
Note that the final marks of assignment component are capped at maximum 20. E.g., if you get 19 marks and have submitted as an early bird, your marks are increased (and capped to) 20 marks.
2. Goal and learning objectives
-
For this assignment, you will be asked to implement a reliable transport protocol over the UDP protocol.
-
We will refer to the reliable transport protocol that you will be programming in this assignment as Simple Transport Protocol (STP).
-
STP will include most (but not all) of the features that are described in Sections 3.5.3, 3.5.4 and 3.5.6 of the text Computer Networking (7th edition). Examples of these features include timeout, ACK, sequence number etc. Note that these features are commonly found in many transport protocols.
-
Therefore, this assignment will give you an opportunity to implement some of these basic features of a transport protocol. In addition, you may have wondered why the designer of the TCP/IP protocol stack includes such feature-less transport protocol as UDP. You will find in this assignment that you can design your own transport protocol and run it over UDP.
-
This is the case for some existing multimedia delivery services in the Internet, where they have implemented their own proprietary transport protocol over UDP.
-
Note that it is mandatory that you implement STP over UDP. Do not use TCP sockets. You will not receive any mark for this assignment if you use TCP socket.
2.1 Learning Objectives
On completing this assignment, you will gain sufficient expertise in the following skills:
-
Detailed understanding of how reliable transport protocols such as TCP
-
Socket programming for UDP transport
-
Protocol and message
3. Overview
-
As part of this assignment, you will have to implement Simple Transport Protocol (STP), a piece of software that consists of a sender and receiver component that allows reliable unidirectional data transfer.
-
STP includes some of the features of the TCP protocols that are described in sections 3.5.3, 3.5.4 and 3.5.6 of the textbook (7th edition). You will use your STP protocol to transfer pdf files from the sender to the receiver.
-
You should implement STP as two separate programs: Sender and Receiver. You only have to implement unidirectional transfer of data from the Sender to the Receiver. As illustrated in Figure 1, data segments will flow from Sender to Receiver while ACK segments will flow from Receiver to Sender.
-
Let’s reiterate this, STP must be implemented on top of UDP. Do not use TCP sockets. If you use TCP you will not receive any marks for your assignment.
You will find it useful to review sections 3.5.3, 3.5.4 and 3.5.6 of the text. It may also be useful to review the basic concepts of reliable data transfer from section 3.4.
python编程代写 Figure 1
Figure 1: The basic setup of your assignment. A file is to be transferred from the Sender to the Receiver. Sender will run on the sender side while Receiver will run on the receiver side. Note that data segments will flow from the sender to receiver, while ACK segments will flow from the receiver to sender.
4. Assignment Specifications
This section gives detailed specifications of the assignment. Total marks for this assignment are 20. You are free to choose C, JAVA or Python as the programming language (please see Section 5). The programs
will be tested on CSE Linux machines. So please make sure that your entire application runs correctly on these machines (i.e. your lab computers). We are unable to mark your assignment if it does not compile or run correctly on CSE lab computers, resulting in loss of significant marks.
The main code for the sender and receiver should be contained in the following files: sender.c or Sender.java or sender.py, and receiver.c or Receiver.java or receiver.py. You are free to create additional files such as header files or other class files and name them as you wish.
4.2 List of features provided by the Sender and Receiver
You are required to implement the following features in the Sender and Receiver:
-
A three-way handshake (SYN, SYN+ACK, ACK) for the connection establishment. The ACK sent by thesender to conclude the three-way handshake should not contain any payload (i.e. data). See Section
3.5.6 of text for further details.
-
Afour-segment (FIN, ACK, FIN, ACK) connection The Sender will initiate the connection close once the entire file has been successfully transmitted. See Section 3.5.6 of text for further details.
-
Sender must maintain a single-timer for timeout operation. You are required to implement round-trip- time estimation and RTO estimation discussed in Section 3.5.3 of the text. The timeout is not a constant value but is given by the formula on page 243 of the text (TimeoutInterval = EstimatedRTT + 4 * DevRTT).Use the initial value of EstimatedRTT = 500 milliseconds and DevRTT = 250 milliseconds.
-
Sender should implement all the features mentioned in Section 3.5.4 of the text, with the exception of doubling the timeout. The STP protocol must include the simplified TCP sender (Figure 3.33 of the text) andfast retransmit (pages 249-251). You will need to use a number of concepts that we have discussed in class, g., sequence numbers, cumulative acknowledgements, timers, buffers, etc. for implementing your protocol.
-
Receiver should implement the features mentioned in Section 3.5.4 of the text. However, you do not need to follow Table 3.2 for ACK generation. All packets should be immediately acknowledged, i.e. you do not have to implement delayed
-
STP is a byte-stream oriented protocol. You will need to include sequence number and acknowledgement number fields in the STP header for each segment. The meaning of sequence number and acknowledgment number are the same as in
-
MSS(Maximum segment size) is the maximum number of bytes of data that your STP segment can
contain. In other words, MSS counts data ONLY and does NOT include header. Sender must be able to deal with different values of MSS. The value of MSS will be supplied to Sender as an input argument.
-
Anotherinput argument for Sender is Maximum Window Size (MWS). MWS is the maximum number of un-acknowledged bytes that the Sender can have at any MWS counts ONLY data. Header length should NOT be counted as part of MWS.