Due: November 10 (By 11:59pm)


The original design of the Transmission Control Protocol (TCP) worked reliably, but was unable to provide acceptable performance in a large and congested network. Several TCP variants have been proposed since then (TCP Tahoe, Reno, NewReno, Vegas and SACK) with mechanisms to control and avoid congestion. The objective of this homework is for you to analyze the performance of these different TCP variants.  You will use the NS-2 network simulator to perform experiments that will help you understand the behavior of the TCP variants under various load conditions and queuing algorithms. We assume that you have familiarized yourself with NS-2 in the past weeks with the help of the sample homework.

Another objective of this assignment is for you to practice performance evaluation. In order to perform a complete analysis of the TCP variants, you should first review the ‘parameters, factors and metrics’ lecture. You can also inspire yourself from the "Simulation-based Comparisons of Tahoe, Reno and SACK TCP" paper to understand what type of analysis you are required to do.


In this assignment, you will analyze the performance of four TCP variants (Reno, NewReno, Vegas, and SACK) under the influence of various load conditions and queuing algorithms. In the first part of the assignment, you will perform experiments that analyze fairness between these TCP variants in the presence of a Constant Bit Rate (CBR) flow.  In the second part of the assignment, you will understand the behavior of the TCP variants under the influence of two different queuing disciplines (DropTail and RED). 

Part 1 - Fairness between the TCP variants

To study the behavior of the four TCP variants, you need to first set up a network topology. Use the following topology with 10Mbits on all links.

Add a CBR source at N2 and a sink at N3. Next, add two TCP streams from N1 to N4 and N5 to N6. Graph the average packet loss rate and the average bandwidth used by all three flows as a function of the bandwidth used by the CBR flow. That is, the CBR flow is the parameter you need to vary for this experiment. You must repeat the experiment using the following TCP variants (one variant creating traffic from N1 to N4, and the other creating traffic from N5 to N6):

Next, remove one TCP stream and analyze how a single flow of each TCP variant reacts to an increasing CBR flow. Perform the experiments with Reno, NewReno, Vegas, and SACK.

Part 2 - Influence of Queuing

Queuing disciplines like DropTail and Random Early Drop (RED) are algorithms that control how packets in a queue are treated. Instead of varying the rate of the CBR flow, we will now study the influence of the queuing discipline used at the node on the overall throughput. Use the same topology and replace one of the TCP flows with a CBR/UDP flow. First, start the TCP flow. Once the TCP flow is steady, start the CBR source and analyze how the TCP and CBR flows change under the following queuing algorithms: DropTail and RED. Perform the experiments with TCP Reno and SACK. Answer the following questions for Reno and for SACK:

  1. Simulate the following scenario under two queuing algorithms: One TCP flow (test with Reno and SACK) sending 1000 bytes packets, and one UDP flow sending 500 bytes packets at a rate of 1 Mbps. The middle link they are sharing is a 1.5Mbps link. How do results change? Why?

  2. Consider three UDP flows sharing a 1.5 Mbps link: The first two UDP flows are sending 1000 byte packets at 1 Mbps, and the last UDP flow is sending 500 byte packets at 0.6 Mbps. Assume that the flows start sending at 0sec, 0.1sec, and 0.2sec, respectively. Plot the throughput of all three flows. Explain the results. Measure the average packet latency (end-to-end delay) for the packets for different flows and plot it. How does it differ between DropTail and RED?

  3. Does each queuing discipline provide fair bandwidth to each flow? How does the TCP flow react to the creation of the CBR flow? Is RED a good idea while dealing with SACK?


To prepare you to complete this assignment, you should write scripts that parse the trace files and enable you to report average bandwidth, packet drops, throughput, end-to-end latency, sequence numbers of packets sent, and TCP congestion window of any flow. You will use these scripts to extract the information you will need to answer the above questions. You need to understand the format of the TCP output file to successfully write these scripts.


This homework assignment is due by 11:59pm on October 30. Late homework will not be accepted.

The assignment should be submitted as an email attachment. The email should be sent to gayatri@cs.ucsb.edu with a subject of "276 hw3" (without quotes). The attachment should be a single pdf file called "<filename>.pdf". The <filename> should be your LAST NAME only (For example: harras.pdf if you were Khaled Harras!).

Your pdf file should include: 

  1. A write-up that describe your methodology and observations. Avoid verbose discussion of the results. Additional results, insight, and analysis of the results, however, are strongly encouraged.

  2. Submit graphs that are relevant to your analysis of the TCP variants. Be selective in your graph submission. Submit only those graphs that convey a point you are trying to make. Graphs are to be plotted using xgraph or gnuplot only. Avoid printing one graph per page. Logical organization of content (text and graphs) is expected!

  3. Submit your TCL scripts. You can use the OpenOffice.org Writer to convert your scripts and text files to pdf format.

Grading Guidelines

You will be graded on the quality of the scripts and on the quality of your research, including your findings, explanation and presentation of your findings. Each part of the homework assignment is worth 50 points.

Cheating Policy

This assignment is to be done individually. Cheating will not be tolerated. Please read the UCSB Academic Code of Conduct to find out more about Student Conduct and Discipline. Of particular relevance to this assignment is the need to properly cite material you have used. Failure to do so constitutes plagiarism.