Sunday 21 April 2013

Installing NS-3 on Ubuntu 12.04

ns-3 is a discrete-event network simulator for Internet systems, targeted primarily for research and educational use. ns-3 is free software, licensed under the GNU GPLv2 license, and is publicly available for research, development, and use.

It has a very strong documentation and does not use .tcl script to create the network topology unlike its predecessor ns-2 which makes it simpler to deal with.

Further details on ns-3 can be found here : http://www.nsnam.org/
The detailed installation steps can be found here.

1. Open a terminal and download the following packages:

sudo apt-get install gcc g++ python              
sudo apt-get install gcc g++ python python-dev
sudo apt-get install mercurial
sudo apt-get install bzr
sudo apt-get install gdb valgrind
sudo apt-get install gsl-bin libgsl0-dev libgsl0ldbl
sudo apt-get install flex bison libfl-dev
sudo apt-get install g++-3.4 gcc-3.4
sudo apt-get install tcpdump
sudo apt-get install sqlite sqlite3 libsqlite3-dev
sudo apt-get install libxml2 libxml2-dev
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
sudo apt-get install vtun lxc
sudo apt-get install uncrustify
sudo apt-get install doxygen graphviz imagemagick 
sudo apt-get install texlive texlive-extra-utils texlive-latex-extra
sudo apt-get install python-sphinx dia
sudo apt-get install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev
sudo apt-get install libboost-signals-dev libboost-filesystem-dev
sudo apt-get install openmpi*
 
 
2. Next download the .tar file and untar it.

mkdir ns3
cd ns3
wget http://www.nsnam.org/release/ns-allinone-3.13.tar.bz2
tar xjf ns-allinone-3.13.tar.bz2

3. Build the ns-3and configure with waf

./build.py
./waf distclean
./waf configure --enable-examples --enable-tests
./waf build

4. Now test

./test.py

5. To run a file it must be in the /scratch folder (example ../scratch/test.cc)

./waf -run scratch/test

Done!

 

No comments:

Post a Comment