tcpdump mailing list archives

Multicast packet loss problem


From: Ahmed Kadwa <akadwa () grintek com>
Date: Wed, 07 Nov 2007 14:50:57 +0200

Hi,
                
        I have a peculiar problem which I hope someone can shed some
light on. 
        I have the following setup:
        Linux box running 2.6.8.1 kernel + my own multicast listener
program
        waiting for packets.
        I encounter packet loss in the order of about 10 packets per
1000
        messages sent. (Remote node sending 1000 byte packets at every
100ms).
                
        However, when I run TCPDUMP 3.9.8 on the listener box as well, I
get no
        packet loss. This is repeatable. 
        
        running tcpdump on module that is sink for mcast packets seems
to cause
        no loss of packets.
        {
         tcpdump  dst host 231.10.11.1 
         tcpdump: verbose output suppressed, use -v or -vv for full
protocol
        decode
         listening on eth0, link-type EN10MB (Ethernet), capture size 68
bytes
         20:16:08.417072 IP p0e0.localdomain > 231.10.11.1: igmp v2
report
        231.10.11.1
         20:16:08.500188 IP 192.168.57.11.12441 > 231.10.11.1.12441:
UDP, length
        1112
        //For 200 packets sent:
         202 packets captured
         202 packets received by filter
         0 packets dropped by kernel
        }
        
        running tcpdump -p dst host 231.10.11.1 (promiscuous mode off)
cause 13
        packets lost (987 received by tcpdump)
                
        I have looked at the /proc/net/dev, and the muticast packet
count ties
        up to the number of packets I sent from the remote node, but the
        listener reports packets are lost when tcpdump is not running.
Hence my
        assumption is that the eth driver is reading all the packets,
but a
        higher level kernel process drops some packets when the
processor is
        under load. 
                
        What does tcpdump do that fixes my problem of packets being
lost? i.e
        What do I need to do to my application (setsockopt()? or
otherwise) that
        is being done by tcpdump?
                
        I setup my listener socket as O_NONBLOCK, with SO_RCVBUF set to
512000.
        I then poll the socket with select() to receive data.
        
        I tried to set the promiscuous mode option in my multicast
listener
        program, but I still get packet loss.
                
        Any help would be much appreciated.
                
        Thanks
        
        Kind Regards
        A. Kadwa
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: