Network Simulator-3 (NS-3) Practical Lab Manual
ISBN 9788119221820

Highlights

Notes

  

Practical 3:: Steps for Installing NetAnim and Wireshark Simulator

Installation of NS3 on Ubuntu 18.04/Linux Mint 19

Step 1: Check Ubuntu Version

    1. Open the terminal (use the Ctrl+Alt+T keyboard shortcut).

    2. Type in the following command and hit Enter: cat /etc/lsb-release

Step 2: Upgrade the package list by executing following command: sudo apt -f upgrade

Note: Make sure that your OS is having GCC version >= 5.4.0

    1. To know GCC version on your system

    2. Open the terminal (use the Ctrl+Alt+T keyboard shortcut). Type in the following command and hit Enter:

    Option 1. Issue command “gcc –version” Example: ...Option 2. Issue command “gcc -v”

Step 3: Install following required packages:

For ns-3:

gcc

g++

python

python-dev

For NetAnim:

qt5-default

For PyViz:

libgtk-3-dev

python-pygoocanvas

python-pygraphviz

For Wireshark and Gnuplot:

wireshark

gnuplot

Command to install all these packages together:

sudo apt-get install gcc g++ python python-dev qt4-dev-tools libgtk-3-dev python- pygoocanvas python-pygraphviz wireshark gnuplot

Step 4: Download ns-allinone-3.27.tar.bz2 and unzip it. For unzip write following command.

tar -xvjf ns-allinone-3.27.tar.bz2

Step 5: Go to ns-allinone-3.27 folder and install ns3: Follow the bellow command to do so:

cd ns-allinone-3.27

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

This command will install ns-3, NetAnim and PyViz. You will be having a list of built and unbuilt modules after successful installation.

Step 6: Once the installation completes, go to ns-3.27 and give the following command for testing the installation:

cd ns-allinone-3.27/ns-3.27/./test.py -c core

./waf –run hello-simulator You are done!

Step 7: To install the Wireshark

ns-allinone-3.32$sudo apt-get install wireshark

Step 8: To install GNUplot

ns-allinone-3.32$ sudo apt-get gnuplot

Note:

Minimal requirements for C++ users sudo apt-get install g++ python3

Minimal requirements for Python API users

sudo apt-get install g++ python3 python3-dev pkg-config sqlite3

NetAnim animator: - qt5 development tools are needed for NetAnim animator sudo apt-get install qt5-default mercurial