0% found this document useful (0 votes)
133 views3 pages

Ns 2

NS2 is an event-driven network simulator tool useful for studying communication networks and simulating network protocols. It provides flexibility and modularity for specifying protocols and observing their behavior. NS2 has gained popularity since 1989 due to contributions from universities and organizations. The document then provides two procedures for installing NS2 on Ubuntu: one using apt-get install and another using tar extraction and modifying environment variables.

Uploaded by

Hemant Panwar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views3 pages

Ns 2

NS2 is an event-driven network simulator tool useful for studying communication networks and simulating network protocols. It provides flexibility and modularity for specifying protocols and observing their behavior. NS2 has gained popularity since 1989 due to contributions from universities and organizations. The document then provides two procedures for installing NS2 on Ubuntu: one using apt-get install and another using tar extraction and modifying environment variables.

Uploaded by

Hemant Panwar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

NS2

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

Step7: Append the following lines to the file ~/.bashrc


# LD_LIBRARY_PATH
OTCL_LIB=/home/micman/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/micman/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:
$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/micman/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/micman/ns-allinone-2.34/bin:/your/path/ns-allinone-
2.34/tcl8.4.18/unix:/home/micman/ns-allinone-2.34/tk8.4.18/unix
NS=/home/micman/ns-allinone-2.34/ns-2.34/
NAM=/home/micman/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
Here, replace /home/micman with the path to your home folder.
http://getch.wordpress.com

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.

You might also like