udp send msg multicast range smaller than subnet broadcast

Discussion to talk about software related topics only.
Post Reply
cdubats
Posts: 4
Joined: Tue Mar 03, 2009 8:59 am

udp send msg multicast range smaller than subnet broadcast

Post by cdubats »

I am trying to send multicast packets with code patterned after the multicast example (multitest.cpp). When I set the IP address as a broadcast address, the packets transmit. For example, with my fixed IP set for 192.168.0.16 and mask set for 255.255.255.0, I can specify a send address of 192.168.0.255. When I try to send a smaller multicast range like 192.168.0.31, the stack doesn't seem to understand I'm trying to send a multicast. It just keeps arping who has 192.168.0.31. I see that there is a function void EnableMulticast( MACADR macAddress, int interface = 0 ); in netinterface.h, but I don't see any mention of calling that in multitest.cpp. Trying to narrow the problem between:
>Don't know how to specify a multicast ip address correctly, confusing MAC data link layer multicast with IP network layer address multicast, etc.
>Have to call EnableMulticast or the function pointed to by EnableMulticastFunc* enab_multicast; in interface block struct (that's a funcptr, right?)
If so, what do I pass for the MAC address, my own? You'd think specifying the interface would be enough info.
>Some other external configuration in setup or something? I'll add to this with source code if nobody sees my misunderstanding right off hand...
addendum...
I see from rfc 3171, Wikipedia &c that the IP multicast requires a whole different subnet address to be used and is not similar to a link level multicast where essentially the local devices determine what they receive on the local link and don't require any routing assistance.
I'll have to do a little more thinking about how to have a bunch of MOD5282s coordinate by watching each others' ?casts while letting a browser based user interface visit any one
of them to learn the ip addresses and summary data of all of them. Still interested in any insight that the group might have about what flies with network managers and how to deal with getting a broadcast or multicast message across a dumb switch or a managed switch. Is the NetBurner's (presumeably) limited range of MAC addresses of any use in letting the 5282s all see each other with less nuisance traffic absorbed by other innocent bystanders? Of course, I'm trying to use the port # to help other computers shrug it off. I'm intrigued by port 1066. Every list seems to know of it, but nobody can say exactly what it ever was for or if it is seeing any use. My rough parameters are a max group size of 8, a broadcast of 105 bytes from each one of them once per second. So I think even a broadcast wouldn't severely load most LANs.
Post Reply