Installing Network Simulator 2 (ns-2.35) in Ubuntu 13.10 (64 bit)

This post will tell the installation steps for NS2 under Ubuntu 13.10.
Step 1:  Download NS2 package (ns-allinone-2.35)
Step 2:  Copy the file to /home/pradeep folder (you can use your corresponding home path).
Step 3:  Open the terminal and execute the commands one by one

  • Prompt:- sudo apt-get install build-essential autoconf automake libxmu-dev  (all these packages may not be needed, but install all the above for a safer installation of ns2)
  • Prompt:- tar zxvf ns-allinone-2.35.tar.gz
  • Prompt:- cd ns-allinone-2.35
  • Open the file (~ns-2.35/linkstate/ls.h)  using gedit or vi or vim and in line number 137 and change the following line
    void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
    void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
  • Prompt:- ./install 
ns2.35 on ubuntu
ns2.35 on ubuntu

Once the installation is completed you may see the screen like the image given below.
Copy the PATH and LD_LIBRARY_PATH information in to your variable, you may use the /home/pradeep/.bashrc file and copy and paste the PATH and LD_LIBRARY_PATH as shown below.
PATH information in Ubuntu
PATH information in Ubuntu
type ns or nam in the terminal to check whether it is working or not.
For ns, a % symbol indicates the successful installation of NS2
for nam, an animator window will be popping out which indicates the sucessfull installation of NAM. 

Thats it: Try yourself to install and let you comment below for the successful installation

Popular posts from this blog

AWK Scripts for NS2 to process data from Trace Files


nam installation - Segmentation Fault (Solved)