RFC 4005

Diameter Network Access Server Application

๐Ÿ“… published August 2005, from ietf

RFC 4005: Diameter Network Access Server Application โœจ

okay so let's start with the basics ๐ŸŽ€

  • RFC number: 4005
  • Title: Diameter Network Access Server Application
  • Authors: P. Calhoun, G. Zorn (both Cisco Systems Inc.), D. Spence (Consultant), and D. Mitton (Circular Networks)
  • Category: Standards Track
  • Date: August 2005
  • Obsoletes / Updates: none listed in the title block

Status of This Memo ๐Ÿ“‹

bestie, this part is the legal-ish bit, but it's short and sweet ๐Ÿ’… It says this is an Internet standards track protocol for the Internet community, and the authors are openly asking for discussion and suggestions for improvements ๐Ÿซถ If you want the current standardization state of this protocol, you go check the "Internet Official Protocol Standards" (STD 1) document. And yes, distribution of this memo is unlimited, so share it with everyone ๐ŸŒˆ

Copyright (C) The Internet Society (2005).

Abstract ๐Ÿฆ‹

so the abstract is basically the elevator pitch โœจ This doc describes a Diameter protocol application for AAA (Authentication, Authorization, and Accounting) services in the Network Access Server (NAS) environment. When you pair it with the Diameter Base protocol, the Transport Profile, and the Extensible Authentication Protocol specs, this application covers the typical network access services requirements. it's giving complete package ๐Ÿ’–

legacy systems are going to be part of the picture when Diameter first rolls out ๐Ÿงš so this application was carefully designed to make converting between RADIUS and Diameter way less painful ๐Ÿ˜ญ The trick is that it includes the RADIUS attribute space, so you don't have to do a ton of attribute translations. literal genius ๐Ÿ‘‘

last bit, and it's a big one ๐Ÿ”ฅ The interactions between Diameter applications and RADIUS that this document specifies are meant to apply to all Diameter applications. So in this sense, this document extends the Base Diameter protocol. main character energy ๐Ÿ’œ

Table of Contents ๐Ÿ—บ๏ธโœจ

okay bestie, this is the map for the whole doc ๐Ÿ’– every section, subsection, and appendix is listed here with its page number, so you can jump around like a pro ๐Ÿฆ‹

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  5
       1.1.  Terminology  . . . . . . . . . . . . . . . . . . . . . .  5
       1.2.  Requirements Language  . . . . . . . . . . . . . . . . .  6
       1.3.  Advertising Application Support  . . . . . . . . . . . .  6
   2.  NAS Calls, Ports, and Sessions . . . . . . . . . . . . . . . .  6
       2.1.  Diameter Session Establishment . . . . . . . . . . . . .  7
       2.2.  Diameter Session Reauthentication or Reauthorization . .  7
       2.3.  Diameter Session Termination . . . . . . . . . . . . . .  8
   3.  NAS Messages . . . . . . . . . . . . . . . . . . . . . . . . .  9
       3.1.  AA-Request (AAR) Command . . . . . . . . . . . . . . . .  9
       3.2.  AA-Answer (AAA) Command  . . . . . . . . . . . . . . . . 11
       3.3.  Re-Auth-Request (RAR) Command  . . . . . . . . . . . . . 13
       3.4.  Re-Auth-Answer (RAA) Command . . . . . . . . . . . . . . 14
       3.5.  Session-Termination-Request (STR) Command  . . . . . . . 15
       3.6.  Session-Termination-Answer (STA) Command . . . . . . . . 15
       3.7.  Abort-Session-Request (ASR) Command  . . . . . . . . . . 16
       3.8.  Abort-Session-Answer (ASA) Command . . . . . . . . . . . 17
       3.9.  Accounting-Request (ACR) Command . . . . . . . . . . . . 17
       3.10. Accounting-Answer (ACA) Command. . . . . . . . . . . . . 19
   4.  NAS Session AVPs . . . . . . . . . . . . . . . . . . . . . . . 20
       4.1.  Call and Session Information . . . . . . . . . . . . . . 21
       4.2.  NAS-Port AVP . . . . . . . . . . . . . . . . . . . . . . 22
       4.3.  NAS-Port-Id AVP  . . . . . . . . . . . . . . . . . . . . 22
       4.4.  NAS-Port-Type AVP  . . . . . . . . . . . . . . . . . . . 22
       4.5.  Called-Station-Id AVP  . . . . . . . . . . . . . . . . . 23
       4.6.  Calling-Station-Id AVP . . . . . . . . . . . . . . . . . 23
       4.7.  Connect-Info AVP . . . . . . . . . . . . . . . . . . . . 24
       4.8.  Originating-Line-Info AVP  . . . . . . . . . . . . . . . 24
       4.9.  Reply-Message AVP  . . . . . . . . . . . . . . . . . . . 25
   5.  NAS Authentication AVPs  . . . . . . . . . . . . . . . . . . . 26
       5.1.  User-Password AVP  . . . . . . . . . . . . . . . . . . . 26
       5.2.  Password-Retry AVP . . . . . . . . . . . . . . . . . . . 27
       5.3.  Prompt AVP . . . . . . . . . . . . . . . . . . . . . . . 27
       5.4.  CHAP-Auth AVP  . . . . . . . . . . . . . . . . . . . . . 27
       5.5.  CHAP-Algorithm AVP . . . . . . . . . . . . . . . . . . . 28
       5.6.  CHAP-Ident AVP . . . . . . . . . . . . . . . . . . . . . 28
       5.7.  CHAP-Response AVP  . . . . . . . . . . . . . . . . . . . 28
       5.8.  CHAP-Challenge AVP . . . . . . . . . . . . . . . . . . . 28
       5.9.  ARAP-Password AVP  . . . . . . . . . . . . . . . . . . . 28
       5.10. ARAP-Challenge-Response AVP. . . . . . . . . . . . . . . 28
       5.11. ARAP-Security AVP. . . . . . . . . . . . . . . . . . . . 29
       5.12. ARAP-Security-Data AVP . . . . . . . . . . . . . . . . . 29
   6.  NAS Authorization AVPs . . . . . . . . . . . . . . . . . . . . 29
       6.1.  Service-Type AVP . . . . . . . . . . . . . . . . . . . . 30
       6.2.  Callback-Number AVP  . . . . . . . . . . . . . . . . . . 32
       6.3.  Callback-Id AVP  . . . . . . . . . . . . . . . . . . . . 32
       6.4.  Idle-Timeout AVP . . . . . . . . . . . . . . . . . . . . 32
       6.5.  Port-Limit AVP . . . . . . . . . . . . . . . . . . . . . 32
       6.6.  NAS-Filter-Rule AVP  . . . . . . . . . . . . . . . . . . 32
       6.7.  Filter-Id AVP  . . . . . . . . . . . . . . . . . . . . . 33
       6.8.  Configuration-Token AVP  . . . . . . . . . . . . . . . . 33
       6.9.  QoS-Filter-Rule AVP  . . . . . . . . . . . . . . . . . . 33
       6.10. Framed Access Authorization AVPs . . . . . . . . . . . . 35
             6.10.1.  Framed-Protocol AVP . . . . . . . . . . . . . . 35
             6.10.2.  Framed-Routing AVP. . . . . . . . . . . . . . . 35
             6.10.3.  Framed-MTU AVP. . . . . . . . . . . . . . . . . 35
             6.10.4.  Framed-Compression AVP. . . . . . . . . . . . . 36
       6.11. IP Access Authorization AVPs.. . . . . . . . . . . . . . 36
             6.11.1.  Framed-IP-Address AVP . . . . . . . . . . . . . 36
             6.11.2.  Framed-IP-Netmask AVP . . . . . . . . . . . . . 36
             6.11.3.  Framed-Route AVP. . . . . . . . . . . . . . . . 37
             6.11.4.  Framed-Pool AVP . . . . . . . . . . . . . . . . 37
             6.11.5.  Framed-Interface-Id AVP . . . . . . . . . . . . 37
             6.11.6.  Framed-IPv6-Prefix AVP. . . . . . . . . . . . . 38
             6.11.7.  Framed-IPv6-Route AVP . . . . . . . . . . . . . 38
             6.11.8.  Framed-IPv6-Pool AVP. . . . . . . . . . . . . . 38
       6.12. IPX Access . . . . . . . . . . . . . . . . . . . . . . . 38
             6.12.1.  Framed-IPX-Network AVP. . . . . . . . . . . . . 39
       6.13. AppleTalk Network Access . . . . . . . . . . . . . . . . 39
             6.13.1.  Framed-AppleTalk-Link AVP . . . . . . . . . . . 39
             6.13.2.  Framed-AppleTalk-Network AVP . . . . . . . . .  39
             6.13.3.  Framed-AppleTalk-Zone AVP . . . . . . . . . . . 40
       6.14. AppleTalk Remote Access. . . . . . . . . . . . . . . . . 40
             6.14.1.  ARAP-Features AVP . . . . . . . . . . . . . . . 40
             6.14.2.  ARAP-Zone-Access AVP. . . . . . . . . . . . . . 40
       6.15. Non-Framed Access Authorization AVPs . . . . . . . . . . 40
             6.15.1.  Login-IP-Host AVP . . . . . . . . . . . . . . . 40
             6.15.2.  Login-IPv6-Host AVP . . . . . . . . . . . . . . 41
             6.15.3.  Login-Service AVP . . . . . . . . . . . . . . . 41
       6.16. TCP Services . . . . . . . . . . . . . . . . . . . . . . 42
             6.16.1.  Login-TCP-Port AVP . . . . . . . . . . . . . .  42
       6.17. LAT Services . . . . . . . . . . . . . . . . . . . . . . 42
             6.17.1.  Login-LAT-Service AVP . . . . . . . . . . . . . 42
             6.17.2.  Login-LAT-Node AVP. . . . . . . . . . . . . . . 43
             6.17.3.  Login-LAT-Group AVP . . . . . . . . . . . . . . 43
             6.17.4.  Login-LAT-Port AVP. . . . . . . . . . . . . . . 43
   7.  NAS Tunneling  . . . . . . . . . . . . . . . . . . . . . . . . 44
       7.1.  Tunneling AVP  . . . . . . . . . . . . . . . . . . . . . 44
       7.2.  Tunnel-Type AVP  . . . . . . . . . . . . . . . . . . . . 45
       7.3.  Tunnel-Medium-Type AVP . . . . . . . . . . . . . . . . . 46
       7.4.  Tunnel-Client-Endpoint AVP . . . . . . . . . . . . . . . 46
       7.5.  Tunnel-Server-Endpoint AVP . . . . . . . . . . . . . . . 47
       7.6.  Tunnel-Password AVP  . . . . . . . . . . . . . . . . . . 48
       7.7.  Tunnel-Private-Group-Id AVP  . . . . . . . . . . . . . . 48
       7.8.  Tunnel-Assignment-Id AVP . . . . . . . . . . . . . . . . 48
       7.9.  Tunnel-Preference AVP  . . . . . . . . . . . . . . . . . 49
       7.10. Tunnel-Client-Auth-Id AVP. . . . . . . . . . . . . . . . 50
       7.11. Tunnel-Server-Auth-Id AVP. . . . . . . . . . . . . . . . 50
   8.  NAS Accounting . . . . . . . . . . . . . . . . . . . . . . . . 50
       8.1.  Accounting-Input-Octets AVP  . . . . . . . . . . . . . . 51
       8.2.  Accounting-Output-Octets AVP . . . . . . . . . . . . . . 52
       8.3.  Accounting-Input-Packets AVP . . . . . . . . . . . . . . 52
       8.4.  Accounting-Output-Packets AVP  . . . . . . . . . . . . . 52
       8.5.  Acct-Session-Time AVP  . . . . . . . . . . . . . . . . . 52
       8.6.  Acct-Authentic AVP . . . . . . . . . . . . . . . . . . . 52
       8.7.  Accounting-Auth-Method AVP . . . . . . . . . . . . . . . 53
       8.8.  Acct-Delay-Time  . . . . . . . . . . . . . . . . . . . . 53
       8.9.  Acct-Link-Count  . . . . . . . . . . . . . . . . . . . . 54
       8.10. Acct-Tunnel-Connection AVP . . . . . . . . . . . . . . . 54
       8.11. Acct-Tunnel-Packets-Lost AVP . . . . . . . . . . . . . . 55
   9.  RADIUS/Diameter Protocol Interactions  . . . . . . . . . . . . 55
       9.1.  RADIUS Request Forwarded as Diameter Request . . . . . . 55
             9.1.1.   RADIUS Dynamic Authorization Considerations . . 59
       9.2.  Diameter Request Forwarded as RADIUS Request . . . . . . 60
             9.2.1.   RADIUS Dynamic Authorization Considerations . . 62
       9.3.  AVPs Used Only for Compatibility . . . . . . . . . . . . 63
             9.3.1.   NAS-Identifier AVP. . . . . . . . . . . . . . . 63
             9.3.2.   NAS-IP-Address AVP. . . . . . . . . . . . . . . 64
             9.3.3.   NAS-IPv6-Address AVP. . . . . . . . . . . . . . 65
             9.3.4.   State AVP . . . . . . . . . . . . . . . . . . . 65
             9.3.5.   Termination-Cause AVP Code Values . . . . . . . 66
             9.3.6.   Origin-AAA-Protocol . . . . . . . . . . . . . . 68
       9.4.  Prohibited RADIUS Attributes . . . . . . . . . . . . . . 69
       9.5.  Translatable Diameter AVPs . . . . . . . . . . . . . . . 69
       9.6.  RADIUS Vendor-Specific Attributes  . . . . . . . . . . . 69
             9.6.1.  Forwarding a Diameter Vendor Specific AVP as a
                     RADIUS VSA . . . . . . . . . . . . . . . . . . . 70
             9.6.2.  Forwarding a RADIUS VSA as a Diameter Vendor
                     Specific AVP . . . . . . . . . . . . . . . . . . 70
   10. AVP Occurrence Tables. . . . . . . . . . . . . . . . . . . . . 71
       10.1. AA-Request/Answer AVP Table. . . . . . . . . . . . . . . 71
       10.2. Accounting AVP Tables. . . . . . . . . . . . . . . . . . 73
             10.2.1.  Accounting Framed Access AVP Table. . . . . . . 74
             10.2.2.  Accounting Non-Framed Access AVP Table. . . . . 76
   11. IANA Considerations. . . . . . . . . . . . . . . . . . . . . . 77
       11.1. Command Codes. . . . . . . . . . . . . . . . . . . . . . 77
       11.2. AVP Codes. . . . . . . . . . . . . . . . . . . . . . . . 78
       11.3. Application Identifier . . . . . . . . . . . . . . . . . 78
       11.4. CHAP-Algorithm AVP Values. . . . . . . . . . . . . . . . 78
       11.5. Accounting-Auth-Method AVP Values. . . . . . . . . . . . 78
       11.6. Origin-AAA-Protocol AVP Values . . . . . . . . . . . . . 78
   12. Security Considerations. . . . . . . . . . . . . . . . . . . . 78
   13. References . . . . . . . . . . . . . . . . . . . . . . . . . . 79
       13.1. Normative References . . . . . . . . . . . . . . . . . . 79
       13.2. Informative References . . . . . . . . . . . . . . . . . 80
   14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 83
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 84
   Full Copyright Statement . . . . . . . . . . . . . . . . . . . . . 85

the big picture is sections 1 through 14, then the authors and the copyright statement at the very end ๐ŸŒธ next up is the Introduction, so get ready for the good stuff ๐Ÿ’…

1. Introduction โœจ

okay so bestie, this doc is all about the Diameter protocol application for AAA in the Network Access Server (NAS) environment ๐ŸŒ. When you combine it with the Diameter Base protocol [BASE], the Transport Profile [DiamTrans], and EAP [DiamEAP], this NAS application spec covers the NAS-related requirements from RFC 2989 [AAACriteria] and RFC 3169 [NASCriteria]. it's giving complete package ๐Ÿ’…

early Diameter deployments are gonna include legacy systems, so this application was carefully designed to make protocol conversion between RADIUS and Diameter way easier ๐Ÿซถ. how? it includes the RADIUS attribute space, so you don't have to do a ton of attribute translations. iconic engineering, no cap ๐Ÿฆ‹

the interactions this document specifies between Diameter applications and RADIUS are meant to apply to all Diameter applications. in that sense, this document extends the Base Diameter protocol [BASE] ๐ŸŒธ

here's the roadmap ๐Ÿ—บ๏ธ: first, this doc describes how a Diameter NAS application operates. then it defines the Diameter message Command-Codes. after that, the AVPs used in these messages are listed and grouped by common usage: session identification, authentication, authorization, tunneling, and accounting. the authorization AVPs get broken down even further by service type. interaction and backward compatibility issues with RADIUS are covered in the later sections ๐ŸŽ€

1.1. Terminology

the base Diameter [BASE] specification, section 1.4, defines most of the terminology used here. on top of that, this application uses the following terms and acronyms ๐Ÿ“š

NAS (Network Access Server) - A device that provides an access service for a user to a network. The service may be a network connection or a value-added service such as terminal emulation [NASModel].

PPP (Point-to-Point Protocol) - A multiprotocol serial datalink. PPP is the primary IP datalink used for dial-in NAS connection service [PPP].

CHAP (Challenge Handshake Authentication Protocol) - An authentication process used in PPP [PPPCHAP].

PAP (Password Authentication Protocol) - A deprecated PPP authentication process, but often used for backward compatibility [PAP].

SLIP (Serial Line Interface Protocol) - A serial datalink that only supports IP. A design prior to PPP.

ARAP (Appletalk Remote Access Protocol) - A serial datalink for accessing Appletalk networks [ARAP].

IPX (Internet Packet Exchange) - The network protocol used by NetWare networks [IPX].

LAT (Local Area Transport) - A Digital Equipment Corp. LAN protocol for terminal services [LAT].

VPN (Virtual Private Network) - In this document, this term is used to describe access services that use tunneling methods.

1.2. Requirements Language

in this document, the key words "MAY", "MUST", "MUST NOT", "OPTIONAL", "RECOMMENDED", "SHOULD", and "SHOULD NOT" are to be interpreted as described in [Keywords] ๐Ÿ”‘

1.3. Advertising Application Support

Diameter applications conforming to this specification MUST advertise support by including the value of one (1) in the Auth-Application-Id of Capabilities-Exchange-Request (CER), AA-Request (AAR), and AA-Answer (AAA) messages. All other messages are defined by [BASE] and use the Base application id value. ๐Ÿ“ฃ

2. NAS Calls, Ports, and Sessions

okay this is the fun part ๐ŸŽฌ. when a new call or service connection shows up at a port of a Network Access Server (NAS), that kicks off a Diameter NAS message exchange. the info about the call, the user's identity, and the user's authentication info all get packed into a Diameter AA-Request (AAR) message and sent off to a server ๐Ÿ“ฆ

the server processes everything and replies with a Diameter AA-Answer (AAA) message. that reply has authorization info for the NAS, or a failure code (Result-Code AVP) if things went wrong ๐Ÿ˜ฌ. a value of DIAMETER_MULTI_ROUND_AUTH means there's another authentication exchange coming, so several AAR and AAA messages can get swapped back and forth until the transaction completes ๐Ÿ”„

depending on the Auth-Request-Type AVP, Diameter lets you send authorization-only requests that have no authentication info from the client. this goes beyond the Call Check capabilities in section 5.6 of [RADIUS], because no access decision is requested here. so service cannot be started based on a response to an authorization-only request without introducing a significant security vulnerability ๐Ÿšจ not it, not us.

since RADIUS has no equivalent capability, authorization-only requests from a Diameter-implementing NAS may not be easily translated into an equivalent RADIUS message by a Diameter/RADIUS gateway ๐Ÿฅฒ. for example, when a Diameter authorization-only request can't be translated to a RADIUS Call Check, the gateway would need to add authentication info to the RADIUS Access Request. then, when the Access-Reply comes back, the gateway would need to discard the access decision (Accept/Reject). it's honestly not clear whether these translations can happen without adding significant security vulnerabilities ๐Ÿ’€

2.1. Diameter Session Establishment

when the authentication or authorization exchange completes successfully, the NAS application SHOULD start a session context โœจ. if DIAMETER_MULTI_ROUND_AUTH is returned as the Result-Code, the exchange keeps going until a success or error comes back ๐Ÿ”

if accounting is active, the application MUST also send an Accounting message [BASE] ๐Ÿงพ. an Accounting-Record-Type of START_RECORD gets sent for a new session. if a session fails to start, the EVENT_RECORD message gets sent with the reason for the failure described ๐Ÿ™ˆ

also, heads up: getting back an unsupportable Accounting-Realtime-Required value [BASE] would result in a failure to establish the session ๐Ÿšซ

2.2. Diameter Session Reauthentication or Reauthorization

the Diameter Base protocol lets users get periodically reauthenticated and/or reauthorized ๐Ÿ”„๐Ÿ’–. in these cases, the Session-Id AVP in the AAR message MUST be the same as the one in the original authentication/authorization message ๐Ÿ†”

a Diameter server tells the NAS the maximum time allowed before reauthentication or reauthorization through the Authorization-Lifetime AVP [BASE] โฐ. a NAS MAY reauthenticate and/or reauthorize before the end, but A NAS MUST reauthenticate and/or reauthorize at the end of the period provided by the Authorization-Lifetime AVP. and if a reauthentication exchange fails, the service gets terminated ๐Ÿ’”

it's also possible for Diameter servers to send an unsolicited reauthentication and/or reauthorization request (e.g., Re-Auth-Request (RAR) message [BASE]) to the NAS ๐Ÿ“ฌ. when the NAS gets one of these, it MUST respond with a Re-Auth-Answer (RAA) message [BASE] ๐Ÿซก

if the RAR properly identifies an active session, the NAS starts a new local reauthentication or authorization sequence, as indicated by the Re-Auth-Request-Type value ๐ŸŽฏ. that makes the NAS send a new AAR message using the existing Session-Id. the server responds with an AAA message to specify the new service parameters ๐Ÿช„

if accounting is active, every change of authentication or authorization SHOULD generate an accounting message ๐Ÿ“Š. if the NAS service is a continuation of the prior user context, an Accounting-Record-Type of INTERIM_RECORD is appropriate, showing the new session attributes and cumulative status ๐Ÿ“ˆ. if the NAS detects a new user or a significant change in authorization, the service may send two messages, of the types STOP_RECORD and START_RECORD ๐Ÿ”€. accounting may change the subsession identifiers (Acct-Session-ID, or Acct-Sub-Session-Id) to indicate those sub-sessions ๐Ÿช†. a service may also use a different Session-Id value for accounting (see [BASE] section 9.6) ๐ŸŽ€

however, the Diameter Session-ID AVP value used for the initial authorization exchange MUST be used to generate an STR message when the session context is terminated ๐Ÿ”š

2.3. Diameter Session Termination

when a NAS gets an indication that a user's session is being disconnected by the client (e.g., LCP Terminate is received) or by an administrative command, the NAS MUST issue a Session-Termination-Request (STR) [BASE] to its Diameter Server ๐Ÿ›‘. this makes sure any resources kept on the servers get freed up properly ๐Ÿงน

also, a NAS that receives an Abort-Session-Request (ASR) [BASE] MUST issue an ASA if the session identified is active, and it MUST disconnect the PPP (or tunneling) session ๐Ÿ“ด

if accounting is active, an Accounting STOP_RECORD message [BASE] MUST be sent when the session context is terminated ๐Ÿ

more info on Diameter Session Termination lives in [BASE] sections 8.4 and 8.5 ๐Ÿ“–

3. NAS Messages

this section defines the Diameter message Command-Code [BASE] values that MUST be supported by all Diameter implementations conforming to this specification ๐Ÿ’…. here are the Command Codes:

   Command-Name                  Abbrev.  Code   Reference
   -------------------------------------------------------
   AA-Request                      AAR     265     3.1
   AA-Answer                       AAA     265     3.2
   Re-Auth-Request                 RAR     258     3.3
   Re-Auth-Answer                  RAA     258     3.4
   Session-Termination-Request     STR     275     3.5
   Session-Termination-Answer      STA     275     3.6
   Abort-Session-Request           ASR     274     3.7
   Abort-Session-Answer            ASA     274     3.8
   Accounting-Request              ACR     271     3.9
   Accounting-Answer               ACA     271     3.10

3.1. AA-Request (AAR) Command โœจ

okay so the AA-Request (AAR) is the message you send when you want authentication and/or authorization for a NAS user ๐ŸŽ€. You can spot it by Command-Code 265 plus the 'R' bit set in the Command Flags field ๐Ÿ’…. The type of request gets picked with the Auth-Request-Type AVP [BASE]. The recommended value for most RADIUS interoperability situations is AUTHORIZE_AUTHENTICATE ๐Ÿฆ‹.

If you're asking for authentication, the User-Name attribute SHOULD be there, plus any extra authentication AVPs that carry the password info ๐Ÿ”. An authorization request SHOULD only include the info the authorization is actually done with, like the User-Name, Called-Station-Id, or Calling-Station-Id AVPs ๐Ÿ™ˆ. Every request SHOULD have AVPs that uniquely identify where the call came from, like Origin-Host and NAS-Port ๐ŸŒธ. Certain networks MAY use different AVPs for authorization purposes ๐Ÿ’œ. An authorization request will include some AVPs defined in section 6 โœจ.

It's totally possible for a single session to get authorized first and then have an authentication request follow ๐Ÿงš.

This AA-Request message MAY be the result of a multi-round authentication exchange, which happens when the AA-Answer message comes back with the Result-Code AVP set to DIAMETER_MULTI_ROUND_AUTH ๐Ÿ”ฅ. A subsequent AAR message SHOULD be sent, with the User-Password AVP holding the user's response to the prompt, and it MUST include any State AVPs that were present in the AAA message ๐Ÿ’€.

Message Format

<AA-Request> ::= < Diameter Header: 265, REQ, PXY >
                 < Session-Id >
                 { Auth-Application-Id }
                 { Origin-Host }
                 { Origin-Realm }
                 { Destination-Realm }
                 { Auth-Request-Type }
                 [ Destination-Host ]
                 [ NAS-Identifier ]
                 [ NAS-IP-Address ]
                 [ NAS-IPv6-Address ]
                 [ NAS-Port ]
                 [ NAS-Port-Id ]
                 [ NAS-Port-Type ]
                 [ Origin-AAA-Protocol ]
                 [ Origin-State-Id ]
                 [ Port-Limit ]
                 [ User-Name ]
                 [ User-Password ]
                 [ Service-Type ]
                 [ State ]
                 [ Authorization-Lifetime ]
                 [ Auth-Grace-Period ]
                 [ Auth-Session-State ]
                 [ Callback-Number ]
                 [ Called-Station-Id ]
                 [ Calling-Station-Id ]
                 [ Originating-Line-Info ]
                 [ Connect-Info ]
                 [ CHAP-Auth ]
                 [ CHAP-Challenge ]
               * [ Framed-Compression ]
                 [ Framed-Interface-Id ]
                 [ Framed-IP-Address ]
               * [ Framed-IPv6-Prefix ]
                 [ Framed-IP-Netmask ]
                 [ Framed-MTU ]
                 [ Framed-Protocol ]
                 [ ARAP-Password ]
                 [ ARAP-Security ]

               * [ ARAP-Security-Data ]
               * [ Login-IP-Host ]
               * [ Login-IPv6-Host ]
                 [ Login-LAT-Group ]
                 [ Login-LAT-Node ]
                 [ Login-LAT-Port ]
                 [ Login-LAT-Service ]
               * [ Tunneling ]
               * [ Proxy-Info ]
               * [ Route-Record ]
               * [ AVP ]

3.2. AA-Answer (AAA) Command โœจ

the AA-Answer (AAA) message is the reply, and you know it because Command-Code is 265 and the 'R' bit is cleared in the Command Flags field ๐Ÿฆ‹. It gets sent back in response to the AA-Request (AAR) message. If authorization was asked for, a successful response includes the authorization AVPs that fit the service being provided, as defined in section 6 ๐Ÿ’–.

For authentication exchanges that need more than a single round trip, the server MUST set the Result-Code AVP to DIAMETER_MULTI_ROUND_AUTH ๐Ÿ”ฅ. An AAA message with this result code MAY include one Reply-Message or more, and MAY include zero or one State AVPs ๐ŸŒˆ.

If the Reply-Message AVP was there, the network access server SHOULD send the text to the user's client so it can show up for the user, telling the client to prompt them for a response ๐Ÿ“ฃ. For example, this can be done in PPP via PAP ๐ŸŽ€. If the access client can't prompt the user for a new response, it MUST treat the AA-Answer (AAA) with the Reply-Message AVP as an error and deny access ๐Ÿšซ. no exceptions, bestie ๐Ÿ’€.

Message Format

<AA-Answer> ::= < Diameter Header: 265, PXY >
                < Session-Id >
                { Auth-Application-Id }
                { Auth-Request-Type }
                { Result-Code }
                { Origin-Host }
                { Origin-Realm }
                [ User-Name ]
                [ Service-Type ]
              * [ Class ]
              * [ Configuration-Token ]
                [ Acct-Interim-Interval ]
                [ Error-Message ]
                [ Error-Reporting-Host ]
              * [ Failed-AVP ]
                [ Idle-Timeout ]
                [ Authorization-Lifetime ]
                [ Auth-Grace-Period ]
                [ Auth-Session-State ]
                [ Re-Auth-Request-Type ]
                [ Multi-Round-Time-Out ]
                [ Session-Timeout ]
                [ State ]
              * [ Reply-Message ]
                [ Origin-AAA-Protocol ]
                [ Origin-State-Id ]
              * [ Filter-Id ]
                [ Password-Retry ]
                [ Port-Limit ]
                [ Prompt ]
                [ ARAP-Challenge-Response ]
                [ ARAP-Features ]
                [ ARAP-Security ]
              * [ ARAP-Security-Data ]
                [ ARAP-Zone-Access ]
                [ Callback-Id ]
                [ Callback-Number ]
                [ Framed-Appletalk-Link ]
              * [ Framed-Appletalk-Network ]
                [ Framed-Appletalk-Zone ]
              * [ Framed-Compression ]
                [ Framed-Interface-Id ]
                [ Framed-IP-Address ]
              * [ Framed-IPv6-Prefix ]
                [ Framed-IPv6-Pool ]
              * [ Framed-IPv6-Route ]
                [ Framed-IP-Netmask ]
              * [ Framed-Route ]
                [ Framed-Pool ]
                [ Framed-IPX-Network ]
                [ Framed-MTU ]
                [ Framed-Protocol ]
                [ Framed-Routing ]
              * [ Login-IP-Host ]
              * [ Login-IPv6-Host ]
                [ Login-LAT-Group ]
                [ Login-LAT-Node ]
                [ Login-LAT-Port ]
                [ Login-LAT-Service ]
                [ Login-Service ]
                [ Login-TCP-Port ]
              * [ NAS-Filter-Rule ]
              * [ QoS-Filter-Rule ]
              * [ Tunneling ]
              * [ Redirect-Host ]
                [ Redirect-Host-Usage ]
                [ Redirect-Max-Cache-Time ]
              * [ Proxy-Info ]
              * [ AVP ]

3.3. Re-Auth-Request (RAR) Command โœจ

a Diameter server may kick off a re-authentication and/or re-authorization for a particular session by sending a Re-Auth-Request (RAR) message [BASE] ๐Ÿ”„.

for example, with pre-paid services, the Diameter server that first authorized a session might need some confirmation that the user is still using the service ๐Ÿ’ธ.

if a NAS gets an RAR message whose Session-Id matches a currently active session and whose Re-Auth-Type includes authentication, it MUST initiate a re-authentication toward the user, as long as the service supports this particular feature ๐Ÿ”.

Message Format

<RA-Request>  ::= < Diameter Header: 258, REQ, PXY >
                  < Session-Id >
                  { Origin-Host }
                  { Origin-Realm }
                  { Destination-Realm }
                  { Destination-Host }
                  { Auth-Application-Id }
                  { Re-Auth-Request-Type }
                  [ User-Name ]
                  [ Origin-AAA-Protocol ]
                  [ Origin-State-Id ]
                  [ NAS-Identifier ]
                  [ NAS-IP-Address ]
                  [ NAS-IPv6-Address ]
                  [ NAS-Port ]
                  [ NAS-Port-Id ]
                  [ NAS-Port-Type ]
                  [ Service-Type ]
                  [ Framed-IP-Address ]
                  [ Framed-IPv6-Prefix ]
                  [ Framed-Interface-Id ]
                  [ Called-Station-Id ]
                  [ Calling-Station-Id ]
                  [ Originating-Line-Info ]
                  [ Acct-Session-Id ]
                  [ Acct-Multi-Session-Id ]
                  [ State ]
                * [ Class ]
                  [ Reply-Message ]
                * [ Proxy-Info ]
                * [ Route-Record ]
                * [ AVP ]

3.4. Re-Auth-Answer (RAA) Command โœจ

the Re-Auth-Answer (RAA) message [BASE] is the reply to the RAR ๐Ÿ’Œ. The Result-Code AVP MUST be present, and it tells you how the request went ๐Ÿ“‹.

a successful RAA transaction MUST be followed by an AAR message ๐Ÿซถ.

Message Format

<RA-Answer>  ::= < Diameter Header: 258, PXY >
                 < Session-Id >
                 { Result-Code }
                 { Origin-Host }
                 { Origin-Realm }
                 [ User-Name ]
                 [ Origin-AAA-Protocol ]
                 [ Origin-State-Id ]
                 [ Error-Message ]
                 [ Error-Reporting-Host ]
               * [ Failed-AVP ]
               * [ Redirected-Host ]
                 [ Redirected-Host-Usage ]
                 [ Redirected-Host-Cache-Time ]
                 [ Service-Type ]
               * [ Configuration-Token ]
                 [ Idle-Timeout ]
                 [ Authorization-Lifetime ]
                 [ Auth-Grace-Period ]
                 [ Re-Auth-Request-Type ]
                 [ State ]
               * [ Class ]
               * [ Reply-Message ]
                 [ Prompt ]
               * [ Proxy-Info ]
               * [ AVP ]

3.5. Session-Termination-Request (STR) Command

okay so the NAS uses the Session-Termination-Request (STR) message [BASE] to let the Diameter Server know that a session it had authenticated and/or authorized is wrapping up ๐ŸŒธ bye bye session!

Message Format

      <ST-Request> ::= < Diameter Header: 275, REQ, PXY >
                      < Session-Id >
                      { Origin-Host }
                      { Origin-Realm }
                      { Destination-Realm }
                      { Auth-Application-Id }
                      { Termination-Cause }
                      [ User-Name ]
                      [ Destination-Host ]
                    * [ Class ]
                      [ Origin-AAA-Protocol ]
                      [ Origin-State-Id ]
                    * [ Proxy-Info ]
                    * [ Route-Record ]
                    * [ AVP ]

3.6. Session-Termination-Answer (STA) Command

The Session-Termination-Answer (STA) message [BASE] is the Diameter Server's "got it, the session is over" reply ๐Ÿ’… The Result-Code AVP MUST be present, and it MAY contain an indication that an error occurred while the STR was being serviced.

Once the STA is sent or received, the Diameter Server MUST release all resources for the session indicated by the Session-Id AVP ๐Ÿงน Any intermediate server in the Proxy-Chain MAY also release any resources, if necessary.

Message Format

      <ST-Answer>  ::= < Diameter Header: 275, PXY >
                       < Session-Id >
                       { Result-Code }
                       { Origin-Host }
                       { Origin-Realm }
                       [ User-Name ]
                     * [ Class ]
                       [ Error-Message ]
                       [ Error-Reporting-Host ]

                     * [ Failed-AVP ]
                       [ Origin-AAA-Protocol ]
                       [ Origin-State-Id ]
                     * [ Redirect-Host ]
                       [ Redirect-Host-Usase ]
                       [ Redirect-Max-Cache-Time ]
                     * [ Proxy-Info ]
                     * [ AVP ]

3.7. Abort-Session-Request (ASR) Command

The Abort-Session-Request (ASR) message [BASE] is the "hey, stop that session right now" message ๐Ÿšจ Any server is allowed to send it to the NAS that's providing session service, asking it to stop the session identified by the Session-Id.

Message Format

      <AS-Request>  ::= < Diameter Header: 274, REQ, PXY >
                       < Session-Id >
                       { Origin-Host }
                       { Origin-Realm }
                       { Destination-Realm }
                       { Destination-Host }
                       { Auth-Application-Id }
                       [ User-Name ]
                       [ Origin-AAA-Protocol ]
                       [ Origin-State-Id ]
                       [ NAS-Identifier ]
                       [ NAS-IP-Address ]
                       [ NAS-IPv6-Address ]
                       [ NAS-Port ]
                       [ NAS-Port-Id ]
                       [ NAS-Port-Type ]
                       [ Service-Type ]
                       [ Framed-IP-Address ]
                       [ Framed-IPv6-Prefix ]
                       [ Framed-Interface-Id ]
                       [ Called-Station-Id ]
                       [ Calling-Station-Id ]
                       [ Originating-Line-Info ]
                       [ Acct-Session-Id ]
                       [ Acct-Multi-Session-Id ]
                       [ State ]
                     * [ Class ]
                     * [ Reply-Message ]
                     * [ Proxy-Info ]
                     * [ Route-Record ]
                     * [ AVP ]

3.8. Abort-Session-Answer (ASA) Command

The ASA message [BASE] is the reply to the ASR ๐ŸŽ€ The Result-Code AVP MUST be present, and it tells everyone how the request turned out.

If the session identified by Session-Id in the ASR was successfully terminated, Result-Code is set to DIAMETER_SUCCESS โœจ If the session is not currently active, Result-Code is set to DIAMETER_UNKNOWN_SESSION_ID ๐Ÿ™ˆ If the access device does not stop the session for any other reason, Result-Code is set to DIAMETER_UNABLE_TO_COMPLY ๐Ÿ’€

Message Format

      <AS-Answer>  ::= < Diameter Header: 274, PXY >
                       < Session-Id >
                       { Result-Code }
                       { Origin-Host }
                       { Origin-Realm }
                       [ User-Name ]
                       [ Origin-AAA-Protocol ]
                       [ Origin-State-Id ]
                       [ State]
                       [ Error-Message ]
                       [ Error-Reporting-Host ]
                     * [ Failed-AVP ]
                     * [ Redirected-Host ]
                       [ Redirected-Host-Usage ]
                       [ Redirected-Max-Cache-Time ]
                     * [ Proxy-Info ]
                     * [ AVP ]

3.9. Accounting-Request (ACR) Command

The ACR message [BASE] is how the NAS reports its session info to a target server downstream ๐Ÿ“Š

Either Acct-Application-Id or Vendor-Specific-Application-Id AVPs MUST be present ๐Ÿซถ If the Vendor-Specific-Application-Id grouped AVP is present, it must have an Acct-Application-Id inside.

The AVPs listed in the Base MUST be assumed to be present, as appropriate. NAS service-specific accounting AVPs SHOULD be present as described in section 8 and the rest of this specification ๐ŸŒˆ

Message Format

      <AC-Request> ::= < Diameter Header: 271, REQ, PXY >
                      < Session-Id >
                      { Origin-Host }
                      { Origin-Realm }
                      { Destination-Realm }
                      { Accounting-Record-Type }
                      { Accounting-Record-Number }
                      [ Acct-Application-Id ]
                      [ Vendor-Specific-Application-Id ]
                      [ User-Name ]
                      [ Accounting-Sub-Session-Id ]
                      [ Acct-Session-Id ]
                      [ Acct-Multi-Session-Id ]
                      [ Origin-AAA-Protocol ]
                      [ Origin-State-Id ]
                      [ Destination-Host ]
                      [ Event-Timestamp ]
                      [ Acct-Delay-Time ]
                      [ NAS-Identifier ]
                      [ NAS-IP-Address ]
                      [ NAS-IPv6-Address ]
                      [ NAS-Port ]
                      [ NAS-Port-Id ]
                      [ NAS-Port-Type ]
                    * [ Class ]
                      [ Service-Type ]
                      [ Termination-Cause ]
                      [ Accounting-Input-Octets ]
                      [ Accounting-Input-Packets ]
                      [ Accounting-Output-Octets ]
                      [ Accounting-Output-Packets ]
                      [ Acct-Authentic ]
                      [ Accounting-Auth-Method ]
                      [ Acct-Link-Count ]
                      [ Acct-Session-Time ]
                      [ Acct-Tunnel-Connection ]
                      [ Acct-Tunnel-Packets-Lost ]
                      [ Callback-Id ]
                      [ Callback-Number ]
                      [ Called-Station-Id ]
                      [ Calling-Station-Id ]
                    * [ Connection-Info ]
                      [ Originating-Line-Info ]
                      [ Authorization-Lifetime ]
                      [ Session-Timeout ]
                      [ Idle-Timeout ]
                      [ Port-Limit ]
                      [ Accounting-Realtime-Required ]
                      [ Acct-Interim-Interval ]
                    * [ Filter-Id ]
                    * [ NAS-Filter-Rule ]
                    * [ Qos-Filter-Rule ]
                      [ Framed-AppleTalk-Link ]
                      [ Framed-AppleTalk-Network ]
                      [ Framed-AppleTalk-Zone ]
                      [ Framed-Compression ]
                      [ Framed-Interface-Id ]
                      [ Framed-IP-Address ]
                      [ Framed-IP-Netmask ]
                    * [ Framed-IPv6-Prefix ]
                      [ Framed-IPv6-Pool ]
                    * [ Framed-IPv6-Route ]
                      [ Framed-IPX-Network ]
                      [ Framed-MTU ]
                      [ Framed-Pool ]
                      [ Framed-Protocol ]
                    * [ Framed-Route ]
                      [ Framed-Routing ]
                    * [ Login-IP-Host ]
                    * [ Login-IPv6-Host ]
                      [ Login-LAT-Group ]
                      [ Login-LAT-Node ]
                      [ Login-LAT-Port ]
                      [ Login-LAT-Service ]
                      [ Login-Service ]
                      [ Login-TCP-Port ]
                    * [ Tunneling ]
                    * [ Proxy-Info ]
                    * [ Route-Record ]
                    * [ AVP ]

3.10. Accounting-Answer (ACA) Command

The ACA message [BASE] is the acknowledgement for an Accounting-Request command ๐Ÿ’– The Accounting-Answer command carries the same Session-Id as the Request. If the Accounting-Request was protected by end-to-end security, then the corresponding ACA message MUST be protected as well ๐Ÿ”

Only the target Diameter Server or home Diameter Server SHOULD respond with the Accounting-Answer command ๐Ÿ‘‘

Either Acct-Application-Id or Vendor-Specific-Application-Id AVPs MUST be present, just like they were in the request.

The AVPs listed in the Base MUST be assumed to be present, as appropriate. NAS service-specific accounting AVPs SHOULD be present as described in section 8 and the rest of this specification โœจ

Message Format

      <AC-Answer> ::= < Diameter Header: 271, PXY >
                      < Session-Id >
                      { Result-Code }
                      { Origin-Host }
                      { Origin-Realm }
                      { Accounting-Record-Type }
                      { Accounting-Record-Number }
                      [ Acct-Application-Id ]
                      [ Vendor-Specific-Application-Id ]
                      [ User-Name ]
                      [ Accounting-Sub-Session-Id ]
                      [ Acct-Session-Id ]
                      [ Acct-Multi-Session-Id ]
                      [ Event-Timestamp ]
                      [ Error-Message ]
                      [ Error-Reporting-Host ]
                    * [ Failed-AVP ]
                      [ Origin-AAA-Protocol ]
                      [ Origin-State-Id ]
                      [ NAS-Identifier ]
                      [ NAS-IP-Address ]
                      [ NAS-IPv6-Address ]
                      [ NAS-Port ]
                      [ NAS-Port-Id ]
                      [ NAS-Port-Type ]
                      [ Service-Type ]
                      [ Termination-Cause ]
                      [ Accounting-Realtime-Required ]
                      [ Acct-Interim-Interval ]
                    * [ Class ]
                    * [ Proxy-Info ]
                    * [ Route-Record ]
                    * [ AVP ]

4. NAS Session AVPs โœจ

Diameter reserves the AVP Codes 0 - 255 for RADIUS functions that are implemented in Diameter ๐Ÿงš

AVPs new to Diameter have code values of 256 and greater. A Diameter message that includes one of these AVPs may represent functions not present in the RADIUS environment, and it may cause interoperability issues if the request traverses an AAA system that only supports the RADIUS protocol ๐Ÿ™ˆ

Some RADIUS attributes are not allowed or supported directly in Diameter. See section 9 for more information ๐Ÿฆ‹

4.1. Call and Session Information ๐Ÿ’–

okay so this section is where we get the AVPs that are specific to NAS Diameter applications ๐ŸŽ€. they help identify the call and session context and the status info. on a request, this info lets the server qualify the session, which is giving main character energy โœจ

these AVPs get used on top of the Base AVPs, which are:

  • Session-Id
  • Auth-Application-Id
  • Origin-Host
  • Origin-Realm
  • Auth-Request-Type
  • Termination-Cause

ok and here's the session-level table ๐Ÿฆ‹. it lists the AVP Code values, the types, the possible flag values, and whether each AVP MAY be encrypted ๐Ÿ”

                                        +---------------------+
                                        |    AVP Flag rules   |
                                        |----+-----+----+-----|----+
               AVP  Section             |    |     |SHLD| MUST|    |
Attribute Name  Code Defined  Value Type |MUST| MAY | NOT|  NOT|Encr|
-----------------------------------------|----+-----+----+-----|----|
NAS-Port           5   4.2    Unsigned32 | M  |  P  |    |  V  | Y  |
NAS-Port-Id       87   4.3    UTF8String | M  |  P  |    |  V  | Y  |
NAS-Port-Type     61   4.4    Enumerated | M  |  P  |    |  V  | Y  |
Called-Station-Id 30   4.5    UTF8String | M  |  P  |    |  V  | Y  |
Calling-Station-  31   4.6    UTF8String | M  |  P  |    |  V  | Y  |
  Id                                     |    |     |    |     |    |
Connect-Info      77   4.7    UTF8String | M  |  P  |    |  V  | Y  |
Originating-Line- 94   4.8    OctetString|    | M,P |    |  V  | Y  |
  Info                                   |    |     |    |     |    |
Reply-Message     18   4.9    UTF8String | M  |  P  |    |  V  | Y  |
-----------------------------------------|----+-----+----+-----|----|

4.2. NAS-Port AVP ๐ŸŒธ

the NAS-Port AVP (AVP Code 5) is of type Unsigned32 ๐Ÿ”ข. it holds the physical or virtual port number of the NAS that's authenticating the user. quick heads up: "port" here means a service connection on the NAS, NOT an IP protocol identifier, so don't mix those up ๐Ÿ™…โ€โ™€๏ธ

either NAS-Port or NAS-Port-Id (AVP Code 87) SHOULD be present in AA-Request (AAR) commands if the NAS differentiates among its ports โœจ

4.3. NAS-Port-Id AVP ๐Ÿงš

the NAS-Port-Id AVP (AVP Code 87) is of type UTF8String and is made of ASCII text that identifies the port of the NAS authenticating the user ๐Ÿ’…. same deal as before: "port" means a service connection on the NAS, not an IP protocol identifier.

either NAS-Port or NAS-Port-Id SHOULD be present in AA-Request (AAR) commands if the NAS differentiates among its ports. NAS-Port-Id is intended for use by NASes that cannot conveniently number their ports ๐Ÿซถ

4.4. NAS-Port-Type AVP ๐Ÿ“

the NAS-Port-Type AVP (AVP Code 61) is of type Enumerated and tells you the type of port the NAS is authenticating the user on ๐Ÿ“ก. this AVP SHOULD be present if the NAS uses the same NAS-Port number ranges for different service types at the same time ๐Ÿ˜ญ

the supported values are defined in [RADIUSTypes]. the list below is informational and can be changed by the IANA, so don't get too attached ๐Ÿ™ˆ

    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
   20   Token-Ring   [RAD802.1X]
   21   FDDI         [RAD802.1X]
   22   Wireless - CDMA2000
   23   Wireless - UMTS
   24   Wireless - 1X-EV
   25   IAPP    [IEEE 802.11f]

4.5. Called-Station-Id AVP ๐Ÿ“ž

the Called-Station-Id AVP (AVP Code 30) is of type UTF8String ๐Ÿ’Œ. it lets the NAS send an ASCII string describing the layer 2 address the user contacted in the request. for dialup access, this can be a phone number picked up with Dialed Number Identification (DNIS) or a similar tech ๐Ÿ“ฒ. note that this may be different from the phone number the call came in on ๐Ÿค”. for use with IEEE 802 access, the Called-Station-Id MAY contain a MAC address formatted as described in [RAD802.1X]. it SHOULD only be present in authentication and/or authorization requests ๐Ÿ’–

if the Auth-Request-Type AVP is set to authorization-only and the User-Name AVP is absent, the Diameter Server MAY perform authorization based on this field ๐Ÿ‘€. this can be used by a NAS to ask whether a call should be answered based on the DNIS, which is so smart ๐Ÿง 

the codification of this field's allowed usage range is outside the scope of this specification ๐Ÿ™ƒ

4.6. Calling-Station-Id AVP ๐Ÿ“ฑ

the Calling-Station-Id AVP (AVP Code 31) is of type UTF8String โœจ. it lets the NAS send an ASCII string describing the layer 2 address the user connected from. for dialup access, that's the phone number the call came from, using Automatic Number Identification (ANI) or a similar tech ๐Ÿ“ž. for use with IEEE 802 access, the Calling-Station-Id AVP MAY contain a MAC address, formated as described in [RAD802.1X]. it SHOULD only be present in authentication and/or authorization requests ๐Ÿซถ

if the Auth-Request-Type AVP is set to authorization-only and the User-Name AVP is absent, the Diameter Server MAY perform authorization based on this field ๐Ÿ”ฅ. this can be used by a NAS to ask whether a call should be answered based on the layer 2 address (ANI, MAC Address, etc.)

the codification of this field's allowed usage range is outside the scope of this specification ๐Ÿ’…

4.7. Connect-Info AVP ๐Ÿ”Œ

the Connect-Info AVP (AVP Code 77) is of type UTF8String and gets sent in the AA-Request message or the ACR STOP message ๐Ÿš€. when it's sent in the Access-Request, it tells you the nature of the user's connection. the connection speed SHOULD be included at the beginning of the first Connect-Info AVP in the message ๐Ÿ’จ. if the transmit and receive connection speeds differ, both may be included in the first AVP. the transmit speed goes first (that's the speed the NAS modem transmits at), then a slash (/), then the receive speed, and then any other optional info ๐ŸŽ€

for example: "28800 V42BIS/LAPM" or "52000/31200 V90" ๐ŸŒˆ

more than one Connect-Info attribute may be present in an Accounting-Request packet ๐Ÿ—‚๏ธ. that's to accommodate the ITU's expected efforts to have modems report more connection info in a standard format that might go over 252 octets, which is a lot of info, honestly ๐Ÿ˜ญ

if it's sent in the ACR STOP, this attribute may summarize statistics about session quality โญ. for example, in IEEE 802.11, the Connect-Info attribute may contain info on the number of link layer retransmissions. the exact format of this attribute is implementation specific, so it's up to whoever builds it ๐Ÿงš

4.8. Originating-Line-Info AVP ๐Ÿ“Ÿ

the Originating-Line-Info AVP (AVP Code 94) is of type OctetString ๐Ÿฆ‹. the NAS sends it to convey info about where a call came from in an SS7 system.

the originating line information (OLI) element tells you the nature and/or characteristics of the line the call started on, like a pay phone, a hotel, or a cellular line ๐Ÿ“ฑ. telephone companies are starting to offer OLI to their customers as an option over Primary Rate Interface (PRI) ๐Ÿข. ISPs can use OLI together with Called-Station-Id and Calling-Station-Id to tell customer calls apart and define different services ๐Ÿ‘‘

the Value field contains two octets (00 - 99). ANSI T1.113 and BELLCORE 394 can be used for more info on these values and how they're used ๐Ÿ“š. for more info on current assignment values, check [ANITypes] ๐Ÿ’œ

 Value   Description
------------------------------------------------------------
   00    Plain Old Telephone Service (POTS)
   01    Multiparty Line (more than 2)
   02    ANI Failure
   03    ANI Observed
   04    ONI Observed
   05    ANI Failure Observed
   06    Station Level Rating
   07    Special Operator Handling Required
   08    InterLATA Restricted
   10    Test Call
   20    Automatic Identified Outward Dialing (AIOD)
   23    Coin or Non-Coin
   24    Toll Free Service (Non-Pay Origination)
   25    Toll Free Service (Pay Origination)
   27    Toll Free Service (Coin Control Origination)
   29    Prison/Inmate Service
   30-32 Intercept
   30    Intercept (Blank)
   31    Intercept (Trouble)
   32    Intercept (Regular)
   34    Telco Operator Handled Call
   40-49 Unrestricted Use
   52    Outward Wide Area Telecommunications Service (OUTWATS)
   60    Telecommunications Relay Service (TRS)(Unrestricted)
   61    Cellular/Wireless PCS (Type 1)
   62    Cellular/Wireless PCS (Type 2)
   63    Cellular/Wireless PCS (Roaming)
   66    TRS (Hotel)
   67    TRS (Restricted)
   70    Pay Station, No Coin Control
   93    Access for Private Virtual Network Service

4.9. Reply-Message AVP ๐Ÿ’ฌ

the Reply-Message AVP (AVP Code 18) is of type UTF8String and holds text that MAY be displayed to the user ๐Ÿ’–. when it's used in an AA-Answer message with a successful Result-Code AVP, it means success ๐ŸŽ‰. when it shows up in an AAA message with a Result-Code other than DIAMETER_SUCCESS, the AVP carries a failure message ๐Ÿ˜ฌ

the Reply-Message AVP MAY indicate dialog text to prompt the user before another AA-Request attempt โœจ. when it's used in an AA-Answer with a Result-Code of DIAMETER_MULTI_ROUND_AUTH, or in a Re-Auth-Request message, it MAY contain dialog text to prompt the user for a response ๐ŸŒธ

multiple Reply-Messages MAY be included, and if any are displayed, they MUST be displayed in the same order as they appear in the Diameter message ๐Ÿซถ. order matters, bestie, no cap ๐Ÿ’…


5. NAS Authentication AVPs โœจ

Okay bestie, this section is where the auth magic happens ๐Ÿ” It defines the AVPs that carry the authentication info in Diameter. It gives RADIUS-like AAA vibes, but over a more reliable and secure transport, as the base protocol [BASE] explains ๐Ÿ’…

Here's the table of AVPs, with their AVP Code values, types, possible flag values, and whether the AVP MAY be encrypted:

                                         +---------------------+
                                         |    AVP Flag rules   |
                                         |----+-----+----+-----|----+
                AVP  Section             |    |     |SHLD| MUST|    |
Attribute Name  Code Defined  Value Type |MUST| MAY | NOT|  NOT|Encr|
-----------------------------------------|----+-----+----+-----|----|
User-Password      2   5.1    OctetString| M  |  P  |    |  V  | Y  |
Password-Retry    75   5.2    Unsigned32 | M  |  P  |    |  V  | Y  |
Prompt            76   5.3    Enumerated | M  |  P  |    |  V  | Y  |
CHAP-Auth        402   5.4    Grouped    | M  |  P  |    |  V  | Y  |
CHAP-Algorithm   403   5.5    Enumerated | M  |  P  |    |  V  | Y  |
CHAP-Ident       404   5.6    OctetString| M  |  P  |    |  V  | Y  |
CHAP-Response    405   5.7    OctetString| M  |  P  |    |  V  | Y  |
CHAP-Challenge    60   5.8    OctetString| M  |  P  |    |  V  | Y  |
ARAP-Password     70   5.9    OctetString| M  |  P  |    |  V  | Y  |
ARAP-Challenge-   84   5.10   OctetString| M  |  P  |    |  V  | Y  |
  Response                               |    |     |    |     |    |
ARAP-Security     73   5.11   Unsigned32 | M  |  P  |    |  V  | Y  |
ARAP-Security-    74   5.12   OctetString| M  |  P  |    |  V  | Y  |
  Data                                   |    |     |    |     |    |
-----------------------------------------|----+-----+----+-----|----|

5.1. User-Password AVP ๐Ÿ™ˆ

The User-Password AVP (AVP Code 2) is an OctetString. It holds the password of the user being authenticated, or the user's input during a multi-round authentication exchange.

This one is sensitive, bestie ๐Ÿ˜ญ It contains a user password or a one-time password. As [BASE] requires, Diameter messages get encrypted with IPsec or TLS. Unless this AVP is used for one-time passwords, the User-Password AVP SHOULD NOT be used in untrusted proxy environments without encrypting it by using end-to-end security techniques, such as the proposed CMS Security [DiamCMS].

The clear-text password (prior to encryption) MUST NOT be longer than 128 bytes in length. ๐Ÿ”’

5.2. Password-Retry AVP

The Password-Retry AVP (AVP Code 75) is an Unsigned32 and MAY be included in the AA-Answer if the Result-Code indicates an authentication failure. Its value tells you how many authentication attempts a user is allowed before getting disconnected. It's mainly meant for when the Framed-Protocol AVP (see section 6.10.1) is set to ARAP.

5.3. Prompt AVP ๐ŸŽ€

The Prompt AVP (AVP Code 76) is an Enumerated and MAY be present in the AA-Answer message. When it's there, the NAS uses it to figure out whether the user's response should be echoed as they type it.

The supported values are listed in [RADIUSTypes]. The following list is informational:

   0  No Echo
   1  Echo

5.4. CHAP-Auth AVP ๐Ÿง

The CHAP-Auth AVP (AVP Code 402) is a Grouped AVP. It has everything needed to authenticate a user with the PPP Challenge-Handshake Authentication Protocol (CHAP) [PPPCHAP]. If the CHAP-Auth AVP shows up in a message, the CHAP-Challenge AVP MUST be present as well. The optional AVPs with the CHAP response depend on the value of the CHAP-Algorithm AVP. Here's the ABNF grammar for this grouped AVP:

      CHAP-Auth  ::= < AVP Header: 402 >
                     { CHAP-Algorithm }
                     { CHAP-Ident }
                     [ CHAP-Response ]
                   * [ AVP ]

5.5. CHAP-Algorithm AVP ๐Ÿงฎ

The CHAP-Algorithm AVP (AVP Code 403) is an Enumerated. It carries the algorithm identifier used when computing the CHAP response [PPPCHAP]. These values are currently supported:

      CHAP with MD5       5
         The CHAP response is computed by using the procedure described
         in [PPPCHAP].  This algorithm requires that the CHAP-Response
         AVP MUST be present in the CHAP-Auth AVP.

5.6. CHAP-Ident AVP ๐Ÿชช

The CHAP-Ident AVP (AVP Code 404) is an OctetString. It contains the 1 octet CHAP Identifier used in computing the CHAP response [PPPCHAP].

5.7. CHAP-Response AVP ๐Ÿ’Œ

The CHAP-Response AVP (AVP Code 405) is an OctetString. It contains the 16 octet authentication data the user gave in response to the CHAP challenge [PPPCHAP].

5.8. CHAP-Challenge AVP โšก

The CHAP-Challenge AVP (AVP Code 60) is an OctetString. It contains the CHAP Challenge that the NAS sent to the CHAP peer [PPPCHAP].

5.9. ARAP-Password AVP ๐Ÿฆ‹

The ARAP-Password AVP (AVP Code 70) is an OctetString. It's only present when the Framed-Protocol AVP (see section 6.10.1) is included in the message and set to ARAP. This AVP MUST NOT be present if either the User-Password or the CHAP-Auth AVP is present. For more on what goes in this AVP, check [RADIUSExt].

5.10. ARAP-Challenge-Response AVP ๐ŸŒธ

The ARAP-Challenge-Response AVP (AVP Code 84) is an OctetString. It's only present when the Framed-Protocol AVP (see section 6.10.1) is included in the message and set to ARAP. It holds an 8 octet response to the dial-in client's challenge.

Here's the vibe: the RADIUS server works this out by taking the dial-in client's challenge from the high-order 8 octets of the ARAP-Password AVP, then doing DES encryption on that value with the authenticating user's password as the key. If the user's password is fewer than 8 octets long, it gets padded at the end with NULL octets up to a length of 8 before it's used as a key. Iconic math, honestly ๐Ÿค“

5.11. ARAP-Security AVP ๐Ÿ›ก๏ธ

The ARAP-Security AVP (AVP Code 73) is an Unsigned32 and MAY be present in the AA-Answer message if the Framed-Protocol AVP (see section 6.10.1) is set to the value of ARAP and the Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH. For more on its format, see [RADIUSExt].

5.12. ARAP-Security-Data AVP ๐Ÿ”

The ARAP-Security AVP (AVP Code 74) is an OctetString and MAY be present in the AA-Request or AA-Answer message if the Framed-Protocol AVP is set to the value of ARAP and the Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH. It contains the security module challenge or response associated with the ARAP Security Module specified in ARAP-Security.


6. NAS Authorization AVPs ๐Ÿ‘‘

This section covers the authorization AVPs supported in the NAS Application. The Service-Type AVP SHOULD be present in all messages. Based on its value, additional AVPs defined in this section and in section 7 MAY be present. โœจ

Due to space constraints, the short-form IPFltrRule is used to represent IPFilterRule, and QoSFltrRule is used for QoSFilterRule. ๐Ÿ’…

                                         +---------------------+
                                         |    AVP Flag rules   |
                                         |----+-----+----+-----|----+
                AVP  Section             |    |     |SHLD| MUST|    |
Attribute Name  Code Defined  Value Type |MUST| MAY | NOT|  NOT|Encr|
-----------------------------------------|----+-----+----+-----|----|
Service-Type       6   6.1    Enumerated | M  |  P  |    |  V  | Y  |
Callback-Number   19   6.2    UTF8String | M  |  P  |    |  V  | Y  |
Callback-Id       20   6.3    UTF8String | M  |  P  |    |  V  | Y  |
Idle-Timeout      28   6.4    Unsigned32 | M  |  P  |    |  V  | Y  |
Port-Limit        62   6.5    Unsigned32 | M  |  P  |    |  V  | Y  |
NAS-Filter-Rule  400   6.6    IPFltrRule | M  |  P  |    |  V  | Y  |
Filter-Id         11   6.7    UTF8String | M  |  P  |    |  V  | Y  |
Configuration-    78   6.8    OctetString| M  |     |    | P,V |    |
  Token                                  |    |     |    |     |    |
QoS-Filter-Rule  407   6.9    QoSFltrRule|    |     |    |     |    |
Framed-Protocol    7  6.10.1  Enumerated | M  |  P  |    |  V  | Y  |
Framed-Routing    10  6.10.2  Enumerated | M  |  P  |    |  V  | Y  |
Framed-MTU        12  6.10.3  Unsigned32 | M  |  P  |    |  V  | Y  |
Framed-           13  6.10.4  Enumerated | M  |  P  |    |  V  | Y  |
  Compression                            |    |     |    |     |    |
Framed-IP-Address  8  6.11.1  OctetString| M  |  P  |    |  V  | Y  |
Framed-IP-Netmask  9  6.11.2  OctetString| M  |  P  |    |  V  | Y  |
Framed-Route      22  6.11.3  UTF8String | M  |  P  |    |  V  | Y  |
Framed-Pool       88  6.11.4  OctetString| M  |  P  |    |  V  | Y  |
Framed-           96  6.11.5  Unsigned64 | M  |  P  |    |  V  | Y  |
  Interface-Id                           |    |     |    |     |    |
Framed-IPv6-      97  6.11.6  OctetString| M  |  P  |    |  V  | Y  |
  Prefix                                 |    |     |    |     |    |
Framed-IPv6-      99  6.11.7  UTF8String | M  |  P  |    |  V  | Y  |
  Route                                  |    |     |    |     |    |
Framed-IPv6-Pool 100  6.11.8  OctetString| M  |  P  |    |  V  | Y  |
Framed-IPX-       23  6.12.1  UTF8String | M  |  P  |    |  V  | Y  |
  Network                                |    |     |    |     |    |
Framed-Appletalk- 37  6.13.1  Unsigned32 | M  |  P  |    |  V  | Y  |
  Link                                   |    |     |    |     |    |
Framed-Appletalk- 38  6.13.2  Unsigned32 | M  |  P  |    |  V  | Y  |
  Network                                |    |     |    |     |    |
Framed-Appletalk- 39  6.13.3  OctetString| M  |  P  |    |  V  | Y  |
  Zone                                   |    |     |    |     |    |
ARAP-Features     71  6.14.1  OctetString| M  |  P  |    |  V  | Y  |
ARAP-Zone-Access  72  6.14.2  Enumerated | M  |  P  |    |  V  | Y  |
Login-IP-Host     14  6.15.1  OctetString| M  |  P  |    |  V  | Y  |
Login-IPv6-Host   98  6.15.2  OctetString| M  |  P  |    |  V  | Y  |
Login-Service     15  6.15.3  Enumerated | M  |  P  |    |  V  | Y  |
Login-TCP-Port    16  6.16.1  Unsigned32 | M  |  P  |    |  V  | Y  |
Login-LAT-Service 34  6.17.1  OctetString| M  |  P  |    |  V  | Y  |
Login-LAT-Node    35  6.17.2  OctetString| M  |  P  |    |  V  | Y  |
Login-LAT-Group   36  6.17.3  OctetString| M  |  P  |    |  V  | Y  |
Login-LAT-Port    63  6.17.4  OctetString| M  |  P  |    |  V  | Y  |
-----------------------------------------|----+-----+----+-----|----|

6.1. Service-Type AVP โœจ

Okay bestie, the Service-Type AVP (AVP Code 6) is an Enumerated AVP ๐ŸŽ€, and it's how everybody says what kind of service the user asked for, or what kind is actually getting delivered ๐Ÿ’…. One such AVP MAY be present in an authentication and/or authorization request or response ๐Ÿฆ‹. A NAS doesn't have to implement every single service type, lowkey ๐ŸŒธ. But if it gets an unknown or unsupported Service-Type in a response, it MUST treat that as a failure and end the session with a DIAMETER_INVALID_AVP_VALUE Result-Code ๐Ÿ’€.

When it shows up in a request, the Service-Type AVP SHOULD be considered a hint to the server ๐Ÿ’œ. The NAS is basically saying "hey, I think this user would prefer this kind of service" ๐Ÿซถ. The server doesn't have to honor the hint, though, so don't be shook if it ignores you ๐Ÿ™ˆ. Also, if the service the server picks is supported but doesn't work with the current mode of access, the NAS MUST fail to start the session โœจ. The NAS MUST also generate the appropriate error message(s) ๐Ÿ˜ญ.

The values defined for the Service-Type AVP are below. The full list lives in [RADIUS] and [RADIUSTypes], and this list is just for vibes โœจ (informational only):

    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
   12  Voice
   13  Fax
   14  Modem Relay
   15  IAPP-Register   [IEEE 802.11f]
   16  IAPP-AP-Check   [IEEE 802.11f]
   17  Authorize Only  [RADDynAuth]

Now let's get into the ones that get extra detail ๐Ÿ‘‘:

   Login               1
      The user should be connected to a host.  The message MAY
      include additional AVPs defined in sections 6.16 or 6.17.

   Framed              2
      A Framed Protocol, such as PPP or SLIP, should be started for
      the User.  The message MAY include additional AVPs defined in
      section 6.10, or section 7 for tunneling services.

   Callback Login      3
      The user should be disconnected and called back, then connected
      to a host.  The message MAY include additional AVPs defined in
      this section.

   Callback Framed     4
      The user should be disconnected and called back, and then a
      Framed Protocol, such as PPP or SLIP, should be started for the
      User.  The message MAY include additional AVPs defined in
      section 6.10, or in section 7 for tunneling services.

6.2. Callback-Number AVP ๐Ÿ“ž

The Callback-Number AVP (AVP Code 19) is a UTF8String, and it holds a dialing string for callbacks ๐ŸŒˆ. It MAY be used in an authentication and/or authorization request as a hint that the user wants the Callback service ๐Ÿ“. The server is not required to honor that hint in its response, so no pressure ๐Ÿ’….

How this field's allowed usage range gets written down is outside the scope of this specification ๐Ÿ™ˆ, so that's a problem for another doc, bestie.

6.3. Callback-Id AVP โœจ

The Callback-Id AVP (AVP Code 20) is a UTF8String too ๐Ÿฆ‹. It holds the name of a place to be called, and the NAS is the one that interprets it ๐Ÿงš. This AVP MAY be present in an authentication and/or authorization response.

Real talk though, this one is NOT roaming-friendly ๐Ÿ˜ฌ, because it assumes the Callback-Id is already configured on the NAS. So the Callback-Number AVP is therefore preferable ๐Ÿ’–.

6.4. Idle-Timeout AVP โฐ

The Idle-Timeout AVP (AVP Code 28) is an Unsigned32 that sets the maximum number of consecutive seconds of idle connection the user is allowed before the session gets terminated or before a prompt gets issued ๐ŸŒธ. The default is none, or system specific ๐ŸŽ€.

6.5. Port-Limit AVP ๐Ÿ”Œ

The Port-Limit AVP (AVP Code 62) is an Unsigned32 that sets the maximum number of ports the NAS provides to the user ๐Ÿ’œ. It MAY be used in an authentication and/or authorization request as a hint to the server that multilink PPP [PPPMP] service is desired ๐Ÿซถ. The server is not required to honor the hint in the corresponding response, so it's totally its call ๐Ÿ’….

6.6. NAS-Filter-Rule AVP ๐Ÿ›ก๏ธ

The NAS-Filter-Rule AVP (AVP Code 400) is an IPFilterRule type, and it gives you filter rules that need to be configured on the NAS for the user ๐Ÿ”ฅ. One or more of these AVPs MAY be present in an authorization response.

6.7. Filter-Id AVP ๐Ÿท๏ธ

The Filter-Id AVP (AVP Code 11) is a UTF8String that contains the name of the filter list for this user ๐Ÿฆ‹. Zero or more Filter-Id AVPs MAY be sent in an authorization answer.

Naming a filter list lets you use that filter on different NASes without caring about how each one implements its filter lists ๐Ÿ‘‘. Still, this AVP isn't roaming friendly, because filter naming is different from one service provider to another ๐Ÿ˜ญ.

In non-RADIUS environments, it is RECOMMENDED that the NAS-Filter-Rule AVP be used instead ๐Ÿ’–.

6.8. Configuration-Token AVP ๐Ÿงฉ

The Configuration-Token AVP (AVP Code 78) is an OctetString ๐Ÿ“. A Diameter Server sends it to a Diameter Proxy Agent or Translation Agent inside an AA-Answer command, to indicate a type of user profile to be used โœจ. It should not be sent to a Diameter Client (NAS), so keep it away from the NAS, babe ๐Ÿ™ˆ.

The format of the Data field of this AVP is site specific ๐ŸŒˆ.

6.9. QoS-Filter-Rule AVP ๐Ÿšฆ

The QoS-Filter-Rule AVP (AVP Code 407) is a QoSFilterRule type ๐Ÿ’…, and it provides QoS filter rules that need to be configured on the NAS for the user ๐ŸŽ€. One or more such AVPs MAY be present in an authorization response.

Note: Due to an editorial mistake in [BASE], only the AVP format is discussed. The complete QoSFilterRule definition was not included. It is reprinted here for clarification ๐Ÿ™.

Here's the QoSFilterRule definition, reprinted so it's actually complete ๐Ÿงš:

QoSFilterRule

   The QosFilterRule format is derived from the OctetString AVP Base
   Format.  It uses the ASCII charset.  Packets may be marked or
   metered based on the following information:

      Direction                          (in or out)
      Source and destination IP address  (possibly masked)
      Protocol
      Source and destination port        (lists or ranges)
      DSCP values                        (no mask or range)

   Rules for the appropriate direction are evaluated in order; the
   first matched rule terminates the evaluation.  Each packet is
   evaluated once.  If no rule matches, the packet is treated as best
   effort.  An access device unable to interpret or apply a QoS rule
   SHOULD NOT terminate the session.

Okay, so the QoS filter rules have a required format ๐Ÿซถ. Here's the shape they MUST follow:

action dir proto from src to dst [options]

          tag    - Mark packet with a specific DSCP
                   [DIFFSERV].  The DSCP option MUST be
                   included.
          meter  - Meter traffic.  The metering options
                   MUST be included.

Here's how the rest of the pieces work ๐Ÿ’œ:

  • dir follows the format described under IPFilterRule.
  • proto follows the format described under IPFilterRule.
  • src and dst follow the format described under IPFilterRule.

The options are where the real magic happens โœจ:

   options:

   DSCP <color>
         Color values as defined in [DIFFSERV].  Exact
         matching of DSCP values is required (no masks or
         ranges).

   metering <rate> <color_under> <color_over>
         The metering option provides Assured Forwarding,
         as defined in [DIFFSERVAF], and MUST be present
         if the action is set to meter.  The rate option is
         the throughput, in bits per second, used
         by the access device to mark packets.  Traffic
         over the rate is marked with the color_over
         codepoint, and traffic under the rate is marked
         with the color_under codepoint.  The color_under
         and color_over options contain the drop
         preferences and MUST conform to the recommended
         codepoint keywords described in [DIFFSERVAF]
         (e.g., AF13).

         The metering option also supports the strict
         limit on traffic required by Expedited
         Forwarding, as defined in [DIFFSERVEF].  The
         color_over option may contain the keyword "drop"
         to prevent forwarding of traffic that exceeds the
         rate parameter.

And last but not least ๐ŸŒŸ, the rule syntax is a modified subset of ipfw(8) from FreeBSD, and the ipfw.c code may provide a useful base for implementations ๐Ÿงšโ€โ™€๏ธ.

6.10. Framed Access Authorization AVPs ๐ŸŽ€

This section lists the authorization AVPs you need to support framed access, like PPP and SLIP ๐Ÿ’–. AVPs defined in this section MAY be present in a message if the Service-Type AVP was set to "Framed" or "Callback Framed" ๐Ÿฆ‹.

6.10.1. Framed-Protocol AVP ๐Ÿงต

The Framed-Protocol AVP (AVP Code 7) is an Enumerated AVP that contains the framing to be used for framed access ๐Ÿ’œ. This AVP MAY be present in both requests and responses. The supported values are listed in [RADIUSTypes], and here's the informational list ๐Ÿ‘‘:

   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

6.10.2. Framed-Routing AVP ๐Ÿ—บ๏ธ

The Framed-Routing AVP (AVP Code 10) is an Enumerated AVP that contains the routing method for the user when the user is a router to a network ๐ŸŒˆ. This AVP SHOULD only be present in authorization responses. The supported values are listed in [RADIUSTypes], and the informational list is here ๐Ÿ“:

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

6.10.3. Framed-MTU AVP ๐Ÿ“ฆ

The Framed-MTU AVP (AVP Code 12) is an Unsigned32 that contains the Maximum Transmission Unit to be configured for the user, when it isn't negotiated by some other means (like PPP) โœจ. This AVP SHOULD only be present in authorization responses. The MTU value MUST be in the range from 64 to 65535 ๐Ÿ”ฅ.

6.10.4. Framed-Compression AVP ๐Ÿ—œ๏ธ

The Framed-Compression AVP (AVP Code 13) is an Enumerated AVP that contains the compression protocol to be used for the link ๐Ÿ’…. It MAY be used in an authorization request as a hint to the server that a specific compression type is desired, but the server is not required to honor the hint in the corresponding response ๐Ÿ™ˆ.

More than one compression protocol AVP MAY be sent ๐Ÿซถ. The NAS is responsible for applying the proper compression protocol to the appropriate link traffic ๐Ÿ’œ.

The supported values are listed in [RADIUSTypes]. The informational list goes like this ๐ŸŽ€:

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

6.11. IP Access Authorization AVPs ๐ŸŒ

The AVPs defined in this section are used when the user requests access service to IP, or is being granted it ๐Ÿฆ‹.

6.11.1. Framed-IP-Address AVP ๐Ÿ“

The Framed-IP-Address AVP (AVP Code 8) [RADIUS] is an OctetString that contains an IPv4 address of the type specified in the attribute value, to be configured for the user ๐Ÿ’–. It MAY be used in an authorization request as a hint to the server that a specific address is desired, but the server is not required to honor the hint in the corresponding response ๐Ÿงš.

Two values have special significance, and they're kind of iconic ๐Ÿ‘‘: 0xFFFFFFFF and 0xFFFFFFFE. The value 0xFFFFFFFF means the NAS should let the user pick an address (negotiated) ๐ŸŒธ. The value 0xFFFFFFFE means the NAS should pick an address for the user, like one assigned from a pool of addresses the NAS keeps ๐Ÿ“.

6.11.2. Framed-IP-Netmask AVP ๐ŸŽ€

okay so the Framed-IP-Netmask AVP (AVP Code 9) is an OctetString, and it carries the four octets of the IPv4 netmask that gets configured for the user when the user is a router to a network ๐ŸŒ. the user can ask for a netmask in an authorization request as a hint (MAY), but the server doesn't have to honor that hint in its response, so it's a wish, not a guarantee ๐Ÿ™ˆ. the one hard rule: if the request included this AVP with a value of 0xFFFFFFFF, the response MUST include this AVP too ๐Ÿ’…

6.11.3. Framed-Route AVP ๐Ÿฆ‹

the Framed-Route AVP (AVP Code 22) is a UTF8String that holds the ASCII routing info to be set up for the user on the NAS ๐Ÿ›ฃ๏ธ. zero or more of these can show up in an authorization response (MAY), and the string itself MUST contain a destination prefix in dotted quad form. you can optionally add a slash and a decimal length to say how many high-order bits of the prefix to use, then a space, a gateway address in dotted quad form, another space, and one or more metrics separated by spaces. example time:

"192.168.1.0/24 192.168.1.1 1"

the length part is optional. if you leave it out, it should default to 8 bits for class A prefixes, 16 bits for class B prefixes, and 24 bits for class C prefixes ๐Ÿง . like this:

"192.168.1.0 192.168.1.1 1"

and here's a lowkey important bit โœจ: whenever the gateway address is written as "0.0.0.0", the user's IP address SHOULD be used as the gateway address instead ๐Ÿซถ

6.11.4. Framed-Pool AVP ๐ŸŒˆ

the Framed-Pool AVP (AVP Code 88) is an OctetString with the name of an assigned address pool that SHOULD be used to hand out an address to the user ๐ŸŠโ€โ™€๏ธ. if the NAS doesn't support multiple address pools, the NAS SHOULD ignore this AVP, no drama. pools are usually for IP addresses, but they can be for other protocols too, as long as the NAS supports pools for those ๐Ÿ’œ

even though it's typed as OctetString (for compatibility with RADIUS [RADIUSExt]), the encoding of the Data field SHOULD also follow the rules for the UTF8String Data Format. very dual-natured, very iconic ๐Ÿ‘‘

6.11.5. Framed-Interface-Id AVP ๐Ÿงš

the Framed-Interface-Id AVP (AVP Code 96) is an Unsigned64 holding the IPv6 interface identifier to be configured for the user ๐Ÿ”ข. it MAY be used in authorization requests as a hint that a specific interface id is wanted, but the server is not required to honor the hint in the response. wishlist energy again ๐ŸŽ€

6.11.6. Framed-IPv6-Prefix AVP ๐ŸŒธ

the Framed-IPv6-Prefix AVP (AVP Code 97) is an OctetString carrying the IPv6 prefix to be configured for the user ๐ŸŒ. one or more of these MAY be used in authorization requests as a hint that specific IPv6 prefixes are desired, but the server is not required to honor the hint in its response โœจ

6.11.7. Framed-IPv6-Route AVP ๐Ÿ’…

the Framed-IPv6-Route AVP (AVP Code 99) is a UTF8String with the ASCII routing info to be set up for the user on the NAS, the IPv6 flavour of Framed-Route ๐Ÿฆ‹. zero or more can appear in an authorization response (MAY). the string MUST contain an IPv6 address prefix, then a slash and a decimal length specifier saying how many high order bits of the prefix to use. after that comes a space, a gateway address in hexadecimal notation, another space, and one or more metrics separated by spaces. here's the vibe:

"2000:0:0:106::/64 2000::106:a00:20ff:fe99:a998 1"

if the gateway address is the IPv6 unspecified address, the user's IP address SHOULD be used as the gateway address instead, such as in:

"2000:0:0:106::/64 :: 1"

6.11.8. Framed-IPv6-Pool AVP ๐Ÿ“

the Framed-IPv6-Pool AVP (AVP Code 100) is an OctetString with the name of an assigned pool that SHOULD be used to assign an IPv6 prefix to the user ๐Ÿซง. if the access device doesn't support multiple prefix pools, it MUST ignore this AVP. firm but fair ๐Ÿ˜ค

same plot twist as before: it's typed as OctetString for compatibility with RADIUS [RADIUSIPv6], but the encoding of the Data field SHOULD also conform to the rules for the UTF8String Data Format ๐Ÿ™ƒ

6.12. IPX Access ๐ŸŒธ

the AVPs in this section are used when the user requests, or is being granted, access to an IPX network service ๐Ÿ›ฐ๏ธ

6.12.1. Framed-IPX-Network AVP ๐Ÿ’œ

the Framed-IPX-Network AVP (AVP Code 23) is an Unsigned32 with the IPX Network number to be configured for the user ๐Ÿ”ข. it MAY be used in an authorization request as a hint that a specific address is desired, but the server is not required to honor the hint in the response.

two addresses are special, and they're iconic ๐Ÿ‘‘: 0xFFFFFFFF means the NAS should let the user pick an address (aka Negotiated), and 0xFFFFFFFE means the NAS should pick one for the user, for example by assigning it from a pool of one or more IPX networks the NAS keeps ๐Ÿง 

6.13. AppleTalk Network Access ๐ŸŽ

the AVPs in this section are used when the user requests, or is being granted, access to an AppleTalk network [AppleTalk] ๐ŸŒˆ

the Framed-AppleTalk-Link AVP (AVP Code 37) is an Unsigned32 with the AppleTalk network number for the serial link to the user, which is another AppleTalk router ๐Ÿ”—. this AVP MUST only be present in an authorization response, and it is never used when the user is not another router. no exceptions, bestie ๐Ÿซถ

despite the size of the field, values range from 0 to 65,535 ๐Ÿ“. the special value of 0 means an unnumbered serial link ๐ŸŒ™. a value from 1 to 65,535 means the serial line between the NAS and the user should be assigned that value as an AppleTalk network number ๐ŸŽ€

6.13.2. Framed-AppleTalk-Network AVP ๐Ÿฆ‹

the Framed-AppleTalk-Network AVP (AVP Code 38) is an Unsigned32 with the AppleTalk Network number that the NAS should probe in order to allocate an AppleTalk node for the user ๐Ÿ”. this AVP MUST only be present in an authorization response, and it is never used when the user is not another router. multiple instances of this AVP mean the NAS may probe using any of the network numbers listed ๐ŸŽฏ

again, values range from 0 to 65,535 ๐Ÿ“. the special value 0 means the NAS should assign a network for the user using its default cable range ๐Ÿงš. a value between 1 and 65,535 (inclusive) tells the AppleTalk Network that the NAS should probe to find an address for the user ๐Ÿ’ซ

6.13.3. Framed-AppleTalk-Zone AVP ๐ŸŒธ

the Framed-AppleTalk-Zone AVP (AVP Code 39) is an OctetString with the AppleTalk Default Zone to be used for this user ๐Ÿ—บ๏ธ. it MUST only be present in an authorization response, and multiple instances of this AVP in the same message are not allowed. one zone, one vibe ๐Ÿ’…

the codification of this field's allowed range is outside the scope of this specification, so we're leaving that one alone ๐Ÿ™ˆ

6.14. AppleTalk Remote Access ๐ŸŒŠ

the AVPs in this section are used when the user requests, or is being granted, access to the AppleTalk network via the AppleTalk Remote Access Protocol [ARAP] ๐Ÿ“ก. they're only present if the Framed-Protocol AVP (see section 6.10.1) is set to ARAP. Section 2.2 of RFC 2869 [RADIUSExt] describes how these attributes are used operationally ๐Ÿ“–

6.14.1. ARAP-Features AVP ๐ŸŽ€

the ARAP-Features AVP (AVP Code 71) is an OctetString and MAY be present in the AA-Accept message if the Framed-Protocol AVP is set to the value of ARAP ๐Ÿช„. see [RADIUSExt] for more on its format โœจ

6.14.2. ARAP-Zone-Access AVP ๐Ÿ’œ

the ARAP-Zone-Access AVP (AVP Code 72) is an Enumerated and MAY be present in the AA-Accept message if the Framed-Protocol AVP is set to the value of ARAP ๐Ÿ“

the supported values are listed in [RADIUSTypes] and defined in [RADIUSExt] ๐Ÿ“‹

6.15. Non-Framed Access Authorization AVPs ๐Ÿ–ฅ๏ธ

this section has the authorization AVPs needed to support terminal server functionality ๐Ÿ’ป. AVPs defined here MAY be present in a message if the Service-Type AVP was set to "Login" or "Callback Login" ๐Ÿ”

6.15.1. Login-IP-Host AVP ๐ŸŒท

the Login-IP-Host AVP (AVP Code 14) [RADIUS] is an OctetString with the IPv4 address of a host to connect the user to when the Login-Service AVP is included. it MAY be used in an AA-Request command as a hint to the Diameter Server that a specific host is desired, but the Diameter Server is not required to honor the hint in the AA-Answer ๐Ÿคž

two addresses are special: all ones and 0 ๐ŸŒŸ. the all-ones value means the NAS SHOULD allow the user to select an address, and the value 0 means the NAS SHOULD select a host to connect the user to ๐Ÿง 

6.15.2. Login-IPv6-Host AVP ๐Ÿฆ„

the Login-IPv6-Host AVP (AVP Code 98) [RADIUSIPv6] is an OctetString with the IPv6 address of a host to connect the user to when the Login-Service AVP is included. it MAY be used in an AA-Request command as a hint to the Diameter Server that a specific host is desired, but the Diameter Server is not required to honor the hint in the AA-Answer ๐Ÿ’ซ

two addresses are special here too ๐Ÿ‘€:

0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF and 0

the value 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF means the NAS SHOULD allow the user to select an address. the value 0 means the NAS SHOULD select a host to connect the user to ๐ŸŽ€

6.15.3. Login-Service AVP ๐Ÿ’

the Login-Service AVP (AVP Code 15) is an Enumerated with the service that should be used to connect the user to the login host ๐Ÿ”Œ. this AVP SHOULD only be present in authorization responses.

the supported values are listed in [RADIUSTypes]. the following list is informational, so enjoy it as a cheat sheet ๐Ÿ“:

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)

6.16. TCP Services ๐ŸŒ

the AVPs described in this section MAY be present if the Login-Service AVP is set to Telnet, Rlogin, TCP Clear, or TCP Clear Quiet ๐Ÿงฆ

6.16.1. Login-TCP-Port AVP ๐Ÿ”‘

the Login-TCP-Port AVP (AVP Code 16) is an Unsigned32 with the TCP port the user is to be connected on when the Login-Service AVP is also present ๐Ÿšช. this AVP SHOULD only be present in authorization responses. the value MUST NOT be greater than 65,535, so keep it in range, periodt ๐Ÿ’ฏ

6.17. LAT Services ๐ŸŒบ

the AVPs described in this section MAY be present if the Login-Service AVP is set to LAT [LAT] โœจ

6.17.1. Login-LAT-Service AVP โœจ

okay so the Login-LAT-Service AVP (AVP Code 34) is an OctetString ๐ŸŽ€ and it holds the system the user gets connected to by LAT. It MAY be used in an authorization request as a hint that a specific service is wanted, but the server is not required to honor the hint in the response. This AVP MUST only be present in the response if the Login-Service AVP says LAT is desired ๐Ÿ’….

ngl this one is so practical. Admins use it with clustered systems, like a VAX or Alpha cluster ๐Ÿ–ฅ๏ธ. In those setups, a bunch of time-sharing hosts share the same resources (disks, printers, etc.), and admins usually set each host up to offer access to each shared resource. So every host in the cluster advertises its services through LAT broadcasts ๐Ÿ“ฃ.

Sophisticated users usually know which machines are faster, so they like to use a node name when starting a LAT connection ๐ŸŽ๏ธ. Some admins also want certain users on certain machines as a basic form of load balancing (even though LAT can balance load on its own, lol ๐Ÿ’€).

The String field holds the identity of the LAT service to use. The LAT Architecture lets this string contain $ (dollar), - (hyphen), . (period), _ (underscore), numerics, upper- and lowercase alphabetics, and the ISO Latin-1 character set extension [ISOLatin]. All LAT string comparisons are case insensitive ๐ŸŒธ.

6.17.2. Login-LAT-Node AVP โœจ

the Login-LAT-Node AVP (AVP Code 35) is an OctetString ๐Ÿงš and it holds the Node the user should be automatically connected to by LAT. It MAY be used in an authorization request as a hint that a specific LAT node is wanted, but the server is not required to honor the hint in the response. This AVP MUST only be present in a response if the Login-Service-Type AVP is set to LAT ๐Ÿ’œ.

The String field holds the identity of the LAT service to use. The LAT Architecture lets this string contain $ (dollar), - (hyphen), . (period), _ (underscore), numerics, upper- and lowercase alphabetics, and the ISO Latin-1 character set extension [ISOLatin]. All LAT string comparisons are case insensitive ๐Ÿซถ.

6.17.3. Login-LAT-Group AVP โœจ

the Login-LAT-Group AVP (AVP Code 36) is an OctetString ๐ŸŒˆ and it holds a string that identifies the LAT group codes this user is authorized to use. It MAY be used in an authorization request as a hint that a specific group is wanted, but the server is not required to honor the hint in the response. This AVP MUST only be present in a response if the Login-Service-Type AVP is set to LAT ๐Ÿ”ฅ.

LAT supports 256 different group codes, and LAT uses them as a form of access rights ๐Ÿ‘‘. LAT encodes the group codes as a 256-bit bitmap ๐Ÿฆ‹.

Admins can assign one or more of the group code bits at the LAT service provider, and that provider will only accept LAT connections that have these group codes set in the bitmap. 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 ๐Ÿ“.

The codification of the range of allowed usage of this field is outside the scope of this specification. (that's a whole other vibe, not ours to decide here ๐Ÿ™ˆ)

6.17.4. Login-LAT-Port AVP โœจ

the Login-LAT-Port AVP (AVP Code 63) is an OctetString ๐Ÿ’– and it holds the Port the user should be connected to by LAT. It MAY be used in an authorization request as a hint that a specific port is wanted, but the server is not required to honor the hint in the response. This AVP MUST only be present in a response if the Login-Service-Type AVP is set to LAT โœจ.

The String field holds the identity of the LAT service 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 [ISOLatin]. All LAT string comparisons are case insensitive ๐Ÿ’….


7. NAS Tunneling ๐Ÿฆ‹

okay this section is giving secret tunnel energy ๐Ÿ•ต๏ธโ€โ™€๏ธ. Some NASes support compulsory tunnel services, where the incoming connection data gets wrapped up with an encapsulation method and sent to a gateway somewhere else in the network ๐ŸŽ. This is usually invisible to the service user, and the remote AAA server can describe the tunnel characteristics based on the user's authorization information. Several tunnel characteristics may come back, and the NAS implementation may choose one [RADTunnels], [RADTunlAcct] ๐Ÿ’œ.

Here's the whole attribute lineup with its flag rules (the table is in code, so it stays exactly as the original has it ๐Ÿซถ):

                                            +---------------------+
                                            |    AVP Flag rules   |
                                            |----+-----+----+-----|----+
                   AVP  Section             |    |     |SHLD| MUST|    |
   Attribute Name  Code Defined  Value Type |MUST| MAY | NOT| NOT |Encr|
   -----------------------------------------|----+-----+----+-----|----|
   Tunneling        401   7.1    Grouped    | M  |  P  |    |  V  | N  |
   Tunnel-Type       64   7.2    Enumerated | M  |  P  |    |  V  | Y  |
   Tunnel-Medium-    65   7.3    Enumerated | M  |  P  |    |  V  | Y  |
     Type                                   |    |     |    |     |    |
   Tunnel-Client-    66   7.4    UTF8String | M  |  P  |    |  V  | Y  |
     Endpoint                               |    |     |    |     |    |
   Tunnel-Server-    67   7.5    UTF8String | M  |  P  |    |  V  | Y  |
     Endpoint                               |    |     |    |     |    |
   Tunnel-Password   69   7.6    OctetString| M  |  P  |    |  V  | Y  |
   Tunnel-Private-   81   7.7    OctetString| M  |  P  |    |  V  | Y  |
     Group-Id                               |    |     |    |     |    |
   Tunnel-           82   7.8    OctetString| M  |  P  |    |  V  | Y  |
     Assignment-Id                          |    |     |    |     |    |
   Tunnel-Preference 83   7.9    Unsigned32 | M  |  P  |    |  V  | Y  |
   Tunnel-Client-    90   7.10   UTF8String | M  |  P  |    |  V  | Y  |
     Auth-Id                                |    |     |    |     |    |
   Tunnel-Server-    91   7.11   UTF8String | M  |  P  |    |  V  | Y  |
     Auth-Id                                |    |     |    |     |    |
   -----------------------------------------|----+-----+----+-----|----|

7.1. Tunneling AVP ๐ŸŽ€

the Tunneling AVP (AVP Code 401) is a Grouped type ๐Ÿง and it contains the following AVPs, used to describe a compulsory tunnel service [RADTunnels], [RADTunlAcct]. Its data field has this ABNF grammar:

      Tunneling     ::= < AVP Header: 401 >
                        { Tunnel-Type }
                        { Tunnel-Medium-Type }
                        { Tunnel-Client-Endpoint }
                        { Tunnel-Server-Endpoint }
                        [ Tunnel-Preference ]
                        [ Tunnel-Client-Auth-Id ]
                        [ Tunnel-Server-Auth-Id ]
                        [ Tunnel-Assignment-Id ]
                        [ Tunnel-Password ]
                        [ Tunnel-Private-Group-Id ]

7.2. Tunnel-Type AVP ๐ŸŒŠ

the Tunnel-Type AVP (AVP Code 64) is an Enumerated type and it holds the tunneling protocol(s) to be used (for a tunnel initiator) or in use (for a tunnel terminator) ๐Ÿš‡. It MAY be used in an authorization request as a hint that a specific tunnel type is wanted, but the server is not required to honor the hint in the response.

The Tunnel-Type AVP SHOULD also be included in Accounting-Request messages ๐Ÿ“Š.

a tunnel initiator is not required to implement any of these tunnel types ๐Ÿ™Œ. If a tunnel initiator gets a response that contains only unknown or unsupported Tunnel-Types, the tunnel initiator MUST behave as though a response were received with the Result-Code indicating a failure. harsh but fair ๐Ÿ’€.

The supported values are listed in [RADIUSTypes]. The following list is informational:

    1  Point-to-Point Tunneling Protocol (PPTP)
    2  Layer Two Forwarding (L2F)
    3  Layer Two Tunneling Protocol (L2TP)
    4  Ascend Tunnel Management Protocol (ATMP)
    5  Virtual Tunneling Protocol (VTP)
    6  IP Authentication Header in the Tunnel-mode (AH)
    7  IP-in-IP Encapsulation (IP-IP)
    8  Minimal IP-in-IP Encapsulation (MIN-IP-IP)
    9  IP Encapsulating Security Payload in the Tunnel-mode (ESP)
   10  Generic Route Encapsulation (GRE)
   11  Bay Dial Virtual Services (DVS)
   12  IP-in-IP Tunneling
   13  Virtual LANs (VLAN)

7.3. Tunnel-Medium-Type AVP ๐Ÿญ

the Tunnel-Medium-Type AVP (AVP Code 65) is an Enumerated type and it holds the transport medium to use when creating a tunnel for protocols (like L2TP) that can run over multiple transports ๐Ÿ›ค๏ธ. It MAY be used in an authorization request as a hint that a specific medium is wanted, but the server is not required to honor the hint in the response.

The supported values are listed in [RADIUSTypes]. The following list is informational:

    1  IPv4 (IP version 4)
    2  IPv6 (IP version 6)
    3  NSAP
    4  HDLC (8-bit multidrop)
    5  BBN 1822
    6  802 (includes all 802 media plus Ethernet "canonical
                 format")
    7  E.163 (POTS)
    8  E.164 (SMDS, Frame Relay, ATM)
    9  F.69 (Telex)
   10  X.121 (X.25, Frame Relay)
   11  IPX
   12  Appletalk
   13  Decnet IV
   14  Banyan Vines
   15  E.164 with NSAP format subaddress

7.4. Tunnel-Client-Endpoint AVP ๐ŸŒท

the Tunnel-Client-Endpoint AVP (AVP Code 66) is a UTF8String ๐Ÿซง and it holds the address of the initiator end of the tunnel. It MAY be used in an authorization request as a hint that a specific endpoint is wanted, but the server is not required to honor the hint in the response.

This AVP SHOULD be included in the corresponding Accounting-Request messages, and then it shows the address the tunnel was started from ๐Ÿ“. This AVP, along with the Tunnel-Server-Endpoint and Session-Id AVP [BASE], MAY be used to provide a globally unique way to identify a tunnel for accounting and auditing purposes ๐Ÿ•ต๏ธโ€โ™€๏ธ.

If Tunnel-Medium-Type is IPv4 (1), this string is either the fully qualified domain name (FQDN) of the tunnel client machine, or a "dotted-decimal" IP address. Implementations MUST support the dotted-decimal format and SHOULD support the FQDN format for IP addresses ๐Ÿ”ข.

If Tunnel-Medium-Type is IPv6 (2), this string is either the FQDN of the tunnel client machine, or a text representation of the address in either the preferred or alternate form [IPv6Addr]. Conforming implementations MUST support the preferred form and SHOULD support both the alternate text form and the FQDN format for IPv6 addresses ๐ŸŒŒ.

If Tunnel-Medium-Type is neither IPv4 nor IPv6, this string is a tag that refers to configuration data local to the Diameter client, describing the interface or medium-specific client address to use ๐Ÿงฉ.

7.5. Tunnel-Server-Endpoint AVP ๐Ÿฆ‹

okay bestie, the Tunnel-Server-Endpoint AVP (AVP Code 67) is a UTF8String ๐Ÿ’… and it holds the address of the server end of the tunnel ๐ŸŒธ It MAY show up in an authorization request as a hint, basically saying "hey server, I'd lowkey love this specific endpoint," but the server doesn't have to honor the hint in its response ๐Ÿซถ

This AVP SHOULD be included in the matching Accounting-Request messages ๐Ÿ“Š and in that case it tells you the address the tunnel was started from โœจ Together with Tunnel-Client-Endpoint and the Session-Id AVP [BASE], it MAY be used to create a globally unique way to identify a tunnel for accounting and auditing. no cap, that's so iconic ๐Ÿ‘‘

If Tunnel-Medium-Type is IPv4 (1), the string is either the fully qualified domain name (FQDN) of the tunnel server machine, or a "dotted-decimal" IP address ๐Ÿ“ Implementations MUST support the dotted-decimal format and SHOULD support the FQDN format for IP addresses ๐Ÿ’œ

If Tunnel-Medium-Type is IPv6 (2), the string is either the FQDN of the tunnel server machine, or a text representation of the address in either the preferred or alternate form [IPv6Addr] ๐ŸŒˆ Implementations MUST support the preferred form and SHOULD support both the alternate text form and the FQDN format for IPv6 addresses ๐Ÿงš

If Tunnel-Medium-Type is neither IPv4 nor IPv6, the string is a tag that points to configuration data local to the Diameter client. That data describes the interface or the medium-specific server address to use โญ


7.6. Tunnel-Password AVP ๐Ÿ”ฅ

The Tunnel-Password AVP (AVP Code 69) is an OctetString and may hold a password used to authenticate to a remote server ๐Ÿ” This one has sensitive info in it, so be careful ๐Ÿ˜ญ It is not protected the same way RADIUS does it [RADTunnels].

As required in [BASE], Diameter messages are encrypted using IPsec or TLS ๐Ÿ”’ The Tunnel-Password AVP SHOULD NOT be used in untrusted proxy environments unless you encrypt it with end-to-end security techniques, such as CMS Security [DiamCMS] ๐Ÿ’€

Not gonna lie, this is the one to be extra paranoid about. Don't leave your password just floating around in an untrusted proxy ๐Ÿ™ˆ

7.7. Tunnel-Private-Group-Id AVP ๐ŸŒธ

The Tunnel-Private-Group-Id AVP (AVP Code 81) is an OctetString and holds the group Id for one particular tunneled session ๐ŸŽ€ It MAY be included in an authorization request if the tunnel initiator can predetermine the group that a given connection will end up in ๐Ÿ”ฎ It SHOULD be included in the authorization response if the tunneled session is supposed to be treated as part of a particular private group ๐Ÿ’–

Private groups are used to link a tunneled session with a specific group of users ๐Ÿ‘ฏ For example, it MAY be used to help route unregistered IP addresses through a particular interface ๐Ÿ›ฃ๏ธ This AVP SHOULD be included in the Accounting-Request messages about the tunneled session ๐Ÿ“Š

7.8. Tunnel-Assignment-Id AVP ๐Ÿฆ‹

The Tunnel-Assignment-Id AVP (AVP Code 82) is an OctetString used to tell the tunnel initiator which tunnel a session should be assigned to ๐ŸŽฏ Some tunneling protocols, like [PPTP] and [L2TP], let sessions between the same two tunnel endpoints get multiplexed over one tunnel, and they also let a given session have its own dedicated tunnel ๐Ÿงฉ This attribute gives Diameter a way to tell the tunnel initiator (for example, a PAC or a LAC) whether to put the session in a multiplexed tunnel or a separate one ๐Ÿซง It also lets sessions that share multiplexed tunnels be assigned to different multiplexed tunnels ๐Ÿ’…

Different tunnels can be given different characteristics by a tunneling implementation ๐Ÿ’ซ For example, different tunnels might get different QoS parameters ๐Ÿš€ Those tunnels could carry one session or several ๐ŸŒˆ So the Tunnel-Assignment-Id attribute lets the Diameter server say "put this session on a tunnel with the right level of service" โœจ Any QoS-related Diameter tunneling attributes defined in the future that go with this one are expected to be linked by the tunnel initiator to the Id given in this attribute ๐Ÿ”— Until then, what any particular Id string means is up to local configuration in the tunnel initiator ๐Ÿ› ๏ธ

The Tunnel-Assignment-Id AVP only matters to Diameter and the tunnel initiator ๐Ÿ™…โ€โ™€๏ธ The Id it carries is only meant for local use between Diameter and the tunnel initiator ๐Ÿ  The Id the tunnel initiator assigns is not passed on to the tunnel peer ๐Ÿคซ

This attribute MAY be included in authorization responses ๐Ÿ’Œ A tunnel initiator that receives it MAY choose to ignore it and put the session into any arbitrary multiplexed or non-multiplexed tunnel between the desired endpoints ๐ŸŽฒ The AVP SHOULD also be included in the Accounting-Request messages about the tunneled session ๐Ÿ“

If a tunnel initiator supports the Tunnel-Assignment-Id AVP, it should assign a session to a tunnel like this ๐Ÿ‘‡

  • If this AVP is present and a tunnel already exists between the specified endpoints with the specified Id, the session should be assigned to that tunnel โœ…
  • If this AVP is present and no tunnel exists between the specified endpoints with the specified Id, a new tunnel should be established for the session, and the specified Id should be associated with that new tunnel ๐Ÿ†•
  • If this AVP is not present, the session is assigned to an unnamed tunnel ๐Ÿซฅ If an unnamed tunnel doesn't exist yet between the specified endpoints, it gets established and used for this session and for later sessions set up without the Tunnel-Assignment-Id attribute ๐ŸŒฑ A tunnel initiator MUST NOT assign a session that didn't specify a Tunnel-Assignment-Id AVP to a named tunnel (meaning one that was started by a session specifying this AVP) ๐Ÿšซ

Note that the same Id can be used to name different tunnels, as long as those tunnels are between different endpoints ๐Ÿงšโ€โ™€๏ธ

7.9. Tunnel-Preference AVP ๐Ÿ‘‘

The Tunnel-Preference AVP (AVP Code 83) is an Unsigned32 used to show the relative preference of each tunnel when more than one set of tunneling AVPs comes back in separate Grouped-AVP AVPs ๐Ÿ† It MAY be used in an authorization request as a hint that a specific preference is wanted, but the server is not required to honor the hint in its response ๐Ÿ’ญ

Here's an example, bestie ๐ŸŽ€ Suppose the server sends back AVPs describing two tunnels: one with a Tunnel-Type of PPTP and one with a Tunnel-Type of L2TP ๐ŸŒท If the tunnel initiator only supports one of the Tunnel-Types returned, it starts a tunnel of that type ๐Ÿซถ But if it supports both tunnel protocols, it SHOULD use the value of the Tunnel-Preference AVP to decide which tunnel to start ๐Ÿง  The tunnel with the lowest numerical value in this AVP's Value field SHOULD be given the highest preference ๐Ÿ“‰ Two or more instances of the Tunnel-Preference AVP inside one authorization response MAY have identical values ๐Ÿชž When that happens, the tunnel initiator SHOULD use locally configured metrics to decide which set of AVPs to use ๐Ÿ“

7.10. Tunnel-Client-Auth-Id AVP ๐Ÿชช

The Tunnel-Client-Auth-Id AVP (AVP Code 90) is a UTF8String that names the name the tunnel initiator used during the authentication phase of tunnel setup ๐Ÿ™‹โ€โ™€๏ธ It MAY be used in an authorization request as a hint that a specific preference is desired, but the server is not required to honor the hint in the corresponding response ๐Ÿ’Œ This AVP MUST be present in the authorization response if an authentication name other than the default is wanted ๐Ÿšจ This AVP SHOULD be included in the Accounting-Request messages about the tunneled session ๐Ÿ“Š

7.11. Tunnel-Server-Auth-Id AVP ๐Ÿง

The Tunnel-Server-Auth-Id AVP (AVP Code 91) is a UTF8String that names the name the tunnel terminator used during the authentication phase of tunnel setup ๐Ÿฐ It MAY be used in an authorization request as a hint that a specific preference is desired, but the server is not required to honor the hint in the corresponding response ๐ŸŒŸ This AVP MUST be present in the authorization response if an authentication name other than the default is wanted ๐Ÿšจ This AVP SHOULD be included in the Accounting-Request messages about the tunneled session ๐Ÿ“


8. NAS Accounting ๐Ÿ“Š

Applications that implement this specification use Diameter Accounting, as defined in [BASE], plus the AVPs in the following section ๐Ÿ’– Service-specific AVP usage is defined in the tables in section 10 ๐Ÿ“‹

If accounting is active, Accounting Request (ACR) messages SHOULD be sent after the completion of any Authentication or Authorization transaction, and at the end of a Session ๐Ÿ The Accounting-Record-Type value tells you what kind of event it is ๐Ÿท๏ธ All the other AVPs identify the session and give extra info about the event ๐Ÿ”

Successfully completing the first Authentication or Authorization transaction SHOULD cause a START_RECORD to be sent ๐ŸŽฌ If more Authentications or Authorizations happen in later transactions, the first exchange should generate a START_RECORD, and the later ones an INTERIM_RECORD ๐Ÿ” For a given session, there MUST only be one set of matching START and STOP records, with any number of INTERIM_RECORDS in between, or one EVENT_RECORD explaining why a session wasn't started ๐Ÿซ 

Here's the table describing the AVPs, their AVP Code values, types, and possible flag values, and whether the AVP MAY be encrypted ๐Ÿงพ

                                            +---------------------+
                                            |    AVP Flag rules   |
                                            |----+-----+----+-----|----+
                   AVP  Section             |    |     |SHLD| MUST|    |
   Attribute Name  Code Defined  Value Type |MUST| MAY | NOT|  NOT|Encr|
   -----------------------------------------|----+-----+----+-----|----|
   Accounting-      363  8.1     Unsigned64 | M  |  P  |    |  V  | Y  |
     Input-Octets                           |    |     |    |     |    |
   Accounting-      364  8.2     Unsigned64 | M  |  P  |    |  V  | Y  |
     Output-Octets                          |    |     |    |     |    |
   Accounting-      365  8.3     Unsigned64 | M  |  P  |    |  V  | Y  |
     Input-Packets                          |    |     |    |     |    |
   Accounting-      366  8.4     Unsigned64 | M  |  P  |    |  V  | Y  |
     Output-Packets                         |    |     |    |     |    |
   Acct-Session-Time 46  8.5     Unsigned32 | M  |  P  |    |  V  | Y  |
   Acct-Authentic    45  8.6     Enumerated | M  |  P  |    |  V  | Y  |
   Acounting-Auth-  406  8.7     Enumerated | M  |  P  |    |  V  | Y  |
     Method                                 |    |     |    |     |    |
   Acct-Delay-Time   41  8.8     Unsigned32 | M  |  P  |    |  V  | Y  |
   Acct-Link-Count   51  8.9     Unsigned32 | M  |  P  |    |  V  | Y  |
   Acct-Tunnel-      68  8.10    OctetString| M  |  P  |    |  V  | Y  |
     Connection                             |    |     |    |     |    |
   Acct-Tunnel-      86  8.11    Unsigned32 | M  |  P  |    |  V  | Y  |
     Packets-Lost                           |    |     |    |     |    |
   -----------------------------------------|----+-----+----+-----|----|

8.1. Accounting-Input-Octets AVP ๐Ÿ’–

okay so the Accounting-Input-Octets AVP (AVP Code 363) is an Unsigned64 and it counts the octets received from the user ๐Ÿ“Šโœจ

for NAS usage, it tells you how many octets came in through the port during the session ๐Ÿ”Œ and it can ONLY show up in ACR messages whose Accounting-Record-Type is INTERIM_RECORD or STOP_RECORD. no other record types, bestie ๐Ÿ™…โ€โ™€๏ธ

8.2. Accounting-Output-Octets AVP ๐Ÿฆ‹

the Accounting-Output-Octets AVP (AVP Code 364) is an Unsigned64 that counts the octets sent to the user, and it's giving the mirror image of the input one ๐Ÿชž

for NAS usage, it shows how many octets went out to the port during the session. same rule applies: it can only be in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD ๐Ÿ’…

8.3. Accounting-Input-Packets AVP ๐ŸŽ€

the Accounting-Input-Packets AVP (AVP Code 365) is an Unsigned64 and it counts the packets received from the user ๐Ÿ“ฆ

for NAS usage, this one counts how many packets came in through the port over a session that's being provided to a Framed User ๐ŸŒธ and, same as always, it can only show up in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD ๐Ÿ™ˆ

8.4. Accounting-Output-Packets AVP ๐Ÿ“

the Accounting-Output-Packets AVP (AVP Code 366) is an Unsigned64 that counts the IP packets sent to the user ๐Ÿš€

for NAS usage, it counts how many packets went out to the port over a session being provided to a Framed User. and yep, it can only be in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD ๐Ÿซถ

8.5. Acct-Session-Time AVP โฐ

the Acct-Session-Time AVP (AVP Code 46) is an Unsigned32 and it tells you how long the current session has been going, in seconds ๐Ÿ•ฐ๏ธ it can only be in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD, so don't try to sneak it into the others ๐Ÿ˜ค

8.6. Acct-Authentic AVP ๐Ÿ”

the Acct-Authentic AVP (AVP Code 45) is an Enumerated type and it says how the user got authenticated ๐Ÿชช the supported values live in [RADIUSTypes], and the list below is just for vibes (informational only) โœจ

   1  RADIUS
   2  Local
   3  Remote
   4  Diameter

8.7. Accounting-Auth-Method AVP ๐Ÿงš

the Accounting-Auth-Method AVP (AVP Code 406) is an Enumerated type. a NAS MAY include this AVP in an Accounting-Request message to show which method was used to authenticate the user ๐Ÿ’œ (fun fact: this is basically the same thing as the RADIUS MS-Acct-Auth-Type VSA attribute, so if you know that one, you already know this one ๐Ÿ™Œ)

these are the values that are defined:

   1  PAP
   2  CHAP
   3  MS-CHAP-1
   4  MS-CHAP-2
   5  EAP
   7  None

8.8. Acct-Delay-Time ๐Ÿ•ฐ๏ธ

the Acct-Delay-Time AVP (AVP Code 41) is an Unsigned32 and it says how many seconds the Diameter client has been trying to send the Accounting-Request (ACR) ๐Ÿ“จ the accounting server can subtract this number from the time the ACR shows up at the server, and that gives a rough idea of when the event that made the ACR actually happened ๐Ÿ•ต๏ธโ€โ™€๏ธ

this AVP is NOT used for retransmissions at the transport level (TCP or SCTP), so don't mix those up ๐Ÿ™…โ€โ™€๏ธ instead, it's for when an ACR can't be sent because there's no appropriate peer to send it to, or it got rejected because it couldn't be delivered ๐Ÿ“ญ in those cases the command MAY be buffered and sent later, either when a good peer-connection shows up or after enough time has passed that the destination-host might be reachable and running again โณ and if the ACR gets resent like this, the Acct-Delay-Time AVP SHOULD be included ๐Ÿ’… its value is the number of seconds that passed between the first attempt and the current one ๐ŸŽ€

the Acct-Link-Count AVP (AVP Code 51) is an Unsigned32 and it's the total number of links that have been active (current or closed) in a given multilink session when the accounting record gets made ๐Ÿงฉ this AVP MAY be included in Accounting-Requests for any session that could be part of a multilink service ๐Ÿ’–

it helps the accounting server figure out when it has ALL the records for a multilink service ๐Ÿ•ต๏ธโ€โ™€๏ธ when the number of Accounting-Requests received with Accounting-Record-Type = STOP_RECORD (sharing the same Acct-Multi-Session-Id and unique Session-Ids) equals the biggest Acct-Link-Count value seen in those requests, then every STOP_RECORD Accounting-Request for that multilink service has arrived ๐ŸŽ‰

here's an example with eight Accounting-Requests so you can see how Acct-Link-Count works. the table only shows the relevant AVPs, even though the Accounting-Requests will have more accounting info in them ๐ŸŒˆ

   Acct-Multi-                   Accounting-     Acct-
   Session-Id     Session-Id     Record-Type     Link-Count
   --------------------------------------------------------
     "...10"        "...10"      START_RECORD        1
     "...10"        "...11"      START_RECORD        2
     "...10"        "...11"      STOP_RECORD         2
     "...10"        "...12"      START_RECORD        3
     "...10"        "...13"      START_RECORD        4
     "...10"        "...12"      STOP_RECORD         4
     "...10"        "...13"      STOP_RECORD         4
     "...10"        "...10"      STOP_RECORD         4

8.10. Acct-Tunnel-Connection AVP ๐Ÿš‡

the Acct-Tunnel-Connection AVP (AVP Code 68) is an OctetString that holds the identifier assigned to the tunnel session ๐Ÿงพ this AVP, together with the Tunnel-Client-Endpoint and Tunnel-Server-Endpoint AVPs, can be used to uniquely identify a tunnel session for auditing purposes ๐Ÿ”

the format of the identifier depends on the value of the Tunnel-Type AVP ๐ŸŽญ for example, to fully identify an L2TP tunnel connection, the L2TP Tunnel Id and Call Id might get encoded in this field ๐Ÿงš the exact encoding is implementation dependent, so it's up to each implementation to decide ๐Ÿคทโ€โ™€๏ธ

8.11. Acct-Tunnel-Packets-Lost AVP ๐Ÿ“‰

the Acct-Tunnel-Packets-Lost AVP (AVP Code 86) is an Unsigned32 and it holds the number of packets lost on a given link ๐Ÿ’€


9. RADIUS/Diameter Protocol Interactions ๐ŸŒ‰

okay, this section is all about basic guidelines that servers acting as AAA Translation Agents may use ๐Ÿช„ a full description of every single difference between RADIUS and Diameter is way beyond what this section (and this document) covers ๐Ÿ“š also, this document doesn't stop implementations from making extra translation methods, as long as the translation doesn't break the RADIUS or Diameter protocols ๐Ÿ™Œ

so, Diameter is basically a superset of RADIUS functions in lots of ways, BUT a bunch of RADIUS representations are NOT allowed so that new capabilities can be used without bringing the old problems along ๐ŸŽ€ hmm, wait, let me say that with the right caps: a number of RADIUS representations are not allowed, full stop ๐Ÿ™…โ€โ™€๏ธ

there are two main situations you have to handle ๐Ÿ’… the first is when a RADIUS request comes in and has to be forwarded as a Diameter request. the second is the reverse of that ๐Ÿ”„ RADIUS doesn't support a peer-to-peer architecture, and server-initiated operations are generally not supported either ๐Ÿ™ƒ if you want an alternative, check out [RADDynAuth] ๐Ÿฆ‹

some RADIUS attributes are encrypted ๐Ÿ” RADIUS security and encryption techniques are applied on a hop-per-hop basis, so a Diameter agent will have to decrypt RADIUS attribute data as it enters the Diameter system ๐Ÿ˜ญ and if that info gets forwarded, the agent MUST secure it by using Diameter specific techniques ๐Ÿ›ก๏ธ๐Ÿ”ฅ this is NOT optional, bestie, do not skip it ๐Ÿ’€

one more thing: this section uses the two terms, "AVP" and "attribute", in a concise and specific way โœจ "AVP" means a Diameter AVP, and "attribute" means a RADIUS attribute ๐Ÿซถ

9.1. RADIUS Request Forwarded as Diameter Request

okay bestie, this part is the playbook for what a Translation Agent does when a RADIUS message shows up and needs to become a Diameter message ๐Ÿฆ‹

first, the tea โ˜• RADIUS servers are assumed to be stateless ๐Ÿ’€ and it's totally possible for the authentication and accounting messages in one session to get handled by different Translation Agents in the proxy network ๐Ÿ˜ญ so a RADIUS/Diameter Translation Agent SHOULD NOT be assumed to have an accurate track on session-state information ๐Ÿ™ˆ

when a Translation Agent gets a RADIUS message, here's the checklist ๐Ÿ’…

  • If a Message-Authenticator attribute is present, the value MUST be checked but not included in the Diameter message ๐Ÿ” If it's incorrect, the RADIUS message should be silently discarded ๐Ÿคซ The gateway system SHOULD generate and include a Message-Authenticator in returned RADIUS responses โœจ
  • The transport address of the sender MUST be checked against the NAS identifying attributes ๐Ÿ‘€ (see NAS-Identifier and NAS-IP-Address below)
  • The Translation Agent must maintain transaction state information for the RADIUS request, like the Identifier field in the RADIUS header, any existing RADIUS Proxy-State attribute, and the source IP address and port number of the UDP packet ๐Ÿง  This can live in a local state table or get saved in a Proxy-Info AVP group. A Diameter Session-Id AVP value must be created using a session state mapping mechanism ๐ŸŽ€
  • If the RADIUS request contained a State attribute and the prefix of the data is "Diameter/", the data after the prefix holds the Diameter Origin-Host/Origin-Realm/Session-Id. If none of those are present and the RADIUS command is an Access-Request, a new Session-Id is created ๐Ÿช„ The Session-Id goes in the Session-Id AVP.
  • The Diameter Origin-Host and Origin-Realm AVPs MUST be created and added using the information from an FQDN corresponding to the NAS-IP-Address attribute (preferred if available), and/or to the NAS-Identifier attribute. (Fun fact: the RADIUS NAS-Identifier is not required to be an FQDN ๐Ÿค“)
  • The response MUST have an Origin-AAA-Protocol AVP added, indicating the protocol of origin of the message ๐Ÿท๏ธ
  • The Proxy-Info group SHOULD be added, with the local server's identity specified in the Proxy-Host AVP. This should make sure the response gets sent back to this system ๐Ÿ“ฌ
  • The Destination-Realm AVP is created from the information found in the RADIUS User-Name attribute ๐Ÿ’Œ
  • If the RADIUS User-Password attribute is present, the password must be unencrypted using the link's RADIUS shared secret ๐Ÿ”“ The unencrypted value must then be forwarded in a User-Password AVP using Diameter security ๐Ÿ”’
  • If the RADIUS CHAP-Password attribute is present, the Ident and Data portion of the attribute are used to create the CHAP-Auth grouped AVP ๐Ÿง
  • If the RADIUS message contains an address attribute, it MUST be converted to the appropriate Diameter AVP and type ๐Ÿ—บ๏ธ
  • If the RADIUS message contains Tunnel information [RADTunnels], the attributes or tagged groups should each be converted to a Diameter Tunneling Grouped AVP set ๐Ÿš‡ If the tunnel info has a Tunnel-Password attribute, the RADIUS encryption must be resolved, and the password forwarded, using Diameter security methods ๐Ÿ”
  • If the RADIUS message is an Accounting-Request, the Acct-Status-Type attribute value must be converted to an Accounting-Record-Type AVP value ๐Ÿ“Š If the Acct-Status-Type attribute value is STOP, the local server MUST issue a Session-Termination-Request message once the Diameter Accounting-Answer message has been received ๐Ÿ›‘
  • If the Accounting message contains an Acct-Termination-Cause attribute, it should be translated to the equivalent Termination-Cause AVP value (see below) ๐Ÿ™‹
  • If the RADIUS message contains Accounting-Input-Octets, Accounting-Input-Packets, Accounting-Output-Octets, or Accounting-Output-Packets, these attributes must be converted to the Diameter equivalents ๐Ÿ”ข Also, if the Acct-Input-Gigawords or Acct-Output-Gigawords attributes are present, these must be used to properly compute the Diameter accounting AVPs ๐Ÿงฎ

okay now the way back ๐Ÿ”™ The corresponding Diameter response is always guaranteed to be received by the same Translation Agent that translated the original request, thanks to the contents of the Proxy-Info AVP group in the Diameter request ๐Ÿ’– These steps get applied to the response during the Diameter-to-RADIUS translation:

  • If the Diameter Command-Code is set to AA-Answer and the Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH, the gateway must send a RADIUS Access-Challenge ๐ŸŒ€ It must have the Origin-Host, Origin-Realm, and Diameter Session-Id AVPs encapsulated in the RADIUS State attribute, with the prefix "Diameter/", concatenated in that order and separated with "/" characters, in UTF-8 [UTF-8] ๐Ÿงต This is what makes sure the Translation Agent receiving the next RADIUS Access-Request has the Session Identifier and can set the Destination-Host to the correct value ๐ŸŽฏ If the Multi-Round-Time-Out AVP is present, its value MUST be inserted in the RADIUS Session-Timeout AVP โฐ
  • If the Command-Code is set to AA-Answer, the Diameter Session-Id AVP is saved in a new RADIUS Class attribute whose format is the string "Diameter/" followed by the Diameter Session Identifier ๐Ÿ’พ This way, any later Accounting messages, which could be received by any Translation Agent, still have access to the original Diameter Session Identifier ๐Ÿซถ
  • If a Proxy-State attribute was present in the RADIUS request, the same attribute gets added to the response ๐Ÿ” This info may be found in the Proxy-Info AVP group, or in a local state table.
  • If state info about the RADIUS request was saved in a Proxy-Info AVP or local state table, the RADIUS Identifier and UDP IP Address and port number are pulled out and used when sending the RADIUS reply ๐Ÿ

when translating a Diameter AA-Answer (with a successful result code) into a RADIUS Access-Accept that contains a Session-Timeout or Authorization-Lifetime AVP, do these steps ๐Ÿงš

  • If the Diameter message has a Session-Timeout AVP but no Authorization-Lifetime AVP, translate it to a Session-Timeout attribute (not a Termination-Action) โณ
  • If the Diameter message has an Authorization-Lifetime AVP but no Session-Timeout AVP, translate it to a Session-Timeout attribute and a Termination-Action set to AA-REQUEST. (Remove Authorization-Lifetime and Re-Auth-Request-Type.) ๐Ÿงน
  • If the Diameter message has both, the Session-Timeout must be greater than or equal to the Authorization-Lifetime (required by [BASE]). Translate it to a Session-Timeout value (taking the value from the Authorization-Lifetime AVP, the smaller one) and set the Termination-Action to AA-REQUEST. (Remove the Authorization-Lifetime and Re-Auth-Request-Type.) ๐Ÿ’…

9.1.1. RADIUS Dynamic Authorization Considerations

okay so a Diameter/RADIUS gateway might talk to a server that implements RADIUS Dynamic Authorization [RADDynAuth] ๐ŸŽง If the server supports these functions, it MUST be listening on the assigned port, and it would receive RADIUS CoA-Request and Disconnect-Request messages ๐Ÿ“ฅ These can get mapped into the Diameter Re-Auth-Request (RAR) and Abort-Session-Request (ASR) message exchanges, respectively [BASE] ๐Ÿ”„

if [RADDynAuth] is not supported, the port wouldn't be active and the RADIUS server would receive an ICMP Port Unreachable indication ๐Ÿ™…โ€โ™€๏ธ Or, if the messages do arrive but with an inappropriate Service-Type, the gateway can respond with the appropriate NAK message and an Error-Cause attribute with the value of 405, "Unsupported Service" ๐Ÿšซ

the RADIUS CoA-Request and Disconnect-Request messages won't contain a Diameter Session-Id ๐Ÿ˜ญ Diameter requires that this value match an active session context, so the gateway MUST have a session Id cache (or other means) to identify the sessions these functions pertain to ๐Ÿ—‚๏ธ If it can't identify the session, the gateway (or NAS) should return an Error-Cause value of 503, "Session Context Not Found" ๐Ÿซ 

the RADIUS CoA-Request message only supports a change of authorization attributes, and the received CoA-Request SHOULD include a Service-Type of "Authorize-Only" โœจ This indicates an extended exchange request by the rules given in [RADDynAuth] section 3.2, note 6. It's also the only type of exchange Diameter supports [BASE] ๐Ÿ‘‘

for the CoA-Request, the translated RAR message will have a Re-Auth-Type of AUTHORIZE_ONLY ๐ŸŽ€ The returned RAA gets translated into a CoA-NAK with Error-Cause "Request Initiated" ๐Ÿ™ƒ The gateway's Diameter client SHOULD also start a reauthorization sequence by sending an AAR message, which gets translated into an Access-Request message ๐Ÿ” The RADIUS server uses the Access-Accept (or Access-Reject) message to convey the new authorization attributes, which the gateway passes back in an AAA message ๐Ÿฆ‹

any attributes included in the COA-Request or Access-Accept message are to be considered mandatory in Diameter ๐Ÿงฑ If they can't be supported, they MUST result in an error message return to the RADIUS server, with an Error-Cause of "Unsupported Attribute" ๐Ÿšจ The Diameter NAS will attempt to apply all the attributes supplied in the AA message to the session ๐Ÿซก

last but not least ๐Ÿ’– a RADIUS Disconnect-Request message received by the gateway gets translated to a Diameter Abort-Session-Request (ASR) message [BASE] ๐Ÿ‘‹ The results come back from the Diameter client in an Abort-Session-Answer (ASA) message. A success indication translates to a RADIUS Disconnect-ACK, and a failure generates a Disconnect-NAK ๐ŸŒธ

9.2. Diameter Request Forwarded as RADIUS Request ๐ŸŽ€

okay so this section is about what happens when a server gets a Diameter request that needs to be forwarded to a RADIUS entity ๐Ÿฆ‹ the steps below are examples of what may be done:

  • The Origin-Host AVP's value is inserted into the NAS-Identifier attribute.
  • The following information MUST be present in the corresponding Diameter response and therefore MUST be saved, either in a local state table or encoded in a RADIUS Proxy-State attribute:
    1. Origin-Host AVP
    2. Session-Id AVP
    3. Proxy-Info AVP
    4. Any other AVP that MUST be present in the response and has no corresponding RADIUS attribute.
  • If the CHAP-Auth AVP is present, the grouped AVPs are used to create the RADIUS CHAP-Password attribute data. ๐Ÿ”
  • If the User-Password AVP is present, the data should be encrypted and forwarded by using RADIUS rules. The same is true for any other RADIUS-encrypted attribute values. ๐Ÿ’…
  • AVPs of the type Address must be translated to the corresponding RADIUS attribute. ๐ŸŒธ
  • If the Accounting-Input-Octets, Accounting-Input-Packets, Accounting-Output-Octets, or Accounting-Output-Packets AVPs are present, they must be translated to the corresponding RADIUS attributes. If the value of the Diameter AVPs does not fit within a 32-bit RADIUS attribute, the RADIUS Acct-Input-Gigawords and Acct-Output-Gigawords must be used. ๐Ÿ“Š
  • If the RADIUS link supports the Message-Authenticator attribute [RADIUSExt], it SHOULD be generated and added to the request. โœจ

When the Translation Agent gets the corresponding response, which RADIUS guarantees will happen ๐Ÿซถ, the following steps may be taken:

  • If the RADIUS code is set to Access-Challenge, a Diameter AA-Answer message is created with the Result-Code set to DIAMETER_MULTI_ROUND_AUTH. If the Session-Timeout AVP is present in the RADIUS message, its value is inserted into the Multi-Round-Time-Out AVP. โฐ
  • If a Proxy-State attribute is present, extract the encoded information. Otherwise, retrieve the original Proxy-Info AVP group information from the local state table.
  • The response's Origin-Host information is created from the FQDN of the RADIUS message's source IP address. The same FQDN is also stored in a Route-Record AVP. ๐Ÿ—บ๏ธ
  • The response's Destination-Host AVP is copied from the saved request's Origin-Host information.
  • The Session-Id information can be recovered from local state, or from the constructed State or Proxy-State attribute, as above.
  • If a Proxy-Info AVP was present in the request, the same AVP MUST be added to the response. ๐Ÿ‘‘
  • If the RADIUS State attributes are present, they must be present in the Diameter response, minus those added by the gateway.
  • Any other AVPs that were saved at request time, and that MUST be present in the response, are added to the message. ๐Ÿ’–

When translating a RADIUS Access-Accept to a Diameter AA-Answer that contains a Session-Timeout attribute, do the following:

  • If the RADIUS message contains a Session-Timeout attribute and a Termination-Action attribute set to DEFAULT (or no Termination-Action attribute at all), translate it to an AA-Answer with a Session-Timeout AVP and remove the Termination-Action attribute.
  • If the RADIUS message contains a Session-Timeout attribute and a Termination-Action attribute set to AA-REQUEST, translate it to an AA-Answer with an Authorization-Lifetime AVP and with Re-Auth-Request-Type set to AUTHORIZE_AUTHENTICATE, and remove the Session-Timeout attribute. ๐Ÿงš

9.2.1. RADIUS Dynamic Authorization Considerations ๐Ÿฆ‹

A RADIUS/Diameter gateway that talks to a RADIUS client implementing RADIUS Dynamic Authorization [RADDynAuth] may translate Diameter Re-Auth-Request (RAR) messages and Abort-Session-Request (ASR) messages [BASE] into RADIUS CoA-Request and Disconnect-Request messages, respectively. ๐Ÿ”„

If the RADIUS client doesn't support the capability, the gateway will receive an ICMP Port Unreachable indication when it transmits the RADIUS message. Even if the NAS supports [RADDynAuth], it may not support the Service-Type in the request message. In this case, it will respond with a NAK message and (optionally) an Error-Cause attribute with value 405, "Unsupported Service". If the gateway runs into these error conditions, or if it doesn't support [RADDynAuth], it sends a Diameter Answer message with a Result-Code AVP of "DIAMETER_COMMAND_UNSUPPORTED" to the AAA server. ๐Ÿ™ˆ

When encoding the RADIUS messages, the gateway MUST include the Diameter Session-ID in the RADIUS State attribute value, as mentioned above. The RADIUS client should return it in the response. ๐Ÿ”‘

A Diameter Re-Auth-Request (RAR) message [BASE] received by the gateway will be translated into a RADIUS CoA-Request and sent to the RADIUS client. The RADIUS client should respond with a CoA-ACK or CoA-NAK message, which the gateway should translate into a Re-Auth-Answer (RAA) message. ๐Ÿ’Œ

If the gateway receives a RADIUS CoA-NAK response containing a Service-Type Attribute with value "Authorize Only" and an Error-Cause Attribute with value "Request Initiated", this indicates an extended exchange request per [RADDynAuth] section 3.2, note 6. ๐Ÿ‘€

The response is translated to a Diameter Re-Auth-Answer (RAA) with a Result-Code AVP of "DIAMETER_LIMITED_SUCCESS" and sent to the AAA server. โœ…

Afterwards, the gateway should receive a RADIUS Access-Request from the NAS, with a Service-Type of "Authorize Only". This is translated into a Diameter AA-Request with an Auth-Request-Type AVP of AUTHORIZE_ONLY and sent to the AAA server. The AAA server will then reply with a Diameter AA-Answer, which is translated into a RADIUS Access-Accept or Access-Reject, depending on the value of the Result-Code AVP. ๐Ÿซง

A Diameter Abort-Session-Request (ASR) message [BASE] received by the gateway will be translated into a RADIUS Disconnect-Request and sent to the RADIUS client. The RADIUS client should respond with a Disconnect-ACK or Disconnect-NAK message, which the gateway should translate into an Abort-Session-Answer (ASA) message. ๐Ÿšช

If the gateway receives a RADIUS Disconnect-NAK response containing a Service-Type Attribute with value "Authorize Only" and an Error-Cause Attribute with value "Request Initiated", the Disconnect-NAK response is translated into a Diameter Abort-Session-Answer (ASA) with a Result-Code AVP of "DIAMETER_LIMITED_SUCCESS" and sent to the AAA server. ๐ŸŒˆ

Afterwards, the gateway should receive a RADIUS Access-Request from the NAS, with a Service-Type of "Authorize Only". This is translated into a Diameter AA-Request with an Auth-Request-Type AVP of AUTHORIZE_ONLY and sent to the AAA server. The AAA server will then reply with a Diameter AA-Answer, which is translated into a RADIUS Access-Accept or Access-Reject, depending on the value of the Result-Code AVP. ๐Ÿ’œ


9.3. AVPs Used Only for Compatibility ๐Ÿ“

The AVPs defined in this section SHOULD only be used for backwards compatibility when a Diameter/RADIUS translation function is invoked. They are not typically originated by Diameter systems during normal operations. ๐Ÿงธ

                                            +---------------------+
                                            |    AVP Flag rules   |
                                            |----+-----+----+-----|----+
                   AVP  Section             |    |     |SHLD| MUST|    |
   Attribute Name  Code Defined  Value Type |MUST| MAY | NOT|  NOT|Encr|
   -----------------------------------------|----+-----+----+-----|----|
   NAS-Identifier    32  9.3.1   UTF8String | M  |  P  |    |  V  | Y  |
   NAS-IP-Address     4  9.3.2   OctetString| M  |  P  |    |  V  | Y  |
   NAS-IPv6-Address  95  9.3.3   OctetString| M  |  P  |    |  V  | Y  |
   State             24  9.3.4   OctetString| M  |  P  |    |  V  | Y  |
   Termination-     295  9.3.5   Enumerated | M  |  P  |    |  V  | Y  |
      Cause                                 |    |     |    |     |    |
   Origin-AAA-      408  9.3.6   Enumerated | M  |  P  |    |  V  | Y  |
      Protocol                              |    |     |    |     |    |
   -----------------------------------------|----+-----+----+-----|----|

9.3.1. NAS-Identifier AVP ๐Ÿชช

The NAS-Identifier AVP (AVP Code 32) [RADIUS] is of type UTF8String and contains the identity of the NAS providing service to the user. This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent. When this AVP is present, the Origin-Host AVP identifies the NAS providing service to the user.

In RADIUS, it would be possible for a rogue NAS to forge the NAS-Identifier attribute. Diameter/RADIUS translation agents SHOULD attempt to check a received NAS-Identifier attribute against the source address of the RADIUS packet, by doing an A/AAAA RR query. If the NAS-Identifier attribute contains an FQDN, then such a query would resolve to an IP address matching the source address. However, the NAS-Identifier attribute is not required to contain an FQDN, so such a query could fail. If it fails, an error should be logged, but no action should be taken, other than a reverse lookup on the source address and inserting the resulting FQDN into the Route-Record AVP. ๐Ÿ•ต๏ธโ€โ™€๏ธ

Diameter agents and servers SHOULD check whether a NAS-Identifier AVP corresponds to an entry in the Route-Record AVP. If no match is found, then an error is logged, but no other action is taken. ๐Ÿ”

9.3.2. NAS-IP-Address AVP ๐ŸŒ

The NAS-IP-Address AVP (AVP Code 4) [RADIUS] is of type OctetString and contains the IP Address of the NAS providing service to the user. This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent. When this AVP is present, the Origin-Host AVP identifies the NAS providing service to the user.

In RADIUS, it would be possible for a rogue NAS to forge the NAS-IP-Address attribute value. Diameter/RADIUS translation agents MUST check a received NAS-IP-Address or NAS-IPv6-Address attribute against the source address of the RADIUS packet. If they do not match and the Diameter/RADIUS translation agent does not know whether the packet was sent by a RADIUS proxy or NAS (e.g., no Proxy-State attribute), then by default it is assumed that the source address corresponds to a RADIUS proxy, and that the NAS Address is behind that proxy, potentially with some additional RADIUS proxies in between. The Diameter/RADIUS translation agent MUST insert entries in the Route-Record AVP corresponding to the apparent route. This implies doing a reverse lookup on the source address and NAS-IP-Address or NAS-IPv6-Address attributes to determine the corresponding FQDNs. ๐Ÿงญ

If the source address and the NAS-IP-Address or NAS-IPv6-Address do not match, and the Diameter/RADIUS translation agent knows that it is talking directly to the NAS (e.g., there are no RADIUS proxies between it and the NAS), then the error should be logged, and the packet MUST be discarded. ๐Ÿšซ

Diameter agents and servers MUST check whether the NAS-IP-Address AVP corresponds to an entry in the Route-Record AVP. This is done by doing a reverse lookup (PTR RR) for the NAS-IP-Address to retrieve the corresponding FQDN, and by checking for a match with the Route-Record AVP. If no match is found, then an error is logged, but no other action is taken. ๐Ÿ’…

9.3.3. NAS-IPv6-Address AVP โœจ

okay bestie, the NAS-IPv6-Address AVP (AVP Code 95) [RADIUSIPv6] is an OctetString that carries the IPv6 Address of the NAS serving the user ๐Ÿฆ‹. This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent. When it's present, the Origin-Host AVP is what identifies the NAS providing service to the user ๐Ÿ’….

ngl this one has security drama ๐Ÿ’€. In RADIUS, a rogue NAS could forge the NAS-IPv6-Address attribute. So translation agents MUST check a received NAS-IPv6-Address against the source address of the RADIUS packet. If they don't match AND the agent doesn't know whether the packet came from a RADIUS proxy or a NAS (like, there's no Proxy-State attribute), then the default is to assume the source address belongs to a RADIUS proxy, and the NAS-IPv6-Address is sitting behind that proxy, maybe with some more proxies in between ๐Ÿงš. The translation agent MUST insert entries in the Route-Record AVP that match the apparent route. That means doing a reverse lookup on the source address and the NAS-IPv6-Address to figure out the FQDNs.

If the source address and the NAS-IPv6-Address don't match, and the agent knows it's talking directly to the NAS (no RADIUS proxies in the middle), then the error should be logged and the packet MUST be discarded ๐Ÿšซ.

Diameter agents and servers MUST check whether the NAS-IPv6-Address AVP corresponds to an entry in the Route-Record AVP. You do this with a reverse lookup (PTR RR) on the NAS-IPv6-Address to get the FQDN, then check for a match with the Record-Route AVP. No match? Log an error, but that's it, no other action ๐Ÿ“.


9.3.4. State AVP

the State AVP (AVP Code 24) [RADIUS] is an OctetString and it has two uses in the Diameter NAS application ๐ŸŒธ.

First, a Diameter Server MAY send the State AVP to a NAS in an AA-Response command that contains a Result-Code of DIAMETER_MULTI_ROUND_AUTH. If it does, the NAS MUST return it unmodified in the subsequent AA-Request command ๐Ÿ”.

Second, a Diameter Server MAY also send the State AVP to a NAS in an AA-Response command that includes a Termination-Action AVP with the value of AA-REQUEST. If the NAS carries out the Termination-Action by sending a new AA-Request command when the current service ends, it MUST return the State AVP unmodified in that new request command ๐ŸŽ€.

In either usage, the NAS MUST NOT interpret the AVP locally. How you use the State AVP is implementation dependent, so it's up to you ๐Ÿซถ.


9.3.5. Termination-Cause AVP Code Values

this section sets up a mapping between Termination-Cause AVP code values and the RADIUS Acct-Terminate-Cause attribute code values from RFC 2866 [RADIUSAcct] and [RADIUSTypes]. That way a RADIUS/Diameter Translation Agent can convert between the attribute and the AVP values ๐Ÿ”„. It basically extends the definitions in the "Termination-Cause AVP" section of the Base Diameter specification, so it's like a glow-up sequel ๐Ÿ’–.

Here's the table that maps Termination-Cause AVP values to RADIUS Acct-Terminate-Cause causes:

                                 +-----------------------+
                                 |         Value         |
                                 +-----------+-----------+
   Cause Value Name              |  RADIUS   | Diameter  |
   ------------------------------|-----------+-----------+
   User Request                  |     1     |   11      |
   Lost Carrier                  |     2     |   12      |
   Lost Service                  |     3     |   13      |
   Idle Timeout                  |     4     |   14      |
   Session Timeout               |     5     |   15      |
   Admin Reset                   |     6     |   16      |
   Admin Reboot                  |     7     |   17      |
   Port Error                    |     8     |   18      |
   NAS Error                     |     9     |   19      |
   NAS Request                   |     10    |   20      |
   NAS Reboot                    |     11    |   21      |
   Port Unneeded                 |     12    |   22      |
   Port Preempted                |     13    |   23      |
   Port Suspended                |     14    |   24      |
   Service Unavailable           |     15    |   25      |
   Callback                      |     16    |   26      |
   User Error                    |     17    |   27      |
   Host Request                  |     18    |   28      |
   Supplicant Restart            |     19    |   29      |  [RAD802.1X]
   Reauthentication Failure      |     20    |   30      |  [RAD802.1X]
   Port Reinit                   |     21    |   31      |  [RAD802.1X]
   Port Disabled                 |     22    |   32      |  [RAD802.1X]
   ------------------------------|-----------+-----------+

From RFC 2866, here's what each termination cause means ๐Ÿ“–:

   User Request         User requested termination of service, for
                        example with LCP Terminate or by logging out.

   Lost Carrier         DCD was dropped on the port.

   Lost Service         Service can no longer be provided; for
                        example, user's connection to a host was
                        interrupted.

   Idle Timeout         Idle timer expired.

   Session Timeout      Maximum session length timer expired.

   Admin Reset          Administrator reset the port or session.

   Admin Reboot         Administrator is ending service on the NAS,
                        for example, prior to rebooting the NAS.

   Port Error           NAS detected an error on the port that
                        required ending the session.

   NAS Error            NAS detected an error (other than on the
                        port) that required ending the session.

   NAS Request          NAS ended the session for a non-error reason not
                        otherwise listed here.

   NAS Reboot           NAS ended the session to reboot
                        non-administratively ("crash").

   Port Unneeded        NAS ended the session because resource usage
                        fell below a low-water mark (for example, if
                        a bandwidth-on-demand algorithm decided that
                        the port was no longer needed).

   Port Preempted       NAS ended the session to allocate the
                        port to a higher priority use.

   Port Suspended       NAS ended the session to suspend a virtual
                        session.

   Service Unavailable  NAS was unable to provide requested service.

   Callback             NAS is terminating the current session
                        to perform callback for a new session.

   User Error           Input from user is in error, causing
                        session termination.

   Host Request         Login Host terminated session normally.

9.3.6. Origin-AAA-Protocol

the Origin-AAA-Protocol AVP (AVP Code 408) is an Enumerated type. It should be inserted in a Diameter message that a gateway system translated from another AAA protocol, like RADIUS ๐ŸŒ‰. Its job is to tell the Diameter system receiving the message which source protocol it came from ๐Ÿ•ต๏ธโ€โ™€๏ธ.

The supported values are:

      1       RADIUS

9.4. Prohibited RADIUS Attributes

these RADIUS attributes MUST NOT appear in a Diameter message ๐Ÿšท. Instead, they get translated to other Diameter AVPs or handled in some special way. The rules for treating these attributes are covered in sections 9.1, 9.2, and 9.6, so go check those out ๐Ÿ‘‘.

   Attribute Description       Defined     Nearest Diameter AVP
   -----------------------------------------------------------------
    3 CHAP-Password            RFC 2865    CHAP-Auth Group
   26 Vendor-Specific          RFC 2865    Vendor Specific AVP
   29 Termination-Action       RFC 2865    Authorization-Lifetime
   40 Acct-Status-Type         RFC 2866    Accounting-Record-Type
   42 Acct-Input-Octets        RFC 2866    Accounting-Input-Octets
   43 Acct-Output-Octets       RFC 2866    Accounting-Output-Octets
   47 Acct-Input-Packets       RFC 2866    Accounting-Input-Packets
   48 Acct-Output-Packets      RFC 2866    Accounting-Output-Packets
   49 Acct-Terminate-Cause     RFC 2866    Termination-Cause
   52 Acct-Input-Gigawords     RFC 2869    Accounting-Input-Octets
   53 Acct-Output-Gigawords    RFC 2869    Accounting-Output-Octets
   80 Message-Authenticator    RFC 2869    none - check and discard

9.5. Translatable Diameter AVPs

in general, Diameter AVPs that aren't RADIUS compatible have code values greater than 255 ๐Ÿ™ˆ. The table in the section above shows which AVPs can be converted into RADIUS attributes.

Another problem may come up with Diameter AVP values that are more than 253 octets long ๐Ÿ˜ฌ. Some RADIUS attributes (including but not limited to (8)Reply-Message, (79)EAP-Message, and (77)Connect-Info) let you concatenate multiple instances to get around that limit. If concatenation isn't possible, a Result-Code of DIAMETER_INVALID_AVP_LENGTH should be returned ๐Ÿšจ.


9.6. RADIUS Vendor Specific Attributes

RADIUS supports Vendor Specific Attributes (VSAs) through attribute 26 ๐ŸŒˆ. The recommended format [RADIUS] for the attribute data field is a 4 octet vendor code, followed by a one octet vendor type field and a one octet length field. The last two fields MAY be repeated.

A system talking between Diameter and RADIUS MAY know the specific vendor formats and MAY be able to translate between the two. But lots of RADIUS vendor formats don't follow the example in RFC 2865 [RADIUS]. For instance, some use a longer vendor type code, so the translations in the next two sections won't work in general for those VSAs ๐Ÿ˜ค. RFC 2865 says a robust implementation SHOULD support the field as undistinguished octets.

Systems that don't know the vendor format MAY discard such attributes if they don't have a suitable translation. There's also an alternative format under consideration [VSA] that would preserve the native information and wouldn't need vendor knowledge in the gateway system ๐Ÿ‘€.

The following sections are an example of translating RADIUS VSAs that use the example RADIUS format, and Diameter VSAs that have type codes less than 255 and value field lengths less than 252 โœจ.

9.6.1. Forwarding a Diameter Vendor Specific AVP as a RADIUS VSA

for Type codes less than 255, the value field length MUST be less than 252, or the AVP will be discarded ๐Ÿ’”. The RADIUS VSA attribute should consist of the following fields:

   RADIUS Type = 26, Vendor Specific Attribute
   RADIUS Length = total length of attribute (header + data)
   RADIUS Vendor code = Diameter Vendor code
   RADIUS Vendor type code = low order byte of Diameter AVP code
   RADIUS Vendor data length = length of Diameter data

If the Diameter AVP code is greater than 255, the RADIUS speaking code may use a Vendor specific field coding, but only if it knows one for that vendor. Otherwise, the AVP will be ignored. If it's flagged as Mandatory, a "DIAMETER_AVP_UNSUPPORTED" Result-Code will be returned, and the RADIUS message won't be sent ๐Ÿ›‘.

9.6.2. Forwarding a RADIUS VSA as a Diameter Vendor Specific AVP โœจ

okay so when a RADIUS VSA needs to hop over to the Diameter side, it gets wrapped up as a Diameter AVP shaped like this ๐Ÿ’…:

Diameter Flags: V=1, M=0, P=0
Diameter Vendor code = RADIUS VSA Vendor code
Diameter AVP code = RADIUS VSA Vendor type code
Diameter AVP length = length of AVP (header + data)
Diameter Data = RADIUS VSA vendor data

ngl the VSAs are optional by RADIUS rules, and this spec does not set the Mandatory flag ๐Ÿ™ˆ. If an implementor wants a VSA to be mandatory because it represents a required service policy, the RADIUS gateway should have a process to set the bit on the Diameter side ๐Ÿ”ฅ.

If the RADIUS receiving code knows about vendor specific field interpretations for that vendor, it may use them to parse an extended AVP code or data length ๐Ÿงš. Otherwise, the recommended standard fields will be used ๐Ÿ’–.

Nested Multiple vendor data fields MUST be expanded into multiple Diameter AVPs ๐Ÿ‘‘. No skipping this one, bestie ๐Ÿ˜ญ.


10. AVP Occurrence Tables ๐ŸŽ€

okay this part is the big tables moment ๐Ÿฆ‹. The following tables present the AVPs used by NAS applications in NAS messages and specify in which Diameter messages they MAY or MAY NOT be present. [BASE] messages and AVPs are not described in this document. Note that AVPs that can only be present within a Grouped AVP are not represented in this table.

The table uses the following symbols:

0     The AVP MUST NOT be present in the message.
0+    Zero or more instances of the AVP MAY be present in the
      message.
0-1   Zero or one instance of the AVP MAY be present in the
      message.
1     One instance of the AVP MUST be present in the message.

10.1. AA-Request/Answer AVP Table ๐ŸŒธ

The table in this section is limited to the Command Codes defined in this specification.

                                 +-----------+
                                 |  Command  |
                                 |-----+-----+
   Attribute Name                | AAR | AAA |
   ------------------------------|-----+-----+
   Acct-Interim-Interval         | 0   | 0-1 |
   ARAP-Challenge-Response       | 0   | 0-1 |
   ARAP-Features                 | 0   | 0-1 |
   ARAP-Password                 | 0-1 | 0   |
   ARAP-Security                 | 0-1 | 0-1 |
   ARAP-Security-Data            | 0+  | 0+  |
   ARAP-Zone-Access              | 0   | 0-1 |
   Auth-Application-Id           | 1   | 1   |
   Auth-Grace-Period             | 0-1 | 0-1 |
   Auth-Request-Type             | 1   | 1   |
   Auth-Session-State            | 0-1 | 0-1 |
   Authorization-Lifetime        | 0-1 | 0-1 |
   ------------------------------|-----+-----+
                                 +-----------+
                                 |  Command  |
                                 |-----+-----+
   Attribute Name                | AAR | AAA |
   ------------------------------|-----+-----+
   Callback-Id                   | 0   | 0-1 |
   Callback-Number               | 0-1 | 0-1 |
   Called-Station-Id             | 0-1 | 0   |
   Calling-Station-Id            | 0-1 | 0   |
   CHAP-Auth                     | 0-1 | 0   |
   CHAP-Challenge                | 0-1 | 0   |
   Class                         | 0   | 0+  |
   Configuration-Token           | 0   | 0+  |
   Connect-Info                  | 0+  | 0   |
   Destination-Host              | 0-1 | 0   |
   Destination-Realm             | 1   | 0   |
   Error-Message                 | 0   | 0-1 |
   Error-Reporting-Host          | 0   | 0-1 |
   Failed-AVP                    | 0+  | 0+  |
   Filter-Id                     | 0   | 0+  |
   Framed-Appletalk-Link         | 0   | 0-1 |
   Framed-Appletalk-Network      | 0   | 0+  |
   Framed-Appletalk-Zone         | 0   | 0-1 |
   Framed-Compression            | 0+  | 0+  |
   Framed-Interface-Id           | 0-1 | 0-1 |
   Framed-IP-Address             | 0-1 | 0-1 |
   Framed-IP-Netmask             | 0-1 | 0-1 |
   Framed-IPv6-Prefix            | 0+  | 0+  |
   Framed-IPv6-Pool              | 0   | 0-1 |
   Framed-IPv6-Route             | 0   | 0+  |
   Framed-IPX-Network            | 0   | 0-1 |
   Framed-MTU                    | 0-1 | 0-1 |
   Framed-Pool                   | 0   | 0-1 |
   Framed-Protocol               | 0-1 | 0-1 |
   Framed-Route                  | 0   | 0+  |
   Framed-Routing                | 0   | 0-1 |
   Idle-Timeout                  | 0   | 0-1 |
   Login-IP-Host                 | 0+  | 0+  |
   Login-IPv6-Host               | 0+  | 0+  |
   Login-LAT-Group               | 0-1 | 0-1 |
   Login-LAT-Node                | 0-1 | 0-1 |
   Login-LAT-Port                | 0-1 | 0-1 |
   Login-LAT-Service             | 0-1 | 0-1 |
   Login-Service                 | 0   | 0-1 |
   Login-TCP-Port                | 0   | 0-1 |
   Multi-Round-Time-Out          | 0   | 0-1 |
   ------------------------------|-----+-----+
                                 +-----------+
                                 |  Command  |
                                 |-----+-----+
   Attribute Name                | AAR | AAA |
   ------------------------------|-----+-----+
   NAS-Filter-Rule               | 0   | 0+  |
   NAS-Identifier                | 0-1 | 0   |
   NAS-IP-Address                | 0-1 | 0   |
   NAS-IPv6-Address              | 0-1 | 0   |
   NAS-Port                      | 0-1 | 0   |
   NAS-Port-Id                   | 0-1 | 0   |
   NAS-Port-Type                 | 0-1 | 0   |
   Origin-AAA-Protocol           | 0-1 | 0-1 |
   Origin-Host                   | 1   | 1   |
   Origin-Realm                  | 1   | 1   |
   Origin-State-Id               | 0-1 | 0-1 |
   Originating-Line-Info         | 0-1 | 0   |
   Password-Retry                | 0   | 0-1 |
   Port-Limit                    | 0-1 | 0-1 |
   Prompt                        | 0   | 0-1 |
   Proxy-Info                    | 0+  | 0+  |
   QoS-Filter-Rule               | 0   | 0+  |
   Re-Auth-Request-Type          | 0   | 0-1 |
   Redirect-Host                 | 0   | 0+  |
   Redirect-Host-Usage           | 0   | 0-1 |
   Redirect-Max-Cache-Time       | 0   | 0-1 |
   Reply-Message                 | 0   | 0+  |
   Result-Code                   | 0   | 1   |
   Route-Record                  | 0+  | 0+  |
   Service-Type                  | 0-1 | 0-1 |
   Session-Id                    | 1   | 1   |
   Session-Timeout               | 0   | 0-1 |
   State                         | 0-1 | 0-1 |
   Tunneling                     | 0+  | 0+  |
   User-Name                     | 0-1 | 0-1 |
   User-Password                 | 0-1 | 0   |
   ------------------------------|-----+-----+

10.2. Accounting AVP Tables ๐Ÿ’œ

the tables in this section show which AVPs defined in this document are to be present and used in NAS application Accounting messages ๐Ÿ“Š. These AVPs are defined in this document, as well as in [BASE] and [RADIUSAcct].

10.2.1. Accounting Framed Access AVP Table ๐Ÿฆ‹

this table is used when the Service-Type specifies Framed Access โœจ.

                                          +-----------+
                                          |  Command  |
                                          |-----+-----+
   Attribute Name                         | ACR | ACA |
   ---------------------------------------|-----+-----+
   Accounting-Auth-Method                 | 0-1 | 0   |
   Accounting-Input-Octets                | 1   | 0   |
   Accounting-Input-Packets               | 1   | 0   |
   Accounting-Output-Octets               | 1   | 0   |
   Accounting-Output-Packets              | 1   | 0   |
   Accounting-Record-Number               | 0-1 | 0-1 |
   Accounting-Record-Type                 | 1   | 1   |
   Accounting-Realtime-Required           | 0-1 | 0-1 |
   Accounting-Sub-Session-Id              | 0-1 | 0-1 |
   Acct-Application-Id                    | 0-1 | 0-1 |
   Acct-Session-Id                        | 1   | 0-1 |
   Acct-Multi-Session-Id                  | 0-1 | 0-1 |
   Acct-Authentic                         | 1   | 0   |
   Acct-Delay-Time                        | 0-1 | 0   |
   Acct-Interim-Interval                  | 0-1 | 0-1 |
   Acct-Link-Count                        | 0-1 | 0   |
   Acct-Session-Time                      | 1   | 0   |
   Acct-Tunnel-Connection                 | 0-1 | 0   |
   Acct-Tunnel-Packets-Lost               | 0-1 | 0   |
   Authorization-Lifetime                 | 0-1 | 0   |
   Callback-Id                            | 0-1 | 0   |
   Callback-Number                        | 0-1 | 0   |
   Called-Station-Id                      | 0-1 | 0   |
   Calling-Station-Id                     | 0-1 | 0   |
   Class                                  | 0+  | 0+  |
   Connection-Info                        | 0+  | 0   |
   Destination-Host                       | 0-1 | 0   |
   Destination-Realm                      | 1   | 0   |
   Event-Timestamp                        | 0-1 | 0-1 |
   Error-Message                          | 0   | 0-1 |
   Error-Reporting-Host                   | 0   | 0-1 |
   Failed-AVP                             | 0   | 0+  |
   ---------------------------------------|-----+-----+
                                          +-----------+
                                          |  Command  |
                                          |-----+-----+
   Attribute Name                         | ACR | ACA |
   ---------------------------------------|-----+-----+
   Framed-AppleTalk-Link                  | 0-1 | 0   |
   Framed-AppleTalk-Network               | 0-1 | 0   |
   Framed-AppleTalk-Zone                  | 0-1 | 0   |
   Framed-Compression                     | 0-1 | 0   |
   Framed-IP-Address                      | 0-1 | 0   |
   Framed-IP-Netmask                      | 0-1 | 0   |
   Framed-IPv6-Prefix                     | 0+  | 0   |
   Framed-IPv6-Pool                       | 0-1 | 0   |
   Framed-IPX-Network                     | 0-1 | 0   |
   Framed-MTU                             | 0-1 | 0   |
   Framed-Pool                            | 0-1 | 0   |
   Framed-Protocol                        | 0-1 | 0   |
   Framed-Route                           | 0-1 | 0   |
   Framed-Routing                         | 0-1 | 0   |
   NAS-Filter-Rule                        | 0+  | 0   |
   NAS-Identifier                         | 0-1 | 0-1 |
   NAS-IP-Address                         | 0-1 | 0-1 |
   NAS-IPv6-Address                       | 0-1 | 0-1 |
   NAS-Port                               | 0-1 | 0-1 |
   NAS-Port-Id                            | 0-1 | 0-1 |
   NAS-Port-Type                          | 0-1 | 0-1 |
   Origin-AAA-Protocol                    | 0-1 | 0-1 |
   Origin-Host                            | 1   | 1   |
   Origin-Realm                           | 1   | 1   |
   Origin-State-Id                        | 0-1 | 0-1 |
   Originating-Line-Info                  | 0-1 | 0   |
   Proxy-Info                             | 0+  | 0+  |
   QoS-Filter-Rule                        | 0+  | 0   |
   Route-Record                           | 0+  | 0+  |
   Result-Code                            | 0   | 1   |
   Service-Type                           | 0-1 | 0-1 |
   Session-Id                             | 1   | 1   |
   Termination-Cause                      | 0-1 | 0-1 |
   Tunnel-Assignment-Id                   | 0-1 | 0   |
   Tunnel-Client-Endpoint                 | 0-1 | 0   |
   Tunnel-Medium-Type                     | 0-1 | 0   |
   Tunnel-Private-Group-Id                | 0-1 | 0   |
   Tunnel-Server-Endpoint                 | 0-1 | 0   |
   Tunnel-Type                            | 0-1 | 0   |
   User-Name                              | 0-1 | 0-1 |
   Vendor-Specific-Application-Id         | 0-1 | 0-1 |
   ---------------------------------------|-----+-----+

10.2.2. Accounting Non-Framed Access AVP Table โœจ

okay so this table is only for when the Service-Type says Non-Framed Access ๐Ÿ’… bestie just check the Service-Type first and you'll know which table to use ๐ŸŒธ

                                       +-----------+
                                       |  Command  |
                                       |-----+-----+
Attribute Name                         | ACR | ACA |
---------------------------------------|-----+-----+
Accounting-Auth-Method                 | 0-1 | 0   |
Accounting-Input-Octets                | 1   | 0   |
Accounting-Output-Octets               | 1   | 0   |
Accounting-Record-Type                 | 1   | 1   |
Accounting-Record-Number               | 0-1 | 0-1 |
Accounting-Realtime-Required           | 0-1 | 0-1 |
Accounting-Sub-Session-Id              | 0-1 | 0-1 |
Acct-Application-Id                    | 0-1 | 0-1 |
Acct-Session-Id                        | 1   | 0-1 |
Acct-Multi-Session-Id                  | 0-1 | 0-1 |
Acct-Authentic                         | 1   | 0   |
Acct-Delay-Time                        | 0-1 | 0   |
Acct-Interim-Interval                  | 0-1 | 0-1 |
Acct-Link-Count                        | 0-1 | 0   |
Acct-Session-Time                      | 1   | 0   |
Authorization-Lifetime                 | 0-1 | 0   |
Callback-Id                            | 0-1 | 0   |
Callback-Number                        | 0-1 | 0   |
Called-Station-Id                      | 0-1 | 0   |
Calling-Station-Id                     | 0-1 | 0   |
Class                                  | 0+  | 0+  |
Connection-Info                        | 0+  | 0   |
Destination-Host                       | 0-1 | 0   |
Destination-Realm                      | 1   | 0   |
Event-Timestamp                        | 0-1 | 0-1 |
Error-Message                          | 0   | 0-1 |
Error-Reporting-Host                   | 0   | 0-1 |
Failed-AVP                             | 0   | 0+  |
Login-IP-Host                          | 0+  | 0   |
Login-IPv6-Host                        | 0+  | 0   |
Login-LAT-Service                      | 0-1 | 0   |
Login-LAT-Node                         | 0-1 | 0   |
Login-LAT-Group                        | 0-1 | 0   |
Login-LAT-Port                         | 0-1 | 0   |
Login-Service                          | 0-1 | 0   |
Login-TCP-Port                         | 0-1 | 0   |
---------------------------------------|-----+-----+

                                       +-----------+
                                       |  Command  |
                                       |-----+-----+
Attribute Name                         | ACR | ACA |
---------------------------------------|-----+-----+
NAS-Identifier                         | 0-1 | 0-1 |
NAS-IP-Address                         | 0-1 | 0-1 |
NAS-IPv6-Address                       | 0-1 | 0-1 |
NAS-Port                               | 0-1 | 0-1 |
NAS-Port-Id                            | 0-1 | 0-1 |
NAS-Port-Type                          | 0-1 | 0-1 |
Origin-AAA-Protocol                    | 0-1 | 0-1 |
Origin-Host                            | 1   | 1   |
Origin-Realm                           | 1   | 1   |
Origin-State-Id                        | 0-1 | 0-1 |
Originating-Line-Info                  | 0-1 | 0   |
Proxy-Info                             | 0+  | 0+  |
QoS-Filter-Rule                        | 0+  | 0   |
Route-Record                           | 0+  | 0+  |
Result-Code                            | 0   | 1   |
Session-Id                             | 1   | 1   |
Service-Type                           | 0-1 | 0-1 |
Termination-Cause                      | 0-1 | 0-1 |
User-Name                              | 0-1 | 0-1 |
Vendor-Specific-Application-Id         | 0-1 | 0-1 |
---------------------------------------|-----+-----+

11. IANA Considerations โœจ

this section is the guidance for IANA ๐ŸŽ€ about registering values for the Diameter protocol, following BCP 26 [IANAConsid] ๐Ÿ’–

this doc defines values in the namespaces that were already created in the Diameter Base [BASE] ๐Ÿฆ‹ the IANA Considerations section of that doc has the assignment rules. Values assigned in this document, or by future IANA action, must be coordinated within this shared namespace ๐Ÿซถ

11.1. Command Codes ๐ŸŒˆ

this spec assigns the value 265 from the Command Code namespace defined in [BASE] โœจ see sections 3.1 and 3.2 for how that namespace gets used in this spec ๐Ÿ’œ

11.2. AVP Codes ๐Ÿ“

this spec assigns the values 363 - 366 and 400 - 408 from the AVP Code namespace defined in [BASE] ๐Ÿงš see sections 4 and 5 for how the namespace works here. Note that the values 363 - 366 are jointly, but consistently, assigned in [DiamMIP] ๐ŸŒธ this doc also creates one new namespace for IANA to manage, as described in section 11.5 ๐Ÿ’…

this spec also uses the AVPs in the 0 - 255 range, which are defined in [RADIUSTypes] ๐ŸŽ€ those values are assigned by the policy in RFC 2865 section 6 [RADIUS] and are amended by RFC 3575 [RADIUSIANA] ๐Ÿ”ฅ

11.3. Application Identifier ๐Ÿ‘‘

this spec uses the value one (1) in the Application Identifier namespace as assigned in [BASE] โœจ see section 1.2 above for more info ๐Ÿ’–

11.4. CHAP-Algorithm AVP Values ๐Ÿฆ‹

as defined in section 5.5, the CHAP-Algorithm AVP (AVP Code 403) uses the values of the "PPP AUTHENTICATION ALGORITHMS" namespace defined in [PPPCHAP] ๐Ÿ’œ

11.5. Accounting-Auth-Method AVP Values ๐ŸŒท

as defined in section 8.6, the Accounting-Auth-Method AVP (AVP Code 406) defines the values 1 - 5 ๐Ÿซถ all the remaining values are open for assignment via IETF Consensus [IANA] ๐ŸŒˆ

11.6. Origin-AAA-Protocol AVP Values ๐Ÿ“

as defined in section 9.3.6, the Origin-AAA-Protocol AVP (AVP Code 408) defines the value 1 ๐Ÿ’… all the remaining values are available for assignment with a "Specification Required" policy [IANAConsid] โœจ

12. Security Considerations ๐Ÿ”

okay this one is SERIOUS bestie ๐Ÿ˜ญ this doc describes how Diameter gets extended for the NAS application. The security considerations of the Diameter protocol itself were already covered in [BASE] ๐Ÿ’€ Use of this application of Diameter MUST take into consideration the security issues and requirements of the Base protocol ๐Ÿšจ

this doc doesn't have a security protocol of its own, but it does talk about how PPP authentication protocols can be carried inside Diameter ๐ŸŽ€ the PPP authentication protocols described are PAP and CHAP ๐Ÿฆ‹

the use of PAP SHOULD be discouraged, because it exposes users' passwords to possibly non-trusted entities ๐Ÿ˜ฌ BUT PAP is also used a lot with One-Time Passwords, and those don't expose a security risk ๐Ÿซ 

this is the part that's giving red flag ๐Ÿšฉ CHAP can also be carried within Diameter, and that's required for RADIUS backward compatibility. The CHAP protocol, as used in a RADIUS environment, makes authentication replay attacks easier to pull off ๐Ÿ’€

the EAP authentication protocols described in [DiamEAP] can offer better security, as long as you pick a method that fits the situation ๐ŸŒธ๐Ÿ’–

13. References ๐Ÿ“š

13.1. Normative References ๐Ÿ’œ

[BASE]         Calhoun, P., Loughney, J., Guttman, E., Zorn, G., and
               J. Arkko, "Diameter Base Protocol", RFC 3588,
               September 2003.

[DiamTrans]    Aboba, B. and J. Wood, "Authentication, Authorization
               and Accounting (AAA) Transport Profile", RFC 3539,
               June 2003.

[RADIUS]       Rigney, C., Willens, S., Rubens, A., and W. Simpson,
               "Remote Authentication Dial In User Service (RADIUS)",
               RFC 2865, June 2000.

[RADIUSTypes]  IANA, "RADIUS Types", URL:
               <http://www.iana.org/assignments/radius-types>

[RADIUSIPv6]   Aboba, B., Zorn, G., and D. Mitton, "RADIUS and IPv6",
               RFC 3162, August 2001.

[IPv6Addr]     Nerenberg, L., "IMAP4 Binary Content Extension", RFC
               3516, April 2003.

[PPPCHAP]      Simpson, W., "PPP Challenge Handshake Authentication
               Protocol (CHAP)", RFC 1994, August 1996.

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

[IANA]         IANA Assigned Numbers Database, URL:
               <http://www.iana.org/numbers.html>

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

[ANITypes]     NANPA Number Resource Info, ANI Assignments, URL:
               <http://www.nanpa.com/number_resource_info/
               ani_ii_assignments.html>

13.2. Informative References ๐Ÿ“š

okay so these are the "good to know" references ๐Ÿง  you don't need them to get the spec, but they give you the whole backstory. the list is long, so grab a snack ๐Ÿ“

  • [RADIUSAcct] Rigney, C., "RADIUS Accounting", RFC 2866, June 2000.
  • [RADIUSExt] Rigney, C., Willats, W., and P. Calhoun, "RADIUS Extensions", RFC 2869, June 2000.
  • [RADTunnels] Zorn, G., Leifer, D., Rubens, A., Shriver, J., Holdrege, M., and I. Goyret, "RADIUS Attributes for Tunnel Protocol Support", RFC 2868, June 2000.
  • [RADTunlAcct] Zorn, G., Aboba, B., and D. Mitton, "RADIUS Accounting Modifications for Tunnel Protocol Support", RFC 2867, June 2000.
  • [RADDynAuth] Chiba, M., Dommety, G., Eklund, M., Mitton, D., and B. Aboba, "Dynamic Authorization Extensions to Remote Authentication Dial In User Service (RADIUS)", RFC 3576, July 2003.
  • [RADIUSIANA] Aboba, B., "IANA Considerations for RADIUS (Remote Authentication Dial In User Service)", RFC 3575, July 2003.
  • [NASModel] Mitton, D. and M. Beadles, "Network Access Server Requirements Next Generation (NASREQNG) NAS Model", RFC 2881, July 2000.
  • [NASCriteria] Beadles, M. and D. Mitton, "Criteria for Evaluating Network Access Server Protocols", RFC 3169, September 2001.
  • [AAACriteria] Aboba, B., Calhoun, P., Glass, S., Hiller, T., McCann, P., Shiino, H., Zorn, G., Dommety, G., Perkins, C., Patil, B., Mitton, D., Manning, S., Beadles, M., Walsh, P., Chen, X., Sivalingham, S., Hameed, A., Munson, M., Jacobs, S., Lim, B., Hirschman, B., Hsu, R., Xu, Y., Campbell, E., Baba, S., and E. Jaques, "Criteria for Evaluating AAA Protocols for Network Access", RFC 2989, November 2000.
  • [DiamEAP] Eronen, P., "Diameter EAP Application", Work in Progress, May 2004.
  • [DiamCMS] Calhoun, P., Bulley, W., and S. Farrell, "Diameter CMS Security Application", Work in Progress, March 2002.
  • [DiamMIP] Calhoun, P., Johansson, T., Perkins, C., Hiller, T., and P. McCann "Diameter Mobile IPv4 Application", RFC 4004, August 2005.
  • [VSA] Mitton, D., "Diameter/RADIUS Vendor Specific AVP Translation", Work in Progress, April 2005.
  • [RAD802.1X] Congdon, P., Aboba, B., Smith, A., Zorn, G., and J. Roese, "IEEE 802.1X Remote Authentication Dial In User Service (RADIUS) Usage Guidelines", RFC 3580, September 2003.
  • [CDMA2000] 3GPP2 "P.S0001-B", Wireless IP Network Standard, October 2002. http://www.3gpp2.com/Public_html/specs/P.S0001-B_v1.0.pdf
  • [AppleTalk] Sidhu, Gursharan; Andrews, Richard F. & Oppenheimer, Alan B. "Inside AppleTalk", Second Edition, Apple Computer., 1990
  • [ARAP] Apple Remote Access Protocol (ARAP) Version 2.0 External Reference Specification", Apple Computer, September 1994, R0612LL/B
  • [IPX] Novell, Inc., "NetWare System Technical Interface Overview", June 1989, # 883-000780-001
  • [LAT] Local Area Transport (LAT) Specification V5.0, Digital Equipment Corp., AA-NL26A-TE, June 1989
  • [DIFFSERV] Nichols, K., Blake, S., Baker, F., and D. Black, "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers", RFC 2474, December 1998.
  • [DIFFSERVAF] Heinanen, J., Baker, F., Weiss, W., and J. Wroclawski, "Assured Forwarding PHB Group", RFC 2597, June 1999.
  • [DIFFSERVEF] Davie, B., Charny, A., Bennet, J.C., Benson, K., Le Boudec, J., Courtney, W., Davari, S., Firoiu, V., and D. Stiliadis, "An Expedited Forwarding PHB (Per-Hop Behavior)", RFC 3246, March 2002.
  • [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.
  • [ISOLatin] ISO 8859. International Standard -- Information Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 1: Latin Alphabet No. 1, ISO 8859-1:1987. URL: <http://www.iso.ch/cate/d16338.html>
  • [PPP] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51, RFC 1661, July 1994.
  • [PAP] Lloyd, B. and W. Simpson, "PPP Authentication Protocols", RFC 1334, October 1992.
  • [L2TP] Townsley, W., Valencia, A., Rubens, A., Pall, G., Zorn, G., and B. Palter, "Layer Two Tunneling Protocol "L2TP"", RFC 2661, August 1999.
  • [PPPMP] Sklower, K., Lloyd, B., McGregor, G., Carr, D., and T. Coradetti, "The PPP Multilink Protocol (MP)", RFC 1990, August 1996.
  • [PPTP] Hamzeh, K., Pall, G., Verthein, W., Taarud, J., Little, W., and G. Zorn, "Point-to-Point Tunneling Protocol", RFC 2637, July 1999.
  • [IEEE 802.11F] IEEE, "Trial-Use Recommended Practice for Multi-Vendor Access Point Interoperability via an Inter-Access Point Protocol Across Distribution Systems Supporting IEEE 802.11 Operation", IEEE 802.11F-2003, June 2003.

14. Acknowledgements ๐Ÿซถ

the authors wanna give a big shoutout to Carl Rigney, Allan C. Rubens, William Allen Simpson, and Steve Willens for their work on the original RADIUS [RADIUS], which gave us so many of the ideas in this spec ๐Ÿ’– thank you, Carl Rigney, for [RADIUSAcct] and [RADIUSExt] ๐ŸŽ€ and Ward Willats for [RADIUSExt] โœจ Glen Zorn, Bernard Aboba, and Dave Mitton for [RADTunlAcct] and [RADIUSIPv6] ๐Ÿฆ‹ and Dory Leifer, John Shriver, Matt Holdrege, and Ignacio Goyret for their work on [RADTunnels] ๐ŸŒธ this document literally stole text and concepts from both [RADTunnels] and [RADIUSExt] ๐Ÿ’… and thanks to Carl Williams for the IPv6-specific text ๐Ÿงš

the authors also shouted out these people for helping build the Diameter protocol ๐Ÿ‘‘ Bernard Aboba, Jari Arkko, William Bulley, Kuntal Chowdhury, Daniel C. Fox, Lol Grant, Nancy Greene, Jeff Hagg, Peter Heitman, Paul Krumviede, Fergal Ladley, Ryan Moats, Victor Muslin, Kenneth Peirce, Sumit Vakil, John R. Vollbrecht, and Jeff Weisberg ๐ŸŒˆ

and finally, Pat Calhoun wants to thank Sun Microsystems, since most of the work on this doc happened while he was working there ๐Ÿ’œ

Authors' Addresses ๐ŸŽ€

Pat Calhoun
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134
USA

Phone: +1 408-853-5269
EMail: pcalhoun@cisco.com


Glen Zorn
Cisco Systems, Inc.
500 108th Avenue N.E., Suite 500
Bellevue, WA 98004
USA

Phone:  1 425-471-4861
EMail: gwz@cisco.com


David Spence
3259 Bluett Rd.
Ann Arbor, MI  48105
USA

Phone: +1 734 834 6481
EMail: dspence@computer.org


David Mitton
Circular Networks
733 Turnpike St #154
North Andover, MA 01845

EMail: dmitton@circularnetworks.com

Copyright (C) The Internet Society (2005).

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM 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.

Intellectual Property ๐Ÿ”ฅ

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

Acknowledgement ๐ŸŒˆ

Funding for the RFC Editor function is currently provided by the Internet Society. ๐Ÿ’–

๐Ÿ“ฆ where this page comes from