Lab: Congestion Control Part 1

In this lab, you will add congestion control to your reliable transport protocol. You will use the simulator to examine the correctness of your implementation.

TCP Tahoe

Implement congestion control using TCP Tahoe as your model. This should include the following features:

Likewise, when setting the threshold to half the previous cwnd, subtract off any bytes that are in excess of a multiple of MSS.


I have added graphing capabilities to Bene and provided a script that plots several useful graphs for TCP. Please pull and merge in this new version.

The new functionality in includes a method called Sim.plot():

def plot(filename, message):

I have modified TCP to use this functionality to output a file called sequence.csv that can be used to plot a sequence number graph:

def plot_sequence_header(self):
    if self.node.hostname =='n1':
        Sim.plot('sequence.csv','Time,Sequence Number,Event\n')

def plot_sequence(self,sequence,event):
    if self.node.hostname =='n1':
        Sim.plot('sequence.csv','%s,%s,%s\n' % (Sim.scheduler.current_time(),sequence,event))

This functionality is used throughout to add events to this file for 'send', 'drop', and 'ack' events. In addition, has been modified to add events for 'transmit' events.

I have also modified TCP to allow you to pass in a list of sequence numbers that will be dropped the first time these packets are sent.

Finally, I have provided a script called in the examples directory to plot both the congestion window over time and the sequence number graph seen in the TCP SACK paper.


Set up a one-hop network with a bidirectional link having a bandwidth of 1 Mbps and a latency of 100 ms. Transfer the internet-architecture.pdf file in the examples directory.

Use the following series of tests to demonstrate that your congestion control algorithm works properly. Use a congestion window graph and a sequence plot graph to verify the correct behavior in each case.

Note that your sequence graphs should match the SACK paper.


Write a formal, scientific report that describes each of your tests. Include your graphs in your report and discuss whether you got the expected results.

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.

Your report must match the LaTex style shown in this template. If you choose to use LaTeX, I suggest using the WikiBooks LaTex reference.


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

 bene/ src/ examples/ lab3/ 

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.


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

To get full points, all experiments must work well and the report must be complete and written with a scientific style.