Leach protocol installation in ns-2.35 under Ubuntu 14.04

来源:互联网 发布:b2b网站发布软件 编辑:程序博客网 时间:2024/06/05 11:20
Leach protocol installation in ns-2.35 (https://www.youtube.com/watch?v=XX9fooieASE)

1.Developed in the year 2000,so many compilers have been changed till date
2.so it is tough to install in current compiler that powers the current ns2
3.This paper will make you to comfortably install LEACH protocol(MIT-uAMPS) in ns-2.35 under Ubuntu 14.04 

1.download ns-allinone-2.35.tar.gz and ns-leach-2.35.tar.gz   then run ./ sudo apt-get update

2.sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.4 g++-4.4

3.tar zxvf ns-allinone-2.35.tar.gz  

4.cd ns-allinone-2.35/ 

5.gedit ns-2.35/linkstate/ls.h  and change erase to this->erase 

6.cd ..

7.gedit leach-setup.sh

leach-setup.sh
#!/bin/bashtar -xvzf ns-leach-2.35.tar.gzcd ns-leach-2.35/cp -r mit /home/gtt/ns-allinone-2.35/ns-2.35cp apps/app.* /home/gtt/ns-allinone-2.35/ns-2.35/appscp mac/channel.cc /home/gtt/ns-allinone-2.35/ns-2.35/maccp mac/ll.h /home/gtt/ns-allinone-2.35/ns-2.35/maccp mac/wireless-phy.* /home/gtt/ns-allinone-2.35/ns-2.35/maccp mac/phy.* /home/gtt/ns-allinone-2.35/ns-2.35/maccp mac/mac.cc /home/gtt/ns-allinone-2.35/ns-2.35/maccp mac/mac-sensor* /home/gtt/ns-allinone-2.35/ns-2.35/maccp trace/cmu-trace.* /home/gtt/ns-allinone-2.35/ns-2.35/tracecp common/packet.* /home/gtt/ns-allinone-2.35/ns-2.35/commoncp common/mobilenode.cc /home/gtt/ns-allinone-2.35/ns-2.35/commoncp tcl/mobility/leach.tcl /home/gtt/ns-allinone-2.35/ns-2.35/tcl/mobilitycp tcl/mobility/mte.tcl /home/gtt/ns-allinone-2.35/ns-2.35/tcl/mobilitycp tcl/mobility/stat-clus.tcl /home/gtt/ns-allinone-2.35/ns-2.35/tcl/mobilitycp tcl/ex/wireless.tcl /home/gtt/ns-allinone-2.35/ns-2.35/tcl/excp leach_test /home/gtt/ns-allinone-2.35/ns-2.35cp Makefile.in /home/gtt/ns-allinone-2.35/ns-2.35

8.sh leach-setup.sh

9.Important Step
Four files the path have to updated as per the user installation files

mit/uAMPS/sims/ leach.tcl leach-c.tcl mte.tcl stat-clus.tcl uamps.tcl

~mit/uAMPS
~ns-2.35/tcl/mobility

10. cd ns-allinone-2.35/ns-2.35/
./install

11.gedit /home/gtt/.bashrc

export PATH=$PATH:/...
export LD_LIBRARY_PATH=/home/gtt/ns-...
export TCL_LIBRARY=/home...

12.source /home/gtt/.bashrc
0 0