Protocol notes for this page (click to expand)

RADIUS (Remote Authentication Dial-In User Service) / LDAP (Lightweight Directory Access Protocol)

★★★ Two protocols, two questions

★★★★ They are often treated as one thing, yet their roles differ entirely:

· RADIUS decides: it answers a yes-or-no question -- may this person connect? It stores no users itself.
· LDAP is a directory database: it answers queries -- who is this, which groups, which attributes? It admits nobody.

★★★★ So in an enterprise the two are chained: the switch asks RADIUS and RADIUS queries LDAP.

★★★ Why one uses UDP and the other TCP

★★★★ Not an arbitrary choice but different needs:

· RADIUS uses UDP: one question, one answer, short messages, and a switch port is waiting -- so it needs a millisecond answer and simply tries the next server on timeout; its own retransmission suffices;
· LDAP uses TCP: one query may return a whole subtree, and the connection stays up for many queries.

★★ The difference is visible in the grey stack of each diagram.

★ Common misconceptions

★★★ "RADIUS holds the usernames and passwords" -- usually not. It is a decision point, while the user data commonly lives in LDAP or AD.

★★★ "LDAP can block someone" -- it cannot. It only answers queries; the switch enforces admission, acting on RADIUS's answer.

★★ "RADIUS is encrypted" -- only the password field is digested; every other attribute is in the clear. Hence the push toward RadSec, which wraps it in TLS.