Jan 22, 2006

Network Simulator, NS-2

Network Simulator, NS-2 is a discrete event based simulator. It's a dual language simulator which consists of Object oriented Tcl/Tk and C++ as part of the front-end interpreter. Users can create simulator object through intrepeter and objects can be instantiated within the intrepreter.

Network Simulator, NS-2 manual can be obtained from here.

I used NS-2 on Cygwin.

There is a wiki on how to install and run Ns-2 on Cygwin.

** Before running Ns-2 cygwin, we need to set the path for Ns-2 in Cygwin

Copy the following path and paste it at the bottom of .bashrc file (this is for Cygwin and Ns-2 version 2.29)
---------------------------------------------------------------

export NS_HOME=`pwd`/ns-allinone-2.29
export PATH=$NS_HOME/tcl8.4.11/unix:$NS_HOME/tk8.4.11/unix:$NS_HOME/bin:$PATH
export LD_LIBRARY_PATH=$NS_HOME/otcl-1.11:$NS_HOME/lib:$NS_HOME/tcl8.4.11/
unix:$NS_HOME/tk8.4.11/ unix:$LD_LIBRARY_PATH

export TCL_LIBRARY=$NS_HOME/tcl8.4.11/library

Basically to start running Ns-2 on Cygwin, we need to initiate the graphical mode by typing "startxwin.bat"














and we can run any ns-2 tcl script by entering the ns command followed by the script

example :

ns example1.tcl



No comments: