network congestion control algorithm

Details are Given in the attached files

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

CSE 5344 – Fall 2023 – Project 2
Objectives for this lab:
In this project you will design a network congestion control algorithm, use network simulator to
simulate your congestion control algorithm, and compare it with a traditional TCP congestion
control algorithm and analyze the performance. You need to think about the advantages and
disadvantages of your algorithm and then show advantages/disadvantages by simulation.
You will use ns-3 simulator. This is a very useful simulation tool which supports all kinds of
networks and network devices, such as routers, Ethernet, WIFI and SDN-enabled switches. Ns-3
supports both Python and C languages, but I suggest you use C since it is the most common
language ns-3 researchers use.
This is an individual project. You can discuss with other students, but you need to write your
simulation code independently. You can use any integrated development environment (IDE),
such as Visual Studio/Eclipse, to write but must be executable by ns-3.
Algorithm Description:
TCP NewReno: Similar to TCP Reno, TCP NewReno congestion window size (cwnd) changes
differently in two different phases, slow start phase (SSP) and congestion avoidance phase
(CAP). For each time the sender receives an ACK message with an unacked sequence
number, which means the network is not congested (cg = 0), the sender will increase cwnd at a
given rate based on the phase it’s currently in. And if the sender receives three duplicated ACK
messages with same acked sequence number, which means most likely the network is
congested (cg = 1), the sender will reduce cwnd by half regardless which phase it is in.
Mathematically we have:
In SSP,
In CAP,
Where W is cwnd and cg stands for the congested (1) or not congested (0) case.
Your Algorithm: In this project, we generalize TCP NewReno to the following one:
In SSP,
π›Όπ‘Š 𝑖𝑓 𝑐𝑔 = 0
βˆ†π‘Š = {
βˆ’π›Ύπ‘Š 𝑖𝑓 𝑐𝑔 = 1
In CAP
𝛽
𝑖𝑓 𝑐𝑔 = 0
βˆ†π‘Š = {
βˆ’π›Ύπ‘Š 𝑖𝑓 𝑐𝑔 = 1
Where Ξ±, Ξ² and Ξ³ are positive scaling parameters. Clearly for TCP NewReno, Ξ±=1, Ξ²=1 and
Ξ³=1/2.
You need to design your own congestion control algorithm with a set of scale parameters of
your choice, with at least one parameter taking a value differently from the one used in TCP
NewReno. Implement your algorithm in ns-3, run your algorithm, along with TCP NewReno in
the below scenario.
Scenario: A sample code is provided for the following scenario, which shows you how to
simultaneously run two different algorithms on the same topology (you can find it in p2instruction.cc file):
β€’
There are a total of two pairs of senders -receivers with a TCP session running between each pair
that keep sending packets for 10 seconds.
o Node 3 to Node 0 is running TCP Vegas algorithm.
o Node 2 to Node 0 is running TCP NewReno algorithm which is the default TCP algorithm of
ns-3.
The propagation delay and link capacity are 0.5ms and 100mbps for all links.
What you need to do:
Design and implement your own algorithm.
With reference to the sample code, run your algorithm, along with TCP NewReno algorithm as follows:
o
Node 3 to Node 0 is using your designed algorithm for 10 seconds.
o Node 2 to Node 0 is using TCP NewReno algorithm for 10 seconds.
Outputs:
We need to trace two parameters to analyze the performance.
β€’
β€’
The tracing of cwnd in the simulation time
The tracing of throughput/goodput in the simulation time.
Running the Script
The script file should have the following content.
Project2.cc
/* Copy Right */
/* CSE 5344 */
/* Your name */
#includes ….
int main{
/*main body*/
}
Put the project1.cc under the folder of ns-3.xx/scratch/
Runing it by ./waf –run project2 at ns-3.xx/ directory
Programming Hints
1. The algorithm files are under ns-3.xx/src/internet/model/ folder. The default algorithm is TCPNewReno which is included in tcp-congestion-ops.cc file.
2. For cwnd tracing, you can put a monitor block in the algorithm so that when the simulator
changes cwnd, it can print out the current cwnd and time.
3. For goodput/throughput tracing, you can use the knowledge from project 1, repeat the
calculation every 100ms and only count the bytes sent/received within the time period.
Report Requirement
1. Explain your algorithm.
2. Show the results from simulation.
3. Analyze the performance of your algorithm compared to TCP NewReno
a. Fairness (When and Why)
b. Responsiveness (When and Why)
4. Write a report about your algorithm including its implementation, simulation results and
advantages/disadvantages compared with TCP NewReno.
Analysis: You can pay more attention to four parts of performance analysis. First, at the beginning of
simulation, which algorithm reaches the stable state faster and why. Second, in the stable state, which
algorithm triggered congestion more frequently and why. Third, the flow triggered congestion, which
algorithm recovery faster and why. Fourth, in the stable state, which algorithm has the higher
throughput/goodput and why.
Grading Policy
You can go to the /example/tutorial/ to read first.cc second.cc third.cc. Copy them to ns-3.xx/scratch/
then go to main direction and run ./waf –run scratch/first
Here’s a material to help you understand how the script file work.
00
https://www.nsnam.org/docs/tutorial/html/building-topologies.html
This are the steps (with the percentage of grade allocated) you need to take to complete the project:
β€’
β€’
β€’
β€’
Complete the tracing part in ns-3, 10%
Design and implement your algorithm. 30%
Write a report to evaluate your algorithm; 30%
Identify the cases where outperforms/underperforms TCP NewReno. 30%
You would not have a grade without an executable ns-3 script.
NS-3 Installation Guidelines
Platform: (prefer: Ubuntu. If you have Ubuntu already, jump to step 5)
Windows, Mac users:
Step 1: install VirtualBox. https://www.virtualbox.org/
Step 2: download Ubuntu. https://ubuntu.com/download/desktop
Step 3: Load Ubuntu into VirtualBox
Click β€œnew” button
Name your virtual machine, choose a folder where your file would be stored.
Select Linux and Ubuntu-64bit as Type and Version. Then click create.
And click create again.
Right click your new virtual machine and choose setting.
At Storage section choose the Empty under Controller:IDE. Then click the disk button right to the optical
drive. Select Choose a disk file and find your ubuntu file just downloaded at step 2
Click OK
Start your virtual machine.
Step 4: Install Ubuntu by install instruction.
Step 5: install ns-3 https://www.nsnam.org/wiki/Installation
Step 6. Install netanim
This animation tool would be automatically installed with ns-3. If you find that this tool does not
work, you can read https://www.nsnam.org/wiki/NetAnim_3.105
NS-3 Use Guidelines
Before go to the next step, you should make sure that in the ./ns-allinone-3.xx/ns-3.xx/ directory, you
can run ./waf –configure successfully.
You should put your code like xxxx.cc under. ns-3.xx/scratch directory and run ./waf –run scratch/xxxx
at ./ns-3.xx/ directory

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER