Why isn't my Linux box forwarding multicast packets?

From: Wei (wengwei_at_gmail.com)
Date: 05/25/05


Date: 25 May 2005 13:09:18 -0700

My setup is as follows:

A ---------> B ---------> C
        eth0 eth1

A: 192.168.1.224
B eth0: 192.168.1.219 eth1: 192.168.1.711
C: 192.168.7.111

A and B are both out-of-box redhat 9 machine. C is windows 2000. The
traffic flows as the arrow's direction. The B is the multicast router
and I want multicast packets coming out from A to be forwarded from
SubnetAB to Subnet BC.

I enabled packet forwarding on B (echo 1 > /proc.../ip_forward) and it
worked I can ping C from A. I also added a route for 224.0.0.1 on B
(route add -net 224.0.0.0/4 netmask 240.0.0.0 dev eth0), and I am
really only interested in uni-directional multicast forwarding.

I compiled mrouted and started it with everything set as default.

./mrouted -d

Afterwards, I can see the multicast packets coming in from eth0, but
they never were forwarded to eth1.

tcpdump output on B:

B:>tcpdump -i eth1 ip multicast

15:27:03.145280 192.168.7.111 > 239.7.7.8: igmp v2 report 239.7.7.8
[ttl 1]
15:27:04.422349 192.168.7.211 > dvmrp.mcast.net: igmp v2 report
dvmrp.mcast.net (DF) [ttl 1]
15:27:04.512361 192.168.7.211 > all-routers.mcast.net: igmp v2 report
all-routers.mcast.net (DF) [ttl 1]
15:27:07.040699 192.168.7.211 > dvmrp.mcast.net: igmp dvmrp Probe [tos
0xc0] [ttl 1]
15:27:11.155794 192.168.7.111 > 224.224.1.100: igmp v2 report
224.224.1.100 [ttl 1]

As you can see here, C was trying to join the 224.224.1.100 multicast
group.

B:>tcpdump -i eth0 ip multicast

15:33:52.230373 192.168.1.224.8100 > 224.224.1.100.8100: udp 188 (DF)
[ttl 1]
15:33:52.230380 192.168.1.224.8100 > 224.224.1.100.8100: udp 188 (DF)
[ttl 1]
15:33:52.230385 192.168.1.224.8100 > 224.224.1.100.8100: udp 188 (DF)
[ttl 1]
15:33:52.230390 192.168.1.224.8100 > 224.224.1.100.8100: udp 132 (DF)
[ttl 1]
15:33:52.230394 192.168.1.224.8100 > 224.224.1.100.8100: udp 8 (DF)
[ttl 1]

As you can see here, the UDP multicast packet traffic is going very
well on eth0.

The kernel is a vanilla 2.4.20-31.9 i686 kernel. The likely multicast
routing related options had all been compiled in.

CONFIG_IP_MROUTE=y
CONFIG_IP_MULTICAST=y

What am I missing? This had been puzzling me for the past few days. Any
help would be appreciated! Thanks!

Wei



Relevant Pages

  • Problem receiving multicast packets
    ... I've got a strange problem receiving multicast packets in a C# ... I create a socket, call bind, set the multicast socket option and then fire off a thread that calls "receiveFrom" in a loop. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Multicast Forwarding
    ... multicast packets as long as at least two machines join a multicast ... > Both Wireless router A and Wireless router B runs FreeBSD. ... I think that mrouted will only forward multicast packets that it knows ... Bluescreen leads to downtime. ...
    (freebsd-questions)
  • 2.4.22 multicast address problem, pcap workaround
    ... My source machine sends multicast packets on all the following ... If I kill tcpdump, my program stops receiving. ...
    (Linux-Kernel)
  • Re: Forwarding multicast packets in Linux, for different subnets.
    ... > The Linux box does not seem to forward multicast packets. ... Interface BytesIn PktsIn BytesOut PktsOut Flags Local Remote ... guacamole:/home/alex# ip mroute show ...
    (comp.os.linux.networking)
  • Re: Howto enable multicast forwarding on Linux
    ... > I'm attempting to enable multicast forwarding on Linux. ... > machines continously sending multicast packets on the network. ... IIRC your Linux box needs to act as a multicast router -- multicast ...
    (comp.os.linux.networking)