How to Install NS-3 in Linux and Configure it with Eclipse


Installation Steps:


1)Install the Required Software:

Open terminal and type the following commands
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
sudo apt-get install gcc
sudo apt-get install g++
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-pdf texlive-latex-extra texlive-generic-extra texlive-generic-recommended
sudo apt-get install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev

2) Create Directory for Installation

mkdir repos
cd repos

3) Download and Build NS3

hg clone
cd ns-3-allinone
./ -n ns-3.9 -r ns-3.9-ref-traces
cd ns-3.9
./waf configure

4) Download Eclipse

Download Eclipse for C/C++ for linux

5) Install mercurial eclipse plugin

Go to help->software update
Click on available software
Click on add a site
Add “ ” 
then click on installimage

6) Making Clone of NS3 in eclipse

Select: New –> Other (Pic Shown )
Select Mercurial-> Clone repository Using Mercurial

imageMention the repository address as
“ ”
in case you want to have different versions of the NS-3 you need to define the Clone directory name ,  In the figure I chose ns-3.7-dev

7) Convert the project to C++ project

Since the folder is not know as a C++ project it is necessary to be converted to so right click on project name and select: new -> convert to a C/C++ project the rest of settings should be same as picture below:

8) Configure the build system

We know that build system for NS-3 is Waf, So we need to change the build configuration from build/make to Waf. so right click on project and select the properties then choose the “C/C++ Build”.
In the “Builder setup” choose “External Builder
Remove the check from “Use default build command
change “Build command” to ${workspace_loc:/ns-3.7-dev/waf}

Behaviour setting
in Behavior tab, clear both “Build on resource save (Auto save)” and “Build (Incremental build)

Now apply it . And build the project.
AjSmart Tehnology geek

Sole blogger :(


  1. Great blog..You have clearly explained how to install PHP ..Step by step explanation is too good to understand..Its very useful for me to understand..Keep on sharing..
    PHP Training in Chennai|PHP Course in Chennai

    1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training in India . Nowadays Java has tons of job opportunities on various vertical industry.

      or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

  2. Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated.
    Best web designing course in chennai|web designing course in chennai

  3. The information you have deliver here is really useful to make my knowledge good. Thanks for your heavenly post. It is truly supportive for us and I have accumulated some essential data from this blog.
    DOT NET Training in Chennai|DOT NET Training Chennai

  4. Quite Interesting post!!! Thanks for posting such a useful post about PHP security. I wish to read your upcoming post to enhance my skill set, keep blogging.
    java j2ee training|JAVA Training in Chennai|JAVA Course in Chennai

  5. This has been the best so far, how much intense and deeply written content. I am so confident this post will be so much famous. Kudos to the blogger.

    Mobile Service Center in Chennai | Mobile Service Centre