I'm trying to use IPV6 to connect to my LDAP server. Everything works if I use ipv4 but I'm not ipv6 link-local address. I used the following command on my server using its own ipv6 address. Any clue what I'm doing wrong? I can use ping6 to ping the server from client and client from server.

ldapsearch -D "user" -H "ldap://[fe80:20c:29ff:fefd:deea] -W returns Can't contact LDAP Server (-1)


1 Answer 1


Your IPv6 address is incomplete. You forgot the scope ID, which appears as a % followed by the relevant interface ID.

  • How do I find the scope ID? fe80:20c:29ff:fefd:deea/64 Scope:Link
    – Chris
    Oct 23, 2015 at 21:41
  • As stated before, it's the interface. Oct 23, 2015 at 21:42
  • I have tried this but it get the same reponse and I have tried with it in the brackets. ldapsearch -D "user" -H "ldap://[fe80:20c:29ff:fefd:deea]%eth0" -W
    – Chris
    Oct 23, 2015 at 21:47
  • 1
    @Chris The % and interface name are part of the IPv6 address. So, they belong within the brackets, not outside them. Oct 23, 2015 at 22:01
  • It doesn't work with -H option but -h worked. ldapsearch -D "user" -h fe80:20c:29ff:fefd:deea%eth0 -W. Not sure why. -h is for host and -H is for uri.
    – Chris
    Oct 23, 2015 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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