Installing Network Simulator 2 (NS-2.35) in Fedora 19

Fedora 19 was launched last fortnight and it released with so many new features
To install Network Simulator 2 (ns-2.35), here are the steps to do it. For other OS, here is the installation instructions.
Here comes the instructions for NS-2.35 in Fedora 19.

Installation Instructions

OS Used: Fedora 19 – 64 bit DVD Version
NS2: ns-allinone-2.35.tar.gz from
Step 1: Copy the ns2 source file in to the home/ directory (always use the home directory and use ordinary user login)
Step 2: unzip or untar the contents from the source file using the commands one by one
cd /home/pradeepkumar
tar zxvf ns-allione-2.35.tar.gz
cd ns-allinone-2.35
Step 3: The default installation of fedora 19 does not handle the developmental software and has to be installed separately.  Here is the command to do that. (You must switch on your internet connection to download the software). Also see the screenshot
su    (You should be the super user to install the new software, provide the super user password when prompted)
yum install libX11-devel tcl tk gcc-c++ libXt-devel

Step 4: Once the installation of the softwares are over, go back to step 2 and give the following command
./install (see a dot in front of the / )
Step 5: The installation will run for more than 5 minutes (see the snapshot below) and it will show the path settings. You need to set tow paths (PATH and LD_LIBRARY_PATH) for successful running of ns,nam and xgraph

 Step 6: Set the paths in the file (/home/pradeepkumar/.bash_profile) as shown below
export PATH=$PATH:list/of/paths/separated/by/a/colon:/another/path/here
export LD_LIBRARY_PATH=/list/of/path/supplied/by/ns2/software:/another/path/here
Step 7: execute the .bash_profile using the command
source /home/pradeepkumar/.bash_profile
Step 8: check ns or nam by typing either ns or nam in the terminal

          % indicates ns interpreter is running

an animation window will pop out. You may get an error in ~ns-2.35/linkstate/ls.h file which can corrected by changing the erase{ to         this->erase{ in the 137th line. 

NS3 installation in Linux Mint 14 (64bit)

This blog is mainly dealing with Network Simulator 2 (NS2). However, more number of requests coming from my readers about the usage of NS3 for network simulation. So I started learning that too and here is the first post on NS3.

  • NS3 is also a discrete event simulator for internet systems and targeted for mainly Education and research purpose.
  • Ns3 uses two languages python and C++, whereas ns2 uses OTCL and C++.
  • The codes from NS2 will not be executing under NS3, however there are some codes have been converted from NS2 like OLSR, etc.
  • NS3 supports both IP and Non IP Based networks, protocols like OLSR, AODV, etc and networks like WiFi, WiMax, LTE, etc.
This post will tell you how to install Network Simulator 3 (NS3) to be installed on a Linux Mint 14 (64bit OS). May be it will work too good for Ubuntu 13.04 also.
  • The NS3 software can be downloaded from It consists of good documentation too. The recent version is 3.17 (ns-allinone-3.17) . Here is the website snapshot.

  • Since the default build files will not be coming by default in Linux OS, they have to be installed before installing ns3. Here is the way to install as given.
    • sudo apt-get update
    • sudo apt-get install build-essential autoconf automake libxmu-dev
    • sudo apt-get install ia32-libs (Optional – This is to install the 32 bit libraries if you have a 64 bit Linux OS)
  • the downloaded file will be like this ns-allinone-3.17.tar.bz2. Once downloaded, extract it using the following command.
    • tar xjfv ns-allinone-3.17.tar.bz2 (This will create a folder called ns-allinone-3.17)
    • cd ns-allinone-3.17
    • ./  (or alternatively you can use source
  • If everything works well as shown in the figure below, the installation will proceed.
  • After successful installation,  the build will show this screen. There may be some modules would not have built. In my case, brite, click, openflow and visualizer was not built and there were so many modules were built.
  • Most of the examples comes default in the NS3 source will be disabled by default, using the following command as shown in the figure, the examples may be enabled.
    • cd ns-allinone-3.17/ns-3.17/
    • ./waf configure – - enable-examples
  • Once done, as shown below, simply run the ./waf
    • ./waf
    • ./ (or source
    • this testing will compile some more modules.
  • The above command will take more time to PASS all the modules so that the examples may be run.
  • You can check a simple example or module that is running or not.
./waf –run hello-simulator   
the output will be “Hello Simulator”
That’s the successful installation of NS3. All the simulated modules are available in the folder ~ns-allinone-3.17/ns-3.17/. If you encounter any errors, let you post your queries in the comment section.
The next post will tell you about how to execute the modules either in C++ or Python.