OPERATING SYSTEMSOS Linux

Installation of ns3 in ubuntu | ns-3.40

Join this channel to get access to perks:
https://www.youtube.com/channel/UCSckTbBIf39jf2dIbruS32A/join

About the Video and the instructions:
ns3 recently released ns-3.40, we are going to see how to install that in Ubuntu 22.04 OS

Here are the requirements
1. Ubuntu 22.04 LTS
2. ns-allinone-3.40.tar.bz2

This installation will work for ns-3.38 and ns-3.39 as well.

The first command to do is (You can just copy-paste the following in your terminal window)

$ sudo apt update

$ sudo apt install g++ python3 cmake ninja-build git gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 tcpdump wireshark sqlite sqlite3 libsqlite3-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools openmpi-bin openmpi-common openmpi-doc libopenmpi-dev doxygen graphviz imagemagick python3-sphinx dia imagemagick texlive dvipng latexmk texlive-extra-utils texlive-latex-extra texlive-font-utils libeigen3-dev gsl-bin libgsl-dev libgslcblas0 libxml2 libxml2-dev libgtk-3-dev lxc-utils lxc-templates vtun uml-utilities ebtables bridge-utils libxml2 libxml2-dev libboost-all-dev ccache

let the installation run, in the meantime, we will download ns3 from the website nsnam.org

So we have downloaded the software and installed all the packages.

Now we have to go to the installation.
Open a new Terminal and type the following commands.

Copy the ns-allinone software to the home folder and just right-click and click “Extract here”

Now
$ cd ns-allinone-3.40/

$ ./build.py –enable-examples –enable-tests

(This above line will install all the packages for ns3 along with netanim, flow monitor, protocol, applications, etc.)
Depending on your system, the time can be anywhere between 20 minutes to sometimes 1 hour (in the case of a VM with low RAM)

Installation is completed.
To check whether they are working, use the following command

Open a new terminal

$ cd ns-allinone-3.40/ns-3.40/
$ ./ns3 run hello-simulator

Hello Simulator

$ ./ns3 run first.cc

so ns3 is installed successfully.

Thanks for watching!!!!

My other Channel – https://www.youtube.com/tspradeepkumar1​
My Tech Blog – https://www.nsnam.com/
My Personal webiste – https://www.pradeepkumar.org ​
______________________________

Follow me on,
Instagram – https://www.instagram.com/tspradeepkumar
Facebook – https://www.facebook.com/tspradeep​
Twitter – https://twitter.com/tspradeepkumar​
________________________________

source

ubuntu

7 thoughts on “Installation of ns3 in ubuntu | ns-3.40

  • thank you for this tutorial , E: Unable to locate package sqlite . can you help me in this error

  • thank you sir it was very helpful , now sir i have a question does the process for installation of netsimulizer same for this version of ns3 ?

  • Thanks for the explanation! I run into problems executing python files (the first.py file for example). I think this is because the waf command doesn't come with the build function in the latest installations anymore. Is there an alternative to that?

Comments are closed.