I am trying to subscribe to a multicast group from a Red Hat machine with four network interfaces, each one is on a different subnet. It only works if I bind the multicast socket on the network interface on which the gateway matches with the configured default gateway.
My route table (output of "route" command):
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.1.37.0 * 255.255.255.0 U 0 0 0 eth2 10.1.39.0 * 255.255.255.0 U 0 0 0 eth3 10.1.38.0 * 255.255.255.0 U 0 0 0 eth1 10.1.33.0 * 255.255.255.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 1002 0 0 eth3 link-local * 255.255.0.0 U 1003 0 0 eth0 link-local * 255.255.0.0 U 1004 0 0 eth1 link-local * 255.255.0.0 U 1005 0 0 eth2 default 10.1.33.1 0.0.0.0 UG 0 0 0 eth0
Each subnet has a firewall configured as gateway (on each ifcfg-ethX configuration file), in all interfaces it has the *.1 address on that subnet.
Here is my research using Wireshark:
If I bind the socket on eth0, the operating system sends the multicast join packet with the Dst field on the Ethernet layer set to 01:00:5e:02:02:11, a multicast MAC address. The firewall accepts that packet and starts relaying packets for that multicast group.
If I bind the socket on eth2, the operating system sends the multicast join packet with the Dst field on the Ethernet layer set to 84:b8:02:d2:cd:88, the physical MAC address of the firewall. The firewall discards that packet as it does not have a valid multicast MAC address.
If I change the default gateway to 10.1.37.1, then the multicast starts working on eth2 but not in eth0.
Is there any wrong configuration that I have? Is there any way to get different multicast groups working on different network interfaces at the same time?