Skip to content

Installing 5G-Lena 3GPP-NR module on ns-3.36 under Debian OS

This article explains the way of installing 5G-Lena 3GPP-NR module on ns-3.36 under Debian OS. This is nothing but a learning log of 5G-Lena 3GPP-NR module installation on ns-3.36 .

5G New Radio(NR)

5G NR is a new radio access technology (RAT) developed by 3GPP for the 5G (fifth generation) mobile network. It was designed to be the global standard for the air interface of 5G networks[3].

 

5G NR uses frequency bands in two frequency ranges[3]:

  1. Frequency Range 1 (FR1), for bands within 410 MHz – 7125 MHz
  2. Frequency Range 2 (FR2), for bands within 24250 MHz – 52600 MHz

The non-standalone (NSA) mode of 5G NR refers to an option of 5G NR deployment that depends on the control plane of an existing 4G LTE network for control functions, while 5G NR is exclusively focused on the user plane.

5G-Lena 3GPP-NR module

5G-LENA is a GPLv2 New Radio (NR) network simulator, designed as a pluggable module to ns-3 by Mobile Networks group of a public research institute, CTTC (Centre Tecnològic de Telecomunicacions de Catalunya)[1].  The simulator is the natural evolution of LENA, the LTE/EPC Network Simulator, the development Inspired by mmWave module by NYU/UniPD] [2], and it incorporates fundamental PHY-MAC NR features aligned with NR Release 15[1]

The 5G-LENA code of [1] that I used in this installation is a version meant for installing 3GPP NR module in ns-3-dev and it is for the simulation 5G NR non-standalone cellular networks under ns-3 using 5G-LENA project. 

 

The following architectural description from[4] describes all the building blocks from a remote host to a User Equipment of their Model.

 

One may learn more about the features of this module by reading the following links:

 

This installation procedure is “chroot jail” based one. So one should setup a “chroot Jail” before proceeding this installation. The following [5] article explains the way of setting up a “chroot jail”.

https://www.projectguideline.com/installing-ns3-35-in-debian-10-chroot-jail-under-debian-11-host-os-or-any-version-of-linux-host/

 

Step 1: Installation of ns-3-dev

If ‘git’ is not installed on your system, first install it.

$ sudo apt update
$ sudo apt install git
Download a working copy of the ns-3-dev repository as follows:
Here, we assume that the current dev version is equal to ns-3.36. So in future, you may need to install the appropriate version of ns-3 which is compatible with 5G-LENA and NR modules.
 
$ cd /home/your_home/
$ git clone https://gitlab.com/nsnam/ns-3-dev.git
$ cd ns-3-dev

At this step, you can switch to the compatible ns-3 release branch as follows:

$ git checkout ns-3.36
Under chroot jail based installation, we may need to do the following:

Hidden Section! Contact Charles  

The key/passphrase will be given once you have been approved for getting paid research support/assistance from Charles. To get paid support, you may start a 'free' research discussion.  

WhatsApp chatDiscuss Through WhatsApp
 

Step 3: Configure ns-3

$ cd ns-3-dev
$ ./ns3 configure –enable-examples –enable-tests
The following screenshot shows the the configured modules that are ready to built with the defult ns-3-dev version (3.36)

Step 3: Compile the Default ns-3-dev

$ ./ns3 build
# For example, we may limit jobs as 4 by passing the argument -j4 to limit the CPU usage at the build/compile operation like:
# ./ns3 build -j4

Step 4: Installing NR module from GitLab

You may clone the nr model from GitLab repository from the command prompt as follows.
$ cd /home/your_home/ns-3-dev
$ cd src
$ git clone https://gitlab.com/cttc-lena/nr.git

#now we should switch to the latest NR release branch.
# For example, to switch to the NR version 2.2 we should do the following

cd /home/your_home/ns-3-dev/src/nr
git checkout 5g-lena-v2.2.y

Note: Now the Lena project at GitLab is open to public access. So one can download it without having any access tokens/passwords.
 
The following screenshot shows the successful cloning of the “nr” project.

 

Step 5: Configure the ns-3 again to add the new Lena module

$ cd /home/ns-3-dev
$ ./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.
 
Please note the new module  “nr”  in the configured module list.

 

 

 

Step 6: Build ns-3 to compile it with the new Lena module

$ cd /home/ns-3-dev
$ ./ns3 build
If we compile it, then it  may end up with some errors like the following:
 

You may correct this error as follows:

Hidden Section! Contact Charles  

The key/passphrase will be given once you have been approved for getting paid research support/assistance from Charles. To get paid support, you may start a 'free' research discussion.  

WhatsApp chatDiscuss Through WhatsApp
 

And build again:

$ cd /home/ns-3-dev
$ ./ns3 build
The following screenshot shows the successful installation of ns-3 with 5G Lena ‘nr’ module.

 

Step 6: Testing the Lena nr installation with an Example Simulation

After the successful compilation of ns-3 with nr module, we may test its working by running an example simulation.

The comment section of the simulation example cttc-nr-demo.cc describes  how to setup a simulation using the 3GPP channel model  from TR 38.900. “This example consists of a simple grid topology, in which you  can choose the number of gNbs and UEs. Have a look at the possible parameters  to know what you can configure through the command line.  With the default configuration, the example will create two flows that will  go through two different subband numerologies (or bandwidth parts). For that, specifically, two bands are created, each with a single CC, and each CC containing one bandwidth part.”

 

$ cd /home/ns-3-dev
$ ./ns3 run  cttc-nr-demo
Now the simulation will run and produce the following output at the end of the simulation.

 

Conclusion

The 5G-LENA project is getting improved and updated often. So, one may need to use the correct ns-3 version and the correct 5G-Lena version to successfully compile it under ns-3. In our future article, we may present a more interesting simulation using this new module.

References

  1. https://5g-lena.cttc.es/
  2. https://github.com/nyuwireless-unipd/ns3-mmwave
  3. https://en.wikipedia.org/wiki/5G_NR
  4. https://www.projectguideline.com/installing-ns3-35-in-debian-10-chroot-jail-under-debian-11-host-os-or-any-version-of-linux-host/
WhatsApp Discuss Through WhatsApp