# Analysing the Performance of a Trust-Based AODV in the Presence of a Flooding Attack
## 4 Flooding Attack  
A flooding attack can be defined as sending a huge amount of multiple fake RREQs to random nodes aiming to consume the network resources and leading to DoS [22; 35]. This is a common type of attack in all kinds of network, including traditional networks with fixed infrastructure. In a flooding attack, the malicious node floods the network with RREQs to nonexistent destinations to keep the nodes busy processing the fake packets. The aim of this is to consume the bandwidth, node memory, node power and computational resources and to prevent normal operations in the protocol [36]. The malicious node in this type of attack exploits the vulnerabilities in the route discovery phase, allowing an unlimited number of RREQs and accepting any RREQ without validation. In traditional networks, a way of improving performance in the case of this type of attack is to install a firewall in the hardware, such as servers and routers [37]. In a flooding attack, the attacker selects an IP address that does not exist in the network to extend the search process in the network and consume the nodes' resources [25]. If the attacker knows the scope of IP addresses in the network, the attacker will select IP addresses from outside the range. If the attacker does not know the scope, they will select random IP addresses in the hope that they do not exist. If the IP address selected is outside the domain, no node can answer the RREQs. The AODV protocol does nothing to detect fake destination IP addresses because of the nature of MANETs, which allow nodes to join and leave the network freely at any time. After selecting the IP addresses, the attacker generates a huge number of RREQs for the void IPs without waiting for the RREPs to arrive. When a flooding attack is launched successfully in a MANET, the whole network will be flooded with the fake RREQs sent by the attacker. Both the bandwidth and the resources of the nodes can be exhausted at the same time, which can easily lead to DoS [38]. To give a simple example of shutting down a MANET, each node's capacity for storing the routing table is extremely limited and if the node receives a huge number of RREQs over a short period of time, the routing table will be full and the node will not be able to receive any more RREQs. Hence, the node will not be able to serve the real RREQs from cooperative nodes. The flooding attack is a type of DoS attack that exploits the routing discovery process of reactive routing protocols such as AODV [25]. AODV already has a default mechanism to prevent flooding attacks at some level. However, this mechanism is vulnerable and it can be hacked by malicious nodes. The default mechanism of AODV has the following barriers to prevent a flooding attack:  
1. Limiting the flooding rate. AODV has a method to reduce congestion in the network by limiting the number of RREQs a node can send per second. The number of RREQs per second allowed, RREQ_RATELIMIT, is 10 by default [39]. 2. Limiting the number of routing request attempts. AODV limits the number of attempts to find a route made by a source node, by setting a threshold RREQ_RETRIES. When a node broadcasts an RREQ, it waits to get an RREP. If the RREP does not arrive within a given number of milliseconds, NET_TRAVERSAL_TIME, the node may try again and send another RREQ until the number of retries reaches the limit of RREQ_RETRIES, which has a default value of 2 [39]. 3. Limiting the time an RREQ can live in the network. Time-to-live, TTL, is the maximum time allowed for an RREQ to live in the network before it is discarded. Each RREQ has a TTL_START value stored in its header. This value increases by TTL_INCREMENT each time the node tries to send a new RREQ and the total will be stored in the TTL. This continues until the the TTL set in the RREQ reaches the TTL_THRESHOLD, then the RREQ will be discarded [40]. Theoretically, these methods seem to work well to prevent flooding attacks as they limit the number of RREQs sent by any node in the network and do not allow any RREQ to live in the network forever.