[Winpcap-users] Occasional packet loss?
simonskj05 at yahoo.com
Mon Jul 16 13:11:51 PDT 2012
Wrong again. Tutorial 9. See link.
Sorry for the number of emails.
From: Kyle Simons <simonskj05 at yahoo.com>
To: "Black, Michael (IS)" <Michael.Black2 at ngc.com>; "winpcap-users at winpcap.org" <winpcap-users at winpcap.org>
Sent: Monday, July 16, 2012 3:05 PM
Subject: Re: [Winpcap-users] Occasional packet loss?
Sorry, here is the site for tutorial 7 I was referring to. And I was incorrect with that. It is actually tutorial 6. I got the “tutorial
6” from the link name.
I also added
1. As a global
2. And to the packet handler callback,
// Total Packets
TotalPackets = TotalPackets +
For data generation, you can use the “winpcap/Examples/PacketDriver/TestPacketSend”
project in the example source code as is.
From: "Black, Michael (IS)" <Michael.Black2 at ngc.com>
To: Kyle Simons <simonskj05 at yahoo.com>; "winpcap-users at winpcap.org" <winpcap-users at winpcap.org>
Sent: Monday, July 16, 2012 2:50 PM
Subject: RE:[Winpcap-users] Occasional packet loss?
What is "tutorial 6" ???
Would you care to share your code so we can see what you're doing?
Michael D. Black
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: winpcap-users-bounces at winpcap.org [winpcap-users-bounces at winpcap.org] on behalf of Kyle Simons [simonskj05 at yahoo.com]
Sent: Monday, July 16, 2012 1:32 PM
To: winpcap-users at winpcap.org
Subject: EXT :[Winpcap-users] Occasional packet loss?
Hello everyone. I am hoping someone may be able to offer some ideas or suggestions. Basically, I am seeing some occasional packet loss on the RX side of the NIC and wanted to address it. Typically, I see the NIC not being able to detect one packet out of 8,000,000 on average. Maybe this is normal with PC HW/SW limitations????
The packets I send are the same packet over and over (identical). Let me do my best explaining what I am seeing and the things I have tried so far.
I implemented the packet counters in a few ways. I see the issue all 3 ways.
1. 1. Using the code from tutorial 6 with no filter
2. 2. Using the code from tutorial 6 with a filter
3. 3. Using pcap_stats function.
I like methods 1 and 2 above because I see what the data rate is. Also allows me to filter.
I am generating traffic in multiple ways. All three experience the issue.
1. 1. Having the NIC generate traffic and using SmartBits to receive it. Also I am using the above RX methods to detect packets being sent out.
2. 2. Routing cable from one NIC to another in the same PC. So, one NIC sends data out and the other captures (counts) it.
3. 3. Using Data Generator Equipment like SmartBits to generate and the PC recieves
I have connected an Analyzer (SmartBits) to the NIC on method 1 above and I can see the data generation from the PC is always correct. The number of packets being sent out (what I am telling it to send) makes it to the SmartBits. Except I see the occasional packet loss on the NIC (outbound). So, I would think/expect the wpcap software should detect the number of outgoing packets correctly all the time??
On method 2, if I run the analyzer (stats) on both NIC’s, they will mismatch as well. For example, the second NIC (receiver) counts the right number of packets being sent from the first NIC. But the first NIC misses one. And vice versa too.
In the method 1 above, I tried both the buffer send method and using the nwrite method. Same results.
I have tried to slow down the traffic. Say 400Mb/s vs 960Mb/s on a 1G NIC. Slowing it down helps slightly, but does not fix it.
If I change the timeout in the open command from 250 to 2000, not much changes. If I change it to 5000, it helps. Of course, it is slower to report. This is true for tutorial 6 code. I am not sure about pcap_stats. I still need to try it.
I tried the snaplen in the open command from 100 to 65000. I still see the issue.
I tried setting the buffer (pcap_setbuff) from 1,000,000 to 4,000,000 to 6,000,000. Still see the issue.
I have tried numerous NICs (5 different ones).
I have tried two different machines. One is a Intel I7 3820 (Quad Core) and the other is slower Intel Core 2 6700 (2.67MHZ) 2 GB RAM (Dual Core). They both behave the same.
I used a 10Gig NIC and similar results. It is easier to see the loss because I can send more packets quicker. Versus on a 1G, it may take 2-3 minutes before I see it.
I tried modifying the PC buffers using a tool called “TCPOptimizer”. Maybe it slightly helps.
I created numerous programs: One in C++, one in C#, one using threads, etc. and the issue is still there.
I think that’s it so far with my ideas. J Anyone have any suggestions? I know it is only 1 packet every few minutes but 1 packet loss is a big deal for testing too.
Winpcap-users mailing list
Winpcap-users at winpcap.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Winpcap-users