RFC 2865

Remote Authentication Dial In User Service (RADIUS)

๐Ÿ“… published June 2000, from ietf

RFC 2865: Remote Authentication Dial In User Service (RADIUS) ๐ŸŽ€

Okay bestie, let's get into it ๐Ÿ’– This is RFC 2865, called Remote Authentication Dial In User Service (RADIUS). It's a Standards Track doc from the Network Working Group, dated June 2000. Four people wrote it: C. Rigney and S. Willens from Livingston, A. Rubens from Merit, and W. Simpson from Daydreamer ๐Ÿ‘‘ It obsoletes RFC 2138, which means this one replaces that older version, and it doesn't update anything else. The full list of what changed is in the Change Log appendix.

Status of This Memo ๐ŸŽ€

So this doc is an Internet standards track protocol for the Internet community ๐Ÿฆ‹ It's literally asking people for discussion and suggestions for improvements. If you want the current standardization state and status of this protocol, check the "Internet Official Protocol Standards" (STD 1) ๐Ÿ“š And distribution of this memo is unlimited ๐ŸŒˆ

Copyright (C) The Internet Society (2000). All Rights Reserved. ๐Ÿ”’

IESG Note ๐Ÿ‘‘

Okay, real talk, this protocol is widely implemented and used ๐Ÿ”ฅ But experience has shown that it can suffer degraded performance and lost data when it's used in large scale systems ๐Ÿ˜ญ Part of the reason is that it doesn't include provisions for congestion control. So if you're reading this, it's giving "keep an eye on the progress" energy. Track the IETF's AAA working group, because they may develop a successor protocol that handles the scaling and congestion control issues better โœจ

Abstract โœจ

This document describes a protocol for carrying authentication, authorization, and configuration information between a Network Access Server, which wants to authenticate its links, and a shared Authentication Server ๐Ÿซถ

Implementation Note ๐Ÿฆ‹

This memo documents the RADIUS protocol. Early on, RADIUS was deployed using UDP port number 1645, but that clashes with the "datametrics" service ๐Ÿ™ˆ The officially assigned port number for RADIUS is 1812 ๐ŸŽ€

Table of Contents ๐Ÿ’…

   1.     Introduction ..........................................    3
      1.1       Specification of Requirements ...................    4
      1.2       Terminology .....................................    5
   2.     Operation .............................................    5
      2.1       Challenge/Response ..............................    7
      2.2       Interoperation with PAP and CHAP ................    8
      2.3       Proxy ...........................................    8
      2.4       Why UDP? ........................................   11
      2.5       Retransmission Hints ............................   12
      2.6       Keep-Alives Considered Harmful ..................   13
   3.     Packet Format .........................................   13
   4.     Packet Types ..........................................   17
      4.1       Access-Request ..................................   17
      4.2       Access-Accept ...................................   18
      4.3       Access-Reject ...................................   20
      4.4       Access-Challenge ................................   21
   5.     Attributes ............................................   22
      5.1       User-Name .......................................   26
      5.2       User-Password ...................................   27
      5.3       CHAP-Password ...................................   28
      5.4       NAS-IP-Address ..................................   29
      5.5       NAS-Port ........................................   30
      5.6       Service-Type ....................................   31
      5.7       Framed-Protocol .................................   33
      5.8       Framed-IP-Address ...............................   34
      5.9       Framed-IP-Netmask ...............................   34
      5.10      Framed-Routing ..................................   35
      5.11      Filter-Id .......................................   36
      5.12      Framed-MTU ......................................   37
      5.13      Framed-Compression ..............................   37
      5.14      Login-IP-Host ...................................   38
      5.15      Login-Service ...................................   39
      5.16      Login-TCP-Port ..................................   40
      5.17      (unassigned) ....................................   41
      5.18      Reply-Message ...................................   41
      5.19      Callback-Number .................................   42
      5.20      Callback-Id .....................................   42
      5.21      (unassigned) ....................................   43
      5.22      Framed-Route ....................................   43
      5.23      Framed-IPX-Network ..............................   44
      5.24      State ...........................................   45
      5.25      Class ...........................................   46
      5.26      Vendor-Specific .................................   47
      5.27      Session-Timeout .................................   48
      5.28      Idle-Timeout ....................................   49
      5.29      Termination-Action ..............................   49
      5.30      Called-Station-Id ...............................   50
      5.31      Calling-Station-Id ..............................   51
      5.32      NAS-Identifier ..................................   52
      5.33      Proxy-State .....................................   53
      5.34      Login-LAT-Service ...............................   54
      5.35      Login-LAT-Node ..................................   55
      5.36      Login-LAT-Group .................................   56
      5.37      Framed-AppleTalk-Link ...........................   57
      5.38      Framed-AppleTalk-Network ........................   58
      5.39      Framed-AppleTalk-Zone ...........................   58
      5.40      CHAP-Challenge ..................................   59
      5.41      NAS-Port-Type ...................................   60
      5.42      Port-Limit ......................................   61
      5.43      Login-LAT-Port ..................................   62
      5.44      Table of Attributes .............................   63
   6.     IANA Considerations ...................................   64
      6.1       Definition of Terms .............................   64
      6.2       Recommended Registration Policies ...............   65
   7.     Examples ..............................................   66
      7.1       User Telnet to Specified Host ...................   66
      7.2       Framed User Authenticating with CHAP ............   67
      7.3       User with Challenge-Response card ...............   68
   8.     Security Considerations ...............................   71
   9.     Change Log ............................................   71
   10.    References ............................................   73
   11.    Acknowledgements ......................................   74
   12.    Chair's Address .......................................   74
   13.    Authors' Addresses ....................................   75
   14.    Full Copyright Statement ..............................   76

1. Introduction โœจ

This document obsoletes RFC 2138 [1]. If you want a summary of the changes between this document and RFC 2138, it's in the "Change Log" appendix ๐Ÿ“–

Okay so, managing dispersed serial line and modem pools for a large number of users can take a lot of administrative support ๐Ÿ˜ฉ Modem pools are, by definition, a link to the outside world, so they need careful attention to security, authorization, and accounting ๐Ÿ” The best way to handle that is to manage a single "database" of users. That database allows for authentication (verifying user name and password), and it also holds configuration information about the type of service to deliver to the user, like SLIP, PPP, telnet, or rlogin ๐Ÿ’œ

Key features of RADIUS are:

Client/Server Model ๐Ÿ–ฅ๏ธ

A Network Access Server (NAS) operates as a client of RADIUS. The client is responsible for passing user information to designated RADIUS servers, and then acting on the response that comes back.

RADIUS servers are responsible for receiving user connection requests, authenticating the user, and then returning all the configuration information the client needs to deliver service to the user.

A RADIUS server can act as a proxy client to other RADIUS servers, or to other kinds of authentication servers ๐Ÿ”

Network Security ๐Ÿ›ก๏ธ

Transactions between the client and the RADIUS server are authenticated using a shared secret, which is never sent over the network ๐Ÿคซ On top of that, any user passwords are sent encrypted between the client and the RADIUS server. That way, someone snooping on an unsecure network can't figure out a user's password ๐Ÿ™…โ€โ™€๏ธ

Flexible Authentication Mechanisms ๐Ÿฆ‹

The RADIUS server can support a variety of methods to authenticate a user. When it's given the user name and the original password the user typed in, it can support PPP PAP or CHAP, UNIX login, and other authentication mechanisms ๐ŸŒธ

Extensible Protocol ๐Ÿงฉ

All transactions are made up of variable length Attribute-Length-Value 3-tuples. New attribute values can be added without disturbing existing implementations of the protocol. It's giving future-proof โœจ

1.1. Specification of Requirements

Here's the important bit ๐ŸŽ€ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [2]. These key words mean the same thing whether they're capitalized or not.

An implementation is not compliant if it fails to satisfy one or more of the must or must not requirements for the protocols it implements. An implementation that satisfies all the must, must not, should and should not requirements for its protocols is said to be "unconditionally compliant". One that satisfies all the must and must not requirements, but not all the should or should not requirements for its protocols, is said to be "conditionally compliant" ๐Ÿ’…

A NAS that does not implement a given service MUST NOT implement the RADIUS attributes for that service. For example, a NAS that is unable to offer ARAP service MUST NOT implement the RADIUS attributes for ARAP. A NAS MUST treat a RADIUS access-accept authorizing an unavailable service as an access-reject instead ๐Ÿ™ƒ

1.2. Terminology

This document frequently uses the following terms ๐Ÿ“

service: The NAS provides a service to the dial-in user, such as PPP or Telnet ๐Ÿ“ž

session: Each service provided by the NAS to a dial-in user constitutes a session. The beginning of the session is defined as the point where service is first provided, and the end of the session is defined as the point where service ends. A user may have multiple sessions in parallel or in series, if the NAS supports that ๐Ÿ”„

silently discard: This means the implementation discards the packet without further processing. The implementation SHOULD provide the capability of logging the error, including the contents of the silently discarded packet, and SHOULD record the event in a statistics counter ๐Ÿค

2. Operation โœจ

okay so picture this: any user of a client that's set up to use RADIUS has to hand over their authentication info to the client first ๐Ÿ’–. Sometimes that's a customizable login prompt where they type in their username and password. Other times they're using a link framing protocol like the Point-to-Point Protocol (PPP) ๐Ÿซถ, which has authentication packets that carry the info.

Once the client has that info, it may choose to authenticate using RADIUS ๐ŸŽ€. To do that, the client builds an Access-Request that holds Attributes like the user's name, the user's password, the ID of the client, and the Port ID the user is accessing. If there's a password in there, it gets hidden using a method based on the RSA Message Digest Algorithm MD5 [3] ๐Ÿ”.

The Access-Request goes to the RADIUS server over the network ๐ŸŒ. If no response comes back in a set amount of time, the request gets re-sent a number of times. The client can also forward requests to an alternate server or servers if the primary server is down or unreachable ๐Ÿฆ‹. An alternate server can get used either after a number of tries to the primary server fail, or in a round-robin fashion. Retry and fallback algorithms are still being researched, so this document doesn't specify them in detail ๐Ÿง .

Once the RADIUS server gets the request, it validates the sending client ๐Ÿ‘‘. A request from a client that the RADIUS server doesn't have a shared secret for MUST be silently discarded ๐Ÿ’€. If the client checks out, the RADIUS server looks through a database of users to find the one whose name matches the request โœจ. That user entry has a list of requirements that must be met before access is allowed. This always includes verifying the password, but it can also say which client(s) or port(s) the user is allowed to access ๐ŸŒธ.

The RADIUS server MAY make requests of other servers to satisfy the request, and in that case it acts as a client ๐Ÿงš.

If any Proxy-State attributes were in the Access-Request, they MUST be copied unmodified and in order into the response packet ๐Ÿ“. Other Attributes can go before, after, or even between the Proxy-State attributes ๐Ÿ’œ.

If any condition isn't met, the RADIUS server sends back an "Access-Reject" response saying this user request is invalid ๐Ÿ™…โ€โ™€๏ธ. If it wants to, the server MAY include a text message in the Access-Reject, and the client MAY display that message to the user ๐Ÿ’ฌ. No other Attributes (except Proxy-State) are permitted in an Access-Reject ๐Ÿšซ.

If all conditions are met but the RADIUS server wants to issue a challenge the user has to respond to, the RADIUS server sends an "Access-Challenge" response ๐Ÿงฉ. It MAY include a text message for the client to display to the user, prompting them for a response to the challenge, and it MAY include a State attribute ๐ŸŒˆ.

If the client gets an Access-Challenge and supports challenge/response, it MAY display the text message, if there is one, to the user, and then prompt them for a response ๐Ÿซถ. The client then re-submits its original Access-Request with a new request ID. The User-Password Attribute gets replaced by the response (encrypted), and the State Attribute from the Access-Challenge gets included, if there is one ๐Ÿ”. Only 0 or 1 instances of the State Attribute SHOULD be present in a request ๐Ÿ“. The server can answer this new Access-Request with an Access-Accept, an Access-Reject, or another Access-Challenge ๐Ÿ’….

If all conditions are met, the list of configuration values for the user goes into an "Access-Accept" response ๐ŸŽ‰. These values include the type of service (for example: SLIP, PPP, Login User) and all the values needed to deliver the desired service. For SLIP and PPP, that might include things like IP address, subnet mask, MTU, desired compression, and desired packet filter identifiers ๐Ÿ› ๏ธ. For character mode users, it might include things like desired protocol and host ๐Ÿ–ฅ๏ธ.


2.1. Challenge/Response

okay this one is so cool ๐Ÿ”โœจ. In challenge/response authentication, the user gets an unpredictable number and is challenged to encrypt it and give back the result. Authorized users have special devices, like smart cards or software, that make it easy to calculate the correct response ๐Ÿ’ณ. Unauthorized users don't have the right device or software, and they don't know the secret key needed to fake one, so they can only guess at the response ๐Ÿ™ˆ.

The Access-Challenge packet usually contains a Reply-Message with a challenge to show the user, like a numeric value that's unlikely ever to be repeated ๐Ÿ”ข. Usually this comes from an external server that knows what kind of authenticator the authorized user has, so it can pick a random or non-repeating pseudorandom number with an appropriate radix and length ๐ŸŽฒ.

The user types the challenge into their device (or software), which calculates a response. They enter that response into the client, and the client forwards it to the RADIUS server in a second Access-Request ๐Ÿ“ฒ. If the response matches the expected response, the RADIUS server replies with an Access-Accept. Otherwise, it's an Access-Reject ๐Ÿ™Œ.

Here's the example, verbatim:

Example: The NAS sends an Access-Request packet to the RADIUS Server
with NAS-Identifier, NAS-Port, User-Name, User-Password (which may
just be a fixed string like "challenge" or ignored).  The server
sends back an Access-Challenge packet with State and a Reply-Message
along the lines of "Challenge 12345678, enter your response at the
prompt" which the NAS displays.  The NAS prompts for the response and
sends a NEW Access-Request to the server (with a new ID) with NAS-
Identifier, NAS-Port, User-Name, User-Password (the response just
entered by the user, encrypted), and the same State Attribute that
came with the Access-Challenge.  The server then sends back either an
Access-Accept or Access-Reject based on whether the response matches
the required value, or it can even send another Access-Challenge.

2.2. Interoperation with PAP and CHAP

let's talk compatibility ๐Ÿค๐Ÿ’•. For PAP, the NAS takes the PAP ID and password and sends them in an Access-Request packet as the User-Name and User-Password. The NAS MAY include the Attributes Service-Type = Framed-User and Framed-Protocol = PPP as a hint to the RADIUS server that PPP service is expected ๐ŸŽ€.

For CHAP, the NAS generates a random challenge (preferably 16 octets) and sends it to the user, who sends back a CHAP response along with a CHAP ID and CHAP username ๐Ÿง. The NAS then sends an Access-Request packet to the RADIUS server with the CHAP username as the User-Name, and the CHAP ID and CHAP response as the CHAP-Password (Attribute 3). The random challenge can go in the CHAP-Challenge attribute or, if it's 16 octets long, it can be placed in the Request Authenticator field of the Access-Request packet ๐ŸŒท. The NAS MAY include the Attributes Service-Type = Framed-User and Framed-Protocol = PPP as a hint to the RADIUS server that PPP service is expected ๐Ÿ’ซ.

The RADIUS server looks up a password based on the User-Name. Then it encrypts the challenge using MD5 on the CHAP ID octet, that password, and the CHAP challenge (from the CHAP-Challenge attribute if it's there, otherwise from the Request Authenticator), and compares that result to the CHAP-Password ๐Ÿ”. If they match, the server sends back an Access-Accept. Otherwise, it sends back an Access-Reject โœ….

If the RADIUS server can't perform the requested authentication, it MUST return an Access-Reject ๐Ÿ™…. For example, CHAP requires the user's password to be available in cleartext to the server, so the server can encrypt the CHAP challenge and compare it to the CHAP response ๐Ÿ”“. If the password isn't available in cleartext to the RADIUS server, the server MUST send an Access-Reject to the client ๐Ÿšซ๐Ÿ’….

2.3. Proxy โœจ

Okay so, with proxy RADIUS, one RADIUS server receives an authentication (or accounting) request from a RADIUS client (like a NAS ๐Ÿ’…), forwards it to a remote RADIUS server, gets the reply back from that remote server, and then sends that reply to the client, possibly with tweaks to reflect local administrative policy ๐ŸŽ€. A super common use for proxy RADIUS is roaming ๐ŸŒˆ. Roaming lets two or more administrative entities let each other's users dial in to either entity's network for service. It's giving network friendship, bestie ๐Ÿซถ

The NAS sends its RADIUS access-request to the "forwarding server," which forwards it to the "remote server." The remote server sends a response (Access-Accept, Access-Reject, or Access-Challenge) back to the forwarding server, which sends it back to the NAS. The User-Name attribute MAY contain a Network Access Identifier [8] for RADIUS Proxy operations. The choice of which server receives the forwarded request SHOULD be based on the authentication "realm." The authentication realm MAY be the realm part of a Network Access Identifier (a "named realm"). Alternatively, the choice of which server receives the forwarded request MAY be based on whatever other criteria the forwarding server is configured to use, such as Called-Station-Id (a "numbered realm") ๐Ÿฆ‹

A RADIUS server can function as both a forwarding server and a remote server, serving as a forwarding server for some realms and a remote server for other realms. One forwarding server can act as a forwarder for any number of remote servers. A remote server can have any number of servers forwarding to it and can provide authentication for any number of realms. One forwarding server can forward to another forwarding server to create a chain of proxies, although care must be taken to avoid introducing loops ๐ŸŒธ

The following scenario illustrates a proxy RADIUS communication between a NAS and the forwarding and remote RADIUS servers:

  1. A NAS sends its access-request to the forwarding server.
  2. The forwarding server forwards the access-request to the remote server.
  3. The remote server sends an access-accept, access-reject or access-challenge back to the forwarding server. For this example, an access-accept is sent.
  4. The forwarding server sends the access-accept to the NAS.

The forwarding server MUST treat any Proxy-State attributes already in the packet as opaque data. Its operation MUST NOT depend on the content of Proxy-State attributes added by previous servers. ๐Ÿ™ˆ

If there are any Proxy-State attributes in the request received from the client, the forwarding server MUST include those Proxy-State attributes in its reply to the client. The forwarding server MAY include the Proxy-State attributes in the access-request when it forwards the request, or MAY omit them in the forwarded request. If the forwarding server omits the Proxy-State attributes in the forwarded access-request, it MUST attach them to the response before sending it to the client.

We now examine each step in more detail, so grab a snack ๐Ÿ“

  1. A NAS sends its access-request to the forwarding server. The forwarding server decrypts the User-Password, if present, using the shared secret it knows for the NAS. If a CHAP-Password attribute is present in the packet and no CHAP-Challenge attribute is present, the forwarding server MUST leave the Request-Authenticator untouched or copy it to a CHAP-Challenge attribute.

The forwarding server MAY add one Proxy-State attribute to the packet. (It MUST NOT add more than one.) If it adds a Proxy-State, the Proxy-State MUST appear after any other Proxy-States in the packet. The forwarding server MUST NOT modify any other Proxy-States that were in the packet (it may choose not to forward them, but it MUST NOT change their contents). The forwarding server MUST NOT change the order of any attributes of the same type, including Proxy-State. ๐Ÿ’–

  1. The forwarding server encrypts the User-Password, if present, using the secret it shares with the remote server, sets the Identifier as needed, and forwards the access-request to the remote server.
  2. The remote server (if the final destination) verifies the user using User-Password, CHAP-Password, or such method as future extensions may dictate, and returns an access-accept, access-reject or access-challenge back to the forwarding server. For this example, an access-accept is sent. The remote server MUST copy all Proxy-State attributes (and only the Proxy-State attributes) in order from the access-request to the response packet, without modifying them. ๐Ÿงš
  3. The forwarding server verifies the Response Authenticator using the secret it shares with the remote server, and silently discards the packet if it fails verification. If the packet passes verification, the forwarding server removes the last Proxy-State (if it attached one), signs the Response Authenticator using the secret it shares with the NAS, restores the Identifier to match the one in the original request by the NAS, and sends the access-accept to the NAS. โœจ

A forwarding server MAY need to modify attributes to enforce local policy. Such policy is outside the scope of this document, with the following restrictions. A forwarding server MUST not modify existing Proxy-State, State, or Class attributes present in the packet. ๐Ÿ”ฅ

Implementers of forwarding servers should consider carefully which values it is willing to accept for Service-Type. Careful consideration must be given to the effects of passing along Service-Types of NAS-Prompt or Administrative in a proxied Access-Accept, and implementers may wish to provide mechanisms to block those or other service types, or other attributes. Such mechanisms are outside the scope of this document. ๐Ÿ‘‘


2.4. Why UDP? ๐Ÿฆ‹

A frequently asked question is why RADIUS uses UDP instead of TCP as a transport protocol. UDP was chosen for strictly technical reasons. Literally no vibes involved ๐Ÿ’…

There are a number of issues which must be understood. RADIUS is a transaction based protocol which has several interesting characteristics:

  1. If the request to a primary Authentication server fails, a secondary server must be queried.

To meet this requirement, a copy of the request must be kept above the transport layer to allow for alternate transmission. This means that retransmission timers are still required.

  1. The timing requirements of this particular protocol are significantly different than TCP provides.

At one extreme, RADIUS does not require a "responsive" detection of lost data. The user is willing to wait several seconds for the authentication to complete. The generally aggressive TCP retransmission (based on average round trip time) is not required, nor is the acknowledgement overhead of TCP.

At the other extreme, the user is not willing to wait several minutes for authentication. Therefore the reliable delivery of TCP data two minutes later is not useful. The faster use of an alternate server allows the user to gain access before giving up. โฐ

  1. The stateless nature of this protocol simplifies the use of UDP.

Clients and servers come and go. Systems are rebooted, or are power cycled independently. Generally this does not cause a problem and with creative timeouts and detection of lost TCP connections, code can be written to handle anomalous events. UDP however completely eliminates any of this special handling. Each client and server can open their UDP transport just once and leave it open through all types of failure events on the network. ๐ŸŒˆ

  1. UDP simplifies the server implementation.

In the earliest implementations of RADIUS, the server was single threaded. This means that a single request was received, processed, and returned. This was found to be unmanageable in environments where the back-end security mechanism took real time (1 or more seconds). The server request queue would fill and in environments where hundreds of people were being authenticated every minute, the request turn-around time increased to longer than users were willing to wait (this was especially severe when a specific lookup in a database or over DNS took 30 or more seconds). The obvious solution was to make the server multi-threaded. Achieving this was simple with UDP. Separate processes were spawned to serve each request and these processes could respond directly to the client NAS with a simple UDP packet to the original transport of the client. ๐Ÿ“

It's not all a panacea. As noted, using UDP requires one thing which is built into TCP: with UDP we must artificially manage retransmission timers to the same server, although they don't require the same attention to timing provided by TCP. This one penalty is a small price to pay for the advantages of UDP in this protocol. ๐Ÿ’œ

Without TCP we would still probably be using tin cans connected by string. But for this particular protocol, UDP is a better choice. ๐Ÿฅซโœจ


2.5. Retransmission Hints ๐Ÿ’Œ

If the RADIUS server and alternate RADIUS server share the same shared secret, it is OK to retransmit the packet to the alternate RADIUS server with the same ID and Request Authenticator, because the content of the attributes haven't changed. If you want to use a new Request Authenticator when sending to the alternate server, you may.

If you change the contents of the User-Password attribute (or any other attribute), you need a new Request Authenticator and therefore a new ID.

If the NAS is retransmitting a RADIUS request to the same server as before, and the attributes haven't changed, you MUST use the same Request Authenticator, ID, and source port. If any attributes have changed, you MUST use a new Request Authenticator and ID. ๐Ÿซถ

A NAS MAY use the same ID across all servers, or MAY keep track of IDs separately for each server, it is up to the implementer. If a NAS needs more than 256 IDs for outstanding requests, it MAY use additional source ports to send requests from, and keep track of IDs for each source port. This allows up to 16 million or so outstanding requests at one time to a single server. ๐Ÿ”ข


2.6. Keep-Alives Considered Harmful ๐Ÿšซ

Some implementers have adopted the practice of sending test RADIUS requests to see if a server is alive. This practice is strongly discouraged, since it adds to load and harms scalability without providing any additional useful information. Since a RADIUS request is contained in a single datagram, in the time it would take you to send a ping you could just send the RADIUS request, and getting a reply tells you that the RADIUS server is up. If you do not have a RADIUS request to send, it does not matter if the server is up or not, because you are not using it. ๐Ÿ˜ญ

If you want to monitor your RADIUS server, use SNMP. That's what SNMP is for. ๐Ÿ’€

3. Packet Format โœจ

okay so bestie, first things first: exactly one RADIUS packet rides inside the UDP Data field [4], and the UDP Destination Port is 1812 (decimal) ๐ŸŽ€. When the server sends a reply, the source and destination ports get swapped, so it's giving mirror ๐Ÿชž

Quick history tea โ˜•: this doc is documenting RADIUS. Early deployments used UDP port 1645, which clashed with the "datametrics" service, so the officially assigned port is now 1812. Port glow-up ๐Ÿฆ‹

Here's the RADIUS data format at a glance. Fields go left to right:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                         Authenticator                         |
   |                                                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Attributes ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-

Code

The Code field is one octet and tells you what type of RADIUS packet you're looking at ๐Ÿ‘€. If a packet shows up with an invalid Code field, it just gets silently discarded ๐Ÿ’€.

Here are the RADIUS Codes (decimal):

  1       Access-Request
  2       Access-Accept
  3       Access-Reject
  4       Accounting-Request
  5       Accounting-Response
 11       Access-Challenge
 12       Status-Server (experimental)
 13       Status-Client (experimental)
255       Reserved

Codes 4 and 5 live in the RADIUS Accounting document [5], so go check that one for the tea on them ๐Ÿ“š. Codes 12 and 13 are reserved for possible future use, but this doc doesn't dig into them any further ๐Ÿคทโ€โ™€๏ธ.

Identifier

The Identifier field is one octet and helps match requests with replies ๐ŸŽฏ. A RADIUS server can spot a duplicate request if it sees the same client source IP address, source UDP port, and Identifier within a short span of time ๐Ÿ•ต๏ธโ€โ™€๏ธ.

Length

The Length field is two octets ๐Ÿงฎ. It tells you the length of the whole packet, counting the Code, Identifier, Length, Authenticator, and Attribute fields. Any octets outside the range of the Length field MUST be treated as padding and ignored on reception ๐Ÿซง. If the packet is shorter than the Length field says, it MUST be silently discarded ๐Ÿ—‘๏ธ. The minimum length is 20 and the maximum length is 4096 ๐Ÿ“.

Authenticator

The Authenticator field is sixteen (16) octets ๐Ÿ’œ. The most significant octet goes out first. This value is used to authenticate the reply from the RADIUS server, and it's also used in the password hiding algorithm ๐Ÿ”. Main character energy for sure โœจ.

Request Authenticator

In Access-Request packets, the Authenticator value is a 16 octet random number called the Request Authenticator ๐ŸŽฒ. It SHOULD be unpredictable and unique over the lifetime of a secret (the password shared between the client and the RADIUS server). Why so serious? Because if a request value gets repeated with the same secret, an attacker could reply with a response they intercepted earlier ๐Ÿ˜ฑ. Since the same secret MAY be used to authenticate with servers in totally different geographic regions, the Request Authenticator field SHOULD exhibit global and temporal uniqueness ๐ŸŒ.

The Request Authenticator value in an Access-Request packet SHOULD also be unpredictable. Otherwise an attacker could trick a server into answering a predicted future request, then use that answer to pretend to be the server during a future Access-Request ๐Ÿฅท.

Here's the honest part ๐Ÿซถ: protocols like RADIUS can't protect against someone stealing an authenticated session through realtime active wiretapping. BUT generating unique, unpredictable requests can protect against a wide range of active attacks against authentication ๐Ÿ›ก๏ธ.

The NAS and RADIUS server share a secret ๐Ÿค. That shared secret, followed by the Request Authenticator, goes through a one-way MD5 hash to create a 16 octet digest value. That digest gets XORed with the password the user typed, and the XORed result goes into the User-Password attribute in the Access-Request packet ๐Ÿ”’. For the full breakdown, check out the User-Password entry in the Attributes section ๐Ÿ“–.

Response Authenticator

The Authenticator field value in Access-Accept, Access-Reject, and Access-Challenge packets is called the Response Authenticator ๐Ÿ’…. It holds a one-way MD5 hash calculated over a stream of octets made of: the RADIUS packet starting from the Code field (including the Identifier, the Length, the Request Authenticator field from the Access-Request packet, and the response Attributes), followed by the shared secret ๐Ÿง. Written out, that's:

ResponseAuth = MD5(Code+ID+Length+RequestAuth+Attributes+Secret)

where + means concatenation ๐Ÿ”—.

Administrative Note

Okay, this part is super important bestie ๐Ÿšจ. The secret (the password shared between the client and the RADIUS server) SHOULD be at least as large and unguessable as a well-chosen password. It's preferred that the secret be at least 16 octets ๐Ÿ”‘. That gives the secret a big enough range to protect against exhaustive search attacks ๐Ÿ’ช. The secret MUST NOT be empty (length 0), because that would let anyone trivially forge packets ๐Ÿšซ.

A RADIUS server MUST use the source IP address of the RADIUS UDP packet to decide which shared secret to use, so RADIUS requests can be proxied ๐Ÿ”€.

When there's a forwarding proxy in the mix, the proxy has to be able to alter the packet as it passes through in each direction ๐Ÿ”„. When the proxy forwards the request, it MAY add a Proxy-State Attribute. When it forwards a response, it MUST remove its Proxy-State Attribute if it added one ๐Ÿงน. Proxy-State is always added or removed after any other Proxy-States, but no other assumptions can be made about where it sits in the list of attributes ๐Ÿค”. And here's the drama ๐ŸŽญ: Access-Accept and Access-Reject replies are authenticated over the entire packet contents, so stripping the Proxy-State attribute invalidates the signature. That means the proxy has to re-sign it ๐Ÿ”.

Further details of RADIUS proxy implementation are outside the scope of this document ๐Ÿ™…โ€โ™€๏ธ.

4. Packet Types ๐ŸŽ€

The RADIUS Packet type is determined by the Code field in the first octet of the Packet ๐Ÿท๏ธ.

4.1. Access-Request

Description

Access-Request packets are sent to a RADIUS server ๐Ÿ“จ. They carry information used to decide whether a user is allowed access to a specific NAS, plus any special services requested for that user ๐ŸŽซ. An implementation that wants to authenticate a user MUST transmit a RADIUS packet with the Code field set to 1 (Access-Request) ๐Ÿ™‹โ€โ™€๏ธ.

When a valid client's Access-Request shows up, an appropriate reply MUST be transmitted ๐Ÿ“ฌ.

An Access-Request SHOULD contain a User-Name attribute ๐Ÿท๏ธ. It MUST contain either a NAS-IP-Address attribute or a NAS-Identifier attribute (or both) ๐Ÿชช.

An Access-Request MUST contain either a User-Password, a CHAP-Password, or a State ๐Ÿ”. An Access-Request MUST NOT contain both a User-Password and a CHAP-Password ๐Ÿ™…โ€โ™€๏ธ. If future extensions let other kinds of authentication information be conveyed, that attribute can be used in an Access-Request instead of User-Password or CHAP-Password ๐Ÿ”ฎ.

An Access-Request SHOULD contain a NAS-Port or NAS-Port-Type attribute, or both, unless the type of access being requested doesn't involve a port or the NAS doesn't distinguish among its ports ๐Ÿšช.

An Access-Request MAY contain additional attributes as a hint to the server, but the server isn't required to honor the hint ๐Ÿ’โ€โ™€๏ธ.

When a User-Password is present, it gets hidden using a method based on the RSA Message Digest Algorithm MD5 [3] ๐Ÿซฃ.

Here's the Access-Request packet format at a glance. Fields go left to right:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                     Request Authenticator                     |
   |                                                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Attributes ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-

Code

It's 1 for Access-Request ๐Ÿ”ข.

Identifier

The Identifier field MUST be changed whenever the content of the Attributes field changes, and also whenever a valid reply has been received for a previous request ๐Ÿ”„. For retransmissions, the Identifier MUST remain unchanged ๐Ÿ”’.

Request Authenticator

The Request Authenticator value MUST be changed each time a new Identifier is used ๐ŸŽฒ.

Attributes

The Attribute field is variable in length. It holds the list of Attributes required for the type of service, plus any optional Attributes you want to add ๐Ÿงฉ.

4.2. Access-Accept

Description

Access-Accept packets are sent by the RADIUS server, and they give the specific configuration info needed to start delivering service to the user ๐ŸŽ‰. If all Attribute values in an Access-Request are acceptable, the RADIUS implementation MUST transmit a packet with the Code field set to 2 (Access-Accept) โœ….

When an Access-Accept comes in, its Identifier field gets matched with a pending Access-Request ๐Ÿ”. The Response Authenticator field MUST contain the correct response for that pending Access-Request ๐Ÿงพ. Invalid packets are silently discarded ๐Ÿ—‘๏ธ.

Here's the Access-Accept packet format at a glance. Fields go left to right:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                     Response Authenticator                    |
   |                                                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Attributes ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-

Code

It's 2 for Access-Accept ๐Ÿฅณ.

Identifier

The Identifier field is a copy of the Identifier field from the Access-Request that caused this Access-Accept ๐Ÿชž.

Response Authenticator

The Response Authenticator value is calculated from the Access-Request value, as described earlier ๐Ÿงฎ.

Attributes

The Attribute field is variable in length and holds a list of zero or more Attributes ๐Ÿ“‹.

4.3. Access-Reject ๐Ÿ™…โ€โ™€๏ธ๐Ÿ’–

Description

okay so if ANY of the received Attributes isn't acceptable, the RADIUS server MUST send back a packet with the Code field set to 3 (Access-Reject) ๐Ÿ’…. It MAY include one or more Reply-Message Attributes with a text message that the NAS MAY display to the user ๐Ÿ’Œ.

Here's a quick look at the Access-Reject packet format. Fields go left to right ๐Ÿ‘€โœจ

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Code      |  Identifier   |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Response Authenticator                    |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Attributes ...
+-+-+-+-+-+-+-+-+-+-+-+-+-

Code

It's 3 for Access-Reject, no drama ๐Ÿซถ

Identifier

The Identifier field is a copy of the Identifier field of the Access-Request that caused this Access-Reject. So it's basically the reply saying "yep, this is for THAT request" ๐ŸŽ€

Response Authenticator

The Response Authenticator value is calculated from the Access-Request value, as described earlier ๐Ÿ”

Attributes

The Attribute field is variable in length and holds a list of zero or more Attributes ๐Ÿงฉ


4.4. Access-Challenge ๐Ÿง โœจ

Description

If the RADIUS server wants to send the user a challenge that needs a response, then the RADIUS server MUST answer the Access-Request by transmitting a packet with the Code field set to 11 (Access-Challenge) ๐Ÿซฃ

The Attributes field MAY have one or more Reply-Message Attributes, and MAY have a single State Attribute, or none at all. Vendor-Specific, Idle-Timeout, Session-Timeout and Proxy-State attributes MAY also be included. No other Attributes defined in this document are permitted in an Access-Challenge. Very strict, very iconic ๐Ÿ’…

When an Access-Challenge comes in, the Identifier field gets matched with a pending Access-Request. On top of that, the Response Authenticator field MUST contain the correct response for the pending Access-Request. Invalid packets are silently discarded ๐Ÿคซ๐Ÿ—‘๏ธ

If the NAS doesn't support challenge/response, it MUST treat an Access-Challenge as though it had received an Access-Reject instead. Bestie, no exceptions ๐Ÿ™…โ€โ™€๏ธ

If the NAS does support challenge/response, getting a valid Access-Challenge means a new Access-Request SHOULD be sent. The NAS MAY display the text message, if there is one, to the user, and then prompt them for a response. Then it sends its original Access-Request again, this time with a new request ID and Request Authenticator. The User-Password Attribute gets replaced by the user's response (encrypted), and it includes the State Attribute from the Access-Challenge, if there is one. Only 0 or 1 instances of the State Attribute can be present in an Access-Request ๐ŸŒธ

A NAS that supports PAP MAY forward the Reply-Message to the dialing client and accept a PAP response, which it can use as though the user had typed the response in. If the NAS can't do that, it MUST treat the Access-Challenge as though it had received an Access-Reject instead ๐ŸŒˆ

Here's the Access-Challenge packet format. Fields go left to right ๐Ÿฆ‹

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Code      |  Identifier   |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Response Authenticator                    |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Attributes ...
+-+-+-+-+-+-+-+-+-+-+-+-+-

Code

It's 11 for Access-Challenge ๐ŸŽฏ

Identifier

The Identifier field is a copy of the Identifier field of the Access-Request that caused this Access-Challenge ๐Ÿชž

Response Authenticator

The Response Authenticator value is calculated from the Access-Request value, as described earlier ๐Ÿ”

Attributes

The Attributes field is variable in length and holds a list of zero or more Attributes ๐Ÿงฉ


5. Attributes ๐ŸŽ€

RADIUS Attributes carry the specific authentication, authorization, information and configuration details for the request and reply. They're the juicy bits ๐Ÿ“

The end of the list of Attributes is indicated by the Length of the RADIUS packet. So the packet itself tells you where the list stops ๐Ÿ“

Some Attributes MAY be included more than once. What that means is Attribute-specific, and each Attribute's description spells it out. There's a summary table at the end of the "Attributes" section ๐Ÿ“‹

If multiple Attributes with the same Type are present, the order of Attributes with the same Type MUST be preserved by any proxies. The order of Attributes of different Types is not required to be preserved. A RADIUS server or client MUST NOT have any dependencies on the order of attributes of different types. A RADIUS server or client MUST NOT require attributes of the same type to be contiguous. Order matters for the same type, and nobody gets to depend on the rest ๐Ÿ™…โ€โ™€๏ธ๐Ÿ’…

Where an Attribute's description limits which kinds of packet it can be in, that applies only to the packet types defined in this document. Those are Access-Request, Access-Accept, Access-Reject and Access-Challenge (Codes 1, 2, 3, and 11). Other documents defining other packet types may also use the Attributes described here. To find out which Attributes are allowed in Accounting-Request and Accounting-Response packets (Codes 4 and 5), refer to the RADIUS Accounting document [5] ๐Ÿ“š

Likewise, where packet types defined here say only certain Attributes are allowed in them, future memos that define new Attributes should say which packet types those new Attributes may be present in ๐Ÿ”ฎ

Here's the Attribute format. Fields go left to right ๐Ÿ‘€

 0                   1                   2
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|     Type      |    Length     |  Value ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

The Type field is one octet. Up-to-date values of the RADIUS Type field are specified in the most recent "Assigned Numbers" RFC [6] ๐Ÿ“–. Values 192-223 are reserved for experimental use, values 224-240 are reserved for implementation-specific use, and values 241-255 are reserved and should not be used ๐Ÿšง

A RADIUS server MAY ignore Attributes with an unknown Type ๐Ÿ™ˆ

A RADIUS client MAY ignore Attributes with an unknown Type ๐Ÿ™ˆ

This specification concerns the following values ๐ŸŒŸ

    1      User-Name
    2      User-Password
    3      CHAP-Password
    4      NAS-IP-Address
    5      NAS-Port
    6      Service-Type
    7      Framed-Protocol
    8      Framed-IP-Address
    9      Framed-IP-Netmask
   10      Framed-Routing
   11      Filter-Id
   12      Framed-MTU
   13      Framed-Compression
   14      Login-IP-Host
   15      Login-Service
   16      Login-TCP-Port
   17      (unassigned)
   18      Reply-Message
   19      Callback-Number
   20      Callback-Id
   21      (unassigned)
   22      Framed-Route
   23      Framed-IPX-Network
   24      State
   25      Class
   26      Vendor-Specific
   27      Session-Timeout
   28      Idle-Timeout
   29      Termination-Action
   30      Called-Station-Id
   31      Calling-Station-Id
   32      NAS-Identifier
   33      Proxy-State
   34      Login-LAT-Service
   35      Login-LAT-Node
   36      Login-LAT-Group
   37      Framed-AppleTalk-Link
   38      Framed-AppleTalk-Network
   39      Framed-AppleTalk-Zone
   40-59   (reserved for accounting)
   60      CHAP-Challenge
   61      NAS-Port-Type
   62      Port-Limit
   63      Login-LAT-Port

Length

The Length field is one octet and tells you the length of this Attribute, including the Type, Length and Value fields ๐Ÿ“. If an Attribute is received in an Access-Request but has an invalid Length, an Access-Reject SHOULD be transmitted. If an Attribute is received in an Access-Accept, Access-Reject or Access-Challenge packet with an invalid length, the packet MUST either be treated as an Access-Reject or else silently discarded ๐Ÿซ 

Value

The Value field is zero or more octets and holds information specific to the Attribute. The format and length of the Value field is determined by the Type and Length fields ๐ŸŽ

Note that none of the types in RADIUS terminate with a NUL (hex 00). In particular, types "text" and "string" in RADIUS do not terminate with a NUL (hex 00). The Attribute has a length field and does not use a terminator. Text contains UTF-8 encoded 10646 [7] characters and String contains 8-bit binary data. Servers and servers and clients MUST be able to deal with embedded nulls. RADIUS implementers using C are cautioned not to use strcpy() when handling strings. Ahem, please, C devs, step away from strcpy() ๐Ÿ™๐Ÿ’€

The format of the value field is one of five data types. Note that type "text" is a subset of type "string" โœจ

text      1-253 octets containing UTF-8 encoded 10646 [7]
          characters.  Text of length zero (0) MUST NOT be sent;
          omit the entire attribute instead.

string    1-253 octets containing binary data (values 0 through
          255 decimal, inclusive).  Strings of length zero (0)
          MUST NOT be sent; omit the entire attribute instead.

address   32 bit value, most significant octet first.

integer   32 bit unsigned value, most significant octet first.

time      32 bit unsigned value, most significant octet first --
          seconds since 00:00:00 UTC, January 1, 1970.  The
          standard Attributes do not use this data type but it is
          presented here for possible use in future attributes.

5.1. User-Name โœจ

Description ๐Ÿ’–

Okay bestie, this Attribute carries the name of the user who's getting authenticated ๐ŸŽ€ It MUST be sent in Access-Request packets if available.

It MAY be sent in an Access-Accept packet too. If it is, the client SHOULD use the name that came back in the Access-Accept packet for all Accounting-Request packets in this session ๐Ÿ’… And if the Access-Accept includes Service-Type = Rlogin plus the User-Name attribute, a NAS MAY use that returned User-Name when it does the Rlogin function ๐Ÿฆ‹

Here's the User-Name layout. The fields are sent left to right, obvi โœจ

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐ŸŒธ

1 means User-Name.

Length ๐ŸŒธ

>= 3

String ๐Ÿงš

The String field is one or more octets. The NAS may limit the maximum length of the User-Name, but being able to handle at least 63 octets is recommended ๐Ÿ’…

The format of the username MAY be one of several forms:

  • text: Consisting only of UTF-8 encoded 10646 [7] characters.
  • network access identifier: A Network Access Identifier as described in RFC 2486 [8].
  • distinguished name: A name in ASN.1 form used in Public Key authentication systems.

5.2. User-Password ๐Ÿ”

Description ๐Ÿ’œ

This Attribute holds the password of the user being authenticated, or the user's input after an Access-Challenge. It's only used in Access-Request packets ๐Ÿฆ‹

Now the hiding part, which is so fun. On transmission, the password gets hidden ๐Ÿ™ˆ First it's padded at the end with nulls until it's a multiple of 16 octets. Then a one-way MD5 hash gets calculated over a stream of octets made of the shared secret followed by the Request Authenticator. That value is XORed with the first 16 octet segment of the password, and the result goes into the first 16 octets of the String field of the User-Password Attribute โœจ

If the password is longer than 16 characters, a second one-way MD5 hash is calculated over the shared secret followed by the result of the first xor. That hash gets XORed with the second 16 octet segment of the password, and the result goes into the second 16 octets of the String field ๐ŸŒˆ

If necessary, this operation repeats. Each xor result is used with the shared secret to make the next hash, which XORs the next segment of the password. This goes on for no more than 128 characters ๐Ÿ’€

The method is taken from the book "Network Security" by Kaufman, Perlman and Speciner [9] pages 109-110. Here's a more precise explanation of how it works:

Call the shared secret S and the pseudo-random 128-bit Request Authenticator RA. Break the password into 16-octet chunks p1, p2, etc., with the last one padded at the end with nulls to a 16-octet boundary. Call the ciphertext blocks c(1), c(2), etc. We'll need intermediate values b1, b2, etc.

         b1 = MD5(S + RA)       c(1) = p1 xor b1
         b2 = MD5(S + c(1))     c(2) = p2 xor b2
                .                       .
                .                       .
                .                       .
         bi = MD5(S + c(i-1))   c(i) = pi xor bi

The String will contain c(1)+c(2)+...+c(i), where + denotes concatenation. On receipt, the process gets reversed to get back the original password ๐Ÿ”„

Here's the User-Password layout:

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐ŸŒธ

2 means User-Password.

Length ๐ŸŒธ

At least 18 and no larger than 130.

String ๐Ÿงš

The String field is between 16 and 128 octets long, inclusive.


5.3. CHAP-Password ๐ŸŽ€

Description ๐Ÿ’–

This Attribute holds the response value from a PPP Challenge-Handshake Authentication Protocol (CHAP) user, answering the challenge. It's only used in Access-Request packets ๐Ÿซถ

The CHAP challenge value is in the CHAP-Challenge Attribute (60) if that's in the packet. Otherwise, it's in the Request Authenticator field โœจ

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  CHAP Ident   |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐ŸŒธ

3 means CHAP-Password.

Length ๐ŸŒธ

19

CHAP Ident ๐Ÿงš

This field is one octet, and it holds the CHAP Identifier from the user's CHAP Response.

String ๐Ÿ’…

The String field is 16 octets, and it holds the CHAP Response from the user.


5.4. NAS-IP-Address ๐ŸŒ

Description ๐Ÿ’œ

This Attribute gives the identifying IP Address of the NAS that's asking for the user to be authenticated. It SHOULD be unique to the NAS within the scope of the RADIUS server ๐Ÿ‘‘ NAS-IP-Address is only used in Access-Request packets. Either NAS-IP-Address or NAS-Identifier MUST be present in an Access-Request packet.

Now the important bit ๐Ÿšจ NAS-IP-Address MUST NOT be used to pick the shared secret that authenticates the request. The source IP address of the Access-Request packet MUST be used to pick the shared secret ๐Ÿ”ฅ

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |            Address
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            Address (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type ๐ŸŒธ

4 means NAS-IP-Address.

Length ๐ŸŒธ

6

Address ๐Ÿงš

The Address field is four octets.


5.5. NAS-Port ๐Ÿ”Œ

Description ๐Ÿ’–

This Attribute gives the physical port number of the NAS that's authenticating the user. It's only used in Access-Request packets ๐Ÿฆ‹ Quick heads up: "port" here means a physical connection on the NAS, not a TCP or UDP port number, so don't mix those up ๐Ÿ™ƒ

Either NAS-Port or NAS-Port-Type (61) or both SHOULD be present in an Access-Request packet, if the NAS differentiates among its ports โœจ

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type ๐ŸŒธ

5 means NAS-Port.

Length ๐ŸŒธ

6

Value ๐Ÿงš

The Value field is four octets.


5.6. Service-Type ๐ŸŽญ

Description ๐Ÿ’…

This Attribute says what type of service the user has asked for, or what type of service is going to be provided. It MAY be used in both Access-Request and Access-Accept packets. A NAS is not required to implement all of these service types, and it MUST treat unknown or unsupported Service-Types as though an Access-Reject had been received instead ๐Ÿ’€

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type ๐ŸŒธ

6 means Service-Type.

Length ๐ŸŒธ

6

Value ๐Ÿงš

The Value field is four octets. Here are the service type values:

       1      Login
       2      Framed
       3      Callback Login
       4      Callback Framed
       5      Outbound
       6      Administrative
       7      NAS Prompt
       8      Authenticate Only
       9      Callback NAS Prompt
      10      Call Check
      11      Callback Administrative

Okay, so the service types get defined like this when they're used in an Access-Accept. When they're used in an Access-Request, they MAY be considered to be a hint to the RADIUS server that the NAS has reason to believe the user would prefer the kind of service indicated, but the server is not required to honor the hint ๐ŸŒˆ

Login               The user should be connected to a host.

Framed              A Framed Protocol should be started for the
                    User, such as PPP or SLIP.

Callback Login      The user should be disconnected and called
                    back, then connected to a host.

Callback Framed     The user should be disconnected and called
                    back, then a Framed Protocol should be started
                    for the User, such as PPP or SLIP.

Outbound            The user should be granted access to outgoing
                    devices.

Administrative      The user should be granted access to the
                    administrative interface to the NAS from which
                    privileged commands can be executed.

NAS Prompt          The user should be provided a command prompt
                    on the NAS from which non-privileged commands
                    can be executed.

Authenticate Only   Only Authentication is requested, and no
                    authorization information needs to be returned
                    in the Access-Accept (typically used by proxy
                    servers rather than the NAS itself).

Callback NAS Prompt The user should be disconnected and called
                    back, then provided a command prompt on the
                    NAS from which non-privileged commands can be
                    executed.

Call Check          Used by the NAS in an Access-Request packet to
                    indicate that a call is being received and
                    that the RADIUS server should send back an
                    Access-Accept to answer the call, or an
                    Access-Reject to not accept the call,
                    typically based on the Called-Station-Id or
                    Calling-Station-Id attributes.  It is
                    recommended that such Access-Requests use the
                    value of Calling-Station-Id as the value of
                    the User-Name.

Callback Administrative
                    The user should be disconnected and called
                    back, then granted access to the
                    administrative interface to the NAS from which
                    privileged commands can be executed.

5.7. Framed-Protocol ๐ŸŽ€

Description

okay so this Attribute tells the NAS which framing to use for framed access ๐Ÿฆ‹ It MAY be used in both Access-Request and Access-Accept packets.

here's the layout of the Framed-Protocol Attribute โœจ the fields get sent left to right, obviously ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

it's type 7 for Framed-Protocol ๐Ÿ‘‘

Length

the length is 6 ๐Ÿ“

Value

the Value field is four octets ๐Ÿงš

1      PPP
2      SLIP
3      AppleTalk Remote Access Protocol (ARAP)
4      Gandalf proprietary SingleLink/MultiLink protocol
5      Xylogics proprietary IPX/SLIP
6      X.75 Synchronous

5.8. Framed-IP-Address ๐Ÿฆ‹

Description

this Attribute tells the NAS which address to configure for the user ๐Ÿซถ It MAY be used in Access-Accept packets. It MAY be used in an Access-Request packet as a hint from the NAS to the server that it would prefer that address, but the server is not required to honor the hint. the server can totally ignore it, no drama ๐Ÿ™ˆ

here's the layout of the Framed-IP-Address Attribute โœจ the fields get sent left to right ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |            Address
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            Address (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

it's type 8 for Framed-IP-Address ๐ŸŒธ

Length

the length is 6 ๐Ÿ“

Address

the Address field is four octets ๐Ÿงš the value 0xFFFFFFFF means the NAS should let the user pick an address (like Negotiated ๐Ÿฆ‹). the value 0xFFFFFFFE means the NAS should pick an address for the user (like Assigned from a pool of addresses kept by the NAS). any other valid value means the NAS should use that value as the user's IP address ๐Ÿ’–

5.9. Framed-IP-Netmask ๐ŸŒˆ

Description

this Attribute tells the NAS which IP netmask to configure for the user when the user is a router to a network ๐ŸŒธ It MAY be used in Access-Accept packets. It MAY be used in an Access-Request packet as a hint from the NAS to the server that it would prefer that netmask, but the server is not required to honor the hint ๐Ÿ™ˆ

here's the layout of the Framed-IP-Netmask Attribute โœจ the fields get sent left to right ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |            Address
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            Address (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

it's type 9 for Framed-IP-Netmask ๐Ÿ“

Length

the length is 6 ๐Ÿงš

Address

the Address field is four octets, and it specifies the IP netmask of the user ๐Ÿ’œ

5.10. Framed-Routing ๐Ÿฆ‹

Description

this Attribute tells the NAS which routing method to use for the user, when the user is a router to a network ๐Ÿ‘‘ It is only used in Access-Accept packets.

here's the layout of the Framed-Routing Attribute โœจ the fields get sent left to right ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

it's type 10 for Framed-Routing ๐ŸŒธ

Length

the length is 6 ๐Ÿ“

Value

the Value field is four octets ๐Ÿงš

 0      None
 1      Send routing packets
 2      Listen for routing packets
 3      Send and Listen

5.11. Filter-Id ๐Ÿ’…

Description

this Attribute tells the NAS the name of the filter list for this user ๐Ÿซถ Zero or more Filter-Id attributes MAY be sent in an Access-Accept packet.

identifying a filter list by name is the move, because the filter can be used on different NASes without caring about filter-list implementation details ๐Ÿฆ‹

here's the layout of the Filter-Id Attribute โœจ the fields get sent left to right ๐Ÿ’…

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  Text ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

it's type 11 for Filter-Id ๐Ÿ‘‘

Length

the length is >= 3 ๐Ÿ“

Text

the Text field is one or more octets, and its contents are implementation dependent ๐ŸŒˆ it's meant to be human readable and MUST NOT affect operation of the protocol ๐Ÿ™ˆ it is recommended that the message contain UTF-8 encoded 10646 [7] characters ๐Ÿ’–

5.12. Framed-MTU ๐ŸŒธ

Description

this Attribute tells the NAS the Maximum Transmission Unit to configure for the user, when it isn't negotiated by some other means (like PPP) โœจ It MAY be used in Access-Accept packets. It MAY be used in an Access-Request packet as a hint from the NAS to the server that it would prefer that value, but the server is not required to honor the hint ๐Ÿซถ

here's the layout of the Framed-MTU Attribute โœจ the fields get sent left to right ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

it's type 12 for Framed-MTU ๐Ÿฆ‹

Length

the length is 6 ๐Ÿ“

Value

the Value field is four octets, and despite the size of the field, values range from 64 to 65535 ๐Ÿงš

5.13. Framed-Compression ๐Ÿ’œ

Description

this Attribute tells the NAS which compression protocol to use for the link ๐ŸŒˆ It MAY be used in Access-Accept packets. It MAY be used in an Access-Request packet as a hint to the server that the NAS would prefer to use that compression, but the server is not required to honor the hint ๐Ÿ™ˆ

More than one compression protocol Attribute MAY be sent ๐Ÿ’… it is the responsibility of the NAS to apply the proper compression protocol to appropriate link traffic ๐Ÿ‘‘

here's the layout of the Framed-Compression Attribute โœจ the fields get sent left to right ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

it's type 13 for Framed-Compression ๐ŸŒธ

Length

the length is 6 ๐Ÿ“

Value

the Value field is four octets ๐Ÿงš

 0      None
 1      VJ TCP/IP header compression [10]
 2      IPX header compression
 3      Stac-LZS compression

5.14. Login-IP-Host ๐Ÿฆ‹

Description

this Attribute tells the NAS which system to connect the user to, when the Login-Service Attribute is included ๐Ÿซถ It MAY be used in Access-Accept packets. It MAY be used in an Access-Request packet as a hint to the server that the NAS would prefer to use that host, but the server is not required to honor the hint ๐Ÿ™ˆ

here's the layout of the Login-IP-Host Attribute โœจ the fields get sent left to right ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |            Address
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            Address (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

it's type 14 for Login-IP-Host ๐Ÿ‘‘

Length

the length is 6 ๐Ÿ“

Address

the Address field is four octets ๐Ÿงš the value 0xFFFFFFFF means the NAS SHOULD let the user select an address. the value 0 means the NAS SHOULD select a host to connect the user to. other values mean the address the NAS SHOULD connect the user to ๐Ÿ’–

5.15. Login-Service ๐ŸŒˆ

Description

this Attribute tells the NAS which service to use to connect the user to the login host ๐Ÿ’… It is only used in Access-Accept packets.

here's the layout of the Login-Service Attribute โœจ the fields get sent left to right ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

it's type 15 for Login-Service ๐Ÿฆ‹

Length

the length is 6 ๐Ÿ“

Value

the Value field is four octets ๐Ÿงš

 0   Telnet
 1   Rlogin
 2   TCP Clear
 3   PortMaster (proprietary)
 4   LAT
 5   X25-PAD
 6   X25-T3POS
 8   TCP Clear Quiet (suppresses any NAS-generated connect string)

5.16. Login-TCP-Port ๐Ÿ’–

Description

this Attribute tells the NAS the TCP port to connect the user to, when the Login-Service Attribute is also present ๐Ÿซถ It is only used in Access-Accept packets.

here's the layout of the Login-TCP-Port Attribute โœจ the fields get sent left to right ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

it's type 16 for Login-TCP-Port ๐ŸŒธ

Length

the length is 6 ๐Ÿ“

Value

the Value field is four octets ๐Ÿงš despite the size of the field, values range from 0 to 65535 ๐ŸŒˆ

5.17. (unassigned) ๐Ÿ™ˆ

Description

ATTRIBUTE TYPE 17 HAS NOT BEEN ASSIGNED.

5.18. Reply-Message ๐Ÿ’ฌ

Description ๐Ÿ’–

This Attribute is how the server sends text that MAY be displayed to the user, bestie! ๐Ÿซถ When it shows up in an Access-Accept, it's the success message โœจ. In an Access-Reject, it's the failure message ๐Ÿ˜ญ, and it MAY be a dialog message that prompts the user before they try another Access-Request. In an Access-Challenge, it MAY be a dialog message asking the user for a response ๐ŸŽ€.

You can include multiple Reply-Message's, and if any of them get displayed, they MUST be displayed in the same order they appear in the packet. Order matters, iykyk ๐Ÿ’….

Here's the Reply-Message layout (fields go left to right) ๐Ÿงš:

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  Text ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐Ÿ“

It's 18 for Reply-Message.

Length ๐ŸŒธ

It has to be >= 3.

Text ๐Ÿฆ‹

The Text field is one or more octets, and what's in it is implementation dependent. It's meant to be human readable, and it MUST NOT affect operation of the protocol, so don't let it be a sneaky plot twist ๐Ÿ’€. It's recommended that the message contain UTF-8 encoded 10646 [7] characters, which is giving clean, universal vibes โœจ.

5.19. Callback-Number ๐Ÿ“ž

Description ๐ŸŒˆ

This Attribute indicates a dialing string to be used for callback. It MAY be used in Access-Accept packets. It MAY also be used in an Access-Request packet as a hint to the server that a Callback service is desired, but the server is not required to honor the hint. Soft ask, not a demand ๐Ÿฅบ.

Here's the layout ๐Ÿ’œ:

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐Ÿ“

It's 19 for Callback-Number.

Length ๐ŸŒธ

It has to be >= 3.

String ๐Ÿฆ‹

The String field is one or more octets. The actual format is site or application specific, and a robust implementation SHOULD support the field as undistinguished octets, so it can handle whatever bytes show up without drama ๐Ÿ’…. How the range of allowed usage gets codified is outside the scope of this specification, so that's a problem for another day ๐Ÿ™ˆ.

5.20. Callback-Id ๐Ÿ†”

Description ๐ŸŒท

This Attribute indicates the name of a place to be called, and it's up to the NAS to interpret it ๐Ÿง . It MAY be used in Access-Accept packets.

Here's the layout ๐ŸŽ€:

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐Ÿ“

It's 20 for Callback-Id.

Length ๐ŸŒธ

It has to be >= 3.

String ๐Ÿฆ‹

The String field is one or more octets. The actual format is site or application specific, and a robust implementation SHOULD support the field as undistinguished octets. The codification of the range of allowed usage of this field is outside the scope of this specification, so again, not our tea to spill here โ˜•.

5.21. (unassigned) ๐Ÿšซ

Description ๐Ÿฅฒ

ATTRIBUTE TYPE 21 HAS NOT BEEN ASSIGNED. Nothing to see here, just a reserved little gap in the lineup ๐Ÿ•ณ๏ธ.

5.22. Framed-Route ๐Ÿ›ฃ๏ธ

Description ๐Ÿ—บ๏ธ

This Attribute provides routing information to be configured for the user on the NAS. It's used in the Access-Accept packet and can appear multiple times, so you can stack those routes like a queen ๐Ÿ‘‘.

Here's the layout ๐Ÿฆ‹:

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  Text ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐Ÿ“

It's 22 for Framed-Route.

Length ๐ŸŒธ

It has to be >= 3.

Text ๐Ÿฆ‹

The Text field is one or more octets, and its contents are implementation dependent. It's meant to be human readable and MUST NOT affect operation of the protocol, no sneaky side effects allowed ๐Ÿ™…โ€โ™€๏ธ. It's recommended that the message contain UTF-8 encoded 10646 [7] characters.

For IP routes, it SHOULD contain a destination prefix in dotted quad form, optionally followed by a slash and a decimal length specifier stating how many high order bits of the prefix to use ๐Ÿงฎ. That's followed by a space, a gateway address in dotted quad form, another space, and one or more metrics separated by spaces. For example:

192.168.1.0/24 192.168.1.1 1 2 -1 3 400

The length specifier MAY be omitted, and if it is, it defaults to 8 bits for class A prefixes, 16 bits for class B prefixes, and 24 bits for class C prefixes. For example:

192.168.1.0 192.168.1.1 1

Whenever the gateway address is specified as 0.0.0.0, the IP address of the user SHOULD be used as the gateway address. Plot twist, the user becomes their own gateway ๐Ÿคฏ.

Wait, I need to correct one thing in that last bit: the original says "The length specifier may be omitted", which is lowercase "may", so it's not a BCP 14 keyword and should stay as plain text. Here it is accurately: the length specifier may be omitted, and in that case it defaults to 8 bits for class A prefixes, 16 bits for class B prefixes, and 24 bits for class C prefixes ๐ŸŒŸ.

5.23. Framed-IPX-Network ๐ŸŒ

Description ๐Ÿ›ฐ๏ธ

This Attribute indicates the IPX Network number to be configured for the user. It is used in Access-Accept packets ๐Ÿ“ฆ.

Here's the layout โœจ:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type ๐Ÿ“

It's 23 for Framed-IPX-Network.

Length ๐ŸŒธ

It's 6.

Value ๐Ÿฆ‹

The Value field is four octets. The value 0xFFFFFFFE indicates that the NAS should select an IPX network for the user, for example one assigned from a pool of one or more IPX networks kept by the NAS ๐ŸŽฑ. Other values should be used as the IPX network for the link to the user.

5.24. State ๐Ÿซง

Description ๐ŸŒ™

This Attribute is available to be sent by the server to the client in an Access-Challenge, and it MUST be sent unmodified from the client to the server in the new Access-Request reply to that challenge, if there is one ๐Ÿ”.

This Attribute is also available to be sent by the server to the client in an Access-Accept that includes a Termination-Action Attribute with the value of RADIUS-Request. If the NAS performs the Termination-Action by sending a new Access-Request upon termination of the current session, it MUST include the State attribute unchanged in that Access-Request ๐Ÿ”’.

In either usage, the client MUST NOT interpret the attribute locally, so hands off, no peeking ๐Ÿ™ˆ. A packet must have only zero or one State Attribute. How the State Attribute is used is implementation dependent ๐Ÿงฉ.

Here's the layout ๐Ÿ’…:

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐Ÿ“

It's 24 for State.

Length ๐ŸŒธ

It has to be >= 3.

String ๐Ÿฆ‹

The String field is one or more octets. The actual format is site or application specific, and a robust implementation SHOULD support the field as undistinguished octets. The codification of the range of allowed usage of this field is outside the scope of this specification ๐Ÿคทโ€โ™€๏ธ.

5.25. Class ๐Ÿท๏ธ

Description ๐ŸŽ“

This Attribute is available to be sent by the server to the client in an Access-Accept, and it SHOULD be sent unmodified by the client to the accounting server as part of the Accounting-Request packet if accounting is supported ๐Ÿ“Š. The client MUST NOT interpret the attribute locally, so again, don't be nosy ๐Ÿ‘€.

Here's the layout ๐ŸŽ€:

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐Ÿ“

It's 25 for Class.

Length ๐ŸŒธ

It has to be >= 3.

String ๐Ÿฆ‹

The String field is one or more octets. The actual format is site or application specific, and a robust implementation SHOULD support the field as undistinguished octets. The codification of the range of allowed usage of this field is outside the scope of this specification ๐Ÿ’ซ.

5.26. Vendor-Specific ๐Ÿข

Description ๐ŸŽ

This Attribute lets vendors support their own extended Attributes that aren't suitable for general usage, so it's like a private stash for them ๐Ÿ”. It MUST not affect the operation of the RADIUS protocol ๐Ÿ™…โ€โ™€๏ธ.

Servers that aren't equipped to interpret the vendor-specific information sent by a client MUST ignore it, although it may be reported ๐Ÿ“. Clients that don't receive desired vendor-specific information SHOULD make an attempt to operate without it, although they may do so (and report that they're doing so) in a degraded mode ๐Ÿฅน.

Here's the layout ๐Ÿฆ‹:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |  Length       |            Vendor-Id
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        Vendor-Id (cont)           |  String...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type ๐Ÿ“

It's 26 for Vendor-Specific.

Length ๐ŸŒธ

It has to be >= 7.

Vendor-Id ๐Ÿท๏ธ

The high-order octet is 0, and the low-order 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in network byte order, as defined in the "Assigned Numbers" RFC [6] ๐Ÿ”ข.

String ๐Ÿฆ‹

The String field is one or more octets. The actual format is site or application specific, and a robust implementation SHOULD support the field as undistinguished octets. The codification of the range of allowed usage of this field is outside the scope of this specification ๐ŸŒท.

It SHOULD be encoded as a sequence of vendor type / vendor length / value fields, as follows. The Attribute-Specific field depends on the vendor's definition of that attribute. Here's an example encoding of the Vendor-Specific attribute using this method ๐Ÿง:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |     Type      |  Length       |            Vendor-Id
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         Vendor-Id (cont)           | Vendor type   | Vendor length |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |    Attribute-Specific...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Multiple subattributes MAY be encoded within a single Vendor-Specific attribute, although they do not have to be ๐Ÿซถ.

5.27. Session-Timeout ๐Ÿ’–โณ

Description

okay so this Attribute sets the maximum number of seconds of service the user gets before the session or prompt gets terminated ๐Ÿซถ the server can send it to the client in an Access-Accept or Access-Challenge โœจ

here's the Session-Timeout Attribute format! fields go left to right, no cap ๐Ÿ’…

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |    Length     |             Value
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           Value (cont)         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

27 for Session-Timeout ๐ŸŽ€

Length

6

Value

the field is 4 octets, holding a 32-bit unsigned integer with the maximum number of seconds this user should be allowed to stay connected by the NAS ๐ŸŒธ

5.28. Idle-Timeout ๐Ÿฆ‹๐Ÿ’ค

Description

this one sets the maximum number of consecutive seconds of idle connection the user is allowed before the session or prompt gets terminated ๐Ÿ“ it's also something the server can send to the client in an Access-Accept or Access-Challenge ๐Ÿ’œ

the format, fields left to right, iykyk ๐Ÿงš

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |    Length     |             Value
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           Value (cont)         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

28 for Idle-Timeout ๐ŸŒˆ

Length

6

Value

4 octets, a 32-bit unsigned integer with the maximum number of consecutive seconds of idle time this user should be allowed before the NAS disconnects them ๐Ÿ‘‘

5.29. Termination-Action ๐ŸŒธ๐Ÿšช

Description

this Attribute tells the NAS what to do when the specified service is completed โœจ it's only used in Access-Accept packets, so don't go sending it anywhere else bestie ๐Ÿ™ˆ

format time, left to right ๐Ÿ’…

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |    Length     |             Value
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           Value (cont)         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

29 for Termination-Action ๐ŸŽ€

Length

6

Value

the Value field is four octets ๐Ÿซง here are the options:

 0      Default
 1      RADIUS-Request

if the Value is set to RADIUS-Request, then when the specified service ends, the NAS MAY send a new Access-Request to the RADIUS server, including the State attribute if there is one ๐Ÿ”ฅ

5.30. Called-Station-Id ๐Ÿ“ž๐Ÿ’–

Description

this Attribute lets the NAS send the phone number the user called in the Access-Request packet, using Dialed Number Identification (DNIS) or similar tech ๐Ÿงš heads up, this can be different from the number the call came in on ๐Ÿ™ˆ it's only used in Access-Request packets ๐Ÿ’…

format check โœจ

 0                   1                   2
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|     Type      |    Length     |  String ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

30 for Called-Station-Id ๐Ÿฆ‹

Length

>= 3

String

the String field is one or more octets, holding the phone number the user's call came in on ๐ŸŒท

the actual format is site or application specific ๐ŸŒˆ UTF-8 encoded 10646 [7] characters are recommended, but a robust implementation SHOULD support the field as undistinguished octets ๐Ÿ’œ and the codification of the range of allowed usage of this field? totally outside the scope of this spec ๐Ÿซถ

5.31. Calling-Station-Id ๐Ÿ“ฑ๐ŸŒธ

Description

this one lets the NAS send the phone number the call came from in the Access-Request packet, using Automatic Number Identification (ANI) or similar tech โœจ it's only used in Access-Request packets ๐Ÿ“

the format, fields left to right ๐Ÿ’…

 0                   1                   2
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|     Type      |    Length     |  String ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

31 for Calling-Station-Id ๐ŸŽ€

Length

>= 3

String

one or more octets, containing the phone number the user placed the call from ๐Ÿซง

the actual format is site or application specific ๐ŸŒธ UTF-8 encoded 10646 [7] characters are recommended, but a robust implementation SHOULD support the field as undistinguished octets ๐Ÿงš the codification of the range of allowed usage? outside the scope of this specification, bestie ๐Ÿ’–

5.32. NAS-Identifier ๐Ÿท๏ธ๐Ÿ’œ

Description

this Attribute holds a string that identifies the NAS sending the Access-Request ๐Ÿฆ‹ it's only used in Access-Request packets โœจ either NAS-IP-Address or NAS-Identifier MUST be present in an Access-Request packet, so one of them is a must-have ๐Ÿ”ฅ

Note: NAS-Identifier MUST NOT be used to select the shared secret used to authenticate the request. The source IP address of the Access-Request packet MUST be used to select the shared secret. โš ๏ธ๐Ÿ’€ don't mix these up, periodt!

format, left to right ๐ŸŒˆ

 0                   1                   2
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|     Type      |    Length     |  String ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

32 for NAS-Identifier ๐Ÿ“

Length

>= 3

String

one or more octets, and it should be unique to the NAS within the scope of the RADIUS server ๐Ÿ’… a fully qualified domain name would be a super suitable NAS-Identifier ๐ŸŒท

the actual format is site or application specific, and a robust implementation SHOULD support the field as undistinguished octets ๐Ÿซถ the codification of the range of allowed usage is outside the scope of this specification ๐Ÿ’–

5.33. Proxy-State ๐Ÿ”๐Ÿงš

Description

this Attribute can be sent by a proxy server to another server when it forwards an Access-Request ๐ŸŒธ it MUST be returned unmodified in the Access-Accept, Access-Reject or Access-Challenge โœจ when the proxy gets the response to its request, it MUST remove its own Proxy-State (the last Proxy-State in the packet) before forwarding the response to the NAS ๐Ÿ’…

if a Proxy-State Attribute gets added to a packet while forwarding it, the Proxy-State Attribute MUST be added after any existing Proxy-State attributes ๐Ÿฆ‹

Heads up: any Proxy-State other than the one added by the current server should be treated as opaque octets, and MUST NOT affect operation of the protocol ๐Ÿ™ˆโš ๏ธ hands off, no peeking!

usage is implementation dependent ๐ŸŒˆ a description of its function is outside the scope of this specification ๐Ÿซง

format, left to right ๐ŸŽ€

 0                   1                   2
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|     Type      |    Length     |  String ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

33 for Proxy-State ๐Ÿ’œ

Length

>= 3

String

one or more octets ๐ŸŒธ the actual format is site or application specific, and a robust implementation SHOULD support the field as undistinguished octets ๐Ÿงš the codification of the range of allowed usage is outside the scope of this specification ๐Ÿ’…

5.34. Login-LAT-Service ๐Ÿซโœจ

Description

this Attribute tells you which system the user should be connected to by LAT ๐ŸŒˆ it MAY be used in Access-Accept packets, but only when LAT is specified as the Login-Service ๐ŸŽ€ it MAY also be used in an Access-Request packet as a hint to the server, but the server is not required to honor the hint ๐Ÿซถ

admins use the service attribute with clustered systems, like a VAX or Alpha cluster ๐Ÿฆ‹ in that setup, several time sharing hosts share the same resources (disks, printers, etc.), and admins often set each one up to offer access (service) to each shared resource ๐Ÿ’… each host in the cluster advertises its services through LAT broadcasts ๐Ÿ“ฃ

sophisticated users often know which service providers (machines) are faster, so they tend to use a node name when starting a LAT connection ๐ŸŽ๏ธ and some admins want particular users on certain machines as a primitive form of load balancing (even though LAT can do load balancing itself) ๐Ÿ’€

format, left to right โœจ

 0                   1                   2
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|     Type      |    Length     |  String ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

34 for Login-LAT-Service ๐Ÿงš

Length

>= 3

String

one or more octets, containing the identity of the LAT service to use ๐Ÿ“ the LAT Architecture allows this string to contain $ (dollar), - (hyphen), . (period), _ (underscore), numerics, upper and lower case alphabetics, and the ISO Latin-1 character set extension [11] ๐Ÿ’– all LAT string comparisons are case insensitive, so no stress about capitals ๐ŸŒˆ

5.35. Login-LAT-Node โœจ

Description

okay bestie, this one tells you which LAT Node the user should get auto-connected to ๐ŸŒธ It MAY be used in Access-Accept packets, but only when LAT is specified as the Login-Service. It MAY also show up in an Access-Request packet as a hint to the server, but the server is not required to honor the hint ๐Ÿ’…

Here's the layout, read left to right ๐Ÿฆ‹

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

35 for Login-LAT-Node ๐Ÿ”ข

Length

>= 3

String

The String field is one or more octets, and it holds the identity of the LAT Node the user gets connected to ๐Ÿซถ The LAT Architecture lets this string contain $ (dollar), - (hyphen), . (period), _ (underscore), numerics, upper and lower case alphabetics, and the ISO Latin-1 character set extension. All LAT string comparisons are case insensitive, so capitalization doesn't matter โœจ

5.36. Login-LAT-Group ๐ŸŽ€

Description

This one is giving access control vibes ๐Ÿ‘‘ It holds a string naming the LAT group codes this user is allowed to use. It MAY be used in Access-Accept packets, but only when LAT is specified as the Login-Service. It MAY also be sent in an Access-Request packet as a hint to the server, and yes, the server is still not required to honor the hint ๐Ÿ™ˆ

Okay so LAT has 256 different group codes, and it uses them as a form of access rights. The codes get encoded as a 256 bit bitmap ๐Ÿงš

Administrators can assign one or more of the group code bits at the LAT service provider. The provider will only accept LAT connections that have these group codes set in the bit map. Admins assign a bitmap of authorized group codes to each user. LAT gets these from the operating system and uses them in its requests to the service providers ๐Ÿ’œ

Here's the layout ๐Ÿฆ‹

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

36 for Login-LAT-Group ๐Ÿ”ข

Length

34

String

The String field is a 32 octet bit map, most significant octet first. A robust implementation SHOULD support the field as undistinguished octets ๐Ÿ’–

The codification of the range of allowed usage of this field is outside the scope of this specification ๐ŸŒˆ

Description

This attribute tells you which AppleTalk network number should be used for the serial link to the user, and in this case the user is another AppleTalk router ๐Ÿ›œ It is only used in Access-Accept packets, and it is never used when the user is not another router ๐Ÿ™…โ€โ™€๏ธ

Here's the layout ๐Ÿฆ‹

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

37 for Framed-AppleTalk-Link ๐Ÿ”ข

Length

6

Value

The Value field is four octets. Even though it's that big, the values only range from 0 to 65535 ๐Ÿ“ The special value of 0 means this is an unnumbered serial link. A value from 1 to 65535 means the serial line between the NAS and the user should be assigned that value as an AppleTalk network number โœจ

5.38. Framed-AppleTalk-Network ๐ŸŒธ

Description

This one tells the NAS which AppleTalk Network number to probe when it's allocating an AppleTalk node for the user ๐Ÿ” It is only used in Access-Accept packets, and it is never used when the user is another router. If there are multiple instances of this attribute, the NAS may probe using any of the network numbers specified ๐Ÿงš

Here's the layout ๐Ÿฆ‹

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

38 for Framed-AppleTalk-Network ๐Ÿ”ข

Length

6

Value

The Value field is four octets. Despite the size, values range from 0 to 65535 ๐Ÿ“ The special value 0 tells the NAS to assign a network for the user, using its default cable range. A value between 1 and 65535 (inclusive) means the AppleTalk Network the NAS should probe to find an address for the user ๐Ÿ’…

5.39. Framed-AppleTalk-Zone ๐Ÿฆ‹

Description

This attribute indicates the AppleTalk Default Zone to be used for this user ๐ŸŒˆ It is only used in Access-Accept packets. Multiple instances of this attribute in the same packet are not allowed, so only one zone per packet, bestie ๐Ÿ™…โ€โ™€๏ธ

Here's the layout ๐Ÿฆ‹

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

39 for Framed-AppleTalk-Zone ๐Ÿ”ข

Length

>= 3

String

This is the name of the Default AppleTalk Zone to be used for this user. A robust implementation SHOULD support the field as undistinguished octets ๐Ÿซถ

The codification of the range of allowed usage of this field is outside the scope of this specification ๐ŸŒธ

5.40. CHAP-Challenge ๐Ÿ”

Description

This attribute carries the CHAP Challenge that the NAS sent to a PPP Challenge-Handshake Authentication Protocol (CHAP) user. It is only used in Access-Request packets ๐Ÿ’œ

If the CHAP challenge value is 16 octets long, it MAY be placed in the Request Authenticator field instead of using this attribute. Clever, right? โœจ

Here's the layout ๐Ÿฆ‹

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |    String...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

60 for CHAP-Challenge ๐Ÿ”ข

Length

>= 7

String

The String field contains the CHAP Challenge ๐ŸŒˆ

5.41. NAS-Port-Type ๐Ÿ”Œ

Description

This attribute indicates the type of the physical port of the NAS which is authenticating the user. It can be used instead of or in addition to the NAS-Port (5) attribute. It is only used in Access-Request packets ๐Ÿ’… Either NAS-Port (5) or NAS-Port-Type or both SHOULD be present in an Access-Request packet, if the NAS differentiates among its ports ๐Ÿงš

Here's the layout ๐Ÿฆ‹

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

61 for NAS-Port-Type ๐Ÿ”ข

Length

6

Value

The Value field is four octets. "Virtual" means a connection to the NAS through some transport protocol, instead of a physical port ๐Ÿฆ‹ For example, if a user telnetted into a NAS to authenticate as an Outbound-User, the Access-Request might include NAS-Port-Type = Virtual as a hint to the RADIUS server that the user wasn't on a physical port ๐Ÿ™ˆ

Here are the values ๐Ÿ“‹

0       Async
1       Sync
2       ISDN Sync
3       ISDN Async V.120
4       ISDN Async V.110
5       Virtual
6       PIAFS
7       HDLC Clear Channel
8       X.25
9       X.75
10      G.3 Fax
11      SDSL - Symmetric DSL
12      ADSL-CAP - Asymmetric DSL, Carrierless Amplitude Phase
        Modulation
13      ADSL-DMT - Asymmetric DSL, Discrete Multi-Tone
14      IDSL - ISDN Digital Subscriber Line
15      Ethernet
16      xDSL - Digital Subscriber Line of unknown type
17      Cable
18      Wireless - Other
19      Wireless - IEEE 802.11

PIAFS is a form of wireless ISDN commonly used in Japan, and it stands for PHS (Personal Handyphone System) Internet Access Forum Standard (PIAFS) ๐Ÿ‡ฏ๐Ÿ‡ตโœจ

5.42. Port-Limit ๐Ÿšช

Description

This attribute sets the maximum number of ports to be provided to the user by the NAS ๐Ÿ’– It MAY be sent by the server to the client in an Access-Accept packet. It's meant for use with Multilink PPP [12] or similar setups ๐ŸŒ It MAY also be sent by the NAS to the server as a hint that that many ports are desired for use, but the server is not required to honor the hint ๐Ÿซถ

Here's the layout ๐Ÿฆ‹

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

62 for Port-Limit ๐Ÿ”ข

Length

6

Value

The field is 4 octets, containing a 32-bit unsigned integer with the maximum number of ports this user should be allowed to connect to on the NAS ๐Ÿ‘‘

5.43. Login-LAT-Port ๐Ÿ”Œ

Description

okay so Login-LAT-Port tells the server which port the user should get connected to by LAT ๐Ÿ’– It MAY be used in Access-Accept packets, but only when LAT is specified as the Login-Service. It MAY also be used in an Access-Request packet as a hint for the server, but the server is not required to honor the hint, so it's more of a vibe than a promise ๐Ÿซถ

Here's the format of the Login-LAT-Port Attribute. The fields go from left to right ๐Ÿ‘€

    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Type

The Type is 63 for Login-LAT-Port ๐ŸŽ€

Length

The Length is >= 3 ๐Ÿ“

String

The String field is one or more octets, and it holds the identity of the LAT port to use ๐Ÿงš The LAT Architecture lets this string contain $ (dollar), - (hyphen), . (period), _ (underscore), numerics, upper and lower case alphabetics, and the ISO Latin-1 character set extension. All LAT string comparisons are case insensitive, so ABC and abc are the same girl ๐Ÿ’…

5.44. Table of Attributes ๐Ÿ“

bestie, this table is your cheat sheet for which attributes can show up in which kinds of packets, and how many of each you're allowed to have ๐Ÿ“‹ Read the notes underneath too, they're important โœจ

Request   Accept   Reject   Challenge   #    Attribute
0-1       0-1      0        0            1   User-Name
0-1       0        0        0            2   User-Password [Note 1]
0-1       0        0        0            3   CHAP-Password [Note 1]
0-1       0        0        0            4   NAS-IP-Address [Note 2]
0-1       0        0        0            5   NAS-Port
0-1       0-1      0        0            6   Service-Type
0-1       0-1      0        0            7   Framed-Protocol
0-1       0-1      0        0            8   Framed-IP-Address
0-1       0-1      0        0            9   Framed-IP-Netmask
0         0-1      0        0           10   Framed-Routing
0         0+       0        0           11   Filter-Id
0-1       0-1      0        0           12   Framed-MTU
0+        0+       0        0           13   Framed-Compression
0+        0+       0        0           14   Login-IP-Host
0         0-1      0        0           15   Login-Service
0         0-1      0        0           16   Login-TCP-Port
0         0+       0+       0+          18   Reply-Message
0-1       0-1      0        0           19   Callback-Number
0         0-1      0        0           20   Callback-Id
0         0+       0        0           22   Framed-Route
0         0-1      0        0           23   Framed-IPX-Network
0-1       0-1      0        0-1         24   State [Note 1]
0         0+       0        0           25   Class
0+        0+       0        0+          26   Vendor-Specific
0         0-1      0        0-1         27   Session-Timeout
0         0-1      0        0-1         28   Idle-Timeout
0         0-1      0        0           29   Termination-Action
0-1       0        0        0           30   Called-Station-Id
0-1       0        0        0           31   Calling-Station-Id
0-1       0        0        0           32   NAS-Identifier [Note 2]
0+        0+       0+       0+          33   Proxy-State
0-1       0-1      0        0           34   Login-LAT-Service
0-1       0-1      0        0           35   Login-LAT-Node
0-1       0-1      0        0           36   Login-LAT-Group
0         0-1      0        0           37   Framed-AppleTalk-Link
0         0+       0        0           38   Framed-AppleTalk-Network
0         0-1      0        0           39   Framed-AppleTalk-Zone
0-1       0        0        0           60   CHAP-Challenge
0-1       0        0        0           61   NAS-Port-Type
0-1       0-1      0        0           62   Port-Limit
0-1       0-1      0        0           63   Login-LAT-Port
Request   Accept   Reject   Challenge   #    Attribute

[Note 1] An Access-Request MUST contain either a User-Password or a CHAP-Password or State ๐Ÿ” An Access-Request MUST NOT contain both a User-Password and a CHAP-Password. If future extensions allow other kinds of authentication information to be conveyed, the attribute for that can be used in an Access-Request instead of User-Password or CHAP-Password ๐ŸŒˆ

[Note 2] An Access-Request MUST contain either a NAS-IP-Address or a NAS-Identifier (or both) ๐Ÿฆ‹

And here's what the entries in the table above actually mean ๐Ÿ‘‘

0     This attribute MUST NOT be present in packet.
0+    Zero or more instances of this attribute MAY be present in packet.
0-1   Zero or one instance of this attribute MAY be present in packet.
1     Exactly one instance of this attribute MUST be present in packet.

6. IANA Considerations ๐ŸŒธ

This section gives guidance to the Internet Assigned Numbers Authority (IANA) about registering values related to the RADIUS protocol, following BCP 26 [13] ๐Ÿ’Œ

There are three name spaces in RADIUS that need registration: Packet Type Codes, Attribute Types, and Attribute Values (for certain Attributes) ๐Ÿ—‚๏ธ

RADIUS is not intended as a general-purpose Network Access Server (NAS) management protocol, so allocations should not be made for purposes unrelated to Authentication, Authorization or Accounting ๐Ÿ™…โ€โ™€๏ธ

6.1. Definition of Terms ๐Ÿ“–

The following terms are used here with the meanings defined in BCP 26: "name space", "assigned value", "registration" โœจ

The following policies are used here with the meanings defined in BCP 26: "Private Use", "First Come First Served", "Expert Review", "Specification Required", "IETF Consensus", "Standards Action" ๐Ÿงพ

For registration requests where a Designated Expert should be consulted, the IESG Area Director for Operations should appoint the Designated Expert ๐Ÿ‘ฉโ€๐Ÿ’ผ

For registration requests requiring Expert Review, the ietf-radius mailing list should be consulted ๐Ÿ“ฌ

Packet Type Codes have a range from 1 to 254, and 1-5,11-13 have been allocated. Because a new Packet Type has a considerable impact on interoperability, a new Packet Type Code requires Standards Action, and should be allocated starting at 14 ๐Ÿ”ฅ

Attribute Types have a range from 1 to 255, and they're the scarcest resource in RADIUS, so they must be allocated with care ๐Ÿฅน Attributes 1-53,55,60-88,90-91 have been allocated, with 17 and 21 available for re-use. Attributes 17, 21, 54, 56-59, 89, 92-191 may be allocated following Expert Review, with Specification Required. Release of blocks of Attribute Types (more than 3 at a time for a given purpose) should require IETF Consensus. It is recommended that attributes 17 and 21 be used only after all others are exhausted ๐Ÿ’€

Note that RADIUS defines a mechanism for Vendor-Specific extensions (Attribute 26), and the use of that should be encouraged instead of allocating global attribute types. This is for functions specific only to one vendor's implementation of RADIUS, where no interoperability is deemed useful ๐Ÿงš

As stated in the "Attributes" section above:

"[Attribute Type] Values 192-223 are reserved for experimental use, values 224-240 are reserved for implementation-specific use, and values 241-255 are reserved and should not be used."

Therefore Attribute values 192-240 are considered Private Use, and values 241-255 require Standards Action ๐ŸŒˆ

Certain attributes (for example, NAS-Port-Type) in RADIUS define a list of values to correspond with various meanings. There can be 4 billion (2^32) values for each attribute. Adding additional values to the list can be done on a First Come, First Served basis by the IANA ๐Ÿ’œ

7. Examples ๐ŸŽฌ

A few examples are presented to illustrate the flow of packets and the use of typical attributes. These examples are not intended to be exhaustive, because many others are possible. Hexadecimal dumps of the example packets are given in network byte order, using the shared secret "xyzzy5461" ๐Ÿ“

7.1. User Telnet to Specified Host ๐Ÿ“ž

The NAS at 192.168.1.16 sends an Access-Request UDP packet to the RADIUS Server for a user named nemo logging in on port 3 with password "arctangent" ๐Ÿฆ‹

The Request Authenticator is a 16 octet random number generated by the NAS ๐ŸŽฒ

The User-Password is 16 octets of password padded at end with nulls, XORed with MD5(shared secret|Request Authenticator) ๐Ÿ”

   01 00 00 38 0f 40 3f 94 73 97 80 57 bd 83 d5 cb
   98 f4 22 7a 01 06 6e 65 6d 6f 02 12 0d be 70 8d
   93 d4 13 ce 31 96 e4 3f 78 2a 0a ee 04 06 c0 a8
   01 10 05 06 00 00 00 03

    1 Code = Access-Request (1)
    1 ID = 0
    2 Length = 56
   16 Request Authenticator

   Attributes:
    6  User-Name = "nemo"
   18  User-Password
    6  NAS-IP-Address = 192.168.1.16
    6  NAS-Port = 3

The RADIUS server authenticates nemo, and sends an Access-Accept UDP packet to the NAS telling it to telnet nemo to host 192.168.1.3 ๐Ÿ–ฅ๏ธโœจ

The Response Authenticator is a 16-octet MD5 checksum of the code (2), id (0), Length (38), the Request Authenticator from above, the attributes in this reply, and the shared secret ๐Ÿงฎ

   02 00 00 26 86 fe 22 0e 76 24 ba 2a 10 05 f6 bf
   9b 55 e0 b2 06 06 00 00 00 01 0f 06 00 00 00 00
   0e 06 c0 a8 01 03

    1 Code = Access-Accept (2)
    1 ID = 0 (same as in Access-Request)
    2 Length = 38
   16 Response Authenticator

   Attributes:
    6  Service-Type (6) = Login (1)
    6  Login-Service (15) = Telnet (0)
    6  Login-IP-Host (14) = 192.168.1.3

7.2. Framed User Authenticating with CHAP ๐ŸŽ€

Okay so the NAS at 192.168.1.16 sends an Access-Request UDP packet to the RADIUS Server for a user named flopsy, who's logging in on port 20 with PPP and authenticating with CHAP ๐Ÿฆ‹. The NAS sends along Service-Type and Framed-Protocol as a hint that this user is looking for PPP, although the NAS is not required to do so ๐Ÿ’….

The Request Authenticator is a 16 octet random number generated by the NAS, and it's also reused as the CHAP Challenge โœจ.

The CHAP-Password is made up of a 1 octet CHAP ID (in this case 22), followed by the 16 octet CHAP response ๐Ÿซถ.

01 01 00 47 2a ee 86 f0 8d 0d 55 96 9c a5 97 8e
0d 33 67 a2 01 08 66 6c 6f 70 73 79 03 13 16 e9
75 57 c3 16 18 58 95 f2 93 ff 63 44 07 72 75 04
06 c0 a8 01 10 05 06 00 00 00 14 06 06 00 00 00
02 07 06 00 00 00 01

 1 Code = 1     (Access-Request)
 1 ID = 1
 2 Length = 71
16 Request Authenticator

Attributes:
 8  User-Name (1) = "flopsy"
19  CHAP-Password (3)
 6  NAS-IP-Address (4) = 192.168.1.16
 6  NAS-Port (5) = 20
 6  Service-Type (6) = Framed (2)
 6  Framed-Protocol (7) = PPP (1)

The RADIUS server authenticates flopsy and sends an Access-Accept UDP packet back to the NAS ๐ŸŽ‰. That tells the NAS to start PPP service and to assign flopsy an address from its dynamic address pool.

The Response Authenticator is a 16-octet MD5 checksum of the code (2), id (1), Length (56), the Request Authenticator from above, the attributes in this reply, and the shared secret ๐Ÿ”.

02 01 00 38 15 ef bc 7d ab 26 cf a3 dc 34 d9 c0
3c 86 01 a4 06 06 00 00 00 02 07 06 00 00 00 01
08 06 ff ff ff fe 0a 06 00 00 00 02 0d 06 00 00
00 01 0c 06 00 00 05 dc

 1 Code = Access-Accept (2)
 1 ID = 1 (same as in Access-Request)
 2 Length = 56
16 Response Authenticator

Attributes:
 6  Service-Type (6) = Framed (2)
 6  Framed-Protocol (7) = PPP (1)
 6  Framed-IP-Address (8) = 255.255.255.254
 6  Framed-Routing (10) = None (0)
 6  Framed-Compression (13) = VJ TCP/IP Header Compression (1)
 6  Framed-MTU (12) = 1500

7.3. User with Challenge-Response card ๐Ÿฆ‹

The NAS at 192.168.1.16 sends an Access-Request UDP packet to the RADIUS Server for a user named mopsy, who's logging in on port 7. In this example, the user types in the dummy password "challenge" ๐Ÿ™ˆ. The challenge and response that the smart card generates for this example are "32769430" and "99101462".

The Request Authenticator is a 16 octet random number generated by the NAS ๐ŸŽฒ.

The User-Password is 16 octets of password (in this case "challenge"), padded at the end with nulls and XORed with MD5(shared secret|Request Authenticator).

01 02 00 39 f3 a4 7a 1f 6a 6d 76 71 0b 94 7a b9
30 41 a0 39 01 07 6d 6f 70 73 79 02 12 33 65 75
73 77 82 89 b5 70 88 5e 15 08 48 25 c5 04 06 c0
a8 01 10 05 06 00 00 00 07

 1 Code = Access-Request (1)
 1 ID = 2
 2 Length = 57
16 Request Authenticator

Attributes:
 7 User-Name (1) = "mopsy"
18 User-Password (2)
 6  NAS-IP-Address (4) = 192.168.1.16
 6  NAS-Port (5) = 7

The RADIUS server decides to challenge mopsy ๐Ÿงฉ. It sends back a challenge string and waits for a response, so it sends an Access-Challenge UDP packet to the NAS.

The Response Authenticator is a 16-octet MD5 checksum of the code (11), id (2), length (78), the Request Authenticator from above, the attributes in this reply, and the shared secret.

The Reply-Message is "Challenge 32769430. Enter response at prompt."

The State is a magic cookie that gets sent back along with the user's response. In this example it's 8 octets of data (33 32 37 36 39 34 33 30 in hex) ๐Ÿ“.

0b 02 00 4e 36 f3 c8 76 4a e8 c7 11 57 40 3c 0c
71 ff 9c 45 12 30 43 68 61 6c 6c 65 6e 67 65 20
33 32 37 36 39 34 33 30 2e 20 20 45 6e 74 65 72
20 72 65 73 70 6f 6e 73 65 20 61 74 20 70 72 6f
6d 70 74 2e 18 0a 33 32 37 36 39 34 33 30

 1 Code = Access-Challenge (11)
 1 ID = 2 (same as in Access-Request)
 2 Length = 78
16 Response Authenticator

Attributes:
48  Reply-Message (18)
10  State (24)

The user types in their response, and the NAS sends a new Access-Request with that response, plus the State Attribute ๐Ÿ”.

The Request Authenticator is a brand new 16 octet random number ๐Ÿ†•.

The User-Password is 16 octets of the user's response (in this case "99101462"), padded at the end with nulls and XORed with MD5(shared secret|Request Authenticator).

The State is the magic cookie from the Access-Challenge packet, unchanged.

01 03 00 43 b1 22 55 6d 42 8a 13 d0 d6 25 38 07
c4 57 ec f0 01 07 6d 6f 70 73 79 02 12 69 2c 1f
20 5f c0 81 b9 19 b9 51 95 f5 61 a5 81 04 06 c0
a8 01 10 05 06 00 00 00 07 18 10 33 32 37 36 39
34 33 30

 1 Code = Access-Request (1)
 1 ID = 3 (Note that this changes.)
 2 Length = 67
16 Request Authenticator

Attributes:
 7  User-Name = "mopsy"
18  User-Password
 6  NAS-IP-Address (4) = 192.168.1.16
 6  NAS-Port (5) = 7
10  State (24)

The response was wrong (for the sake of the example) ๐Ÿ˜ฌ, so the RADIUS server tells the NAS to reject the login attempt.

The Response Authenticator is a 16 octet MD5 checksum of the code (3), id (3), length (20), the Request Authenticator from above, the attributes in this reply (in this case, none), and the shared secret.

03 03 00 14 a4 2f 4f ca 45 91 6c 4e 09 c8 34 0f
9e 74 6a a0

 1 Code = Access-Reject (3)
 1 ID = 3 (same as in Access-Request)
 2 Length = 20
16 Response Authenticator

Attributes:
   (none, although a Reply-Message could be sent)

8. Security Considerations ๐Ÿ”

Security issues are the primary topic of this document, so buckle up bestie ๐Ÿ˜ญ.

In practice, within or alongside each RADIUS server, there's a database that links "user" names to authentication information (the "secrets"). It isn't expected that a particular named user would be authenticated by multiple methods, because that would leave the user open to attacks that negotiate the least secure method from a set ๐Ÿ’€. Instead, each named user should have an indication of exactly one method used to authenticate that user name. If a user needs different authentication methods in different situations, then distinct user names SHOULD be employed, and each one should identify exactly one authentication method ๐Ÿง .

Passwords and other secrets should be stored at each end in a way that keeps access to them as limited as possible. Ideally, the secrets should only be accessible to the process that needs them in order to do the authentication ๐Ÿ”’.

The secrets should be distributed with a mechanism that limits how many entities handle them (and therefore learn them). Ideally, no unauthorized person should ever learn the secrets ๐Ÿ™…โ€โ™€๏ธ. It's possible to achieve this with SNMP Security Protocols [14], but that kind of mechanism is outside the scope of this specification.

Other distribution methods are still being researched and experimented with ๐Ÿงช. The SNMP Security document [14] also has an excellent overview of threats to network protocols, so go read it ๐Ÿ“š.

The User-Password hiding mechanism described in Section 5.2 has not been subjected to significant amounts of cryptanalysis in the published literature. Some in the IETF community are concerned that this method might not provide sufficient confidentiality protection [15] to passwords transmitted using RADIUS. Users should evaluate their threat environment and consider whether additional security mechanisms should be employed. ๐Ÿšจ

9. Change Log ๐Ÿ“

The following changes have been made from RFC 2138:

  • Strings should use UTF-8 instead of US-ASCII and should be handled as 8-bit data.
  • Integers and dates are now defined as 32 bit unsigned values.
  • Updated list of attributes that can be included in Access-Challenge to be consistent with the table of attributes.
  • User-Name mentions Network Access Identifiers.
  • User-Name may now be sent in Access-Accept for use with accounting and Rlogin.
  • Values added for Service-Type, Login-Service, Framed-Protocol, Framed-Compression, and NAS-Port-Type.
  • NAS-Port can now use all 32 bits.
  • Examples now include hexadecimal displays of the packets.
  • Source UDP port must be used in conjunction with the Request Identifier when identifying duplicates.
  • Multiple subattributes may be allowed in a Vendor-Specific attribute.
  • An Access-Request is now required to contain either a NAS-IP-Address or NAS-Identifier (or may contain both).
  • Added notes under "Operations" with more information on proxy, retransmissions, and keep-alives.
  • If multiple Attributes with the same Type are present, the order of Attributes with the same Type MUST be preserved by any proxies.
  • Clarified Proxy-State.
  • Clarified that Attributes must not depend on position within the packet, as long as Attributes of the same type are kept in order.
  • Added IANA Considerations section.
  • Updated section on "Proxy" under "Operations".
  • Framed-MTU can now be sent in Access-Request as a hint.
  • Updated Security Considerations.
  • Text strings identified as a subset of string, to clarify use of UTF-8.

10. References ๐Ÿ“š

[1] Rigney, C., Rubens, A., Simpson, W. and S. Willens, "Remote Authentication Dial In User Service (RADIUS)", RFC 2138, April 1997.

[2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March, 1997.

[3] Rivest, R. and S. Dusse, "The MD5 Message-Digest Algorithm", RFC 1321, April 1992.

[4] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980.

[5] Rigney, C., "RADIUS Accounting", RFC 2866, June 2000.

[6] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, RFC 1700, October 1994.

[7] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2279, January 1998.

[8] Aboba, B. and M. Beadles, "The Network Access Identifier", RFC 2486, January 1999.

[9] Kaufman, C., Perlman, R., and Speciner, M., "Network Security: Private Communications in a Public World", Prentice Hall, March 1995, ISBN 0-13-061466-1.

[10] Jacobson, V., "Compressing TCP/IP headers for low-speed serial links", RFC 1144, February 1990.

[11] ISO 8859. International Standard -- Information Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 1: Latin Alphabet No. 1, ISO 8859-1:1987.

[12] Sklower, K., Lloyd, B., McGregor, G., Carr, D. and T. Coradetti, "The PPP Multilink Protocol (MP)", RFC 1990, August 1996.

[13] Alvestrand, H. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.

[14] Galvin, J., McCloghrie, K. and J. Davin, "SNMP Security Protocols", RFC 1352, July 1992.

[15] Dobbertin, H., "The Status of MD5 After a Recent Attack", CryptoBytes Vol.2 No.2, Summer 1996.

11. Acknowledgements ๐Ÿ’œ

RADIUS was originally developed by Steve Willens of Livingston Enterprises for their PortMaster series of Network Access Servers ๐ŸŒˆ.

12. Chair's Address ๐Ÿงš

The working group can be contacted via the current chair:

Carl Rigney
Livingston Enterprises
4464 Willow Road
Pleasanton, California  94588

Phone: +1 925 737 2100
EMail: cdr@telemancy.com

13. Authors' Addresses โœจ

okay so this is the part where we find out who actually wrote this thing ๐ŸŽ€ and honestly they're giving OG networking legends, no cap ๐Ÿ‘‘

if you have questions about this memo, you can reach out to:

Carl Rigney ๐Ÿ’– Livingston Enterprises 4464 Willow Road Pleasanton, California 94588

Phone: +1 925 737 2100 EMail: cdr@telemancy.com

Allan C. Rubens ๐Ÿฆ‹ Merit Network, Inc. 4251 Plymouth Road Ann Arbor, Michigan 48105-2785

EMail: acr@merit.edu

William Allen Simpson ๐Ÿงš Daydreamer Computer Systems Consulting Services 1384 Fontaine Madison Heights, Michigan 48071

EMail: wsimpson@greendragon.com

Steve Willens ๐Ÿ“ Livingston Enterprises 4464 Willow Road Pleasanton, California 94588

EMail: steve@livingston.com


okay bestie, the legal bit, but make it cute ๐ŸŒˆ

Copyright (C) The Internet Society (2000). All Rights Reserved. ๐Ÿ”ฅ

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. ๐Ÿฆ‹

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ๐Ÿ’€

Acknowledgement ๐ŸŒธ

Funding for the RFC Editor function is currently provided by the Internet Society. ๐Ÿซถ

๐Ÿ“ฆ where this page comes from