Hi I'm posting from http://www.4ellene.net/tt/1078 I couldn't run it ,has 
anybody tried this ?Is this the write method and script to calculate the 
parameters.
1. Routing Overhead Routing Overhead 

 How to define Routing Overhead. How to define Routing Overhead. 
 if All the routing packets no matter broadcasting or unicasting per -hop 
should be count once. if All the routing packets no matter broadcasting or 
unicasting per-hop should be count once. There are some options: There are some 
options:  The total number of routing packets, counted once per hop The total 
number of routing packets, counted once per hop  The total number of routing 
bytes, counted once per hop The total number of routing bytes, counted once per 
hop  The # of routing packets, count with seqence number, this means 
end-to-end, not calculated by  per-hop basis. The # of routing packets, count 
with seqence number, this means end-to-end, not calculated by per-hop basis.  
To calulate the number of DSR packets in method 1 To calulate the number of DSR 
packets in method 1  $ cat out.tr | grep "DSR" | wc -l $ Cat out.tr | grep 
"DSR" | wc-l  The
 result is 3301 dsr packets for a 1000 seconds, 50 nodes 10 connections,
 4pkt/sec, 512B size, 670X670 area, mobility speed is at most 20m/s and 
the average pause time is 600 seconds. The
 result is 3301 dsr packets for a 1000 seconds, 50 nodes 10 connections,
 4pkt/sec, 512B size, 670X670 area, mobility speed is at most 20m / s 
and the average pause time is 600 seconds. 
 However, this is not true. However, this is not true. becasue both send and 
recv are included. becasue both send and recv are included.  $cat out.tr |grep 
"^s.*DSR" | wc -l $ Cat out.tr | grep "^ s. * DSR" | wc-l  shows only 514 DSR 
packets are sending. shows only 514 DSR packets are sending. 

 Finally, use this awk code to count how many bytes are used. Finally, use this 
awk code to count how many bytes are used.  BEGIN {pktno = 0; byte = 0;} BEGIN 
{pktno = 0; byte = 0;} 
 $1~/s/ && /DSR/  { pktno ++ $ 1 ~ / s / & & / DSR / {pktno + + 
 byte+=$8 } byte + = $ 8} 
 END { print ( pktno, byte) } END {print (pktno, byte)}  
  
 It shows "544 27016". It shows "544 27016". So only 544 packets and 27016 
bytes sent. So only 544 packets and 27016 bytes sent. 

 With this method, the packet is only count once. With this method, the packet 
is only count once. But this may be wrong in some sense, becasue any forwarding 
packets are not calculate as overhead. But this may be wrong in some sense, 
becasue any forwarding packets are not calculate as overhead. The new awkcode 
should be: The new awkcode should be:  BEGIN {pktno = 0; byte = 0;} BEGIN 
{pktno = 0; byte = 0;} 
 $1~/s/ && /DSR/  { pktno ++ $ 1 ~ / s / & & / DSR / {pktno + + 
 byte+=$8 } byte + = $ 8} 
 $1~/f/ && /DSR/  { pktno ++ $ 1 ~ / f / & & / DSR / {pktno + + 
 byte+=$8 } byte + = $ 8} 
 END { print ( pktno, byte) } END {print (pktno, byte)}  This shows: "806 
packets  43696 bytes". This shows: "806 packets 43696 bytes". Becsaue, the 
concern is the time spent to send routing signalings, this is more accurate way 
to measure routing overhead. Becsaue, the concern is the time spent to send 
routing signalings, this is more accurate way to measure routing overhead. 
 
 However, all of the above methods are not fair to compare. However, all of the 
above methods are not fair to compare. 

 The way to count MAC transmissions is the only correct way to do that. The way 
to count MAC transmissions is the only correct way to do that. 
 How many MAC packets are sent for routing purpose and how many MAC packets are 
sent for traffic. 노드 설정에서 macTrace ON 여부확인 How many MAC packets are sent for 
routing purpose and how many MAC packets are sent for traffic. Node settings 
determine whether macTrace ON 
  BEGIN {dsrpktno = 0; dsrbyte = 0; cbrpktno = 0; cbrbyte = 0; } BEGIN 
{dsrpktno = 0; dsrbyte = 0; cbrpktno = 0; cbrbyte = 0;} 
 $1~/s/ && /DSR/ && /MAC/  { dsrpktno ++ ; $ 1 ~ / s / & & / DSR / & & / MAC / 
{dsrpktno + +; 
 dsrbyte+=$8 ;} dsrbyte + = $ 8;} 
 $1~/s/ && /cbr/ && /MAC/ { cbrpktno ++ ; $ 1 ~ / s / & & / cbr / & & / MAC / 
{cbrpktno + +; 
 cbrbyte+=$8; } cbrbyte + = $ 8;} 
 END { print ( dsrpktno, dsrbyte , cbrpktno, cbrbyte) } END {print (dsrpktno, 
dsrbyte, cbrpktno, cbrbyte)}  바로 값 나오도록 수정 Directly modify the value to come 
  BEGIN {dsrpktno = 0; dsrbyte = 0; cbrpktno = 0; cbrbyte = 0; } BEGIN 
{dsrpktno = 0; dsrbyte = 0; cbrpktno = 0; cbrbyte = 0;} 
 $1~/s/ && /AODV/ && /MAC/  { dsrpktno ++ ; $ 1 ~ / s / & & / AODV / & & / MAC 
/ {dsrpktno + +; 
 dsrbyte+=$8 ;} dsrbyte + = $ 8;} 
 $1~/s/ && /tcp/ && /MAC/ { cbrpktno ++ ; $ 1 ~ / s / & & / tcp / & & / MAC / 
{cbrpktno + +; 
 cbrbyte+=$8; } cbrbyte + = $ 8;} 
 END { print ( dsrpktno, cbrpktno,dsrpktno/(dsrpktno+cbrpktno)) } END {print 
(dsrpktno, cbrpktno, dsrpktno / (dsrpktno + cbrpktno))} 
 The result show 787 DSR MAC packets totaled as 83568 Bytes, but with data 
traffic as  4806 MAC packets of  2873836 Bytes. The result show 787 DSR MAC 
packets totaled as 83568 Bytes, but with data traffic as 4806 MAC packets of 
2873836 Bytes. 

 Note
 that the scene used in this scenario (/mobility/scene/cbr-50-10-4-512 
and scen-670-670....-1 ) has very short path, all connection are just 
one or 2 hops, and it is still to see that the routing overhead is huge 
in packet number comparison as (787/ (787+4806) =  14.07% ) Note
 that the scene used in this scenario (/ mobility/scene/cbr-50-10-4-512 
and scen-670-670 ....- 1) has very short path, all connection are just 
one or 2 hops, and it is still to see that the routing overhead is huge 
in packet number comparison as (787 / (787 +4806) = 14.07%)  Another definition 
is " Normalized Routing Overhead ". Another definition is "Normalized Routing 
Overhead". Normalized routing load is the number of routing packets transmitted 
per data packet sent to the destination. Normalized routing load is the number 
of routing packets transmitted per data packet sent to the destination. Also 
each forwarded packet is counted as one transmission. Also each forwarded 
packet is counted as one transmission. This metric is also highly correlated 
with the number of route changes occurred in the simulation. This metric is 
also highly correlated with the number of route changes occurred in the 
simulation. 

Reply via email to