how to calculate packet loss rate

1,736 views
Skip to first unread message

Aimu Liu

unread,
Mar 13, 2014, 11:38:42 PM3/13/14
to ns-3-...@googlegroups.com
Dear all,I do not know how to calculate packet loss rate in ad hoc networks

Shall I use some models? but which  do I need? or something else?

I am appreciate for your suggestions!

Thanks very much,
Aimu Liu

Tommaso Pecorella

unread,
Mar 14, 2014, 3:21:14 AM3/14/14
to ns-3-...@googlegroups.com
Hi,

this point has been discussed many times. Moreover, from your question it is unclear if you want to measure the PLR for each link or at application level.

In the fist case you'll have to measure it at phi/mac level by counting the Tx, Rx and Drops. In the second case, FlowMonitor model can help.

Cheers,

T.

Aimu Liu

unread,
Mar 19, 2014, 10:17:17 PM3/19/14
to ns-3-...@googlegroups.com

Hi.Tommaso

Thanks for your help. I am not sure  whether there is a model or a method to decide how to drop packet ,and strategy to drop packet. I want to calculate  drop packet of nodes.I find WIfiMacQueue::MaxPacketNumber maybe can help me,but I am not sure. Finnally, I want to know which application to use in ad hoc networks,OnOff? or  something else?

Thanks.
Aimu Liu.
在 2014年3月14日星期五UTC+8上午11时38分42秒,Aimu Liu写道:

Tommaso Pecorella

unread,
Mar 20, 2014, 3:13:13 AM3/20/14
to ns-3-...@googlegroups.com
Hi,

the application (i.e., the traffic model) is one of your choices. It will affect the PLR, probably, but there is not one "better" than the other.

About the other question, I think you have a few confused ideas.

A packet can be dropped for one of these reasons (for the 1000th time):
  1. Channel errors
  2. Queueing reasons
  3. Routing decisions
First case: the MAC is dropping it because there are too many erroneous bits. The MAC Drop Trace is fired.
- OR - the Mac is giving up transmission due to channel congestion. The MAC Drop trace should be fired in the Tx node.
Second case: a queue is full. The Queue Drop Trace is fired. 
Third case: the routing finds out that there's no route to destination. The IP Drop trace is fired.

Each d**n trace:
  • is in a different class,
  • the name (usually) is "Drop", but it's not mandatory
  • what they're named and what they are depends on YOUR simulation setup
Last but not least, "Drop" can be measured:
  • link-level (between each pair of nodes)
  • end-to-end (from source to destination)
Now, clarify yourself what are you willing to measure, what is your experiment and so on. Then you should hook all the relevant traces and measure the "drops".
HOWEVER, to have a "drop rate", you'll also need the number of Tx attempts...


T.

Aimu Liu

unread,
Mar 20, 2014, 10:47:39 PM3/20/14
to ns-3-...@googlegroups.com
Hi,
Thank you so much!  With your help, I will try to solve it .



在 2014年3月14日星期五UTC+8上午11时38分42秒,Aimu Liu写道:

Aimu Liu

unread,
Mar 25, 2014, 10:58:56 PM3/25/14
to ns-3-...@googlegroups.com
Hi

在 2014年3月14日星期五UTC+8上午11时38分42秒,Aimu Liu写道:

Aimu Liu

unread,
Mar 25, 2014, 11:25:29 PM3/25/14
to ns-3-...@googlegroups.com
Hi,Tommaso.
I hope  your help.I do not know how to set transmission rate. I want to set connection rate = 4packet/s, I have 10 sinks,50 wifis. I want one random sink transmit packet to random wifis. but if there are too many packet,PDR is so low. what shall I set packet rate?
thank you.



在 2014年3月14日星期五UTC+8下午3时21分14秒,Tommaso Pecorella写道:

Tommaso Pecorella

unread,
Mar 26, 2014, 2:56:39 AM3/26/14
to ns-3-...@googlegroups.com
Hi,

read the tutorial and manual, please....

Most Applications have a rate control (e.g., in OnOffApplication there's DataRate and PacketSize). Study the code and you'll easily find how to limit the rate to some packets per second. About what's the "right" packet rate, it's all depending on your application, the scenario, the radio range, the node density and so on. If the PDR is low, probably you have too many collisions. 
I can't help on that. It's your research and you must be able to do it. I can't do it in your place.

T.

Aimu Liu

unread,
Mar 26, 2014, 7:49:16 AM3/26/14
to ns-3-...@googlegroups.com
Thank you for your suggestion!you are very right!
Actually, I have learned for NS3 many days, there are some problems to solve. I read some codes in src.I for example,in src/dsr/example/dsr.cc. I can not understand 'we are sending 4 pkt/s' .  Why  it is 4 pkt/s? How to calculate?


在 2014年3月26日星期三UTC+8下午2时56分39秒,Tommaso Pecorella写道:

bekan kitaw

unread,
Jan 23, 2019, 1:55:00 AM1/23/19
to ns-3-users
Sorry for I'm interrupting you sir! I want to know if their is a mechanism to measure the packet drop rate of a given node. And with this i want to determine selfish node. Which part I've to modify to do so i.e the back end C++ code or the TCL file? I'm working on AODV protocol using Ns2 simulator.

Any help is appreciated!
Reply all
Reply to author
Forward
0 new messages