The document discusses setting up the NS-3 network simulator on Linux and Windows. It covers installing WSL2 on Windows, installing VSCode, and building and testing NS-3 and the Lorawan module. Instructions are provided for configuring NS-3, building from source, and running a simple example simulation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
28 views11 pages
2024-Computer Networks-NS3
The document discusses setting up the NS-3 network simulator on Linux and Windows. It covers installing WSL2 on Windows, installing VSCode, and building and testing NS-3 and the Lorawan module. Instructions are provided for configuring NS-3, building from source, and running a simple example simulation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11
Computer Networks
NS-3 Discrete Event Network Simulator
Ahmet Kaşif 06.05.2024 NS-3 Environment Setup • Linux environment required. • If you are using Windows, you may utilize WSL2! • WSL2 utilizes a real Linux kernel, enabling fully native NS-3 experience. • WSL2 extension for VSCode is suggested. Installation of WSL2 • Linux users can bypass this phase. • Windows users are required to install WSL2. • Installation instructions are provided from this link: https://learn.microsoft.com/en-us/windows/wsl/install • This code must be run on an PowerShell or Windows Command Prompt : • wsl –install • Default parameters may be kept. It is suggested to use a Ubuntu system to be compatible with this presentation. • Next: Continue setting up VSCode Installation of VSCode • Install VSCode from this link: • Instructions: https://code.visualstudio.com/download (suggestion: x64, system wide installation) • Install WSL2 extension for VSCode: • Instructions: https://code.visualstudio.com/blogs/2019/09/03/wsl2 • Enter VSCode from WSL: • Open a WSL terminal on Windows. • Type <code .> to open up a VSCode window. • Next: Continue setting up NS-3 Installation of NS-3 • You may want update your system before proceeding: • sudo apt-get update • sudo apt-get upgrade • Installation instructions for NS-3 on Linux: • https://www.nsnam.org/docs/release/3.41/installation/html/linux.html • Warning: Requires around 1GB of download, so you may want to use school network! • Install required packages: • sudo apt-get install g++ python3 cmake ninja-build git • Install recommended packages: • sudo apt-get install ccache clang-format clang-tidy gdb valgrind Installation of NS-3 (Contiuation) • These optional packages are not required but can also be installed at will: Installation of NS-3 • Now, we are ready to install NS-3! • Download a release tarball. • wget https://www.nsnam.org/releases/ns-allinone-3.41.tar.bz2 • Unpack the tarball and enter into build directory. • sudo apt-get install bzip2 • tar xfj ns-allinone-3.41.tar.bz2 • cd ns-allinone-3.41/ns-3.41 Building & Testing NS-3 • Configure the default build profile: • ./ns3 configure --enable-examples --enable-tests Lorawan module • Requirements: • sudo apt install g++ python3 cmake ninja-build git ccache • Clone lorawan repository inside «src» directory • git clone https://github.com/signetlabdei/lorawan src/lorawan • Build from a clean state • ./ns3 configure --enable-tests --enable-examples --enable-modules lorawan • ./ns3 build • Test the new build • ./test.py Lorawan Simple Network Example Run the following prompt to execute a simple network configuration. ./ns3 run simple-network-example Questions? • Thank you for listening