Hi Bruce,

If you enable AGT and RTR tracing (in node-config command in the tcl
file), you will see that when a tcp packet is sent out of the RTR layer,
its size is larger than its size when sent by the AGT layer. This
reflects the fact that the RTR layer adds some headers that contribute
to the packet size. The same thing happens when the packet is sent by
the MAC layer; it gets a little bigger due to MAC headers.

For the inconsistent packet size in the MAC layer between send time and
recv time, my guess is that the packet size is measured in the receive
event after removing the MAC headers. You will see that the received
packet size in the MAC is equal to the packet size sent by RTR, which is
the size before adding the MAC headers. Having that said, my guess is
that the packet size reported in the send event is the correct size sent
out of the MAC layer. In that case, the packet size in the receive event
is the size that the MAC layer reports to higher layers.



Bruce Who wrote:

>hi, Ahmad:
>
>======= 2006-03-31 23:40:43 Ahmad Khayyat wrote: =======
>
>  
>
>>2) assoPermit means whether the node should permit other nodes to 
>>associate with it so that it becomes their coordinator. Look at the 
>>802.15.4-2003 standard for details.
>>
>>5) This is not how LossModel is used. Consult ns-manual for the correct 
>>usage. It still applies for wpan.
>>    
>>
>
>Thanks, I'll look into the document.
>
>And I have another question. This is a snippet from wpan_demo2.tr, I find that 
>all tcp packets sent out is always 7 bytes bigger than the received packets. 
>Why do they not have the same size? Then which one(97 or 90) is the real size 
>of the tcp packets?
>
>s 11.928192000 _0_ MAC  --- 255 tcp 97 [0 5 0 800] ------- [0:2 5:0 30 5] [133 
>0] 0 0
>s 11.931712033 _5_ MAC  --- 255 ACK 5 [0 0 5 0] 
>r 11.932064067 _0_ MAC  --- 255 ACK 5 [0 0 5 0] 
>r 11.932704033 _5_ MAC  --- 255 tcp 90 [0 5 0 800] ------- [0:2 5:0 30 5] [133 
>0] 1 0
>
>  
>
>>Bruce Who wrote:
>>
>>    
>>
>>>------------------------------------------------------------------------
>>>
>>>Hi, all:
>>>
>>>Recently I begin to learn how to use ns2 to run wpan simulations, and 
>>>stumbled
>>>by some problems, hope someone could help me out.
>>>
>>>1)I found there are some commands like this:
>>>eval $ns_ attach-agent \$node_($src) \$udp_($src)
>>>
>>>why don't we just use this command?
>>>
>>>$ns_ attach-agent $node_($src) $udp_($src)
>>>
>>>2) for this command
>>>$node sscs startCTDevice <isFFD = 1> <assoPermit = 1> <txBeacon = 0>
>>><beaconOrder = 3> <SuperframeOrder = 3>
>>>
>>>what does assoPermit mean?
>>>
>>>3) I ran wpan_demo2.tcl and found that all extended addresses of nodes are
>>>  [0]. Is it necessary to set the address to different values by ourselves?
>>>
>>>4) I ran "nam wpan_demo2.nam" and found that data stream is only seem between
>>>  PANCoor(node0) and node1. But we have such statements in the wpan_demo2.tcl
>>>  script:
>>>
>>>  ftptraffic 0 1 $appTime1
>>>  ftptraffic 0 3 $appTime3
>>>  ftptraffic 0 5 $appTime5
>>>
>>>So why could no communications be seen between node0 and node3/node5?
>>>
>>>5) And how to set lossmodel for nodes in wpan? I tried following code, but it
>>>  doesn't work: 
>>>
>>>set loss_module [new ErrorModel]
>>>$loss_module set rate_ 0.01
>>>$loss_module unit pkt
>>>$loss_module ranvar [new RandomVariable/Uniform]
>>>$loss_module drop-target [new Agent/Null]
>>>eval $ns lossmodel $loss_module \$node_($src) \$node_($dst) 
>>>
>>>Any help would be appreciated! Thanks in advance!
>>>
>>>
>>>
>>>Best regards,
>>>
>>>Bruce Who
>>>
>>> 
>>>
>>>      
>>>
>
>= = = = = = = = = = = = = = = = = = = =
>                       
>Best regards,
>
>        Bruce Who
>          2006-04-02
>
>  
>

Reply via email to