Join Multicast Group from different subnets

J

Java and Swing

I am trying to get two machines on two different subnets to join the
same multicast group. Once they join they periodically send messages
to one another via the group, however, right now they don't seem to
know of each other. this could be a firewall issue, but I wanted to
make sure what I am doing is correct.

I try to join the multicast group at "230.0.0.1" per the Java tutorial
(http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html)
.....is this address sufficient for my needs? also, what other address
could I use...i am not sure what the possibilities are?

thanks in advance.
 
G

Gordon Beaton

I am trying to get two machines on two different subnets to join the
same multicast group. Once they join they periodically send messages
to one another via the group, however, right now they don't seem to
know of each other. this could be a firewall issue, but I wanted to
make sure what I am doing is correct.

You need to configure your router to handle the multicast group.

/gordon
 
J

Java and Swing

Gordon said:
On 28 Nov 2006 06:17:35 -0800, Java and Swing wrote
You need to configure your router to handle the multicast group.

/gordon


so what multicast groups (ip's) can i use in general? other than
230.0.0.1?
 
G

Gordon Beaton

so what multicast groups (ip's) can i use in general? other than
230.0.0.1?

You can use any class D address (224.0.0.0 - 239.255.255.255), just
like the API documentation for MulticastSocket says.

But the specific choice of group is not really relevant to your
original problem, you still need to enable multicast routing between
the subnets. If that's not a workable solution for you, use a
multicast tunnel of some kind (try Google).

/gordon
 
J

Java and Swing

Gordon said:
If that's not a workable solution for you, use a
multicast tunnel of some kind (try Google).

not sure if that's what I need. According to one site, "There is a
need to limit how long multicast traffic will expand across routers.
That's what the TTL is used for. Routers have a TTL threshold assigned
to each of its interfaces, and only datagrams with a TTL greater than
the interface's threshold are forwarded. "

They state....

TTL Scope
0 Restricted to the same host. Won't be output by any interface.
1 Restricted to the same subnet. Won't be forwarded by a router.
<32 Restricted to the same site, organization or department.
<64 Restricted to the same region.
<128 Restricted to the same continent.
<255 Unrestricted in scope. Global.

So, it seems that I can set the TTL on the datagram to be something
like 30, 50, etc to have it get past the router.

Link: http://www.oser.org/~oser/ds/node27.html
 
E

EJP

Java said:
So, it seems that I can set the TTL on the datagram to be something
like 30, 50, etc to have it get past the router.

You can set the TTL to whatever you like but if the router isn't
configured to forward multicasts it won't.
 
J

Java and Swing

EJP said:
You can set the TTL to whatever you like but if the router isn't
configured to forward multicasts it won't.

true, actually it seems there is no method to set the TTL anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top