# Routing Protocols for Low Power and Lossy Networks in Internet of Things Applications
## 3 Routing Protocols for Low-Power and Lossy Networks
### Rpl  
RPL is a tree-based routing protocol created by the RoLL working group and defined by IETF as the standard routing protocol for LLNs [24]. RPL organizes the network topology in a Destination-Oriented Graph (DAG), which is composed of one or more Destination-Oriented Directed Acyclic Graphs (DODAG). Each DODAG represents a routing tree created by a root node, also known as a sink node or LBR (LLN Border Router). To construct the DODAG, RPL uses the Objective Functions (OF) that adopt routing metrics to calculate the best path between nodes and the DODAG root [49]. Thus, the routing structure created by the RPL is a logical topology built on a physical topology according to the used OF. In the RPL operation, the network nodes initially build the DODAG. Thus, in this first step, the root node starts the process of DODAG construction, sending a DIO (DODAG Information Object) message to its neighbors. This message carries various relevant information, such as node rank, mode of operation, OF, and metrics. Each node that receives a DIO message should process it and decide whether or not to join the DODAG according to the used OF [50]. If a node chooses to join the DODAG, it has an upward path to the root node. At this moment, the node computes its rank, refreshes its neighbor table, and chooses its preferred parent, which will be used to forward messages to the DODAG root. Usually, the preferred parent is the neighbor with the lowest rank computed according to the OF. Some nodes may be configured to provide routes to other nodes. If a node is set to be a router, it should update and resend the DIO messages to its neighbors. If the node does not resend DIO, it is defined as a leaf in the routing tree. Each node that receives the DIO message should process it and continue the operation until all network nodes can be reached [51]. RPL permits a new node to join the network at any time. In this case, the new node uses a DIS (DODAG Information Solicitation) message to request a DIO message of a node already incorporated in the DODAG. Through the reception of the DIO message, the new node selects its preferred parent according to the OF. Furthermore, a DIO message is used in DODAG maintenance. Based on the Trickle Timer [52], DIO messages are periodically sent by the nodes seeking to maintain network stability. RPL allows both upward (from the node to its parent) and downward (from the node to its children) routes. Upward routes are naturally created during the initial process of DIO sending. However, the use of downward routes requires the handling of DAO (Destination Advertisement Object) messages. The DODAG nodes process the DAO messages according to the RPL Mode Of Operations (MOP), which are presented below. Independent of the MOP used, DAO messages may require reception confirmation, which should be done using DAO-ACK messages. Although it is designed for the Multipoint-to-Point (MP2P) traffic pattern, RPL also admits the data forwarding using Point-to-Multipoint (P2 MP) and Point-to-Point (P2P) [53]. In MP2P, the nodes send data messages to the root, creating an upward flow (Figure 1a). In P2 MP, sometimes termed as multicast, the root sends data messages to the other nodes, producing a downward flow (Figure 1b). In P2P, a node sends messages to the other node (non-root) of DODAG; thus, both upward and downward forwarding may be required (Figure 1c). RPL defines four MOPs that should be used considering the traffic pattern required by the application and the computational capacity of the nodes. In the first, MOP 0, RPL does not maintain downward routes; thus, consequently, only MP2P traffic is enabled. In non-storing MOP (MOP 1), downward routes are supported, and the use of P2P and MP2P is allowed. However, all downward routes are maintained in the root node. Thus, the total downward traffic should be initially sent to the DODAG root and subsequently be forwarded to its destination as shown in Figure 2a.