RFC 7155

Diameter Network Access Server Application

๐Ÿ“… published April 2014, from ietf

RFC 7155: Diameter Network Access Server Application ๐ŸŽ€

okay bestie, this is RFC 7155 ๐Ÿ’– an IETF Standards Track doc, written by G. Zorn, Ed. from Network Zen, dated April 2014 ๐Ÿ“…. It's giving official ISSN 2070-1721 energy ๐Ÿ’… and it obsoletes RFC 4005 ๐Ÿ™ˆ. The header has no Updates line, so it doesn't update anything listed there. The whole vibe is Diameter for AAA in the NAS world ๐Ÿงš

Abstract โœจ

okay so this doc describes the Diameter protocol application used for Authentication, Authorization, and Accounting (AAA) services in the Network Access Server (NAS) environment ๐Ÿฆ‹ and it obsoletes RFC 4005. lowkey the most important bit: when you pair it with the Diameter Base protocol, the Transport Profile, and the Extensible Authentication Protocol specs, this application spec covers typical network access services requirements ๐Ÿซถ

Status of This Memo ๐ŸŒธ

This is an Internet Standards Track doc, aka the real deal ๐Ÿ”ฅ

It's a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community ๐Ÿค and it got public review and was approved for publication by the Internet Engineering Steering Group (IESG) ๐Ÿ‘‘. If you want more on Internet Standards, check Section 2 of RFC 5741 ๐Ÿ“š

For the current status, any errata, and how to send feedback, go to http://www.rfc-editor.org/info/rfc7155 ๐Ÿ”—

Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved. โœจ

This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they were in effect on the date of publication ๐Ÿ“œ Please actually read these, bestie, because they spell out your rights and restrictions for this document ๐Ÿ™ˆ Code Components pulled out of this doc must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License ๐Ÿ’œ

Table of Contents ๐Ÿงš

   1. Introduction ....................................................4
      1.1. Changes from RFC 4005 ......................................5
      1.2. Terminology ................................................6
      1.3. Requirements Language ......................................7
      1.4. Advertising Application Support ............................8
      1.5. Application Identification .................................8
      1.6. Accounting Model ...........................................8
   2. NAS Calls, Ports, and Sessions ..................................8
      2.1. Diameter Session Establishment .............................9
      2.2. Diameter Session Reauthentication or Reauthorization .......9
      2.3. Diameter Session Termination ..............................10
   3. Diameter NAS Application Messages ..............................11
      3.1. AA-Request (AAR) Command ..................................11
      3.2. AA-Answer (AAA) Command ...................................13
      3.3. Re-Auth-Request (RAR) Command .............................15
      3.4. Re-Auth-Answer (RAA) Command ..............................16
      3.5. Session-Termination-Request (STR) Command .................17
      3.6. Session-Termination-Answer (STA) Command ..................17
      3.7. Abort-Session-Request (ASR) Command .......................18
      3.8. Abort-Session-Answer (ASA) Command ........................19
      3.9. Accounting-Request (ACR) Command ..........................20
      3.10. Accounting-Answer (ACA) Command ..........................22
   4. Diameter NAS Application AVPs ..................................23
      4.1. Derived AVP Data Formats ..................................23
           4.1.1. QoSFilterRule ......................................23
      4.2. NAS Session AVPs ..........................................24
           4.2.1. Call and Session Information .......................24
           4.2.2. NAS-Port AVP .......................................25
           4.2.3. NAS-Port-Id AVP ....................................25
           4.2.4. NAS-Port-Type AVP ..................................26
           4.2.5. Called-Station-Id AVP ..............................26
           4.2.6. Calling-Station-Id AVP .............................26
           4.2.7. Connect-Info AVP ...................................27
           4.2.8. Originating-Line-Info AVP ..........................27
           4.2.9. Reply-Message AVP ..................................28
      4.3. NAS Authentication AVPs ...................................28
           4.3.1. User-Password AVP ..................................29
           4.3.2. Password-Retry AVP .................................29
           4.3.3. Prompt AVP .........................................29
           4.3.4. CHAP-Auth AVP ......................................29
           4.3.5. CHAP-Algorithm AVP .................................30
           4.3.6. CHAP-Ident AVP .....................................30
           4.3.7. CHAP-Response AVP ..................................30
           4.3.8. CHAP-Challenge AVP .................................30
           4.3.9. ARAP-Password AVP ..................................30
           4.3.10. ARAP-Challenge-Response AVP .......................31
           4.3.11. ARAP-Security AVP .................................31
           4.3.12. ARAP-Security-Data AVP ............................31
      4.4. NAS Authorization AVPs ....................................31
           4.4.1. Service-Type AVP ...................................33
           4.4.2. Callback-Number AVP ................................34
           4.4.3. Callback-Id AVP ....................................34
           4.4.4. Idle-Timeout AVP ...................................34
           4.4.5. Port-Limit AVP .....................................34
           4.4.6. NAS-Filter-Rule AVP ................................35
           4.4.7. Filter-Id AVP ......................................35
           4.4.8. Configuration-Token AVP ............................35
           4.4.9. QoS-Filter-Rule AVP ................................35
           4.4.10. Framed Access Authorization AVPs ..................36
                  4.4.10.1. Framed-Protocol AVP ......................36
                  4.4.10.2. Framed-Routing AVP .......................36
                  4.4.10.3. Framed-MTU AVP ...........................37
                  4.4.10.4. Framed-Compression AVP ...................37
                  4.4.10.5. IP Access Authorization AVPs .............37
                           4.4.10.5.1. Framed-IP-Address AVP .........37
                           4.4.10.5.2. Framed-IP-Netmask AVP .........37
                           4.4.10.5.3. Framed-Route AVP ..............38
                           4.4.10.5.4. Framed-Pool AVP ...............38
                           4.4.10.5.5. Framed-Interface-Id AVP .......38
                           4.4.10.5.6. Framed-IPv6-Prefix AVP ........39
                           4.4.10.5.7. Framed-IPv6-Route AVP .........39
                           4.4.10.5.8. Framed-IPv6-Pool AVP ..........39
                  4.4.10.6. IPX Access AVPs ..........................39
                           4.4.10.6.1. Framed-IPX-Network AVP ........40
                  4.4.10.7. AppleTalk Network Access AVPs ............40
                           4.4.10.7.1. Framed-Appletalk-Link AVP .....40
                           4.4.10.7.2. Framed-Appletalk-Network AVP ..40
                           4.4.10.7.3. Framed-Appletalk-Zone AVP .....41
                  4.4.10.8. AppleTalk Remote Access AVPs .............41
                           4.4.10.8.1. ARAP-Features AVP .............41
                           4.4.10.8.2. ARAP-Zone-Access AVP ..........41
           4.4.11. Non-Framed Access Authorization AVPs ..............41
                  4.4.11.1. Login-IP-Host AVP ........................41
                  4.4.11.2. Login-IPv6-Host AVP ......................42
                  4.4.11.3. Login-Service AVP ........................42
                  4.4.11.4. TCP Services .............................42
                           4.4.11.4.1. Login-TCP-Port AVP ............42
                  4.4.11.5. LAT Services .............................43
                           4.4.11.5.1. Login-LAT-Service AVP .........43
                           4.4.11.5.2. Login-LAT-Node AVP ............43
                           4.4.11.5.3. Login-LAT-Group AVP ...........44
                           4.4.11.5.4. Login-LAT-Port AVP ............44
      4.5. NAS Tunneling AVPs ........................................45
           4.5.1. Tunneling AVP ......................................45
           4.5.2. Tunnel-Type AVP ....................................46
           4.5.3. Tunnel-Medium-Type AVP .............................46
           4.5.4. Tunnel-Client-Endpoint AVP .........................46
           4.5.5. Tunnel-Server-Endpoint AVP .........................47
           4.5.6. Tunnel-Password AVP ................................48
           4.5.7. Tunnel-Private-Group-Id AVP ........................48
           4.5.8. Tunnel-Assignment-Id AVP ...........................48
           4.5.9. Tunnel-Preference AVP ..............................50
           4.5.10. Tunnel-Client-Auth-Id AVP .........................50
           4.5.11. Tunnel-Server-Auth-Id AVP .........................50
      4.6. NAS Accounting AVPs .......................................51
           4.6.1. Accounting-Input-Octets AVP ........................52
           4.6.2. Accounting-Output-Octets AVP .......................52
           4.6.3. Accounting-Input-Packets AVP .......................52
           4.6.4. Accounting-Output-Packets AVP ......................53
           4.6.5. Acct-Session-Time AVP ..............................53
           4.6.6. Acct-Authentic AVP .................................53
           4.6.7. Accounting-Auth-Method AVP .........................53
           4.6.8. Acct-Delay-Time AVP ................................53
           4.6.9. Acct-Link-Count AVP ................................54
           4.6.10. Acct-Tunnel-Connection AVP ........................55
           4.6.11. Acct-Tunnel-Packets-Lost AVP ......................55
   5. AVP Occurrence Tables ..........................................55
      5.1. AA-Request / AA-Answer AVP Table ..........................56
      5.2. Accounting AVP Tables .....................................58
           5.2.1. Framed Access Accounting AVP Table .................59
           5.2.2. Non-Framed Access Accounting AVP Table .............61
   6. Unicode Considerations .........................................62
   7. IANA Considerations ............................................63
   8. Security Considerations ........................................63
      8.1. Authentication Considerations .............................63
      8.2. AVP Considerations ........................................64
   9. References .....................................................65
      9.1. Normative References ......................................65
      9.2. Informative References ....................................65
   Appendix A. Acknowledgements ......................................69
     A.1. This Document ..............................................69
     A.2. RFC 4005 ...................................................69
part 1 of 13 bestie ๐Ÿ’– the actual sections start next, so stay tuned ๐Ÿ’…
  1. Introduction โœจ

okay so bestie, this doc is the Diameter protocol application for AAA (Authentication, Authorization, and Accounting) in the Network Access Server (NAS) environment ๐Ÿ’– ๐ŸŽ€ When you pair it with the Diameter Base protocol [RFC6733], the Transport Profile [RFC3539], and the Extensible Authentication Protocol (EAP) [RFC4072] specs, it covers the NAS-related requirements from [RFC2989] and [RFC3169] ๐Ÿฆ‹ no cap, that's a whole squad working together ๐Ÿ‘‘

First the doc explains how a Diameter NAS application works ๐ŸŒธ Then it defines the Diameter message command codes ๐Ÿ’… After that come the AVPs used in these messages, grouped by common usage: session identification, authentication, authorization, tunneling, and accounting โœจ The authorization AVPs get split up again by service type ๐Ÿงš

1.1. Changes from RFC 4005 ๐Ÿ“

this doc obsoletes [RFC4005] and it is NOT backward compatible with it ๐Ÿ˜ญ here's the tea on the major changes ๐Ÿซถ

  • all the RADIUS/Diameter protocol interaction material got removed ๐Ÿ’€ but where AVPs come from RADIUS Attributes, the range and format of those Attribute values are kept so migrating is easier ๐ŸŒˆ
  • the Command Code Format (CCF) [RFC6733] for the Accounting-Request and Accounting-Answer messages now explicitly requires the Acct-Application-Id AVP and excludes the Vendor-Specific-Application-Id AVP ๐Ÿ”ฅ normally a change like this would mean allocating a new command code (see Section 1.3.3 of [RFC6733]) and a new application-id, but RFC 4005 already required an Acct-Application-Id instance, so here's what it said back then:
   The Accounting-Request (ACR) message [BASE] is sent by the NAS
   to report its session information to a target server
   downstream.

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

so even though the syntax of the commands changed, the semantics didn't ๐Ÿ™ˆ (the caveat: Acct-Application-Id can no longer be contained inside Vendor-Specific-Application-Id)

  • the lists of RADIUS attribute values got deleted in favor of references to the right IANA registries ๐Ÿ“š
  • the accounting model is now specified (see Section 1.6) ๐Ÿ’œ

there are a bunch of other miscellaneous fixes too ๐ŸŒท they might not seem huge, but they're still useful, like fixing example IP addresses and adding clarifying references ๐ŸŽ€ errata reports filed against [RFC4005] at the time of writing were reviewed and folded in where needed โœจ a full list of changes isn't shown here, for practical reasons ๐Ÿ’…

1.2. Terminology ๐Ÿ“–

Section 1.2 of the Diameter Base protocol specification [RFC6733] defines most of the terminology used in this document ๐Ÿฆ‹ on top of that, these terms and acronyms are used in this application:

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 [RFC2881]. ๐Ÿ’–

PPP (Point-to-Point Protocol)

A multiprotocol serial datalink. PPP is the primary IP datalink used for dial-in NAS connection service [RFC1661]. ๐ŸŒธ

CHAP (Challenge Handshake Authentication Protocol)

An authentication process used in PPP [RFC1994]. ๐Ÿ”ฅ

PAP (Password Authentication Protocol)

A deprecated PPP authentication process, but often used for backward compatibility [RFC1334]. ๐Ÿ’€

SLIP (Serial Line Internet 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 (Internetwork Packet Exchange)

The network protocol used by NetWare networks [IPX]. ๐ŸŒˆ

L2TP (Layer Two Tunneling Protocol)

L2TP [RFC3931] provides a dynamic mechanism for tunneling Layer 2 "circuits" across a packet-oriented data network. โœจ

LAC (L2TP Access Concentrator)

An L2TP Control Connection Endpoint being used to cross-connect an L2TP session directly to a datalink [RFC3931]. ๐Ÿซถ

LAT (Local Area Transport)

A Digital Equipment Corp. LAN protocol for terminal services [LAT]. ๐Ÿ’œ

LCP (Link Control Protocol)

One of the three major components of PPP [RFC1661]. LCP is used to automatically agree upon encapsulation format options, handle varying limits on sizes of packets, detect a looped-back link and other common misconfiguration errors, and terminate the link. Other optional facilities provided are authentication of the identity of its peer on the link, and determination when a link is functioning properly and when it is failing. ๐Ÿ‘‘

PPTP (Point-to-Point Tunneling Protocol)

A protocol that allows PPP to be tunneled through an IP network [RFC2637]. ๐ŸŒท

VPN (Virtual Private Network)

In this document, this term is used to describe access services that use tunneling methods. ๐ŸŽ€

1.3. Requirements Language ๐Ÿ”‘

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. ๐Ÿ’…

the use of "MUST" and "MUST NOT" in the AVP Flag Rules columns of AVP Tables in this document refers to AVP flags ([RFC6733], Section 4.1) that:

  • MUST be set to 1 in the AVP Header ("MUST" column) and
  • MUST NOT be set to 1 ("MUST NOT" column)

1.4. Advertising Application Support ๐Ÿ“ฃ

Diameter nodes conforming to this specification MUST advertise support by including the value of one (1) in the Auth-Application-Id of the Capabilities-Exchange-Request (CER) message [RFC6733]. ๐Ÿ’–

1.5. Application Identification ๐Ÿชช

When used in this application, the Auth-Application-Id AVP MUST be set to the value one (1) in the following messages:

  • AA-Request (Section 3.1)
  • Re-Auth-Request (Section 3.3)
  • Session-Termination-Request (Section 3.5)
  • Abort-Session-Request (Section 3.7)

1.6. Accounting Model ๐Ÿ“Š

It is RECOMMENDED that the coupled accounting model (RFC 6733, Section 9.3) be used with this application ๐Ÿซถ therefore, the value of the Acct-Application-Id AVP in the Accounting-Request (Section 3.9) and Accounting-Answer (Section 3.10) messages SHOULD be set to one (1) ๐ŸŒธ


2. NAS Calls, Ports, and Sessions ๐Ÿ“ž

The arrival of a new call or service connection at a port of a Network Access Server (NAS) kicks off a Diameter NAS Application message exchange ๐Ÿฆ‹ Information about the call, the identity of the user, and the user's authentication information get packaged into a Diameter AA-Request (AAR) message and sent to a server ๐Ÿ’Œ

The server processes the info and responds with a Diameter AA-Answer (AAA) message that carries authorization information for the NAS or a failure code (Result-Code AVP) โœจ A value of DIAMETER_MULTI_ROUND_AUTH means there's an additional authentication exchange, and several AAR and AAA messages may get swapped until the transaction completes ๐Ÿ”„

2.1. Diameter Session Establishment ๐Ÿš€

When the authentication or authorization exchange completes successfully, the NAS application SHOULD start a session context ๐Ÿ’– If the Result-Code of DIAMETER_MULTI_ROUND_AUTH is returned, the exchange keeps going until a success or error comes back ๐ŸŽ€

If accounting is active, the application MUST also send an Accounting message [RFC6733] ๐Ÿ“Š An Accounting-Record-Type of START_RECORD is sent for a new session ๐ŸŒˆ If a session fails to start, the EVENT_RECORD message is sent with the reason for the failure described ๐Ÿ˜ญ

note that getting back an unsupportable Accounting-Realtime-Required value [RFC6733] would result in a failure to establish the session ๐Ÿ’€

2.2. Diameter Session Reauthentication or Reauthorization ๐Ÿ”

The Diameter Base protocol lets users be periodically reauthenticated and/or reauthorized ๐Ÿงš In those 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 via the Authorization-Lifetime AVP [RFC6733] โณ 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 ๐Ÿซถ 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 [RFC6733]) to the NAS ๐Ÿ“ฃ When the NAS gets one of these, it MUST respond to the request with a Re-Auth-Answer (RAA) message [RFC6733] ๐ŸŒท

if the RAR properly identifies an active session, the NAS will start a new local reauthentication or authorization sequence as indicated by the Re-Auth-Request-Type value ๐Ÿ”ฅ this 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 continues the prior user context, an Accounting-Record-Type of INTERIM_RECORD indicating the new session attributes and cumulative status would be appropriate ๐ŸŽ€ If a new user or a significant change in authorization is detected by the NAS, 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 such subsessions ๐Ÿงฉ A service may also use a different Session-Id value for accounting (see Section 9.6 of [RFC6733]) โœจ

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 receives an indication that a user's session is being disconnected by the client (e.g., an LCP Terminate-Request message [RFC1661] is received) or by an administrative command, the NAS MUST issue a Session-Termination-Request (STR) [RFC6733] 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) [RFC6733] MUST issue an Abort-Session-Answer (ASA) if the session identified is active, and disconnect the PPP (or tunneling) session ๐Ÿ™…โ€โ™€๏ธ

if accounting is active, an Accounting STOP_RECORD message [RFC6733] MUST be sent upon termination of the session context ๐ŸŽฌ

more info on Diameter Session Termination can be found in Sections 8.4 and 8.5 of [RFC6733] ๐Ÿ“š ๐Ÿซถ

3. Diameter NAS Application Messages โœจ

okay bestie, this is the part with the actual message list ๐Ÿ“‹ It defines the Diameter Command Code [RFC6733] values that every Diameter implementation conforming to this spec MUST support. Here's the whole lineup:

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

Quick heads up: the message formats in the subsections below follow the standard Diameter Command Code Format ([RFC6733], Section 3.2). So if you've seen that format before, you're already halfway there ๐Ÿซถ

3.1. AA-Request (AAR) Command ๐ŸŽ€

The AA-Request (AAR) is the one with Command Code 265 and the 'R' bit set in the Command Flags field. Its job is to ask for authentication and/or authorization for a given NAS user. The type of request gets picked with the Auth-Request-Type AVP [RFC6733], and the recommended value for most situations is AUTHORIZE_AUTHENTICATE ๐Ÿ’…

If authentication is being requested, the User-Name attribute SHOULD be present, along with any extra authentication AVPs that would carry the password info. An authorization request SHOULD only include the stuff it actually needs to do the authorization, like User-Name, Called-Station-Id, or Calling-Station-Id AVPs. Every request SHOULD also contain AVPs that uniquely identify where the call came from, such as Origin-Host and NAS-Port. Certain networks MAY use different AVPs for authorization purposes, so don't be shocked if yours does its own thing ๐Ÿฆ‹ And an authorization request will include some AVPs defined in Section 4.4.

Here's a plot twist: a single session can get authorized first and then have an authentication request show up afterward ๐Ÿ‘€

This AA-Request message MAY be part of a multi-round authentication exchange, which kicks in when the AA-Answer comes back with the Result-Code AVP set to DIAMETER_MULTI_ROUND_AUTH. When that happens, a follow-up AAR SHOULD be sent, carrying the User-Password AVP with the user's answer to the prompt. It MUST also include any State AVPs that were in the AAA message, because that's how the conversation stays on track ๐Ÿงš

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) is the reply to an AAR, and you spot it by Command Code 265 with the 'R' bit cleared. If authorization was requested and things went well, the answer carries the authorization AVPs that fit the service being provided, as defined in Section 4.4 โœจ

For authentication exchanges that need more than one round trip, the server MUST set the Result-Code AVP to DIAMETER_MULTI_ROUND_AUTH. An AAA with that result code MAY include one Reply-Message or more, and it MAY include zero or one State AVPs ๐Ÿ“

If the Reply-Message AVP is there, the network access server SHOULD send that text to the user's client so it can show the user, and tell the client to prompt them for a response. PPP via PAP is one example of how that can work. Now the strict part ๐Ÿ™ˆ If the text prompt can't actually reach the user, the Diameter NAS Application client MUST treat the AA-Answer (AAA) with the Reply-Message AVP as an error and deny access. No prompt, no access. Period ๐Ÿ’€

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 can kick off a reauthentication and/or reauthorization for a particular session by sending a Re-Auth-Request (RAR) message [RFC6733]. Think of it as the server tapping the NAS on the shoulder ๐Ÿ‘‹

For example, with prepaid services, the Diameter server that first authorized a session might want some confirmation that the user is still actually using the service. Makes sense, right? ๐Ÿ’ธ

Here's the rule: if a NAS gets an RAR whose Session-Id matches a currently active session, and whose Re-Auth-Type includes authentication, it MUST initiate a reauthentication toward the user. The catch is that this only applies if the service supports this 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 ๐Ÿ’–

okay so the Re-Auth-Answer (RAA) message [RFC6733] is the reply that comes back after a RAR ๐Ÿฆ‹ It tells the sender how that request went, and the Result-Code AVP MUST be present because that's where the outcome lives โœจ

ngl this next bit is a big deal: a successful RAA transaction MUST be followed by an AAR message ๐Ÿ”ฅ so it's not a dead end, it's part of a little chain bestie ๐Ÿ’…

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 ๐ŸŒธ

the Session-Termination-Request (STR) message [RFC6733] is the NAS letting the Diameter server know that a session it authenticated and/or authorized is wrapping up ๐Ÿ‘‹

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 [RFC6733] is the Diameter server's way of saying "got it, the session is over" ๐Ÿ’œ The Result-Code AVP MUST be present, and it MAY contain an indication that an error occurred while the STR was being serviced ๐Ÿ™ˆ

ok this part is serious: upon sending the STA, 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-Usage ]
                 [ Redirect-Max-Cache-Time ]
               * [ Proxy-Info ]
               * [ AVP ]

3.7. Abort-Session-Request (ASR) Command ๐Ÿ”ฅ

the Abort-Session-Request (ASR) message [RFC6733] can be sent by any Diameter server 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 [RFC6733] is the reply to an ASR ๐Ÿ’– The Result-Code AVP MUST be present, and it shows how the request turned out ๐ŸŽ€

here's the tea โ˜• if the session identified by Session-Id in the ASR was successfully terminated, the Result-Code is set to DIAMETER_SUCCESS โœจ If the session is not currently active, the Result-Code AVP is set to DIAMETER_UNKNOWN_SESSION_ID ๐Ÿ™ƒ If the access device does not stop the session for any other reason, the Result-Code AVP 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 [RFC6733] is the NAS reporting its session info to a target server downstream ๐Ÿ“ฎ

the Acct-Application-Id AVP MUST be present ๐Ÿ’…

the AVPs listed in the Diameter Base protocol specification [RFC6733] MUST be assumed to be present, as appropriate ๐Ÿง  NAS service-specific accounting AVPs SHOULD be present as described in Section 4.6 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 }
                 [ 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 โœจ

okay so the ACA message [RFC6733] is basically the reply that says "got it, thanks" to an Accounting-Request ๐Ÿ’Œ and it carries the same Session-Id as the request, so everything stays matched up ๐Ÿ”—

only the target Diameter server or home Diameter server SHOULD send the Accounting-Answer command ๐ŸŽฏ

the Acct-Application-Id AVP MUST be present ๐Ÿซถ

the AVPs listed in the Diameter Base protocol specification [RFC6733] MUST be assumed to be present, as appropriate โœ… NAS service-specific accounting AVPs SHOULD be present as described in Section 4.6 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 }
                [ 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 ]
              * [ AVP ]

4. Diameter NAS Application AVPs ๐ŸŽ€

this section is where the fun stuff lives ๐Ÿงš it defines a new derived AVP data format, sets up a bunch of application-specific AVPs, and explains how the Diameter NAS Application uses AVPs that were already defined in other documents ๐Ÿ’œ

4.1. Derived AVP Data Formats ๐ŸŒธ

4.1.1. QoSFilterRule ๐Ÿฆ‹

the QosFilterRule format is derived from the OctetString AVP Base Format ๐Ÿ“ it uses the US-ASCII charset, and packets can get marked or metered based on this info:

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

so the rules for the right direction get checked in order, and the first rule that matches ends the evaluation ๐Ÿ›‘ each packet only gets evaluated once ๐Ÿ™Œ if nothing matches, the packet is treated as best effort ๐ŸŒค๏ธ and an access device that can't interpret or apply a QoS rule SHOULD NOT terminate the session ๐Ÿซถ

QoSFilterRule filters MUST follow this format, which looks like:

action dir proto from src to dst [options]

where it goes like this:

where

action

            tag  Mark packet with a specific DSCP [RFC2474]

            meter  Meter traffic


dir         The format is as described under IPFilterRule
            [RFC6733]


proto       The format is as described under IPFilterRule
            [RFC6733]


src and dst The format is as described under IPFilterRule
            [RFC6733]

the options are described in Section 4.4.9 โœจ

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

4.2. NAS Session AVPs ๐Ÿ’–

Diameter reserves AVP Codes 0 - 255 for RADIUS Attributes that are implemented in Diameter ๐Ÿ‘‘

4.2.1. Call and Session Information ๐ŸŒˆ

this section covers the AVPs specific to Diameter applications that you need to identify the call and session context and status info ๐Ÿ” on a request, this info lets the server qualify the session ๐Ÿ’…

these AVPs are used alongside these AVPs from the Diameter Base protocol specification [RFC6733]: Session-Id, Auth-Application-Id, Origin-Host, Origin-Realm, Auth-Request-Type, and Termination-Cause ๐Ÿซถ

here's the table of possible flag values for the session level AVPs ๐Ÿ“‹

                                            +-----------+
                                            | AVP Flag |
                                            |   Rules  |
                                            |-----+-----+
                                            |MUST | MUST|
   Attribute Name          Section Defined  |     |  NOT|
   -----------------------------------------|-----+-----|
   NAS-Port                4.2.2            |  M  |  V  |
   NAS-Port-Id             4.2.3            |  M  |  V  |
   NAS-Port-Type           4.2.4            |  M  |  V  |
   Called-Station-Id       4.2.5            |  M  |  V  |
   Calling-Station-Id      4.2.6            |  M  |  V  |
   Connect-Info            4.2.7            |  M  |  V  |
   Originating-Line-Info   4.2.8            |  M  |  V  |
   Reply-Message           4.2.9            |  M  |  V  |
   -----------------------------------------|-----+-----|

4.2.2. NAS-Port AVP ๐Ÿšช

the NAS-Port AVP (AVP Code 5) is of type Unsigned32 and holds the physical or virtual port number of the NAS that's authenticating the user ๐Ÿ”Œ quick note: "port" here means a service connection on the NAS, NOT an IP protocol identifier, so the format and contents of the string that identifies the port are specific to each NAS implementation ๐Ÿง 

either the NAS-Port AVP or the NAS-Port-Id AVP (Section 4.2.3) SHOULD be present in the AA-Request (AAR, Section 3.1) command if the NAS differentiates among its ports ๐ŸŽฏ

4.2.3. NAS-Port-Id AVP ๐Ÿชช

the NAS-Port-Id AVP (AVP Code 87) is of type UTF8String and is made of 7-bit US-ASCII text that identifies the port of the NAS authenticating the user ๐Ÿ’ฌ again, "port" means a service connection on the NAS, not an IP protocol identifier ๐Ÿ™ƒ

either the NAS-Port-Id AVP or the NAS-Port AVP (Section 4.2.2) SHOULD be present in the AA-Request (AAR, Section 3.1) command if the NAS differentiates among its ports ๐ŸŒธ NAS-Port-Id is meant for NASes that can't conveniently number their ports ๐Ÿซถ

4.2.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 currently supported values of NAS-Port-Type are listed in [RADIUSAttrVals] ๐Ÿ“š

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

the Called-Station-Id AVP (AVP Code 30) is of type UTF8String and holds a 7-bit US-ASCII string the NAS sends to describe the Layer 2 address the user contacted in the request ๐Ÿ“ก for dialup access, this can be a phone number obtained using the Dialed Number Identification Service (DNIS) or a similar technology ๐Ÿ“ฑ heads up, that might be different from the phone number the call actually came in on ๐Ÿ™ˆ for use with IEEE 802 access, the Called-Station-Id MAY contain a Media Access Control (MAC) address formatted as described in [RFC3580] ๐Ÿฆ‹

if the Called-Station-Id AVP is present in an AAR message, the Auth-Request-Type AVP is set to AUTHORIZE_ONLY, and the User-Name AVP is absent, the Diameter server MAY perform authorization based on this AVP ๐Ÿ” a NAS can use this to ask whether a call should be answered based on the DNIS result โ˜Ž๏ธ

further codification of this field's allowed content and usage is outside the scope of this specification ๐Ÿคทโ€โ™€๏ธ

4.2.6. Calling-Station-Id AVP ๐Ÿ“ฒ

the Calling-Station-Id AVP (AVP Code 31) is of type UTF8String and holds a 7-bit US-ASCII string the NAS sends to describe the Layer 2 address the user connected from in the request ๐Ÿ’ซ for dialup access, this is the phone number the call came from, using Automatic Number Identification (ANI) or a similar technology ๐Ÿ“ž for use with IEEE 802 access, the Calling-Station-Id AVP MAY contain a MAC address, formatted as described in RFC 3580 ๐Ÿ–ฅ๏ธ

if the Calling-Station-Id AVP is present in an AAR message, the Auth-Request-Type AVP is set to AUTHORIZE_ONLY, and the User-Name AVP is absent, the Diameter server MAY perform authorization based on the value of this AVP ๐Ÿ›ก๏ธ a NAS can use this to ask whether a call should be answered based on the Layer 2 address (ANI, MAC Address, etc.) ๐Ÿ’…

further codification of this field's allowed content and usage is outside the scope of this specification ๐ŸŒท

4.2.7. Connect-Info AVP ๐Ÿ”—

the Connect-Info AVP (AVP Code 77) is of type UTF8String and gets sent in the AA-Request message, or in an ACR message where Accounting-Record-Type is set to STOP ๐Ÿ›ฐ๏ธ when it's in the AA-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, you can include both in the first AVP, with the transmit speed first (the speed at which the NAS modem transmits), then a slash (/), then the receive speed, and then any other optional info ๐ŸŽ€

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

if it's sent in an ACR message where Accounting-Record-Type is set to STOP, this attribute may summarize statistics about session quality ๐Ÿ“Š for example, in IEEE 802.11, the Connect-Info AVP may contain info on the number of link layer retransmissions ๐Ÿงฆ the exact format of this attribute is implementation specific ๐Ÿค–

4.2.8. Originating-Line-Info AVP โ˜Ž๏ธ

the Originating-Line-Info AVP (AVP Code 94) is of type OctetString and is sent by the NAS system to convey info about where the call came from over Signaling System 7 (SS7) ๐Ÿ›ธ

the Originating Line Information (OLI) element tells you the nature and/or characteristics of the line a call came from (think pay phone, hotel phone, or cellular phone) ๐Ÿ“ฑ telephone companies are starting to offer OLI to their customers as an option over Primary Rate Interface (PRI) ๐Ÿข Internet Service Providers (ISPs) can use OLI alongside Called-Station-Id and Calling-Station-Id to tell customer calls apart and define different services ๐Ÿ’ผ

the Value field has two octets (00 - 99) ๐Ÿ”ข ANSI T1.113 and BELLCORE 394 can give you more info about these values and how they're used ๐Ÿ“– for info on the currently assigned values, check out [ANITypes] ๐Ÿ”

4.2.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 holds a failure message ๐Ÿ˜ญ

the Reply-Message AVP MAY contain text to prompt the user before another AA-Request attempt ๐Ÿ” when it's used in an AA-Answer message with a Result-Code AVP set to DIAMETER_MULTI_ROUND_AUTH, or in a Re-Auth-Request message, it MAY contain text to prompt the user for a response ๐Ÿ’ฌโœจ

4.3. NAS Authentication AVPs โœจ

okay so this section is where the auth AVPs live ๐Ÿ” bestie, they basically bring the RADIUS-style Authentication, Authorization, and Accounting vibes [RFC2865] but over a more reliable and secure transport from the Diameter Base protocol [RFC6733]. iconic glow up ๐Ÿ’…

Here's the flag table for the session level AVPs (shown as-is, because it's a whole vibe ๐ŸŽ€):

                                            +----------+
                                            | AVP Flag |
                                            |  Rules   |
                                            |----+-----|
                                            |MUST| MUST|
   Attribute Name           Section Defined |    |  NOT|
   -----------------------------------------|----+-----|
   User-Password                 4.3.1      | M  |  V  |
   Password-Retry                4.3.2      | M  |  V  |
   Prompt                        4.3.3      | M  |  V  |
   CHAP-Auth                     4.3.4      | M  |  V  |
   CHAP-Algorithm                4.3.5      | M  |  V  |
   CHAP-Ident                    4.3.6      | M  |  V  |
   CHAP-Response                 4.3.7      | M  |  V  |
   CHAP-Challenge                4.3.8      | M  |  V  |
   ARAP-Password                 4.3.9      | M  |  V  |
   ARAP-Challenge-Response       4.3.10     | M  |  V  |
   ARAP-Security                 4.3.11     | M  |  V  |
   ARAP-Security-Data            4.3.12     | M  |  V  |
   -----------------------------------------|----+-----|

4.3.1. User-Password AVP

The User-Password AVP (AVP Code 2) is an OctetString ๐ŸŒธ It holds the password of the user being authenticated, or whatever the user typed in during a multi-round auth exchange.

This one is super sensitive because it carries a user password or a one-time password ๐Ÿ˜ญ As the Diameter Base protocol [RFC6733] requires, Diameter messages get encrypted with IPsec [RFC4301] or Transport Layer Security (TLS) [RFC5246]. Unless this AVP is being used for one-time passwords, the User-Password AVP SHOULD NOT be used in untrusted proxy environments without encrypting it using end-to-end security techniques. Don't be careless with it, babe ๐Ÿ™ˆ

The clear-text password (before encryption) MUST NOT be longer than 128 bytes in length.

4.3.2. Password-Retry AVP

The Password-Retry AVP (AVP Code 75) is an Unsigned32 ๐Ÿ“ It MAY be included in the AA-Answer if the Result-Code shows an authentication failure. Its value tells you how many auth attempts a user gets before they're disconnected. It's mainly meant for when the Framed-Protocol AVP (Section 4.4.10.1) is set to ARAP.

4.3.3. Prompt AVP

The Prompt AVP (AVP Code 76) is Enumerated and MAY be present in the AA-Answer message. When it shows up, the NAS uses it to decide whether the user's response should be echoed as they type it ๐Ÿ‘€

The supported values are listed in [RADIUSAttrVals].

4.3.4. CHAP-Auth AVP

The CHAP-Auth AVP (AVP Code 402) is Grouped ๐Ÿง It holds everything needed to authenticate a user with the PPP Challenge-Handshake Authentication Protocol (CHAP) [RFC1994]. If the CHAP-Auth AVP shows up in a message, the CHAP-Challenge AVP (Section 4.3.8) MUST be present too. The optional AVPs with the CHAP response depend on the value of the CHAP-Algorithm AVP (Section 4.3.8). The grouped AVP uses this ABNF [RFC5234] grammar:

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

4.3.5. CHAP-Algorithm AVP

The CHAP-Algorithm AVP (AVP Code 403) is Enumerated and holds the algorithm identifier used when computing the CHAP response [RFC1994]. Right now, this value is supported:

CHAP with MD5       5

The CHAP response is computed using the procedure described in [RFC1994]. This algorithm needs the CHAP-Response AVP (Section 4.3.7) to be present in the CHAP-Auth AVP (Section 4.3.4), so it MUST be there ๐Ÿ’–

4.3.6. CHAP-Ident AVP

The CHAP-Ident AVP (AVP Code 404) is an OctetString ๐Ÿฆ‹ It holds the 1 octet CHAP Identifier used when computing the CHAP response [RFC1994].

4.3.7. CHAP-Response AVP

The CHAP-Response AVP (AVP Code 405) is an OctetString โœจ It carries the 16-octet authentication data the user gives back in response to the CHAP challenge [RFC1994].

4.3.8. CHAP-Challenge AVP

The CHAP-Challenge AVP (AVP Code 60) is an OctetString ๐Ÿงš It holds the CHAP Challenge that the NAS sent to the CHAP peer [RFC1994].

4.3.9. ARAP-Password AVP

The ARAP-Password AVP (AVP Code 70) is an OctetString ๐ŸŒˆ It only shows up when the Framed-Protocol AVP (Section 4.4.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 [RFC2869] ๐Ÿ“š

4.3.10. ARAP-Challenge-Response AVP

The ARAP-Challenge-Response AVP (AVP Code 84) is an OctetString ๐ŸŽ€ It only appears when the Framed-Protocol AVP (Section 4.4.10.1) is included and set to ARAP. It carries an 8-octet response to the dial-in client's challenge.

Here's the math, bestie ๐Ÿค“ The Diameter server takes the dial-in client's challenge from the high-order 8 octets of the ARAP-Password AVP, then runs DES encryption on that value with the authenticating user's password as the key. If the user's password is shorter than 8 octets, it gets padded at the end with NULL octets until it's 8 long, and only then is it used as a key.

4.3.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 (Section 4.4.10.1) is set to the value ARAP, and the Result-Code AVP ([RFC6733], Section 7.1) is set to DIAMETER_MULTI_ROUND_AUTH. For more on its contents, see RFC 2869 ๐Ÿ’ซ

4.3.12. ARAP-Security-Data AVP

The ARAP-Security-Data AVP (AVP Code 74) is an OctetString and MAY be present in the AA-Request or AA-Answer message if the Framed-Protocol AVP (Section 4.4.10.1) is set to the value ARAP and the Result-Code AVP ([RFC6733], Section 7.1) is set to DIAMETER_MULTI_ROUND_AUTH. It holds the security module challenge or response for the ARAP Security Module named in the ARAP-Security AVP (Section 4.3.11) ๐Ÿ”


4.4. NAS Authorization AVPs ๐Ÿ‘‘

This section covers the authorization AVPs supported in the NAS Application. The Service-Type AVP SHOULD be present in all messages, and depending on its value, extra AVPs from this section and Section 4.5 MAY be present โœจ

The flag table for the session-level AVPs is right here, untouched ๐Ÿ“

                                            +----------+
                                            | AVP Flag |
                                            |  Rules   |
                                            |----+-----|
                                            |MUST| MUST|
   Attribute Name           Section Defined |    |  NOT|
   -----------------------------------------|----+-----|
   Service-Type                4.4.1        | M  |  V  |
   Callback-Number             4.4.2        | M  |  V  |
   Callback-Id                 4.4.3        | M  |  V  |
   Idle-Timeout                4.4.4        | M  |  V  |
   Port-Limit                  4.4.5        | M  |  V  |
   NAS-Filter-Rule             4.4.6        | M  |  V  |
   Filter-Id                   4.4.7        | M  |  V  |
   Configuration-Token         4.4.8        | M  |  V  |
   QoS-Filter-Rule             4.4.9        |    |     |
   Framed-Protocol             4.4.10.1     | M  |  V  |
   Framed-Routing              4.4.10.2     | M  |  V  |
   Framed-MTU                  4.4.10.3     | M  |  V  |
   Framed-Compression          4.4.10.4     | M  |  V  |
   Framed-IP-Address           4.4.10.5.1   | M  |  V  |
   Framed-IP-Netmask           4.4.10.5.2   | M  |  V  |
   Framed-Route                4.4.10.5.3   | M  |  V  |
   Framed-Pool                 4.4.10.5.4   | M  |  V  |
   Framed-Interface-Id         4.4.10.5.5   | M  |  V  |
   Framed-IPv6-Prefix          4.4.10.5.6   | M  |  V  |
   Framed-IPv6-Route           4.4.10.5.7   | M  |  V  |
   Framed-IPv6-Pool            4.4.10.5.8   | M  |  V  |
   Framed-IPX-Network          4.4.10.6.1   | M  |  V  |
   Framed-Appletalk-Link       4.4.10.7.1   | M  |  V  |
   Framed-Appletalk-Network    4.4.10.7.2   | M  |  V  |
   Framed-Appletalk-Zone       4.4.10.7.3   | M  |  V  |
   ARAP-Features               4.4.10.8.1   | M  |  V  |
   ARAP-Zone-Access            4.4.10.8.2   | M  |  V  |
   Login-IP-Host               4.4.11.1     | M  |  V  |
   Login-IPv6-Host             4.4.11.2     | M  |  V  |
   Login-Service               4.4.11.3     | M  |  V  |
   Login-TCP-Port              4.4.11.4.1   | M  |  V  |
   Login-LAT-Service           4.4.11.5.1   | M  |  V  |
   Login-LAT-Node              4.4.11.5.2   | M  |  V  |
   Login-LAT-Group             4.4.11.5.3   | M  |  V  |
   Login-LAT-Port              4.4.11.5.4   | M  |  V  |
   -----------------------------------------|----+-----|

4.4.1. Service-Type AVP

The Service-Type AVP (AVP Code 6) is Enumerated ๐ŸŽฏ It holds the type of service the user asked for, or the type of service being provided. One such AVP MAY be in an authentication and/or authorization request or response. A NAS doesn't have to implement every service type (no pressure ๐Ÿ’…). If it gets an unknown or unsupported Service-Type AVP in a response, it MUST treat that as a failure and end the session with a DIAMETER_INVALID_AVP_VALUE Result-Code ๐Ÿ’€

When it's in a request, the Service-Type AVP SHOULD be treated as a hint to the server that the NAS thinks the user would prefer that kind of service. The server doesn't have to honor the hint ๐Ÿ™ˆ Also, if the service the server picked is supported but doesn't fit the current access mode, the NAS MUST fail to start the session. The NAS MUST also generate the right error message(s).

The full list of defined values for Service-Type lives in [RFC2865] and the IANA registry [RADIUSAttrVals]. These values need a little extra explanation here:

  • Login (1): The user should be connected to a host ๐Ÿ–ฅ๏ธ The message MAY include extra AVPs defined in Sections 4.4.11.4 or 4.4.11.5.
  • Framed (2): A framed protocol, like PPP or SLIP, should start for the user ๐ŸŽˆ The message MAY include extra AVPs defined in Sections 4.4.10 or 4.5 for tunneling services.
  • Callback Login (3): The user should be disconnected and called back, then connected to a host ๐Ÿ“ž The message MAY include extra AVPs defined in this section.
  • Callback Framed (4): The user should be disconnected and called back, and then a framed protocol, like PPP or SLIP, should start for the user ๐Ÿฆ‹ The message MAY include extra AVPs defined in Sections 4.4.10 or 4.5 for tunneling services.

4.4.2. Callback-Number AVP ๐Ÿ“ž

okay bestie, so the Callback-Number AVP (AVP Code 19) is a UTF8String ๐Ÿ’– and it carries a dialing string for callback. The format is deployment specific, so each setup gets to decide what it looks like โœจ. It's giving "a hint, not a demand," because it MAY be sent in an authentication and/or authorization request to say "hey, I'd like a callback service," but the server is not required to honor the hint in the response ๐Ÿ™ˆ.

Anything beyond that, like how the allowed usage range gets codified, is outside the scope of this spec ๐ŸŽ€.

4.4.3. Callback-Id AVP ๐Ÿฆ‹

The Callback-Id AVP (AVP Code 20) is a UTF8String that holds the name of a place to be called, and the NAS is the one that interprets it ๐ŸŒธ. It MAY show up in an authentication and/or authorization response.

ngl this one is not roaming-friendly ๐Ÿ˜ญ, because it assumes the Callback-Id is configured on the NAS. So using the Callback-Number AVP (Section 4.4.2) is RECOMMENDED instead ๐Ÿซถ.

4.4.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 to have before the session gets terminated or a prompt is issued ๐Ÿ’…. The default is none or system specific.

4.4.5. Port-Limit AVP ๐ŸŒˆ

The Port-Limit AVP (AVP Code 62) is an Unsigned32 that sets the maximum number of ports the NAS gives the user ๐Ÿ’œ. It MAY be used in an authentication and/or authorization request as a hint to the server that multilink PPP [RFC1990] service is desired, but the server is not required to honor the hint in the corresponding response ๐Ÿงš.

4.4.6. NAS-Filter-Rule AVP ๐Ÿ”ฅ

The NAS-Filter-Rule AVP (AVP Code 400) is of type IPFilterRule and provides 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.

4.4.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, and it's meant to be human readable ๐Ÿฅฐ. Zero or more Filter-Id AVPs MAY be sent in an authorization answer message.

Naming a filter list lets the filter get used on different NASes without caring about the filter-list implementation details โœจ. But this AVP is not roaming-friendly, because filter naming differs from one service provider to another ๐Ÿ˜ญ.

In environments where backward compatibility with RADIUS is not required, it is RECOMMENDED that the NAS-Filter-Rule AVP (Section 4.4.6) be used instead ๐Ÿ’….

4.4.8. Configuration-Token AVP ๐ŸŽ€

The Configuration-Token AVP (AVP Code 78) is an OctetString that a Diameter server sends to a Diameter Proxy Agent in an AA-Answer command to indicate a type of user profile to be used ๐ŸŒธ. It should not be sent to a Diameter client (NAS).

The format of the Data field of this AVP is site specific ๐Ÿซถ.

4.4.9. QoS-Filter-Rule AVP ๐ŸŒŸ

The QoS-Filter-Rule AVP (AVP Code 407) is of type QoSFilterRule (Section 4.1.1) and 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.

The use of this AVP is NOT RECOMMENDED. The AVPs defined by [RFC5777] SHOULD be used instead ๐Ÿšจ.

The following options are defined for the QoSFilterRule filters:

DSCP <color>

If action is set to tag (Section 4.1.1), this option MUST be included in the rule.

Color values are defined in [RFC2474]. 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 [RFC2597]. and MUST be present if the action is set to meter (Section 4.1.1) 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 [RFC2597] (e.g., AF13).

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

4.4.10. Framed Access Authorization AVPs ๐Ÿฆ‹

This section lists the authorization AVPs needed 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" โœจ.

4.4.10.1. Framed-Protocol AVP ๐ŸŽ€

The Framed-Protocol AVP (AVP Code 7) is an Enumerated 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 [RADIUSAttrVals].

4.4.10.2. Framed-Routing AVP ๐Ÿ›ฃ๏ธ

The Framed-Routing AVP (AVP Code 10) is an Enumerated 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 [RADIUSAttrVals].

4.4.10.3. Framed-MTU AVP ๐Ÿ“ฆ

The Framed-MTU AVP (AVP Code 12) is an Unsigned32 that contains the Maximum Transmission Unit (MTU) to be configured for the user, when it is not negotiated by some other means (such as PPP) ๐Ÿ’…. This AVP SHOULD only be present in authorization responses. The MTU value MUST be in the range from 64 to 65535.

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

The Framed-Compression AVP (AVP Code 13) is an Enumerated 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 [RADIUSAttrVals].

4.4.10.5. IP Access Authorization AVPs ๐ŸŒ

The AVPs defined in this section are used when the user requests, or is being granted, access service to IP โœจ.

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

The Framed-IP-Address AVP (AVP Code 8) [RFC2865] 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: 0xFFFFFFFF and 0xFFFFFFFE ๐Ÿ™ˆ. The value 0xFFFFFFFF indicates that the NAS should allow the user to select an address (i.e., negotiated). The value 0xFFFFFFFE indicates that the NAS should select an address for the user (e.g., assigned from a pool of addresses kept by the NAS).

4.4.10.5.2. Framed-IP-Netmask AVP ๐ŸŽญ

The Framed-IP-Netmask AVP (AVP Code 9) is an OctetString that contains the four octets of the IPv4 netmask to be configured for the user when the user is a router to a network ๐ŸŒธ. It MAY be used in an authorization request as a hint to the server that a specific netmask is desired, but the server is not required to honor the hint in the corresponding response. This AVP MUST be present in a response if the request included this AVP with a value of 0xFFFFFFFF ๐Ÿ”ฅ.

4.4.10.5.3. Framed-Route AVP ๐Ÿ—บ๏ธ

The Framed-Route AVP (AVP Code 22) is a UTF8String that contains the 7-bit US-ASCII routing information to be configured for the user on the NAS ๐Ÿ’œ. Zero or more of these AVPs MAY be present in an authorization response.

The string MUST contain a destination prefix in dotted quad form, optionally followed by a slash and a decimal-length specifier stating how many high-order bits of the prefix should be used ๐Ÿง . This is followed by a space, a gateway address in dotted quad form, a space, and one or more metrics separated by spaces. For example:

"192.0.2.0/24 192.0.2.1 1"

The length specifier may be omitted, in which case it should default to 8 bits for class A prefixes, 16 bits for class B prefixes, and 24 bits for class C prefixes. For example:

"192.0.2.0 192.0.2.1 1"

Whenever the gateway address is specified as "0.0.0.0", the IP address of the user SHOULD be used as the gateway address ๐Ÿฆ‹.

4.4.10.5.4. Framed-Pool AVP ๐ŸŠ

The Framed-Pool AVP (AVP Code 88) is an OctetString that contains the name of an assigned address pool that SHOULD be used to assign an address for the user ๐Ÿซง. If a NAS does not support multiple address pools, the NAS SHOULD ignore this AVP. Address pools are usually used for IP addresses, but they can be used for other protocols if the NAS supports pools for those protocols โœจ.

Although it's specified as an OctetString for compatibility with RADIUS [RFC2869], the encoding of the Data field SHOULD also conform to the rules for the UTF8String Data Format ๐Ÿ’….

4.4.10.5.5. Framed-Interface-Id AVP ๐Ÿชช

The Framed-Interface-Id AVP (AVP Code 96) is an Unsigned64 that contains the IPv6 interface identifier to be configured for the user ๐Ÿ’œ. It MAY be used in authorization requests as a hint to the server that a specific interface identifier is desired, but the server is not required to honor the hint in the corresponding response.

4.4.10.5.6. Framed-IPv6-Prefix AVP ๐ŸŒท

The Framed-IPv6-Prefix AVP (AVP Code 97) is an OctetString that contains the IPv6 prefix to be configured for the user ๐ŸŽ€. One or more AVPs MAY be used in authorization requests as a hint to the server that specific IPv6 prefixes are desired, but the server is not required to honor the hint in the corresponding response.

4.4.10.5.7. Framed-IPv6-Route AVP ๐Ÿ›ค๏ธ

The Framed-IPv6-Route AVP (AVP Code 99) is a UTF8String that contains the US-ASCII routing information to be configured for the user on the NAS ๐ŸŒˆ. Zero or more of these AVPs MAY be present in an authorization response.

The string MUST contain an IPv6 address prefix, followed by a slash and a decimal-length specifier stating how many high-order bits of the prefix should be used. This is followed by a space, a gateway address in hexadecimal notation, a space, and one or more metrics separated by spaces. For example:

"2001:db8::/32 2001:db8:106:a00:20ff:fe99:a998 1"

Whenever the gateway address is the IPv6 unspecified address, the IP address of the user SHOULD be used as the gateway address, such as in:

"2001:db8::/32 :: 1"

4.4.10.5.8. Framed-IPv6-Pool AVP ๐Ÿ๏ธ

The Framed-IPv6-Pool AVP (AVP Code 100) is an OctetString that contains the name of an assigned pool that SHOULD be used to assign an IPv6 prefix for the user โœจ. If the access device does not support multiple prefix pools, it MUST ignore this AVP.

Although it's specified as an OctetString for compatibility with RADIUS [RFC3162], the encoding of the Data field SHOULD also conform to the rules for the UTF8String Data Format ๐Ÿซถ.

4.4.10.6. IPX Access AVPs ๐ŸŒŒ

The AVPs defined in this section are used when the user requests, or is being granted, access to an IPX network service [IPX] ๐Ÿ’–.

4.4.10.6.1. Framed-IPX-Network AVP ๐Ÿ’–

okay so the Framed-IPX-Network AVP (AVP Code 23) is an Unsigned32 and it holds the IPX Network number to be configured for the user ๐ŸŽ€ it MAY be sent 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 response ๐Ÿซถ

two addresses are extra special: 0xFFFFFFFF and 0xFFFFFFFE ๐Ÿ‘‘ 0xFFFFFFFF means the NAS should let the user pick an address (aka Negotiated), and 0xFFFFFFFE means the NAS should pick one for the user, like pulling it from a pool of one or more IPX networks that the NAS keeps ๐Ÿงš

4.4.10.7. AppleTalk Network Access AVPs ๐Ÿ“

these AVPs are used when the user asks for, or is getting granted, access to an AppleTalk network [AppleTalk] ๐Ÿฆ‹

the Framed-Appletalk-Link AVP (AVP Code 37) is an Unsigned32 that holds 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 is never used when the user is not another router ๐Ÿ™ˆ

even though the field is 32 bits, values only go 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 given that value as its AppleTalk network number ๐Ÿ’œ

4.4.10.7.2. Framed-Appletalk-Network AVP ๐ŸŒˆ

the Framed-Appletalk-Network AVP (AVP Code 38) is an Unsigned32 that holds the AppleTalk network number the NAS should probe to allocate an AppleTalk node for the user ๐Ÿ”ฅ this AVP MUST only be present in an authorization response and is never used when the user is not another router ๐Ÿ’€ if there are multiple instances of this AVP, it means the NAS may probe using any of the network numbers listed ๐Ÿง 

same deal with the range: values go 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 ๐Ÿฆ„

4.4.10.7.3. Framed-Appletalk-Zone AVP ๐Ÿซง

the Framed-Appletalk-Zone AVP (AVP Code 39) is an OctetString and holds the AppleTalk Default Zone for this user ๐Ÿ’– this AVP MUST only be present in an authorization response ๐Ÿ™Œ multiple instances of this AVP in the same message are not allowed ๐Ÿšซ

the codification of this field's allowed range is outside the scope of this specification ๐Ÿคทโ€โ™€๏ธ

4.4.10.8. AppleTalk Remote Access AVPs ๐Ÿ‘

these AVPs are used when the user asks for, or is getting granted, access to the AppleTalk network through the AppleTalk Remote Access Protocol [ARAP] ๐Ÿ“ž they only show up if the Framed-Protocol AVP (Section 4.4.10.1) is set to ARAP ๐Ÿ’… Section 2.2 of RFC 2869 explains how these attributes get used in practice ๐Ÿ“–

4.4.10.8.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 ๐ŸŒŸ check RFC 2869 for more info on its format ๐Ÿ“š

4.4.10.8.2. ARAP-Zone-Access AVP ๐Ÿฆ‹

the ARAP-Zone-Access AVP (AVP Code 72) is 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 [RADIUSAttrVals] and defined in [RFC2869] ๐ŸŽ€

4.4.11. Non-Framed Access Authorization AVPs ๐ŸŒธ

this section has the authorization AVPs you need to support terminal server functionality ๐Ÿ–ฅ๏ธ AVPs defined in this section MAY be present in a message if the Service-Type AVP was set to "Login" or "Callback Login" ๐Ÿ’…

4.4.11.1. Login-IP-Host AVP ๐Ÿงš

the Login-IP-Host AVP (AVP Code 14) [RFC2865] is an OctetString and holds 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 here: all ones and 0 โœจ all ones means the NAS SHOULD let the user pick an address ๐Ÿ™‹โ€โ™€๏ธ and 0 means the NAS SHOULD pick a host to connect the user to ๐Ÿซถ

4.4.11.2. Login-IPv6-Host AVP ๐Ÿ’ซ

the Login-IPv6-Host AVP (AVP Code 98) [RFC3162] is an OctetString and holds 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: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF and 0 ๐Ÿ‘‘ the first one means the NAS SHOULD let the user pick an address, and 0 means the NAS SHOULD pick a host to connect the user to ๐Ÿ”ฅ

4.4.11.3. Login-Service AVP ๐Ÿ“

the Login-Service AVP (AVP Code 15) is Enumerated and holds 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 RFC 2869 ๐Ÿ“–

4.4.11.4. TCP Services ๐Ÿฆ„

the AVP in the next section MAY be present if the Login-Service AVP is set to Telnet, Rlogin, TCP Clear, or TCP Clear Quiet ๐ŸŒท

4.4.11.4.1. Login-TCP-Port AVP ๐Ÿง 

the Login-TCP-Port AVP (AVP Code 16) is an Unsigned32 and holds the TCP port the user should be connected with 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 ๐Ÿšซ

4.4.11.5. LAT Services ๐Ÿ’…

the AVPs in this section MAY be present if the Login-Service AVP is set to LAT [LAT] ๐ŸŒธ

4.4.11.5.1. Login-LAT-Service AVP โœจ

the Login-LAT-Service AVP (AVP Code 34) is an OctetString and holds the system the user should be connected to by LAT ๐Ÿ–ฅ๏ธ it MAY be used in an authorization request as a hint to the server that a specific service is desired, but the server is not required to honor the hint in the corresponding response ๐Ÿซถ this AVP MUST only be present in the response if the Login-Service AVP says LAT is desired ๐Ÿ™ˆ

admins use this one when they're dealing with clustered systems ๐Ÿ˜๏ธ in those setups, several time-sharing hosts share the same resources (disks, printers, etc.), and admins often set each host up to offer access (service) to each shared resource ๐Ÿ–จ๏ธ so each host in the cluster advertises its services through LAT broadcasts ๐Ÿ“ฃ

sophisticated users usually know which service providers (machines) are faster, so they tend to use a node name when starting a LAT connection ๐ŸŽ๏ธ some admins want particular users on certain machines as a basic form of load balancing (even though LAT can already load balance on its own) โš–๏ธ

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 [ISO.8859-1.1987] ๐ŸŒ all LAT string comparisons are case insensitive ๐Ÿซ 

4.4.11.5.2. Login-LAT-Node AVP ๐Ÿฆ‹

the Login-LAT-Node AVP (AVP Code 35) is an OctetString and holds the Node the user should be automatically connected to by LAT ๐Ÿ’œ it MAY be used in an authorization request as a hint to the server that a specific LAT node is desired, but the server is not required to honor the hint in the corresponding 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 [ISO.8859-1.1987] ๐ŸŒˆ all LAT string comparisons are case insensitive ๐Ÿ’…

4.4.11.5.3. Login-LAT-Group AVP ๐Ÿ‘‘

the Login-LAT-Group AVP (AVP Code 36) is an OctetString and holds a string identifying the LAT group codes this user is authorized to use ๐Ÿ” it MAY be used in an authorization request as a hint to the server that a specific group is desired, but the server is not required to honor the hint in the corresponding 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 it will only accept LAT connections that have those 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 ๐Ÿคทโ€โ™€๏ธ

4.4.11.5.4. Login-LAT-Port AVP ๐ŸŒธ

the Login-LAT-Port AVP (AVP Code 63) is an OctetString and holds the port the user should be connected to by LAT ๐Ÿ”Œ it MAY be used in an authorization request as a hint to the server that a specific port is desired, but the server is not required to honor the hint in the corresponding 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 [ISO.8859-1.1987] ๐ŸŒ

all LAT string comparisons are case insensitive ๐Ÿซ 

4.5. NAS Tunneling AVPs ๐ŸŽ€

okay so bestie, some NASes offer compulsory tunnel services ๐Ÿš‡, where the incoming connection data gets wrapped up with an encapsulation method and shipped off to a gateway somewhere else in the network โœจ. the service user usually doesn't even notice, and the remote Authentication, Authorization, and Accounting server can describe the tunnel characteristics based on the user's authorization info ๐Ÿ’…. you can get several tunnel characteristics back, and the NAS implementation gets to pick one ๐Ÿฆ‹. for more details, check out [RFC2868] and [RFC2867] ๐Ÿ“š.

here's the table of possible flag values for the session-level AVPs, plus whether each AVP MAY be encrypted ๐ŸŒธ:

                                            +----------+
                                            | AVP Flag |
                                            |  Rules   |
                                            |----+-----|
                                            |MUST| MUST|
   Attribute Name          Section Defined  |    | NOT |
   -----------------------------------------|----+-----|
   Tunneling                   4.5.1        | M  |  V  |
   Tunnel-Type                 4.5.2        | M  |  V  |
   Tunnel-Medium-Type          4.5.3        | M  |  V  |
   Tunnel-Client-Endpoint      4.5.4        | M  |  V  |
   Tunnel-Server-Endpoint      4.5.5        | M  |  V  |
   Tunnel-Password             4.5.6        | M  |  V  |
   Tunnel-Private-Group-Id     4.5.7        | M  |  V  |
   Tunnel-Assignment-Id        4.5.8        | M  |  V  |
   Tunnel-Preference           4.5.9        | M  |  V  |
   Tunnel-Client-Auth-Id       4.5.10       | M  |  V  |
   Tunnel-Server-Auth-Id       4.5.11       | M  |  V  |
   -----------------------------------------|----+-----|

4.5.1. Tunneling AVP ๐ŸŒˆ

the Tunneling AVP (AVP Code 401) is a Grouped type ๐Ÿ’– that bundles up the AVPs used to describe a compulsory tunnel service [RFC2868] [RFC2867] ๐Ÿซถ. its data field follows 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 ]

4.5.2. Tunnel-Type AVP ๐Ÿฆ‹

the Tunnel-Type AVP (AVP Code 64) is an Enumerated type that holds the tunneling protocol(s) to be used (if you're the tunnel initiator) or in use (if you're the tunnel terminator) ๐Ÿš€. it MAY be sent in an authorization request as a hint that a specific tunnel type is wanted ๐Ÿ’ญ, but the server is not REQUIRED to honor that hint in the response ๐Ÿ™ˆ.

the Tunnel-Type AVP SHOULD also be included in ACR messages โœจ.

a tunnel initiator is not required to implement any of these tunnel types ๐ŸŒธ. if a tunnel initiator gets a response with only unknown or unsupported tunnel types, it MUST behave as though it received a response with the Result-Code indicating a failure ๐Ÿ’€.

the supported values are listed in [RADIUSAttrVals] ๐Ÿ“‹.

4.5.3. Tunnel-Medium-Type AVP ๐ŸŒŠ

the Tunnel-Medium-Type AVP (AVP Code 65) is an Enumerated type that holds the transport medium to use when creating a tunnel for protocols (like L2TP [RFC3931]) 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 [RADIUSAttrVals] ๐Ÿ“‹.

4.5.4. Tunnel-Client-Endpoint AVP ๐Ÿ’œ

the Tunnel-Client-Endpoint AVP (AVP Code 66) is a UTF8String type that 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 ACR messages, and when it is, it shows the address the tunnel was started from ๐Ÿ“. this AVP, together with the Tunnel-Server-Endpoint (Section 4.5.5) and Session-Id AVPs ([RFC6733], Section 8.8), can give you a globally unique way to identify a tunnel for accounting and auditing ๐Ÿ•ต๏ธโ€โ™€๏ธโœจ.

if the Tunnel-Medium-Type AVP (Section 4.5.3) 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 [RFC3516] ๐Ÿ’ซ. 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 pointing to configuration data local to the Diameter client that describes the interface or medium-specific client address to use ๐ŸŽ€.

heads up, this application handles Internationalized Domain Names (IDNs) the same way the Diameter Base protocol does (see Appendix D of RFC 6733 for details) ๐ŸŒˆ.

4.5.5. Tunnel-Server-Endpoint AVP ๐Ÿ“

the Tunnel-Server-Endpoint AVP (AVP Code 67) is a UTF8String type that holds the address of the server 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 ACR messages, and when it is, it shows the address the tunnel was initiated from ๐Ÿ›ฐ๏ธ. this AVP, together with the Tunnel-Client-Endpoint (Section 4.5.4) and Session-Id AVP ([RFC6733], Section 8.8), can give you a globally unique way to identify a tunnel for accounting and auditing ๐Ÿงพ๐Ÿ’–.

if Tunnel-Medium-Type is IPv4 (1), this string is either the 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), this string is either the FQDN of the tunnel server machine, or a text representation of the address in either the preferred or alternate form [RFC3516]. 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 not IPv4 or IPv6, this string is a tag pointing to configuration data local to the Diameter client that describes the interface or medium-specific server address to use ๐Ÿ—บ๏ธ.

note that this application handles IDNs the same way the Diameter base protocol does (see Appendix D of RFC 6733 for details) ๐ŸŒธ.

4.5.6. Tunnel-Password AVP ๐Ÿ”

the Tunnel-Password AVP (AVP Code 69) is an OctetString type that may contain a password used to authenticate to a remote server ๐Ÿ—๏ธ.

the Tunnel-Password AVP SHOULD NOT be used in untrusted proxy environments without encrypting it using end-to-end security techniques ๐Ÿšจ. this one's a big deal, bestie, so please don't skip the encryption part ๐Ÿ˜ญ.

4.5.7. Tunnel-Private-Group-Id AVP ๐Ÿฆ„

the Tunnel-Private-Group-Id AVP (AVP Code 81) is an OctetString type that holds the group Id for a particular tunneled session ๐Ÿซ‚. the Tunnel-Private-Group-Id AVP MAY be included in an authorization request if the tunnel initiator can work out ahead of time which group a particular connection will land in ๐Ÿ”ฎ. it SHOULD be included in the authorization response if this tunnel session is supposed to be treated as belonging to a particular private group ๐ŸŽฏ. private groups can be used to link a tunneled session with a particular 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 ACR messages that relate to the tunneled session ๐Ÿ’Œ.

4.5.8. Tunnel-Assignment-Id AVP ๐ŸŒท

the Tunnel-Assignment-Id AVP (AVP Code 82) is an OctetString type used to tell the tunnel initiator which particular tunnel a session should be assigned to ๐ŸŽ€. some tunneling protocols, like PPTP [RFC2637] and L2TP [RFC3931], let sessions between the same two tunnel endpoints get multiplexed over one tunnel, and also let a given session use its own dedicated tunnel ๐Ÿงƒ. this attribute gives Diameter a way to tell the tunnel initiator (for example, a LAC) whether to put the session into a multiplexed tunnel or a separate one ๐Ÿ”€. it also lets sessions sharing multiplexed tunnels get assigned to different multiplexed tunnels ๐Ÿฆ‹.

a particular tunneling implementation may give different characteristics to particular tunnels ๐Ÿ’ซ. for example, different tunnels may get different QoS parameters โšก. those tunnels may carry either individual or multiple sessions ๐Ÿ‘ญ. so the Tunnel-Assignment-Id attribute lets the Diameter server say that a particular session should go on a tunnel with the right level of service ๐Ÿ‘‘. any QoS-related Diameter tunneling attributes defined in the future that come along with this one are expected to be tied to the tunnel initiator through the Id given by this attribute ๐Ÿ”—. until then, whatever a 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 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 ๐Ÿ“จ. the tunnel initiator that gets this attribute MAY choose to ignore it and assign the session to any multiplexed or non-multiplexed tunnel between the desired endpoints ๐Ÿคทโ€โ™€๏ธ. this 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 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 the 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 ones established 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 (that is, one initiated by a session specifying this AVP) ๐Ÿšซ.

note that the same Id may be used to name different tunnels if those tunnels are between different endpoints โœจ.

4.5.9. Tunnel-Preference AVP

okay bestie ๐ŸŽ€ the Tunnel-Preference AVP (AVP Code 83) is an Unsigned32, and its whole job is to show the relative preference for each tunnel when you get more than one set of tunneling AVPs coming back in separate grouped AVPs ๐Ÿซถ. It MAY be sent in an authorization request as a hint that a specific preference is wanted, but the server is not required to honor that hint in the corresponding response ๐Ÿ’….

picture this ๐Ÿงš: the server sends back two tunnels, one with a tunnel type of PPTP and the other with a tunnel type of L2TP ๐ŸŒˆ. If the tunnel initiator only supports one of the returned tunnel types, it's giving simple, it starts a tunnel of that type ๐Ÿฆ‹. But if it supports both protocols, it SHOULD use the value of the Tunnel-Preference AVP to decide which tunnel gets started ๐Ÿ‘‘. The tunnel with the lowest numerical value in the Value field of this AVP SHOULD be given the highest preference โœจ. Two or more instances of the Tunnel-Preference AVP inside one authorization response MAY have identical values ๐ŸŒธ. When they do, the tunnel initiator SHOULD use locally configured metrics to decide which set of AVPs to use ๐Ÿ’œ.

4.5.10. Tunnel-Client-Auth-Id AVP

the Tunnel-Client-Auth-Id AVP (AVP Code 90) is a UTF8String, and it specifies the 7-bit US-ASCII name the tunnel initiator uses during the authentication phase of tunnel establishment ๐Ÿ”. 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 desired ๐Ÿ™ˆ. This AVP SHOULD be included in the ACR messages pertaining to the tunneled session ๐Ÿ’….

4.5.11. Tunnel-Server-Auth-Id AVP

the Tunnel-Server-Auth-Id AVP (AVP Code 91) is a UTF8String, and it specifies the 7-bit US-ASCII name the tunnel terminator uses during the authentication phase of tunnel establishment ๐Ÿฆ‹. 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 desired ๐Ÿ‘‘. This AVP SHOULD be included in the ACR messages pertaining to the tunneled session ๐ŸŒˆ.

4.6. NAS Accounting AVPs

applications that implement this specification use Diameter Accounting ([RFC6733] is the one to read ๐Ÿ“–) along with the AVPs in the following section ๐Ÿ’–. Service-specific AVP usage is defined in the tables in Section 5 ๐Ÿ“.

if accounting is active, Accounting Request (ACR) messages SHOULD be sent after the completion of any Authentication or Authorization transaction, and again at the end of a session ๐Ÿซถ. The value of the Accounting-Record-Type AVP [RFC6733] tells you the type of event ๐Ÿ”ฅ. Every other AVP identifies the session and gives extra info about the event ๐Ÿงš.

the successful completion of 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 ๐Ÿ˜ญ.

the table below shows the possible flag values for the session-level AVPs and whether the AVP MAY be encrypted ๐ŸŒธ.

                                            +----------+
                                            | AVP Flag |
                                            |  Rules   |
                                            |----+-----|
                                    Section |MUST| MUST|
   Attribute Name                   Defined |    |  NOT|
   -----------------------------------------|----+-----|
   Accounting-Input-Octets           4.6.1  | M  |  V  |
   Accounting-Output-Octets          4.6.2  | M  |  V  |
   Accounting-Input-Packets          4.6.3  | M  |  V  |
   Accounting-Output-Packets         4.6.4  | M  |  V  |
   Acct-Session-Time                 4.6.5  | M  |  V  |
   Acct-Authentic                    4.6.6  | M  |  V  |
   Accounting-Auth-Method            4.6.7  | M  |  V  |
   Acct-Delay-Time                   4.6.8  | M  |  V  |
   Acct-Link-Count                   4.6.9  | M  |  V  |
   Acct-Tunnel-Connection            4.6.10 | M  |  V  |
   Acct-Tunnel-Packets-Lost          4.6.11 | M  |  V  |
   -----------------------------------------|----+-----|

4.6.1. Accounting-Input-Octets AVP

the Accounting-Input-Octets AVP (AVP Code 363) is an Unsigned64 that contains the number of octets received from the user ๐Ÿ“ฅ.

for NAS usage, this AVP shows how many octets have been received from the port during this session ๐Ÿ’–. It can only be present in ACR messages whose Accounting-Record-Type [RFC6733] is INTERIM_RECORD or STOP_RECORD โœจ.

4.6.2. Accounting-Output-Octets AVP

the Accounting-Output-Octets AVP (AVP Code 364) is an Unsigned64 that contains the number of octets sent to the user ๐Ÿ“ค.

for NAS usage, this AVP shows how many octets have been sent to the port during this session ๐ŸŒˆ. It can only be present in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD ๐Ÿ’….

4.6.3. Accounting-Input-Packets AVP

The Accounting-Input-Packets (AVP Code 365) is an Unsigned64 that contains the number of packets received from the user ๐Ÿ“ฆ.

for NAS usage, this AVP shows how many packets have been received from the port over the course of a session provided to a Framed User ๐Ÿฆ‹. It can only be present in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD ๐Ÿซถ.

4.6.4. Accounting-Output-Packets AVP

The Accounting-Output-Packets (AVP Code 366) is an Unsigned64 that contains the number of IP packets sent to the user ๐Ÿ“จ.

for NAS usage, this AVP shows how many packets have been sent to the port over the course of a session provided to a Framed User ๐Ÿ‘‘. It can only be present in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD โœจ.

4.6.5. Acct-Session-Time AVP

the Acct-Session-Time AVP (AVP Code 46) is an Unsigned32 that shows the length of the current session in seconds โฐ. It can only be present in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD ๐Ÿ’œ.

4.6.6. Acct-Authentic AVP

the Acct-Authentic AVP (AVP Code 45) is an Enumerated that specifies how the user was authenticated ๐Ÿ”. The supported values are listed in [RADIUSAttrVals] ๐Ÿ“‹.

4.6.7. Accounting-Auth-Method AVP

the Accounting-Auth-Method AVP (AVP Code 406) is an Enumerated. A NAS MAY include this AVP in an Accounting-Request message to show the method used to authenticate the user ๐Ÿซถ. (Fun fact ๐Ÿค“: this AVP is semantically equivalent to the Microsoft MS-Acct-Auth-Type vendor-specific RADIUS attribute [RFC2548], and the supported values are identical ๐Ÿ’–.)

4.6.8. Acct-Delay-Time AVP

the Acct-Delay-Time AVP (AVP Code 41) is an Unsigned32 that shows the number of seconds the Diameter client has been trying to send the Accounting-Request (ACR) โณ. The accounting server may subtract this value from the time the ACR arrives at the server to estimate when the event that caused the ACR happened ๐Ÿงš.

this AVP is not used for retransmissions at the transport level (TCP or SCTP) ๐Ÿšซ. Instead, it may be used when an ACR command can't be transmitted because there's no appropriate peer to send it to, or because it was rejected since it couldn't be delivered ๐Ÿ“ฎ. In those cases, the command MAY be buffered and sent later, when an appropriate peer connection is available, or after enough time has passed that the destination host may be reachable and operational ๐ŸŒธ. If the ACR is re-sent this way, the Acct-Delay-Time AVP SHOULD be included ๐Ÿ’…. Its value is the number of seconds that passed between the first transmission attempt and the current one ๐Ÿฆ‹.

the Acct-Link-Count AVP (AVP Code 51) is an Unsigned32 that shows the total number of links that have been active (current or closed) in a given multilink session when the accounting record is generated ๐Ÿ”—. This AVP MAY be included in Accounting-Request AVPs for any session that may be part of a multilink service ๐Ÿ’–.

the Acct-Link-Count AVP can make it easier for an accounting server to know when it has every record for a given multilink service ๐Ÿ™Œ. When the number of Accounting-Request AVPs received with Accounting-Record-Type = STOP_RECORD, sharing the same Acct-Multi-Session-Id and unique Session-Id AVPs, equals the largest Acct-Link-Count value seen in those Accounting-Request AVPs, then every STOP_RECORD Accounting-Request AVP for that multilink service has arrived ๐ŸŽ‰.

the example below has eight Accounting-Request AVPs and shows how Acct-Link-Count works ๐Ÿงฉ. The table only lists the relevant AVPs, though more AVPs with accounting info will be in the Accounting-Requests AVPs ๐Ÿ“Š.

   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

4.6.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 (Section 4.5.4) and Tunnel-Server-Endpoint (Section 4.5.5) AVPs, may be used to uniquely identify a tunnel session for auditing ๐Ÿ•ต๏ธโ€โ™€๏ธ.

the format of the identifier in this AVP depends on the value of the Tunnel-Type AVP (Section 4.5.2) ๐ŸŽ€. For example, to fully identify an L2TP tunnel connection, the L2TP Tunnel Id and Call Id might be encoded in this field ๐ŸŒท. The exact encoding of this field is implementation dependent ๐Ÿคทโ€โ™€๏ธ.

4.6.11. Acct-Tunnel-Packets-Lost AVP

the Acct-Tunnel-Packets-Lost AVP (AVP Code 86) is an Unsigned32 that contains the number of packets lost on a given tunnel ๐Ÿ“‰.

5. AVP Occurrence Tables โœจ

the tables below show the AVPs used by NAS applications in NAS messages, and say which Diameter messages they may or may not be present in ๐Ÿ“‹. Messages and AVPs defined in the Diameter Base protocol [RFC6733] aren't described in this document ๐Ÿ“–. Note that AVPs that can only be present within a grouped AVP are not represented in these tables ๐Ÿง.

the tables use these 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    Exactly one instance of the AVP MUST be present in the
        message.

5.1. AA-Request / AA-Answer AVP Table

okay so this table is giving "which AVPs show up in which messages" ๐Ÿ’… and it's limited to the Command Codes defined in this spec ๐ŸŽ€

                                 +-----------+
                                 |  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   |
   ------------------------------|-----+-----+

5.2. Accounting AVP Tables

these tables are the receipts ๐Ÿงพโœจ they show which AVPs defined in this doc should be there (and get used) in NAS application Accounting messages. these AVPs are defined here, but also in [RFC6733] and [RFC2866] ๐Ÿฆ‹

5.2.1. Framed Access Accounting AVP Table

this table is for when the Service-Type AVP (Section 4.4.1) says 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 |
   ---------------------------------------|-----+-----+

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

okay bestie, this table is the one you use when the Service-Type AVP (Section 4.4.1) says Non-Framed Access ๐Ÿ’… Same vibe as the last one, just for a different kind of access ๐Ÿฆ‹

                                          +-----------+
                                          |  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 |
   ---------------------------------------|-----+-----+

6. Unicode Considerations ๐ŸŒˆ

okay so a bunch of the AVPs in this RFC use the UTF8String type from the Diameter Base protocol [RFC6733] ๐Ÿซถ and here's the tea ๐Ÿต different implementations can process the same Unicode input characters and end up with UTF-8 strings that don't match when you compare them ๐Ÿ˜ญ That can cause interoperability problems between a network access server and a Diameter server, especially when a UTF-8 string typed in locally gets compared with one that came in over Diameter. The good news is that a lot of the UTF8String uses in this RFC are limited to the 7-bit US-ASCII-compatible subset of UTF-8, and that class of comparison drama just doesn't happen there ๐Ÿ’–

Careful preparation of Unicode strings can make comparisons work the way typical users around the world expect โœจ [RFC3454] is an example a framework for that kind of Unicode string preparation. The Diameter application in this RFC has already been deployed using Unicode in line with [RFC4005], which does not require any Unicode string preparation. So adding extra requirements for Unicode string preparation here wouldn't be backwards compatible with what people are already doing ๐Ÿ™ˆ

The Diameter server and the network access servers it serves can be assumed to be under common administrative control, and all of the UTF-8 strings involved are part of the configuration of those servers. So the administrative interfaces for implementations of this RFC:

  • a. SHOULD accept direct UTF-8 input of all configuration strings for AVPs that allow Unicode characters beyond the 7-bit US-ASCII-compatible subset of Unicode (in addition to any provisions for accepting Unicode characters for processing into UTF-8), and
  • b. SHOULD make all such configuration strings available as UTF-8 strings.

This is the glow-up ๐Ÿฆ‹ It lets an admin who runs into a Unicode comparison problem copy one instance of a problematic UTF-8 string from one server to the other, and then the two (now identical) copies should compare as expected ๐ŸŽ€


7. IANA Considerations ๐Ÿงš

Several of the namespaces used in this document are managed by the Internet Assigned Numbers Authority [IANA], including the AVP Codes [AVP-Codes], AVP Specific Values [AVP-Vals], Application IDs [App-Ids], Command Codes [Command-Codes], and RADIUS Attribute Values [RADIUSAttrVals].

For the current values allocated, and the policies governing allocation in those namespaces, check out the above-referenced registries ๐Ÿ“


8. Security Considerations ๐Ÿ’€

okay this part is SERIOUS bestie ๐Ÿ˜ญ Please read it properly.

This document describes the extension of Diameter for the NAS application. Security considerations regarding the Diameter protocol itself are discussed in [RFC6733]. Use of this application of Diameter MUST take into consideration the security issues and requirements of the Base protocol.

8.1. Authentication Considerations ๐Ÿ”

This document does not contain a security protocol, but it does discuss how PPP authentication protocols can be carried within the Diameter protocol. The PPP authentication protocols described are PAP and CHAP.

The use of PAP SHOULD be discouraged, as it exposes users' passwords to possibly non-trusted entities ๐Ÿ™ˆ However, PAP is also frequently used with one-time passwords, which do not expose a security risk.

This document also describes how CHAP can be carried within the Diameter protocol, which is required for RADIUS backward compatibility. The CHAP protocol, as used in a RADIUS environment, facilitates authentication replay attacks ๐Ÿ’”

The use of the EAP authentication protocols [RFC4072] can offer better security, given a method suitable for the circumstances โœจ

Depending on the value of the Auth-Request-Type AVP, the Diameter protocol allows authorization-only requests that contain no authentication information from the client. This capability goes beyond the Call Check capabilities provided by RADIUS (Section 5.6 of [RFC2865]) in that no access decision is requested. As a result, a new session cannot be started as a result of a response to an authorization-only request without introducing a significant security vulnerability ๐Ÿšจ

8.2. AVP Considerations ๐Ÿ›ก๏ธ

Diameter AVPs often contain security-sensitive data, for example user passwords and location data, network addresses and cryptographic keys. With the exception of the Configuration-Token (Section 4.4.8), QoS-Filter-Rule (Section 4.4.9), and Tunneling (Section 4.5.1) AVPs, all of the AVPs defined in this document are considered to be security-sensitive.

Diameter messages containing any AVPs considered to be security-sensitive MUST only be sent protected via mutually authenticated TLS or IPsec. In addition, those messages MUST NOT be sent via intermediate nodes unless there is end-to-end security between the originator and recipient, or the originator has locally trusted configuration that indicates that end-to-end security is not needed. For example, end-to-end security may not be required in the case where an intermediary node is known to be operated as part of the same administrative domain as the endpoints, so that an ability to successfully compromise the intermediary would imply a high probability of being able to compromise the endpoints as well. Note that no end-to-end security mechanism is specified in this document ๐Ÿซฃ


9. References ๐Ÿ“š

9.1. Normative References

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

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

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

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

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

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

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

[RFC5234]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
           Specifications: ABNF", STD 68, RFC 5234, January 2008.

[RFC5777]  Korhonen, J., Tschofenig, H., Arumaithurai, M., Jones, M.,
           and A. Lior, "Traffic Classification and Quality of
           Service (QoS) Attributes for Diameter", RFC 5777, February
           2010.

[RFC6733]  Fajardo, V., Arkko, J., Loughney, J., and G. Zorn,
           "Diameter Base Protocol", RFC 6733, October 2012.

9.2. Informative References โœจ

okay bestie, these are the informative refs ๐Ÿ“š they're not required reading to implement this, but they're the receipts for everything the doc is built on ๐Ÿงพ๐Ÿ’…

  • [ARAP] Apple Computer, "Apple Remote Access Protocol (ARAP) Version 2.0 External Reference Specification", R0612LL/B, September 1994. ๐ŸŽ
  • [AVP-Codes] IANA, "AVP Codes", <http://www.iana.org/assignments/aaa-parameters/>. ๐Ÿ—‚๏ธ
  • [AVP-Vals] IANA, "AVP Specific Values", <http://www.iana.org/assignments/aaa-parameters/>. ๐Ÿ”ข
  • [App-Ids] IANA, "Application IDs", <http://www.iana.org/assignments/aaa-parameters/>. ๐Ÿ†”
  • [AppleTalk] Sidhu, G., Andrews, R., and A. Oppenheimer, "Inside AppleTalk", Second Edition Apple Computer, 1990. ๐Ÿ
  • [BASE] Calhoun, P., Loughney, J., Guttman, E., Zorn, G., and J. Arkko, "Diameter Base Protocol", RFC 3588, September 2003. ๐Ÿงฑ
  • [Command-Codes] IANA, "Command Codes", <http://www.iana.org/assignments/aaa-parameters/>. โŒจ๏ธ
  • [IANA] IANA, "Internet Assigned Numbers Authority", <http://www.iana.org/>. ๐Ÿ›๏ธ
  • [IPX] Novell, Inc., "NetWare System Technical Interface Overview", #883-000780-001, June 1989. ๐ŸŒ
  • [ISO.8859-1.1987] International Organization for Standardization, "Information technology - 8-bit single byte coded graphic - character sets - Part 1: Latin alphabet No. 1, JTC1/ SC2", ISO Standard 8859-1, 1987. ๐Ÿ”ค
  • [LAT] Digital Equipment Corp., "Local Area Transport (LAT) Specification V5.0", AA-NL26A-TE, June 1989. ๐Ÿ–ฅ๏ธ
  • [RADIUSAttrVals] IANA, "Radius Attribute Values", <http://www.iana.org/assignments/radius-types/>. ๐Ÿ“‡
  • [RFC1334] Lloyd, B. and W. Simpson, "PPP Authentication Protocols", RFC 1334, October 1992. ๐Ÿ”
  • [RFC1661] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51, RFC 1661, July 1994. ๐Ÿ”Œ
  • [RFC1990] Sklower, K., Lloyd, B., McGregor, G., Carr, D., and T. Coradetti, "The PPP Multilink Protocol (MP)", RFC 1990, August 1996. ๐Ÿงต
  • [RFC2474] 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. ๐Ÿท๏ธ
  • [RFC2548] Zorn, G., "Microsoft Vendor-specific RADIUS Attributes", RFC 2548, March 1999. ๐ŸชŸ
  • [RFC2597] Heinanen, J., Baker, F., Weiss, W., and J. Wroclawski, "Assured Forwarding PHB Group", RFC 2597, June 1999. ๐Ÿšฆ
  • [RFC2637] Hamzeh, K., Pall, G., Verthein, W., Taarud, J., Little, W., and G. Zorn, "Point-to-Point Tunneling Protocol", RFC 2637, July 1999. ๐Ÿš‡
  • [RFC2866] Rigney, C., "RADIUS Accounting", RFC 2866, June 2000. ๐Ÿงพ
  • [RFC2867] Zorn, G., Aboba, B., and D. Mitton, "RADIUS Accounting Modifications for Tunnel Protocol Support", RFC 2867, June 2000. ๐Ÿ› ๏ธ
  • [RFC2868] Zorn, G., Leifer, D., Rubens, A., Shriver, J., Holdrege, M., and I. Goyret, "RADIUS Attributes for Tunnel Protocol Support", RFC 2868, June 2000. ๐ŸŽ€
  • [RFC2869] Rigney, C., Willats, W., and P. Calhoun, "RADIUS Extensions", RFC 2869, June 2000. โœจ
  • [RFC2881] Mitton, D. and M. Beadles, "Network Access Server Requirements Next Generation (NASREQNG) NAS Model", RFC 2881, July 2000. ๐Ÿฐ
  • [RFC2989] Aboba, B., Calhoun, P., Glass, S., Hiller, T., McCann, P., Shiino, H., Walsh, P., Zorn, G., Dommety, G., Perkins, C., Patil, B., Mitton, D., Manning, S., Beadles, M., Chen, X., Sivalingham, S., Hameed, A., Munson, M., Jacobs, S., Lim, B., Hirschman, B., Hsu, R., Koo, H., Lipford, M., Campbell, E., Xu, Y., Baba, S., and E. Jaques, "Criteria for Evaluating AAA Protocols for Network Access", RFC 2989, November 2000. ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘
  • [RFC3169] Beadles, M. and D. Mitton, "Criteria for Evaluating Network Access Server Protocols", RFC 3169, September 2001. ๐Ÿ“‹
  • [RFC3246] Davie, B., Charny, A., Bennet, J., 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. ๐Ÿš€
  • [RFC3454] Hoffman, P. and M. Blanchet, "Preparation of Internationalized Strings ("stringprep")", RFC 3454, December 2002. ๐ŸŒ
  • [RFC3580] 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. ๐Ÿ”‘
  • [RFC3931] Lau, J., Townsley, M., and I. Goyret, "Layer Two Tunneling Protocol - Version 3 (L2TPv3)", RFC 3931, March 2005. ๐Ÿ•ณ๏ธ
  • [RFC4005] Calhoun, P., Zorn, G., Spence, D., and D. Mitton, "Diameter Network Access Server Application", RFC 4005, August 2005. ๐Ÿ’ซ
  • [RFC4072] Eronen, P., Hiller, T., and G. Zorn, "Diameter Extensible Authentication Protocol (EAP) Application", RFC 4072, August 2005. ๐Ÿชช
  • [RFC4301] Kent, S. and K. Seo, "Security Architecture for the Internet Protocol", RFC 4301, December 2005. ๐Ÿ›ก๏ธ
  • [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008. ๐Ÿ”’

Appendix A. Acknowledgements ๐Ÿซถ

A.1. This Document

okay so the vast majority of the text here was lifted straight from RFC 4005 ๐Ÿฅน the editor is so grateful to those authors, and especially Dave Mitton, who somehow got nroff to paginate the AVP Occurance Tables correctly ๐Ÿ˜ญ๐Ÿ‘‘

big thank-you to Jai-Jin Lim, Liu Hans, Sebastien Decugis, Jouni Korhonen, Mark Jones, Hannes Tschofenig, Dave Crocker, David Black, Barry Leiba, Peter Saint-Andre, Stefan Winter, and Lionel Morand for their useful reviews and helpful comments ๐Ÿ’– (listed in no particular order, bc they all slay equally ๐Ÿ’…)

A.2. RFC 4005

the authors wanna shout out Carl Rigney, Allan C. Rubens, William Allen Simpson, and Steve Willens for their work on the original RADIUS protocol ๐Ÿงš, since a lot of the concepts here came from that. thanks also to Carl Rigney for [RFC2866] and [RFC2869]; Ward Willats for [RFC2869]; Glen Zorn, Bernard Aboba, and Dave Mitton for [RFC2867] and [RFC3162]; and Dory Leifer, John Shriver, Matt Holdrege, Allan Rubens, Glen Zorn, and Ignacio Goyret for their work on [RFC2868] ๐ŸŽ€

this doc totally borrowed text and concepts from both [RFC2868] and [RFC2869] (iykyk ๐Ÿ™ˆ). and Carl Williams gets a huge hug for the IPv6-specific text ๐ŸŒˆ

the authors also wanna acknowledge these people for their contributions to developing 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 effort on this doc happened while he was working there ๐Ÿ’ผ


Author's Address ๐Ÿ“ฎ

Glen Zorn (editor)
Network Zen
227/358 Thanon Sanphawut
Bang Na, Bangkok  10260
Thailand

Phone: +66 (0)8-1000-4155
EMail: glenzorn@gmail.com
๐Ÿ“ฆ where this page comes from