# Study of Mobility Enhancements for RPL in Convergecast Scenarios
## 2 RPL Protocol Overview  
RPL is a distance vector routing protocol for networks with constraints on processing power, memory, and energy. During the network construction phase, the RPL builds a Directed Acyclic Graph (DAG) topology. All edges of the DAG are oriented in such a way that no cycles exist. This graph is partitioned into one or more Destination-Oriented DAGs (DODAGs) and the RPL calls these destination nodes DODAG roots. Within a DODAG, the RPL uses an objective function (OF) to select and optimize routes according to different metrics.  
During the routing process, a rank metric is used to avoid loops in addition to the routing metric. The construction of the initial topology of the network starts at the sink node that begins to broadcast control messages which contain routing metrics. Each node that receives these messages builds a list of potential next-hops that we call the parents set. The rank of a node is a value that defines the position of the node with respect to the sink in terms of metrics in DODAG Information Object (DIO) messages. The rank of the sink node is ROOT_RANK, that contains a value of MinHopRankIncrease, which is the minimum increase of the rank between a node and any of its parent nodes. In [4], the integer portion of the rank computation is computed by the DAGRank() macro shown in Equation (1). In this equation, \(floor(n)\) is the greatest integer less than or equal to \(n\).  
\[DAGRank(Rank)=floor(Rank/MinHopRankIncrease) \tag{1}\]  
The rank value is proportional to the increase of the metric [4], and therefore we get the rank computation of the node itself, which is shown in Equation (2).  
\[Rank=ROOT\_RANK+a\times MinHopRankIncrease \tag{2}\]  
where \(a\) is another metric value in the DODAG Information Object (DIO) messages that comes from a node with a lower rank.  
By Equation (2) a node computes the rank value of itself and then broadcasts the rank value using a DIO message. A node that receives this DIO message may use Equation (1) to compute the rank value of the sender. If the rank of the receiver node is higher, it means this control message is from a potential next-hop. Note that the receiver node adds all senders with lower ranks to its parents set.  
To maintain the topology and exchange routing information, RPL defines four types of control messages: DIO, Destination Advertisement Object (DAO), Destination Advertisement Acknowledgement (DAO-ACK), and DODAG Information Solicitation (DIS). A DODAG Information Object (DIO) message is used to carry information that allows a node to discover its neighbours A Destination Advertisement Object (DAO) message is used to propagate destination information by a child node to a selected parent node. A Destination Advertisement Acknowledgement (DAO-ACK) message is sent in response to a DAO. A DODAG Information Solicitation (DIS) message is mainly used to probe its vicinity by soliciting a DIO message from a neighbour node. RPL transmits DIOs using the trickle algorithm that contains three main parameters \(I_{min}\), \(I_{max}\), and \(k\). At the beginning, a variable \(I\) will be set to a value in the range of \([I_{min},I_{max}]\), where \(I_{min}\) is the minimum duration and \(I_{max}\) is the maximum duration separating two consecutive DIOs. The first DIO interval \(I_{Dio}\) will be randomly taken from the range \([I/2,I]\). In order to avoid depleting the energy of nodes in a low-power network, the redundancy constant parameter \(k\) has been defined. Nodes can retransmit a packet to the same node a maximum of \(k\) times. Whenever nodes receive a transmission, a counter \(c\) is used to record the number of transmissions. If \(I_{Dio}\) expires and the counter \(c\) is less than \(k\), nodes will transmit DIOs. After this transmission, nodes double the interval for the next transmission until \(I\) reaches \(I_{max}\). If the transmission is inconsistent or \(c\) is larger than \(k\), nodes reset \(I_{Dio}\) to \(I_{min}\), \(c\) to zero and start a new interval.