0% found this document useful (0 votes)
65 views3 pages

Experiment No. 3: AIM:-Installation of NS-II Procedure

The document describes the 8 step procedure to install NS-II network simulator on a system. It involves downloading and extracting NS-II, installing prerequisite packages, making a minor code change, configuring the GCC version, running the install script with root privileges, editing the .bashrc file to set the path, restarting the system, and verifying installation by running the 'ns' command.

Uploaded by

kartik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views3 pages

Experiment No. 3: AIM:-Installation of NS-II Procedure

The document describes the 8 step procedure to install NS-II network simulator on a system. It involves downloading and extracting NS-II, installing prerequisite packages, making a minor code change, configuring the GCC version, running the install script with root privileges, editing the .bashrc file to set the path, restarting the system, and verifying installation by running the 'ns' command.

Uploaded by

kartik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment No.

3
AIM:- Installation of NS-II
Procedure:-
1. Download and extract NS-II.
2. Ns2 requires a few packages to be pre-installed. It also requires the GCC-
version 4.3 to work correctly. So install all of them by using the following
command:

sudo apt-get install build-essential autoconf automake libxmu-dev


sudo apt-get install gcc-4.4

3. Once the installation is over, we have to make a change in the"ls.h" file.


Use the following steps to make the changes to the folder "linkstate", Use
the following command. Here it is assumed that the ns folder extracted is
in the home folder of your system.

cd ~/ns-allinone-2.35/ns-2.35/linkstate

4. Now open the file named "ls.h" and scroll to the 137th line. In that
change the word "error" to "this->error".

5. Now there is one more step that has to be done. We have to tell the ns
which version of GCC will be used. To do so, go to your ns folder and
type the following command:

Sudo gedit ns-allinone-2.34/otcl-1.13/Makefile.in


In the file, change Change CC= @CC@ to CC=gcc-4.4, as shown in the
image below.

6. Now we are ready to install ns2. To do so we first require root


privileges and then we can run the install script. Use the following two
commands:

sudo su cd ~/ns-allinone-2.35/./install

7. The final step is to tell the system, where the files for ns2 are
installed or present. To do that, we have to set the environment path
using the ".bashrc" file. In that file, we need to add a few lines at the
bottom.If you have installed it in a folder "/home/abc", then replace
"/home/akshay/ns-allinone-2.35/otcl-1.14" with "/home/abc/ns-allinone-
2.35/otcl-1.14".

8. Once the changes have been made, save the file and restart the system.
Once the system has restarted, open a terminal and start ns2 by using the
command: - ns
You should now see the following screen.

Result: - NS-II was successfully installed.

You might also like