How to Create the Local Repair Attack in Contiki Cooja Simulator?
Share
Steps for Creating the Local Repair Attack in Contiki Cooja Simulator
Description:
It’s a repair mechanisms to maintain the network topology. If link/node failures, RPL implements local repair mechanisms to dynamically update routing decision and network topologies. Local repairs consist of finding an alternative path (it may not be the best route) without triggering a DODAG reconstruction in the link failure area.
Step-1
Open a file to modifyat location:
Home /user / contiki / core / net / rpl /
rpl-icmp6.c - controlling the
input and outputfor RPL control
messages.
We need to create alternate
path for affectedtopology.
To launch local repair
mechanisms worksrouting
through siblings with the
samerank or Switch parents.
Location:home/user/contiki
/core/net/rpl/rpl-dag.c
we need to provoke this file
predefined function
->rpl_local_repair().
Code:
icmp6.c file at function dio_output()
if (node_id == 20 || node_id == 30) {
instance->current_dag-> rank = 100;
}
Step-2
Create a simulation in cooja New simulation(ctrl+n).
Create a simulation in cooja New simulation(ctrl+n).
To create motes choose the files at following location:
Home / user / contiki / examples / ipv6 / rpl-udp
udp-server.c, udp-client.c
Run the simulation.
Start - run the network simulation
In control panel.