The Difference between OnOffApplication installed on PointToPointNetDevice and OnOffApplication installed on WifiNetDevice

58 views
Skip to first unread message

Tianye

unread,
Aug 28, 2016, 4:44:06 PM8/28/16
to ns-3-users
Dear All,

I got a question about OnOffApplication and NetDevice when I was running my simulations.
There are two scripts, one uses PointToPointNetDevice and the other one uses WifiNetDevice. Both of them install OnOffApplication on client nodes and SinkApplication on server node.
The parameters of Applications are set same in these two scripts. 
        OnOffHelper onOffHelper ("ns3::TcpSocketFactory", Address());
onOffHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
onOffHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
onOffHelper.SetAttribute ("PacketSize", StringValue ("100"));// Bytes
onOffHelper.SetAttribute ("DataRate",StringValue ("100kBps")); //
And the applications are all run by 1 seconds.

I had assumed that each client node should send out around 1000 packets in these two simulations. I found that in first simulation which uses PointToPointNetDevice the number of transmitted packet is 1003 and this result was correct.
However, in second simulation which uses WifiNetDevice the number of transmitted packet in different client nodes were different and much less than 1000 such like 600, 800.

So I was wondering if the NetDivices determine the actual performance of the OnOffApplication and cause this difference in the number of transmitted packets.

Best Regards,

Tianye


Tommaso Pecorella

unread,
Aug 31, 2016, 12:39:39 PM8/31/16
to ns-3-users
Hi,

perhaps you're looking at the RECEIVED packets.

T.

Tianye

unread,
Aug 31, 2016, 1:43:43 PM8/31/16
to ns-3-users
Hello Tommaso,

First of all, I used the flow monitor to collect the number of transmitted packets. And than I used the Tracing source(Tx) of OnOffApplication to try to figure out how many packets are sent. I found that the result of these two values were different. By using Tx, the result was 999 which was obvious. However, the results returned by the flow monitor were something like 600, 800. And those results were example of one of client nodes. And I was using the TCP. So I was thinking that there could be something determines the actual number of transmitted packets. 

Thanks,

Tianye

在 2016年8月31日星期三 UTC-4下午12:39:39,Tommaso Pecorella写道:

Tommaso Pecorella

unread,
Sep 1, 2016, 7:00:25 PM9/1/16
to ns-3-users
Ah well, if you're using TCP then the answer is obvious.
Think about it. I'll just give you a hint: FlowMonitor measures the packets at IP level.

T.

Tianye

unread,
Sep 1, 2016, 7:05:15 PM9/1/16
to ns-3-users
Hello Tommaso,

Thank you so much for your reply and hint. I'll think about it and try to find the answer.

Best Regards,

Tianye

在 2016年9月1日星期四 UTC-4下午7:00:25,Tommaso Pecorella写道:
Reply all
Reply to author
Forward
0 new messages