# Identifying Misbehaving Greedy Nodes in IoT Networks
## 5 Simulation and Results
### Greedy Behaviour Analysis Results  
The step of analysing network traffic in the presence of the greedy node is essential for the detection, because it allows for understanding the impact and the degree of influence of the greedy node on each parameter. The analysis of the behaviour of the selfish node allows not only fixing the thresholds, but also determining the criteria allowing for distinguishing the greedy node from the legitimate ones. In order to summarize the results, we calculated the average of each parameter for the set of legitimate nodes. Below are the simulation results. In Figure 3, sent packets G represents the number of packets sent by the greedy node, and sent packets O represents the number of packets sent by the other nodes of the network. This figure clearly shows that in each of the networks, the number of packets sent by the greedy node is significantly higher than the number of packets sent by all the other nodes of the network, which demonstrates that the greedy node clearly monopolizes the transmission channel especially in networks 10, 15, and 20, where the number of legitimate nodes is high, and the competition for channel access is increased. We note that the difference between the number of packets sent by a single greedy node and all the nodes of the network is significant. This situation generates a denial of service because the legitimate nodes of the network do not manage to access the transmission channel, which deprives them of sending their packets. As explained in the previous section, legitimate nodes have only five attempts to access the channel before dropping their packets, and each time a CCA is executed to check if the channel is free to transmit, they find the channel occupied by the greedy node. Once the five channel access attempts are exhausted, they are forced to drop their packets, and will therefore be in a denial of service situation, which is dangerous if one of the nodes wants to transmit important information. According to Figure 3, the number of packets sent is an important parameter to consider in the detection algorithm of the greedy node, since it clearly makes it possible to distinguish between a legitimate node and a greedy node, because the latter sends more packets than all the legitimate nodes of the network. In Figure 4, the G represents the greedy node, and the O represents the other nodes in the network. We notice in this figure that the number of collisions caused by the greedy node is a little higher than the other nodes. This is explained by the fact that the greedy node executes a CCA of only two symbols, which is less than eight symbols for a legitimate node, and also less than the duration of the RTT (Round-trip time) which is the duration, from when a sender node sends a request to when it receives a response from a receiver node. Therefore, the greedy node does not have enough time to ensure that the transmission channel is free before starting to send its packets. Although the greedy node performs a CCA of only two symbols, its collision rate is not significantly high compared to other nodes, as this situation rarely occurs due to the random calculation of the backoff. Thus, by dividing the CCA by 4, i.e., by reducing it to two symbols instead of eight for a legitimate node, the greedy node increases its probability of accessing the medium and prevents other nodes from transmitting their packets. Therefore, the number of packets sent by a greedy node is significantly high (see Figure 3) compared to other nodes, while the number of collisions is slightly higher. Regarding the number of packets received, as expected, the results of the simulations presented in Figure 4 demonstrate that the greedy node receives fewer packets than the other nodes, since it monopolizes the transmission channel and creates a denial of service in the network by depriving other nodes of access to it. In short, we note in Figure 4 that during greedy behaviour, the number of collisions increases slightly, while the number of packets received decreases.