WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: No multicast receive (no IGMP Report messages going out)  (Read 14906 times)

Offline ToasterKing

  • Newbie
  • *
  • Posts: 14
No multicast receive (no IGMP Report messages going out)
« on: March 02, 2011, 04:24:09 PM »
I've got a multicast client that I'm trying to get working on Tiny Core.

Everything was working brilliantly between two machines on  a dumb switch, but as soon as I connected everything to the Cisco switches we actually use on a day to day basis I was no longer able to receive multicast traffic.

After quite a bit of head scratching I realized that Tiny Core isn't sending out an IGMP Membership Report for any of the multicast groups that clients are listening to.  Normal protocol would be to volunteer an IGMP Report message when the first local client joins a multicast group, then send one again everytime an IGMP Query message is received.

I confirmed using Wireshark that Tiny Core doesn't send the messages in either case.

If I turn off IGMP snooping at the switch and statically add a multicast route on that interface at the router, the client starts receiving the multicast traffic so I'm pretty sure the only thing missing is the IGMP report message.  Problem is, I can make those network changes temporarily in my lab but not on a customer network.

Any thoughts about turning IGMP back on?  Hopefully it can be done without a remaster?

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: No multicast receive (no IGMP Report messages going out)
« Reply #1 on: March 03, 2011, 01:13:28 AM »
I apologize if my questions are a bit basic, but although my knowledge is limited I am interested in why it doesn't work. I presume you have already done the basic configuration?

ifconfig eth0 multicast
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

Do you have some sample output from "tcpdump igmp" during your tests? What is the simplest test which can reproduce your problem? I installed Avahi, which joins multicast group 224.0.0.251:

# cat /proc/net/dev_mcast
3    eth0            1     0     01005e0000fb
# echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
# ping 224.0.0.251
PING 224.0.0.251 (224.0.0.251): 56 data bytes
64 bytes from 192.168.0.6: seq=0 ttl=64 time=0.126 ms

My tcpdump log did not indicate any IGMP packets were sent:

tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 68 bytes
05:04:18.805247 IP (tos 0x0, ttl 1, id 0, offset 0, flags [none], proto IGMP (2), length 36, options (RA)) 10.0.0.0 > ALL-SYSTEMS.MCAST.NET: igmp query v3 [max resp time 1s]

I also tried Example 1: Multicast client and servers, but tcpdump did not display any results with socat either.

After all of this, I checked the config-2.6.33.3-tinycore, and found:

# CONFIG_IP_MULTICAST is not set

Perhaps someone with more knowledge can determine if this is an issue?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: No multicast receive (no IGMP Report messages going out)
« Reply #2 on: March 03, 2011, 02:11:56 AM »
Did you try it with othe LINUX distros? Does it happen with TC only?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: No multicast receive (no IGMP Report messages going out)
« Reply #3 on: March 03, 2011, 03:06:25 AM »
Quote
After all of this, I checked the config-2.6.33.3-tinycore, and found:

# CONFIG_IP_MULTICAST is not set

Perhaps someone with more knowledge can determine if this is an issue?

Yes. Noted for the next build.
The only barriers that can stop you are the ones you create yourself.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: No multicast receive (no IGMP Report messages going out)
« Reply #4 on: March 03, 2011, 10:49:16 AM »
Did you try it with othe LINUX distros? Does it happen with TC only?

Yes. It works as expected on CentOS 5, for example.

Offline ToasterKing

  • Newbie
  • *
  • Posts: 14
Re: No multicast receive (no IGMP Report messages going out)
« Reply #5 on: March 03, 2011, 02:52:13 PM »
Glad to hear it was just a compile option and even happier to hear that the compile option will change with the next build.


danielibarnes,

Your experiences pretty much match my own.  After I posted the question, I also discovered that CONFIG_IP_MULTICAST was commented out, but mistakenly assumed I was misinterpreting what I was seeing since ifconfig indicates eth0 is configured for multicast and multicast traffic is received when everything is in the same subnet connected by an unmanaged switch.

I tried this on 7 or 8 other distributions that I had easy access to, and all except Tiny Core provided IGMP messaging when groups were joined.

If Tiny Core was behaving the same as the other distributions, you would have seen an IGMP Report message go out (probably multiple times) immediately on firing up a process that joined a multicast group.  Eventually you would have seen the IGMP Query message come in from the router (which you show in your tcpdump) and within a few seconds (there is a random fallback to prevent all machines from answering at once) you should see the client send IGMP Report messages for all of the multicast groups any process is currently joined to.  Actually, the number reported seems to cap out at 1022 even after the Max Memberships has been adjusted upwards but I haven't determined the reason for that yet.

I have fairly minimal test code I could provide, but it's a bit longer than I want to paste in as a message.  Is there an accepted way of attaching files that I'm just not seeing?

Also, just as an aside, in my experience the 'route add ...' that is documented on a lot of websites only needs to be done if you want the box to act as a multicast router, not if you intend to use it as an endpoint.
« Last Edit: March 03, 2011, 02:56:20 PM by ToasterKing »

Offline ToasterKing

  • Newbie
  • *
  • Posts: 14
Re: No multicast receive (no IGMP Report messages going out)
« Reply #6 on: March 03, 2011, 03:01:17 PM »
One other quick question,  I haven't been involved with Tiny Core all that long but my impression is that the release schedule is driven more by "when we have something worth putting out" than anything else.

Any thoughts when the next build might occur?  I'm happy to figure out how to build myself, but if the next build will be soon anyway....

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: No multicast receive (no IGMP Report messages going out)
« Reply #7 on: March 03, 2011, 03:17:56 PM »
A 4.0 release is not in the near future, so feel free to do a custom kernel build.

If you only enable that option (=Y), it should be enough to replace the bzImage with yours. Saves some trouble when you stay compatible with the current modules.
The only barriers that can stop you are the ones you create yourself.

Offline ToasterKing

  • Newbie
  • *
  • Posts: 14
Re: No multicast receive (no IGMP Report messages going out)
« Reply #8 on: March 04, 2011, 12:23:56 PM »
Thanks for the tip.  I'm tied up with a trade show next week but I'll build the week after and confirm one way or another that this fixes the problem.

Rather than posting the code I was using to reproduce this, I tracked down some sample code that's a little easier to follow and confirmed that it also reproduces the symptoms I'm seeing.

It's the send/receive sample code from chapter 2 of the Makofske/Almeroth book Multicast Sockets: Practical Guide for Programmers  available here:

http://www.nmsl.cs.ucsb.edu/MulticastSocketsBook/

Offline ToasterKing

  • Newbie
  • *
  • Posts: 14
Re: No multicast receive (no IGMP Report messages going out)
« Reply #9 on: March 21, 2011, 11:08:44 AM »
It took me a bit longer to settle in after the trade show than expected, but I rebuilt the kernel last Friday with CONFIG_IP_MULTICAST=Y and just wanted to let anyone interested know that this does fix the IGMP issue and after replacing just bzImage I was able to run over the weekend with no issues (everything I've ever read said to rebuild the modules if you rebuild the kernel, so I was a bit concerned about that).