Ns 2
Ns 2
Introduction
Network Simulator (Version 2), widely known as NS2, is simply an event driven simulation tool
that has proved useful in studying the dynamic nature of communication networks.
Simulation of wired as well as wireless network functions and protocols (e.g., routing
algorithms, TCP, UDP) can be done using NS2. In general, NS2 provides users with a way of
specifying such network protocols and simulating their corresponding behaviors.
Due to its flexibility and modular nature, NS2 has gained constant popularity in the networking
research community since its birth in 1989. Ever, since, several revolutions and revisions have
marked the growing maturity of the tool, thanks to substantial contributions from the players in
the field.
Among these are the University of California and Cornell University who developed the REAL
network simulator, 1 the foundation which NS is based on.
Since 1995 the Defense Advanced Research Projects Agency (DARPA) supported development
of NS through the Virtual Internetwork Tested (VINT) project [9].2 currently the National
Science Foundation (NSF) has joined the ride in development. Last but not the least, the group
of researchers and developers in the community are constantly working to keep NS2 strong and
versatile.
Installation Procedure
PROCEDURE 1:
* Update your ubuntu
$ sudo aptget
update
* Install ns2.34, nam and xgraph
$ sudo aptget
install ns2 nam xgraph
Thats all!
PROCEDURE 2:
Step1:
Place the nsallinone2.34.
tar.gz package in your home
folder(/home/micman in my case). Right click on the package and extract the
contents in the same home folder.
Step2:
Next, open the Terminal(Applications–>Accessories–>Terminal)
Step3:
Change to nsallinone2.34
directory
$ cd /home/micman/nsallinone2.34
Step4:
First, Install the dependencies
$ sudo aptget
install buildessential
autoconf automake libxmudev
gcc4.3
http://getch.wordpress.com
Note that we are downgrading the gcc version, as ns2.34 works well with gcc4.3
Edit Makefile.in found at this location nsallinone2.34/
otcl1.13/
Makefile.in as follows:
Find the line that says:
CC= @CC@
and change it to:
CC= gcc4.3
Step5:
Begin ns2.34 installation
$ sudo ./install
Step6:
Once the installation is successful i.e. without any errors, we need to add the
path information to the file ~/.bashrc
$ gedit ~/.bashrc
Step8:
For the changes to take effect immediately, do the following:
$ source ~/.bashrc
Thats all!
type ns to see % and type nam to show the nam startup window. This shows your
installation has been successful.