ns2.34 in ubuntu11.04
Posted 02-09-2012 at 01:27 AM by kuldip acharya 2012
Updated 02-13-2012 at 08:45 AM by kuldip acharya 2012
Updated 02-13-2012 at 08:45 AM by kuldip acharya 2012
To install ns2.34 in ubuntu 11.04
This method , pls, read carefully...!
Step 1 : Download the ns-allinone-2.34 from this site:
http://bit.ly/downloadns
Step 2 : Place the ns-allinone-2.34.tar.gz package in your home folder(/home/micman in my case). Right click the package and extract the contents in the same folder.
Step 3: Next, open the Terminal (Applications --> Accessories --> Terminal) or [ctrl+ alt + t]
Step 4: Change to ns-allinone2.34 directory
$ cd /home/kuldip/ns-allinone-2.34
Step 5: First install all the dependencies
$ sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.4 g++-4.4
$ sudo apt-get install xorg-dev xgraph
Edit Makefile.in found at this location ns-allinone-2.34/otcl-1.13/Makefile.in as follows:
Find the line that says:
CC= @CC@
and change it to:
CC= gcc-4.4
Fix the error in the linking of otcl by editing line 6304 of otcl-1.13/configure so that it reads
SHLIB_LD="gcc -shared"
instead of
SHLIB_LD="ld -shared"
Change the line 270 in tcl8.4.18/unix/Makefile.in that reads
CC = @CC@
so it appends the version parameter for version 4.4:
CC = @CC@ -V 4.4
Make sure it is a capital V.
$ sudo gedit ns-2.34/tools/ranvar.cc
change the line 219 from
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_);
$ sudo gedit ns-2.34/mobile/nakagami.cc
change the lines 183 and 185 in file ns-2.34/mobile/nakagami.cc to read
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
and
resultPower = GammaRandomVariable(m, Pr/m).value();
Now the code will compile if you run ./install.
Change the line 270 in tcl8.4.18/unix/Makefile.in that reads
CC = @CC@
so it appends the version parameter for version 4.4:
CC = @CC@ -V 4.4
Make sure it is a capital V.
Finally, run ./install from the ns-allinone-2.34 top folder again.
Step 6 : Begin ns2.34 installation
$ sudo su
# ./install
step7: Once the installation is successful i.e without any errors, we need to add the path information to the file /home/micman/.bashrc
$ sudo gedit /home/kuldip/.bashrc
Append the following lines to the file /home/kuldip/.bashrc (after replacing the instances where you find kuldip with your username)
# LD_LIBRARY_PATH
OTCL_LIB=/home/kuldip/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/kuldip/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/kuldip/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/kuldip/ns-allinone-2.34/bin:/home/kuldip/ns-allinone-2.34/tcl8.4.18/unix:/home/kuldip/ns-allinone-2.34/tk8.4.18/unix
#the above two lines beginning from xgraph and ending with unix should come on the same line
NS=/home/kuldip/ns-allinone-2.34/ns-2.34/
NAM=/home/kuldip/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
For the changes to take effect immediately, do the following:
$ sudo su
# source /home/kuldip/.bashrc
$ ns
$ %
means mission complete
for tcl file testing
$ ns example.tcl
$ nam
OTHER PACKAGES IF Missing U CAN USE :
IF Network Animator is not opening, then
$ sudo apt-get install nam
This method , pls, read carefully...!
Step 1 : Download the ns-allinone-2.34 from this site:
http://bit.ly/downloadns
Step 2 : Place the ns-allinone-2.34.tar.gz package in your home folder(/home/micman in my case). Right click the package and extract the contents in the same folder.
Step 3: Next, open the Terminal (Applications --> Accessories --> Terminal) or [ctrl+ alt + t]
Step 4: Change to ns-allinone2.34 directory
$ cd /home/kuldip/ns-allinone-2.34
Step 5: First install all the dependencies
$ sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.4 g++-4.4
$ sudo apt-get install xorg-dev xgraph
Edit Makefile.in found at this location ns-allinone-2.34/otcl-1.13/Makefile.in as follows:
Find the line that says:
CC= @CC@
and change it to:
CC= gcc-4.4
Fix the error in the linking of otcl by editing line 6304 of otcl-1.13/configure so that it reads
SHLIB_LD="gcc -shared"
instead of
SHLIB_LD="ld -shared"
Change the line 270 in tcl8.4.18/unix/Makefile.in that reads
CC = @CC@
so it appends the version parameter for version 4.4:
CC = @CC@ -V 4.4
Make sure it is a capital V.
$ sudo gedit ns-2.34/tools/ranvar.cc
change the line 219 from
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_);
$ sudo gedit ns-2.34/mobile/nakagami.cc
change the lines 183 and 185 in file ns-2.34/mobile/nakagami.cc to read
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
and
resultPower = GammaRandomVariable(m, Pr/m).value();
Now the code will compile if you run ./install.
Change the line 270 in tcl8.4.18/unix/Makefile.in that reads
CC = @CC@
so it appends the version parameter for version 4.4:
CC = @CC@ -V 4.4
Make sure it is a capital V.
Finally, run ./install from the ns-allinone-2.34 top folder again.
Step 6 : Begin ns2.34 installation
$ sudo su
# ./install
step7: Once the installation is successful i.e without any errors, we need to add the path information to the file /home/micman/.bashrc
$ sudo gedit /home/kuldip/.bashrc
Append the following lines to the file /home/kuldip/.bashrc (after replacing the instances where you find kuldip with your username)
# LD_LIBRARY_PATH
OTCL_LIB=/home/kuldip/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/kuldip/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/kuldip/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/kuldip/ns-allinone-2.34/bin:/home/kuldip/ns-allinone-2.34/tcl8.4.18/unix:/home/kuldip/ns-allinone-2.34/tk8.4.18/unix
#the above two lines beginning from xgraph and ending with unix should come on the same line
NS=/home/kuldip/ns-allinone-2.34/ns-2.34/
NAM=/home/kuldip/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
For the changes to take effect immediately, do the following:
$ sudo su
# source /home/kuldip/.bashrc
$ ns
$ %
means mission complete
for tcl file testing
$ ns example.tcl
$ nam
OTHER PACKAGES IF Missing U CAN USE :
IF Network Animator is not opening, then
$ sudo apt-get install nam
Total Comments 1
Comments
-
Hi,
We are professional in this filed and we charge for making project, saw your requirement on Ns2 project.
Incase if your interested in making project with us, please send us your base paper which you are planning to implement.
Please note that for any NS2 project our rate is set that 24k INR.
Below are the few video link sample which we have completed recently.
https://www.dropbox.com/s/dplgq8z2e8nrjjh/Wormhole.swf
https://www.dropbox.com/s/n0uej1d0ro...-TCP_VEGAS.swf
https://www.dropbox.com/s/xakkpksadp...s2icsvideo.zip
Contact: jyoti@technozonk.com
Note:
We don't take one and one session, doubts are clear only via email within a span of 1 week.
We will show you complete flow project and make sure it run on your PC.
In order to start the project you have to pay us 7k advance and once the project is completed we will send you either a video of project or screenshots.
After that you have to send us rest of the amount for getting complete projectPosted 01-14-2014 at 06:23 AM by rungtajyoti