CS625, Fall 2003, Assignment-2


Brief Overview and Background

In this assignment you will be examining the performance of multiple TCP connections over a bottleneck link. You will use ns-2, as in assignment-1. It has been installed in the cs625 account. To use ns, set your shell PATH variable to include "/3u3/course/cs625/ns-allinone-2.26/bin".

The NS documentation is available at "/3u3/course/cs625/doc/ns_doc.pdf". There is a TCL reference book at "/3u3/course/cs625/doc/part1.pdf" and "/3u3/course/cs625/doc/part2.pdf", in case you need it.

The Topology

For your exercises, you will be creating the following simple dumbbell topology, so called due to its shape.

There are "n" nodes on either side, and two other nodes in the middle. You will use different values of the parameter "n" in different simulations. All links have the same capacity: 1Mbps (in ns-2 this would be 1,000,000 bits-per-second), and the same latency: 10ms. Use DropTail (FIFO) queuing for all the links (like in your first assignment).

Note: Do not use any restrictions on the queue size, and apart from everything mentioned here, leave everything to be the default value.

The Traffic

There will be "n" TCP connections. TCP connection i will be between nodes Ai and Bi. There will be "n" FTP connections, one on top of each TCP connection. Start the connections all at time 0.5 seconds, and terminate them all at 10.5 seconds. Also terminate the simulation itself at 10.5 seconds.

Questions [Total: 10 marks]

  1. Consider a topology with "n" being 1, and thus just a single TCP connection.
    1. What is the median packet inter-arrival time at the TCP receiver? (For this, consider only those pairs of packets with adjacent sequence numbers received one after another at the receiver.) (Note that you are asked for the median value, not the average). [1 mark]
    2. Explain the above median value in terms of the packet size and the bottleneck bandwidth. [1 mark]
    3. For each sequence number N received at the receiver, calculate the inter-arrival time with respect to the previous sequence number (as above, consider only those pairs of packets with adjacent sequence numbers received one after another at the receiver). Plot a graph of the inter-arrival time as a function of the sequence number, for the first 100 sequence numbers. Submit this graph named as ia-q1.jpg (or any other appropriate UNIX readable format). (You do not have to write anything in ans.txt for this part). [1 mark]
    4. Explain the above graph briefly (4-5 sentences max). [1 mark]
  2. Now consider a topology with "n" being 2, and thus two TCP connections.
    1. Calculate the average and the standard deviation (not variance) of the inter-arrival time, for each of the two TCP connections. [0.5 marks]
    2. Compare the average inter-arrival time in the above answer, with the average inter-arrival time in the "n=1" case (the previous question). [0.5 marks]
  3. Now consider a topology with "n" being 3, and thus three TCP connections.
    1. For each of the TCP connections, calculate the average and standard deviation of the packet inter-arrival times. [0.5 mark]
    2. Plot a single graph, but with three plots within it -- each plot corresponds to the inter-arrival time versus sequence number plot for a TCP connection (just as in the first question). Plot this just for the first 100 sequence numbers, as earlier. Submit this graph as ia-q3.jpg (or an appropriate extension -- in a UNIX readable format). (There is nothing to write in ans.txt for this part of the question). [1 mark]
    3. Explain the above average and standard deviation, as well as the graph above. Explain with respect to what you found in the "n=1" and "n=2" cases. (6-7 sentences max). [1.5 marks]
  4. Now, make the X-Y link use a WFQ queuing discipline, instead of a DropTail (FIFO) discipline. (For this you simply have to replace the word DropTail with WFQ, for the X-Y link -- do this just for the X-Y link). Repeat the above run with "n=3".
    1. What is the standard deviation of the inter-arrival time for each of the three TCP flows? [0.5 marks]
    2. How does this compare with what you found in the DropTail case with "n=3" and why? (2-3 sentences max) [0.5 marks]
    3. Submit your code in the name q4.tcl just for this part (no marks :-) (I probably won't look into this code unless I find something weird in your submission).
  5. In both the DropTail case and the WFQ case, for "n=3", compute the last successfully received sequence number for each of the three TCP connections (this is indicative of the throughput received by each of the TCP flows). Compare what you find in the two cases DropTail and WFQ and give a short reasoning for what you find. (4-5 sentences max). [1 mark]

Checklist before submission

In ans.txt, you should have answers for:

1(a), 1(b), 1(d)
2(a), 2(b)
3(a), 3(c)
4(a), 4(b)

In the a2-xyzabc directory, you should have (only):


Some suggestions/hints

Here are some steps I followed while working out this assignment. I don't necessarily expect you to follow the same steps, but if you do, it will hopefully be very easy to go through the assignment.

Bhaskaran Raman
Last modified: Fri Oct 10 22:54:36 IST 2003