Let us discuss about the significant process which are functional in the installation of network simulator 2 in Ubuntu 20.04.
Phase: 1 Download Ns2 Packages
Initially, we have to download the packages based on network simulator 2 using the URL which is highlighted below.
Following that, we have to unzip the downloaded Ns2 packages to home folder through the execution of below mentioned commands.
tar zxvf ns-allinone-2.35.tar.gz
Modification of Make Files
We have to execute the below mentioned changes in the make files for the installation process.
File name: – ~ns-2.35/Makefile.in
~nam-1.15/Makefile.in
~xgraph-12.2/Makefile.in
~otcl-1.14/Makefile.in
Change in all places
@CC@ to gcc-4.8
@CPP@ or @CXX@ to g++-4.8
Installation of Ns2 in Ubuntu 20.04
To install the Ns2 packages on Ubuntu 20.04, we have to execute the below mentioned commands in the Ubuntu 20.04 terminal window.
cd ns-allinone-2.35/
./install
Configuration of Installed Path
To configure the path which is installed already, we have to execute the below mentioned commands.
gedit .bashrc
Following that, we have to paste the lines which are highlighted in the following as mentioned in the following image.
export PATH=$PATH:/home/<yourusername>/ns-allinone-2.35/bin:/home/<yourusername>/ns-allinone-2.35/tcl8.5.10/unix:/home/<yourusername>/ns-allinone-2.35/tk8.5.10/unix
export LD_LIBRARY_PATH=/home/<yourusername>/ns-allinone-2.35/otcl-1.14:/home/<yourusername>/ns-allinone-2.35/lib
To this end, we hope that we have provided the enough knowledge about the installation of network simulator 2 in Ubuntu 20.04. If you have any issues, then reach us to clarify that issue.