Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CSCI 3171 - Network Computing

Lab 7: Congestion control

Submission guideline:

1. Solve the questions. Dont forget to add screenshots to your responses.

2. Create a PDF file named "lab-7-<your B00 number>.pdf" containing all your

answers.

3. Submit your PDF file at Brightspace.

OBS: Please do not copy and paste from the Internet or any other unauthorized source.

In this lab, we’ ll explore the different variations of congestion control algorithms available as part of the TCP implementation. We will understand their phases (slow start and congestion avoidance) and analyze the implications of the main design choices to the overall connection performance.

1. Check which congestion control algorithm your OS is using.

Linux:

Open up a terminal and type:

sysctl net.ipv4.tcp_congestion_control

 

Example output:

net.ipv4.tcp_congestion_control = cubic


#TCP cubic

 

Windows:

Run PowerShell as administrator and type:

netsh int tcp show supplemental

Example output:

TCP Supplemental Parameters

-------------------------------------------------------

Congestion Control Provider             : cubic             #TCP Cubic

 

MAC OS:

Open up a terminal and type:

sysctl -a | grep net.inet.tcp

Look for the following lines:

net.inet.tcp.newreno_sockets


net.inet.tcp.cubic_sockets

net.inet.tcp.use_newreno

Example output:

net.inet.tcp.newreno_sockets: 0


net.inet.tcp.cubic_sockets: 46 net.inet.tcp.use_newreno: 0


#TCP cubic


2. Start a packet capture on Wireshark.

3.  Use  the  link  below  to  run  a  speed  test  (i.e.,  check  the  maximum  upload/download throughput an application running in your machine can achieve when using TCP).

https://pcmag.speedtestcustom.com/

4. Stop the packet capture when the speed test finishes.

5.  Plot  the throughput over time for one of the speed test connections.  For that, do as follows:

a) discover your IP address Linux/MAC OS:

ifconfig

Windows:

ipconfig

b) Check the list of TCP connections captured by Wireshark: Access menu Statistics -> Conversations

Click on the TCP tab

Order the connections by the number of bytes sent from A to B

There should  be a window  like the one below if you correctly followed the three steps above.

 

 

 

Create  a  filter  on wireshark  based  on  the  source  port  and  IP of the top connection from the list. In the example above the filter was:

ip.src == 192.168.2.10 && tcp.srcport == 45318

Plot the throughput from the selected connection over time by accessing the menu Statistics -> TCP Stream Graphs -> Throughput. After this step, your screen should show a window like the one below.


 

 

If  needed,  you  can  adjust  the  plot  by  clicking  on  Switch  Direction”  and unmarking the Segment Length” checkbox. Your final result should be like the one below.

Save a screenshot of the throughput plot. You will need it later.

 

 

 

Q1. ( 10 points) Can you identify where TCP’s slow start phase begins and ends, and where congestion avoidance takes over? You can give your answer in terms of time instants (e.g., slow start ends after 50 seconds).

Q2. ( 10 points) Indicate two time instants where the connection probably faced packet loss.

6. Switch the congestion control algorithm used by your OS.

 


Linux:

Open up a terminal and type:

sudo sysctl -w net.ipv4.tcp_congestion_control=bbr


 

 

#TCP BBR


 


Windows:

Run PowerShell as administrator and type:

netsh int tcp set supplemental template=compat


 

#TCP New Reno


MAC OS:

Open up a terminal and type:

sysctl -w net.inet.tcp.use_newreno=1                        #TCP New Reno

7) Repeat steps 2 to 5. You should get a new throughput plot at the end.

Compare the new throughput plot with the previous one and answer:

Q3. (10 points) Which one has higher average throughput? Why? OBS.: try to explain why in light of the two congestion control algorithms you tested. Which characteristics from these two congestion control algorithms would result in better performance for one of them in the scenario you tested?

8) Reset your congestion control configuration to the default one.

Linux:

Open up a terminal and type:

sudo sysctl -w net.ipv4.tcp_congestion_control=cubic #TCP Cubic

Windows:


Run PowerShell as administrator and type:

netsh int tcp set supplemental template=internet


#TCP Cubic


 


MAC OS:

Open up a terminal and type:

sysctl -w net.inet.tcp.use_newreno=0


 

 

#TCP Cubic