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


Reference:

 http://www.nsnam.org/wiki/index.php/Installation

http://www.nsnam.org/wiki/index.php/HOWTO_configure_eclipse_with_ns-3

Installation Steps:

Ubuntu

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 http://code.nsnam.org/ns-3-allinone
cd ns-3-allinone
./download.py -n ns-3.9 -r ns-3.9-ref-traces
./build.py
cd ns-3.9
./waf configure
./waf

4) Download Eclipse

Download Eclipse for C/C++ for linux
http://www.eclipse.org/downloads/

5) Install mercurial eclipse plugin

Go to help->software update
Click on available software
Click on add a site
Add “ http://cbes.javaforge.com/update ” 
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
“ http://code.nsnam.org/ns-3-dev ”
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 :(

8 comments:

  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..
    Regards,
    PHP Training in Chennai|PHP Course in Chennai

    ReplyDelete
  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.
    Regards,
    Best web designing course in chennai|web designing course in chennai

    ReplyDelete
  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

    ReplyDelete
  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.
    Regards,
    java j2ee training|JAVA Training in Chennai|JAVA Course in Chennai

    ReplyDelete
  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

    ReplyDelete
  6. Gives you the best website address I know there alone you'll find how easy it is. http://freshapplenews.blogspot.com/2009/11/unofficial-apple-weblog-tuaw-10_23.html

    ReplyDelete