Measuring UDP drop rates

466 views
Skip to first unread message

steve

unread,
Apr 3, 2011, 11:45:26 PM4/3/11
to ns-3-users
I'm trying to find the right place and technique for observing drop
rates for UDP packets as network bandwidth becomes saturated.

I'm using a topology that models a high-bandwidth P2P connection that
bridges to a small CSMA network that has limited bandwidth.

I have Ascii tracing configured using the typical P2P and CSMA helper
classes "EnableAsciiAll" methods.

I can clearly see that packets are NOT arriving in the CSMA network,
and if I read the ".tr" file correctly for the P2P network, all of the
packets are being received by the egress devices of the P2P network,
but I thought I was supposed to see a "d" prefix in the trace file for
those packets dropped... somewhere!

If not, I guess I'm just doing something wrong that is probably
painfully obvious to some of the recipients of this email... :-)

Any suggestions?

Chris Facchini

unread,
Apr 4, 2011, 4:17:59 AM4/4/11
to ns-3-users
Hi there!

On Apr 4, 4:45 am, steve wrote:
> I have Ascii tracing configured using the typical P2P and CSMA helper
> classes "EnableAsciiAll" methods.
I'm not really into 'ascii' tracing, so what I'd do is to make use of
some specific TraceSource.

> I can clearly see that packets are NOT arriving in the CSMA network,
> and if I read the ".tr" file correctly for the P2P network, all of the
> packets are being received by the egress devices of the P2P network,
> but I thought I was supposed to see a "d" prefix in the trace file for
> those packets dropped... somewhere!
Take a look at: http://www.nsnam.org/docs/doxygen/classns3_1_1_point_to_point_net_device.html
and scroll down until you spot the list of trace sources implemented.
I'd use MacTxDrop.
However, since you're monitoring losses at layer 2, you have to make
sure somehow that the dropped packets you trace are indeed using UDP.

My 2¢,
Chris

Andrea Ranieri

unread,
Apr 4, 2011, 4:55:50 AM4/4/11
to ns-3-...@googlegroups.com
I'm sorry, I didn't fully understand your problem, but if you need to
see packet drops inside nodes you should do a Config::Connect such as

Config::Connect
("/NodeList/2/DeviceList/*/$ns3::PointToPointNetDevice/TxQueue/Drop",
MakeCallback(&TxDrop));

and then declare

static void TxDrop(std::string path, Ptr<const Packet> packet)
{
// print something, the packet for example
packet->Print(std::cout);
}

This trace source for packet drops is defined in node/queue.cc, so it
should be usable on almost any type of link. Hope this helps.

Regards
Andrea

> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> 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.
>
>

Reply all
Reply to author
Forward
0 new messages