First, patch the ns-2.34 code using the patch and recipe from http://wpage.unina.it/marcello.caleffi/ns2/tora.html.
Then, to avoid eternal loops making the simulation never ending, fix the line 504 (ns-2.34) in imep/imep.cc which reads
rexmitTimer.start(rexat - CURRENT_TIME);
If rexat – CURRENT_TIME is 0, then the same function is called immediately without increasing the simulation time, creating an eternal loop. I would have replaced the line with the following lines:
if (rexat-CURRENT_TIME<0.000001) // Preventing eternal loop.
rexmitTimer.start(0.000001);
else
rexmitTimer.start(rexat - CURRENT_TIME);
Then recompile with make, and enjoy. 🙂
Sunday, September 19, 2010 at 15:28
Hi, thanks for this solution, i have finally managed tora to run with ns-2.34. However, the simulation of TORA last much longer (like 100 times) compared to AODV and DSR. Do you have any idea what may be causing this isue?
Wednesday, September 29, 2010 at 7:42
I would guess it’s due to the number of nodes you are simulating. If you run TORA in a proactive mode, it generates control traffic periodically, while reactive protocols like AODV only generate control traffic on route generation and maintenance. ns-2 uses most of its processing time checking which nodes that are affected by a transmission, and if you use the Shadowing radio propagation model, there is no easily defined cutoff distance from the sender node where ns-2 can disregard impact. Thus it must traverse a high number of nodes to check if the signal strength was high enough for a packet to be received or collisions to occur, etc.
Thursday, February 3, 2011 at 17:46
Hi erland,
I have same problem about time of simulation of tora, i read your explanation about the reason, but i want to know is there any solution for this problem? i’m working with 40 nodes with a simulation time of 1000s .
thanks
Friday, February 4, 2011 at 8:57
I’m not aware of any solution as such, but to reduce the simulation time I see some alternatives, like reducing the number of TORA control packets per time, reducing the number of nodes, reducing the simulation time or employing a different radio propagation model. Another alternative is to try optimizing the code for TORA in ns-2 as there probably is much potential for reducing the processing load here. However, changing the code may introduce bugs, so stay alert. 🙂
Friday, July 22, 2011 at 6:12
Dear Erlend
I am getting the problem while simulating TORA in NS-2.34. i have replaced Tora.cc, Tora.h and imep.cc but i am getting the same problem, plz help me that how can i simulate TORA in ns-2.34 on fedora.
Thanks in advance
Sunday, October 21, 2012 at 18:00
Hai Banano, i need ur help in simulating tora; iam unable to run tora for 3 nodes in ns-allinone-2.34 on fedora-8 ; please resond me;
thank u so much
Tuesday, November 6, 2012 at 7:37
i too have the problem you have can you help me to clear the error and to get result For tora
Monday, November 29, 2010 at 7:09
Hello!
I followed your instructions to solve the looping problem. but still i am getting the same problem after recompiling using make.
Any idea why is this happening again ?
Monday, November 29, 2010 at 8:25
Hi!
I don’t know what simulator script you are running, but a first solution attempt would be to run make clean before make in the ns-2 subfolder, to make sure that all edited files are recompiled:
…/ns-2.xx$ make clean
…/ns-2.xx$ make
Monday, November 29, 2010 at 9:02
Hello!
I add a debug code in the imep.cc just to see what is happening there.
The change code is as follows
// rexmitTimer.start(rexat – CURRENT_TIME); // line # 504
printf(” \n T %.9f _%d_ rexmit trigger again for %d at %.9f (in %.9f)”,
CURRENT_TIME, ipaddr, ch->uid(), rexat, rexat – CURRENT_TIME );
if (rexat-CURRENT_TIME<0.000001) // Preventing eternal loop.
{
printf(" \n preventing eternal loop …");
rexmitTimer.start(0.000001);
}else
rexmitTimer.start(rexat – CURRENT_TIME);
after saving it I did following
..ns2.34# make clean
..ns2.34# make
after recompiling successfully when i run a wireless tcl script using rp as tora i see it shows those string with infinite loop,
here is some of strings
T 35.567367999 _8_ rexmit trigger again for 1424 at 35.300000000 (in -0.267367999)
preventing eternal loop …
T 35.567368999 _8_ rexmit trigger again for 1424 at 35.300000000 (in -0.267368999)
preventing eternal loop …
T 35.567369999 _8_ rexmit trigger again for 1424 at 35.300000000 (in -0.267369999)
preventing eternal loop …
Any idea why is this happening in my case ?
Thanks
Monday, November 29, 2010 at 9:36
I think it’s a strange behavior. You could try increasing the new timer start and if-check from 0.000001 to 0.001 (or higher) for example, to see if this can get you out of the loop?
Saturday, April 28, 2012 at 10:07
Dear Mr Erland
I am trying to simulate in ns2-2.34 a tcl script which takes wireless scenario from a file generated using Setdest for 15 nodes.When i try to simulate it in it simulates but does not finish (see below for details ).
Can you please give me your email address so that i can send you the file sot hat you can try it .Please do let me know how i can rectify it.
Thank you in advance
Amith khandakar
num_nodes is set 15
INITIALIZE THE LIST xListHead
SORTING LISTS …DONE!
channel.cc:sendUp – Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 6649502 received `UPD` from non-neighbor 13
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `UPD` from non-neighbor 13
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for itself.
node 0 received `QRY` for itself.
node 572548193 received `QRY` for i
Tuesday, December 21, 2010 at 5:32
hello,
im facing prob in TORA simulation.i hav made changes in .cc & .h file.may b i dont knw xctly where to made these changes. also im confuse how .cc & .h files are called from the tora.tcl script or is there any change needed in tora.tcl aftr .cc & .h being changed?
plz hlp me. my thesis is hang on,though it has to b submitted within 1 week. 😦
mahi
mahi.nstu@gmail.com
Wednesday, April 25, 2012 at 12:08
Even after making changes in tora.cc, tora.h, imep.cc and running ‘make’ again, my protocol runs into infinite loop. No of nodes is set to be 50. Is it because of large number of nodes? or what can be the reason?
Saturday, June 30, 2012 at 7:00
Hi,
I did above changes and now my TORA protocol is working fine for 3 nodes, though it take lots of time to finish simulation.
I am getting problem when i increase the number of nodes from 3 to 10. For 10 Nodes when i run the same simulation i get segmentation fault, though it is working fine for AODV.
Can anyone suggest me any solution for this.
Sunday, October 21, 2012 at 18:08
Hai Rahul, i did changes to tora.cc, tora.h and imep.cc but still my tora tcl script doest not work even for 3 nodes, please help me; iam using ns-allinone-2.34 on fedora-8
Wednesday, September 26, 2012 at 12:38
i made changes regarding tora.cc and tora.h and imep.cc but still iam unable to run tora with 3 nodes ; it enters infinite loop by displaying the code below:
num_nodes is set 3
warning: pleaseuse -channel as shown in tcl/ex/wireless-mitf.tcl
INTIALIZE THE xListHead
channel.cc:sendUp-Calc highestAntennaZ_ and distCST_
SORTING LISTS…DONE!
plese help me ; it is very important for my research work
Friday, October 19, 2012 at 4:15
helllo Erland;
please respond
i made changes regarding tora.cc and tora.h and imep.cc but still iam unable to run tora with 3 nodes ; it enters infinite loop by displaying the code below:
num_nodes is set 3
warning: pleaseuse -channel as shown in tcl/ex/wireless-mitf.tcl
INTIALIZE THE xListHead
channel.cc:sendUp-Calc highestAntennaZ_ and distCST_
SORTING LISTS…DONE!
plese help me ; it is very important for my research work
Friday, October 19, 2012 at 4:16
helllo Erlend;
please respond
i made changes regarding tora.cc and tora.h and imep.cc but still iam unable to run tora with 3 nodes ; it enters infinite loop by displaying the code below:
num_nodes is set 3
warning: pleaseuse -channel as shown in tcl/ex/wireless-mitf.tcl
INTIALIZE THE xListHead
channel.cc:sendUp-Calc highestAntennaZ_ and distCST_
SORTING LISTS…DONE!
plese help me ; it is very important for my research work
Wednesday, March 5, 2014 at 10:04
somebody pls send working code of TORA email-kaushaldeodhar46@gmail.com
Monday, April 21, 2014 at 11:22
i replaced tora.cc, tora,h, imep. c with higher rexmit 0.1 , and recompiled ns2.35 but still it goes in infinite loop for smaller simulation scenario ,plz help me out