Setting up ns2 on your linux box
Monday, February 23rd, 2009It was just this normal day and a friend asks me to lend a hand and setup ns2 on his laptop which was running susse linux.
After some 5 attempts, i finally found some post on the web by some guy and it really helped a lot and at the end of the sixth attempt, i had already started simulating networks.
The procedure is shown below:
NS2 Installation for Starters
How to install NS 2 on Linux, The step by Step Procedure
Step 1:Get NS2 All in one package from the below link or by clicking here
Step 2:Copy the tar file in /home/
Step 3:Extract the tar file located in /home/ #tar -zxvf File name
Step 4:#cd
Step 5:#./install
/* This will run the install Script, wait for the output */
Step 6:Now it is the time for setting environment variable, Copy the message displayed after running the above commmand to a text file else copy and paste this in a new text file ===================================
PATH=$PATH:/home/ns-allinone-2.31/bin:/home/ns-allinone-2.31/tcl8.4.14/unix:/home/ns-allinone-2.31/tk8.4.14/unix
LD_LIBRARY_PATH=/home/ns-allinone-2.31/otcl-1.13:/home/ns-allinone-2.31/lib
TCL_LIBRARY=/home/ns-allinone-2.31/tcl8.4.14/library
export PATH
export LD_LIBRARY_PATH
export TCL_LIBRARY
================================
Step 7:save the file as ns2.sh
Step 8:copy the file into /etc/profile.d/
Step 9: either restart the machine or relogin
Step 10:Now run these commands
#cd ns-2.31/
#./configure
#make
#make clean
#./validate
Step 11: all done , just type ns at terminal
e.g. #ns
%
and it is ready !
Enjoy simulating networks, protocols whatever you like, All the Best !