[ns] Size of pkt sent > size of pkt received?
Alex Hamidian
alexh@telecom.lth.se
Mon Apr 8 12:35:01 2002
--------------070402030302090001010408
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
The UDP header is 8 bytes. Could the 8 bytes be it? i.e. 1028 = 1000
bytes + 20 bytes IP header + 8 bytes UDP header
Ali Hamidian
Gautam - Chakrabarti wrote:
>1028 = 1000 + 20 bytes of IP header + 8 bytes (it can be routing
>overhead carried in ur packet --- depends on your routing protocol) :::
>i have tested DSR with CBR traffic, note CBR, I have found it adds 20
>bytes IP header + bytes for DSR's own stuff.
>
>hth.
>gautam
>
>Michael Mercurio wrote:
>
>>Hi,
>>
>>Can anyone out there help explain why the size of the packets received are
>>28 bytes larger than what is being sent in the CMU trace output?
>>
>>I'm sending UDP over 802.11 using the exponential traffic agent. I'm
>>setting the packet size to 1000 bytes.
>>
>>This only happens when combining exponential traffic with 802.11. It
>>doesn't show up if I use CBR and 802.11 nor does it show up if I use
>>exponential and simple links.
>>
>>If anyone has any ideas or can point me in a direction to look, I'm all
>>ears.
>>
>>Thanks,
>>m
>>
>>PS, Trace output and TCL fragment below.
>>
>>The output looks like:
>>s 1.295695163 _1_ AGT --- 0 exp 1000 [0 0 0 0] ------- [1:0 5:0 32 0]
>>r 1.311963072 _5_ AGT --- 0 exp 1028 [a2 5 1 800] ------- [1:0 5:0 32 5]
>>s 1.316690965 _0_ AGT --- 4 exp 1000 [0 0 0 0] ------- [0:0 4:0 32 0]
>>r 1.339249178 _4_ AGT --- 4 exp 1028 [a2 4 0 800] ------- [0:0 4:0 32 4]
>>s 1.398259265 _1_ AGT --- 7 exp 1000 [0 0 0 0] ------- [1:0 5:0 32 0]
>>r 1.403067285 _5_ AGT --- 7 exp 1028 [a2 5 1 800] ------- [1:0 5:0 32 5]
>>...
>>
>>Here's how I'm setting up the UDP and exponential traffic agents... in the
>>example above, the number of flows $opt(nFlows) is set to 4 for a total of
>>8 wireless stations:
>>
>># Create all the nodes
>>for {set i 0} {$i < $totalNodes } {incr i} {
>> # Create Clients
>> set node_($i) [$ns_ node]
>> $node_($i) random-motion 0 ; # disable random motion
>>}
>>
>># set-up the senders and receivers
>>for {set i 0} {$i < $opt(nFlows) } {incr i} {
>> set txNode($i) $node_($i)
>> # UDP source agent
>> set src($i) [new Agent/UDP]
>> $ns_ attach-agent $txNode($i) $src($i)
>>
>> set rxNode($i) $node_([expr $i + $opt(nFlows)])
>> # UDP sink agent
>> set sink($i) [new Agent/UDP]
>> $ns_ attach-agent $rxNode($i) $sink($i)
>>
>> # Connext sender and receiver
>> $ns_ connect $src($i) $sink($i)
>>
>> # Exponential Traffic Generator...
>> set expTraffic($i) [new Application/Traffic/Exponential]
>> $expTraffic($i) attach-agent $src($i)
>>
>> $expTraffic($i) set packetSize_ $opt(packetSize)
>> $expTraffic($i) set burst_time_ $opt(tOn)
>> $expTraffic($i) set idle_time_ $opt(tOff)
>> $expTraffic($i) set rate_ $opt(rate)
>>}
>>--
>>Michael Mercurio
>>lafcadio@bu.edu
>>
>
--------------070402030302090001010408
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<html>
<head>
</head>
<body>
The UDP header is 8 bytes. Could the 8 bytes be it? i.e. 1028 = 1000 bytes
+ 20 bytes IP header + 8 bytes UDP header<br>
Ali Hamidian<br>
<br>
<br>
Gautam - Chakrabarti wrote:<br>
<blockquote type="cite" cite="mid:3CB1E62E.A0C31C76@msu.edu">
<pre wrap="">1028 = 1000 + 20 bytes of IP header + 8 bytes (it can be routing<br>overhead carried in ur packet --- depends on your routing protocol) :::<br>i have tested DSR with CBR traffic, note CBR, I have found it adds 20<br>bytes IP header + bytes for DSR's own stuff.<br><br>hth.<br>gautam<br><br>Michael Mercurio wrote:<br></pre>
<blockquote type="cite">
<pre wrap="">Hi,<br><br>Can anyone out there help explain why the size of the packets received are<br>28 bytes larger than what is being sent in the CMU trace output?<br><br>I'm sending UDP over 802.11 using the exponential traffic agent. I'm<br>setting the packet size to 1000 bytes.<br><br>This only happens when combining exponential traffic with 802.11. It<br>doesn't show up if I use CBR and 802.11 nor does it show up if I use<br>exponential and simple links.<br><br>If anyone has any ideas or can point me in a direction to look, I'm all<br>ears.<br><br>Thanks,<br>m<br><br>PS, Trace output and TCL fragment below.<br><br>The output looks like:<br>s 1.295695163 _1_ AGT --- 0 exp 1000 [0 0 0 0] ------- [1:0 5:0 32 0]<br>r 1.311963072 _5_ AGT --- 0 exp 1028 [a2 5 1 800] ------- [1:0 5:0 32 5]<br>s 1.316690965 _0_ AGT --- 4 exp 1000 [0 0 0 0] ------- [0:0 4:0 32 0]<br>r 1.339249178 _4_ AGT --- 4 exp 1028 [a2 4 0 800] ------- [0:0 4:0 32 4]<br>s 1.398259265 _1_ AGT ---
7 exp 1000 [0 0 0 0] ------- [1:0 5:0 32 0]<br>r 1.403067285 _5_ AGT --- 7 exp 1028 [a2 5 1 800] ------- [1:0 5:0 32 5]<br>...<br><br>Here's how I'm setting up the UDP and exponential traffic agents... in the<br>example above, the number of flows $opt(nFlows) is set to 4 for a total of<br>8 wireless stations:<br><br># Create all the nodes<br>for {set i 0} {$i < $totalNodes } {incr i} {<br> # Create Clients<br> set node_($i) [$ns_ node]<br> $node_($i) random-motion 0 ; # disable random motion<br>}<br><br># set-up the senders and receivers<br>for {set i 0} {$i < $opt(nFlows) } {incr i} {<br> set txNode($i) $node_($i)<br> # UDP source agent<br> set src($i) [new Agent/UDP]<br> $ns_ attach-agent $txNode($i) $src($i)<br><br> set rxNode($i) $node_([expr $i + $opt(nFlows)])<br> # UDP sink agent<br> set sink($i) [new Agent/UDP]<br> $ns_ attach-agent $rxNode($i) $sink($i)<br><br> # Connext sender and receiver<br> $ns_ connect $src($i) $
sink($i)<br><br> # Exponential Traffic Generator...<br> set expTraffic($i) [new Application/Traffic/Exponential]<br> $expTraffic($i) attach-agent $src($i)<br><br> $expTraffic($i) set packetSize_ $opt(packetSize)<br> $expTraffic($i) set burst_time_ $opt(tOn)<br> $expTraffic($i) set idle_time_ $opt(tOff)<br> $expTraffic($i) set rate_ $opt(rate)<br>}<br>--<br>Michael Mercurio<br><a class="moz-txt-link-abbreviated" href="mailto:lafcadio@bu.edu">lafcadio@bu.edu</a><br></pre>
</blockquote>
<pre wrap=""><!----><br></pre>
</blockquote>
<br>
</body>
</html>
--------------070402030302090001010408--