These are ns-2 simulation scripts to accompany the paper "An Analytic Throughput Model for TCP NewReno" by Khandoker Nadim Parvez, Anirban Mahanti, and Carey Williamson. These scripts can be used to recreate the simulation results in Section IV of the paper. The scripts use ns2.28. Preparing ns2: -------------- 1. Download and install ns2.28 (ns2-allinone-2.28.tar.gz) 2. Go to the directory ns2/ns-allinone-2.28/ns-2.28/tcl/lib and replace ns-default.tcl with the new ns-default.tcl 3. Go to the directory ns2/ns-allinone-2.28/ns-2.28/tcp and replace tcp.h, tcp.cc, tcp-reno.cc, and tcp-newreno.cc with the new versions of these files. 4. Go to the directory ns2/ns-allinone-2.28/ns-2.28 and issue the 'make' command to rebuild the ns executable. Now, ns2 is ready for running the scripts. Running the scripts: ------------------- 1. Choose a directory to run your experiments. 2. Copy the new ns executable to this directory (or link to ns). 3. Copy the http.tcl scenario file to the desired directory. 4. Copy a script such as runH.pl to this directory, and type './runH.pl' at the command line prompt, or use './runall.sh' to run all the scripts. The simulation experiment runs, and the output is placed in the file 'sim.data'. Parsing information for 'sim.data': ----------------------------------- Some important fields in the 'sim.data' are as follows: bnqueue = Bottleneck queue size NRer2 = NewReno loss event rate NRlrL = NewReno packet loss rate measured from the link NRlr = NewReno packet loss rate measured from the source NRrtt = NewReno RTT NRtpmbps = NewReno throughput in Mbps Rer = Reno loss event rate Rlr = Reno packet loss rate measured from the source RlrL = Reno packet loss rate measured from the link Rrtt = Reno RTT Rtpmbps = Reno throughput in Mbps The simulation throughput values can be extracted for plotting. The loss event rate, packet loss rate, and RTT values can be extracted to feed into analytical models for PFTK and NewReno (e.g., C program, Excel spreadsheet, maple script). The analytical throughput values can then be plotted as well.