Skip to content

Installing  ns2.31 

Here we assume that the student is a Graduate/research level student with elementary knowledge of Linux and ns2.

For installation of Linux and ns2.31, refer internet for the procedure for installing Linux and installing ns2 on Linux or consult your lab admin or your friend or anybody who knows installation of Linux and ns2

1. If you are not having ns2.31, then download ns2.31 from the following link
http://www.isi.edu/nsnam/dist/ns-allinone-2.31.tar.gz
 login as root copy the ns-allinone-2.31.tar.gz file in / (the root of the filesystem)
 #cd /
 #gunzip –d ns*.gz this will extract ns-allinone-2.31.tar in the / file system
 #tar –xvf ns*.tar this will extract ns.28 under the directory /ns-allinone-2.31

 First, install ns2.31

# cd /ns-allinone-2.31/

#./ install

– to install ns2.

After successful installation, edit the /root/.bash_profile with the following values – then only the following commands will work from any project directory) [/.bash_profile is a hidden file]

 

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ns-allinone-2.31/otcl-1.13:/ns-allinone-2.31/lib:/root/bin/glnx86/
TCL_LIBRARY=/ns-allinone-2.31/tcl8.4.14/library

PATH=$PATH:$HOME/bin:/ns-allinone-2.31/bin:/ns-allinone-2.31/tcl8.4.14/unix:/ns-allinone-2.31/tk8.4.14/unix

export USERNAME BASH_ENV PATH LD_LIBRARY_PATH TCL_LIBRARY

 

Reboot the system and login again

Check the good working of ns2 by just typing the following command.

#ns – this will produce % prompt (Ctrl+C to exit)

#nam – This will start nam

#xgraph – it should wait for input (Ctrl+C to exit)

WhatsApp Discuss Through WhatsApp