Link throughput in a p2p network topology

145 views
Skip to first unread message

Tushar Mathur

unread,
Jun 28, 2015, 6:53:03 AM6/28/15
to ns-3-...@googlegroups.com
Hey,

My topology is:

         s1 s2--- s33 (TCP source) 33 nodes
           \ | /--/
            \|/--/
           router0
             ||  --> need to measure throughput?
           router1
            /|--\
           / |---\
          c1 c2--- c33 (sink) 33 nodes

I am using onoff application for generating TCP traffic across the network. I know that by using FlowMonitor we can measure the throughput per flow and I have already observed that part from my simulation script...
An important part of my research is to measure throughput for the link between router-0 and router-1.

I have tried searching for a solution in the forum (hopefully I didn't miss the one pointing to an answer). I would appreciate it if any expert can point me in the right direction to understand how to measure the link throughput in the network.

Thanks in advance
-Tushar

Konstantinos

unread,
Jun 28, 2015, 7:09:58 AM6/28/15
to ns-3-...@googlegroups.com, math...@miamioh.edu
Hi Tushar, 

To measure the link throughput you will have to use the tracing system of ns-3.
e.g. using the MacTx/MacRx trace sources for the p2p net device on routers '0' and '1' you can measure how many packets (hence bytes) are transmitted/received. 
Then if you divide it over the simulation time you can have the average throughput of that link.
You could also use Simulator::Schedule and 'monitor' those Tx/Rx bytes per unit of time, so you could observe 'instantaneous' throughput that you can at the end average.

Both are discussed in the list for cases where FlowMonitor is not suitable. 
Tracing is explained in the documentation.

Hope that helped.

Regards,
K

Tushar Mathur

unread,
Jun 28, 2015, 7:21:28 AM6/28/15
to ns-3-...@googlegroups.com, math...@miamioh.edu
Hey Kostantinos,

Thanks for such a quick reply!

That is very helpful information. I will go through the details of using tracing system.  Is there any documentation/discussion for cases which are not suitable for FlowMonitor?

Thanks again!
-Tushar

Konstantinos

unread,
Jun 28, 2015, 4:39:00 PM6/28/15
to ns-3-...@googlegroups.com, math...@miamioh.edu
Generally you can see the description/limitations of FlowMonitor

Known issues exist with DSR protocol due to the DSR-header that is added between IP and TCP/UDP so packets can not be classified.
Other limitation includes the broadcast/multicast packets that can't be classified.

tushar mathur

unread,
Jun 28, 2015, 4:46:34 PM6/28/15
to ns-3-...@googlegroups.com, math...@miamioh.edu
Thanks for the info. It was very helpful.

Best,
-Tushar
Reply all
Reply to author
Forward
0 new messages