Hire enCypher Technologies Pvt. Ltd.

How to install NS2 in ubuntu?

How to install NS2 in ubuntu?

initiative, installation, network simulator, NS2, Technology, ubuntu 13 Comments
How to install NS2 in ubuntu

NS2 is a simulation tool which is easy to configure on linux operating systems. I use Ubuntu-12.04 LTS version for installation. The commands for ns2- installation are:

1. http://sourceforge.net/

2. Open the terminal and run:
sudo apt-get update
It will ask for your password. Enter it, and your system will be updated. Make sure that you are connected to the network.

3. Next commands to run are:
sudo apt-get install tcl8.5-dev tk8.5-dev
sudo apt-get install build-essential autoconf automake
sudo apt-get install libxt-dev libx11-dev libxmu-dev

4. Now download the online available opensource package “ns-allinone-2.35.tar.gz” and untar it and save it to you home directory.

5. Go to this package via terminal:
cd ns-allinone-2.35

6. Now in this directory you will find an executable by with the name “install”, run it
it may take some time.

7. After successful execution of this command go to ns-2.35 directory:
cd ns-2.35

8. Now run the following commands one by one:
sudo make install

9. If all these commands ran successfully, it means you have configured the ns package correctly.

10. Now install some packages to make it executable:
sudo apt-get install ns2
sudo apt-get install nam
sudo apt-get install xgraph
sudo apt-get install gawk

11. Now you are completely done…

12. To check some running tcl scripts, go to the ns-allinone-2.35/ns-2.35/tcl/
ns file_name.tcl

13. After successfully running the program, the output comes in trace file (.tr). It is a formatted text file where every column has its specific meaning. By analyzing the trace files using awk script coding you can get the throughput, delay, packet-loss and other network performance parameters. If there is some problem of tclcl.h not found during installation, then refer this link. There are many other problems during NS-2 installation. For all those i am going to extend the article very soon.

Written by:

Like it? Share it
Tweet this! Share on Facebook. Vote on Reddit Stumble it Digg this! Share on LinkedIn share on Google+ pinterest

Tags: No tag[s] associated with this article




  • The IoT world – naive opinions! March 9, 2017 / 2:05 PM
  • A few Lines about story: Real stories and incidents happened when someone pretending to know about IoT. Disclaimer: This article is not a fiction and is based on real incidents which I have faced till now. Identities of all the characters and companies appearing in this article have not been shared just to prevent their “privacy” […]

  • What is Wget? (Part-2) March 8, 2017 / 8:07 PM
  • In my last article, I introduced you all to the internet downloading tool- Wget. We have already seen the installation procedure and few basic commands. Today, we are going to explore more custom uses of this simple yet powerful tool. The method we are going to follow is, we’ll discuss a use case and then […]