Routing overhead

171 views
Skip to first unread message

rabahifa...@gmail.com

unread,
Jan 30, 2022, 5:45:49 AM1/30/22
to ns-3-users
I want to know how to calculate routing overhead on NS3 in manet-routing-compare or in any script because I did not find it on flow monitor

Soulimane Mammar

unread,
Feb 2, 2022, 12:53:02 PM2/2/22
to ns-3-users
Hi,
You have to define what do you mean by overhead
- The time consumed by the protocol
- The bandwidth used

Flow Monitor gives you just stats based on some probes and classifiers, it's up to you to collect what you consider as overhead
Regards

fatima zahra rabahi

unread,
Feb 5, 2022, 1:46:19 PM2/5/22
to ns-3-...@googlegroups.com
Hi Thank you for your answer 
the routing overhead I aim the set of messages used by the routing protocol excluding the data that circulates in the network 
Regards

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/SvA1nKqMjqg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/4acd4b47-f8a4-41e4-904d-cd66e40907den%40googlegroups.com.


--
Rabahi Fatima Zahra

Soulimane Mammar

unread,
Feb 5, 2022, 3:55:56 PM2/5/22
to ns-3-...@googlegroups.com
Hi,
usually routing protocols use udp transport layer with specific port number(s), for instance, OLSR uses udp port 698
So in your case, you can filter those messages and do the stat.
For example:
 
const uint8_t UDP_PROT_NUMBER = 17;
Ptr<FlowMonitor> flowMonitor;
FlowMonitorHelper flowHelper;
flowMonitor = flowHelper.InstallAll();
auto classifier = DynamicCast<Ipv4FlowClassifier>(flowHelper.GetClassifier ());

Simulator::Stop(Seconds(SimulationTime));
Simulator::Run ();

flowMonitor->CheckForLostPackets ();
stats = flowMonitor->GetFlowStats ();
auto rx_bytes{0};

for (auto stat : stats)
{
Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow (stat.first);
if (t.protocol == UDP_PROT_NUMBER && (t.destinationPort == 698 || t.sourcePort == 698))
rx_bytes += stat.second.rxBytes;
}
// rx_bytes will contain the pure OLSR overhead (UDP and IP headers and MAC header/trailer not counted)






You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAE%2B%2B98-J2uFeC5gOBSUBK2JgCixBaX%2B8DaheB96OeRxff_Shpg%40mail.gmail.com.


--
Soulimane MAMMAR

Soulimane Mammar

unread,
Feb 5, 2022, 3:59:27 PM2/5/22
to ns-3-users
In my last message I forgot to count txBytes
The overhead will be the sum of txBytes and rxBytes
Regards

fatima zahra rabahi

unread,
Feb 5, 2022, 4:20:49 PM2/5/22
to ns-3-...@googlegroups.com
Thank you very much for your answer i will try it.



--
Rabahi Fatima Zahra

Ali H. Wheeb

unread,
May 13, 2022, 8:12:02 AM5/13/22
to ns-3-users
Dear souliman

i need your email. I have a few questions.
Reply all
Reply to author
Forward
0 new messages