Since the latest aodv-uu version (aodv-uu-0.9.6) only support till ns-2.32, I have to make my own patch aodv-uu-0.9.6 for ns-2.34.
1. Installing NS-2.34
This is my experience when I was installing ns-2.34 on Ubuntu 10.4. Make sure that before you perform installation, the following packages installed:
~$ sudo apt-get install libxt-dev libx11-dev libxmu-dev
I noticed that ns-2.34 did not build on the new version Ubuntu such as 9.10 – 10.10, due to this error when linking:
otcl.o: In function `OTclDispatch':
/home/abdusy/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/abdusy/ns-allinone-2.34/otcl-1.13/otcl.c:2284:
undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
The problem is that otcl is trying to use the ld linker instead of the gcc linker to build a shared library. I have read that this problem can occur with gcc versions 4 and greater. There is a one line fix to otcl-1.13/configure file that is posted here: NS-2 Ubuntu Installation Guide
It means that we have to edit one line in otcl-1.13/configure as follows:
Linux*)
SHLIB_CFLAGS="-fpic"
#SHLIB_LD="ld -shared" //disabled this line
SHLIB_LD="gcc -shared" // add this line
SHLIB_SUFFIX=".so"
DL_LIBS="-ldl"
SHLD_FLAGS=""
;;
And rerun install, it should work.
2. Patch AODV-UU-0.9.6
Before we installing aodv-uu into ns-2, we need to patch aodv-uu. The following files need to modify :
– ns-2.34/common/packet.h
– ns-2.34/Makefile.in
– ns-2.34/queue/priqueue.cc
– ns-2.34/tcl/lib/ns-agent.tcl
– ns-2.34/tcl/lib/ns-default.tcl
– ns-2.34/tcl/lib/ns-lib.tcl
– ns-2.34/tcl/lib/ns-mobilenode.tcl
– ns-2.34/trace/cmu-trace.cc
– ns-2.34/trace/cmu-trace.h
To define new routing protocol packet type such as aodv-uu we have to modify ~/ns-allinone-2.34/ns-2.34/common/packet.h file. We change PT_NTYPE to 63, and for aodv-uu PT_AODVUU = 62. . Just make sure PT_NTYPE is the last, and protocol number is ordered sequentially. So from line 185 changes would be as follows :
#ifdef AODV_UU
// AODV packets in AODV-UU
// PT_AODVUU;
static const packet_t PT_AODVUU = 62;
#endif /* AODV_UU */
// insert new packet types here
static packet_t PT_NTYPE = 63; // This MUST be the LAST. The original value = 62
That is the different part from the previous patch. Because since modified ns-2.33, it adding support for dynamic libraries. ‘packet_t’ is changed from enum to unsigned int in order to allow dynamic definition of new packet types within dynamic libraries. Pre-defined packet types are implemented as static const.
If we are installing aodv-uu-0.9.6 into an existing already compiled ns-2.34
installation, ns-2.34 needs to be recompiled before the changes take
effect:
> cd ~/ns-allinone-2.34/ns-2.34 > ./configure > make distclean > ./configure > make
April 4, 2011 at 10:39 |
Hi,
I followed your instructions and aodv-uu was built successfully. However there was errors displayed when I tried to run a sample TCL script in which I changed the routing parameter from DSR to AODVUU. So could you please send me some TCL scripts for aodv-uu if possible?
Thank you.
LikeLike
April 4, 2011 at 10:43 |
Hi,
I followed your instruction and aodv-uu was built successfully. However errors displayed when I tried to run a sample TCL script in which I changed the routing parameter from DSR to AODVUU. So could you please send me some aodv-uu TCL scripts if possible?
Thank you.
LikeLike
April 7, 2011 at 21:10 |
@Huong Lien Do and Dan Tam Le : You should change your TCL script. Not only the protocol, but also the node configuration. You can see my AODV-UU tcl script in http://abdusyarif.mercubuana-it.org/?p=334 and for other protocol you can see my tcl script in http://abdusyarif.mercubuana-it.org/?p=121
LikeLike
May 26, 2011 at 06:43 |
pak kalo patch ZRP di ns 2.33 or 2.34 punya g?
sekalian kalo ada contoh file tclnya.
salam kenal dan terimakasih sebelumnya
LikeLike
May 28, 2011 at 00:48 |
Maaf, saya tidak punya. Coba Anda cari di mailing list.
LikeLike
July 3, 2011 at 23:05 |
sorry, i can’t see any patch, what is the modification that we have to made on those file u mentioned, i only see ns-2.34/common/packet.h….i can’t find others
LikeLike
July 4, 2011 at 00:05 |
You can follow or edit the patch file in directory aodv-uu-0.9.x/patches/, you fill find the patch files that appropriate with your NS-2.
LikeLike
July 4, 2011 at 19:52
i did found it, but still doesn’t help me, does we have to change all this 9 files manually since force patching the existing patch does not work (since the patch only for ns2.32), i tried to edit the coomn/packet.h file as you suggested, and then save, patch but doesnot work…i tried AODV-UU o.9.5 from this website, http://sonumb.tistory.com/55, installation successul, but can’t run aodvuu (simply changing prtocol in val(rp) to AODVUU does not work…)
i know that i’m asking too much, but if you have a complete manual, it sure does help me a lot, Tq
LikeLike
July 5, 2011 at 02:27 |
You should edit :
– packet.h
– Makefile.in
– priqueue.cc
– ns-agent.tcl
– ns-default.tcl
– ns-lib.tcl
– ns-mobilenode.tcl
– ns-packet.tcl
– cmu-trace.cc
– cmu-trace.h
LikeLike
July 6, 2011 at 00:22 |
any manual to edit this? line to edit, what to add/disable etc…thx for your cooperation…
LikeLike
January 15, 2012 at 06:43 |
Now that the ns-2.35 is released. I am running ns-2.35 in ubuntu 11.10 and want to run aodv-uu-0.9.6 in this setup. Can you please list the steps in order to compile? As I am very new to ns-2 I request you to kindly list all every possible small steps.
Thanking you.
Mukul
LikeLike
January 15, 2012 at 19:11 |
Before you recompile your ns-2, you need to patch aodv-uu-0.9.6 into your ns-2.35. You can follow the steps which is written in the patch file (it’s located in aodv-uu-0.9.6/patches/ns-2.32-aodv-uu.patch).
LikeLike
January 15, 2012 at 22:57 |
Dear abdusy syarif
I have tried to apply the patch ns-2.32-aodv-uu.patch from the directories of the patches. As the patch is only for the ns-2.32 (and I am using ns-2.3.5) it is giving me errors. As per your post, I have tried to change the patch file but as I have said, I am new to all this I am unable to apply the patch properly. If possible kindly send me the modified patch file or the steps to properly apply the patch in ns-2.35 or ns-2.34 which ever is suitable to you.
Thanking you.
Mukul Shukla
mukul@sgsits.ac.in
LikeLike
January 16, 2012 at 00:49 |
I’m sorry..I don’t have the patch file. I patched aodv-uu manualy.
LikeLike
January 16, 2012 at 01:24
How did you patch aodv-uu manually? That is what I am trying to do? Do I have to change the patch file ns-2.32-aodv-uu.patch
as per instructions above or something else?
LikeLike
January 16, 2012 at 01:20 |
Dear abdusy syarif
Thanks for the reply and sorry for asking too many questions. I want to setup AODV-UU either in ns-2.34 or ns-2.35. I will make my problem clear to you.
1. Have you patched the new ns-2.35 or you have patched only ns-2.34?
2. I am getting errors when I am using the patch for ns-2.34 in the patches directory without modifying the patch file. What should I do?
3. As per you tutorial above what should I do. Should I change the patch file for ns-2.34 or should I change the ns-2.35 files?
4. If I have to change the patch file for ns-2.32, what are the changes that I should make to uses the patch file for ns-2.32 in patches directory?
5. I have followed the steps mentioned above to change the patch file ns-2.32-aodv-uu.patch in the patches directory but still it is giving errors? I am doing the things correctly. Can you please elaborate the steps?
Thanking you for your help and cooperation.
Mukul
mukul@sgsits.ac.in
LikeLike
January 17, 2012 at 00:11 |
You just open the patch file with gedit, and copy the lines with sign “+” into the suitable files according the patch file.
LikeLike
November 24, 2012 at 17:28 |
sir, greetings of the day..
I m trying to add aodv-uu-0.9.6 patch in ns-2.34. I copied the patch file in Aodv-uu-0.9.6 and also create the link for aodv-uu.
I used the command $ patch -p1 < ./aodv-uu/patches/aodv-uu-0.9.6.patch. But there was an error…"no such file or directory found".
Please help me to fix this error.
LikeLike
November 26, 2012 at 08:50 |
maybe some files are missing. You could replace / use them with aodv-0.9.5 instead.
LikeLike
December 2, 2012 at 17:24 |
After patching…….. I execute the tcl file, and there was an error “segmentation fault(core dumped)”……… Why is this so…….. and how can I fix it…??
LikeLike
December 3, 2012 at 10:50
“segmentation fault(core dumped)” usually because of misconfiguration of some array value or pointers.
Try to fix your TCL.
LikeLike
December 1, 2012 at 06:22 |
sir,
I m trying to add aodv-uu-0.9.5 patch in ns-2.33. I copied the patch file in Aodv-uu-0.9.6 and also create the link for aodv-uu.
I used the command $ patch -p1 < ./aodv-uu/patches/aodv-uu-0.9.5.patch. But there was an error…"no such file or directory found".
Please help me to fix this error.
thanking you
LikeLike
December 2, 2012 at 19:08 |
configure: error: Installation of tcl seems incomplete or can’t be found
> > automatically.
> > Please correct the problem by telling configure where tcl is
> > using the argument –with-tcl=/path/to/package
> > (perhaps after installing it),
> > or the package is not required, disable it with –with-tcl=no.
i got error after patching aodv uu in ns 2.32
please help me to fix this error
thanking you
LikeLike
February 20, 2013 at 02:38 |
terima kasih Pak,
mau nanya sedikit, bagaimana caranya mengetahui kalo patch AODVUU sudah terinstal dengan benar?
LikeLike
February 20, 2013 at 07:35 |
Anda bisa lihat dari output ‘trace file’.
LikeLike
September 20, 2013 at 12:21 |
Hello I successfully patched AODV-UU but I m getting error while using make command. Following are the errors:
In file included from trace/cmu-trace.cc:56:0:
./aodv-uu/ns/aodv-uu.h:79:26: fatal error: packet_queue.h: No such file or directory
compilation terminated.
make: *** [trace/cmu-trace.o] Error 1
please help
LikeLike
March 20, 2014 at 08:36 |
Dear Abdusy,
I’ve successfully patched aodv-uu 0.9.6 manually, but my main problem was having to use the AODVUU as my routing protocol, while using your tcl files didn’t help on how to implement AODVUU at all.
Your hybrid topologies shows that I got “wrong node routing agent” and when I tried to implement those aodv-uu from readme.ns on my own tcl script, I got errors on declaring a node.
Is there any simple script on two nodes only using wireless transmission along with aodv-uu script so I can understand how to use aodv-uu on ns2 better?
I want to simulate a multiple traffic along with movement scenario, aodv-uu is one of the routing agent that is capable of doing so, but the original aodv can’t do multiple routing
Please reply,
Thank you for your guides
LikeLike
April 2, 2015 at 19:06 |
Dear Sir,
I am trying to recompile ns-2.34 after patching in aodv-uu 0.9.6., but when recompiling make is giving the following error:
trace/cmu-trace.cc:56: fatal error: aodv-uu/ns/aodv-uu.h: No such file or directory
compilation terminated.
make: *** [trace/cmu-trace.o] Error 1
I am not able to find solution for the error. Kindly help
LikeLike
August 13, 2016 at 19:08 |
hi
can u help me by sending .tcl and .patch file “Detection and Prevention of Blackhole Attack, Wormhole Attack in MANET Using ACO” article
i simulate Blackhole attack bud can simulate wormhole attack in ns2
LikeLike