Problem with tracing dropped packets

1,791 views
Skip to first unread message

Konstantinos

unread,
Feb 17, 2012, 12:54:54 PM2/17/12
to ns-3-...@googlegroups.com
Hi,

I have set up a simple 5x5 wifi scenario and I try to catch the dropped packets at MAC layer. (I want to solve the lab-5 example - wifi rts/cts)

I set up the 3 UDP connections at 1Mbps while the link is 802.11b DsssRate1Mbps.
I see that not all packets get delivered but I don't have any drop packet either PHY or MAC.

These are the traces I use:
  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/MacRxDrop", MakeCallback(&MacDrop));
  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxDrop ", MakeCallback(&PhyDrop));

  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/$ns3::WifiMac/MacRxDrop", MakeCallback(&MacDrop));
  Config::ConnectWithoutContext("/NodeList/*/DeviceList/*/$ns3::WifiPhy/PhyRxDrop", MakeCallback(&PhyDrop));

The first set is as it is given in doxygen and the second is a bit altered. but none of these fires the drop function which is just a NS_LOG.

any idea where the problem might be?? Do I have something wrong with the callback? From the FlowMonitor I get both lost and dropped packets, but I don't want them..

An the second (again following the lab questions) is how can I get from the dropped packet, where (which node) it was dropped?
The callback gives a pointer to the packet, from that I can manipulate it and get source and destination but not the "forwarding node" that it was dropped.

Regards,
Konstantinos

Anthony Faustine

unread,
Feb 17, 2012, 3:50:17 PM2/17/12
to ns-3-...@googlegroups.com
Could send your code plse

> --
> You received this message because you are subscribed to the Google Groups
> "ns-3-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/ns-3-users/-/M_UlD1hHb80J.
> To post to this group, send email to ns-3-...@googlegroups.com.
> To unsubscribe from this group, send email to
> ns-3-users+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ns-3-users?hl=en.

Hassan

unread,
Jan 29, 2013, 7:18:24 PM1/29/13
to ns-3-...@googlegroups.com
Hello,

I am experiencing similar issues where not all of my packets are being delivered and no dropped packets are indicated by flow monitor or tracing. The interesting issue with my topology is if I set the delay of the CSMA link on my path to a very low number all my packets are delivered which is very strange to me since if there are no dropped packets TCP should ensure all packets are delivered regardless of the delay on the link.  For example, I am sending 10000 packets to a destination similar to the ns3 myApp tutorial. Tracing for packet losses yields none as well as flow monitor indicates no lost packets however shows only around 7000 packets transmitted and received. However, and this is the strange part, setting the delay of the CSMA link on the path to a low value such as .1 ms all packets are delivered as expected.

Any suggestions?

Thanks!

Monika Bansal

unread,
Apr 8, 2017, 11:20:19 PM4/8/17
to ns-3-users
Good Morning Sir

I am new in ns3 and facing the same problem as you mentioned in the post. Have you found its solution.........if so please share.

Thanks

Annie

unread,
Apr 19, 2017, 2:29:49 AM4/19/17
to ns-3-users
Me too. I encountered the same problem. Flow monitor show there is only several packet loss. And the packets counts from PhyRxDrop() is HUGE. Did you figure out the problem? Is it caused by retransmission? 

在 2012年2月17日星期五 UTC-5下午12:54:54,Konstantinos写道:

Stefano Avallone

unread,
Apr 20, 2017, 5:59:27 PM4/20/17
to ns-3-users
The issue in the case of wifi is described in bug #1034. Basically, the WifiMac::MacTxDrop trace is not fired when packets are dropped by the MAC layer. I just proposed a patch (you can find it in the above bug report) that allows the WifiMac::MacTxDrop trace to be fired when packets are dropped before (or while) they are enqueued in the wifi MAC queues. If anyone is willing to test that patch (on top of current ns-3-dev) and report back, that would be great.

Bests,
Stefano

Tommaso Pecorella

unread,
Apr 24, 2017, 7:15:38 AM4/24/17
to ns-3-users
The patch already had a green light. We're just waiting for Stefano to push it.

T.

saumil shah

unread,
Jan 30, 2018, 4:56:35 PM1/30/18
to ns-3-users
Dear Stefano,

I am working on ns-3-lbt and i am not able to trigger WifiMac::MacTxDrop. As i have seen that you have provided patch for the ns-3-dev , is it possible to have a patch for ns-3-lbt or can you guide me what changes i should do so that this trace will trigger?

Best Regards
Saumil

Stefano Avallone

unread,
Jan 31, 2018, 7:28:31 AM1/31/18
to ns-3-users
Saumil,

you need to apply changesets 12737 to 12744 and the patch attached to bug#1034.

Best would be to rebase/merge ns-3-dev into ns-3-lbt.

Bests,
Stefano
Reply all
Reply to author
Forward
0 new messages