RADIUS (Remote Authentication Dial-In User Service) / LDAP (Lightweight Directory Access Protocol)
How RADIUS and LDAP divide the work
RADIUS and LDAP are often both called "authentication", but their roles differ:
· RADIUS makes the decision: whether this person may connect. A RADIUS server usually stores no user data itself.
· LDAP is a directory database: it answers queries and returns who this person is, which groups they are in and which attributes they have. LDAP does not enforce admission.
In an enterprise network the two are chained: the switch sends a request to RADIUS, and RADIUS queries LDAP.
RADIUS uses UDP, LDAP uses TCP
Each picks its transport by need:
· RADIUS uses UDP: one question and one answer, short messages, and a switch port is waiting for the result, so the answer must come within milliseconds; on timeout the client simply moves to the next server, and RADIUS's own retransmission is enough;
· LDAP uses TCP: one query may return a whole subtree, and one connection carries many queries.
Common misconceptions
A RADIUS server usually does not store usernames and passwords. It is a decision point; user data normally lives in LDAP or AD.
LDAP cannot stop anyone from connecting. It only answers queries; the switch enforces admission, based on RADIUS's answer.
RADIUS messages are not encrypted as a whole: only the password attribute is obscured with the shared secret, and every other attribute is in the clear. That is why RadSec (RADIUS carried inside TLS) is now recommended.