[coherence-dev] How to config the Coherence to work under multiple physical interfaces surrounding?

Frank Scholz fs at beebits.net
Mon May 25 22:42:30 CEST 2009


Hi,

> How can i get the interface name to configure coherence to use the wifi
> interface ?
> 
> I can find the name "wlan0" on Linux , but I can see nothing about the
> interface alias such 
> as "eth0" on win32. Where can i found it?
isn't there an 'ifconfig' command on Windows too? That should display
the available interfaces.

On Windows I recommend to use the netifaces module, the plain python
methods to determine the interface to use don't work that well there.

> And one more question, how Coherence determind which interface to use
> without the config file
> or without the interface configuration item under multiple pyhysical
> interfaces surrounding?

Atm Coherence does only support one active interface - this will change
on the way to 0.7.

We try first to get the hostname and resolving that to an IP address.
If that fails or we get a loopback address back, we switch to plan b.

On Windows we use the first interface we get back from netifaces and
use that IP address. On Linux/BSD/OS-X we try either to parse
'/proc/net/route' or the output of the 'route -a' command to
determine the interface used for the default route, which on
a single homed host is usually the interface to use.

Regards,
Frank




More information about the coherence-dev mailing list