Getting Started with NS-2.35 and NS-3 (Lesson-2): NS-2.3 Installation in Ubuntu Operating System

Описание к видео Getting Started with NS-2.35 and NS-3 (Lesson-2): NS-2.3 Installation in Ubuntu Operating System

Welcome to Lesson 2 of our series "Getting Started with NS-2.35 and NS-3"! In this video, we guide you through the step-by-step process of installing NS-2.3 on an Ubuntu operating system.

Details and Commands

Step 1: Download Ubuntu Operating System Link: https://releases.ubuntu.com/focal/
Step 2: Install Ubuntu in Virtual Machine
Step 3: Install the CD Image for large screen resolution

To check the information about the installed Linux distribution
:~$ cat /etc/lsb-release

Step 4: Download NS-allinone-2.35.tar.gz and change the directory from Downloads/Home. Link: https://sourceforge.net/projects/nsna...

Step 5: Install the basic libraries like
:~$ sudo apt install build-essential autoconf automake libxmu-dev
Step 6: install gcc-4.8 and g++-4.8
:~$ sudo apt install gcc-4.8 g++-4.8
Step 7: Open the file using sudo mode and add following line in end
:~$ sudo nano /etc/apt/sources.list
deb http://in.archive.ubuntu.com/ubuntu bionic main universe
Update again and install gcc-4.8 g++-4.8
:~$ sudo apt update
:~$ sudo apt install gcc-4.8 g++-4.8
Step 8: Unzip the NS-2.35 packages to home folder
:~$ tar zxvf ns-allinone-2.35.tar.gz
Step 9: Enter in Directories of NS-2.35 and Edit Files
:~$ cd ns-allinone-2.35/ns-2.35

First file:
:~$ gedit Makefile.in
Line No 36 and 37: Change @CC@ to gcc-4.8 change @CXX@ to g++-4.8

Second File “nam-1.15”:
:~$ nam-1.15/Makefile.in
Line No 46 and 47: Change @CC@ to gcc-4.8 change @CXX@ to g++-4.

Third File “otcl-1.14”
:~$ otcl-1.14/Makefile.in
Line No 7: Change @CC@ to gcc-4.8

Forth File “xgraph-12.2”
:~$ xgraph-12.2/Makefile.in
Line No 120 and 123: Change @CC@ to gcc-4.8 change @CXX@ to g++-4.

Fifth File “ns-2,35/linkstate/ls.h”
:~$ ns-2.35/linkstate/ls.h
Line No 137: Change the line and add only "this-"

Step 10: Open a new terminal and install NS-2.35
:~$ cd ns-allinone-2.35/
:~$ ./install

Step 11: - Set the PATH in .bashrc file
:~$ gedit .bashrc

Paste the following lines at Line no 4 and 5

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

Open new terminal
Logout and Login back or Run source .bashrc
:~$ source .bashrc

Step 12: Open Nam and Run Existing Wireless Network Simulation
:~$ cd ns-allinone-2.35
:~$ cd ns-2.35
:~$ cd tcl
:~$ cd ex/
:~$ ns wireless.mitf.tcl
:~$ nam wireless-mitf.nam

Thanks for watching, Subscribe and Share it to your friends...
#ubuntu22.04#ns-allinone-2.34#NS2#NS3

Комментарии

Информация по комментариям в разработке