Sunday, 25 August 2013

NS2 Configuration and Installation

 STEP 1 
download the NS-2.35 allinone software from the following link. 
    • http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download
    (or)
    https://dl.dropbox.com/u/24623828/ns-allinone-2.35.tar.gz
     STEP 2 
  •  Copy that file to /home/<username> (home folder of user)
    Open terminal again and execute the following commands one by one
    • tar zxvf ns-allinone-2.35.tar.gz
    • cd ns-allinone-2.35
    • ./install
       STEP 3 
  • You may possibly get one error during your installation is linkstate/ls.h error
  • If you get the above error, open the file (~ns-2.35/linkstate/ls.h) using gedit or any text editor
  • Go to line number 137 and change this line
    (void eraseAll() { erase(baseMap::begin(), baseMap::end()); })  
    to
    void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
    • again you try the command ./install and this time the installation will be successful.
 STEP 4 
    • Once installed the PATH information will be provided to you.
    • Copy the PATH and LD_LIBRARY_PATH Variable to /home/<username>/.bash_profile (see a dot in the beginning it is a hidden file)
    • edit by -----> gedit /home/<username>/.bash_profile (for fedora)
      edit by -----> gedit /home/<username>/.bashrc (for ubuntu)    
         
Input the path information in .bash_profile file like this                                     
 export PATH=$PATH:/home/<username>/ns-allinone-2.35/bin:/home/<username>/ns-allinone-2.35/tcl8.5.10/unix:/home/<username>/ns-allinone-2.35/tk8.5.10/unix

export LD_LIBRARY_PATH=/home/<username>/ns-allinone-2.35/otcl-1.14:/home/<username>/ns-allinone-2.35/lib
 STEP 5 
then checkitby
$>  ns
a
$> nam



1 comment:

  1. share your linux related queries! using this comment form...

    ReplyDelete