# QoS Enabled Layered Based Clustering for Reactive Flooding in the Internet of Things
## 4 Proposed CBF for IoT
### The IntraLayer Clustering (IALC)
A realistic condition is referred to as the random transmission of route query

Figure 9: Average consumption of energy with respect to different interval of traffic (**a**); with malicious motes (**b**), and malicious motes with realistic condition (**c**). packets between the motes at varying intervals. During the redundant flooding attack, it is very essential to simulate the realistic condition to understand the efficiency of the proposed QCM. As shown in the result the average consumption of energy of DnC and SLA at malicious mote 1 is approximately 18% and 15%, respectively, and this consumption rises to about 70% and 56%, respectively, at malicious mote 15, while with QCM this consumption of energy falls to approximately 3% and 24% at malicious motes 1 and 15, respectively. In addition, this consumption is approximately 6% less than that of the traditional Hy-IoT at malicious mote 1 and 20% at malicious mote 15 using the same condition. The performance of the network improves by adopting the proposed QCM Technique. ### Traffic Delay

The effect of traffic delay on number of malicious motes, the time interval and malicious motes in realistic condition are shown in Figure 9(a)-c, respectively. In Figure 9(a), QCM outperformed as compared to DnC, SLA, and Hy-IoT by having least traffic delays. QCM has the ability to detect, pause, and detach the flooding mode from the network, which helped in improving its performance. On the other hand, the redundant and unwanted queries were also removed by detaching the flooding motes. Traffic delay of DnC and SLA is 26% and 20%, respectively at Interval 1 as shown in Figure 9(a). The proposed algorithm in the network causes a decrease of 10%, approximately in the traffic delay at the same interval. This drop in traffic delay by the proposed algorithm is approximately 4% less than the traditional Hy-IoT. Hence, this percentage is directly proportional to the interval: as the interval increases the percentage will continue to increase. Figure 10: Delay with respect to different interval of traffic (**a**), with malicious motes (**b**), and malicious motes with realistic condition (**c**). The traffic delay with respect to the increasing number of malicious motes are shown in Figure 10b. Here, at malicious mote 2, the traffic delay of DnC and SLA are about 37% and 35%, respectively, in normal reactive flooding. This increase in traffic delay continues to increase in the number of malicious motes. At malicious mote 15 the maximum traffic delay of DnC and SLA are recorded as approximately 85% and 75%, respectively. The proposed QCM outperformed as compared to Hy-IoT at malicious 2 and 15, and it reduces the delay to about 7% and 37% gradually, while with the same malicious motes (2 and 15) the Hy-IoT has a comparatively higher traffic delay of approximately 15% and 49%, respectively. This decrease in traffic delay by QCM is due to the decrease in the link waiting time. The proposed flooding techniques are also evaluated using realistic network conditions with an increasing number of malicious motes as mention in Figure 10c. Traffic delay of DnC and SLA at malicious mote 1 is approximately 45% and 30%, respectively. This traffic delay of DnC and SLA at malicious mote 15 increases up to approximately 89% and 81%, respectively, in the realistic network scenario. The proposed QCM comparatively outperformed in the realistic network scenario by having approximately 11% and 45% traffic delays at malicious motes 1 and 15, respectively. This drop in traffic delay by QCM is approximately 6% and 15% better than the existing Hy-IoT at motes 1 and 15, respectively. ### QoS and Throughput

As shown in Figure 11, the proposed QCM is compared with DnC, SLA, and Hy-IoT using network throughput, which we referred to as QoS. Here QoS is measured for these four flooding mechanisms using three scenarios, such as time interval, increasing number of malicious motes and malicious motes with realistic network conditions.