Using NS Simulator
Installations:
- NS
is installed in minix.cs.stonybrook.edu at /usr/local/src/nsintall/ns-allinone-2.30/ns-2.30.
No need to install it yourself. You can run ns off from this installation.
- You
can remotely ssh to minix
to run NS.
- Add
/usr/local/src/nsintall/ns-allinone-2.30/bin to your path. This means
issuing simple commands like
set path = ($path /usr/local/src/nsintall/ns-allinone-2.30/bin);
Assuming you are using csh, add these lines to
your .cshrc file in your home directory
If you are using bash, then add the following to your .bash_profile
or .bashrc file
export PATH=$PATH: /usr/local/src/nsintall/ns-allinone-2.30/bin;
- NS
is run as "ns my_simulation.tcl"
where the my_simulation.tcl is the simulation
script. By default, the trace file is created in your current directory.
- Quite
a few scripts are available in the ns-tutorial/example directory in the NS
installation. Look them up for examples. Copy those example files to your
local directory and run ns "script filename"
- Note
that the network animator
NAM
uses X-windows. If you are working remotely, you need to have a remote
display. If you are using a MS windows machine to ssh
to minix, you will need to use a X server on
your machine. If you are a CS graduate student, we have licenses for some
X servers. Download from the single-sign
on site.
Manual and tutorials:
- NS
Simulator for Beginners, by Eitan Altman,
Tania Jimenez (an excellent tutorial).
- NS
by Example, by Chung and Claypool, RPI (easy intro, the example script
was used in the class, start here).
- Marc
Greis's tutorial (quite popular and easy reading as well)
- NS
Manual (the most definitive manual, though not everything is really
documented, use this on-demand)
- The
Network Simulator - ns2 (everything about ns, including contributed
codes, FAQ, debugging tips, mailing lists etc.)
Examples used in class:
Click here for the archive.