This document provides instructions for installing NS-2.34 on Ubuntu 12.04. It involves downloading the NS-2.34 file, installing required libraries, extracting and modifying specific files, running the installation, setting the path, and validating the installation. Minor modifications are needed to some files to avoid errors during installation. Once installed, typing 'ns' in the terminal should start the NS-2 simulator.
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 ratings0% found this document useful (0 votes)
62 views2 pages
NS-2.34 Installation On Ubuntu 12.04
This document provides instructions for installing NS-2.34 on Ubuntu 12.04. It involves downloading the NS-2.34 file, installing required libraries, extracting and modifying specific files, running the installation, setting the path, and validating the installation. Minor modifications are needed to some files to avoid errors during installation. Once installed, typing 'ns' in the terminal should start the NS-2 simulator.
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/ 2
Though this is aimed at 12.04 version you can try installing in any version of Ubuntu before upgrading!
NS-2.34 Installation on Ubuntu 12.04 NS-2.34 Installation on Ubuntu 12.04
Share this on Facebook Tweet this View stats (NEW) Appointment gadget >> Sunday, March 3, 2013 1.Download ns-allinone-2.34.tar.gz file from http://sourceforge.net/projects/nsnam/files/ 2.Copy the ns-allinone-2.34.tar.gz file in to the desktop directory. Note: All the commands listed from here assumes the ns2 to be in desktop; you can put the extracted file anywhere and change the address in the commands correspondingly. 3.open terminal type: sudo apt-get update (to get list of update packages/libraries in OS) 3.Install required libraries for ns2 using terminal: sudo apt-get install build-essential autoconf automake libxmu-dev sudo apt-get install xorg-dev g++ xgraph 4.Extract the ns-allinone-2.34.tar.gz file by typing following commands in terminal: cd Desktop <Enter> tar zxvf ns-allinone-2.34.tar.gz <Enter> (A new folder named ns-allinone-2.34 will be generated.) 5.To avoid installation errors modify the specified files in ns-allinone-2.34 folder as specified below:
i.In ns-allinone-2.34/otcl-1.13/configure change into SHLIB_LD="gcc -shared" instead of SHLIB_LD="ld -shared" ii.ns-allinone-2.34/ns-2.34/tools/ranvar.cc line:219 change return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_); to return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_); iii.Change the lines 183 % and 185 in file ns-allinone-2.34/ns-2.34/mobile/nakagami.cc to resultPower = ErlangRandomVariable(Pr/m, int_m).value(); and resultPower = GammaRandomVariable(m, Pr/m).value(); respectively. iv.Next add a bellow line after line 64 in ns-allinone-2.34/ns-2.34/mac/mac-802_11Ext.h #include <stddef.h> 6. Installation. in terminal goto Desktop/ns-allinone-2.34 and type: ./install This takes about 5min and note down the instructions you get for setting path. 7. Setting Path;According to instructions you get on the terminal after installation change the following path i.In terminal sudo gedit ~/.bash_aliases ii.Then copy the following path into .bash_aliases and modify according to your instructions:
# LD_LIBRARY_PATH OTCL_LIB=/home/anurag/Desktop/ns-allinone-2.34/otcl-1.13 NS2_LIB=/home/anurag/Desktop/ns-allinone-2.34/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 # TCL_LIBRARY TCL_LIB=/home/anurag/Desktop/ns-allinone-2.34/tcl8.4.18/library Installation of ns-2.34 in Ubuntu (preferably 12.04) High speed Internet connection is recommended for faster download and installation 0 Search Search This Blog Total Pageviews 1 5 0 6 5 Join this site with Google Friend Connect Members (2) Already a member? Sign in Followers Anurag View my complete profile About Me Share 0 More Next Blog Create Blog Sign In NS-2.34 Installation on Ubuntu 12.04 http://ns2-ubuntu.blogspot.in/ 1 of 2 Monday 12 May 2014 01:45 PM Home Subscribe to: Posts (Atom) Posted by Anurag at 5:30 PM 7 comments: Labels: ns-2, ns-2.34, ns2, ns2 installation, ns2 installation in ubuntu, Ubuntu USR_LIB=/usr/lib export TCL_LIBRARY=$TCL_LIB:$USR_LIB # PATH XGRAPH=/home/anurag/Desktop/ns-allinone-2.34/bin:/home/anurag/Desktop/ns-allinone-2.34/tcl8.4.18/unix:/home/anurag/Desktop /ns-allinone-2.34/tk8.4.18/unix NS=/home/anurag/Desktop/ns-allinone-2.34/ns-2.34/ NAM=/home/anurag/Desktop/ns-allinone-2.34/nam-1.14/ PATH=$PATH:$XGRAPH:$NS:$NAM iii.Then it takes effect immediately you should give below mentioned using terminal. source ~/.bashrc
8. Now move to Desktop/ns-allinone-2.34/ns-2.34 and type: ./validate Validations tests are performed for about 10-15 min. 9.If you type ns in your terminal % should be displayed. -----------------------------------------This Completes the installation----------------------------------------
+1 Recommend this on Google Watermark template. Powered by Blogger. NS-2.34 Installation on Ubuntu 12.04 http://ns2-ubuntu.blogspot.in/ 2 of 2 Monday 12 May 2014 01:45 PM