# A Lightweight Secure and Energy-Efficient Fog-Based Routing Protocol for Constraint Sensors Network
## 4 Results  
This section presents the performance results of the SEFR protocol under an unpredictable scenario. The performance evaluation is done in NS3 in terms of energy consumption, end-to-end delay, network throughput, packet drop ratio, communication overheads, and link load. The number of sensor nodes and fog nodes is set from 100 to 500 and 10 respectively. The fog nodes are placed at the network borders. The transmission range \(T_{r}\) of each node is fixed to 15 m. The radius of the network field is fixed to 200 \(\times\) 200 m\({}^{2}\). The number of malicious nodes is set to 30. Initially, the residual energy of the nodes is 2j with 2000 s of simulation time. The data size of each block is 32 bits. The performance of the SEFR protocol is evaluated using various network metrics. Table 2 shows the default parameters used in simulation-based experiments. Figure 2 depicts the performance of the SEFR protocol against existing work for a varying number of nodes in terms of energy consumption. The experimental results denote that the SEFR protocol outperforms the energy consumption by 15.2% and 20% against SMSN and TASA. Unlike other solutions, the SEFR protocol splits the network communication into different layers, which balances the transmission load among sensors. Also, the cluster heads are selected based on the highest residual energy and the threshold of the dynamic distance increases to appoint a sufficient number of cluster heads to cover the entire environment. Furthermore, the SEFR protocol makes the intelligent process of the selection of next-hop based on QoS factors and it increases the stability of data transmission. Such methods significantly decrease the extra load from the data collectors and avoids frequent route requests and route response messages. Moreover, the energy consumption of the SEFR protocol is improved than existing work due to its least communication overheads in identifying the appropriate neighbors for data transmission. Also, the SEFR protocol has lighter and more reliable routing metrics that counting energy resource, distance, and packet queuing to make the routing performance a lightweight solution, and decreases the chances of depleting unnecessary energy consumption. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Parameter** & **Value** \\ \hline \(D_{\text{max}}\) & & 200 m\({}^{2}\) \\  & Sensor nodes & 100 to 500 \\  & Malicious nodes & 30 \\ \(T_{r}\) & & 15 m \\  & \(\alpha\), \(\beta\), \(\gamma\) & 0.333, 0.333, 0.333 \\  & Residual energy & 2j \\  & Fog nodes & 10 \\ \(R_{T}\) & & 32 bps \\  & Traffic flow & CBR \\  & Transport layer protocol & UDP \\  & Antenna type & Omni antenna \\ \hline \hline \end{tabular}
\end{table} 
Table 2: List of parameters. Figure 3 illustrates the performance of the SEFR protocol against SMSN and TASA in terms of packet drop ratio. The experimental results revealed that the SEFR protocol decreases the packet drop ratio by 21%, and 34% under a varying number of nodes. This is because the proposed SEFR protocol selects the most efficient cluster heads in terms of resources and least to long-run routing paths. Also, instead of performing the route discovery in the larger region, the search zone is limited based on the dynamic distance threshold. Unlike the SMSN and TASA, that are more prone to failure in reliable and trusted data routing under a varying number of nodes, the SEFR protocol presents trustworthiness and better lifetime routes for transferring sensors' data through fog computing. Unlike other solutions that frequently drop the sensors' data due to excessive route discovery and control packets, the proposed SEFR protocol avoids forwarding the packets on an obstructed route based on the packet queuing factor. Figure 4 illustrates the performance evaluation of the SEFR protocol against existing work in terms of end-to-end delay. The simulation-based experiments revealed that the SEFR protocol remarkably decreases the outcomes of end-to-end delay by 11%, and 17%.