# Detection and Mitigation of RPL Rank and Version Number Attacks in the Internet of Things: SRPL-RP
## 4 Simulation and Results Analysis
### Results Analysis
#### 4.2.2 Accuracy Results  
In this sub-section, we divided the proposed SRPL-RP into two groups based on the rank attack and version number attack to compare and evaluate them with SBIDS [13] (which provides detection against the rank attack) and RPL+Shield [14] (which provides mitigation against version number attack). We analyzed the effectiveness of the proposed SRPL-RP (Rank Attack) in detecting and mitigating the attack by classifying legitimate nodes and malicious nodes in the three types of topologies and comparing the results with SBIDS [13] and RPL+Shield [14]. Figure 6 shows the Accuracy Rate (AR) of SRPL-RP (Rank Attack) and SRPL-RP (Version Number Attack) compared with SBIDS [13] and RPL+Shield [14] in the three topologies. The results of the analysis and comparison linked to the chart are presented in Tables 12-14, respectively. These results show that our proposed protocol SRPL-RP (Rank Attack) in the grid-center topology had the highest AR among other topologies compared with SBIDS [13]. The proposed protocol in the grid-random topology had the highest True Negative (TN) accuracy and the lowest False Positive (FP) accuracy, among other topologies compared with SBIDS [13]. The proposed protocol in the grid-center topology had the lowest False Negative (FN) accuracy and the highest True Positive (TP) accuracy, among other topologies compared with SBIDS [13]. These results show that our proposed protocol SRPL-RP (Version Number Attack) in the random topology had the highest AR among other topologies compared with RPL+Shield [14]. The proposed protocol in the grid-center topology had the highest \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Protocol/Time**} & \multirow{2}{*}{**SRPL-RP Attacks**} & **RPL +** & \multirow{2}{*}{**SRPL-RP (Rank)**} & \multirow{2}{*}{**SBIDS [13]**} & **SRPL-RP (Version** & **RRPL +** \\  & & & **Attacks** & & **(Rank)** & **Number** & **Shield [14]** \\ \hline Convergence Time & 255 joules & 2247 joules & 2.939 joules & 3.005 joules & 2.876 joules & 3.326 joules \\ \hline Stability Stage & 658 joules & 21,167 joules & 304.30 joules & 311.054 joules & 305.617 joules & 333.502 joules \\ \hline Final Stage & 991 joules & 43,481 joules & 1231.778 joules & 1259.908 joules & 1244.819 joules & 1314.884 joules \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Average Energy Consumption Comparison in Random Topology. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Protocol/Time**} & \multirow{2}{*}{**SRPL-RP Attacks**} & **RPL +** & \multirow{2}{*}{**SRPL-RP (Rank)**} & \multirow{2}{*}{**SBIDS [13]**} & **SRPL-RP (Version** & **RRPL +** \\  & & & **Attacks** & & **(Rank)** & **Number** & **Shield [14]** \\ \hline Convergence Time & 259 joules & 2525 joules & 2.927 joules & 3.084 joules & 2.931 joules & 3.236 joules \\ \hline Stability Stage & 867 joules & 25,008 joules & 309.474 joules & 314.903 joules & 311.687 joules & 325.414 joules \\ \hline Final Stage & 1332 joules & 50,462 joules & 1258.783 joules & 1276.162 joules & 1263.291 joules & 1287.982 joules \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Average Energy Consumption Comparison in Grid-Center Topology. TN accuracy and the lowest FP accuracy among other topologies compared with RPL+Shield [14]. The proposed protocol in the random topology had the lowest FN accuracy and the highest TP accuracy among other topologies compared with RPL+Shield [14]. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Protocol/Time**} & \begin{tabular}{c} **SRPL-RP** \\ **(Rank)** \\ \end{tabular} & \multirow{2}{*}{**SBIDS [13]**} & \
\begin{tabular}{c} **SRPL-RP (Version** \\ **Number Attack)** \\ \end{tabular} &
\begin{tabular}{c} **RRPL + Shield** \\ **[14]** \\ \end{tabular} \\ \hline Convergence Time & 0\% & 0\% & 0\% & 0\% \\ \hline Stability Stage & 91.41\% & 88.00\% & 93.73\% & 94.04\% \\ \hline Final Stage & 92.88\% & 88.90\% & 96.14\% & 92.93\% \\ \hline \hline \end{tabular}
\end{table} 
Table 14: Accuracy Rate (AR) Comparison Random Topology.