Starting from:

$29

Assignment 2: TCP Congestion Control

CS3205 Computer Networks Lab

Assignment 2: TCP Congestion Control

Individual Assignment
Extension: 15%penalty for each 24­hr period;
Max. of 48­hrs past the original deadline
1 Description
The objective of this project is to emulate the TCP congestion control algorithm, as explained below.
1.1 Assumptions and Variables
The assumptions and variables are given below:
• Receiver Window Size is set to 1 MB, and does not change during the entire duration of the emulation.
• The Sender always has data to send to the receiver.
• Sender’s MSS is 1 KB.Each segment has a fixed length of one MSS.
• Go­back­N is used, but cumulative acknowledgments are not considered.For each segment, an individual
timeout timer and ACK are used.
• The congestion window is always intrepreted as a multiple of MSS (1 KB).
• The congestion threshold is always set to 50% of the current CW value.
• K i, 1 ≤ Ki ≤ 4denotes the initial congestion window (CW). Default value is 1. The initial CW is given by:
CWnew = Ki ∗ MSS
• K m, 0.5 ≤ Km ≤ 2denotes the multiplier of Congestion Window, during exponential growth phase. Default
value is 1. When a segment’s ACK is successfully received,
CWnew = min(CWold + Km ∗ MSS, RWS)
• K n, 0.5 ≤ Kn ≤ 2denotes the multiplier of Congestion Window, during linear growth phase. Default value is
1. When a segment’s ACK is successfully received,
CWnew = min(CWold + Kl ∗ MSS ∗
MSS
CWold
, RWS)
1
• K f
, 0.1 ≤ Kf ≤ 0.5denotes the multiplier when a timeout occurs:
CWnew = max(1, Kf ∗ CWold)
• Ps, 0 < Ps < 1, denotes the probability of receiving the ACK packet for a given segment before its timeout
occurs.
1.2 Running the program
The program is invoked with the following command­line parameters:
% ./cw ­i <double> ­m <double> ­n <double> ­f <double> ­s <double> ­T <int> ­o outfile
The values correspond to K i, Km, Kn, Kf , Ps and the total number of segments to be sent before the emulation
stops. The output (specified below) is saved in an output file.
The congestion window progression is done on a slot­by­slot basis. In each “round” as explained in the class, a set
of segments are sent, in proportion to the current value of CW, i.e.N =
CW
MSS . For example, if CW is equal to
4.3 KB, five packets are sent. However, the CW growth is based on MSS values as explained earlier.
For each segment transmitted, the ACK for this segment is received before timeout with random probability Ps, and
timeout occurs with probability(1 − Ps). Depending on this outcome, the CW increases and decreases as described
earlier.
2 What to do?
Given the set of input parameters, the simulation progresses as above. The congestion window value is printed
to the output file (one per line) at each CW update. A graph with x­axis being the update number and y­axis the
corresponding CW value must be plotted.
A technical report must be written based on the results and graphs obtained for the following parameter combinations:
K i ∈ {1, 4;}K m ∈ {1, 1.5; }K n ∈ {0.5, 1; K} n ∈ {0.1, 0.;3P}s ∈ {0.01, 0.0001. }
The report should explain how these factors influence the CW change over the duration of the session.
3 What to Submit?
The platform for this project will be Linux and C/C++/Java. Create a tar­gz file with name: Lab4­RollNo1.tgz
The directory should contain the following files:
• Source File(s)
• Makefile and Script File
Typing command ‘make’ or your script program, at the UNIX command prompt, should generate all the
required executables.
• A Script file obtained by running UNIX command script which will record the way you have finally tested
your program.
• Technical Report (as above)
• a README file containing instructions to compile, run and test your program.
2
5 Grading
• Implementation of CW Scheme: 60 points
• Report: 20 points
• Viva Voce: 20 points
3

More products