Skip to content

Installing ns-3.42 and NetAnim Under Debian 11

ns-3.42 was released on May 29, 2024. The main feature addition in ns-3.42 was support for the 3GPP 38.311 Non-Terrestrial Networks channel model, including a new circular aperture antenna model described in that channel model, and a mobility model supporting geocentric positions and conversion to topocentric coordinate systems[1].

This article is about compiling and installing ns-3.42 on Debian 11 using cmake system. (If one needs to install it under chroot based virtualization, then they may setup a chroot jail as explained in [3])

Supported platforms and requirements [2]

As mentioned in[2], this release is intended to work on systems with the following minimal requirements (Note: not all ns-3 features are available on all systems):

    • g++-9 or later, or LLVM/clang++-10 or later
    • Python 3.6 or later
    • CMake 3.13 or later
    • (macOS only) Xcode 11 or later
    • (Windows only) Msys2/MinGW64 toolchain or WSL2

But as mentioned in[2],  not all ns-3 features are available on all systems. It means, some modules or features of ns-3 will not be available in some platform while we are compiling it under that platform.

Installing ns-3.42 under Debian 11

Hidden Section! Contact Charles  

The key/passphrase will be given once you have been approved for getting paid research support/assistance from Charles. To get paid support, you may start a 'free' research discussion.  

WhatsApp chatDiscuss Through WhatsApp
 

Step 7: Installing ns-3.42

Note: For Chroot based installation of ns-3, we need to edit the configuration and installation script ‘ns3’ as explained in step 2 of the procedure [6], before trying to run the script ‘ns3’.

 $ cd /home/your_home/ns-allinone-3.42/ns-3.42
 $  ./ns3 configure

The following screenshot shows the successful “configure operation” in which you can see the modules that are configured to build.

 

Step 8: Compiling ns-3-dev

$ cd /home/your_home/ns-allinone-3.42/ns-3.42
$ ./ns3 build -j2
Running the script from the folder cd /home/your_home/ns-allinone-3.42/ns-3.42 will compile ns-3.42 using CMake.

The following screenshot shows the successful compilation of ns-3.42 under chroot jail.

Step 4: Testing the Installation by Running an Example

We may test the installation by running the example script firs.cc as follows:

$ cd /home/your_home/ns-allinone-3.42/ns-3.42
$ ./ns3 run first
The following screenshot shows the installation completed good so that the example script is running and producing outputs correctly.

 

Installation of NetAnim

Step 1: Creating a Make file for compiling NetAnim

 

The NetAnim installation will need “make’ command. If your system doesn’t contain it, then you have to install it before compiling NetAnim. We need to install  build-essential which will contain “make”
$ sudo apt install  build-essential
The command qmake is used to create the Makefile for making NetAnim.

#Creating Make file for compiling NetAnim
$ cd /home/your_home/ns-allinone-3.42/netanim-3.109

#configure make file using qmake

$ qmake NetAnim.pro

The above commands will create the Makefile for the compilation of NetAnim. The following screenshot shows the successful creation of Makefile.

 

Step 2:Compiling NetAnim

#compiling NetAnim

$ make -j2

# The option -j2 is for compile using only 2 CPU jobs

 

The following screenshot shows the successful compilation of NetAnim.

 

Step3: Testing the working of NetAnim

 

#Runnin NetAnim

$ ./NetAnim

The following screenshot shows the NetAnim GUI.

 

Final Note :

The important thing we have to understand here is, the application which is running under chroot jail environment will get the native or near-native performance of the Host OS and Host hardware. So, we are getting the native software and hardware performance under this unique virtualization technology. So that the ns-3 compile process also gets accelerated and get near-native software and hardware performance.

Some Examples of “chroot-jail” based ns-3 Simulations

In the following articles, you may find some of the simulations that I did under chroot jail. Please note the excellent performance of these GUI based 3D simulations. In fact, these simulations are actually running under chroot jail but the GUI 3D outputs are rendered in the Host Display’s windowing system. So that these simulations are getting the native 3D performance.  One will never get such a level of performance under any other kind of virtualization like “VirtualBox”.

References:

  1. https://www.nsnam.org/releases/ns-3-42/
  2. https://gitlab.com/nsnam/ns-3-dev/blob/ns-3.42/RELEASE_NOTES.md
  3. https://www.projectguideline.com/installing-ns3-35-in-debian-10-chroot-jail-under-debian-11-host-os-or-any-version-of-linux-host/
  4. https://www.nsnam.org/wiki/Installation
  5. https://www.nsnam.org/docs/tutorial/html/getting-started.html
  6. https://www.projectguideline.com/installing-ns-3-dev-under-chroot-jail-and-compile-with-cmake/

 

WhatsApp Discuss Through WhatsApp