The Ad Hoc network shown below including node Q is currently
Solution
Part 1
Aodv is one of the on demand routing.
Aodv routing first search for route in routing table.If no route found then do route discovery.
Initially, no routing table. So, P send RREQ(route request message) throught flooding.
RREQ msg contain Source id, Sequence number, destination id, sequence of route
Step 1.
P send RREQ to N, L,Q
Step 2.
N send RREQ to O,K,L,J,P
L send RREQ to N,J,P
Q send RREQ to I,P
Step 3.
O send RREQ to M,K,N
K send RREQ to M,O,N,J
L send RREQ to N,J,P
J send RREQ to E,K,N,L
P ignore this request because its send through P only (send by N)
N send RREQ to O,K,L,J,P
J send RREQ to E,K,N,L
P ignore this request because its send through P only (send by L)
I send RREQ to Q,F,H,G
P ignore this request because its send through P only (send by Q)
Step 4.
M send RREQ to O,K (P->N->o->M)
K send RREQ to M,O,N,J (P->N->O->K)
N ignore this message because msg go through it.
Like this it will flood in whole network.
Once the RREQ reaches to G that is destination id in RREQ. G will send unicast msg RREP(route replay msg ) to source node that is P
G->I->Q->P (RREP)
When P receive RREP then P send data msg throught the route (P->Q->I->G)
P save this route in routing table for future reference.
Part 2
When P want to send data to G.
Ist check route for node G in routing table. It will find route in route table that will go through Q node.
P send data msg to Q and wait for ACK. No ack come. Then send RREQ msg again.
Step 1
P send RREQ to N,L (P->N),(P->L)
Like this it will flood in whole network
Once it reach to G
This will be shortest path
Path (P->N->J->E->D->F->G)
Path (P->L->J->E->D->F->G)
Among this two path G will take one path that reaches G firstly for RREP.
When P receive RREP then P send data msg throught the route.
P save this route in routing table for future reference.

