# A Smart Collaborative Routing Protocol for Reliable Data Diffusion in IoT Scenarios
## 3 The Smart Collaborative Routing Protocol for IoT
### Preliminary Foundation
#### 3.1.2 IN Mechanism  
The IN mechanism makes use of the packet monitoring strategy to prevent deliberate destruction and malicious attacks. Three types of nodes are involved in the mechanism, i.e., CH nodes, INs and MNs. As shown in Figure 2, they can be supervised and checked by each other. The INs can overhear the CH's behaviors. Once the IN detects some unusual actions of CHs, it will blacklist the CH and inform the surrounding MNs to stop sending data to the CH. The MNs may refuse the decision, if the decision of the IN is a deliberate accusation. Moreover, the CHs can send random checking requests to INs for adjusting their status. If the MNs have not participated in the IN nomination for long, they will receive a bad reputation. MNs can check if the CH is normally transmitting data and if the IN is working correctly.  
Figure 1: A schematic of Geographic and Energy Aware Routing (GEAR) protocol. (**a**) Process of sending a query command; (**b**) The required data is transmitted to the sink node along the reverse path; (**c**) The query iteration in event area.  
(a) Inspecting Nodes  
On one hand, the INs play an important role in monitoring the activities of the CHs and the MNs. First, if the IN observes that the CH did not forward more than a fixed number of packets, the IN will send an accusation message to MNs and broadcast the bad reputation of the CH. Then, the CH is placed in the blacklist.  
On the other hand, the INs could be checked randomly by the CH for judging their status. The CH sends a historical packet that was supervised before sending to the IN. Since the IN does not know which packet will be requested in the history records of the reputation system, it cannot cheat on the random checking process. The IN will then make a response to the request of CH, which is the same as the previous action. According to the response of the INs, the CH can ensure the IN is working well or not. If it is working correctly, the IN will restart the reputation system. Then, the historical reputation records of the IN will be cleared. The IN will continue to monitor the node actions and keep the monitoring history to satisfy the next random checking request from the CH. If not, the IN will be blacklisted by the CH. The specific processes are shown in Figure 3.  
(b) Cluster Head Nodes.  
At the initial stage of the network, all nodes should actively participate in the selection of CHs or INs. As this process consumes more energy, a node may avoid this obligation, i.e., not to take part in the selection of CHs or INs. However, the CH can supervise the deliberate action. If the node has refused to serve as a CH or IN for a long time, it will be blacklisted in the reputation system.  
If a CH node has not received any penalty for a long time, the IN may exist dishonest actions. If the IN has been working honestly, it replies with the correct response to the random checking of the CH. Once the IN cheats on the CH's random checking process, it will be also blacklisted in the reputation system.  
(c) Member Nodes  
The MNs can record the good or bad reputation for CHs and INs. For example, if a CH has been transmitting the packets successfully all the time, the MN will give a good reputation for CH. On the contrary, if a large amount of data is incorrectly forwarded, the CH will be blacklisted in the reputation system.  
Figure 2: The basic topology of IN mechanism.  
For the IN, receiving a good or bad reputation depends on whether it can correctly judge the behaviors of CHs. If an IN is not strictly monitored, it is likely to become a selfish node. Then, other nodes will not be accused by the IN even though a lot of packets are not delivered correctly.