## 4 Discussion  
At LEACH and TEEN, we have the possibility of information aggregation and excellent scalability. The difference between the choice of flat protocols versus hierarchical protocols is clear, in terms of energy savings. In Figures 2-13, we analyze three network performance metrics that directly impact the jamming detection model. The retransmissions are given because a node sends a packet, and if it does not receive a response from the destination node, it forwards that same packet (up to a maximum number of 3 times). If the source node has forwarded the packet three times and without a response, it is discarded. This metric indicates a high level of interference in that route's links or simply that that route is already obsolete. Resilience is given as a function of time, and we measure it in steady-state and under jamming. When we have steady-state conditions, to check the network's resilience, we increase the noise (interference) in the links, and we observe the network's capacity to recover the initial topology. When we measure it under jamming, we increase the noise of the links in the same proportion, and with the presence of the jammer node, we analyze the network's capacity to recover from both factors. This metric's large amount of information is essential because we check the difference in network recovery against interference and a possible more potent and well-defined attack. Finally, we analyze the energy impact that jamming activity has on the nodes according to its position and impact on the network topology. Figure 1 represents the configuration of the network nodes in Figures 2-12. Each node is represented by two bubbles (one light-colored and one dark-colored). The light-colored bubble is the stable state under normal network conditions, and the dark-colored bubble is the node state when the network is under jamming. The displacement between the two bubbles' centers is the same at all nodes, and the size of the bubble depends on metric's value. If the bubble is bigger, and, because the centers are the same distance, the bubbles will overlap. For the TEEN protocol, we observe that the nodes with the highest number of retransmissions and the highest energy consumption are close to the coordinator node and the jammer node. Regarding the TEEN protocol, the metric that shows the most significant impact on the difference under normal conditions versus jamming conditions is energy. The nodes close to the jammer node show an energy increase of 16%. Retransmissions are the next highest impact metric, 97% coinciding with the detection zone indicated by power, which is a good indication. The nodes show an increase in the number of retransmissions of 14% when they are under jamming conditions. Figure 4 shows the resilience of the nodes under the TEEN protocol. The bubble to each node's right shows the change, and the darker its color, the more significant the change. This graph has a 93% detection similarity with the previous two. The difference in the increase in recovery time (resilience) in the nodes marked with the darkest right bubble is 25%, which clearly shows an anomalous situation. Figure 2: TEEN retransmissions under normal conditions and jamming. Concerning the LEACH protocol (Figures 5 and 6), retransmissions show an increase of 6% if compared to the TEEN protocol. This can impact some nodes further away from the attacking node (jammer node). Retransmissions make the jamming detection focus area larger and, therefore, more difficult to pinpoint an attack focus. The same happens with the energy that increases by 8% for the nodes under the TEEN protocol. Resilience shows a particular characteristic in which the nodes with the most significant affectation are in the proximity of the coordinator node, the jammer node, and particularly the cluster heads. Figure 4: TEEN resilience under normal conditions and jamming. Figure 5: LEACH retransmissions under normal conditions and jamming. Figure 3: TEEN energy under normal conditions and jamming.