Our research experts have enlisted the step by step process of installing network simulator 2 in Ubuntu through this article. Let’s start this article with the initial step to install the Ns2 packages in Ubuntu.
Step: I
As the first process, we have to download the Ns2 source package through the execution of below mentioned commands in the Ubuntu terminal.
Step: II
Consequently, we have to change the source code in the package for the installation of Ns2 in Ubuntu as mentioned in the following.
go to ns-allinone-2.35/ns-2.35/linkstate sub folder.
double click on “ls.h” file to open.
go to line number 137 and change the below line
from
void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
to
void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
Step: III
We have to open the terminal through pressing the key combination of “ALT+CNTL+T”. Then, we have to change the location of Ns2 packages in terminal and implement the below mentioned commands in terminal.
sudo ./install
To conclude this article, we hope that we have offered the required information to install network simulator 2 in Ubuntu and you can reach us to aid more processes based on network simulator 2.