# QoS Enabled Layered Based Clustering for Reactive Flooding in the Internet of Things
## 4 Proposed CBF for IoT
### The IntraLayer Clustering (IALC)
n exhibits the sum of motes within the network, \(Z_{0}\) denotes the initial mote position (\(\mathrm{x}_{0}\), \(\mathrm{y}_{0}\)), \(Z_{n}\) denotes the current location of the mote (\(\mathrm{x}_{n}\), \(\mathrm{y}_{n}\)), and M symbolizes neighbor motes. The QCM algorithm is composed of two levels. The initial level is responsible for selecting the information that sends the QueryLimitThreshold (QLT) and checks the SignalStrengthConsistancy (SSC) for each mote. As all motes have the ability to send information after a specific duration, the mechanism can record the volume of queries sent by every mote. The level is to check the SignalStrengthConsistancy (SSC), that is depending on the sending QueryLimitThreshold (QLT). It is assumed that each mote in the network might be in one of the following three conditions: typical (i.e., the mote is in a normal condition), fishy (i.e., the mote is in a suspicious condition), and the flooder (i.e., the mote is a flooder). At the beginning, all motes are in the typical condition and can exchange query packets to each other by single- or multi-hop communication. In the fishy condition path analysis is carried out based on the communication type (single- or multi-hop) which is further utilized by the motes to query data exchange. If the fishy sender more is based on single-hop communication, the single hop path analysis can be done to easily detect the fishy sender more. If the fishy more is based on multi hop communication, the path analysis can be done to check every hop and query the packets transmitted by all motes. A mote is considered a flooder if normally sent queries contradict with the number of query packets transmitted by the mote. The mechanism considers a mote is in the typical condition if the amount of MaxPacket (M) is similar to the QueryLimitThreshold (QLT). Lastly, the proposed QCM eliminates all the flooder motes by updating all connected neighbor motes to change their communication channels and links that come from the flooder mote. Figure 7 elaborates the overall process flow chart of cluster-based flooding. ### Cluster Based Flooding (CBF) Model Formulation

The cluster-based flooding model is designed as either one of two sorts of games: proactively (intralayer) favorable for the sensor layer or reactively (interlayer) favorable for the network layer. The aim of intralayer clustering is to use more network resources to get the updated information of the motes for handling priority packet queries and mitigate delays in the IoT network by using the table-driven approach. The cluster-based flooding (CBF) model is subsequently elaborate. Assuming that during query propagation the topology of the network remains static, and intralayer clustering (IALC) is already aware of topology variation. Intralayer clustering (IALC) ultimately enhances CBF by query route repairing and caching inside the cluster. A significant feature of this method is that it is not dependent on assumptions concerning the size of any mote's cluster. Subsequently, this proof of correctness refers to the networks where every mote has the same cluster radius, and to the networks where every more individually handles their own cluster. As shown in Figure 8, let m(t) be the set of queried motes which reside within the cluster (IALC), which might be interior or peripheral motes at time interval t. We refer to queried motes as, i.e., motes that have already been visited and are directly accessible to the source mote. Similarly, the remaining set of unqueried motes are denoted by m\({}^{c}\) (t), unqueried motes are referred to the motes that are not yet visited, reside in the outer cluster, and are not directly accessible to the source mote. Figure 7: Flowchart of the CBF process. Let B(t) be the subset of m(t), which is referred as peripheral or border motes.