Before you can search an LDAP directory, you need certain information:
Host name of the machine where the directory is installed
Port number of the directory server
Base DN of the directory tree managed by the server
Scope of the search
Attributes to request
Optionally, search preferences
The host name directs the search to the machine where the directory resides. This parameter is mandatory and is usually of the form machinename.domain—for example, dirhost.acme.com. If you are at the console on the machine that is running the LDAP server, you can use the host name "localhost" for your test server. You can specify the IP address of the host instead if you wish—for example, 127.0.0.1 for "localhost."