Re: Broadcast Protocols
Re: Broadcast Protocols
- Subject: Re: Broadcast Protocols
- From: Josh Graessley <email@hidden>
- Date: Fri, 21 Sep 2012 11:52:59 -0700
On Sep 21, 2012, at 11:43 AM, Jens Alfke <email@hidden> wrote:
>
> On Sep 21, 2012, at 11:17 AM, Gordon Apple <email@hidden> wrote:
>
>> What I would like is a means to broadcast, either over a network or especially over a WiFi channel, a single stream (possibly UDP) which can be (optionally) received by anyone on the LAN or within WiFi range. Unfortunately, this does not fit the usual individual connection/socket based architecture of modern networking. The application is primarily for the distribution of video and other signals, sent to everyone in a classroom or auditorium for reception on a lapTop, iPad, whatever. My limited understanding of “multicast” is that this is a router function, where a single stream is replicated to each receiver. This does not work for WiFi due to spectrum capacity limitations.
>
> What you want is called “link-local multicast”. There is a range of IP addresses reserved for IP multicast, and of that range there is a subrange that are declared link-local; that is, packets sent to these will never be forwarded by a router, so they are delivered only to the LAN.
>
> Bonjour’s multicast-DNS protocol uses this.
>
> The caveats are that
> (a) The address range for this is limited, so you have to get an address assigned by the IANA. Don’t just pick one at random and deploy with it.
> (b) Too much traffic will congest the LAN, especially over WiFi, especially for clients that are listening on that address. Depending on your protocol, you may have to put some work into optimizing it to reduce the frequency at which packets are sent.
>
>> I have considered two possibilities. One is a UDP-type delivery system (for large venues), another, a TCP-type one-way stream with individual ack connections (smaller venue). I realize that doing this might require some low-level programming.
>
> IP multicast is a UDP-level protocol, so it works with individual packets. Sending payloads larger than about 1500 bytes is harder. Doing streams is a _lot_ harder.
>
> My understanding is that a lot of video broadcast protocols like RTP are based on UDP anyway, because latency and throughput are more important than reliable delivery of every single packet. But my knowledge of the details is near zero.
Also be aware that broadcast/multicast on WiFi is very expensive. At the link layer, WiFi performs acknowledgement and retransmission of unicast packets. For multicast, the multicast packets are sent at a much lower data rate in hopes that they'll be more likely to make it through. Many times you can send 10+ unicast packets in the same time it takes to send a single multicast/broadcast packet.
-josh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden