cn »

Assignment 3 - Parking Lot

Goal

In this assignment, you will build another custom topology and learn about TCP congestion control. You’ll also learn about the TCP sawtooth and see how TCP works to share bandwidth across multiple flows [1].

Over 80% of peak traffic on the Internet is transmitted via TCP [2]. Therefore, it is important to understand how TCP’s congestion control helps prevent congestion collapse in networks. Congestion collapse occurs when packets use a large amount of bandwidth in one section of the network but are dropped at a downstream link. This means the network is congested at the downstream link and the senders must reduce their sending rate for packets to not be dropped. TCP’s congestion control responds to these packet drops and enables a congested section of the network to recover.

Overview

To explore congestion control, you will create the following topology for N = 1, 2, 3, 4, 5 at a link speed of 10 Mbps per link and a delay of 1 ms (note the 10 Mbps speed differs from the lecture video to ensure the topology runs smoothly on a virtual machine). You will then need to generate simultaneous TCP CUBIC flows using iperf, from each of the sender hosts to the lone receiver, and record the achieved throughput. Note that iperf defaults to TCP CUBIC so you do not need to set a command line option. A provided script will plot the time series of throughput vs time for each sender, for each experiment (N = 1, 2, 3, 4, 5).
Assignment-4-Topology-2.png

Directions

  1. Log in to your Mininet instance and change to the assignment-3 directory. Then install the following packages for this assignment:
    sudo apt-get -y install python-argparse
    sudo easy_install termcolor
  2. Update to the latest assignment code:
    git commit -a -m "Saving work"
    git pull --rebase
  3. Now open the parkinglot.py file. You will need to complete two functions within the file to complete the assignment. Both functions are marked with TODO comments for your convenience.
  4. Complete the __init__ function of the ParkingLotTopo class. The class defines the topology used in the assignment. The framework code creates a parking lot topology for N=3. Your task is to generalize it for any N >= 1.
  5. Complete the run_parkinglot_expt function. The function generates TCP flows between the senders and the receiver using iperf, and monitors the throughput of each flow. Your task is to start and stop iperf for the additional senders in the topology.
  6. To verify your topology code works correctly use the following command: (without the '<' and '>' sudo python parkinglot.py --bw <link_bandwidth> --dir <output_dir> -t <expt_duration> -n <n>
  7. When you’re confident your code works correctly, run parkinglot-sweep.sh to generate a set of plots and the necessary log files: sudo ./parkinglot-sweep.sh
    Observe how the cwnd.png shows the congestion window size for TCP changing over time and the rate.png plot shows the bandwidth across the switches over time.
    You can view the log files and plots using the Python web server and navigating to http://ip_address:8000: python -m SimpleHTTPServer
  8. Please answer the quiz questions below in a file quiz2.txt. Answers should be of the format 1. X where X is the answer.
  9. To complete the assignment, submit your topology file, quiz answers, and the bwm.txt files, which contains the bandwidth measurements, for each of N = 2, 3, 4, and 5 on T-Square. Rename each bwm.txt file bwmN.txt, so for N = 2, you should submit bwm2.txt.

Quiz questions

Quiz questions are located on T-Square as a PDF attachment. Use the same format as in Assignment 2.

Rubric

This rubric is here to help you understand the expectations for the assignment. It is the same rubric that the person evaluating your project will use. We recommend you look at the rubric before you begin working on your project and again before you decide to submit it.

CriteriaDoes Not Meet ExpectationsMeets Expectations Exceeds Expectations
Parking lot code
Complete the topology as described in steps 3 and 4.The topology is not generalized for N >= 1. The iperf flows are not started between the receivers and host.The topology is generalized for N >= 1 and the iperf flows are correctly started.There is no “Exceeds Expectations” option for this criteria.
Topology bandwidth output
Output looks reasonable.Output does not pass the sanity check when it is submitted. The bandwidth logs do not show equal share of bandwidth between flows.Output does pass the sanity check. The bandwidth logs show the hosts sharing an equal share of the total bandwidth.There is no “Exceeds Expectations” option for this criteria.

Notes

[1] Based on CS 244 assignment.
[2] Sandvine Global Internet Phenomena Report, Fall 2011. TCP is largely video over HTTP (along with some web browsing and P2P.) BitTorrent over uTP and UDP accounts for the bulk of UDP traffic.