Aquasim in ns3

This post shows you how to install aquasim in ns3. Aquasim is a simulator used for simulating underwater Wireless Sensor networks which was used with ns2 earlier, and now it is available for ns3 too.

OS Used: Linux Mint 18.1 or Ubuntu 16.04
Ns version used: ns-3.27

Assumption:
You should have installed ns3 before trying the following. Please follow the ns3 installation instructions here.

Open the terminal and give the following instructions.

$] cd ns-allinone-3.27/ns-3.27/src

$] git clone https://github.com/rmartin5/aqua-sim-ng.git

$] cd ..

$] ./waf --enable-examples --enable-tests configure --disable-python

$] ./waf 

Once successful, you will get a screen like this which indicates that aquasim is installed successfully in ns3.
Aquasim
Aquasim in ns3

To test an example, go to the folder

~ns-3.27/src/aqua-sim-ng/examples/ and copy the file broadcastMAC_example.cc to the scratch/ folder and type the command to run the example.

$] cd ns-allinone-3.27/ns-3.27
$] ./waf --run scratch/broadcastMAC_example (give the name of the file correctly to run)
See the screenshot below, it looks like this.
Aquasim
Aquasim
Please look for the video that shows the explanation and installation of Aquasim in ns3.


T S Pradeep Kumar

ns3 installation in Ubuntu 16.04

This post serves the installation instructions of ns3 in ubuntu 16.04 version. Some of my students are working in ns3, this post will benefit them in installing ns3.

OS Used: Ubuntu 16.04.4
ns3 version: ns3 version 3.27

The same procedure will be applied for OS like Debian, Linux Mint.

Fresh installation of Ubuntu 16.04

Let you try the fresh installation of ubuntu in your hard disk along with windows.

Installation of ns3 dependencies

ns3 needs so many dependencies, developmental libraries, drivers, etc. so install all those

$] sudo apt update 
$] sudo apt upgrade

$] sudo apt-get install build-essential autoconf automake libxmu-dev python-pygoocanvas python-pygraphviz cvs mercurial bzr git cmake p7zip-full python-matplotlib python-tk python-dev python-kiwi python-gnome2 python-gnome2-desktop-dev python-rsvg qt4-dev-tools qt4-qmake qt4-qmake qt4-default gnuplot-x11 wireshark

The above command make take some time to download, compile and install it, Be Patient. 

Installing ns3

Download the ns3 package from  https://www.nsnam.org

I have used ns version 3.27 and the file looks like ns-allinone-3.27.tar.bz2.

You can unzip it in two ways. Right click over the above file and extract it to the folder (/home/pradeepkumar/). Most preferred place to install is to put it in the home folder.

Or 
go to the location of the download folder and copy the file to the home folder and open the terminal and give the command 

$]  tar jxvf ns-allione-3.27.tar.bz2
$] cd ns-allinone-3.27/
$] ./build.py --enable-examples --enable-tests

This will take sometime for getting compiled and build. Once the installation is successful, you will get a screen like given below.
ns3 installation
ns3 installation

This indicates that ns3 is built successfully.

To check any application is running. do the following steps 

$] cd ns-3.27/
$] ./waf --run hello-simulator
This will print the hello Simulator which indicates that ns3 is installed successfully.

Please see the following video to get more glimpse of how to install ns3. Please subscribe to https://www.youtube.com/user/tspradeepkumar




Subscribe to my Video Channel
T S Pradeep Kumar