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
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
$ ./ns3 build -j2
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:
$ ./ns3 run first
Installation of NetAnim
Step 1: Creating a Make file for compiling 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”.
- Simulating And Visualizing 3D Mobile Underwater Sensor Network (UWSN) Under ns-3
- Simulating And Visualizing 3D Aerial Ad-hoc Network (AANET) and Flying Ad-hoc Network (FANET) Under ns-3
- Simulation of Multi-Tire UAV/AANET/FANET Topology Using Gauss-Markov 3D Mobility Model Under ns-3
- Using Gauss-Markov 3D Mobility Model Under ns-3 for Simulating Unmanned Aerial Vehicle (UAV), Aerial Ad-hoc Network (AANET) and Flying Ad-hoc Network (FANET)
References:
- https://www.nsnam.org/releases/ns-3-42/
- https://gitlab.com/nsnam/ns-3-dev/blob/ns-3.42/RELEASE_NOTES.md
- https://www.projectguideline.com/installing-ns3-35-in-debian-10-chroot-jail-under-debian-11-host-os-or-any-version-of-linux-host/
- https://www.nsnam.org/wiki/Installation
- https://www.nsnam.org/docs/tutorial/html/getting-started.html
- https://www.projectguideline.com/installing-ns-3-dev-under-chroot-jail-and-compile-with-cmake/