Search This Blog

Saturday 21 February 2015

How to avoid flooding node in my route and choose alternate path in ns2 ?

Avoid packets through Flooding/Malicious/Blackhole node and choose alternate path:

Flooding node/malicious node/blackhole node, the answer is same. Delete the destination node from your route table and restrict adding these node to your route table. Thats it. After the hello period, aodv automatically finds a new route to your destination excluding the malicious/flooder/malicious node.

i)  Delete the route in your rt_table.
In forward function,  
   if(dest is blockhole)    
     rtable.rt_delete(ih->daddr());


ii) Drop ROUTE_REP from blockhole node and restrict them by not adding to your rt_table
In recvReply function  
if(rt == 0)   {    
  if( ! blockhole_node)    
      rt = rtable.rt_add(rp->rp_dst);  
}

It will work. This is just one way. If you have a better way in mind, feel free to comment.

P.S: Guys the above logic is for avoiding packets through the flooding/malicious/blackhole node and finding an alternative path (not meant for flooding prevention).

Sunday 8 February 2015

ns2 tips

The initial mistake i did, 
      * Do not forget to set the path after installing ns2. No matter what, how many times you try it won't work. You gotta set the path. The best way to ensure that you installed ns2 correctly is, try enabling the hello packets.  click here
      * Compiling process, after modifying aodv files. click here
                * Not reading this basic aodv tutorial click here.

            Do share your mistakes in the comments...