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:
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:
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:
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/
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.