CSEP 561: Network Systems, Winter 2020
  CSE Home   About Us   Search   Contact Info 
Home
Overview
Canvas
    Project 3: TCP and Bufferbloat
Turnin: Online

Project Overview.

In this project, we will use Mininet to study the dynamics of TCP and the bufferbloat phenomenon.

  • First, you need to complete the TODO fields in the skeleton code of our experiment framework.
  • Then, you will generate experiment results using the framework, and answer the questions listed later in this document.

Background.

For general background on Bufferbloat, look at the following article: BufferBloat: What's Wrong with the Internet? This project runs in the same virtual machine we used in project 1 and project 2. See project 1 if you need a refresher on how to work with the Mininet environment.


Introduction

In this project we will study the dynamics of TCP in home networks. Take a look at the figure below which shows a “typical” home network with a Home Router connected to an end host. The Home Router is connected via Cable or DSL to a Headend router at the Internet access provider’s office. We are going to study what happens when we download data from a remote server to the End Host in this home network.



In a real network it’s hard to measure cwnd (because it’s private to the server) and the buffer occupancy (because it’s private to the router). To ease our measurement, we are going to emulate the network in Mininet.


Goals
  • Learn first-hand the dynamics of TCP sawtooth and router buffer occupancy in a network.
  • Learn why large router buffers can lead to poor performance. This problem is often called “bufferbloat.”
  • Learn how to use Mininet to create network topologies, run traffic generators, collect statistics and plot them.
  • Learn how to package your experiments so it’s easy for others to run your code.

Assignment

Download Instructions

Download the skeleton code into the home directory of your virtual machine and run tar -xzf project3.tgz. This will extract the skeleton code to the bufferbloat directory. In order to test webpage fetch time and make plots, you also need to install curl and matplotlib by running the following commands:

sudo apt update
sudo apt install -y curl
sudo apt install -y python-matplotlib

Look for TODOs in the skeleton code. The following are important files you will find in the repository. Ignore other files.

FilePurpose
bufferbloat.pyCreates the topology, measures cwnd, queue sizes and RTTs and spawns a webserver.
plot_queue.pyPlots the queue occupancy at the bottleneck router.
plot_ping.pyParses and plots the RTT reported by ping.
plot_tcpprobe.pyPlots the cwnd time-series for a flow specified by its destination port.
run.shRuns the experiment and generates all graphs in one go.
READMEWhere you will write the instructions of the scripts and answers to the questions.


Tasks

Within Mininet, create the following topology. Here h1 is your home computer that has a fast connection (1Gb/s) to your home router with a slow uplink connection (1.5Mb/s). The round-trip propagation delay, or the minimum RTT between h1 and h2 is 20ms. The router buffer size can hold 100 full sized ethernet frames (about 150kB with an MTU of 1500 bytes).



Then do the following:

  • Start a long lived TCP flow sending data from h1 to h2. Use iperf.
  • Start back-to-back ping train from h1 to h2 10 times a second and record the RTTs.
  • Plot the time series of the following:
    • The long lived TCP flow’s cwnd
    • The RTT reported by ping
    • Queue size at the bottleneck
  • Spawn a webserver on h1. Periodically download the index.html web page (three times every five seconds) from h1 and measure how long it takes to fetch it (on average). The starter code has some hints on how to do this. Make sure that the webpage download data is going in the same direction as the long-lived flow.
  • The long lived flow, ping train, and webserver downloads should all be happening simultaneously.

Repeat the above experiment and replot all three graphs with a smaller router buffer size (Q=20 packets).


Questions

Include your answers to the following questions in your README file. Remember to keep answers brief.

  1. Why do you see a difference in webpage fetch times with short and large router buffers?
  2. Bufferbloat can occur in other places such as your network interface card (NIC). Check the output of ifconfig eth0 on your VM. What is the (maximum) transmit queue length on the network interface reported by ifconfig? For this queue size, if you assume the queue drains at 100Mb/s, what is the maximum time a packet might wait in the queue before it leaves the NIC?
  3. How does the RTT reported by ping vary with the queue size? Write a symbolic equation to describe the relation between the two (ignore computation overheads in ping that might affect the final result).
  4. Identify and describe two ways to mitigate the bufferbloat problem.

Deliverables
  • Final Code: Remember one of the goals of this assignment is for you to build a system that is easy to type run to reproduce results. Therefore, your final code MUST be runnable as a single shell command (“sudo ./run.sh”). We will test your code in the same setup.
  • README: A file named README with instructions to reproduce the results as well as the answers to the questions in the previous section. Please identify your answers with the question number, and please keep your answers brief.
  • Plots: There should be 6 plots in total, 3 each for router buffer sizes 100 and 20 packets. They MUST have the following names and be present in the top level directory of your submission folder.
    • buffer-q100.png, cwnd-q100.png, rtt-q100.png.
    • buffer-q20.png, cwnd-q20.png, rtt-q20.png.

Notes

Do not run the starter code unless you fill in code to create a topology in the class BBTopo. Otherwise, it will fail.

When running the curl command to fetch a web page, please fetch webserver_ip_address/http/index.html.

If your Mininet script does not exit cleanly due to an error (or if you pressed Control-C), you may want to issue a clean command sudo mn -c before you start Mininet again.


Turn-in
When you're ready to turn in your assignment, do the following:
  1. Archive all the materials (bufferbloat folder and everything in it) in a single .tar file named netid.tar.
  2. Submit the netid.tar file to Canvas.

Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 fax
[comments to kheimerl at cs.washington.edu]