## 2 Internet of Things Environment
### Network Layer  
The network layer based on the RPL mechanism creates routing table entries with the help of three control messages, i.e., the DODAG advertisement object (DAO), DODAG information solicitation (DIS), and the DIO. These messages help to construct the DAG structure. DODAG construction begins with the initiation of the sink node, which broadcasts the DIO messages to propagate information about the network's structure and configuration, including rank information. The rank information in DIO messages helps nodes assess their position in the network topology. Upon receiving the DIO message, the neighboring nodes measure their rank and broadcast the information to neighboring nodes. This process continues until all nodes within the DODAG have received the DIO message.  
DAO messages are used by non-root nodes to build reverse routes, allowing parent nodes to track the routes to their child nodes. If a node does not receive the DIO message, it can request to join the DODAG network by sending a DIS message. These messages help the node to discover its neighbors and help ensure the scalability of the DODAG to allow seamless integration of new nodes into the network. An RPL network model with a control message sequence is illustrated in Figure 1.  
The OF defines how nodes translate specific metrics, such as the link quality, energy consumption, or latency, into a value known as rank. Rank is represented as follows [42]:  
\[R_{C}=h+R_{P}+R_{increase} \tag{1}\]  
where \(h\) represents the one hop distance defined in RFC 6719 [43]. The \(R_{C}\) is the child node rank, and \(R_{P}\) is its preferred parent node rank. \(R_{increase}\) refers to the numerical value added to a node's current rank when it becomes a parent for another node in the network. For example, it is the ETX metric for the standardized MRHOF. Since IoT nodes are limited in computational and energy resources, limiting the control overheads is essential. The  
Figure 1: RPL network model with a control message sequence.  
RPL uses a trickle timer mechanism to control the frequency of DIO messages. It increases the transmission frequency of DIO messages exponentially if the network is unstable. The transmission frequency is reduced to the initial level if the network is stable. The trickle algorithm is based on three key variables, i.e., a consistency counter referred to as _counter_, the length of the trickle interval denoted as \(I\), and a random interval of length \(t\). It also has two configuration parameters, i.e., minimum interval length \(I_{min}\) and maximum interval length \(I_{max}\), to determine the range within which the transmission intervals can vary. Each node also maintains a trickle timer state using the current interval \(I\) and the number of messages received within that interval \(k\). Initially, the value of \(I\) is set within the range of [\(I_{min}\), \(I_{max}\)], and _counter_ is initialized to 0. Subsequently, a transmission interval \(t\) is selected from the interval [\(I/2\), \(I\)]. When a node receives a DIO message, it first checks the message consistency. In the event of consistent transmission, which means no change in the rank status of the node, _counter_ is incremented by 1. The DIO is transmitted if _counter_ is below \(k\); otherwise, transmission is suppressed. After the expiration of \(I\), the trickle algorithm doubles the interval length until it reaches \(I_{max}\). In the case where an inconsistent transmission is received, the timer is reset to the initial value [44]. Thus, by using the trickle timer algorithm, RPL nodes dynamically adjust their transmission intervals based on the stability of the network.