Dear All,
I just tried to modify the C++ code of AODV such that one node tries
to flood rreq to a destination that doesn't exist based on some
information I got on the web. let me explain what I did.

I added a class FloodTimer to aodv.h as follows.
class FloodTimer : public Handler {
FloodTimer(AODV* a): agent(a){}
void handle(Event*);
AODV *agent;
Event intr;
and added this too:
FloodTimer ftimer;

Then i made the following modification to file:
-Added ftimer(this) to the constructor of AODV class and
-defined the following function to flood RREQ.

void FloodTimer::handle(Event*) {
//node 1 will be the attacker sending request to node 100
#ifdef DEBUG
fprintf(stderr, "(%2d) - %2d FLOODING ATTACK, dst: %d\n",
++route_request, index, 100);
printf("Node 1 is flooding rreq\n");
#define FLOOD_INTERVAL 0.1
Scheduler::instance().schedule(this, &intr, FLOOD_INTERVAL);

But when I recompile ns2, and run a simulation of AODV network, there
is no effect of flooding. I tried to printf from the above function
and didn't print any output. Can any one help me how to fix this, i.e
Enabling node 1 to send RREQs to node 100(which doesn't exist in the
network) every 0.1 sec? Or is there any other way to implement rreq
flooding attack in AODV?
Thank you in advance,

Reply via email to