[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Default setting of NETWORK_INTERFACE



Stuart,

The algorithm for picking an interface turns out to be a little more complicated than just picking the "first one found". I will correct that in the manual.

The algorithm (as of my reading in 6.7.19 source code) is this:

Loop through DNS host records returned by gethostbyname() for the current host. Pick one of the IP addresses from this list. The first preference is an IP address other than anything matching the following addresses 10.*, 172.16.*, 192.168.*, 127.0.0.1. The second choice is anything not matching 127.0.0.1. The third choice is 127.0.0.1. If there are multiple options of equal preference, the first one returned by gethostbyname() is used. (However, I just discovered that the reverse is true for the private addresses 10.*, 172.16.*, etc. In that case the _last_ one in the list is returned. This is probably not intentional, so we'll review that.)

The new behavior added in 6.7.18 is that if you specify BIND_ALL_INTERFACES=True, then the choice of IP address to advertise is dynamic, depending on what network interface is actually used when communicating with the collector. This allows, for example, a multi-homed schedd to flock jobs to two different sites in separate networks. It also allows glidein startds that land on a multi-homed machine to more dependably choose the correct network interface to advertise so that they are reachable from the outside.

--Dan


On May 2, 2006, at 5:27 PM, Stuart Anderson wrote:

	On a multi-homed Linux machine what is the definition of
"first interface found" for the default setting of NETWORK_INTERFACE
in version 6.7.18? For example, is it the first one returned by
/sbin/ifconfig, possibly excluding "lo"? Is there any ambiguity when
virtual interfaces are configured?

	The default is currently working for me, but I am curious whether
I am just lucky and should be explicitly setting NETWORK_INTERFACE or
if the default algorithm is deterministic and appropriate to my setup.

Thanks.

--
Stuart Anderson  anderson@xxxxxxxxxxxxxxxx
http://www.ligo.caltech.edu/~anderson
_______________________________________________
Condor-users mailing list
Condor-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/condor-users