ietf-corpus

rfc-2138

Remote Authentication Dial In User Service (RADIUS)

C. Rigney, A. Rubens, W. Simpson, S. Willens
date1997-04 streamIETF areaops wgradius statusPROPOSED STANDARD pages65 canonicalhttps://www.rfc-editor.org/rfc/rfc2138 doi10.17487/RFC2138
This document describes a protocol for carrying authentication, authorization, and configuration information between a Network Access Server which desires to authenticate its links and a shared Authentication Server. [STANDARDS-TRACK]

obsoleted by

obsoletes

Extracted elements (28)

design-rationale §2.3

RADIUS uses UDP instead of TCP for four reasons: (1) failover to an alternate server requires retransmission state above the transport layer regardless; (2) the protocol tolerates several-second delays but not multi-minute TCP retransmit waits; (3) the stateless nature eliminates connection teardown complexity; (4) UDP allows trivially multi-threaded servers where each spawned process responds directly via a single UDP send.

security, udp

interoperability-note §3

Early RADIUS deployments erroneously used port 1645 (which conflicts with the 'datametrics' service). The officially assigned IANA port for RADIUS is 1812 (UDP). Implementations must be aware that legacy deployments may still use 1645.

security, registry

interoperability-note §2.2

For PAP, the NAS sends the PAP ID and password as User-Name and User-Password in an Access-Request. For CHAP, the NAS sends the CHAP username as User-Name and the CHAP ID plus response as CHAP-Password (Type 3); the 16-octet CHAP challenge may be placed in the CHAP-Challenge attribute or, if exactly 16 octets, in the Request Authenticator field.

security

normative-requirement §5.6 MUST

A NAS MUST treat unknown or unsupported Service-Type values (Type 6) as though an Access-Reject had been received. Service-Type values in an Access-Request are only hints that the server is not required to honor.

security

normative-requirement §4.4 MUST

A NAS that does not support challenge/response MUST treat an Access-Challenge as though it had received an Access-Reject. A NAS that does support it SHOULD send a new Access-Request with a new ID, new Request Authenticator, the encrypted user response as User-Password, and the State attribute from the challenge unchanged.

security

normative-requirement §4.1 MUST

An Access-Request MUST contain a User-Name attribute and MUST contain either a User-Password or CHAP-Password attribute. It SHOULD contain NAS-IP-Address or NAS-Identifier and SHOULD contain NAS-Port or NAS-Port-Type.

security

normative-requirement §5 MUST

If an attribute is received in an Access-Request with an invalid Length, an Access-Reject SHOULD be transmitted. If an attribute with invalid length appears in an Access-Accept, Access-Reject, or Access-Challenge, the packet MUST be treated as an Access-Reject or silently discarded.

security

normative-requirement §2.2 MUST

If CHAP authentication is requested but the user's plaintext password is unavailable to the RADIUS server, the server MUST send an Access-Reject; CHAP requires cleartext password access to recompute the challenge hash.

security, crypto

normative-requirement §3 SHOULD

If the order of multiple attributes of the same Type matters, that order SHOULD be preserved. The order of attributes of different Types is not required to be preserved.

security

normative-requirement §5.18 MUST

Multiple Reply-Message attributes (Type 18) MAY be included in a packet, but if any are displayed to the user they MUST be displayed in the same order as they appear in the packet.

security

normative-requirement §3 MUST

On reception of an Access-Accept or Access-Challenge, the Response Authenticator field MUST contain the correct MD5 hash computed as MD5(Code+ID+Length+RequestAuth+Attributes+Secret); packets with an invalid Response Authenticator MUST be silently discarded.

security, crypto

normative-requirement §4.1 MUST

The Identifier field MUST be changed whenever the Attributes field content changes and whenever a valid reply has been received for a previous request. For retransmissions the Identifier MUST remain unchanged, and the Request Authenticator MUST be changed each time a new Identifier is used.

security

normative-requirement §2 MUST

The RADIUS server MUST silently discard any request from a client for which it does not have a shared secret configured.

security

normative-requirement §5.24 MUST

The State attribute (Type 24) received in an Access-Challenge MUST be sent unmodified in the subsequent Access-Request reply. A packet MAY contain at most one State attribute.

security

normative-requirement §5.26 MUST

The Vendor-Specific attribute (Type 26) MUST NOT affect RADIUS protocol operation. Servers not equipped to interpret vendor-specific data MUST ignore it; clients that do not receive desired vendor-specific data SHOULD attempt to operate without it.

security

protocol-element §3

RADIUS defines four access-control packet codes: Access-Request (1), Access-Accept (2), Access-Reject (3), and Access-Challenge (11). Codes 4/5 (Accounting) are defined in a companion document; codes 12/13 are experimental; code 255 is reserved. Invalid code values cause silent discard.

security

protocol-element §2.1

The challenge/response flow uses Access-Challenge packets containing a Reply-Message prompt and optional State attribute. The client re-submits a new Access-Request (new ID, new Request Authenticator) with the encrypted user response as User-Password and the State attribute echoed unchanged. The server may respond with Access-Accept, Access-Reject, or another Access-Challenge.

security

protocol-element §5.8

The Framed-IP-Address attribute (Type 8) uses the special value 0xFFFFFFFF to indicate the NAS should allow the user to negotiate an address, and 0xFFFFFFFE to indicate the NAS should assign one from a pool; other values are the literal IP address to assign.

security, ip

protocol-element §3

The Request Authenticator in an Access-Request is a 16-octet random value used as input to the password-hiding algorithm and to compute the Response Authenticator. The Response Authenticator in replies is MD5(Code+ID+Length+RequestAuth+Attributes+Secret).

security, crypto

protocol-element §5.26

The Vendor-Specific attribute (Type 26) embeds a 4-octet SMI Enterprise Vendor-Id (high octet 0, low 3 octets the IANA Private Enterprise number) followed by vendor-defined sub-TLV fields. Minimum length is 7. It is RECOMMENDED to encode sub-attributes as vendor-type / vendor-length / value triples.

security, registry

registry §5

RFC 2138 defines the RADIUS attribute type space: types 1–63 are assigned in this document (with 17 and 21 unassigned); types 40–59 are reserved for accounting; types 192–223 are reserved for experimental use; 224–240 for implementation-specific use; 241–255 are reserved and MUST NOT be used. Unknown attribute types MAY be ignored by both clients and servers.

registry, security

security-consideration §3

The Request Authenticator SHOULD be unpredictable and globally and temporally unique over the lifetime of the shared secret; reuse with the same secret allows an attacker to replay a previously intercepted response or trick a server into responding to a predicted future request and impersonate it.

security, crypto

security-consideration §3

The shared secret SHOULD be at least 16 octets and as unguessable as a well-chosen password to resist exhaustive search. A RADIUS server SHOULD use the source IP address of each UDP packet to select the correct shared secret, enabling proxy support.

security, crypto

security-consideration §3

When a forwarding proxy adds a Proxy-State attribute to a request and removes it from a response, the MD5 signature over the full packet contents is invalidated; the proxy MUST re-sign the response packet to maintain authenticator integrity.

security, crypto

wire-format §5

Each RADIUS attribute is encoded as a Type-Length-Value triple: Type (1 octet), Length (1 octet, inclusive of Type and Length), Value (0–253 octets). Value data types are string (0–253 octets), address (32-bit big-endian), integer (32-bit big-endian), or time (32-bit seconds since epoch).

security

wire-format §3

Every RADIUS packet is encapsulated in a single UDP datagram to port 1812 and consists of: Code (1 octet), Identifier (1 octet), Length (2 octets, min 20 / max 4096), Authenticator (16 octets), and a variable-length Attributes field.

security, udp

wire-format §5.3

The CHAP-Password attribute (Type 3) carries a 1-octet CHAP Identifier followed by a 16-octet CHAP Response string; total attribute Length is fixed at 19. The CHAP challenge is taken from the CHAP-Challenge attribute (Type 60) if present, otherwise from the Request Authenticator.

security, crypto

wire-format §5.2

The User-Password attribute (Type 2) hides the password using a chained MD5 scheme: b1=MD5(S+RA), c(1)=p1 XOR b1; bi=MD5(S+c(i-1)), c(i)=pi XOR bi. The String field is 16–128 octets (attribute Length 18–130), supporting passwords up to 128 characters in 16-octet blocks.

security, crypto