Blackhole attack:
In this attack, adversary node drops all the packets passed through it. In order to do this, the adversary node attracts the neighbor node with false route reply with less hop count and greater sequence number. Once, route is established through that node then the neighbor node starts sending packets and eventually all packets will be dropped at adversary. Many wireless routing protocols such as AODV, DSR, HWMP, DSDV etc. are vulnerable to Blackhole attack.
Blackhole attack implementation in AODV routing protocol
The following scenario consists of 25 nodes, in which 1,7 and 13 nodes are blackhole nodes and other nodes are non-malicious.
To create multiple blackhole attackers in AODV protocol
i) In aodv.h the following blue colour lines needs to be added to define balckhole attackers
/*
* History management
*/
double PerHopTime(aodv_rt_entry *rt);
nsaddr_t malicious;
ii) In aodv.cc the following blue colour lines needs to be added to initialize the attackers
int
AODV::command(intargc, const char*const* argv) {
if(argc == 2) {
Tcl&tcl = Tcl::instance();
if(strncasecmp(argv[1], "id", 2) == 0) {
tcl.resultf("%d", index);
return TCL_OK;
}
if(strncasecmp(argv[1], "blackhole", 9) == 0) {
malicious=1000;
return TCL_OK;
}
AODV::AODV(nsaddr_t id) : Agent(PT_AODV),
btimer(this), htimer(this), ntimer(this),
rtimer(this), lrtimer(this), rqueue() {
index = id;
seqno = 2;
bid = 1;
LIST_INIT(&nbhead);
LIST_INIT(&bihead);
malicious=999;
Malicious nodes 1,7 and 13 generates fake route replies using following blue colour code
//add in receive route request
if(rq->rq_dst == index) {
#ifdef DEBUG
fprintf(stderr, "%d - %s: destination sending reply\n",
index, __FUNCTION__);
#endif // DEBUG
// Just to be safe, I use the max. Somebody may have
// incremented the dstseqno.
seqno = max(seqno, rq->rq_dst_seqno)+1;
if (seqno%2) seqno++;
sendReply(rq->rq_src, // IP Destination
1, // Hop Count
index, // Dest IP Address
seqno, // Dest Sequence Num
MY_ROUTE_TIMEOUT, // Lifetime
rq->rq_timestamp); // timestamp
Packet::free(p);
}
//blackhole attackers
else if(malicious==1000)
{
seqno = max(seqno, rq->rq_dst_seqno)+1;
if (seqno%2) seqno++;
sendReply(rq->rq_src, // IP Destination
1, // Hop Count
rq->rq_dst,
seqno,
MY_ROUTE_TIMEOUT,
rq->rq_timestamp); // timestamp
//rt->pc_insert(rt0->rt_nexthop);
Packet::free(p);
}
Since, all attackers do not have route to destination, attackers have to disable the send (error).
The following blue colour code disables the send (error)
// add in route resolve function (AODV::rt_resolve(Packet *p) )
else {
Packet *rerr = Packet::alloc();
structhdr_aodv_error *re = HDR_AODV_ERROR(rerr);
/*
* For now, drop the packet and send error upstream.
* Now the route errors are broadcast to upstream
* neighbors - Mahesh 09/11/99
*/
assert (rt->rt_flags == RTF_DOWN);
re->DestCount = 0;
re->unreachable_dst[re->DestCount] = rt->rt_dst;
re->unreachable_dst_seqno[re->DestCount] = rt->rt_seqno;
re->DestCount += 1;
#ifdef DEBUG
fprintf(stderr, "%s: sending RERR...\n", __FUNCTION__);
#endif
if(malicious==1000);
else
sendError(rerr, false);
drop(p, DROP_RTR_NO_ROUTE);
After replacing original aodv.cc and aodv.h files,
first perform $make clean operation in ns-allinone-2.xx\ns-2.xx folder then
$make
iii) To define the blackhole attackers in tcl add these lines after node initialization
$ns at 0.0 "[$n1 set ragent_] blackhole1"
$ns at 0.0 "[$n7 set ragent_] blackhole2"
$ns at 0.0 "[$n13 set ragent_] blackhole3"
Above scenario example tcl file blackhole attacks scenario
---------------------------------------------------------------------
Goodput calculation file goodput
To calculate goodput: type-> perl goodput.pl outputfile name granularity(for 1 or 2... n seconds) > filename
Hi....i have updated AODV files with the modifications given by u and compiled without errors.But when i run tcl file given by your post i get following error....please help
ReplyDeletenum_nodes is set 25
INITIALIZE THE LIST xListHead
ns: _o39 blackhole1 :
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1 "
This error occurs due to improper make commend (modified code is not correctly copied in aodv.cc or aodv.h)
DeleteOnce again you verify the modified aodv.cc and aodv.h, is it correctly copied or not!
Then go to ns.2xx folder in terminal
make clean
make
after making changes iam getting the same errors,so wat to do.
Deleteplz help me in doing this successful.i have o submit this within 3days so plz help me. i vill be very thankful to you.
I have added modified aodv.cc and aodv.h files in this blog
ReplyDeletereplace original aodv.cc and aodv.h files with these files
Then go to ns.2xx folder in terminal
make clean
make
I had copied both files & compiled using make clean & make,
Deletebu still getting the same error,so plz help in doing so.
iam also sending tcl file which is given by you.
so just go through it, and modify the same.
I could not sent through,its giving error,
so give your mail-id so that i can sent it.k
plz send.
i tried to compile today tcl script and got following error
Deletenum_nodes is set 25
INITIALIZE THE LIST xListHead
malicious 1malicious 7malicious 13channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
Floating point exception (core dumped)
hey i have created d blackhole and detected the malicious node as well but how to avoid the blachole node from the route???
ReplyDeleteUsually blackhole attack can be created by either internal or external nodes
DeleteTo avoid external blackhole node from network, network nodes should have robust authentication mechanisms.
On the otherhand, to avoid internal blackhole node, network nodes need robust authentication mechanism and each source and destination nodes have location information with respect to node communication range in route discovery phase.
The above solution I may not guarantee to avoid internal blackhole node when nodes have unpredictable mobility in the network
another possible way to avoid blackhole attack from route discovery phase:
Deletesource node needs to from a route only when the route reply is generated by destination node and this packet properly authenticated.
This solution does not depend on node mobility and location but it should have a robust security framework.
can i get d code where destination acknolwdges multiple data packets in a single ack and if not then source starts the intrusion detection activity
Deletecan you please send the code to create blackhole attack in manet?
Deletehi deepika,
DeleteCan u send me the code of detection of blackhole node using aodv.
Plz mail at pmpmpradeep@gmail.com
Thank u
hey can u plzz send the code for implementing the black hole
Deleteiam using the version of ns2.29 i need to implement the blackhole in aodv protocol
DeleteDo we have to make any changes to the aodv.o file before using the make command?
ReplyDeleteno need to do any changes in aodv.o file
Deleteyou just perform make operation after replacing the aodv.cc and aodv.h with files
Hi Dear, Many thanks for your work. I have replaced original aodv.cc and aodv.h files and when running tcl give an error:
ReplyDeleteerror "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1"
Then I have tried to “./configure” at ns-2.29
Installation of tclcl seems incomplete or can't be found automatically.
Please correct the problem by telling configure where tclcl is
using the argument --with-tclcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with –with-tclcl=no.
”ns-2.29$
I think for this reason can not “make clean” and “make”
Do you have any suggestion please?
Hi Oscar Aznarez,
DeleteAfter replacing original aodv.cc and aodv.h files, first you must do "make" operation to create new objects of aodv.cc and aodv.h.
One more thing, you need not do ./configure operation and only need make operation for new objects.
Please try with "make" operation. If you will get same error please inform me.
All the best
This comment has been removed by the author.
ReplyDeleteHi Ganesh,
ReplyDeleteFirst off all many thanks for your help
As you set I have change replace aodv.cc and aodv.h at /aodv file
then used tcl provided from your blog
then make clean & cleand operation at $ ns-2.34
when ns xxx.tcl
still getting the same error:
num_nodes is set 25
INITIALIZE THE LIST xListHead
ns: _o39 blackhole1:
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1"
Many thanks for your time
Based on above comment I found the following error
Deletemake clean & cleaned
First, “make clean” is the correct command.
Second, “make cleaned” is not correct command. Instead of this, use only “make” operation
Based on your comments one and two, I found that you are using two different versions :ns2.29 and ns2.34 same system or not?
If it is same the following problem rises
In this case ‘ns’ commend works on ns2.29 because ns2.29 is installed first.
If you do any modification on .cc files in ns2.34 it won’t work.
Thus, first you remove one version completely either ns2.29 or ns2.34 then check path setting
All the best
in file.tcl delete the [] and let espace _ blackhole like this:
Delete$ns at 0.0 "$n1 set ragent_ blackhole1"
$ns at 0.0 "$n7 set ragent_ blackhole2"
$ns at 0.0 "$n13 set ragent_ blackhole3"
It is working, thanks, really appreciate your help
ReplyDeletehye, can i know how you resolve the problem? i have same problem like u..hope you can help me
Deletehow u solve above problem
Deletein file.tcl delete the [] and let espace _ blackhole like this:
Delete$ns at 0.0 "$n1 set ragent_ blackhole1"
$ns at 0.0 "$n7 set ragent_ blackhole2"
$ns at 0.0 "$n13 set ragent_ blackhole3
Hello sir, thanks for sharing,
ReplyDeleteis it possible execute it with udp packet? is there any addition code for using udp?
Here blackhole attackers' perform dropping operations on upd traffic only.
Deleteyou need not add any extra code to perform udp operations.
Hi,
ReplyDeletethis is great work but i have a problem from the beginning...
i try to locate aodv.cc and aodv.h but i cant find them.
i installed ns2 from ubuntu software center and i dont know where the files are.
i tried installing ns2 with nsallinone package in which i can see where the files are but i had other problems there and i gave up. So can you help me with this problem? When i run simple simulation of aodv it runs normally, so the files are somewhere there
Hi,
ReplyDeleteI am siddu, Pursing my ph.d on wireless network, I followed all your steps but when i executed tcl file...i am get following error...
siddu@siddu-PC /
$ ns blackholeattack.tcl
num_nodes is set 25
INITIALIZE THE LIST xListHead
ns: _o39 blackhole1:
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1"
how to overcome this error.....
After replacing original aodv.cc and aodv.h files,
ReplyDeletefirst perform $make clean operation in ns-allinone-2.xx\ns-2.xx folder then
$make
or
After above change, If you get same error then you will do the following procedure:
1. Remove the ns2 allinone folder to uninstall ns2 then
2. Re-install ns2
3. Add blackhole code
Dear Ganesh:
ReplyDeleteWe followed your instructions above and we got the following error:
ns bhAODV.tcl
num_nodes is set 20
Creating nodes...
INITIALIZE THE LIST xListHead
invalid command name "Agent/blackholeAODV"
while executing
"Agent/blackholeAODV create _o458 20"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/blackholeAODV [$node node-addr]"
(procedure "_o3" line 2)
(Simulator create-blackholeaodv-agent line 2)
invoked from within
"$self create-blackholeaodv-agent $node"
("blackholeAODV" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
blackholeAODV {
set ragent [..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within
"for {set i 20} {$i < 21} {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;#disable random motion
$ns_ at 0.01 "$node_($i) label \"blac..."
(file "bhAODV.tcl" line 57)
This error has come when you are already added another blackhole patch. please reinstall the ns2 then try
ReplyDeleteDear Ganesh:
DeleteAm still having the problem. Do you think having both NS3 and NS2 could cause a problem.
i am using ns 2.35 and getting the following error:
ReplyDeletens: _o39 blackhole1:
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1"
please do help me thank you
hi nikhil,
ReplyDeleteonce you replace the original aodv files with blackhole aodv files
the open ns.235 folder
make clean
make
Hi Ganesh,
DeleteThanks For ur Reply But i Have Done Make clean And Make both But Error Still Remains
This error occur due to the new objective file(AODV.O) is not reflecting the blackhole attacks in tcl file.
DeleteTo overcome this problem, do the following steps 1:
1. Un-install all ns2 versions(if you have to are more) and thier path settings.
2. re-intall ns2.33 or ns2.34 version
3. follow steps mentioned in this blogg to create blackhole attack
all the best
sirg again same problem which @ nikhil is facing
ReplyDeletenum_nodes is set 25
INITIALIZE THE LIST xListHead
ns: _o39 blackhole1:
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1"
after doing the make clean and make the problem is continuing
tcl file put in AODV folder?
ReplyDeleteyou can run the tcl file from any where in ns2 folder
ReplyDeletehi.........................
Deletesir i am getting the same error. after doing all the thing. which u told
num_nodes is set 25
INITIALIZE THE LIST xListHead
ns: _o39 blackhole1 :
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1 "
i am still getting the same error
ReplyDeletecan u plz share the aodv.o file also
Thank you
Did you get your problem fixed?
DeleteI followed your steps, replaced original aodv.cc and aodv.h and also compiled your aodv.tcl script. But am still getting errors even after "makeclean" and "make" operations. this is the error and getting
ReplyDeletekevin@ubuntu:~/Desktop/ns-allinone-2.34/bin$ ns aodv.tcl
num_nodes is set 25
INITIALIZE THE LIST xListHead
ns: _o39 blackhole1:
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1"
So please help me out Mr.Ganesh
Hi,
ReplyDeleteI'm making changes to aodv code but it shows error when i make it.
errors are:
1)malicious1 , malicious2, malicious3 doesnot exist;
2)blackhole1,blackhole2 and blackhole3 are not declared
what is backhole variable that u use?
Please help not able to figure this out
please mail me bskolkur@gmail.com
Deletenum_nodes is set 25
ReplyDeleteINITIALIZE THE LIST xListHead
ns: _o39 blackhole1:
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1"
please mail me bskolkur@gmail.com
DeleteThis error is due to multiple installation of NS2 in the same machine. Try uninstalling NS by using command
Delete"sudo apt-get purge ns2"
Re-install the Ns2 after that and you are good to go. CHEERS...!!
Hello Sir...I have run the code for 25 node scenario its working correctly.
ReplyDeleteI want to run the same code for 10 nodes, 20 nodes and 30 nodes. there is some error occurs FLOATING POINT EXCEPTION
how can i fix.....please do a reply ASAP
please mail me bskolkur@gmail.com
DeletePlease don't buy the projects,
ReplyDeletedo it on your own
when i folloe these steps and run tcl script then below error occur
ReplyDeleteclassfier::no-slot{} default handler{tcl/lib/ns-lib.tcl}
o186:no target slot1
0186 type classifier/port
content dump:
classifier -0186
0 offset
0 shift
2147483647 mask
1 slot
slot 255 :- 0177(Agent/Aodv)
Finished standered no-slot{} default handler
hi,
ReplyDeleteI am totally new to NS2. I have all the files with me, but dont know how to execute code using NS2. Plz somebody help me to resolve this issue.
follow this link to install ns2 in ubuntu :http://vibhanshu86.wordpress.com/2014/06/17/installing-ns2-on-ubuntu-14-04/
ReplyDeleteonce your able to install then follow the blog code to implement the blackhole attack
sir,
ReplyDeletefirstly thank you for such a nice blog.
i simulate the code as per the instructions given and i was able to observe the black hole effect in nam, out.tr and nam files are also available along with goodput calculation.
But for pdr ,while running the code as per the example for pdr.pl specified above, i got the following error:
Illegal division by zero at pdr.pl line 59, line 31937.
i also checked line no.59 at pdr.pl, tried different things, and checked line 31937 in out.tr ,but was not able to fix the error. i request you to help me with this one thing.
i have one question....which method is best to detect blackhole attack?? am thinking of IDS..is it right??
ReplyDeletei am implementation black hole in aodv no error but no effect in result without black hole
ReplyDeletehi saja,
ReplyDeleteThere are two reasons
1. Path is established between source node and destination node without help of attacker. (ans: pls change the source or destination path which includes blackhole attacker).
2. In trace file we need to correct destination When we change the destination node.
Thank for following this blog
Thank you for your cooperation But I do not very much got the idea Is it possible for more clarification
ReplyDeleteI had implemented the above mentioned steps but i couldn't see the effect of blackhole node in the simulation.The packets from the source reaches the destination correctly without any interference of blackhole node..can you please tell me where i am going wrong
ReplyDelete
ReplyDeleteAfter replacing original aodv.cc and aodv.h files,
first perform $make clean operation in ns-allinone-2.xx\ns-2.xx folder then
$make
Do you fit that we use to run two black hole in ns2 version 2.35?
ReplyDeleteI need to implement wired cumwireless scenario, so i waana know can we simulate this scenario without using and base station(intermediate node between wired and wireless node)???
ReplyDeleteit would help me alot
hello sir, im bayu,
ReplyDeleteit is possible to implement blackhole attack on other protocol except AODV ?, i still working my final test to make blackhole attack simulation using ZRP and DSR protocol, almost blackhole patch i found only for AODV if its possible to implement on ZRP and DSR, could you tell me how to configure it?, thank you for your help sir,
best regard
yes it is possible to create blackhole attack on ZRP and DSR,
DeleteBut, you have to analyze the code of dsr.cc and zrp.cc to create these attacks, before doing this you need to know the routing functionalities of DSR and ZRP. (It will take time)
Hello sir,
ReplyDeleteWhen calling
$ns at 0.0 "[$n1 set ragent_] blackhole1"
in some other code, i get floating point exception
Plzz help me to solve dis problem
having error while running the code plzz help mee..
ReplyDeletens: _o39 blackhole1:
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1"
when run $make show error
ReplyDeleteIn file included from ./trace/cmu-trace.h:43:0,
from ./aodv/aodv.h:40,
from aodv/aodv_logs.cc:31:
./mobile/god.h: In member function ‘double vector::length()’:
./mobile/god.h:85:30: error: ‘sqrt’ was not declared in this scope
return sqrt(X*X + Y*Y + Z*Z);
^
make: *** [aodv/aodv_logs.o] Error 1
No need to run $make after replace such file just go to the folder /ns-allinone-2.35 and then ./install
DeleteHello friend, please help me out from these questions and confusion...
ReplyDelete1. can I alter the data flowing in ns2, or can intermediate node compromise the integrity of the message, without the knowledge of sender and receiver.
2. can I generate exact 64 bit key or 80 bit key, using diffie hellman key generation algorithm.
3. which layer is better for encryption ??
4. if i will use, network layer for encrypting the packet.. will IP address also be encrypted... i mean header of IP address will also be encrypted..
I urgently need solution to above queries.. please reply ASAP
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHello sir,
ReplyDeleteblackhole attack code of manet will works in vanet?
And if you have a source code or patch for wormhole attack in vanets please send me to poojan242@gmail.com it will be helpful for my project
sir, i have modified aodv and got blackholes. it works fine. can you help me to make co-operative blackholes?
ReplyDeleteHello...when I run the tcl file i get the below error :
ReplyDeletenum_nodes is set 25
INITIALIZE THE LIST xListHead
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
Floating point exception (core dumped)
Plz help me to resolve the error
I am getting following error:
ReplyDeleter@ubuntu:~/Documents/ns-allinone-2.35$ ns bl.tcl
num_nodes is set 25
INITIALIZE THE LIST xListHead
ns: _o39 blackhole1:
(_o39 cmd line 1)
invoked from within
"_o39 cmd blackhole1"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o39" line 2)
(SplitObject unknown line 2)
invoked from within
"_o39 blackhole1"
Please help..
Use the code from this site. It works
Deletehttp://www.jgyan.com/ns2/blackhole%20attack%20simulation%20in%20ns2.php
i found same error using ns2.35 http://www.jgyan.com/ns2/blackhole%20attack%20simulation%20in%20ns2.php
Deletecodes from both the sites are same!
DeleteThis comment has been removed by the author.
Deletei'm getting the same error.. can u plzz help me?
Deletesir, I am getting Floating point exception if the line containing "BLACKHOLE" is present in code I am using NS2.35,ubuntu11.0
ReplyDeleteThe error is not occurring when that line marked as a comment
Hello sir, can you send me the zip file of this code
ReplyDeleteHello sir, can you send me the zip file of this code
ReplyDeleteplease I need the change witch I have to make in dsr.cc and .h to make a black hole attack
ReplyDeleteplease any body can help me.
Use the code from this site. It works
Deletehttp://www.jgyan.com/ns2/blackhole%20attack%20simulation%20in%20ns2.php
Use the code from this site. It works
ReplyDeletehttp://www.jgyan.com/ns2/blackhole%20attack%20simulation%20in%20ns2.php
i am using ns 2.35 and i am getting this error after the configuration of malicious node ..
ReplyDelete$ ns blackhole.tcl
num_nodes is set 25
INITIALIZE THE LIST xListHead
ns: _o171 blackhole:
(_o171 cmd line 1)
invoked from within
"_o171 cmd blackhole"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o171" line 2)
(SplitObject unknown line 2)
invoked from within
"_o171 blackhole"
sir i need your help kindly help me in worm hole attack in WSN NS2. send me some source code if you keep. planetraheel@gmail.com
ReplyDeleteSir, I need code for Black hole detection and isolation. can I get it here? Please send the code to rahul.rv210@gmail.com
ReplyDeletePlease, I need code for clone attack detection and mitigation. Can you provide it please? Please send the code to baessakajela@yahoo.com or tarikuk28@gmail.com
ReplyDeletethank you sir. i use it. it work done.can you send me perevent of blackhole attack in this project. ..thank you. my email: nedawp@gmail.com
ReplyDeletei need video regarding the above explanation.i am new to ns2. and i'm unable to configure properly. pls send video of above explanation.
ReplyDeleteINITIALIZE THE LIST xListHead
ReplyDeletens: _o171 blackhole:
(_o171 cmd line 1)
invoked from within
"_o171 cmd blackhole"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o171" line 2)
(SplitObject unknown line 2)
invoked from within
"_o171 blackhole"
Hello , I am getting following error while I am running blackhole file in ns2.35
i'm getting the same error..can u plzzz help me
Deletenum_nodes is set 17
INITIALIZE THE LIST xListHead
ns: _o63 blackhole:
(_o63 cmd line 1)
invoked from within
"_o63 cmd blackhole"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o63" line 2)
(SplitObject unknown line 2)
invoked from within
"_o63 blackhole"
i'm getting the same error..can u plzzz help me