Re: Avoid using DNS for hostname name resolution in ldap_bind_s



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.



.



Relevant Pages

  • Re: Web Site Mystery
    ... host our own web site at this location. ... So in our DNS setup, there is a pointer to the ip address of the ... Run an ipconfig /all on your server and you'll see the ... www.europacrown.com don't work from our corporate network. ...
    (microsoft.public.windows.server.general)
  • Re: Underscore in IIS 6 Host Header definition
    ... The RFC that you referenced does not define the standard for the DNS ... An underscore is not valid in a host. ...
    (microsoft.public.inetserver.iis)
  • Re: Retardedness
    ... have not written any reverse DNS code. ... Begins an asynchronous request for IPHostEntry ... information about the specified DNS host name. ... GetHostAddresses: Returns the Internet Protocol addresses for ...
    (alt.os.windows-xp)
  • Re: How to disable the "implicit mx record" in Exchange
    ... the host with the A record for the actual domain. ... So when Exchange gets a DNS timeout looking up an MX record, ... their own Exchange or other type of mail server under their own domain name, ... DNS UDP traffic max packet size is ...
    (microsoft.public.exchange.admin)
  • Re: How to disable the "implicit mx record" in Exchange
    ... the host with the A record for the actual domain. ... So when Exchange gets a DNS timeout looking up an MX record, ... our ISP's DNS and perhaps slow response from the recipient domain's ... their own Exchange or other type of mail server under their own domain name, ...
    (microsoft.public.exchange.admin)