*3.1. Selection of Prudent Network*

The interconnectivity and relative performance of IoT-enabled devices have been examined using network simulator (NS2). The volatile nature of wireless network scan easily be analyzed when discrete data are feed. It possesses extensive libraries and a variety of communication protocols. The results are a hallmark for future investigation.

Initially, three hosts and two routers (one main router and another related to a particular heterogeneous network) were configured after creating the devices and linking routers and hosts in the network to perform basic tests. Four networks (10.0.100.0/24, 10.0.200.0/24, 10.300.0/24) and (10.0.1.0/24) were configured with dynamic OSPF routing protocol [1] running for the network, linking two routers to transfer network information from one router to a subsequent one.

As the execution begins, the IoT-enabled wireless devices initiate the packet broadcast mechanism illustrated in Figure 2, where a number of IoT devices broadcast the data packets in the heterogeneous environment.

**Figure 2.** SDS heterogeneous network simulation in process.

The proposed scenario is designed to appropriately represent the deviating values of response metrics from their corresponding performance metric bounds in order to conserve network capacity and increase transmission ability. The values of the performance metrics are entered into the system to maximize and decrease the performance measure. Furthermore, the deviating value represents the balance of the trade-off between device demand and routing efficiency; both values are critical in balancing the weight of communication expenses. Using communication potential, the suggested SDS approach computes the optimal fitness value. The communication potential is associated with each device, which affects the behavior of particles to find the overall dataflow output value of a single parameter at a time. These values represent the new parameters upon which the performance of each heterogeneous network is analyzed in terms of round trip time (RTTP), network throughput, and energy consumption.

#### *3.2. IoT Device to Device Link Selection Mechanism*

The routing path between the IoT devices are represented by *d*Δ, which, in fact, foretells the best quality path but not a legitimate scrumptious link. Therefore, a predefined link selection attribute (*LSA*) is considered and all records are maintained in a data table corpus. Equation (1) shows the entire process of the link selection mechanism, where four varieties of links are determined. Sometimes, it happens that the best quality link is achieved but it does not belong to a targeted destination; therefore, such links are not considered as legitimate links.

$$LSA = \begin{cases} Sex{morphisms\ link}, \\ \begin{array}{l} Average\ link, \\ \hline Fair\ link, \\ \hline \end{array} \end{cases} \qquad LSA\_{scumptions} < d\Lambda \tag{1}$$

Consider *pt* as an absolute data packet sent from the source device and *ps* to be the destination device's successfully accepted packet. The *pti* represents the data packet sent from device node *i*, and would determine the connection quality through calculating the total *LSA* and signal-to-noise ratio (*SNR*) of *pti* in relation to the accessible networks. Equation (2) may be used to compute the link factor estimator (*LFE*) parameter.

$$lfe = D\begin{pmatrix} i\_{pt\prime} \ S \end{pmatrix} - D\begin{pmatrix} j\_{pt\prime} \ S \end{pmatrix} \tag{2}$$

The *D* (*ipt*, *S*) and *D*- *jpt*, *S* are taken from the Euclidean distance formula, i.e., from source device *i* to the destination device *j*. *S* represents the source region where nodes are found as *i* = (*i*1, *i*2, *i*3, ... , *i*n). The packet transmission from the *i* sensor node moves toward the destination region denoted by *D* and, therefore, respected packets are *pt*\_*i*1, *pt\_i*2, *pt\_i*3.

The *LFE* parameters are calculated between the nodes (*i*) belonging to the source (*S*) region and the nodes (*j*) located at the destination (*D*) region, as illustrated in Figure 3.

**Figure 3.** IoT-enabled device-to-device communication link selection mechanism.

The *pti* packet is created by the source device *i*, while *pt\_i*2, *pt\_i*3, and *pt\_i*4 represent the packet formed from source device *i* towards destination devices as a result of the displacement impact of nearby network overlapping. When the link quality reaches an acceptable level, the fixed device factor and link threshold parameter are verified according to the criteria given in Table 1.



The *SNR* computes the signal-to-noise ratio by combining the loudness of the received signal and the background noise. Obtaining the *LFE* mean, the *SNR* strongly suggests that higher *LFE* and *SNR* threshold parameters result in a delicious connection. The selection of a delectable link between the source device and the next device was tested by executing a thorough test paradigm and, therefore, Algorithm 1 ratifies the subject finding's conclusion.

Description of Algorithm 1.

The packet (packetp*t*) created by the source device (device*i*) is distributed over the full transmission zone I via the first communication connection (*pt\_i*1), which then expands towards the remainder of the next device inside the transmission zone as (*pt\_i*2) and (*pt\_i*3) and continues as seen in Figure 3. Furthermore, the link factor estimator determines delectable links by employing an extensive link testing technique and yielding astute outcomes (line 5–23). It considers when the value of the link factor estimator of the transmitted packet from sensor node device *i* becomes greater or equal to the entire displaced route between source node *i* and the destination node *j.* This entire segment remains shorter to the link factor estimator of the transmitted packet by sensor node device *i* having the same

parameters as that of the scrumptious link, where SNR and LFE is calculated between 32 to 100 and the overall condition is given as ( *LFE*. *tcpti* ≥ *d*Δ and < (*LFE*. *tcpti* = Scrumptious link)). Then, this link is considered to be an "Average link" stated as ( *LFE*. *tcpti* = average link) on line #12. After establishing a strong link between the source and the next device, it advances to the next device, which requires a steady communication link with constant transmission power. Using an absolute transmitted packet (*pt*) and an acknowledgement packet (*ps*), the link factor estimator (*LFE*) and signal-to-noise ratio (*SNR*) are calculated (line 28–35). As a result, the link selection attribute corpus table is updated with the devices' current condition.

**Algorithm 1** Link consistency estimation and packet forwarding mechanism

```
1: Procedure LinkFactorEstimator {(LFE.tc), devicei, packetpt}//Link consistency estimation
2: F(i)={pt_i1, pt_i2 . . . . . . .. Pt_in}
3: Device i transmits packet pt over distance dΔ
4: Switch LFE. tc ← Types
5: Case 1: Scrumptious_Link
6: if LFE. tcpti < dΔ then
7: LFE. tcpti = scrumptious link
8: endif
9: EndCase
10: Case 2: Average_Link
11: if LFE. tcpti ≥ dΔ & < (LFE. tcpti = Scrumptious link) then
12: LFE. tcpti = average link
13: endif
14: EndCase
15: Case 3: Fair_Link
16: if LFE. tcpti ≥ dΔ & < (ALQ. tcpti = average link) then
17: LFE. tcpti = fair link
18: endif
19: EndCase
20: Case 4: Uncouth_Link
21: if dΔ < LFE. tcpti then
22: LFE. tcpti = uncouth link
23: endif
24: EndCase
25: end Procedure
26:
27: Procedure PacketTransmission(devicei, packetpt, dirj, lfe, snr, (TransmittingDevicei2,i3),
     lct}//Devices transmit the packets
28: pt ←absolute transmitted packet
29: ps ←packet received and acknowledge by destination
30: if LinkFactorEstimator(lfe) = LFE. tcpti then
31: goto line 2
32: Debuts: F(i) = ϕ
33: for (i2,3) = 1: Max
34: Max = Tip //transmission impulses
35: if Signal-to-NoiseRatio (snr) = LFE. tcpti then
36: goto line 2
37: endif
38: Endfor
39: Endif
40: Compute N

                 dirj, f

                       ≥ D0
41: update LFETable//Link Corpus Table
42: F (i) = F (i) +{pt2,3}
43: end Procedure
```
#### *3.3. Packet Transmission between IoT Devices*

Usually, various applications are used to avail the IoT devices for packet movement. In fact, it builds a device-level heterogenous environment. The device *i* receives numerous data packets from other devices, such as *i*1 to *i*2. The colored lines between all devices illustrate the various applications. This scenario shows that even at the device level, the applications also communicate in a heterogenous environment.
