Quick Steps to Install NS2 on Ubuntu 16.04

3,572 views 6 slides Jun 03, 2017
Slide 1
Slide 1 of 6
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6

About This Presentation

This Pdf contains Quick steps to Install NS2 (Network Simulator) on Ubuntu 16.04 OS.


Slide Content

 
DIGITAL PADM
STEPS TO INSTALL NS2 ON UBUNTU 16.04
 
 
-ARVIND PANDE​ - 
 
 
 
 
 

https://digitalpadm.com 
 
 
NS2isanopen-sourcesimulationtoolthatrunson              
Linux.Itisadiscreteeventsimulatortargetedat             
networkingresearchandprovidessubstantialsupportfor           
simulationofrouting,multicastprotocolsandIP           
protocols,suchasUDP,TCP,RTPandSRMoverwiredand                
wireless (local and satellite) networks.  
Hereiputupsimplestepstoinstallns2onubuntu16.04                 
Operatingsystem.Youcanalsofindstepstoremoveor               
uninstall ns2 software. 
DIGITAL PADM 
 
Step 1: 
Download NS2 (NS- 2.35) from here 
It get downloaded into your ‘/home/your_user_name/Downloads’ directory. 
Copy it to /opt folder by following command 
 
 
 
 

https://digitalpadm.com 
 
cp  /home/user_name/Downloads/ns-allinone-2.35.tar.gz /opt/ 
 
Step 2: 
Install Prerequisites 
Type following commands on terminal 
sudo apt-get update 
sudo apt-get dist-upgrade 
sudo apt-get update 
sudo apt-get gcc 
sudo apt-get install build-essential autoconf automake 
sudo apt-get install tcl8.5-dev tk8.5-dev 
sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev 
 
 
Step 3 : 
 
 
 
 

https://digitalpadm.com 
 
Extract ns2 
Type following commands on terminal 
tar -zxvf ns-allinone-2.35.tar.gz 
cd ns-allinone-2.35 
./install 
 
Step 4: 
Open bashrc file to Set the Environment Variables 
Type following commands on terminal 
sudo gedit ~/.bashrc 
 
 
 
 
Copy the following lines at the end of the file. 
 
 
 
 

https://digitalpadm.com 
 
# LD_LIBRARY_PATH 
OTCL_LIB=/opt/ns-allinone-2.35/otcl-1.14/ 
NS2_LIB=/opt/ns-allinone-2.35/lib/ 
USR_Local_LIB=/usr/local/lib/ 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$USR_Local_LIB 
# TCL_LIBRARY 
TCL_LIB=/opt/ns-allinone-2.35/tcl8.5.10/library/ 
USR_LIB=/usr/lib/ 
export TCL_LIBRARY=$TCL_LIBRARY:$TCL_LIB:$USR_LIB 
# PATH 
XGRAPH=/opt/ns-allinone-2.35/xgraph-12.2/:/opt/ns-allinone-2.35/bin/:/opt/ns-allinone-2.35/
tcl8.5.10/unix/:/opt/ns-allinone-2.35/tk8.5.10/unix/ 
NS=/opt/ns-allinone-2.35/ns-2.35/ 
NAM=/opt/ns-allinone-2.35/nam-1.15/ 
export PATH=$PATH:$XGRAPH:$NS:$NAM 
 
 
 
 

https://digitalpadm.com 
 
Type following commands on terminal 
1.source ~/.bashrc 
Type following commands on terminal 
1.ns 
If you received the “%” sign, it means that NS is running correctly ! 
 
Here is the step by step tutorial for NS2 installation  & uninstallation from 
Ubuntu 16.04 OS.