We have researched into the installation steps of NS 3.36.1 along with a brief overview.
Network Simulator 3 (ns-3) is a versatile and robust open-source tool for computer network simulation. With its modular architecture, users can easily customize and enhance the simulator to suit their specific needs. By utilizing ns-3, network professionals and researchers can effectively analyze and optimize network performance in different scenarios, making it an invaluable resource for testing and developing cutting-edge network technologies.
Unveil the essential steps for installing network simulator 3. This is a must-read for anyone looking to set up the simulator with ease.
PRE-REQUISITES:
- Fresh installation of Ubuntu 22.04 LTS:
Screenshot:
2.Download ns-allinone-3.36.1.tar.bz2 file:
We have to download the ns-allinone-3.36.1.tar.bz2 under home directory by the clicking the Link, it will directly download to Download Location and move the compressed file to the home Directory.
Link: https://www.nsnam.org/releases/ns-allinone-3.36.1.1.tar.bz2
Screenshot:
3.Extraction of the ns-allinone-3.36.1.tar.bz2 file:
Next, we have to extract the compressed file by right click and click Extract here to extract the ns-allinone-3.36.1 as folder in the home directory.
Screenshot:
ns-allinone-3.36.1 compressed file Extracted Successfully in the home directory.
INSTALL DEPENDENCIES OF NS3:
- Open a terminal, Copy and Paste the commands to install required package:
Screenshot:
2.System File Update Command:
First of all, we need to updates the list of available packages and their versions stored in the system’s package index. Use below command to update the system package.
Command: “sudo apt-get update”
Screenshot:
3.Install Essential Tools:
- g++: A C++ compiler from the GNU Compiler Collection, essential for compiling C++ programs.
- python3: The Python programming language interpreter, used for running Python scripts and applications.
- cmake: A cross-platform tool for managing the build process of software using a compiler-independent method.
- ninja-build: A small build system with a focus on speed, used for compiling and linking code.
- git: A distributed version control system for tracking changes in source code during software development.
Command: “sudo apt install g++ python3 cmake ninja-build git ”
Screenshot:
Click the key Y to install the required Essentials tools for giving permission to install the package in the user system.
Installation of the Essential tools package completed successfully.
- Install Required Libraries and Development Tools:
- python3-dev: Header files and a static library for Python development.
- pkg-config: Helps to manage compile and link flags for libraries.
- autoconf: Tool for generating configure scripts.
- automake: Tool for generating Makefile.in files.
- libc6-dev, libc6-dev-i386: Development libraries for the GNU C Library.
- libclang-dev: Development files for Clang, a C language family frontend for LLVM.
- llvm-dev: Development libraries for LLVM.
- libboost-all-dev: Boost libraries development files.
- gsl-bin, libgsl-dev, libgslcblas0: GNU Scientific Library development files and binaries.
- python3-setuptools: Tools for installing Python packages.
- python3-gi, python3-gi-cairo: Python bindings for gobject-introspection libraries.
- python3-pygraphviz: Python interface to Graphviz.
- ipython3: Enhanced interactive Python shell.
- qtbase5-dev, qtchooser, qt5-qmake, qtbase5-dev-tools: Development files and tools for Qt 5.
- 2-goocanvas-2.0, gir1.2-gtk-3.0: GObject introspection data for GooCanvas and GTK+.
- openmpi-bin, openmpi-common, openmpi-doc, libopenmpi-dev: MPI libraries and tools for parallel computing.
- cvs: Concurrent Versions System, a version control system.
- bzr: Bazaar, a distributed version control system.
- unrar: Unarchiver for .rar files.
- wireshark, tcpdump: Network protocol analyzers.
- openmpi-bin, openmpi-common, openmpi-doc, libopenmpi-dev: Tools and libraries for the Open MPI project.
- sqlite3, libsqlite3-dev: SQLite database command-line interface and development files.
- libxml2, libxml2-dev: Libraries for parsing XML.
Command:
“sudo apt install python3-dev pkg-config sqlite3 python3-setuptools qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 openmpi-bin openmpi-common openmpi-doc libopenmpi-dev autoconf cvs bzr unrar gsl-bin libgsl-dev libgslcblas0 wireshark tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libc6-dev libc6-dev-i386 libclang-dev llvm-dev automake python3-pip libxml2 libxml2-dev libboost-all-dev”
Screenshot:
Click Yes to install wireshark packages to capture the packets from Network simulator 3.
Installation of the Required Libraries and Development Tools package completed successfully.
INSTALL NETWORK SIMULATOR 3 (NS3):
- Locating the ns-allinone-3.36.1 Folder:
Next, we need to install the NS 3 in our system so locate the Extracted ns-allinone-3.36.1 folder in the home directory.
Screenshot:
2.Launching the terminal in the ns-allinone-3.36.1 Folder:
Then Right Click in the current Directory and select the “Open in Terminal” button and it will launch the terminal.
Screenshot:
Here, we launched the terminal by that button in the folder.
3.Building the terminal in the ns-allinone-3.36.1 Folder:
Next, we need to build the ns-3.36.1 to install the network simulation 3 Environment in the User system and it will build the netanim also. So, use the command to build the ns-3.36.1.
Command: “./build.py”
Screenshot:
Netanim Building process:
Screenshot:
Ns-3.36.1 Configuring process:
Screenshot:
The “./ns3 configure” command is to configure the Network Simulator 3 (NS-3) environment. This command is typically used to set various parameters, such as the simulation duration, network topology, and node properties. It can also be used to specify the output format and other simulation settings.
Screenshot:
Ns-3.36.1 Configuration Completed successfully.
Ns-3.36.1 Building process:
Screenshot:
The “./ns3 build” command is used to build the Network Simulator 3 (NS-3) framework from its source code. When use this command, It will compiles the source code, generates the Makefiles, and builds the NS-3 binary and libraries and make Runnable Environment.
Screenshot:
4.Enable Python Bindings:
The Python bindings for NS-3 are a set of Python modules that allow you to use the Network Simulator 3 (NS-3) library from within Python. With the Python bindings, you can leverage the power of NS-3 to simulate and analyse network behaviour without needing to write code in C++.
Next, we will use the python bindings enable command to activate the python bindings and we can see the enabled output in the ns3 Configuration.
Command:
“sudo apt install g++ python3 python3-dev pkg-config sqlite3 cmake”
Screenshot:
Here we installed the python bindings required packages successfully.
Ns-3.36.1 Location Change:
Change the location to the ns-3.36.1.
Command: “cd ns-3.36.1”
Screenshot:
Ns-3.36.1 Configuring process:
The Ns 3.36.1 configuration of the Network Simulator 3 (NS-3) environment. This command is typically used to set various parameters, such as the simulation duration, network topology, and node properties. It can also be used to specify the output format and other simulation settings.
Command: “./ns3 configure –enable-python-bindings”
Screenshot:
Ns-3.36.1 Configuration Completed successfully.
Ns-3.36.1 Building process:
Screenshot:
The “./ns3 build” command is used to build the Network Simulator 3 (NS-3) framework from its source code. When use this command, It will compiles the source code, generates the Makefiles, and builds the NS-3 binary and libraries and make Runnable Environment.
Screenshot:
Ns-3.36.1 Installed successfully in the Ubuntu 22.04 system. If you are interested in learning how this can be applied to your projects, visit ns3simulation.com.