Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

2021/04/23

NST32031-Practical for Wireless Network


Department of ICT
Faculty of Technology
South Eastern University of Sri Lanka
Lab Sheet 01

Title: Getting started with NS3


Prerequisites: Linux basics, networking basic knowledge, basics of programming
Prerequisites tools: Python, C++ compiler, Linux environment setup, VMware /Virtual box/
Fusion (mac), IDE (Eclipse)
Official website: https://www.nsnam.org/

1. Setup the environment;


a. Install VMware - https://my.vmware.com/web/vmware/downloads/#all_products
i. Select VMware Workstation Player
ii. Double click on the .exe file and install it into your local machine.
Instead of VMware, you can use the virtual box as well. -
https://www.virtualbox.org/wiki/Downloads

b. Download Ubuntu server version – https://ubuntu.com/server

c. Setup VMware /virtual box – Ubuntu environment establishment


i. For virtual box refer to this article to install -
https://brb.nci.nih.gov/seqtools/installUbuntu.html
ii. For VMware refer to the below article –
https://theholmesoffice.com/installing-ubuntu-in-vmware-player-on-windows/
2. NS3 installation
Guidelines can be found at https://www.nsnam.org/wiki/Installation#Downloading_ns-
3_Using_a_Tarball

a. Go to your Ubuntu environment – open Ubuntu terminal


i. Command ‘ls’ – to check available files in the system
ii. Change your directory to desktop
1. Type: cd Desktop/
2. Type below the command to update and upgrade your systems and
repositories.
sudo apt-get update or sudo apt update

sudo apt-get upgrade or sudo apt upgrade

3. The copy pate below command to install all (nearly 800MB) prerequisite
libraries to your system;

All libraries;

sudo apt-get install gcc g++ python python-dev mercurial bzr gdb valgrind gsl-bin libgsl0-dev
libgsl0ldbl flex bison tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-
dev uncrustify doxygen graphviz imagemagick texlive texlive-latex-extra texlive-generic-extra
texlive-generic-recommended texinfo dia texlive texlive-latex-extra texlive-extra-utils texlive-
generic-recommended texi2html python-pygraphviz python-kiwi python-pygoocanvas
libgoocanvas-dev python-pygccxml

To install minimum prerequisite packages;

sudo apt-get install build-essential autoconf automake libxmu-dev python-pygoocanvas python-


pygraphviz cvs mercurial bzr git cmake p7zip-full python-matplotlib python-tk python-dev python-
kiwi python-gnome2 python-gnome2-desktop-dev python-rsvg qt4-dev-tools qt4-qmake qt4-
qmake qt4-default gnuplot-x11 wireshark

Or else by using https://www.nsnam.org/wiki/Installation site install packages one by one.

4. Downloading ns-3
a. Using a Tarball; type one of the below commands to download ns3
packages
i. tar xjf ns-allinone-3.30.tar.bz2
ii. tar –xvf ns-allinone-3.30.tar.bz2
b. Or download the ns3 package from https://www.nsnam.org
5. Once downloading is finished type the below command to go to the
directory
a. cd ns-allinone-3.30/
b. sudo apt-get install synaptic
i. install the synaptic package manager
c. sudo synaptic
i. run the synaptic
d. ls
i. check build.py is available inside your directory
1. ./build.py –enable-examples –enable-tests
Build the ns3

You might also like