Pages: [1]   Go Down
Author Topic: UDP Multicast  (Read 1020 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm looking for information on the udp.h library. Will it respond to multicast messages (sent to IP's like 224.0.0.1). I don't want to broad cast, because then I have to get the subnets right on both the PC and the Arduino and with this multicasting system this should not be required.

If I'm correct, it should do so regardless of it's own IP, but will it do so; or can I work around this by setting it's IP to 224.0.01 ?

Anyone any experience with this?


Thomas.
Logged

Dallas, Texas
Offline Offline
Sr. Member
****
Karma: 3
Posts: 267
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Will it respond to multicast messages

By, "respond to", I assume you mean receive. Technically, the answer is likely yes as its just UDP, but its far from that simple. To have proper multicast support you also need to support IGMP. Beyond that, you also likely need to have a multicast router - as otherwise there really isn't a point in simply not broadcasting, which will carry only on the same segment. And given that you specifically mention multiple subnets, that's a clear declaration of the need for an IGMP capable router. But even beyond that, regardless of multicast or not, for reliable operation your subnets must be correct and routable.

You didn't mention which device/driver combination you were using but the ball is back in your court. Does your combination support IGMP? If it does support IGMP, then you need to figure out how to subscribe to your desired multicast group(s) on your receiving end. Beyond that, you then need to have a multicast router.
« Last Edit: July 28, 2011, 02:15:40 am by gerg » Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, actually, thinking about it this indeed makes things way to complex. So I'll have to stick with broadcasting. Thanks for the reply though!
Logged

CA, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

multicast works just fine on a subnet. there is a need for IGMP when routing is involved, but a lot can be done on a single subnet. so, multicast UDP is quite useful.
so, does the ethernet library support UDP send with a multicast address in the destination and can a listener receive said multicast packets is a valid question. does anyone have an answer?
Logged

Dallas, Texas
Offline Offline
Sr. Member
****
Karma: 3
Posts: 267
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

multicast works just fine on a subnet. there is a need for IGMP when routing is involved, but a lot can be done on a single subnet. so, multicast UDP is quite useful.
so, does the ethernet library support UDP send with a multicast address in the destination and can a listener receive said multicast packets is a valid question. does anyone have an answer?

You appear to be ignoring a post above and making it more complicated than need be.

Quote
Beyond that, you also likely need to have a multicast router - as otherwise there really isn't a point in simply not broadcasting, which will carry only on the same segment.

If you are on the same segment, simply use UDP broadcast (address is dictated by your netmask). It is not the same as multicasting but on the same segment there is little advantage to using multicast vs broadcast. This is likely especially true since I doubt the low end ethernet chips support MAC caching/filtering, let alone multicast MAC caching/filtering. And if true, that means there is no real difference between using broadcast versus multicast on the same segment; aside from the fact things just got a heck of a lot easier.

Multicast's primary advantage is efficient broadcasting over multiple segments. If you are on the same segment, you probably don't want to use multicast but rather should just be broadcasting. The advantage here is that broadcasting is just another destination address as determined by your network address and netmask. Everyone on the segment receives it, assuming they are listening on the port.

As a footnote, some socket implementations and/or platforms require an extra flag be specified so as to allow for broadcast traffic delivery on a socket.

I've never used this before and it was the first search engine result, but here is a subnet calculator which will allow you to figure out your broadcast address for the given network.

Edit: Added broadcast socket option note.
Edit2: Added link to calculator.
« Last Edit: October 04, 2011, 09:54:12 am by gerg » Logged


Pages: [1]   Go Up
Jump to: