Skip to main content

About the ip multi-cast go through different subnets

5 replies [Last post]
weyoni2
Offline
Joined: 2008-05-14
Points: 0

During my work on a jxta p2p project, I found it is very hard to let the ip multi-cast go through different subnets(router).
So i can't build a pipe for peers in different subnets. I know that jxta have rendezvous peer and relay peer, but i didn't find a clear explanation about this.
Can anyone tell me that how i can find peers in a different subnet?
Thank you very much!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi,

Each IP data packet has a target IP address. There are some official IP addresses that routers know they should not forward between subnets, for example, multicasting addresses.

The transfer of data packets from one subnet to another should be performed automatically if the router is set-up correctly. Now, routers can act as firewalls too. If they are blocking the default IP ports used by JXTA, the packets will not be transmitted from a subnet to another.

To solve this problem, you should typically have at least one seed rendezvous peer and one seed relay peer that all your peers should know (you can set this in the NetworkConfigurator). Each seed should have its own static IP address.

Any firewall between them and other peers should allow at least connections via port 1234 and most preferably connections via the standard JXTA IP ports too. LANs should be transparent for those peers (i.e., they should not perform translations for them) and allow bidirectional from and to those seeds.

Your peers should be able to 'find' each other.

Cheers,

J.

weyoni2
Offline
Joined: 2008-05-14
Points: 0

First, Thank you very much for your explanation.
I still have some questions on your reply.
"set this in the NetworkConfigurator" is this mean that setup when you start a jxta program at the first time , and i shall set all the peers with the correct rendezvous and relay peer address?
"Each seed should have its own static IP address"
and use its static IP address to connect to the peers in different subnets rather than the lan address?
"other peers should allow at least connections via port 1234"
why is the port 1234? Does it have some special effect?
Thank you very much for your reply!

adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi,

i) Yes, you need to set these seeds in the NetworkConfigurator before you call the startNetwork(...) method.

ii) Your rendezvous peer and your relay peer must have a static IP address, not a LAN address (or you take the risk that some 'normal' peer won't be able to reach them). The others don't need to have a static IP address as long as you set-up both the RDV and the relay as seeds in each of them.

iii) Port 1234 is a port used by peers to connect to relay peers via HTTP when they cannot access other peers via the normal range of IP port used by JXTA (9700 etc...). That is the mechanism used to bypass the fact that routers/NATs/Firewalls are not always transferring data packets from one subnet to the other.

Cheers,

J.

weyoni2
Offline
Joined: 2008-05-14
Points: 0

Thank you very much!!!!!!!!!

adamman71
Offline
Joined: 2007-01-31
Points: 0

You are welcome.

I made a little error, port 1234 is used for multicasting. The HTTP port is 9901.

J.