Re: Avoid using DNS for hostname name resolution in ldap_bind_s
- From: "strongline" <johnlan@xxxxxxxxx>
- Date: Mon, 11 Dec 2006 15:55:22 -0500
If the host name is correctly entered in a host file, it will be resolved
before the client attempts to query DNS.
How ping resolves the server name is how LDAP resolvs it.
--
-------------------------------------------------
I want my future to be unknown
http://strongline.blogspot.com
-------------------------------------------------
<hagaiy@xxxxxxxxx> wrote in message
news:1165855217.392415.211600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
I am using windows LDAP API (in windows 2000 / 2003 machines) to
perform LDAP queries with LDAP directories (Active Directory, Sun One
and more). I have noticed that when I provide the hostname (for example
host.domain.com) the LDAP API is trying to perform DNS queries to
resolve the target host ip address.
I have the relevant hostname & ip in a local hosts file and I would
like the LDAP API to use it instead of using DNS, my problem is that
DNS is not available from my client machine and the hosts file is used
but only after a few failed DNS attempts (I can see them using a
network sniffer), these DNS queries cause my connect to take about 10
seconds!
I must use an FQDN for the target host since I am using SSL and the
sever verification will fail if the target host name will not match the
LDAP server FQDN.
I have gone over the API documentation but I can't see anything
regarding name resolution options or DNS queries, is there a way for me
to control this (I have seen a note stating that if I provide a domain
name in the hostname parameter for ldap_sslinit then the default domain
controller will be located, so I thought that the API might be
mistaking the hostname that I provide as a domain name, but I didn't
see any explanation regarding how does the API knows that the parameter
is a domain name / host name)?
Thanks,
Hagai.
.
- Follow-Ups:
- References:
- Prev by Date: Re: Rename Domain
- Next by Date: Re: **DELETED SERVER #1-87
- Previous by thread: Avoid using DNS for hostname name resolution in ldap_bind_s
- Next by thread: Re: Avoid using DNS for hostname name resolution in ldap_bind_s
- Index(es):
Relevant Pages
|