Lab: Reliable Transport

In this lab, you will write a reliable transport protocol that uses cumulative ACKs, sliding window, and a retransmission timer, similar to TCP. You will use the simulator to examine the efficiency achieved by different window sizes.

Simulator

I have modified the Bene simulator to include transport connections between two hosts, along with a Stop-and-Wait transport protocol. You can use

git pull

to update your code. Please see the Bene Wiki for documentation of the current code.

TCP

Implement reliable transport using TCP as your model. This should include the following features:

Testing

Use the simulator to set up a simple network consisting of two nodes and and one bidirectional link:

network

Note that to do this in the simulator, you must create a unidirectional link from n1 to n2, and another one from n2 to n1.

Using this network, test the following scenarios:

  1. Set the bandwidth of the links to 10 Mbps, with a propagation delay of 10 ms. Transfer the file test.txt from n1 to n2 using a window size of 3000 bytes. Repeat this test, with loss rates of 0%, 10%, 20%, and 50%.

  2. Set the bandwidth of the links to 10 Mbps, with a propagation delay of 10 ms. Transfer the file internet-architecture.pdf from n1 to n2 using a window size of 10000 bytes. Repeat this test, with loss rates of 0%, 10%, 20%, and 50%.

Write a separate Python script for each of these tests, where the loss rate is passed in on the command line. The script should output traces from your TCP implementation demonstrating that it works well, and it should run a diff to ensure the file is transferred correctly. Use the transfer.py script as an example.

Experiments

Using the same network configuration as above, set the bandwidth of the links to 10 Mbps, with a propagation delay of 10 ms, a queue size of 100 and a loss rate of 0%. Transfer the internet-architecture.pdf file using window sizes of 1000, 2000, 5000, 10000, 15000, and 20000 bytes. Compute the throughput of the transfer as the total bits sent divided by the total time to send the file, measured from the start of the simulation to when the last segment is received. Compute the average queueing delay of all segments sent. Plot the throughput and the average queueing delay as a function of the window size, on two separate graphs.

Report

Write a report that includes the following:

Write using a formal, scientific report style. Your report should be written as if you are explaining your work to another CS student, and they need all of the details of what you did so that they can replicate your experiments.

Your report can be any length, as long as you thoroughly describe your project and results. The paper must use 11 point type, single spacing, and one column per page.

You must use LaTex to write your report. You can use this template for your report. To help you learn LaTeX, I suggest using the WikiBooks LaTex reference.

Submission

Your code should be located in a directory called lab2 in the top level:

bene/
  src/
  examples/
  lab2/

Turn in a tarball that includes all of your code (for the simulator, experiments, graphing, etc), and a PDF of your report:

tar -czvf bene.tgz bene

using Learning Suite.

Grading

This lab is worth 200 points, and will be graded using the following rubric:

To get full points, all tests must pass and the report must be complete and written with a scientific style.