Skip to content

Installing ns3.35 in Debian 11 (Bullseye)

Installation of ns-3 Under Debian 11 (Bullseye)

The ns3.35 and netanim-3.108 can be installed under Debian 11 without any problem. 

Important Note:

Under Debian 11 (Bullseye) we should not try to install the package qt5-default. In fact,  qt5-default will not be available in Debian 11  repositories (And you should not try to install  qt5-default package from other old repositories. Which may lead to broken packages in your system).

Step 1: Install the necessary dependencies of ns3 

# refresh the database of available packages
$ sudo apt-get update

#install the dependencies
$ sudo apt install g++ python3 python3-dev pkg-config sqlite3 qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools

#(see https://www.nsnam.org/wiki/Installation for more details)

Step 2: Download ns3.35 from https://www.nsnam.org/releases/ns-3-35/

# Download ns-allinone-3.35.tar.bz2under home directory
# cd /home
$ wget https://www.nsnam.org/releases/ns-allinone-3.35.tar.bz2

#extract the compressed file using your own method

In this procedure, I will extract the directory structure of ns-3.35under the folder /home/jason/ns-allinone-3.35 

The following output shows the absolute path of ‘ns-allinone-3.35’ installation from file explorer.

 

Step 3: Compiling ns-3.35

 

#compiling ns-3.35

$ cd /home/jason/ns-allinone-3.35/ns-3.35

#configure make file according to the environment 
$./waf –disable-python configure

# Sometimes we may need to configure some gcc options  and then configure the make as follows
#  CXXFLAGS=”-Wall -g -O0″ ./waf –disable-python configure

The following terminal output shows the successful configure operation:
The red warnings show the options that are not enabled in the configuration.
 
 

Step 4: Making ns-3.35 using ‘waf’

#Compiling ns-3.35
$ ./waf
 

 

The following terminal shows the successful compile of ns-3.35

Installation of NetAnim

Step 1: Creating a Make file for compiling NetAnim

The command qmake is used to create the Makefile for making NetAnim.

#Creating Make file for compiling NetAnim

$ cd /home/jason/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

#compiling NetAnim

$ make -j9

# the option -j9 is for compile using multiple CPU jobs

The following screenshot shows the successful compile of NetAnim.

 

Step3: Testing the working of NetAnim

The following screenshot shows the NetAnim GUI

The followong artcle explains the way of installin ns-3.35 on chroot Jail:

Installing ns3.35 in Debian 10 chroot Jail Under Debian 11 Host OS or any Version of Linux Host

References:

  1. https://www.nsnam.org/wiki/Installation
WhatsApp Discuss Through WhatsApp