# Trust and Mobility-Based Protocol for Secure Routing in Internet of Things
## 5 Simulation Study
### Results and Analysis
#### 5.2.1 Network Performance Comparison in Scenario I  
Scenario I comprises only static nodes in the network. In a Blackhole attack, the malicious nodes tend to drop the packets. Figure 6 shows the graphs for network performance analysis under Blackhole attack in Scenario I. The frequency of node rank changes determines the stability of the network. On average, the frequency of node rank changes is 54, using SMTrustOF under Rank attack in static nodes scenario. The average number of node rank change is quite justifiable in a RPL topology of 30 nodes with random positioning in the network, including the malicious nodes. Under Rank attack, SMTrust shows a stable topology as compared to SecTrust and MRHOF. However, compared to MRTS, SMTrust shows a negligible difference of 2.4 under a Rank attack in Scenario I. Similarly, SMTrust shows a more stable topology under Blackhole attack with an average frequency of node rank change as 34.4, as compared to SecTrust (19.9) and MRTS (70.7).  
Similarly, the packet loss rate for SMTrust stays lower as compared to MRHOF. On average, SMTrust experienced a lower packet loss rate of 15.5% under Rank attack in Scenario I, indicating a promising defence against Rank attacks. In comparison with MRTS, under Blackhole attack, SMTrust shows an equivalent packet loss rate. However, there is a small difference for the results comparison of SMTrust with MRTS, which is 4.3% under Rank attack in Scenario I. This can be justified by the fact that MRTS uses IDS for attack detection, which is computationally intensive and needs a hardware security chip embedded in the device, whereas SMTrust does not need additional hardware for security because it uses a simplified trust computation mechanism.  
The throughput measures in SMTrustOF-based RPL are quite satisfactory. The throughput of SMTrust is much higher as compared to MRHOF. Under a Rank attack, SMTrust shows a higher throughput as compared to MRTS (3.39 kbps), SecTrust (2.84 kbps), and MRHOF (1.53 kbps). The average value of throughput performance in SMTrust under Rank attack in static scenario is 5.13 kbps, indicating that the network is not segmented due to the Rank attack perpetrated by the malicious nodes in the network. It is also an indication that all the nodes communicated with the sink and the attacker nodes were successfully isolated from the network as untrusted nodes. For the average throughput  
Figure 8: Results comparison of network performance under Blackhole and Rank attack in Scenario III.  
value in Scenario I (Figure 6), as compared with MRTS, SecTrust, and MRHOF, SMTrust performs comparatively better than existing solutions, with 3.34 and 5.13 kbps, under Blackhole and Rank attacks, respectively.  
For average power consumption, SMTrust shows similar results as compared to MRTS, SecTrust, and MRHOF under Blackhole and Rank attacks in Scenario I. The performance of SMTrust with respect to power consumption is because SMTrust considers the trust metrics computation and consumes a little more power in computations and DIO transmissions. However, once the malicious nodes are identified and isolated, the topology becomes stable and power consumption stabilizes as well.