Multicast on Xojo tcpip socket?

Does the Xojo txpip socket support any part of the multicast process, especially the origination of and the response to such messages?

Thanks
Jim Wagner
Oregon Research Electronics

UDPSocket is the normal means to do multicast

TCP is connection oriented so that kind of precludes one sender & many receivers using TCP

I was told by a knowledgeable IT friend that Multicast is a distinct protocol that operates (in the network) at the hardware level. What he did not know was how a Multicast message originates or how one is detected by a possible recipient. He said, I believe, that within a LAN, Multicast defaults to UDP, but over multiple LANs, that there is something else (beyond UDP) that goes on.

He gave, as a example, the transport of a World Cup live stream as an example of Multicast. Rather than having a separate stream for each recipient, if a LAN has several recipients, then it is handled as a single stream up to the point where it has to separate for the various recipients.

He also described Multicast as a technique that could be used for discovery where you don’t know the precise IP address due to the presence of intervening routers and the changeability of the IP addresses due to DHCP. The master sends a Multicast message (to a given port for that collection of devices) saying who it is, what its IP address is, and such. The recipients then respond with their actual, current, IP address (and other identifiers) so that the master then knows the IP address of each system member.

I hope that I am writing things correctly - this is still very new to me, so there may be errors, above. Maybe the subject line might be better “Xojo socket”?

The routers have to be “Multicast capable”, to use his words. I believe that the university network I am working in is - the question is how to do it.

Jim

Jim, check out https://en.wikipedia.org/wiki/Multicast for details about the different multicast.

now if my memory serves me right (and it probably isnt) the network router has to support multicast or it tends to get stuck in a given lan (as long as the lan segment doesnt cross a router). Now if a given segment (lets say 192.168.100.x - my home lan) crosses a router (mine does, wired vs wireless. wired is on one side of the router, wireless is on the other side). Multicast type broadcasts will be on one side of the other. my router doenst have the multicast “magic stuffs” (I am not a network guy so I wont make up names) turned on. Hell it might not even support it.

Thanks to the pointer to Wikipedia. Should have looked there first. I will push this toward my friend (who is trying to help me) and see what happens.

Jim

when I was at the University, we had to go into each lan segment (vlan) and each router and tell it which ones supported multicast. A bunch of us watched NASA via multicast video. BUt we didnt want the multicast packets tromping though all the segments.

Hi Jim,

Here are a few points to your post. HTH.

A multicast packet commonly uses UDP and has the normal OSI layers associated with it. At layer 2 and layer 3 multicast frames are processed in a network, however it is up to the layer 2 switch and layer 3 router manufacturer to use protocols/features to maximize the efficiency of forwarding/routing multicast frames.

A multicast frame originates at the application layer by way of Application support. Most multicast applications today have built in IGMP support in which the app then communicates using IGMP with it’s upstream router. The source application begins an IGMP negotiation session with the upstream routing this forming an IGMP multicast group. The receiver’s application would need to know that it should subscribe basically to the same IGMP group that the source is sending to.

Yes multicast is a bandwidth efficiency protocol. It allows a source broadcast device to send one multicast stream of bandwidth to the network while multiple receiver devices are able to receive this stream. Its commonly referred to as 1 to many communication where as unicast is 1 to 1 communications.

[quote]
He also described Multicast as a technique that could be used for discovery where you don’t know the precise IP address due to the presence of intervening routers and the changeability of the IP addresses due to DHCP. The master sends a Multicast message (to a given port for that collection of devices) saying who it is, what its IP address is, and such. The recipients then respond with their actual, current, IP address (and other identifiers) so that the master then knows the IP address of each system member.

I hope that I am writing things correctly - this is still very new to me, so there may be errors, above. Maybe the subject line might be better “Xojo socket”?

The routers have to be “Multicast capable”, to use his words. I believe that the university network I am working in is - the question is how to do it. [/quote]

Yes but also remember multicast in a network by default is not routed. It is only at layer 2 meaning your MC source and MC receivers must be on the same network segment/VLAN. If you have an advanced network that routes multicast traffic then those routers will use a multicast routing protocol such as PIM.

Scott that is pretty much spot on. If your multicast source and receivers are all on the same network segment/VLAN than nothing special in the network has to be done these days. I know all Cisco LAN switches have IGMP snooping enabled by default now across all of their switching product lines for example. IGMP snooping is a layer 2 protocol that “snoops” each packet received to see if it is a multicast packet. This allows a switch to efficiently process and forward multicast frames instead of broadcasting the multicast frame out all ports except the one it received the multicast on. Again IGMP snooping prevents this situation.

If you have your network engineer that is available then just ask him/her if his network at layer 2 supports IGMP snooping. If you need to setup a multicast source sending application in New York and you need your receiver applications to join in San Francisco for example then your network must have a multicast routing protocol otherwise you won’t connect to that MC stream.

Wow, that really helped. I think my department network guy should be able to tell me about layer 2 capability. Being a major scientific and engineering university, I suspect that they know about IGMP.

My goal is, I think, to just use the snooping capability to discover the actual IP addresses of various devices in my instrumentation system. I would use basic tcp/ip to transport the control and data information between the central server and the remote instruments.

So, assuming that IGMP is supported by the network, the other big question remains - can I use a Xojo socket to perform the discovery phase?

Thanks for all your input.

Jim Wagner
Oregon Research Electronics & Oregon State University

[quote=109528:@James Wagner]Wow, that really helped. I think my department network guy should be able to tell me about layer 2 capability. Being a major scientific and engineering university, I suspect that they know about IGMP.

My goal is, I think, to just use the snooping capability to discover the actual IP addresses of various devices in my instrumentation system. I would use basic tcp/ip to transport the control and data information between the central server and the remote instruments.

So, assuming that IGMP is supported by the network, the other big question remains - can I use a Xojo socket to perform the discovery phase?

Thanks for all your input.

Jim Wagner
Oregon Research Electronics & Oregon State University[/quote]

Jim here are the Xojo UDP Socket IGMP specific commands:

UDPSockets.JoinMulticastGroup
UDPSockets.LeaveMulticastGroup
http://documentation.xojo.com/index.php/UDPSocket

Also be aware of SendToSelf if you need to: http://documentation.xojo.com/index.php/UDPSocket.SendToSelf

Just make sure you use a Class D destination multicast IP Address that is not well known. IE. 239.10.10.10

HTH

Thanks, Mike -

You have been a huge help!

Jim

[quote=109528:@James Wagner]Wow, that really helped. I think my department network guy should be able to tell me about layer 2 capability. Being a major scientific and engineering university, I suspect that they know about IGMP.
[/quote]
Definitely ask him how their switches handle multicast. Your software will work regardless, however if the network doesn’t support multicast snooping at layer 2 then the multicasts are turned into broadcasts on the network which is never good for network people :slight_smile:

Remember if your Multicast software source and multicast software receivers are on the same network segment (Subnet) / VLAN than you don’t need to worry about if the network routers will handle multicast. However if you have the situation where your Multicast source is in one location and the receivers are in other locations separated by a routed WAN then you must have multicast routing in the network for your software to work.

The extent of the instrument network is yet to be defined. Clearly that will be a major consideration. Thanks for pointing that out.

Jim