Due: See class webpage.
We will evaluate the following flavors of TCP:
on the given network topologies.
There is an FTP/TCP flow from A1 to D1 and another from A2 to D2.
Note that the propagation delay from A1 to D1 is almost twice as large as the propagation delay from A2 to D2.
Use packet length of 1250 bytes.
Set the window_ variable for all TCP agents to 100000 to ensure that the receiver window size does not become a bottleneck.
Plot the congestion windows (0.1 sec increment) for both the flows as a function of time on the same graph.
Plot the throughput (1 sec increment) for both the flows as a function of time on the same graph.
Compute the average throughput for each flow and enter in a provided answer HTML page.
The NS program should be named hw5.tcl and must accept 2 input parameters:
ns hw5.tcl TCP-TYPE-1 TCP-TYPE-2 |
You can obtain the parameter TCP-TYPE-1 with
set param1 [lindex $argv 0] |
and the parameter TCP-TYPE-2 with
set param2 [lindex $argv 1] |
Use the following command to create a TCP agent of type TCP-TYPE-1 and a TCP agent of type TCP-TYPE-2:
set tcp1 [new Agent/TCP/$param1] set tcp2 [new Agent/TCP/$param2] |
Connect the tcp1 to node A1 and its sink to node D1. Connect the tcp2 to node A2 and its sink to node D2. This way, you don't need to write 4 seperate NS programs and you can run the 4 different experiment using the following 4 commands:
Experiment 1: ns hw5.tcl Reno Reno Experiment 2: ns hw5.tcl Vegas Vegas Experiment 3: ns hw5.tcl Reno Vegas Experiment 4: ns hw5.tcl Vegas Reno |
[open "| grep r > out.tr" w] |
instead of the "traditional" way: [open "out.tr" w]
The "grep" command will filter out the "r" line (receive events) which are the only lines in the trace file that is useful in computing the throughput. This way, you generate a lot less output data.
You must fill in the throughput values for each of the flows.
You must make the following plots:
Make sure your answer webpage is viewable using the following URL:
file:///home/YOURID/cs558/hw5/hw5-ans.html |
/home/cs558000/turnin hw5.tcl hw5 |