Skip to content

​​​​​​​Installing 5G nr and nr-u module on ns-3 under chroot

This article explains the way of installing  nr and nr-u modules on ns-3.35 under chroot-based Debian installation. This is nothing but a learning log of nr and nr-u module installation on ns-3.35.

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:

The NR-U 

NR-U module of ns-3 is used for the simulation of non-standalone cellular networks under ns-3

 

Installation of chroot Jail

This installation procedure is “chroot jail” based one. So one should setup a “chroot Jail” before proceeding with this installation. The following [5] article explains the way of setting up a “chroot jail”.  Even one may follow the procedure to install nr and nr-u under normal Linux installation.

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

Step 1: Installation of the Dependencies

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

$ apt-get update
$ apt-get install git
$ apt-get install libc6-dev
$ apt-get install sqlite sqlite3 libsqlite3-dev

Step 2: Download ns-3-dev Version

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.35. So in future, you may need to install the appropriate version of ns-3 which is compatible with nr and nr-u modules.
 
$ cd /home/your_home/
$ git clone https://gitlab.com/nsnam/ns-3-dev.git

Step 3: Downgrade the ns-3-dev version to ns-3.35

$ cd ns-3-dev

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

$ git checkout ns-3.35

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 contrib
$ git clone https://gitlab.com/cttc-lena/nr.git
$ cd nr
$ git checkout 5g-lena-v1.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.

Step 5: Installing nr-u 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/contrib
$ git clone https://gitlab.com/cttc-lena/nr.git
# cd nr
# git checkout 5g-lena-v1.2.y
Step 6: Configure ns-3
$ cd ns-3-dev
$ ./ns3 configure –enable-examples –enable-tests
The following screenshot shows the output of configure command
 

Step 7: Compile the Default ns-3-dev

$ ./waf build
Under chroot jail based installation, we may need to do the following in some higher versions of ns-3:

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
 

 

If you are using CMake,  to compile ns-3, 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
 

The following screenshot shows the successfully compiled modules under ns-3.35

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.

 

$ cd /home/ns-3-dev
$ ./waf –run cttc-nr-wifi-interference
Now the simulation will run and produce the following output at the end of the simulation.

 

Conclusion

The nr and nr-u 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://gitlab.com/cttc-lena/nr-u
  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