ns-3.37 was released on November 1, 2022 with some interesting updates and features and the base coding style was updated, resulting in a large number of style and whitespace changes[1].
This article is about compiling and installing ns-3.37 on Debian 11 using cmake system.
New user-visible features in ns-3.37[2]
As mentioned in[2], in this version of ns-3, the there are some visible changes in internet module, lte module, wifi module and lr-wpan module.
In [2], the following changes are mentioned:
- This release features upgrades to the IEEE 802.15.4 LR-WPAN models, including support for device association, energy detection, active, and passive scanning, and channel paging.
- 3GPP-based propagation loss models were extended to include outdoor-to-indoor building penetration loss models for three scenarios. A new helper to auto-generate the IPv4 and IPv6 neighbor caches has been added.
- The wifi module contains a number of small improvements and some architectural upgrades to prepare for support of multi-link operation.
- The previous Python bindings generation framework (Pybindgen) was replaced by a new framework (Cppyy), and numerous build system improvements were added to the CMake system introduced in the last release cycle.
Supported platforms and requirements [2]
As mentioned in[2], this release is intended to work on systems with the following minimal requirements.
- g++-8 or later, or LLVM/clang++-6 or later
- Python 3.6 or later
- CMake 3.10 or later
- (macOS only) Xcode 11 or later
- (Windows only) Msys2/MinGW64 toolchain
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.
Setting up Debian 11 ‘Chroot’ Environment
One may follow the steps in the section “The Installation Requirements of chroot jail environment in Host” of the following article[3] to setup Debian 11 chroot environment.
Installing ns3.35 in Debian 10 chroot Jail Under Debian 11 Host OS or any Version of Linux Host
The above article explains a ‘waf’ script based installation procedure of ns-3.35.
But the following is a “cmake” based installation procedure for installing ns-3.37 under Debian 11 Bullseye.
Installing ns-3.37 under Debian 11 chroot jail
Step 7: Installing ns-3.37
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.37/ns-3.37 $ ./ns3 configure –enable-examples –enable-tests
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
The following screenshot shows the successful compilation of ns-3.37 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
$ cd /home/your_home/ns-allinone-3.35/netanim-3.108
#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
$ make -j9
# the option -j9 is for compile using multiple CPU jobs
The following screenshot shows the successful compilation of NetAnim.
Step3: Testing the working of 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-37/
- https://gitlab.com/nsnam/ns-3-dev/blob/ns-3.37/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/