Research Article

Intrusion Detection Algorithm for Mitigating Sinkhole Attack on LEACH Protocol in Wireless Sensor Networks

Algorithm 1

IDS Algorithm for Sinkhole Attack.
Begin
is the sensor network and be the total packets transmitted by the th CH in
is the total packets received by the th CH in
is the Cluster head Node ID
is the Intrusion ratio for the th CH
Repeat
 Time_delay (100)
 For ()
  Receive packets from the CHs’
  Calculate where
  If tends to ∞ then
   Corresponding is the sinkhole node
   Isolate
   Send warning message to the remaining cluster member nodes about
  Else
   Corresponding is the normal CH
  End if
 End for
 Until the nodes transmission process completes
 End