RPL Routing Protocol
RPL Routing Protocol
RPL Routing Protocol
Topology Formation:
This rank number increases from root node to the successive parents and
leaf nodes within the formed network tree
When forming the DODAG, each node is required to select parent nodes
from its neighbors, under the restriction that the nodes calculated rank
must be larger than the rank of all its parents. By this procedure, the
formation of loops is prevented.
The nodes rank is calculated based on the Objective Function (OF) and
using its related metric, which is specified according to the DODAGs
application requirements.
The circles represent nodes and the discontinued lines represent the
possible links between nodes.
The RPL protocol starts when the root node triggers the DODAG
formation by broadcasting a DIO message to its neighbors.
The DIO messages traverse the network while the rank field is updated
in each hop. The root nodes rank is 0, since it has distance 0 to itself,
and the rank of its immediate neighbors is 1 according to the OF.
After calculating their rank, each node updates the DIO and broadcasts it
to its neighbors
The node chooses the called preferred parent, which will serve as the
nodes next hop towards the root when routing a data packet. This choice
is determined by the OF
The preferred parents (for nodes with rank 1) are chosen to minimize the
number of hops. This relationship is represented by the bold plain
arrows.
In the next step of the RPL topology construction, the nodes with
calculated rank 2 have chosen their preferred parent and broadcasted
their DIO messages
Sometimes there are parents that satisfy the same conditions imposed by
the OF to be elected as the preferred parent. In this case, the node is free
to choose any of the suitable parent nodes as a preferred parent.
Once this command has been successfully executed, a file named border-router.sky
will be created. This file will be used to program one of the motes as the border
router on Cooja. For the purpose of this tutorial we will select TMote Sky as our
target.
In order to demonstrate the functionality of the border router we will create a
network of nodes with the border router as the root. For creating such a network
we will user the udp-server.c code. This code can be found at /contiki2.7/examples/ipv6/rpl-udp . Use the following command to compile the code for
rpl-udp
cd /contiki-2.7/examples/ipv6/rpl-udp
make TARGET=sky
Once this command has been successfully executed a file named udp-server.sky
will be created. This file will be used to program the remaining nodes in Cooja
simulator. These nodes will form a DAG with the rpl border router as the root.