Hi and welcome to LQ,
Since the ldap server is not local, you need to specify it using either the -h or -H switch. I.e:
Code:
ldapsearch -x -b "dc=example,dc=com" -h ldap-master.example.com
ldapsearch -x -H ldap://ldap-master.example.com/dc=example,dc=com
Alternatively, you can use
/etc/ldap.conf on the client to specify the ldap server and other details.
Regards