Lab 2
Lab 2
Lab 2
Procedures
1. Verify that power switch nine (9) (on the power rail behind the rack) is turned on.
1A good idea would be to read the lecture slides or the corresponding textbook sections regarding the Transport
Layer to fully understand the concepts you will use and test in this Lab.
2. Verify that the Netgear switches inside the rack display the numbers one (1) and two (2).
3. Turn on (Restart if it is already on) the PC by powering on/o switch eight (8) (on the
power rail behind the rack). BE CAREFUL! The PC must be rebooted between
students, as they are set up to clear out the memory and lesystem.
4. Login to the Rack’s PC with the following credentials:
Username: student
Password: 740Rocks$
5. If power switch two (2) is ON (Lab 2), turn it OFF and wait for ve (5) seconds before
proceeding with the next step (Static charge can keep the device on for a couple of seconds)2.
6. Turn on power switch number two (2) (on the power rail behind the rack) and wait up to
two (2) minutes for the hosts to boot up3.
7. Open the Lab 2 user interface (Lab 2 application) on the desktop of the testbeds’ computer
and make sure that the status line at the bottom reads Status: All hosts are up!
If not, wait for a few more seconds and reopen the Lab 2 user interface (Lab 2 application)
on the testbed’s computer.
2 On the power rail behind the rack, only power switches two (2), eight (8), and nine (9) should be ON. All other
power switches should be powered OFF to avoid any issues with your captures.
3 Sorry, but one of the servers being used in Lab # 2 takes a while to start!
8. Repeat steps ve (5) to seven (7) if any hosts are still down (check the status in the Lab 2
application). You can also repeat these steps to reset the lab components at any point while
completing this assignment.
9. Connect the Ethernet cable to your laptop and open Wireshark (on your connected laptop).
10. When you are done with the lab, shut down the computer and turn o all the power switches
(on the power rail behind the rack) EXCEPT switch nine (9)!
examine this tra c. But, keep in mind that we are interested in the Transport Layer (i.e.,
TCP and/or UDP), not the Application layer (e.g., HTTP).
• Using the Lab 2 interface, click the Open RFC button.
• Wait for the resulting pop-up window to load completely (load all the pages in the RFC
document (slide down to verify that the document was correctly loaded)).
• Stop the Wireshark packet capture and save the PCAP le for your future analysis4.
• Close the pop-up window that displays the RFC document in the Lab 2 user interface.
4We advise you to save a di erent PCAP le for each part/question in this Lab. For some, questions, it would be
even better if you save individual PCAP les for the di erent permutations that are asked in some questions (e.g.,
di erent packet loss rates). This will help you to have a more organized collection of PCAP les that will be handy
when analyzing them and minimize the ltering of information and the time trying to nd the correct interactions.
5You can learn more about TCP Relative Sequence Numbers in Wireshark in this link: https://wiki.wireshark.org/
TCP_Relative_Sequence_Numbers
including what your initial EstimatedRTT was, your choice of parameters (columns), any
segments that were not used in the calculation, and the formula that you used. (5 points)
4. Complete your previous table with some additional calculations. Using the information that
you collected in the previous table, calculate the RTT deviation for each of the samples that
you gathered (DevRTT). In other words, complete your table with the DevRTT values for
your Sample RTT and EstimatedRTT. Make sure to explain your choice of parameters
that you used for these calculations and how you calculated them (e.g., the formula and
process that you follow). Finally, calculate the value of the Timeout Interval
(TimeoutInterval) that TCP could use considering each of your values for
EstimatedRTT and its corresponding DevRTT in your table. What formula did you use?
How did you calculate these values? How did the value of the Timeout Interval change for
each sample that you gathered? (5 points)
5. Let’s analyze TPC’s Flow Control by studying the information being sent by the Client at
the beginning of the TCP connection. What is the amount of available (free) bu er space
advertised by the Client?6 Does the lack of receiver bu er space advertised by the Client ever
throttle (i.e., reduce) the send rate of the Server (Explain how or why not)? What is the
Maximum Segment Size being advertised? Based on only the numbers you obtained for the
receiver window and the MSS, approximately, calculate how many segments of MSS size
could be stored by the Client7. Make sure to explain your calculations and answers. (5 points)
6. How much data (amount of bytes and number of segments) does the Client typically
acknowledge in a single ACK? Can you identify cases where the Client uses Delayed
ACKs? Explain how or why not. What is the most typical length of the TCP Payload when
the Server is sending data to the Client? What is the most typical length of the TCP Header
when the Server is sending data to the Client? Based on the size of the TCP payload and
TCP header that you found for the Server and assuming an IP header of twenty (20) bytes,
calculate the MTU of this connection. Make sure to explain your calculations and answers.
(5 points)
Note: You should only use Wireshark on the NUC (Rack’s computer) for questions seven (7) to
twelve (12) of this lab. The NUC's promiscuous mode is not as reliable as the switch tap (i.e., the
Ethernet wire you connect to your computer) and you might miss some critical packets.
Please, complete the following steps:
• Start up Wireshark packet capture on the testbed’s NUC using the Ethernet interface.
Remember that you want to be able to see UDP and TCP segments.
• Make sure the Packet Loss slider in the Lab 2 application interface is set to zero percent
(0%).
• Click the Download Image button on the Lab 2 application interface.
• An image will be displayed twice on pop-up windows, once via a UDP transfer and once via a
TCP connection.
• Stop the Wireshark packet capture and save the PCAP le. Transfer the PCAP le to your
USB ash drive and delete it from the NUC.
• Close the pop-up windows that display both images (TCP transfer and UDP transfer).
Let's see what happens when the network loses some packets (and consequently some segments
at the Transport Layer). Continue by doing the following:
• Start up Wireshark packet capture on the testbed’s NUC using the Ethernet interface.
Remember that you want to be able to see UDP and TCP segments.
• On the Lab 2 Application interface, change the packet loss slider to a value greater than zero
percent (0%). Make sure the drop-down menu next to the slider says Packet loss on
Stream and click Apply8.
• Click the Download Image button again and wait for the two images to be displayed (one
via a UDP transfer and one via a TCP connection).
8To be sure that the loss value is set, we recommend clicking the Apply button a couple of times, you know just to
be sure!
• Repeat the download process of the image with another packet loss value greater than zero
percent (0%) (two loss values in total)9. Note that at very high packet loss rates (e.g., 20%),
the UDP image might not load at all. In such a case, reduce the packet loss rate. You want
to see the images transferred (displayed) to the application interface.
• Stop Wireshark packet capture and save the PCAP le(s). Transfer the PCAP le(s) to your
USB ash drive and delete it from the NUC.
• Close the pop-up windows that display both images (TCP transfer and UDP transfer)
What if instead of downloading a static image, the tra c would be a live video stream (e.g., some
YouTube video, Net ix video, Twitch live stream, a videoconference call, etc.)? Let's nd out.
Please, complete the following steps:
• We will use the NUC’s web camera for this section10.
• Start with a zero percent (0%) packet loss in the Lab 2 application interface (make sure to
click the Apply button (you know a couple of times to be sure!)).
• Click the Start Video Stream button in the Lab 2 Application interface. You should
see two small windows displaying the camera feed (one for TCP and one for UDP).
• Be creative! Pop a dance move or wave your arms around to check that the video stream is
working correctly.
9A little tip (that you can disregard if wanted): You probably want to have each packet loss experiment saved in a
di erent PCAP le to simplify your future analysis (e.g., an individual PCAP le for each scenario in these
questions: no loss, loss value 1, and loss value 2).
The camera is located on top of the testbed’s screen. If the camera is not there, please look around the Racks as it
10
might have fallen and put it back in its intended position (on top of the screen).
Note: The stream might behave erratically due to some programming issues. More than the
quality of the image, you are looking for which one (the TCP window or UDP window) gets
stuck (“freezes”) more often. You could assume we had cool software that would make
corrections in the Application Layer so that it would look stable to the nal users (once the
application is in production).
• Gradually increase packet loss (using the slider) and observe how the video streams behave.
Note: You have to hit the Apply button to activate any changes you have made to the packet
loss slider (Make sure the drop-down menu next to the slider says Packet loss on
Stream).
• Close the pop-up windows with the camera feed (one for TCP and one for UDP).
• Leave the web camera in its intended position.
Note: For the following parts of Lab 2 you will be using Wireshark on your computer again
(connected to the testbed’s Ethernet cable).
The second TCP connection on each port is the one we are interested in, as it probes for
additional bandwidth/throughput using di erent congestion control algorithms (TCP versions).
Wireshark's TCP stream lters may be handy for this section.
Please, complete the following steps:
• Start up Wireshark capture on your laptop, NOT the testbed’s NUC.
• Make sure the packet loss slider on the Lab 2 application interface is back at zero percent
(0%) and Click Apply.
• Click the Run IPERF test button on the Lab 2 Application Interface.
• Wait for around fteen (15) to thirty (30) seconds. The Application Interface will not pop up
any information (The script window of the Lab 2 application might provide some additional
information about the process. However, you should see a lot of TCP packets popping up in
your Wirehsar capture!
• Stop the Wireshark packet capture and save the PCAP le for your future analysis.
You might need to click on the Switch Direction button to get the correct orientation in the Time-Sequence
11
graph and other TCP graphs that you might need to use.
Let's see what happens when the network loses some packets (and consequently some
segments at the Transport Layer). Continue by doing the following:
• In the Lab 2 application interface, use the drop-down menu to change the type of
packet loss to Packet loss on IPERF. Then, pick a packet loss value greater than
zero percent (0%) (using the slider) and hit the Apply button. Then, run the iperf
test, by clicking on the Run IPERF test button on the Lab 2 Application Interface.
• In total, run the iperf test at least five (5) different times with five (5) different
packet loss values in each run (use the slider and remember to hit the Apply button
between each of the five (5) runs that you need to complete).
Throughput CC1 +
(Throughput CC1/ (Throughput CC2/ (Throughput CC3/
Throughput CC2 +
Lost Rate # 1 Total Lost Rate # Total Lost Rate # Total Lost Rate #
Throughput CC3 =
1)*100 1)*100 1)*100
Total Lost Rate # 1
Throughput CC1 +
(Throughput CC1/ (Throughput CC2/ (Throughput CC3/
Throughput CC2 +
Lost Rate # 2 Total Lost Rate # Total Lost Rate # Total Lost Rate #
Throughput CC3 =
2)*100 2)*100 2)*100
Total Lost Rate # 2
Throughput CC1 +
(Throughput CC1/ (Throughput CC2/ (Throughput CC3/
Throughput CC2 +
Lost Rate # 3 Total Lost Rate # Total Lost Rate # Total Lost Rate #
Throughput CC3 =
3)*100 3)*100 3)*100
Total Lost Rate # 3
The TCP Throughput graph might be useful to calculate/observe the maximum achievable throughput for each
12
TCP stream.
13The table is only meant to provide you with a reference on how to create and calculate the required values that you
can use to create the graph. Please feel free to modify the table in any form you need or to use a di erent table (or
resource) to create the graph.
Throughput CC1 +
(Throughput CC1/ (Throughput CC2/ (Throughput CC3/
Throughput CC2 +
Lost Rate # 4 Total Lost Rate # Total Lost Rate # Total Lost Rate #
Throughput CC3 =
4)*100 4)*100 4)*100
Total Lost Rate # 4
Throughput CC1 +
(Throughput CC1/ (Throughput CC2/ (Throughput CC3/
Throughput CC2 +
Lost Rate # 5 Total Lost Rate # Total Lost Rate # Total Lost Rate #
Throughput CC3 =
5)*100 5)*100 5)*100
Total Lost Rate # 5
Turn-in
Write a report of your interactions and answer ALL the questions. Make sure to include
enough details to ensure we understand that you understand what is going on. For instance,
screenshots should probably be annotated to show where a number came from. Do not
assume that because you know how to read a Wireshark screen, we know that you know it.
Our graders will not make that assumption. So, prove it to us by describing/annotating
every value you nd from Wireshark.
Turn in your answers in a single PDF le and submit it to the Lab2 Assignment on
Gradescope.
In Gradescope, Map the questions to all the corresponding page(s) in your
document. Students who fail to map a question correctly will lose all the points
for that question.
Do not forget to save (and name) all your PCAP les for your future analysis14.
14For the PCAP les generated in the NUC of the testbed, please do not forget to fully delete them after nishing
your lab!