Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UDP Broadcast or IP Multicast?

If you had to implement a network broadcast, would you use UDP broadcast or IP multicast in a new application? Why?

What are the benefits and drawbacks you encountered with either method? (Especially concerning problems with VPNs, different subnets, various routers etc.)

like image 215
Thorsten79 Avatar asked Dec 28 '08 22:12

Thorsten79


1 Answers

Multicast has the drawback that it is not well supported by routers and NAT. If all of your clients are on the same network with only simple bridges, multicast works great and avoids the overhead of broadcast addressing for machines that are not part of the group. If the routers support IGMP and properly propagate the TTL it can work on local networks. There have been attempts to do multicast across the Internet, such as Mbone, with various levels of success. Most of them use some sort of tunnel to get around bridges and non-compliant routers.

One caveat for multicast packets, however, is if there are any WiFi connections the access point will use the slowest possible bit rate for the multicast packets and requires acks from all clients, even those who are not part of the multicast group. There are also drawbacks for non-participating clients and battery life.

like image 86
Hudson Avatar answered Sep 24 '22 18:09

Hudson