[ns] Wireless packets missing

Howard CheHao Chang hcchang at ece.ucdavis.edu
Fri Feb 27 14:23:58 PST 2004


Hi,

I am doing a simple simulation right now with 9 nodes (8 udp sources and 
1 sink) and the routing algorithm is AODV.  The topology is showed below 
and the distance between adjacent nodes is either 50, 100 or 200. Nodes 
are static without any movement. When I parsed the trace file, I found 
that in some cases, #sent >= #received + #dropped.


X	X	X


X	X	X


X	X	X


one sink is selected randomly so other 8 nodes will be the source.

I turned on the trace in AGT, RTR and MAC layers and count packets sent, 
received and dropped by using the following regular expressions in perl

sent:	 	if(m/^s.*AGT.*?(\d+)\scbr/)

received:	if(m/^r.*AGT.*?(\d+)\scbr/)

dropped:	if (m/^D.*?(\d+)\scbr/)

After looking into the trace file, I found that sometimes, a packet is 
generated by cbr agent, passed to RTR, passed from RTR to MAC and then 
never being sent out again by MAC layer.  An example I got from grep is 
pasted below for your reference and the whole simulation stops at 300.0. 
I am wondering whether this is normal or a bug in ns.


$ less 3_3_200_AODV_5_300.tr |grep '1936 cbr'

s 128.904000000 _1_ AGT  --- 1936 cbr 256 [0 0 0 0] ------- [1:0 0:0 32 
0] [242] 0 0
r 128.904000000 _1_ RTR  --- 1936 cbr 256 [0 0 0 0] ------- [1:0 0:0 32 
0] [242] 0 0
s 128.904000000 _1_ RTR  --- 1936 cbr 276 [0 0 0 0] ------- [1:0 0:0 30 
0] [242] 0 0



thanks,

-Howard



More information about the Ns-users mailing list