sleinen / samplicator

Send copies of (UDP) datagrams to multiple receivers, with optional sampling and spoofing
GNU General Public License v2.0
389 stars 132 forks source link

Multicast #33

Open idsteiner opened 8 years ago

idsteiner commented 8 years ago

Hi,-

in a large environment with multiple destinations, it would make sense simplicator to put the flow on multicast streams. i would reduce the processing power and bandwidth. Any thoughts ?

thanks, idsteiner

sleinen commented 8 years ago

Yes, this sounds like a good idea. There are two aspects concerning the samplicator's functionality:

Sending seems more important for the goals you have in mind, but eventually receiving should also be supported, both for symmetry and for the practical purpose of being able to set up distribution trees using multiple samplicator processes, as people are doing now with unicast.

I'm not sure the sending case even needs any code changes. Have you tried asking the samplicator to send to a multicast address?

Spoofing the source address will often not work when redistributing packets to a multicast address, because multicast forwarding usually applies an RPF check. That should perhaps be mentioned in the documentation.

unaig commented 8 years ago

It works. samplicate -p 5000 224.0.0.1/1234

I can hear a sound stream via multicast, but many packets are lost. Unicast works much better than multicast, but I can't send to more than 3 destinations.

It doesn't work: samplicate -p 5000 10.0.13.1/5001 10.0.13.2/5001 10.0.13.3/5001 10.0.13.4/5001 10.0.13.5/5001 10.0.13.6/5001 10.0.13.7/5001 10.0.13.8/5001 10.0.13.9/5001 10.0.13.10/5001 10.0.13.11/5001 10.0.13.12/5001 10.0.13.13/5001 10.0.13.14/5001 10.0.13.15/5001 10.0.13.16/5001 10.0.13.17/5001 10.0.13.18/5001 10.0.13.19/5001 10.0.13.20/5001 10.0.13.21/5001 10.0.13.22/5001 10.0.13.23/5001 10.0.13.24/5001 10.0.13.25/5001

sleinen commented 8 years ago

I can hear a sound stream via multicast, but many packets are lost. Unicast works much better than multicast, but I can't send to more than 3 destinations.

Can you tell me more about your situation? In particular, what kind of network do you have been the samplicator and the receivers?

unaig commented 8 years ago

I have a 2.4GHz wireless network. The router (it is the samplicator) is an APU board http://www.pcengines.ch/apu.htm with 4GB RAM with and Debian system. The receivers are Android/iOS mobiles and Linux based laptops.