I have a receive callback setup on my single sink node to record
whenever a packet is received from other nodes in the simulation.
The callback does get and report some packets that are received, but
nowhere near as many received UDP packets that I see in the trace file
or the pcap file for the sink node. As an example, for the duration
of my simulation run, I see the trace and pcap file record ~8500 UDP
packets received by the sink whereas the receive callback only gets
~1500 packets.
information about that particular simulation run like the number of
nodes, mobility model, etc. so I can easily compare different
simulation runs. When looking at the trace and pcap files, I do not
see a difference between the packets that make it up to the receive
callback and those that do not.
What can cause this discrepancy? What areas can I look at that would
prevent packets from getting up to the receive callback of the Socket?
On Tue, Dec 15, 2009 at 4:46 AM, Kevin Peters <kev...@gmail.com> wrote:
I have a receive callback setup on my single sink node to record
whenever a packet is received from other nodes in the simulation.
The callback does get and report some packets that are received, but
nowhere near as many received UDP packets that I see in the trace file
or the pcap file for the sink node. As an example, for the duration
of my simulation run, I see the trace and pcap file record ~8500 UDP
packets received by the sink whereas the receive callback only gets
~1500 packets.
I suspect that your mention below of mobility models means that you are using the wifi MAC/PHY models.
If so, the wifi trace hooks record all packets going on the medium and this includes data packet retransmissions with duplicates being supressed at the wifi MAC reception layer to avoid forwarding them to the ip layer.
Depending on your configuration, it could also include all control messages (i.e., wifi MAC-level ACKs).
MathieuI want to rely on the receive callback because I record other
information about that particular simulation run like the number of
nodes, mobility model, etc. so I can easily compare different
simulation runs. When looking at the trace and pcap files, I do not
see a difference between the packets that make it up to the receive
callback and those that do not.
What can cause this discrepancy? What areas can I look at that would
prevent packets from getting up to the receive callback of the Socket?
--
Mathieu Lacage <mathieu...@gmail.com>
--
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.
If so, the wifi trace hooks record all packets going on the medium and this includes data packet retransmissions with duplicates being supressed at the wifi MAC reception layer to avoid forwarding them to the ip layer.Is there a trace besides the default Phy/State/RxOk and Phy/State/Tx traces that YansWifiPhyHelper sets up that would show packets actually passed up to the IP layer? MacRxDrop doesn't seem to be for dropping duplicates.
On Thu, Dec 17, 2009 at 2:17 AM, Mathieu Lacage <mathieu...@gmail.com> wrote:
On Tue, Dec 15, 2009 at 6:03 PM, Kevin Peters <kev...@gmail.com> wrote:
If so, the wifi trace hooks record all packets going on the medium and this includes data packet retransmissions with duplicates being supressed at the wifi MAC reception layer to avoid forwarding them to the ip layer.Is there a trace besides the default Phy/State/RxOk and Phy/State/Tx traces that YansWifiPhyHelper sets up that would show packets actually passed up to the IP layer? MacRxDrop doesn't seem to be for dropping duplicates.
The PHY layer obviously does not know which packets will be dropped during duplicate detection at the MAC layer but the MAC layer should give you only the packets forwarded to the upper layer with the Mac/MacRx trace source. See wifi/wifi-mac.h/cc
If the above does not work, I am out of ideas: you could try to post your example script or the pcap trace you generate.
My main motivation for looking into this is I cannot figure out why the PDR is so poor for my simulations.
I am working on a GPS based routing protocol for high speed aeronautical networks. Basically, the simulation is of 60 nodes moving up to 1200 m/s in a 150km squared area. They are all sending data at a constant rate to a non-mobile sink that is right in the middle of the map. The nodes have a 27800m transmission range based on setting the transmission power to 94. I came up with this transmission power with a simple non-mobile two node scenario where the nodes were able to communicate with a transmission power of 94, 1000 byte packet, wifib-11mbs, and LogDistancePropagationLossModel.Based on randomly placing 60 nodes in the 150km map with a 27800 transmission range, I would expect the network to be connected for the most part. However, the PDR is almost 0% when the nodes are non-mobile.To keep things simple and my custom routing out of the picture, I see similiar poor PDR with OLSR that I see with my GPS routing protocol. The attached script illustrates this and generates the data in the attached spreadsheet. The graph I made in the spreadsheet from this data shows packets delivered per second to the sink for OLSR for both non-mobile and random waypoint mobility when the sending rate of the nodes is 1 packet/s. You can see that with the non-mobile scenario, almost no packets are delivered. For the mobile scenario, the peak packets/s is 4. At 100% PDR, I would expect to see 60 nodes * 1 packet/s = 60 packets/s. AND this is with a slow 1 packet/s sending rate (aggregate of 8kbs*60nodes = ~.5Mbs).I cannot figure out why the PDR is so poor (especially for non-mobile). I can see from my GPS based routing logging that all of the nodes are getting updated routing beacons from other nodes but not very many of the actual data packets make it to the sink. I use a similar beaconing mechanism as OLSR so I assume the OLSR nodes are also getting updated routing information (OLSR and my GPS routing have similar PDR results as well). The flowmonitor output also shows that the routing beacon flows have very good PDR but the data packet flows do not.
PDR = packet delivery ratio
I am measuring the PDR at the application level via a receive callback on the sink Socket. I also see the same numbers when using FlowMonitor.
There are definitely packets being delivered to the sink but nowhere near as many as there should be. I can see the expected number of packets are getting sent at the routing layer but not very many end up at the next hop or at the Socket receive callback of the sink node.
I will try the Ipv4l3 logging that you suggested.
The low packet delivery seems to rear its ugly head with many nodes sending. Is there a way just to follow one single packet out of 1000s of packets in detailed mode? Its difficult to see what is going on when lots of logging is enabled for all packets.
Thanks,
Kevin
On Dec 18, 2009 7:36 AM, "Mathieu Lacage" <mathieu...@gmail.com> wrote:On Thu, Dec 17, 2009 at 6:39 PM, Kevin Peters <kev...@gmail.com> wrote: > > On Thu, Dec 17, 2009 at ...
PDR = Packet Drop Rate ? How do you measure it ? at the application layer ?
> > I am working on a GPS based routing protocol for high speed aeronautical networks. Basically, ...
It really unclear to me what you are measuring and how but I did run your example program and looked at the generate wifi pcap files as well as looking at the NS_LOG=AdhocWifiMac output. Both appear to show that, indeed, data packets are being forwarded up the stack to ipv4 from the MAC layer so, if you are measuring your reception rate at a higher level layer, then, they are getting lost somewhere in-between.
NS_LOG=Ipv4L3Protocol might help you a bit. Maybe you just need to put a breakpoint in the Ipv4L3Protocol::Receive method and look at what is happening to your packets with a debugger.
Mathieu
--Mathieu Lacage <mathieu...@gmail.com>
-- You received this message because you are subscribed to the Google Groups "ns-3-users" group. T...
PDR = packet delivery ratio
I am measuring the PDR at the application level via a receive callback on the sink Socket. I also see the same numbers when using FlowMonitor.
There are definitely packets being delivered to the sink but nowhere near as many as there should be. I can see the expected number of packets are getting sent at the routing layer but not very many end up at the next hop or at the Socket receive callback of the sink node.
I will try the Ipv4l3 logging that you suggested.
The low packet delivery seems to rear its ugly head with many nodes sending. Is there a way just to follow one single packet out of 1000s of packets in detailed mode? Its difficult to see what is going on when lots of logging is enabled for all packets.
On Fri, Dec 18, 2009 at 5:47 PM, Kevin Peters <kev...@gmail.com> wrote:PDR = packet delivery ratio
I am measuring the PDR at the application level via a receive callback on the sink Socket. I also see the same numbers when using FlowMonitor.
There are definitely packets being delivered to the sink but nowhere near as many as there should be. I can see the expected number of packets are getting sent at the routing layer but not very many end up at the next hop or at the Socket receive callback of the sink node.
I will try the Ipv4l3 logging that you suggested.
Yes, you need to pick a couple of arbitrary packets to figure out which layers they reach and where they disappear.
The low packet delivery seems to rear its ugly head with many nodes sending. Is there a way just to follow one single packet out of 1000s of packets in detailed mode? Its difficult to see what is going on when lots of logging is enabled for all packets.
Print the packet uid and grep for it ? I don't believe that the default Packet::Print method outputs it.But with fragmentation and Packet::Copy the UID becomes unreliable. It is probably safer to follow via the "identifier" in the IPv4 header.