You are on page 1of 1

EXP NO.

01

INSTALLATION OF NS2 IN LINUX

1. Download ns-allinone-2.35 from www.nsnam.org


2. Place ns-allinone-2.35.tar.gz your desired directory like/home/student/CWNT-14/ and
Extract the folder.
• For Installation of ns-allinone-2.35 :
• Open Terminal window
• then give the path using cd command.Such as, cd ns-allinone-2.35
• then the terminal shows the command that sets the path like ns-allinone-2.35$ ./install this
command will install the ns-allinone-2.35
• after that we have to install the configuration for that we use the following command: sudo
apt-get install build-essential autoconf automakelibxmu-dev
• Go to Home where the ns-allinone-2.35 folder is and open it and in that folders-2.35 click on
that folder and then search linkstate folder and click it then search ls.h file and open it.
• In that ls.h file will show the c++ code in that code on 137th line void eraseAll()
{erase(baseMap::begin(),baseMap::end());} in this line we have to add “this->”it will show
like this “void eraseAll() {this->erase(baseMap::begin(), baseMap::end()); }“
• Then open Terminal after minimize the editer and we give command for editing and
filename “gedit ~/bashrc”
• Then we open terminal and give command to install ns2 so the command is: sudo apt-get
install ns2
• Then to check if its properly installed or not we have to command “ns”and enter
• it will show the % and for exit from this whole command situation we give command to
terminal “exit”
• Then the nam console version 1.15 is properly working or not we have to command to
terminal the “nam” keyword
• Then it will show the Nam Console v1.15 window4

You might also like