How to simulate trickle algorithm in RPL using cooja simulator?

Description

Trickle timer used to an updating and construction of DODAG .It contains the information for forwarding the packets every node receives.TheTrickle algorithm controls the amount of routing traffic DIO’s messages in It also controls node listening time for new information and then how it will be sending out its current information to its neighbor nodes.

   Open the files who responsible
for trickle timer.

   Files location:
four different ways do modify
parameters to set trickle algorithm
and check the result.

Method 1:

Home/user/contiki/core/net/rpl
rpl-private.h

RPL_MOP_DEFAULT
//RPL mode of operation

RPL_OF
//RPL Objective Function

v12
Method 2:

rpl-conf.h

RPL_DIO_INTERVAL_MIN
//DIO Minimum

RPL_DIO_INTERVAL_DOUBLINGS
//DIO Doubling

v13
Method 3:

netstack.h

NETSTACK_RDC_CHANNEL_CHECK_RATE
//RDC Channel Check Rate

Method 4:

udp-client.c

#define START_INTERVAL
(15 * CLOCK_SECOND) //set interval

#define SEND_INTERVAL
(PERIOD * CLOCK_SECOND) // send interval

#define SEND_TIME
(random_rand() % (SEND_INTERVAL)) //time to send

   The changes made modifications
to Modified the RPL source code in
Contiki to write the four Trickle algorithms
described in the background . rpl-timers.c file.

   Pseudo-code to set Trickle timer
//Initialization

I ←Imin //Start New Interval

I ←I ×2c ← 0

if Imax ≤I then

I ←Imax

end if

t ←random[I/2, I) //
Received Consistent Transmission

c ←c +1 //Received
Inconsistent Transmission

I ←Imin14 //Random Timer Expires

if c < kn

then

Transmit Scheduled DIO

else

Suppress Scheduled DIO

end if

   Open contiki cooja network
simulator

   Create New simulation(ctrl+n).
To create motes choose the

   files at following location:Home/
user/contiki/examples/ipv6/rpl-
udpudp-server.c, udp-client.c

   Run the simulation.

   Start-click run the simulation
in control panel

14c

   We can check delay, that is time
interval of control messages delivers
using metrics calculation.

Leave Comment

Your email address will not be published. Required fields are marked *

clear formSubmit