Flowmonitor statistics not matched WireShark statistics

52 views
Skip to first unread message

ns3 lover

unread,
Nov 18, 2016, 12:21:10 PM11/18/16
to ns-3-users
Hi, hope all of you are well and in good health,
I am working on a simulation in ns3 and have some questions hope someone can help me;
1- The flowmonitor stats for TCP show 2 flows one from A to B and the other from B to A; since there is one flow from A to B why there are 2 flows ?
when I check the conversations in wireshark it shows one conversation with the stats of the rxPackets etc..
But there is one flow for UDP.

2- I used PointToPointHelper for connection between nodes and I have noticed that the TxPackets = RxPackets and also TxBytes = RxByets; for both TCP and UDP protocols.
when I check it in wireshark there were different values for the TCP and there was nothing received by UDP.
so is it because of the PointToPointHelper or something else.

I am using very simple example between 2 nodes.

anyone could try it and let me know if there any answers,

Thank you all for your valued time to read my message.

God Bless you all.

Konstantinos

unread,
Nov 18, 2016, 3:08:02 PM11/18/16
to ns-3-users
Hi,

First time I meet someone who loves ns-3...
See replies inline.


On Friday, November 18, 2016 at 5:21:10 PM UTC, ns3 lover wrote:
Hi, hope all of you are well and in good health,
I am working on a simulation in ns3 and have some questions hope someone can help me;
1- The flowmonitor stats for TCP show 2 flows one from A to B and the other from B to A; since there is one flow from A to B why there are 2 flows ?
when I check the conversations in wireshark it shows one conversation with the stats of the rxPackets etc..
But there is one flow for UDP.

The second flow is the return of ACKs in the case of TCP. 
UDP is un-acknowledged, hence you only see one flow.
 

2- I used PointToPointHelper for connection between nodes and I have noticed that the TxPackets = RxPackets and also TxBytes = RxByets; for both TCP and UDP protocols.
when I check it in wireshark there were different values for the TCP and there was nothing received by UDP.
so is it because of the PointToPointHelper or something else.


Need more information (either the scenario and/or trace files)

ns3 lover

unread,
Nov 19, 2016, 3:19:36 AM11/19/16
to ns-3-users
Hi Konstantinos , and thanks for your quick response
First of all, I know how networks work and I have been working on ns3 for more than 3 months for some reason of a project I work on
and I have tried a lot of examples for many types of network and read the documentation of ns3.
Also, I am a fan this group and read almost all the problems here and the solutions that suggested by you or by Tomas, because you both are so helping people here to solve a lot of problems.

Now, I know that the second flow is for ACK in TCP and there is no Ack in UDP.
But if we actually see the flow between 2 nodes using TCP there will be one flow just like the conversation in wire shark.
SO my first question was is there a way to make it happen and make one flow for it ??

Another thing confused me is the same numbers the have for both TxPackets and the RxPackets, especially for the UDP 
because when check it in wireshark there is nothing for RxPackets
SO the second question is the PointtoPoint was the reason for these equal numbers ?

I have attached a pics for both protocols TCP and UDP also for both flowmonitor results and wirshark to give a some light here.
Thank you again for your time.
tcp-flowmonitor-results.jpg
tcp-wireshark-results.jpg
udp-flowmonitor-results.jpg
udp-wireshark-results.jpg

Konstantinos

unread,
Nov 19, 2016, 5:28:07 AM11/19/16
to ns-3-users
Answers inline.


On Saturday, November 19, 2016 at 8:19:36 AM UTC, ns3 lover wrote:
Hi Konstantinos , and thanks for your quick response
First of all, I know how networks work and I have been working on ns3 for more than 3 months for some reason of a project I work on
and I have tried a lot of examples for many types of network and read the documentation of ns3.
Also, I am a fan this group and read almost all the problems here and the solutions that suggested by you or by Tomas, because you both are so helping people here to solve a lot of problems.

Now, I know that the second flow is for ACK in TCP and there is no Ack in UDP.
But if we actually see the flow between 2 nodes using TCP there will be one flow just like the conversation in wire shark.
SO my first question was is there a way to make it happen and make one flow for it ??


How you present the results is up to you.
FlowMonitor just captures the statistics for each flow and a flow is defined by the 5-tuple Source IP/Port, Destination IP/Port, Protocol. 
If any of these 5 elements is different, FlowMonitor creates a new flow entry.
When you analyse then, you can simply combine two flows for the same Protocol, and reverse Source/Destination pairs. 
 
Another thing confused me is the same numbers the have for both TxPackets and the RxPackets, especially for the UDP 
because when check it in wireshark there is nothing for RxPackets
SO the second question is the PointtoPoint was the reason for these equal numbers ?


The dispersity in numbers might be caused by incorrect data capture. You should give some time that depends on scenario (for p2p couple of seconds should be enough) from the moment you stop sending the last packet until you stop the simulation. This is known as cool down time. It is used for packets in transit to reach the destination.
For example if you have you application running for 100sec, have your simulation stopping at 110sec.

ns3 lover

unread,
Nov 19, 2016, 6:18:06 AM11/19/16
to ns-3-users
Thank you for your suggestion that I am working on it
Have a good day
Reply all
Reply to author
Forward
0 new messages