Name of the Lab : Wireless Communication and Networking Laboratory
Course Code : EC 4093
Semster : 7th
Credits : 2
Contact Hours : 3 Hours / Week
Pre-requisites : Data Communication and Networking [EC 3006]
Co-requisites : Wireless and Mobile Communication [ EC 4003]
Faculty Members : Prof. Ayaskanta Mishra (Faculty Incharge)
NS-2 Installation
Steps to Install NS-2
Ayaskanta Mishra, Assistant Professor, FIC Lab
Wireless Communication & Networking Lab
Kalinga Institute of Industrial Technology (KIIT), Bhubaneswar-751024
Prerequisite OS: Ubuntu Version: 14.04
Step-1: Uninstall NS-2 & NAM from Software Center (if already installed)
Step-2: Copy two zip files to /home/wcn (Home Directory)
1. ns-allinone-2.35.zip 2. tracegraph202.zip
Step-3: Unzip the above two files in the same location
Step-4: Adding Environmental Variables
gedit ~/.bashrc (Copy and Paste below in .bashrc file)
# LD_LIBRARY_PATH
OTCL_LIB=/home/wcn/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/wcn/ns-allinone-2.35/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/wcn/tracegraph202/bin/glnx8
# TCL_LIBRARY
TCL_LIB=/home/wcn/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/wcn/ns-allinone-2.35/bin:/home/wcn/ns-allinone-2.35/tcl8.5.10/unix:/home/wcn/ns-allinone-2.35/tk8.5.10/unix
#the above two lines beginning from xgraph and ending with unix should come on the same line
NS=/home/wcn/ns-allinone-2.35/ns-2.35/
NAM=/home/wcn/ns-allinone-2.35/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM
Step-5: Restart the System
Step-6: Execute in Terminal
> ns <filename.tcl> <ENTER>
> nam <filename.nam> <ENTER>
> xgraph <file1, file1, file3… > <ENTER>
Execute tracegraph202:
> cd home/wcn/tracegraph202/bin/glnx86
> ./trgraph