Howdy folks, I'm having some problems with multicast packets mysteriously
getting dropped. First, here's my configuration:
--------------------------------------------------------------------------------
[root@di16822868 news]# /sbin/ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:565268 errors:0 dropped:0 overruns:0
TX packets:565268 errors:0 dropped:0 overruns:0
eth0 Link encap:Ethernet HWaddr 00:20:AF:6A:09:1E
inet addr:207.168.228.68 Bcast:207.168.228.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:854731 errors:0 dropped:0 overruns:0
TX packets:301207 errors:0 dropped:0 overruns:0
Interrupt:3 Base address:0x300
eth0:0 Link encap:Ethernet HWaddr 00:20:AF:6A:09:1E
inet addr:224.168.228.1 Bcast:224.168.228.255 Mask:255.255.255.0
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0
TX packets:0 errors:0 dropped:0 overruns:0
[root@di16822868 news]# uname -a
Linux di16822868.directint.net 2.0.34 #1 Fri May 8 16:05:57 EDT 1998 i686 unknown
--------------------------------------------------------------------------------
First, I run tcpdump on the host to read UDP packets (see below "HOST B, WINDOW
1"). Second, I run (and strace) netcat listening to the same UDP port (see
"HOST B, WINDOW 2"). Third, on another host on the same LAN I run netcat
pointed to the multicast address configured for HOST A's eth0:0, and type in a
few words to STDIN. Each word gets packetized and sent out to the multicast
address.
Notice that tcpdump (see "HOST B, WINDOW 1") caught each of the packets. But
netcat did not (see "HOST B, WINDOW 2"). Netcat caught only the *first* packet
(then I hit Ctrl-C). You can see the strace below in "HOST B, FILE
"ncstrace"".
Is this a bug in netcat, or in the Linux networking stack?
HOST A:
--------------------------------------------------------------------------------
[root@shave news]# nc 224.168.228.1 8119 -u -p 39118
one
two
three
punt!
[root@shave news]#
--------------------------------------------------------------------------------
HOST B, WINDOW 1:
--------------------------------------------------------------------------------
[root@di16822868 news]# /usr/sbin/tcpdump -i eth0 "udp port 8119"
tcpdump: listening on eth0
11:48:38.254809 shave.directint.net.39118 > 224.168.228.1.8119: udp 4 [ttl 1]
11:48:39.094809 shave.directint.net.39118 > 224.168.228.1.8119: udp 4 [ttl 1]
11:48:39.944809 shave.directint.net.39118 > 224.168.228.1.8119: udp 6 [ttl 1]
3 packets received by filter
0 packets dropped by kernel
[root@di16822868 news]#
--------------------------------------------------------------------------------
HOST B, WINDOW 2:
--------------------------------------------------------------------------------
[root@di16822868 news]# strace -oncstrace nc -l -u -p 8119 < /dev/null
one
punt!
[root@di16822868 news]#
--------------------------------------------------------------------------------
HOST B, FILE "ncstrace":
--------------------------------------------------------------------------------
execve("/usr/bin/nc", ["nc", "-l", "-u", "-p", "8119"], [/* 18 vars */]) = 0
brk(0) = 0x804caf0
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 4
fstat(4, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 18903, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4000b000
close(4) = 0
open("/lib/libc.so.6", O_RDONLY) = 4
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40010000
munmap(0x40010000, 4096) = 0
mmap(0, 669752, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40010000
mprotect(0x400a1000, 75832, PROT_NONE) = 0
mmap(0x400a1000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x90000) =
0x400a1000
mmap(0x400a8000, 47160, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1,
0) = 0x400a8000
close(4) = 0
personality(0 /* PER_??? */) = 0
getpid() = 7970
gettimeofday({909776909, 777820}, NULL) = 0
getpid() = 7970
brk(0) = 0x804caf0
brk(0x804cb70) = 0x804cb70
brk(0x804d000) = 0x804d000
open("/etc/resolv.conf", O_RDONLY) = 4
fstat(4, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400b4000
read(4, "search directint.net \nnameserve"..., 4096) = 47
read(4, "", 4096) = 0
close(4) = 0
munmap(0x400b4000, 4096) = 0
brk(0x8050000) = 0x8050000
brk(0x8053000) = 0x8053000
sigaction(SIGINT, {0x8049060, [],
SA_STACK|SA_RESTART|SA_INTERRUPT|SA_ONESHOT|0x7fffc78}, {SIG_DFL}) = 0
sigaction(SIGQUIT, {0x8049060, [], SA_NOMASK|SA_NOCLDSTOP|0x1bf98}, {SIG_DFL}) = 0
sigaction(SIGTERM, {0x8049060, [],
SA_STACK|SA_RESTART|SA_INTERRUPT|SA_ONESHOT|0x7fffca4}, {SIG_DFL}) = 0
sigaction(SIGURG, {SIG_IGN}, {SIG_DFL}) = 0
sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 4
fstat(4, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400b4000
read(4, "#\n# /etc/nsswitch.conf\n#\n# An"..., 4096) = 1208
read(4, "", 4096) = 0
close(4) = 0
munmap(0x400b4000, 4096) = 0
open("/lib/libnss_nisplus.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnss_nisplus.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libnss_files.so.1", O_RDONLY) = 4
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x400b4000
munmap(0x400b4000, 4096) = 0
mmap(0, 31936, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x400b4000
mprotect(0x400bb000, 3264, PROT_NONE) = 0
mmap(0x400bb000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x6000) =
0x400bb000
close(4) = 0
open("/etc/services", O_RDONLY) = 4
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fstat(4, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400bc000
read(4, "#\n# services\tThis file describ"..., 4096) = 4096
read(4, "h Kerberos\ningreslock 1524"..., 4096) = 438
read(4, "", 4096) = 0
close(4) = 0
munmap(0x400bc000, 4096) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(4, {sin_family=AF_INET, sin_port=htons(8119), sin_addr=inet_addr("0.0.0.0")}, 16)
= 0
sigaction(SIGALRM, {SIG_IGN}, {SIG_DFL}) = 0
alarm(0) = 0
recvfrom(4, "one\n", 8192, MSG_PEEK, {sin_family=AF_INET, sin_port=htons(39118),
sin_addr=inet_addr("207.168.228.62")}, [16]) = 4
sigaction(SIGALRM, {SIG_IGN}, {SIG_IGN}) = 0
alarm(0) = 0
connect(4, {sin_family=AF_INET, sin_port=htons(39118),
sin_addr=inet_addr("207.168.228.62")}, 16) = 0
getsockname(4, {sin_family=AF_INET, sin_port=htons(8119),
sin_addr=inet_addr("207.168.228.68")}, [16]) = 0
select(16, [0 4], NULL, NULL, NULL) = 2 (in [0 4])
read(4, "one\n", 8192) = 4
read(0, "", 8192) = 0
close(0) = 0
write(1, "one\n", 4) = 4
select(16, [4], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted)
--- SIGINT (Interrupt) ---
write(2, " punt!", 6) = 6
write(2, "\n", 1) = 1
close(4) = 0
nanosleep(0xbffffba8, 0xbffffba8, 0x400a6b4c, 0xbffffc38, 0xbffffd2c) = 0
_exit(1) = ?
--------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]