Step-by-Step Guide: Installing and Testing ns-3.45 with LTE (LENA) and 5G-LENA (NR)

This tutorial explains how to install ns-3.45 on Ubuntu, verify the installation, and test both LTE (LENA) and 5G-LENA (NR) modules. The guide is suitable for students, researchers, and beginners in network simulation.


1️⃣ Install Required Dependencies

sudo apt update
sudo apt install g++ cmake ninja-build git \
libsqlite3-dev libboost-all-dev \
libgtk-3-dev python3-dev

These packages are required for building ns-3 and enabling LTE/NR modules.


2️⃣ Download ns-3.45 (Official Release)

cd ~/Downloads
wget https://www.nsnam.org/releases/ns-allinone-3.45.tar.bz2
tar -xjf ns-allinone-3.45.tar.bz2
cd ns-3.45

3️⃣ Configure ns-3

./ns3 configure --enable-examples --enable-tests

If configuration succeeds, you should see:

-- Configuring done
-- Generating done
-- Build files have been written to: .../cmake-cache

4️⃣ Build ns-3

./ns3 build

Successful build confirms that core modules, LTE, and NR are compiled correctly.


5️⃣ Test Basic ns-3 Simulation

./ns3 run hello-simulator
./ns3 run first
./ns3 run second

Sample Execution Output

Console Output:

At time +2s client sent 1024 bytes to 10.1.1.2 port 9
At time +2.00369s server received 1024 bytes from 10.1.1.1 port 49153
At time +2.00369s server sent 1024 bytes to 10.1.1.1 port 49153
At time +2.00737s client received 1024 bytes from 10.1.1.2 port 9

Actual Screenshot from Terminal:

This output validates correct packet transmission, IP configuration, event scheduling, and application-layer communication within the ns-3 discrete-event simulator.


6️⃣ Verify LTE (LENA) Module

LTE is included by default in ns-3.45.

./ns3 run lte-simple-epc

If it runs without errors → LTE LENA is working correctly.


7️⃣ Verify 5G-LENA (NR) Module

5G New Radio (NR) module is included as nr.

./ns3 run nr-simple-epc

If the simulation runs successfully → 5G-LENA is properly installed.

To list available NR examples:

./ns3 run --list | grep nr

Conclusion

You have successfully:

  • Installed ns-3.45
  • Configured and built the simulator
  • Verified basic simulations
  • Confirmed LTE (LENA) functionality
  • Confirmed 5G-LENA (NR) functionality

Your ns-3 environment is now ready for advanced research, including scheduler modification, AI-based resource allocation, and vehicular network simulations.


Author: Idris Adedamola Abdulhameed
Field: Intelligent Transportation Systems & 6G AI-RAN Research

Comments

Popular posts from this blog

From DSRC to 5G NR-V2X: The Road Ahead for Connected Vehicles

CTE 311: ENGINEER IN SOCIETY: CURRICULUM (20/21 SESSION)