## 4 Discussion
### Real Experimentation
This is where the routing protocol plays an important role in organizing the network to detect possible anomalies or alert zones. In Figure 18, we have a top view of the university campus's Engineering area, where node 2 is the coordinating node for each network topology. Next to it is a black node that radiates signals omnidirectionally (this is the jammer node), producing a reactive jamming effect. Node 3 (which is right next to the jammer node) is the cluster head, and the others are normal nodes. For both Zigbee and LoRa, we have used the same network topology. We have performed the tests exclusively for each topology in a different week but under the same conditions of the start day and the end of the week (seven days in total). Figure 17: Real network deployment in the engineering area of the campus. Figures 19 and 20 present the behavior of the experimental network of Figure 17 under Zigbee wireless technology. We have chosen the two best performance cluster-based protocols (PEGASIS and TEEN) versus jamming detection to exemplify a real case. We know that Zigbee technology is generally used for short-range, and LoRa technology is used for wide area network zones. However, the proposal to analyze both technologies (for different applications) under conditions of possible attack and the routing protocol's performance with an analysis of the appropriate metrics for targeting an area with abnormal conditions is novel. Our proposal's key is to measure specific performance parameters where detection has a significant impact on the routing protocol, and the affected nodes can be easily known. In the metrics chosen as the main, we have the size routing table, which shows how the routing tables change concerning the number of available links. These changes may be due to node connections and disconnections or high interference from the environment. If the interference remains, it could be due to an attack or a heavy traffic load in that area. Energy is an obvious metric in this analysis because we look for the considerable consumption impact on the nodes. Retransmissions are a proper metric of the routing protocol and show how packets are handled on the network. Therefore, this metric directly impacts overhead and the large number of packets to control at each node and their possible loss. The delay is a metric affected by the connections and disconnections of links and the new routes generated in the network, thanks to the routing protocol's configuration. Finally, resilience is also impacted by the reconfiguration of the network topology and the routing protocol's ability to return nodes to a stable state. With the tests carried out during an uninterrupted week at the university campus (Engineering area) of the Universidad Panamericana, Guadalajara, Mexico, we can verify that the protocols' performance is the reasonable demarcation of affected areas. The jammer node is located in the node closest to the coordinator. Regarding the Zigbee technology, the PEGASIS protocol presents 5% better performance than TEEN regarding the nodes' ability to resist against a malicious agent. The most noticeable impact is observed in the energy metric, with a consumption increase of 20% for TEEN and 16% for PEGASIS. We follow that the CH is not as affected by the routing tables' size as node 4, which is further away and only in the topology. This leads us to an analysis in which jamming may produce a partitioned network topology with some isolated segments or nodes, severely inhibiting communications. Regarding the delay, under the TEEN protocol, the CH is affected 8% more than in PEGASIS, which would cause delayed information or, on many occasions, unnecessary packet forwarding, and this generates more significant overhead on the network. The retransmission metric is closely related to delay. We observed that TEEN increases this parameter by 9% and PEGASIS by 4.5% with the jammer node. Resilience is a proper metric of the routing protocol administration. We observe that PEGASIS shows an increase of 5% and TEEN of 8.6%.