0% found this document useful (0 votes)
28 views4 pages

ns-3 Installation

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

ns-3 Installation

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ns-3 Installation

• The ns-3 simulator is a discrete-event network simulator.


• ns-3 is designed as a set of libraries that can be combined together and also with
other external software libraries. While some simulation platforms provide users
with a single, integrated graphical user interface environment in which all tasks are
carried out, ns-3 is more modular in this regard. Several external animators and data
analysis and visualization tools can be used with ns-3. However, users should
expect to work at the command line and with C++ and/or Python software
development tools.
• Website and Documentation
o The main web site is located at https://www.nsnam.org and provides access
to basic information about the ns-3 system. Detailed documentation is
available through the main web site at
https://www.nsnam.org/documentation/.
• Installation page https://www.nsnam.org/wiki/Installation
• Tools
o VMware
o Ubuntu (highly compatible with ns-3)
Use the versions uploaded to this link
https://drive.google.com/drive/folders/1Gd2iAza_oncTJZYuI7gR_WwKQrRp
uuDY?usp=share_link
o ns-3
o Any C++/Python IDE to be used as an editor (VS Code or Eclipse)
• Ubuntu Installation into VMware, (Recommended 4GB RAM and 25GB Hard Disk)
o https://www.youtube.com/watch?v=9rUhGWijf9U
• ns-3 download and building:
o Open a new terminal window and run the following commands (Do Not
copy the $):
$ cd Desktop
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt install build-essential
$ sudo apt-get install gcc g++ python python-dev mercurial bzr gdb
valgrind gsl-bin libgsl0-dev libgsl23
$ sudo apt-get install flex bison tcpdump sqlite sqlite3 libsqlite3-dev
libxml2 libxml2-dev
$ sudo apt-get install libgtk2.0-0 libgtk2.0-dev uncrustify doxygen
graphviz imagemagick texlive texlive-latex-extra texlive-xetex
$ sudo apt-get install texinfo dia texlive texlive-latex-extra texlive-extra-
utils texi2html
$ sudo apt-get install gir1.2-goocanvas-2.0 python-gi python-gi-cairo
python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-pygraphviz python3-
pygccxml
$ sudo apt-get install openmpi-bin openmpi-common openmpi-doc
libopenmpi-dev
$ sudo apt-get install dpdk dpdk-dev libdpdk-dev dpdk-igb-uio-dkms
$ sudo apt install -y python3-pip
$ pip3 install ipython
$ pip3 install kiwi
$ wget https://www.nsnam.org/release/ns-allinone-3.33.tar.bz2
$ tar xjf ns-allinone-3.33.tar.bz2
$ cd ns-allinone-3.33
$ ./build.py --enable-examples --enable-tests
$ cd ns-3.33
$ ./test.py or ./test.py -c core
$ ./waf -d debug --enable-examples --enable-tests configure
(recommended not required)
• Run first script:
o Open a new terminal window.
o Go to the tutorial folder à $ cd Desktop/ns-allinone-3.33/ns-3.33/examples/tutorial
o Copy the code file in scratch folder à $ cp first.cc ../../scratch/
o $ cd ../..
o ./waf --run scratch/first
o The output should look like this:

• netanim Installation
o Open a new terminal window.
o $ sudo apt-get install qt5-default mercurial
o $ cd Desktop/ns-allinone-3.33/netanim-3.108
o $ make clean (make: *** No rule to make target 'clean'. Stop. à this output is not an
error it means that the make is already clean)
o $ qmake NetAnim.pro
o $ make
o Open the NetAnim application à $ ./NetAnim
• VS Code Installation
o Open Ubuntu Software à Development à Visual Studio Code à Install.
o Open VS code and install C/C++ Microsoft Extension.

o Open a new terminal window.


o $ cd Desktop/ns-allinone-3.33/ns-3.33
o $ code .
o Ctrl+Shift+P à Edit C/C++: Edit Configuration (UI)
o Include the following paths:

You might also like