[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] AODV bug



I think there is a bug in current AODV implementation in ns.
The problem is in file aodv/aodv.cc line 883
 sendReply(rq->rq_src,           // IP Destination
                       0,                    // Hop Count
                       index,                // Dest IP Address
                       seqno,                // Dest Sequence Num
                       MY_ROUTE_TIMEOUT,     // Lifetime
                       rq->rq_timestamp);    // timestamp

The Hop Count must be set to 1. The problem comes when this reply
message is received by the one hop away node. In the
AODV::recvReply(Packet *p) function, the history for the latencies is
kept, but the following line causes to save an infinite latency bec the
rp->rp_hop_count field in the reply packet is set to 0 in the previous
node.

aodv/aodv.cc line 1001:
rt->rt_disc_latency[rt->hist_indx] =
					 (CURRENT_TIME - rp->rp_timestamp)
					 / (double) rp->rp_hop_count;




The latency history for a route is used for estimating the request
timeout time. The max request timeout time is limited to 10 sec. Bec we
have an infinite entry in the history for latencies, the next request
timeout
value becomes 10 sec, which combined with initial one hop route search
mechanism in AODV , causes a lot of packets to be delayed a lot in the
source node.
Also the hop count values are one less than they are supposed to be for
reply packets, which in turn also causes some bad estimations for the
request timeout time.


Ridvan Kahvecioglu
Binghamton University
[email protected]