Skip to content

Installing NetSimulyzer 3D Visualization Support Add-on Module in ns-3 under Debian/Ubuntu

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 

  1. (Preferably) a Debian/Ubuntu or any Linux variant.
  2. A C++ 17 compliant compiler
    Minimum supported compilers:
    GCC 7.3.0
    or Clang 6.0.0
  3. This ns-3 NetSimulyzer module installation will require a pre-installed ns-3 (in this case, ns-3.33).
  4. 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.

$./waf -run examples/tutorial/first

Step 2: Install ‘git’ if needed

$ sudo apt install git

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.

$ cd /home/yourname/ns-allinone-3.33/ns-3.33/contrib

$ 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

$ cd /home/yourname/ns-allinone-3.33/ns-3.33/

$./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

$ ./waf –run mobility-buildings-example

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/)

$ cd  /home/yourname/NetSimulyzer

$ ./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.

References:

  1. https://www.nsnam.org/wiki/Installation
  2. https://github.com/usnistgov/NetSimulyzer
  3. https://github.com/usnistgov/NetSimulyzer-ns3-module
  4. https://dl.acm.org/doi/10.1145/3460797.3460806
WhatsApp Discuss Through WhatsApp