Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a way to ping and ldap server? I have seen ldapsearch and ldapwhoami but would appreciate something a bit more like ping. Essentially we have a bip address in front of a selection of LDAP servers and are looking to confirm which one we are connecting to.

share|improve this question

closed as not a real question by MDMarra, gWaldo, Jacob, Wesley, Tom O'Connor Feb 24 '12 at 15:36

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Please take some care and edit your question to make it more clear what you're asking. It may be helpful to explain why you would care what LDAP server you're connecting to. –  gWaldo Feb 24 '12 at 1:04
1  
@gWaldo, I suspect he is just looking for a basic tool that makes a null connection to the server, and reports the latency for opening the connection, and possibly return basic details that you can get from a null connection. –  Zoredache Feb 24 '12 at 1:42
    
Many thanks, can you advise how I'd test a secure LDAPS server also? –  naffcat Feb 24 '12 at 7:46

2 Answers 2

What you are asking is not clear.

You can ping ldap servers.

If you're on a Windows client, check your environment variable LOGONSERVER (via the set command) to determine the DC you're connected to.

share|improve this answer
    
I'm using Linux - and want to confirm which LDAP server is resolving against ldpserver.bip.domain.com for example –  naffcat Feb 24 '12 at 7:48
1  
But why do you care which one you're connected to? –  gWaldo Feb 24 '12 at 11:41
    
This is wrong- You can't ping ldap. –  Yarin Mar 7 '12 at 15:33
    
But you can ping an ldap server. Just exactly like I said... –  gWaldo Mar 7 '12 at 15:51

Ping is a tool aimed for testing (echo) replies from network hosts using the ICMP protocol. LDAP is a protocol that by default lives on TCP port 389, and does not directly communicate with ICMP.

If you're just looking for a tool to give you a quick "yeah, port is open and available", then you can just do a telnet query for port 389 (LDAP) or port 636 (LDAP SSL) with telnet.

telnet hostip 389

You should see something like this:

root@LINXWII:/home/l0c0b0x# telnet ldapsrvip 389
Trying 10.2.2.101...
Connected to mainldapsrv.example.com.
Escape character is '^]'.

Lots of people rather use nmap, so you can also do that:

nmap hostip 389

There is also a Microsoft tool called PortQry that will give you a lot of info about a port(s):

PortQry.exe -n hostip -p tcp -e 389

just replace 389 with 636 for LDAP SSL

share|improve this answer
    
Also, LDAP over SSL is port 636. –  gWaldo Feb 24 '12 at 1:42
2  
While PING is most commonly used to mean for a tool that does an ICMP echo/reply, some protocols to have built-in ping facility (eg IRC). I suspect he is looking for some tool that does some kind of basic low-level un-authenticated LDAP status check. –  Zoredache Feb 24 '12 at 1:44
    
Many thanks, can you advise how I'd test a secure LDAPS server also? –  naffcat Feb 24 '12 at 7:47
    
The idea is testing the port where the service lives. LDAP lives in TCP port 389, LDAP SSL lives in port 636. Find out the important ports and go from there. –  l0c0b0x Feb 24 '12 at 16:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.