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 :
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
> cd ~/ns-allinone-2.34/ns-2.34 > ./configure > make distclean > ./configure > make
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?
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?
@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
pak kalo patch ZRP di ns 2.33 or 2.34 punya g?
sekalian kalo ada contoh file tclnya.
salam kenal dan terimakasih sebelumnya
Maaf, saya tidak punya. Coba Anda cari di mailing list.
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
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.
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
You should edit :
any manual to edit this? line to edit, what to add/disable etc…thx for your cooperation…
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.
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).
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.
I’m sorry..I don’t have the patch file. I patched aodv-uu manualy.
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?
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.
You just open the patch file with gedit, and copy the lines with sign “+” into the suitable files according the patch file.
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.
maybe some files are missing. You could replace / use them with aodv-0.9.5 instead.
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…??
“segmentation fault(core dumped)” usually because of misconfiguration of some array value or pointers.
Try to fix your TCL.
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.
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
terima kasih Pak,
mau nanya sedikit, bagaimana caranya mengetahui kalo patch AODVUU sudah terinstal dengan benar?
Anda bisa lihat dari output ‘trace file’.
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
make: *** [trace/cmu-trace.o] Error 1
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
Thank you for your guides
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
make: *** [trace/cmu-trace.o] Error 1
I am not able to find solution for the error. Kindly help
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