Вы находитесь на странице: 1из 6

Routing Protocol- RPL

RPL (Routing Protocol for Low Power and Lossy Networks)


RPL is to support 6LoWPAN networks in a route-over configuration.
With RPL, 6LoWPAN routers operate as IPv6 routers and form routes
using RPL.
RPL does distinguish between three type of traffic: multipoint-to-point
(M2P), point-to-multipoint (P2M) and point-to-point (P2P). RPL works
with all three type of traffic
Starting from one or more root nodes, each Instance builds up a tree-like
routing structure in the network, resulting in a Destination-Oriented
Directed Acyclic Graph (DODAG). As multiple RPL Instances may
coexist, multiple DODAG may coexist in the same network. However, a
node cannot join more than one DODAG within one Instance

Topology Formation:

RPL topology construction begins by designating a special node to be


the root node for one Instance
The configuration parameters of the network are packed into a DODAG
Information Object (DIO), which is then used to disseminate the
information in the network.
The compulsory information contained in a DIO includes:
the RPL Instance ID for which the DIO is sent
the DODAG ID of the RPL Instance of which the sending node is part
the current DODAG version number
the nodes rank within the DODAG

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.

RPL route discovery example:

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.

RPL Border Router


The code for RPL border router can be found at /contiki-2.7/examples/ipv6/rplborder-router. Use the following command to compile the code for the border
router
cd /contiki-2.7/examples/ipv6/rpl-border-router
make TARGET=sky.

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.

Вам также может понравиться