Ns3 Projects for B.E/B.Tech M.E/M.Tech PhD Scholars.  Phone-Number:9790238391   E-mail: ns3simulation@gmail.com

NS 3.42 INSTALLATION STEPS

We are pleased to offer guidance on the installation steps for ns 3.42, should you wish to incorporate it into your research endeavors and project implementation. our team is committed to providing comprehensive support throughout the process. ns-3 is a versatile and robust open-source simulator designed for computer networks. It allows users to conceptualize, assess, and authenticate the behavior of a network or system across diverse scenarios. the simulator boasts a modular architecture, facilitating seamless integration of new components or modification of existing ones.With ns-3, network architects and researchers can replicate network protocols, topologies, and devices, thereby enabling the evaluation and enhancement of cutting-edge network technologies and architectures.

Here, we have an exciting and exclusive article that is just popped out for you to notify the steps that are required for the installation of network simulator 3.

PRE-REQUISITES:

  1. Fresh installation of Ubuntu 22.04 LTS:

Screenshot:

Fresh installation of Ubuntu 22_04 LTS

2.Download ns-allinone-3.42.tar.bz2 file:

We have to download the ns-allinone-3.42.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.42.tar.bz2

Screenshot:

Download ns-allinone-3_42_tar_bz2 file

3.Extraction of the ns-allinone-3.42.tar.bz2 file:

Next, we have to extract the compressed file by right click and click Extract here to extract the ns-allinone-3.42 as folder in the home directory.

Screenshot:

Extraction of the ns-allinone-3_42_tar_bz2 file
Extraction of the ns-allinone-3_42_tar_bz2 file

INSTALL DEPENDENCIES OF NS3:

  1. Open a terminal, Copy and Paste the commands to install required package :

Screenshot:

Open a terminal

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:

System File Update Command

3.Install Essential Tools:

    1. g++: A C++ compiler from the GNU Compiler Collection, essential for compiling C++ programs.
    2. python3: The Python programming language interpreter, used for running Python scripts and applications.
    3. cmake: A cross-platform tool for managing the build process of software using a compiler-independent method.
    4. ninja-build: A small build system with a focus on speed, used for compiling and linking code.
    5. 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:

Install Essential Tools

Click the key Y to install the required Essentials tools for giving permission to install the package in the user system.

Install Essential Tools

Installation of the Essential tools package completed successfully.

  1. Install Required Libraries and Development Tools:
    1. 2-goocanvas-2.0: GObject introspection data for GooCanvas (drawing library).
    2. python3-gi, python3-gi-cairo: Python bindings for GObject and Cairo graphics.
    3. python3-pygraphviz: Python interface to the Graphviz graph drawing package.
    4. 2-gtk-3.0: GObject introspection data for GTK+ graphical user interface library.
    5. ipython3: Enhanced interactive Python shell.
    6. tcpdump: Network packet analyzer.
    7. wireshark: Network protocol analyzer.
    8. sqlite, sqlite3, libsqlite3-dev: SQLite database and development libraries.
    9. qtbase5-dev, qtchooser, qt5-qmake, qtbase5-dev-tools: Development tools for Qt5 applications.
    10. openmpi-bin, openmpi-common, openmpi-doc, libopenmpi-dev: Open MPI libraries and tools for parallel computing.
    11. doxygen: Documentation generator for source code.
    12. graphviz: Graph visualization software.
    13. imagemagick: Software suite to create, edit, and compose bitmap images.
    14. python3-sphinx: Documentation generator for Python projects.
    15. dia: Diagram creation program.
    16. texlive, dvipng, latexmk, texlive-extra-utils, texlive-latex-extra, texlive-font-utils: TeX/LaTeX typesetting and utilities.
    17. libeigen3-dev: C++ template library for linear algebra.
    18. gsl-bin, libgsl-dev, libgslcblas0: GNU Scientific Library (GSL) for numerical computations.
    19. libxml2, libxml2-dev: XML parsing libraries and development files.
    20. libgtk-3-dev: Development files for GTK+ 3 graphical user interface library.
    21. lxc-utils, lxc-templates: Linux Containers (LXC) utilities and templates.
    22. vtun: Virtual Tunnels over TCP/IP networks.
    23. uml-utilities: User-mode Linux utilities.
    24. ebtables: Ethernet bridge administration tools.
    25. bridge-utils: Utilities for configuring network bridges.
    26. libboost-all-dev: Collection of Boost C++ libraries for development.

Command:           

“sudo apt install gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 tcpdump wireshark sqlite sqlite3 libsqlite3-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools openmpi-bin openmpi-common openmpi-doc libopenmpi-dev doxygen graphviz imagemagick python3-sphinx dia imagemagick texlive dvipng latexmk texlive-extra-utils texlive-latex-extra texlive-font-utils libeigen3-dev gsl-bin libgsl-dev libgslcblas0 libxml2 libxml2-dev libgtk-3-dev lxc-utils lxc-templates vtun uml-utilities ebtables bridge-utils libxml2 libxml2-dev libboost-all-dev” 

Screenshot:

Install Required Libraries and Development Tools

Click Yes to install wireshark packages to capture the packets from Network simulator 3.

Install Required Libraries and Development Tools
Install Required Libraries and Development Tools

Installation of the Required Libraries and Development Tools package completed successfully.

INSTALL NETWORK SIMULATOR 3 (NS3):

  1. Locating the ns-allinone-3.42 Folder:

Next, we need to install the NS 3 in our system so locate the Extracted ns-allinone-3.42 folder in the home directory.

Screenshot:

Locating the ns-allinone-3_42 Folder

2.Launching the terminal in the ns-allinone-3.42 Folder:

Then Right Click in the current Directory and select the “Open in Terminal” button and it will launch the terminal.

Screenshot:

Launching the terminal in the ns-allinone-3_42 Folder

Here, we launched the terminal by that button in the folder.

Launching the terminal in the ns-allinone-3_42 Folder

3.Building the terminal in the ns-allinone-3.42 Folder:

Next, we need to build the ns-3.42 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.42.

Command:      “./build.py”

Screenshot:

Building the terminal in the ns-allinone-3_42 Folder

Netanim Building process:

Screenshot:

Netanim Building process

Ns-3.42 Configuring process:

Screenshot:

Ns-3_42 Configuring process

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_42 Configuring process

Ns-3.42 Configuration Completed successfully.

Ns-3.42 Building process:

Screenshot:

Ns-3_42 Building process

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_42 Building process

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-get install python3-pip

 python3 -m pip install –user cppyy==3.1.2”

Screenshot:

Enable Python Bindings

Screenshot:

Enable Python Bindings

Pip package installed successfully in python.

Screenshot:

Here we installed the python bindings required packages successfully.

Ns-3.42 Location Change:

Change the location to the ns-3.42.

Command:cd ns-.3.42

Screenshot:

Ns-3_42 Location Change

Ns-3.42 Configuring process:

The Ns 3.42 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_42 Configuring process

Ns-3.42 Configuration Completed successfully.

Ns-3.42 Building process:

Screenshot:

Ns-3_42 Building process

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_42 Building process

Ns-3.42 Installed successfully in the Ubuntu 22.04 system. ns3simulation.com  guarantees best solution for your implementation.