# Cross-Layer and Energy-Aware AODV Routing Protocol for Flying Ad-Hoc Networks
## 4 Materials and Methods  
### AODV Routing Protocol  
Ad Hoc On-demand Distance Vector (AODV) is a type of reactive protocol. When a node transmits a packet to another node, it first examines its routing table entries, and if a route exists, it uses it to deliver the packets. If the routing table contains no valid path to the destination, the Route Request (RREQ) broadcast message is used to start the route discovery process. If there are many routes between two pairs of nodes, the best route is chosen [18; 24]. Route Discovery process: This process can be started by the source node with the concept of proper routing information. Initially, it creates the RREQ packet for broadcasting to its neighbor nodes and intermediate nodes, which follow the same process until it reaches the destination. While broadcasting, ID will be provided along with the source IP number to find the uniqueness of RREQ. The old broadcast id of a source node will be elevated by one when it initiates a new RREQ. The access point uses the sequence number to ensure that there are no loops and to determine the timeliness of the available route information. Before forwarding the RREQ packets to its neighbors, an intermediate node establishes a backward route to the sender node by marking the address of the adjacent node from whence the initial copy of the RREQ was received in its routing database. After receiving the RREQ, intermediate nodes with a new route to the destination, IT constructs the Route Reply (RREP) packet and transmits it to the source node via the backward route created during the shortest path. The inverse route is generated after RREQ transmission in almost the same way that each intermediate in the reverse path uses RREP packets to record the path in the routing table while the RREP transits the reverse route. As a result, when RREP approaches the source node, a forward and reverse link between the source and destination combinations is constructed. More crucially, each intermediate node only has to store the next hop to the target [18; 20]. Maintenance of route: The source node forwards packets to its target via an established route utilizing multi-hop mode transmission after the route discovery procedure has found the destination path. Because of their rapid mobility and stand-alone battery depletion difficulties, ad hoc networks are prone to frequent Data Link Layer (DLL). Intermediate nodes regularly send hello packets to their neighbors to let them know that they are online. With this response, the intermediate node can verify the routing information in its database. When an invalid path is detected, it deletes the routing information from the database. It sends a route error message to the source nodes using the Route Error (RERR) packet in the opposite direction. When the source node receives the RERR, it starts the routing path with a new broadcast ID. Figure 2 demonstrates the route discovery process, assuming a network of 11 mobile nodes. Node S needs to communicate with another node, 'D', whereas it begins the route discovery action to create an RREQ packet and broadcast it across the network. The nodes such as 'A', 'B', and 'C' are 'S' neighbors. They accept the RREQ packet request to evaluate the packet replication. If the replication is new, they register 'S' in the routing information table as a backward pass to node S. Then, all nodes search their routing information tables for valid path entries for the destination nodes. If they do not find any, they rebroadcast the route discovery packet. The intermediate nodes with a valid route item in the routing table will send an RREP packet back to the source node via the backward direction. Because none of the intermediary nodes in Figure 3 has a valid route, RREQ packets arrive at their  
destination through various routes. Finally, the destination nodes construct RREP packets and send them to source node S through the shortest backward direction. Destination nodes use the minimum distance among the three possible paths to send RREP packets via the D-J-F-B-S path.