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

Popular posts from this blog

AWK Scripts for NS2 to process data from Trace Files

nam installation - Segmentation Fault (Solved)

Xgraph