Connect to a directory service using plain LDAP and implicit-TLS LDAPS.
Which port pairing is appropriate?
LDAP uses TCP 389 and LDAPS uses TCP 636; StartTLS can also be negotiated on 389.
Detailed explanation
LDAP TCP 636 / LDAPS TCP 389Incorrect. It reverses the plain and TLS ports.
Incorrect. It reverses the plain and TLS ports.
LDAP TCP 389 / LDAPS TCP 636Correct. LDAP 389 and LDAPS 636 are the standard mapping.
Correct. LDAP 389 and LDAPS 636 are the standard mapping.
LDAP TCP 993 / LDAPS TCP 995Incorrect. Those are IMAPS and POP3S.
Incorrect. Those are IMAPS and POP3S.
LDAP UDP 389 / LDAPS UDP 636Incorrect. LDAP connections normally use TCP.
Incorrect. LDAP connections normally use TCP.
Try it yourself
An example you can run in a temporary verification environment.
python3 -c "import socket; print(socket.getservbyname('ldap','tcp'), socket.getservbyname('ldaps','tcp'))"Expected result
389 636Key points
- LDAP 389
- LDAPS 636
- StartTLS on 389
Notes
- Environment: Python 3 socket service database
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.