[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: The OpenLDAP Client and Multiple DNS Records



George Holbert wrote:
Tim Gustafson wrote:
Hi,

How does the OpenLDAP client library handle multiple A records being returned for a DNS query for an LDAP server?

OpenLDAP doesn't alter hosts resolution behavior.
As usual, the first address (A record) returned would be used.

That is to say, if "host ldap" returns 1.1.1.1, 2.2.2.2 and 3.3.3.3, will the OpenLDAP client library only connect to 1.1.1.1?  If a connection to 1.1.1.1 fails, will it try 2.2.2.2 and then 3.3.3.3?


It will not try 2.2.2.2 or 3.3.3.3 automatically if a connection attempt to 1.1.1.1 fails. It might happen to try them on the next connection, if the host needs to resolve the LDAP server's name again, and either 2.2.2.2 or 3.3.3.3 is the first A record returned.

False. If multiple A records are returned, if the first address fails it will continue on to the next, stopping when something succeeds or it runs out of alternatives.


--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/