1

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?

  • What's the multicast application? – bodgit Aug 11 '16 at 9:07
  • It's a C++ application, compiled and linked on the same machine that it is running. I've tried also with a Java application, and I got the same behaviour. – Yorchus Aug 11 '16 at 9:11
  • I suspected that. I'd say you'll have better luck posting on StackOverflow and showing your code. Are you setting the IP_MULTICAST_IF socket option? – bodgit Aug 11 '16 at 9:20
  • I posted this on StackOverflow and got a comment saying that I would flag it to ask a moderator to move it here. I flagged it and nobody moved that, so I deleted the Q on StackOverflow. And yes, I tried the IP_MULTICAST_IF socket option. – Yorchus Aug 11 '16 at 9:35
  • Have you set all the appropriate mcast forwarding variables in /etc/sysctl.conf. Specific OS distro and version please. Also you might need to install a multicast routing software on your RHEL host like pimd? – mdpc Aug 11 '16 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.