Monday, February 2, 2015

INSTALLING NS3 IN UBUNTU 14.04

1.ubuntu is installed run following command opening your terminal(ctrl+alt+T).


2.To install prerequisites-

sudo apt-get install gcc g++ python python-dev mercurial bzr gdb valgrind gsl-bin libgsl0-dev libgsl0ldbl flex bison tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev uncrustify doxygen graphviz imagemagick texlive texlive-latex-extra texlive-generic-extra texlive-generic-recommended texinfo dia texlive texlive-latex-extra texlive-extra-utils texlive-generic-recommended texi2html python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev python-pygccxml

3. (now make sure you have not run sudo su to be superuser)
Downloading NS-3(ns-3 version 3.19 not 3.13)

   cd  

   mkdir ns3

   cd ns3

   wget http://www.nsnam.org/release/ns-allinone-3.19.tar.bz2

   tar xjf ns-allinone-3.19.tar.bz2

   cd ns-allinone-3.19/
   ls

4.Then you can find build.py along with other files.
Then to build the examples in ns-3 run 
 
   ./build.py --enable-examples --enable-tests
 
If the build is successful then it will give output
 "Build finished successfully".(clap for yourself)

5.Now run the following command to configure with waf(build tool)
 
 ./waf -d debug --enable-examples --enable-tests configure

To build with waf(optional)
 
./waf

6.To test everything allright
 
./test.py
 
If the tests are ok the installation is done. :)