# A Resource Oriented Route Selection Framework Using Contextual Information Based on Fuzzy Logic
## IVv6 Routing Protocol for Low Power and Lossy Networks (RPL)
### DODAG Construction  
As described in [5], in the network, each device running RPL can be connected in a manner where no cycles are present. To achieve this, in RPL, topology is constructed and maintained through a destination oriented directed acyclic graph (DODAG), known as DODAG root. In a DAG structure, unlike a traditional tree, one node can have multiple parent nodes. The topology construction process starts at the DODAG root, also commonly known as the LoWPAN border router (LBR). RPL specifies a set of internet control message protocol version 6 (ICMPv6) messages for exchanging topology related information. Typically, RPL uses four types of ICMPv6 control messages. Table 1 enlists these control messages and their respective functions. The DODAG root starts broadcasting the information about the network while using the DIO message to build a new DAG. Upon receiving the message, neighboring nodes decide according to their OF and local policy (DAG characteristic, the cost of the path announced) whether to join the DODAG or not. Once the node decides to join the network, it has a path toward the DODAG root, and then the DODAG root is termed as the 'parent' of the node. Later, each node computes its rank within the tree structure and then checks if the rank is greater than every listed parent. If the node is not configured as a router, it simply joins to the network and it does not broadcast DIO message, commonly referred to as 'leaf node'. However, if the node is configured as a router, it will start broadcasting DIO \begin{table}
\begin{tabular}{c c} \hline \hline
**RPL Control Message Types** & **Functions/Description** \\ \hline DIO (DODAG Information Object) & DIO contains routing control information like RPL instance, stores current rank of the node, the IPv6 address of the DODAG root, carries configuration parameters, etc. \\  & Uses to build upward routing. \\  & It is used to request a DIO message from the neighboring node. \\  & This message is used to circulate the destination information upwards, up to the DODAG root. It enables the support of downward traffic. \\ DAO-ACK (Destination Advertisement Object- Acknowledgement) & Propagate by a DAO receiver nodes in response to a DAO message. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Type 155 ICMPv6 RPL control messages. message to all neighboring peers with the updated information. Neighboring nodes repeat this process until all of the nodes in the network participate in DODAG to form a tree topology. If a node does not receive a DIO message within a definite time, it sends a DIS message to request a DIO message from a neighboring node. Finally, in this construction, each node of the DODAG has routing entry to its parent, through which the leaf nodes can send its data packet towards the DODAG root in a hop-by-hop manner. In RPL specification, two types of routes are defined that are upward and downward routing. The upward routing is a standard process that enables nodes to send data toward a root. It is also known as the multipoint-to-point (MP2P) forwarding model, where the traffic flows upward from the non-root node to the root. However, to create downward routes, DAO messages are used by the non-root nodes to advertise prefix reachability towards the leaf nodes. Unlike MP2P, the point-to-multipoint (P2 MP) model supports traffic flows in the opposite direction that is toward the leaf nodes. Each node that joins the network sends a DAO message to its immediate parent set. Upon receiving the DAO, each parent node appends the routing entry in the routing table and then sends a DAO to its parents. This procedure continues until the information reaches the DODAG root. This operation comes under the \"storing\" mode of operation. It should be noted that RPL defines two modes of operation for downward routing in the DODAG, which is \"storing\" i.e., table-driven and \"non-storing\" i.e., source routing.