1

I am generating UDP packets on a 100 multicast groups on one VM Ubuntu 16.04 machine and subscribe to those groups on the other VM Ubuntu 16.04 machine. Both are on a HP server run by Hyper-V manager. The problem is that my application only receives 2 out of 100 groups. However, when Wireshark is capturing, the application starts receiving all messages.

I found several other similar questions like this one, where it explains that because Wireshark is running in promiscuous mode, it allows all packets to get through (through what?), and this explains why my application starts "seeing" them too. Thus, changing the Ethernet interface configuration to promiscuous mode allows the application to receive all the messages without running the Wireshark.

But what is the problem with the other packets that are not normally received? I tried to cross-verify the hex-dump of the "good" and "bad" messages and they don't seem to be different. The check sums for on the IP and UDP levels are correct. What else could be the problem?

  • Multicast ip range 239.1.4.1-100
  • Destination port 50003
  • Source port range ~33000 - 60900
  • firewall is disabled

EDIT:

It looks like when the application is subscribed to only 8 multicast groups, it works fine, however, if subscribed to more than 8, it receives only 2 (if they end on .7 or .8) or none, as described above. So, I would assume that the packets are correct. Could the problem be in the network settings? Or the application itself - need to find the bug in the script I did not write.

EDIT2:

I installed the ISO image on the other machine (Virtual box instead of HP Windows Server) and it works as it should. Thus, I assume my application works fine and all the ubuntu OS configurations are correct. Now I put all the blame on the Virtual Manager/settings. Any ideas?

Nazar
  • 820
  • 5
  • 13
  • 36

1 Answers1

1

It sounds as if you didn't tell the kernel about them.

See http://tldp.org/HOWTO/Multicast-HOWTO-6.html

You have to use setsockopt with IP_ADD_MEMBERSHIP. And be sure to use the correct values for your local interfaces.

Zan Lynx
  • 53,022
  • 10
  • 79
  • 131
  • Yes, I had it in the socket options. There's got to be something else. Just updated my question. – Nazar Aug 14 '17 at 19:07
  • @Naz: Maybe this? https://serverfault.com/questions/248094/igmp-membership-under-linux-igmp-max-memberships – Zan Lynx Aug 14 '17 at 19:52
  • netstat lists all the IP groups that it's subscribed to, and some other... – Nazar Aug 14 '17 at 20:40
  • Zan, the max_memberships is way over a 100. I also ran the sender and the receiver on the same machine and it works just fine. So, it has something to do with the network settings/configurations? – Nazar Aug 15 '17 at 13:51
  • @Naz: If it gets them in promiscuous mode and not otherwise, that means the kernel is filtering them out and not delivering them to the applications. What setting that is, other than the ones I mentioned, I don't know. – Zan Lynx Aug 15 '17 at 16:32