Wednesday, February 8, 2012

Installing NS2.35 on Fedora 15 and 16

NS is a discrete event simulator used primarily for networking research. It provides support for simulation of TCP, routing, and multicast protocols over wired and wireless networks.

ns can be installed on computers that run on Windows and Unix. But most users out there to use the simulation software on a Unix system.

For this short tutorial, I am going to discuss briefly how to install ns2.35 (the latest version of the software at the time of this writing) on Fedora 15 and 16. I am also a beginner at using ns and I have to admit that I also had my shares of frustrations and confusions during the whole process right from when I first started using Fedora (it was my first time to use a Linux machine).

So if you are advanced user, maybe this tutorial is going to be very basic since I prepared it in a way that even beginners (those who have just started using Linux) could understand.

Almost everything in this installation process is done using the terminal. The terminal is Linux's version of the Command Prompt in Windows operating systems. It provides us with a way to type commands to the computer much like the way computer users did about 20 years ago. That may sound strange but it is actually easy to use and you can do more with your PC once you know the basic operations. Here's a good tutorial for you to read just so you can prepare for the next few steps.

Alright! Now, I assume that you already know some basic terminal commands, let's proceed to installing your ns software.

1. Open terminal and become root by typing:
    su -
2.You will then be prompted to type your root password.
3.Go to the directory where you want to install your ns software by using a series of "dir" and "cd" commands.


The command "dir" outputs a list of all the files and directories within the current directory where you are in. The "cd" command when proceeded with the name of a directory(folder) opens that directory.
4.First we need to install all the prerequisites of ns starting with our C++ compiler:

    yum install gcc-c++
    yum install tcl-devel
    yum install libX11-devel (that's one-one)
    yum install libXt-devel

5. Next step is for you to download the all-in-one package of ns2.35 here. Go to the directory where you downloaded the tar file and transfer it to where you want it installed.
6.Going back to the terminal, navigate to the directory where you saved the ns-allinone-2.35.tar file.
7. Execute the following commands:

    tar -zxvf ns-allinone-2.35.tar

8. Finally, navigate into the ns-allinone-2.35 directory and type the following command in the terminal:



  1. Whenever i have run my project in ns-allinone2.35
    it gives the error as
    "checking for"
    please help me...

    1. Hey Madhav,
      Have you tried installing the tcl library? what Operating system are you using?