How to Install NS2.35 in Ubuntu12.04

1.Install....OS Ubuntu 12.04 LTS32 bit
    http://releases.ubuntu.com/12.04/ubuntu-12.04.5-desktop-i386.iso

                                                    or
           Fedora 11



         For Windows user:

        Install Oracle Virural Box
        (http://download.virtualbox.org/virtualbox/4.3.20/VirtualBox-4.3.20-96997-Win.exe)

        Over VirtualBox install ubuntu



2.    Download NS2-all-in-one from

    http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/


    around 59.9MB

3. After NS2 download: open terminal, change directory to your working directory and run             following commands:       

(i)sudo apt-get update
       
(ii)    sudo apt-get install g++ build-essential autoconf automake libxmu-dev
       
        //For commands in (i) and (ii) you must be connected to internet
       
       
(iii)    tar zxvf ns-allinone-2.35.tar.gz

        (iv)    cd ns-allinone-2.35
       
(v)    ./install

(vi)  sudo apt-get install xgraph //you must be connected to internet
       
(vii)    gedit ~/.bashrc


------add following at end in bashrcfile---------------------

#NS2-paths


# LD_LIBRARY_PATH
OTCL_LIB=/home/navneet/ns2/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/navneet/ns2/ns-allinone-2.35/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/navneet/ns2/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/navneet/ns2/ns-allinone-2.35/bin:/home/navneet/ns2/ns-allinone-2.35/tcl8.5.10/unix:/home/navneet/ns2/ns-allinone-2.35/tk8.5.10/unix
# Note: the above two lines starting from XGRAPH should come in the same line
NS=/home/navneet/ns2/ns-allinone-2.35/ns-2.35/
NAM=/home/navneet/ns2/ns-allinone-2.35/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM

end
------------------------------------------------


after adding path Run following commands too:




gedit ns-2.35/linkstate/ls.h

line no 137


this->


    void eraseAll() {erase(baseMap::begin(), baseMap::end()); }
    T* findPtr(Key key) {
        iterator it = baseMap::find(key);
        return (it == baseMap::end()) ? (T *)NULL : &((*it).second);
    }
};

//In the Plase Of

    void eraseAll() {this->erase(baseMap::begin(), baseMap::end()); }
    T* findPtr(Key key) {
        iterator it = baseMap::find(key);
        return (it == baseMap::end()) ? (T *)NULL : &((*it).second);
    }
};








(viii)    source ~/.bashrc

(ix)    ./validate

(x)    It should pass all tests


2 comments:

  1. This guide on installing NS2.35 in Ubuntu 12.04 is super helpful! It’ll be interesting to see how the hekateswitch could influence network simulations and enhance performance.

    ReplyDelete
  2. Installing NS2.35 on Ubuntu 12.04 can be a bit tricky, but it’s definitely manageable with the right steps. For those looking for a way to manage multiple systems efficiently, consider using hekate switch, which can provide powerful functionality to simplify tasks like this

    ReplyDelete