Homework 3
Assigned: Febuary 11, 2014
Due: Febuary 25, 2014

1) Download install.sh and run it in a directory where you want ns installed. This creates ns directory and set up soft links to the master copy of ns.

2) Add [ns-dir]/nam-1.15, [ns-dir]/ns-2.35, and [ns-dir]/bin to the PATH environment variable in your ~/.cshrc file. For example, if your ns is installed at ~/ns2-ubuntu, update .cshrc to "set path=($path ~/ns2-ubuntu/bin ~/ns2-ubuntu/nam-1.15 ~/ns2-ubuntu/ns-2.35)". (If you use B shell, you can use "export PATH=$PATH:~/ns2-ubuntu/ns-2.35/bin:~/ns2-ubuntu/nam-1.15:~/ns2-ubuntu/ns-2.35" in ~/.bashrc instead of ~/.cshrc).

3) After modification, then run "source ~/.cshrc" or "source ~/.bashrc".

4) To compile, go to ns-2.35 run make.

5) Please read Section I - VI in this ns tutorial .

6) Download example2.tcl and example3.tcl and run "ns example2.tcl" and "ns example3.tcl".

7) Please submit the resulting trace files to TA before class on Febuary 20. The files can be submitted using "turnin" command: "turnin --submit apurvb CS356R_HW3 file1 file2", where "apurvb" is the grader id, "CS378_HW3" is the homework id, and "file1 file2" are the files to be submitted.

Note: If you want to make changes to an existing file, please first delete the soft link and copy the file from the original source to your ns-2 directory and modify the file. You can compile the new ns by running "make" in ns-2 directory.

ns-2 Links

NS Tutorial

ns-2 Manual

ns-2 Mailing List

ns-nam web page