Machine receives multicast but not the application.
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Machine receives multicast but not the application.
I have a simple C++ application running on Redhat 5.3 which reads multicast packets on a configured group address and interface. On another machine I have a simple application which broadcast multicast to the same group as the listener. For some reason the receiver application never receives the packets. If I run the listener app on the sender machine and the sender app on the receiver machine, everything works fine, so I think this confirms the applications themselves are not the source of my problem.
On the receiver machine, if I listen with tcpdump, it detects the packets sent from the sender. So I believe this confirms the network itself is not the source of the problem.
So it seems there is something in the network configuration of the receiver machine which filters the packets and prevents them from reaching the application layer.
I noticed a few similar posts to this group which mentioned the rp_filter setting. I disabled this, but still no packets.
Any help is greatly appreciated.
You may try the following,
set the local address of your multicast listener application as the multicast address instead of system ip. bind with port 5353. and finally set allmulti in ethernet, if you still done receive the packets.
Machine receives multicast but not the application
I'm not sure I understand everything you're saying and I'm not sure what you're trying to achieve here.
What I understand is that you want me to try and use the multicast group address as the machine interface IP. So, this means I should try to listen on the multicast group address (using port 5353, rather than my port) as well as use that multicast group address as the interface IP? I didn't expect this to work, but tried anyway. The experiment confirmed my expectation. The listener application fails. As shown in the code snippet below, the call to setsockopt fails with the error: "No such device". This makes complete sense as there is no interface device having the multicast group address.
If you are using the port other than 5353, for receiving, better to use the port.
Please check the following from command line,
# ifconfig eth0
The output must contains MULTICAST word; you may try the following from comand line,
# ifconfig eth0 allmulti
The above one will enable your network device to receive all multicast packets. You can disable the above using -allmulti option.
[Hope, the interface is eth0]
After that, run your code. If setsockopt() fails, you cant receive multicast packet.
I wanted to mean, in the listen programme, use multicast address in the bind(). At least, I solved my problem in such a way.
Machine receives multicast but not the application
I solved this. Ran system-config-securitylevel and found that the RH firewall was running. system-config-securitylevel also allowed me to simply disabled it. Now everything works fine.
I previously thought that the firewall was not running, but was obviously mistaken.
Thanks for your help, much appreciated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.