I found a multicasting example at http://ntrg.cs.tcd.ie/undergrad/4ba2/multicast/antony/example.html. After correcting some errors, this program seems to work fine within our network.
I now need to multicast to a different subnet. Here is my setup: my machine ==> cisco router ==> Internet ==> cisco hub ==> client machine.
My local IP address is 10.10.15.20. The client machine's IP address is 192.168.15.101.
Our network provider has configured a GRE tunnel between the cisco router and the cisco hub. If I ssh or ping from my machine to 192.168.15.101, it works just fine.
I now need to run my multicast server program on my machine and the client program on the client machine. However, it appears the message from my server never reaches the client.
The network service provider demonstrated a program that seemed to multicast just fine. Unfortunately, they don't have the source code for the application. All they said is that they used 22.214.171.124 as the group id and 6000 as the port. I changed our application to use these parameters but still couldn't get the client and server to communicate.
I am thinking the multicast datagram probably reaches the router but the router does not know if the datagram must be send on the GRE tunnel or to the Internet. This is because the server code does not specifically mention anything about 192.168.15.xx network.
I feel I need to somehow pass in a hint to the router that the multicast packet must really be forwarded to the internal network. Given that the destination client ids are 192.168.15.xx, I tried to set the groupid of the server to 126.96.36.199 (from the net, it appeared that the first four bits for multicast must be 1110. I am using 0b11100000). However, even this did not seem to work.
I am at a loss. Can you please guide me on how to hint the router that the multicasting is meant of 192.168.15.x network? Regards.