Getting started

Get started with 5G-LENA in matter of minutes.

The first thing to do is take some confidence with the ns-3 environment. We cannot really help you here, but you can find on the Web a lot of information and tutorials. So, we will download and build the 5G-LENA project, but then we will point out some ns-3 tutorials before entering the NR domain.

Download the ns-3 part of the 5G-LENA project

We try to keep in sync with the latest advancements in ns-3-dev. However, in between our upstreamed patched are submitted and accepted, there will be a time in which it will be necessary to use patches "on top of" of ns-3-dev. Technically, these patches are maintained as a "branch" of the ns-3-dev development, and are hosted internally at CTTC.

Download a brand new ns-3-dev repository

To download a working copy of the ns-3-dev repository with the latest changes to support the NR module, you can do the following:

$ git clone
$ cd ns-3-dev
$ git checkout nr

Provide your username and password when asked.

In case you are already using the git mirror of ns-3-dev, hosted at GitHub or GitLab, add the branch that make ns-3-dev supporting the NR module is easy as doing:

$ cd your-local-ns-3-dev-git
$ git remote add mirror-gitlab-cttc
$ git fetch -p --all   # fetch all the branches and update the refs
$ git checkout nr      # checkout a local "nr" branch that points to mirror-gitlab-cttc/nr

Test the installation

To test the installation, after following one of the previous point, you can do a simple configuration and compile test (more options for that later):

$ ./waf configure --enable-examples --enable-tests
$ ./waf

A success for both previous commands indicates an overall success.

Download the 5G-LENA core project

As a precondition to the following steps, you must have a working local git repository. If that is the case, then, your local git repo is ready to include our nr module:

cd src
git clone
cd ..

Please note that the src/nr directory will be listed as "Untracked files" every time you do a git status command. Ignore it, as the directory lives as an independent module. As a result, we have now two parallel repository, but one lives inside the other. We are working to be able to put nr inside the contrib/ directory, as per standard ns-3 rules.

To test the resulting repository, let's configure the project again: $ ./waf configure --enable-examples --enable-tests

If the NR module is recognized correctly, you should see "nr" in the list of built modules. If that is not the case, then most probably the previous point failed. Otherwise, you could compile it:

$ ./waf

If that command returns successfully, Welcome to the NR world !

ns-3 tutorials

If it is the first time you work with the ns-3 environment, we recommend to take things slowly (but steady) and going forward through simple steps. The ns-3 documentation is divided into two categories: the reference manual for the ns-3 core, and a separate model library. We suggest to read the following: