Adhoc On Demand Distance Vector Routing (AODV) protocol defines 3 message types:
- Route Requests (RREQs) - RREQ messages are used to initiate the route-finding process.
- Route Replies (RREPs) - RREP messages are used to finalize the routes.
- Route Errors (RERRs) - RERR messages are used to notify the network of a link breakage in an active route. The route discovery process involves ROUTE REQUEST (RREQ) and ROUTE REPLY (RREP) packets. The source nodeinitiates the route discovery process using RREQ packets. The generated route request is forwarded to the neighbors of the source node and this process is repeated till it reaches the destination. On receiving a RREQ packet, an intermediate node with route to destination or the destination node generates a RREP containing the number of hops required to reach the destination. All intermediate nodes that participate in relaying this reply to the source node creates a forward route to destination.
RERR message processing is initiated when: – Node detects a link break for the next hop of an active route or receives a data packet destined for a node for which it has no (active) route.
Open NetSim and Select Examples->Mobile Adhoc Networks->MANET AODV then click on the tile in the middle panel to load the example as shown in below screenshot
The following network diagram illustrates, what the NetSim UI displays when you open the example configuration file see below Figure
Settings done in the Network#
Step 1: A network scenario is designed in NetSim GUI comprising of 5 Wireless Nodes and one ad-hoc link in the “Mobile Adhoc Network” Network Library.
Step 2: In the General Properties of Wireless Node 3, Wireshark Capture is set to Online.
Step 3: In the General Properties set mobility Model as NO MOBILITY for all devices present in GUI.
Step 4: The Medium Access Protocol was set to DCF in INTERFACE_1(WIRELESS)-> Datalink layer of all Wireless Nodes
Step 5: Channel characteristics are set as: Path loss only; Path loss model: Log Distance; Path loss exponent: 4.
Step 6: Set AODV routing protocol under network layer properties in all nodes.
Step 7: Packet Trace is enabled in the NetSim GUI, and hence we are able to track the route which the packets have chosen to reach the destination based on AODV. In NetSim GUI Plots are Enabled.
Step 8: Click on the Application icon present in the top ribbon/toolbar.
A CBR Application is generated from Wireless Node 1 i.e., Source to Wireless Node 2 i.e.,Destination with Packet Size remaining 1460Bytes and Inter Arrival Time remaining 20000µs. Transport Protocol is set to UDP instead of TCP.
Step 9: Run simulation for 10 seconds.
- Source Node 1 initiates route discovery process using RREQ packets. The generated route request is broadcasted to the neighbours of the source node i.e. Node 3 and Node 4.
- Node 4 broadcasts the RREQ packet to its neighboring nodes i.e., Node 3, Node 1 since Node 4 does not have route to destination Node 2.
- Similarly, Node3 broadcasts the RREQ packet to Node 5 and Node 4.
- Node 5 broadcasts to Node 2 and Node 3.
- On receiving a RREQ packet, the Destination Node 2 generates a RREP packet and transmits to Node 5, Node 5->Node 3, Node 3->Node 4, and Node 4->Node 1.
- After receiving the RREP, the Source Node 1 starts sending Data packets to Node 2.
The same process can be observed in Packet trace file by filtering Control_Packet_Type/Application_Name to AODV_RREQ and AODV_RREP as shown in below Figure.
Open Wireshark, filter AODV packets and select the RREQ packets and expand Ad Hoc On-demand Distance Vector Protocol in order to view the above-mentioned fields of RREQ as shown in below Figure.
Open Wireshark, filter AODV packets and select the RREP packets and expand Ad Hoc On-demand Distance Vector Protocol in order to view the above-mentioned fields of RREP as shown in below Figure