- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- AODV Simulation problem
Hi friends:
I’m simulating AODV protocol in NS2 under windows. I’m trying to calculate parameters like throughput, overhead, delay and rate of drop packets. After simulating using a tcl scripts, i got the following results:
Pause time %drop packet Throughput Overhead Avdelay
0 96% 284 16457 0.020080
50 98% 285 7624 0.023645
100 97% 287 5677 0.016144
150 99% 298 5362 0.0211557
200 98% 289 2814 0.019749
250 100% 288 688 0.005784
300 100% 292 1464 0.030264
It seems to me that some results are not logic. for example the overhead for 250sec is bigger than for 300sec. the average delay is not increasing continuously as well as the throughput. and the rate of dropped packet is not increasing continously.
I’d like you to help to understand what is happening since i’m using the following tcl scripts:
BEGIN {
start=0;
end=0;
highest_packet_id=0;
calc=0;
delay=0;
zrpadv=0;
pktrec=0;
sum=0;
drop=0;
}
{packet_id = $18;}
$0~/^s.*AGT/ {
if ($3==(“_”src”_”)) {
start_time[packet_id]=$2;
calc++;
if ( packet_id >= highest_packet_id )
highest_packet_id = packet_id;
}
}
$0~/^r.*AGT/ {
if ($3==(“_”dst”_”)) {
end_time[packet_id] =$2;
pktrec++;
}
}
{ if ((($1==”r”)||($1==”f”))&&($4==”RTR”)&&($7==”AODV”)&&($2>=8)) {
zrpadv++;
}
}
END {
for ( packet_id = 0; packet_id <= highest_packet_id; packet_id++ )
{
start = start_time[packet_id];
end = end_time[packet_id];
if (end==0) {
drop++;
printf”%dn”,packet_id >> outfile;
continue;
}
delay=end-start;
sum=sum+delay;
#printf “%.9f %.9f %.9fn”,start,end,delay >> outfile;
printf “%d %.9fn”,packet_id,delay >> outfile;
}
avdelay=sum/pktrec;
printf”%.9fn”,avdelay >> outfile; #av delay
printf”%dn”,zrpadv >> outfile; #overhead
printf”%dn”,pktrec >> outfile; #throughput
printf”%d”,100*pktrec/(pktrec+drop) >> outfile;#drop packet rate
#printf”%n”>>outfile;
}
Thanks in advance for any suggestion you might have
best regards
You must be logged in to reply to this topic.