Homework 3
Assigned: Febuary 23, 2009
Due: March 4, 2009

1) Download install-ubuntu.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.11, [ns-dir]/ns-2.29, 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.11 ~/ns2-ubuntu/ns-2.29)". (If you use B shell, you just apply the same modification described above to ~/.bashrc instead of ~/.cshrc).

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

4) To compile, go to ns-2.29 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". Ignore the message "Nam syntax has changed: v -t 1 link-down 1 1 2 Please use this format in the future. v -t <time> -e <tcl expression>" when running example3.tcl.

7) Please submit the resulting trace files to TA before class on March 2. The files can be submitted using "turnin" command: "turnin --submit hanmi2 CS378_HW3 file1 file2", where "hanmi2" 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
http://www.isi.edu/nsnam/ns/tutorial/index.html
http://nile.wpi.edu
http://www.isi.edu/nsnam/ns/ns-tutorial/index.html

ns-2 Manual
http://www.isi.edu/nsnam/ns/ns-documentation.html

Tcl/Tk 8.4 Manual
http://www.scriptics.com/man/tcl8.4/

ns-2 Mailing List
http://www.isi.edu/nsnam/ns/ns-lists.html

ns-nam web page
http://www.isi.edu/nsnam/