NetSimulyzer ns-3 Add-on Module.
In fact, ‘NetSimulyzer’ consists of two parts. One is the actual 3D visualization tool and the other is an ns-3 companion module. Both are named as NetSimulyzer — so it will make some confusion during installation.
This article will only explain the installation of ‘NetSimulyzer ns-3 companion module’ — which is used to generate 3D traces needed for recreating the 3D network scenarios
Note: The following article explains the installation of the ‘NetSimulyzer 3D visualization tool’ under Debian/Ubuntu Linux variants which is going to be used to test the ns-3 NetSimulyzer module simulation.
Installing NetSimulyzer 3D Visualization Tool under Debian/Ubuntu
Installation Requirements
- (Preferably) a Debian/Ubuntu or any Linux variant.
- A C++ 17 compliant compiler
Minimum supported compilers:
GCC 7.3.0
or Clang 6.0.0 - This ns-3 NetSimulyzer module installation will require a pre-installed ns-3 (in this case, ns-3.33).
- And most preferably, a computer/laptop with a higher-end CPU and a LOT of memory. (Even though, this ns-3-waf compile process can be done on a computer with decent hardware, compiling NetSimulyzer Tool part that will be used to visualize the 3D simulation outputs of ns-3 will consume a lot of CPU and memory resources and may just ‘hang’ or ‘crash’ your machine)
Installation
Step 1: Install with the necessary packages/prerequisites and make ns-3.33 as explained at https://www.nsnam.org/wiki/Installation. (Even though compiling of ns-3 is not needed now, we may do it to confirm the good working of basic ns-3 install).
And check ns-3’s good working by running a sample simulation.
Step 2: Install ‘git’ if needed
Step 3: Change to a folder under which you want to install NetSimulyzer module and clone the NetSimulyzer ns-3 module project from github. (Preferably, we may install a new module under ‘contrib’ folder of ns-3.
$ git clone https://github.com/usnistgov/NetSimulyzer-ns3-module netsimulyzer
This will create a folder ‘netsimulyzer’ under the path /home/yourname/ns-allinone-3.33/ns-3.33/contrib
Step 4: Reconfigure & Rebuild ns-3 with the newly added netsimulyzer module
$./waf configure –enable-examples
$ ./waf
The output of successful Install
After the completion of waf build, the terminal screen will list all the available ns3-modules. Notice the highlighted name netsimulyzet in that list.
Step 5: Run mobility-buildings-example.cc using the following command to check the newly added netsimulyzer module in action
The following terminal output shows the simulation outputs of ‘mobility-buildings-example’. (Infact, this simulation is not creating any particular console output – but it will create a 3D trace output file called ‘netsimulyzer-mobility-buildings-example.json’. Further, that .jason file ‘netsimulyzer-mobility-buildings-example.json’ will be available under ns-3.33 folder.
Step 6: Run the NetSimulyzer visualization tool that was installed earlier (as explained in the article https://www.projectguideline.com/installing-netsimulyzer-3d-visualization-tool-under-debian-ubuntu/)
$ ./build/netsimulyzer
This will open the NetSimulyzer user interface from which you can load and play .jason format output 3D trace files.
Step 7: Load and visualize a 3D Network Scenario (that was previously created during Step 5)
In this example, the output file of the ns-3 example simulation ‘netsimulyzer-mobility-buildings-example.cc’ – ‘netsimulyzer-mobility-buildings-example.json’ has been loaded in the NetSimulyzer visualization tool. By clicking Node 0, we can ‘look’ the scenario from that node’s camera perspective.
The following posts show the use of NetSimulyzer.
- 3D Aquatic Animal Tracking Underwater Network Simulation (UWSN) Under ns-3
- Implementation of Circle Mobility Model for ns-3 and Visualizing it in 3D