Flow monitor is not working with DSR

356 views
Skip to first unread message

Bouhaous Bouras

unread,
May 13, 2016, 3:47:53 PM5/13/16
to ns-3-users
Hello everyone,

I just want to know if anybody tried to get some flow monitor statistics where the routing protocol is DSR because it seems that flow monitor is not working with DSR.

I ran the manet-routing-compare.cc with flow monitor enabled. All the other routing protocols ( Aodv, Dsdv, and Olsr) work just fine with flow monitor except DSR. Also, I tried the dsr.cc. But the same thing  !! flow monitor is not working with DSR

Please, I am waiting for a help

Thank you,

Konstantinos

unread,
May 13, 2016, 6:37:45 PM5/13/16
to ns-3-users
This is a known issue with Dr and it is related to its implementation. It adds a custom header between transport and I which makes flow monitor unable to classify the packets. If you search the list you can find further discussions and solutions.

Regards,
K.

Tommaso Pecorella

unread,
May 13, 2016, 8:00:50 PM5/13/16
to ns-3-users
It's not a bug. It's documented, thus it's called feature.

1844: FlowMonitor fails to capture DSR

If you want to provide a patch, we'll be happy to test it.

Cheers,

T.

Ammar Alhosainy

unread,
Jun 22, 2017, 1:52:46 PM6/22/17
to ns-3-users
You can add the following lines in the classifier file   ipv4-flow-classifier.cc 
In the function  
Ipv4FlowClassifier::Classify (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload_r, uint32_t *out_flowId, uint32_t *out_packetId)
after the line 
tuple.protocol = ipHeader.GetProtocol ()
 
do not forget to include the header 
#include "ns3/dsr-fs-header.h"

 
  Ptr<Packet> ipPayload = ipPayload_r->Copy();
  if (tuple.protocol == 48) // DSR header
  {
 dsr::DsrRoutingHeader dsrHeader;
 ipPayload->RemoveHeader(dsrHeader);
 tuple.protocol = dsrHeader.GetNextHeader();
  }

igs...@gmail.com

unread,
Feb 21, 2023, 12:05:30 PM2/21/23
to ns-3-users
After adding lines in the  file   ipv4-flow-classifier.cc as mentioned by Ammar Alhosainy,  FlowMonitor was able to produce some output for DSR.
But, it is missing the entries for the actual data flows (IDs).

There are flows corresponding to LOT of flow IDs - but there is no use in it.

(For your information, I tested it on ns3.37)

So, as mentioned in https://www.nsnam.org/bugzilla/show_bug.cgi?id=1844, it seems to be a complex thing to implement with flowmonitor.

Could Ammar Alhosainy provide any other solution?

Charles Pandian.

Tommaso Pecorella

unread,
Feb 21, 2023, 5:01:30 PM2/21/23
to ns-3-users
Unfortunately DSR is... weird. Despite the name (DsrRouting), it is actually a shim layer between L4 (TCP, IDP, etc.) and IP, and it messes up badly with the L4 headers - which are needed by FlowMonitor.

As a result, right now FlowMonitor can't reliably track the flows sent using DSR.

As pointed out in the bug tracker, it's not an impossible task, because nothing is impossible. However, it is far more complex than adding a couple of functions, and right now I can't fix it. BTW, fixing it "for good" could lead to a massive refactoring of the DSR module to make it work like a real routing protocol.
Reply all
Reply to author
Forward
0 new messages