# CoAR: Congestion-Aware Routing Protocol for Low Power and Lossy Networks for IoT Applications
## 4 Proposed Congestion-Aware RPL
### Congestion-Aware RPL Description  
The proposed CoAR is designed to use the network resource effectively and utilizes the alternate parent selection strategy of congestion alleviation method. In order to achieve the design objective, the node periodically checks the congestion situation every time interval '\(T_{CC}\)'. The node checks the congestion conditions by monitoring the buffer. When the node's \(QU\) is higher than the \(A_{\tau}\) it enters the congestion state and the congested node broadcasts the DIO to its children. As CoAR implements the implicit congestion notification, therefore the congestion information is piggybacked in the DIO packet and thus reduce the control message overhead. Upon receiving the DIO message with congestion notification the child node undertakes the parent change process and CoA-OF resolves the parent selection problem within the congestion. It selects the alternate non-congested or less congested parent node and then forwards data packets through it. However, the DIO transmission scheme in RPL is regulated by the trickle algorithm where the frequency of sending DIO message is decided by the trickle timer.  
The trickle timer is set to minimum interval length (units of time) \(I_{min}\) and when the interval expires, trickle doubles the interval length until the time specified by \(I_{max}\). Therefore, it is worth noting that the RPL does not provide congestion information in a timely manner due to its long interval length since the timer is reset to a minimum only when inconsistency occurs in the network. To solve this problem in CoAR, the operation of the trickle algorithm is modified such that when the congestion occurs at the parent node, the trickle timer is reset to \(I_{min}\). This reset strategy allows nodes to promptly propagate its information during congestion so that child nodes can quickly select an alternate parent. Algorithm 2 shows the congestion alleviation procedures of CoAR.  
```
0: Congestion check time interval \(T_{\infty}\), congestion threshold \(A\tau\), queue utilization metric \(QU\), and trickle timer minimum interval \(I_{min}\)
0: Routing path selection /* At each parent node
1: Set congestion check timer \(T_{\infty}\) by each \(p\in C_{pars}\)
2:if (\(Tcc(p)\) expired) then
3:if (\(QU(p)>A\tau\)) do
4: Set congestion information bit along with DIO
5: Reset \(I_{min}(p)\)
6: Send DIO
7:end
8: Reset \(T_{\infty}(p)\)
9:end
10:end /* At each child node
11:if (received DIO by \(k\)) then
12:if (congestion bit is enable) do
13: Change parent according to Algorithm 1
14:end
```  
**Algorithm 2**Congestion alleviation operation of CoAR  
DIO message carries relevant network information such as configuration parameters and it can be extended with the use of its options' field. The DAG metric container object that exists in the options' field of the DIO packet format carries the multiple chosen routing metrics and constraints. The routing metric/constraint objects represent a metric or a constraint of a particular type. They may appear in the metric data field of DAG metric container in any order. A tie-breaking metric can be used according to their precedence defined by their _prec_ filed values in object format [35]. For congestion notification, we use a \(CN\) bit in the DIO message. The DODAG configuration option is generally configured and allowed to be modified by the root. It is used to report the configuration information through the DODAG. The simple structure of the DIO is shown in Figure 3.