Leach protocol installation in ns-2.35 under Ubuntu 14.04

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/bash
tar -xvzf ns-leach-2.35.tar.gz
cd ns-leach-2.35/
cp -r mit /home/gtt/ns-allinone-2.35/ns-2.35
cp apps/app.* /home/gtt/ns-allinone-2.35/ns-2.35/apps
cp mac/channel.cc /home/gtt/ns-allinone-2.35/ns-2.35/mac
cp mac/ll.h /home/gtt/ns-allinone-2.35/ns-2.35/mac
cp mac/wireless-phy.* /home/gtt/ns-allinone-2.35/ns-2.35/mac
cp mac/phy.* /home/gtt/ns-allinone-2.35/ns-2.35/mac
cp mac/mac.cc /home/gtt/ns-allinone-2.35/ns-2.35/mac
cp mac/mac-sensor* /home/gtt/ns-allinone-2.35/ns-2.35/mac
cp trace/cmu-trace.* /home/gtt/ns-allinone-2.35/ns-2.35/trace
cp common/packet.* /home/gtt/ns-allinone-2.35/ns-2.35/common
cp common/mobilenode.cc /home/gtt/ns-allinone-2.35/ns-2.35/common
cp tcl/mobility/leach.tcl /home/gtt/ns-allinone-2.35/ns-2.35/tcl/mobility
cp tcl/mobility/mte.tcl /home/gtt/ns-allinone-2.35/ns-2.35/tcl/mobility
cp tcl/mobility/stat-clus.tcl /home/gtt/ns-allinone-2.35/ns-2.35/tcl/mobility
cp tcl/ex/wireless.tcl /home/gtt/ns-allinone-2.35/ns-2.35/tcl/ex
cp leach_test /home/gtt/ns-allinone-2.35/ns-2.35
cp 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
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值