Skip to main content

Does JXTA work with dynamic IPs?

6 replies [Last post]
lmikhailov
Offline
Joined: 2007-05-22

Hello everybody,

I am currently under the impression that in order to be able to establish communication between two peers on two separate subnets these two peers must have static IPs. An I right about that? If so that would explain why I can't get the JXTA discovery sample to work, because I have dynamic IPs from the usual residential ISPs. Did anybody ever succeed at running JXTA on dynamic IPs?

Leon

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bondolo
Offline
Joined: 2003-06-11

JXTA does not require static IPs. JXTA works just fine with DHCP/BOOTP dynamically assigned IP addresses.

Was there anything specific in the problem you encountered that lead you to think that the problems were related to dymanic IP addresses?

lmikhailov
Offline
Joined: 2007-05-22

Basically I couldn't get Discovery sample to work on the Internet with my two peers sitting on dynamic IPs. It has all been resolved as soon as I did
manager.setUseDefaultSeeds(true);
like was suggested in one of the answers to my post.

Thanks,

Leon

asghar
Offline
Joined: 2005-07-26

Hi Leon,

You are missing a Rdv and/or a Relay in your jxta network.

JXTA Network Addressing Scheme (mainly represented by jxta.id package) enables any JVM-enabled system to be a node of a (jxta) network, also those managed by NDS, DHCP servers (nodes with dynamic IP addresses).

The discovery tutorial is designed for network nodes, located in the same subnet.
If you want to run it on nodes, located in 2 subnets, then you must set the network-environment respectively (using the network configuration API: net.jxta.platform.[b]NetworkConfigurator[/b] and/or net.jxta.platform.[b]NetworkManager[/b]).

Asghar

lmikhailov
Offline
Joined: 2007-05-22

Asghar,

Thank you for your reply. The peers that I am trying to connect are created in EDGE configuration. I understood that EDGE peers by default refer to rendezvous peers from the following list: http://rdv.jxtahosts.net/cgi-bin/rendezvous.cgi?3. So you are saying that this is not enough and I should have my own rendezvous peer. Do I understand you correctly?

Thanks,

Leon

asghar
Offline
Joined: 2005-07-26

Using public Rdvs and Relays, provided by JXTA community was the default setting for JXSE 2.4.1 tutorial. This is changed for JXSE 2.5 to reduce the traffic!

Both nodes (DiscoveryServer, DiscoveryClient) of your jxta network must be known to a Rdv (and to relay too, if they are behind NAT/firewall). The easiest way for that:

In constructors of classes, representing the client and server, before call to manager.startNetwork() add the following statement:
[b]manager.setUseDefaultSeeds(true[/b]);

siggyuke
Offline
Joined: 2007-10-08

Okay, so by using

[code]
manager.setUseDefaultSeeds(true);
[/code]

what are you actually doing?

I assume from earlier comments in the reply that the method sets the config of JXTA platform to have the 'public Rdvs and Relays, provided by JXTA community' set / visible?!??!

So the peer advertisments for 'public Rdvs and Relays, provided by JXTA community' are placed in the local cache at platform start up?