CS641 Assignments

Instructions

  1. This assignment is to be done in groups of 2 only, unless you have specifically taken permission from me otherwise.
  2. This page contains two problem statements. Each group has to solve only one problem. Which problem you have to do is not your choice, but as per the assignment made by the TAs.
  3. Absolutely no copying or discussion across groups for the assignment. Take this very seriously. We will be strict with dishonesty.
  4. The deadline of submission is Wed 02 Oct 2008, 4pm Sun 28 Sep 2008, 5pm (Holiday 4pm will ensure that you do not miss sleep or classes to complete the assignment). The deadline is a hard deadline, do not ask for extensions unless you have a very valid reason.
  5. Late submissions will be penalized.
  6. Numbers under a problem indicate tasks.
  7. You may choose to use gnuplot for plotting graphs.
  8. The best way to get familiar with NS3 is to comprehend the NS3 tutorial. It contains all the instructions as to how to download-install NS3 and run programs along with logging-tracing features.
  9. The topology, explained below, is common to both the problems.

Network Topology

Consider a link between two routers R1 and R2 with bandwidth 5 Mbps. R1 has two hosts H1 and H2. Similarly R2 has H3 and H4. Link between host to router has bandwidth of 10Mbps. All queuing is drop tail and queue size at R1 and R2 is X (say 30) number of packets (Queue sizes are same at both routers). Each packet is of B(say 1024) bytes.

You can look at the ns3 built-in UDP client/server programs to learn you can build similar TCP client/server programs. Packets are to be generated as fast as possible (you can also try Poisson packet generation for additional work).

Problem 1: TCP Traffic Analysis

For this problem, you can have three flows between H1-H3, H1-H4 and H2-H4 (H1 and H2 as sources).

  1. Build the topology.
  2. First start any one flow and measure the effective throughput over a sufficiently long duration. Mention how you chose this duration.
  3. Next, start all the flows and measure the throughput of each flow again. What is the maximum throughput a flow can achieve? Is TCP fair?
  4. For each flow, measure also the congestion loss over the duration of the experiment.
  5. For above experiment, plot a graph of congestion window versus (discrete intervals of) time for each of the flows. How did you choose the discrete interval of time?
  6. Now, with the setting of three flows in progress, select a flow and vary its sender/receiver window size (keeping at all times sender window size = receiver window size) keeping the sliding window size of other flows constant. Measure the throughput and packet loss rate of each of the flows now. Plot the graph of the throughput versus the sender/receiver window size. Plot also a graph of the congestion loss versus the sender/receiver window size. Does there exists an optimal window size?
  7. Halve the queue size at R1 and repeat task 5. Explain what you observe.

Problem 2: Comparing TCP Tahoe and Reno

For this problem, you can have two flows between H1-H3 and H2-H4 (H1 and H2 as sources).

  1. Build the topology.
  2. Study the source code of TCP implementation with congestion control scheme. Modify the code to implement TCP Tahoe and Reno flavors. (Tahoe = only slow start and congestion avoidance, Reno includes fast retransmit and fast recovery).
  3. For TCP Tahoe, repeat tasks 2, 3, and 5 of problem 1 (in tasks 3 & 5, you will now have only two flows instead of three).
  4. Now repeat the same for TCP Reno.
  5. From the above results, compare Tahoe and Reno in terms of throughput and fairness. List out your observations, and explain them.

What to Submit/Upload?

  1. Submit all the source code files which you have created or modified, including any scripts which you wrote to process any output.
  2. Submit all the generated graphs as a suitable image or eps format.
  3. Submit a README file, where you answer each of the questions/tasks. You may refer/cite the source code or graph file in the README at the appropriate places.

NOTE: All graphs must be readable. An unreadable graph is as bad as not submitting it. Make sure that you have suitable labeling & units for the axes in your graphs. You will be penalized strictly for missing graph labels/units.

How to Submit?

  1. Create a fresh submission directory named ABC-XYZ, where ABC and XYZ are the two students' roll numbers.
  2. The directory should contain all the relevant files to be submitted, and only the relevant files (do not put irrelevant output files or old code files in this directory).
  3. Double check that you have all and only the relevant files.
  4. Triple check that you have all and only the relevant files.
  5. Create a single tar.gz file from the parent directory of the above directory using a command such as “tar zcvf ABC-XYZ.tgz ABC-XYZ/”. The tar.gz or tgz file should be named with your roll numbers, just like your directory.
  6. Where to upload: The upload link is up on moodle. Upload only once. Anyone of the group members can upload. Keep this format: rollno1_rollno2.tar.gz.

public/courses/cs641-autumn08/ns3-assignment.txt · Last modified: 2009/06/25 20:11 (external edit)