Flow monitor ns3

966 views
Skip to first unread message

Raju Manthena

unread,
May 5, 2014, 1:20:46 PM5/5/14
to ns-3-...@googlegroups.com
Dear NS3,

We have used the example manetroutingcompare.cc to simulate the number of packets that have been delivered in aodv protocol. However we have made malicious nodes in the network. The simulation is working

Now we want to see the flow monitor results which is originally deactivated in the code. When we activate these lines, (we have added the ns3/flow-monitor-module.h before doing so) we are getting the following errors (attached in flowmonerrors)

I have also attached the modified manetroutingcompare code. The only thing that was different from the original was we have used malicious nodes and activated flow monitor.


May you be able to address this issue

Best Regards,

Raju Manthena
flowmonerrors.odt
manet-routing-compare.cc

Tommaso Pecorella

unread,
May 5, 2014, 3:32:41 PM5/5/14
to ns-3-...@googlegroups.com
Hi,

perhaps you're using an old ns-3 version (baaad), because on mine everything works.
In order to fix the error, include the helper header:
#include "ns3/flow-monitor-helper.h"

However, as a general note, you should NOT use FlowMonitor to track AODV traffic. The data provided by FlowMonitor are wrong in case of multicast/broadcast packets, and there is no guarantee that the number you're getting are corresponding to anything meaningful.

The point is: FlowMonitor has never, EVER, been meant to track multicast/broadcast traffic, and the data for that kind of traffic has not been validated.
This "feature" has been removed from ns-3 (i.e., the bug was fixed).

To collect data for user traffic with AODV, please use the stats module.

T.

Raju Manthena

unread,
May 6, 2014, 4:09:55 PM5/6/14
to ns-3-...@googlegroups.com
Dear Tommaso, 

Thank you very much for your quick reply!

I will try the suggestion very shortly. I have one question in the comments you have said about how the flow monitor is not good for looking at aodv traffic. Just to make sure I understand it correctly, the flow monitor can still give us some useful information on the data packets, but not all the control packets (since many of the control packets are broadcast) right? Data packets in the sense the packet i want to send from one node to another (assuming its unicast). Control Packets in the sense those packets that are specific to the aodv (such as routerequest, routereply etc.)

Also, I have not heard of the stats module before as I am still a beginner, can you give me a few simple steps on whats required for that?

Thanks!

Tommaso Pecorella

unread,
May 6, 2014, 8:25:16 PM5/6/14
to ns-3-...@googlegroups.com
Hi,

as far as I remember, AODV can send data packets embedded in AODV packets. Those would be lost.

About the stats module, check the manual, there's a pretty long section about it.

Cheers,

T.

Raju Manthena

unread,
May 8, 2014, 8:02:46 AM5/8/14
to ns-3-...@googlegroups.com
Dear Tommaso,

The #include line you told me to add was not working, so I guess there is probably something wrong with the flow monitor then.

Also, you said that AODV can send data packets embedded in aodv. Even in that case whenever one sends a data packet it has a specific destination (assuming I am sending the data packets unicast which I am in the code), so I guess the flow monitor will work in that case right? (at least for the data packets)


On Monday, May 5, 2014 1:20:46 PM UTC-4, Raju Manthena wrote:

Raju Manthena

unread,
May 8, 2014, 1:53:55 PM5/8/14
to ns-3-...@googlegroups.com
Thanks Mr. Katsaros, and Tomaso,

It makes a lot of sense now! :)

On Monday, May 5, 2014 1:20:46 PM UTC-4, Raju Manthena wrote:

Konstantinos

unread,
May 8, 2014, 8:12:31 AM5/8/14
to ns-3-...@googlegroups.com
See comments inline.


On Thursday, May 8, 2014 1:02:46 PM UTC+1, Raju Manthena wrote:
Dear Tommaso,

The #include line you told me to add was not working, so I guess there is probably something wrong with the flow monitor then.


FlowMonitor is working fine. Where do you run your scenario? Is it in /scratch folder or somewhere else?
If you run the examples/routing/manet-routing-compare.cc from that folder you need to update the wscrpt file of that folder

Currently it has 
    obj = bld.create_ns3_program('manet-routing-compare',
                                 ['wifi', 'dsr', 'dsdv', 'aodv', 'olsr', 'internet', 'applications'])
    obj.source = 'manet-routing-compare.cc'

As you can see, the flow-monitor is not a dependency for that, that could be the reason why adding the header is not fixing the problem.

Update to : 

    obj = bld.create_ns3_program('manet-routing-compare',
                                 ['wifi', 'dsr', 'dsdv', 'aodv', 'olsr', 'internet', 'applications', 'flow-monitor'])
    obj.source = 'manet-routing-compare.cc'

  
Also, you said that AODV can send data packets embedded in aodv. Even in that case whenever one sends a data packet it has a specific destination (assuming I am sending the data packets unicast which I am in the code), so I guess the flow monitor will work in that case right? (at least for the data packets)


No, it would not track them if it adds custom headers. FlowMonitor can only track unicast packets which have TCP/UDP headers before the IP. It there is a custom header between them, it does not track them. This is the case of DSR which can not be tracked with FlowMonitor.
Reply all
Reply to author
Forward
0 new messages