ns-2 Simulator Information
ns-2 installation steps
-
You can access your work directory of ECE498nhv by typing 'ece498nv' (please note it's "nv" not "nhv") at any EWS UNIX prompt.
-
Create a new directory to install ns-related
software. Make sure that you are in this directory,
and download the ns-2 installation script
there.
-
Set the script file permission to executable and run the script. You can use the following commands:
chmod +x install-linux.sh
./install-solaris.sh
- The installation script will create the ns-2
directory tree with everything linked to the original ns-2 files
installed at a location mentioned in the script
(Usually at /home1/e/ec/ece/ece498nv/ns/ns-allinone-2.28).
-
To setup your working environment, you need to add
[ns-directory]/nam-1.11 and [ns-Directory]/ns-2.28 to the environment
variable PATH. For example, if you
are using csh, and ns-2 is installed under the directory
/work1/ece498nv/[LoginName]/ns2-linux/, you can edit ~/.cshrc file and
add the following command at the end of
file.
NB: For some students, the ece498nv directrory is created in a different
location. Please use "pwd" in the location where ns2-linux is to know the
exact path. Usually you should ignore the leading "/nmnt/" in the reported
location. For example, if the output of "pwd" is "/nmnt/work2/ece498nv/[LoginName]",
the path to add would be "/work2/ece498nv/[LoginName]/ns2-linux/nam-1.11"
"/work2/ece498nv/[LoginName]/ns2-linux/ns-2.28" etc. (notice that the leading
"/nmnt" is removed).
set path=($path /work1/ece498nv/[LoginName]/ns2-linux/nam-1.11 /work1/ece498nv/[LoginName]/ns2-linux/ns-2.28)
-
For the change of environment settings to take
effect, run the following command
source ~/.cshrc
-
You can now proceed with any changes to the source
in your directory. To make changes to an existing file (say
tcp-reno.cc) you will have to
first delete the link from your ns-2 directory, copy the file from the
original source into your ns-2 directory and then work on it.
-
After you are done with your changes, run "make" and a new ns will be
created in your ns-2 directory. Use this to run your tcl scripts.
ns-2 Links
ns-nam web page
http://www.isi.edu/nsnam/
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
Marc Greis Tutorial
http://www.isi.edu/nsnam/ns/tutorial/index.html
Another tutorial with some more examples
http://nile.wpi.edu
Tutorial slides from the ns-2 folks
http://www.isi.edu/nsnam/ns/ns-tutorial/index.html