3: The last question uses the ns simulator to explore a problem similar to a problem on the midterm: how does TCP behave if different packets are lost?
The TA will place the ns script "hw2.tcl" on her web page. That script simulates a very simple network of four nodes (n0, n1, n2, n3) in a row, with a TCP connection going from n0 to n3. The TCP connection is configured to send a exactly 8 packets.
The program has an "error module" placed on the n1-n2 link that will drop the packets specified in the $em droplist NUMBER command. (NUMBER is the packet number to drop, starting from 0.)
First, modify the program so that the TCP source starts at the time of your student id mod 10. (I.e., if your student id is 123-45-6789, make it start it time 9.) Now run the script through ns (see the TA's web page for the details about how to run ns) and look at the output in nam (it should start automatically from the ns script). Look at both the animation and the time-sequence plot. (To display the time-sequence plot in nam, choose "active session" under the analysis menu. It will open a "sessions" window. Then click on "TCP session between node 0.0 and node 3.0". A graph should pop up, you can then click and drag regions in the graph to zoom.)
Nam is helpful at showing what's happening, but you should also confirm your answer by looking in the .tr file. Two warning about bugs in nam: 1) in nam's time-sequence plot you can see the packet time and number by passing the mouse over the point. Although the packet number is correct, the time is not correct|nam incorrectly reports the time of the mouse location rather than the packet. 2) nam t-s plot scaling is not very good, so the first and last packet are exactly on the edge of the display and so are hard to see.
a) What is your student id, and when does your TCP flow complete? (Define completion as the last data packet being successfully received at the destination.)
Now modify the program to drop packet #3. Since packets are numbered from 0, this is actually the 4th packet. (Hint: dropping requires only a change to one line.) Re-run the program and observe the results.
b) Now when does the TCP flow complete? c) What action did TCP take?
Now modify the program to drop packet #6. (Clarification 2-Apr-02: drop only packet #6, not both packet #3 and #6.) Since packets are numbered from 0, this is actually the 7th packet. (Correction 25-Mar-02: originally the HW erroneously said this was the 5th packet.) Re-run the program and observe the results.
d) Now when does the TCP flow complete? e) What action did TCP take?