Tech-invite3GPPspaceIETFspace
96959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 4005

Diameter Network Access Server Application

Pages: 85
Obsoleted by:  7155
Part 3 of 4 – Pages 44 to 71
First   Prev   Next

ToP   noToC   RFC4005 - Page 44   prevText

7. NAS Tunneling

Some NASes support compulsory tunnel services in which the incoming connection data is conveyed by an encapsulation method to a gateway elsewhere in the network. This is typically transparent to the service user, and the tunnel characteristics may be described by the remote AAA server, based on the user's authorization information. Several tunnel characteristics may be returned, and the NAS implementation may choose one [RADTunnels], [RADTunlAcct]. +---------------------+ | AVP Flag rules | |----+-----+----+-----|----+ AVP Section | | |SHLD| MUST| | Attribute Name Code Defined Value Type |MUST| MAY | NOT| NOT |Encr| -----------------------------------------|----+-----+----+-----|----| Tunneling 401 7.1 Grouped | M | P | | V | N | Tunnel-Type 64 7.2 Enumerated | M | P | | V | Y | Tunnel-Medium- 65 7.3 Enumerated | M | P | | V | Y | Type | | | | | | Tunnel-Client- 66 7.4 UTF8String | M | P | | V | Y | Endpoint | | | | | | Tunnel-Server- 67 7.5 UTF8String | M | P | | V | Y | Endpoint | | | | | | Tunnel-Password 69 7.6 OctetString| M | P | | V | Y | Tunnel-Private- 81 7.7 OctetString| M | P | | V | Y | Group-Id | | | | | | Tunnel- 82 7.8 OctetString| M | P | | V | Y | Assignment-Id | | | | | | Tunnel-Preference 83 7.9 Unsigned32 | M | P | | V | Y | Tunnel-Client- 90 7.10 UTF8String | M | P | | V | Y | Auth-Id | | | | | | Tunnel-Server- 91 7.11 UTF8String | M | P | | V | Y | Auth-Id | | | | | | -----------------------------------------|----+-----+----+-----|----|

7.1. Tunneling AVP

The Tunneling AVP (AVP Code 401) is of type Grouped and contains the following AVPs, used to describe a compulsory tunnel service: [RADTunnels], [RADTunlAcct]. Its data field has the following ABNF grammar:
ToP   noToC   RFC4005 - Page 45
      Tunneling     ::= < AVP Header: 401 >
                        { Tunnel-Type }
                        { Tunnel-Medium-Type }
                        { Tunnel-Client-Endpoint }
                        { Tunnel-Server-Endpoint }
                        [ Tunnel-Preference ]
                        [ Tunnel-Client-Auth-Id ]
                        [ Tunnel-Server-Auth-Id ]
                        [ Tunnel-Assignment-Id ]
                        [ Tunnel-Password ]
                        [ Tunnel-Private-Group-Id ]

7.2. Tunnel-Type AVP

The Tunnel-Type AVP (AVP Code 64) is of type Enumerated and contains the tunneling protocol(s) to be used (in the case of a tunnel initiator) or in use (in the case of a tunnel terminator). It MAY be used in an authorization request as a hint to the server that a specific tunnel type is desired, but the server is not required to honor the hint in the corresponding response. The Tunnel-Type AVP SHOULD also be included in Accounting-Request messages. A tunnel initiator is not required to implement any of these tunnel types. If a tunnel initiator receives a response that contains only unknown or unsupported Tunnel-Types, the tunnel initiator MUST behave as though a response were received with the Result-Code indicating a failure. The supported values are listed in [RADIUSTypes]. The following list is informational: 1 Point-to-Point Tunneling Protocol (PPTP) 2 Layer Two Forwarding (L2F) 3 Layer Two Tunneling Protocol (L2TP) 4 Ascend Tunnel Management Protocol (ATMP) 5 Virtual Tunneling Protocol (VTP) 6 IP Authentication Header in the Tunnel-mode (AH) 7 IP-in-IP Encapsulation (IP-IP) 8 Minimal IP-in-IP Encapsulation (MIN-IP-IP) 9 IP Encapsulating Security Payload in the Tunnel-mode (ESP) 10 Generic Route Encapsulation (GRE) 11 Bay Dial Virtual Services (DVS) 12 IP-in-IP Tunneling 13 Virtual LANs (VLAN)
ToP   noToC   RFC4005 - Page 46

7.3. Tunnel-Medium-Type AVP

The Tunnel-Medium-Type AVP (AVP Code 65) is of type Enumerated and contains the transport medium to use when creating a tunnel for protocols (such as L2TP) that can operate over multiple transports. It MAY be used in an authorization request as a hint to the server that a specific medium is desired, but the server is not required to honor the hint in the corresponding response. The supported values are listed in [RADIUSTypes]. The following list is informational: 1 IPv4 (IP version 4) 2 IPv6 (IP version 6) 3 NSAP 4 HDLC (8-bit multidrop) 5 BBN 1822 6 802 (includes all 802 media plus Ethernet "canonical format") 7 E.163 (POTS) 8 E.164 (SMDS, Frame Relay, ATM) 9 F.69 (Telex) 10 X.121 (X.25, Frame Relay) 11 IPX 12 Appletalk 13 Decnet IV 14 Banyan Vines 15 E.164 with NSAP format subaddress

7.4. Tunnel-Client-Endpoint AVP

The Tunnel-Client-Endpoint AVP (AVP Code 66) is of type UTF8String and contains the address of the initiator end of the tunnel. It MAY be used in an authorization request as a hint to the server that a specific endpoint is desired, but the server is not required to honor the hint in the corresponding response. This AVP SHOULD be included in the corresponding Accounting-Request messages, in which case it indicates the address from which the tunnel was initiated. This AVP, along with the Tunnel-Server- Endpoint and Session-Id AVP [BASE], MAY be used to provide a globally unique means to identify a tunnel for accounting and auditing purposes. If Tunnel-Medium-Type is IPv4 (1), then this string is either the fully qualified domain name (FQDN) of the tunnel client machine, or a
ToP   noToC   RFC4005 - Page 47
   "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), then this string is either the
   FQDN of the tunnel client machine, or a text representation of the
   address in either the preferred or alternate form [IPv6Addr].
   Conforming implementations MUST support the preferred form and SHOULD
   support both the alternate text form and the FQDN format for IPv6
   addresses.

   If Tunnel-Medium-Type is neither IPv4 nor IPv6, then this string is a
   tag referring to configuration data local to the Diameter client that
   describes the interface or medium-specific client address to use.

7.5. Tunnel-Server-Endpoint AVP

The Tunnel-Server-Endpoint AVP (AVP Code 67) is of type UTF8String and contains the address of the server end of the tunnel. It MAY be used in an authorization request as a hint to the server that a specific endpoint is desired, but the server is not required to honor the hint in the corresponding response. This AVP SHOULD be included in the corresponding Accounting-Request messages, in which case it indicates the address from which the tunnel was initiated. This AVP, along with the Tunnel-Client- Endpoint and Session-Id AVP [BASE], MAY be used to provide a globally unique means to identify a tunnel for accounting and auditing purposes. If Tunnel-Medium-Type is IPv4 (1), then this string is either the fully qualified domain name (FQDN) of the tunnel server machine, or a "dotted-decimal" IP address. Implementations MUST support the dotted-decimal format and SHOULD support the FQDN format for IP addresses. If Tunnel-Medium-Type is IPv6 (2), then 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 [IPv6Addr]. Implementations MUST support the preferred form and SHOULD support both the alternate text form and the FQDN format for IPv6 addresses. If Tunnel-Medium-Type is not IPv4 or IPv6, this string is a tag referring to configuration data local to the Diameter client that describes the interface or medium-specific server address to use.
ToP   noToC   RFC4005 - Page 48

7.6. Tunnel-Password AVP

The Tunnel-Password AVP (AVP Code 69) is of type OctetString and may contain a password to be used to authenticate to a remote server. The Tunnel-Password AVP contains sensitive information. This value is not protected in the same manner as RADIUS [RADTunnels]. As required in [BASE], Diameter messages are encrypted by using IPsec or TLS. The Tunnel-Password AVP SHOULD NOT be used in untrusted proxy environments without encrypting it by using end-to-end security techniques, such as CMS Security [DiamCMS].

7.7. Tunnel-Private-Group-Id AVP

The Tunnel-Private-Group-Id AVP (AVP Code 81) is of type OctetString and contains 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 predetermine the group resulting from a particular connection. It SHOULD be included in the authorization response if this tunnel session is to be treated as belonging to a particular private group. Private groups may be used to associate a tunneled session with a particular group of users. For example, it MAY be used to facilitate routing of unregistered IP addresses through a particular interface. This AVP SHOULD be included in the Accounting-Request messages that pertain to the tunneled session.

7.8. Tunnel-Assignment-Id AVP

The Tunnel-Assignment-Id AVP (AVP Code 82) is of type OctetString and is used to indicate to the tunnel initiator the particular tunnel to which a session is to be assigned. Some tunneling protocols, such as [PPTP] and [L2TP], allow for sessions between the same two tunnel endpoints to be multiplexed over the same tunnel and also for a given session to use its own dedicated tunnel. This attribute provides a mechanism for Diameter to inform the tunnel initiator (e.g., PAC, LAC) whether to assign the session to a multiplexed tunnel or to a separate tunnel. Furthermore, it allows for sessions sharing multiplexed tunnels to be assigned to different multiplexed tunnels. A particular tunneling implementation may assign differing characteristics to particular tunnels. For example, different tunnels may be assigned different QoS parameters. Such tunnels may be used to carry either individual or multiple sessions. The Tunnel-Assignment-Id attribute thus allows the Diameter server to indicate that a particular session is to be assigned to a tunnel providing an appropriate level of service. It is expected that any QoS-related Diameter tunneling attributes defined in the future
ToP   noToC   RFC4005 - Page 49
   accompanying this one will be associated by the tunnel initiator with
   the Id given by this attribute.  In the meantime, any semantic given
   to a particular Id string is a matter left to local configuration in
   the tunnel initiator.

   The Tunnel-Assignment-Id AVP is of significance only to Diameter and
   the tunnel initiator.  The Id it specifies is only intended to be of
   local use to Diameter and the tunnel initiator.  The Id assigned by
   the tunnel initiator is not conveyed to the tunnel peer.

   This attribute MAY be included in authorization responses.  The
   tunnel initiator receiving this attribute MAY choose to ignore it and
   to assign the session to an arbitrary multiplexed or non-multiplexed
   tunnel between the desired endpoints.  This AVP SHOULD also be
   included in the Accounting-Request messages pertaining to the
   tunneled session.

   If a tunnel initiator supports the Tunnel-Assignment-Id AVP, then it
   should assign a session to a tunnel in the following manner:

      -  If this AVP is present and a tunnel exists between the
         specified endpoints with the specified Id, then 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, then 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, then the session is assigned to an
         unnamed tunnel.  If an unnamed tunnel does not yet exist
         between the specified endpoints, then it is established and
         used for this session and for subsequent ones established
         without the Tunnel-Assignment-Id attribute.  A tunnel initiator
         MUST NOT assign a session for which a Tunnel-Assignment-Id AVP
         was not specified to a named tunnel (i.e., one that was
         initiated by a session specifying this AVP).

   Note that the same Id may be used to name different tunnels if these
   tunnels are between different endpoints.

7.9. Tunnel-Preference AVP

The Tunnel-Preference AVP (AVP Code 83) is of type Unsigned32 and is used to identify the relative preference assigned to each tunnel when more than one set of tunneling AVPs is returned within separate Grouped-AVP AVPs. It MAY be used in an authorization request as a hint to the server that a specific preference is desired, but the
ToP   noToC   RFC4005 - Page 50
   server is not required to honor the hint in the corresponding
   response.

   For example, suppose that AVPs describing two tunnels are returned by
   the server, one with a Tunnel-Type of PPTP and the other with a
   Tunnel-Type of L2TP.  If the tunnel initiator supports only one of
   the Tunnel-Types returned, it will initiate a tunnel of that type.
   If, however, it supports both tunnel protocols, it SHOULD use the
   value of the Tunnel-Preference AVP to decide which tunnel should be
   started.  The tunnel with the lowest numerical value in the Value
   field of this AVP SHOULD be given the highest preference.  The values
   assigned to two or more instances of the Tunnel-Preference AVP within
   a given authorization response MAY be identical.  In this case, the
   tunnel initiator SHOULD use locally configured metrics to decide
   which set of AVPs to use.

7.10. Tunnel-Client-Auth-Id AVP

The Tunnel-Client-Auth-Id AVP (AVP Code 90) is of type UTF8String and specifies the name used by the tunnel initiator during the authentication phase of tunnel establishment. It MAY be used in an authorization request as a hint to the server 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 Accounting- Request messages pertaining to the tunneled session.

7.11. Tunnel-Server-Auth-Id AVP

The Tunnel-Server-Auth-Id AVP (AVP Code 91) is of type UTF8String and specifies the name used by the tunnel terminator during the authentication phase of tunnel establishment. It MAY be used in an authorization request as a hint to the server 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 Accounting- Request messages pertaining to the tunneled session.

8. NAS Accounting

Applications implementing this specification use Diameter Accounting, as defined in [BASE], and the AVPs in the following section. Service-specific AVP usage is defined in the tables in section 10. If accounting is active, Accounting Request (ACR) messages SHOULD be sent after the completion of any Authentication or Authorization
ToP   noToC   RFC4005 - Page 51
   transaction and at the end of a Session.  The Accounting-Record-Type
   value indicates the type of event.  All other AVPs identify the
   session and provide additional information relevant to the event.

   The successful completion of the first Authentication or
   Authorization transaction SHOULD cause a START_RECORD to be sent.  If
   additional Authentications or Authorizations occur in later
   transactions, the first exchange should generate a START_RECORD, and
   the later 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 indicating the reason
   a session wasn't started.

   The following table describes the AVPs; their AVP Code values, types,
   and possible flag values; and whether the AVP MAY be encrypted.

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

8.1. Accounting-Input-Octets AVP

The Accounting-Input-Octets AVP (AVP Code 363) is of type Unsigned64 and contains the number of octets received from the user.
ToP   noToC   RFC4005 - Page 52
   For NAS usage, this AVP indicates how many octets have been received
   from the port in the course of this session.  It can only be present
   in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or
   STOP_RECORD.

8.2. Accounting-Output-Octets AVP

The Accounting-Output-Octets AVP (AVP Code 364) is of type Unsigned64 and contains the number of octets sent to the user. For NAS usage, this AVP indicates how many octets have been sent to the port in the course of this session. It can only be present in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD.

8.3. Accounting-Input-Packets AVP

The Accounting-Input-Packets (AVP Code 365) is of type Unsigned64 and contains the number of packets received from the user. For NAS usage, this AVP indicates how many packets have been received from the port over the course of a session being provided to a Framed User. It can only be present in ACR messages with an Accounting- Record-Type of INTERIM_RECORD or STOP_RECORD.

8.4. Accounting-Output-Packets AVP

The Accounting-Output-Packets (AVP Code 366) is of type Unsigned64 and contains the number of IP packets sent to the user. For NAS usage, this AVP indicates how many packets have been sent to the port over the course of a session being provided to a Framed User. It can only be present in ACR messages with an Accounting- Record-Type of INTERIM_RECORD or STOP_RECORD.

8.5. Acct-Session-Time AVP

The Acct-Session-Time AVP (AVP Code 46) is of type Unsigned32 and indicates 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.

8.6. Acct-Authentic AVP

The Acct-Authentic AVP (AVP Code 45) is of type Enumerated and specifies how the user was authenticated. The supported values are listed in [RADIUSTypes]. The following list is informational:
ToP   noToC   RFC4005 - Page 53
      1  RADIUS
      2  Local
      3  Remote
      4  Diameter

8.7. Accounting-Auth-Method AVP

The Accounting-Auth-Method AVP (AVP Code 406) is of type Enumerated. A NAS MAY include this AVP in an Accounting-Request message to indicate the method used to authenticate the user. (Note that this is equivalent to the RADIUS MS-Acct-Auth-Type VSA attribute). The following values are defined: 1 PAP 2 CHAP 3 MS-CHAP-1 4 MS-CHAP-2 5 EAP 7 None

8.8. Acct-Delay-Time

The Acct-Delay-Time AVP (AVP Code 41) is of type Unsigned32 and indicates 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 when the ACR arrives at the server to calculate the approximate time of the event that caused the ACR to be generated. This AVP is not used for retransmissions at the transport level (TCP or SCTP). Rather, it may be used when an ACR command cannot be transmitted because there is no appropriate peer to transmit it to or was rejected because it could not be delivered. In these cases, the command MAY be buffered and transmitted later, when an appropriate peer-connection is available or after sufficient time has passed that the destination-host may be reachable and operational. If the ACR is resent in this way, the Acct-Delay-Time AVP SHOULD be included. The value of this AVP indicates the number of seconds that elapsed between the time of the first attempt at transmission and the current attempt.
ToP   noToC   RFC4005 - Page 54

8.9. Acct-Link-Count

The Acct-Link-Count AVP (AVP Code 51) is of type Unsigned32 and indicates the total number of links that have been active (current or closed) in a given multilink session at the time the accounting record is generated. This AVP MAY be included in Accounting-Requests for any session that may be part of a multilink service. The Acct-Link-Count AVP may be used to make it easier for an accounting server to know when it has all the records for a given multilink service. When the number of Accounting-Requests received with Accounting-Record-Type = STOP_RECORD and with the same Acct- Multi-Session-Id and unique Session-Ids equals the largest value of Acct-Link-Count seen in those Accounting-Requests, all STOP_RECORD Accounting-Requests for that multilink service have been received. The following example, showing eight Accounting-Requests, illustrates how the Acct-Link-Count AVP is used. In the table below, only the relevant AVPs are shown, although additional AVPs containing accounting information will be present in the Accounting-Requests. Acct-Multi- Accounting- Acct- Session-Id Session-Id Record-Type Link-Count -------------------------------------------------------- "...10" "...10" START_RECORD 1 "...10" "...11" START_RECORD 2 "...10" "...11" STOP_RECORD 2 "...10" "...12" START_RECORD 3 "...10" "...13" START_RECORD 4 "...10" "...12" STOP_RECORD 4 "...10" "...13" STOP_RECORD 4 "...10" "...10" STOP_RECORD 4

8.10. Acct-Tunnel-Connection AVP

The Acct-Tunnel-Connection AVP (AVP Code 68) is of type OctetString and contains the identifier assigned to the tunnel session. This AVP, along with the Tunnel-Client-Endpoint and Tunnel-Server-Endpoint AVPs, may be used to provide a means to uniquely identify a tunnel session for auditing purposes. The format of the identifier in this AVP depends upon the value of the Tunnel-Type AVP. For example, to identify an L2TP tunnel connection fully, the L2TP Tunnel Id and Call Id might be encoded in this field. The exact encoding of this field is implementation dependent.
ToP   noToC   RFC4005 - Page 55

8.11. Acct-Tunnel-Packets-Lost AVP

The Acct-Tunnel-Packets-Lost AVP (AVP Code 86) is of type Unsigned32 and contains the number of packets lost on a given link.

9. RADIUS/Diameter Protocol Interactions

This section describes some basic guidelines that servers acting as AAA Translation Agents may use. A complete description of all the differences between RADIUS and Diameter is beyond the scope of this section and document. Note that this document does not restrict implementations from creating additional translation methods, as long as the translation function doesn't violate the RADIUS or the Diameter protocols. Although the Diameter protocol is in many ways a superset of RADIUS functions, a number of RADIUS representations are not allowed, so that new capabilities can be used without the old problems. There are primarily two different situations that must be handled: one in which a RADIUS request is received that must be forwarded as a Diameter request, and another in which the inverse is true. RADIUS does not support a peer-to-peer architecture, and server-initiated operations are generally not supported. See [RADDynAuth] for an alternative. Some RADIUS attributes are encrypted. RADIUS security and encryption techniques are applied on a hop-per-hop basis. A Diameter agent will have to decrypt RADIUS attribute data entering the Diameter system, and if that information is forwarded, the agent MUST secure it by using Diameter specific techniques. Note that this section uses the two terms, "AVP" and "attribute", in a concise and specific manner. The former is used to signify a Diameter AVP, and the latter to signify a RADIUS attribute.

9.1. RADIUS Request Forwarded as Diameter Request

This section describes the actions that should be taken when a Translation Agent receives a RADIUS message to be translated to a Diameter message. Note that RADIUS servers are assumed to be stateless. It is also quite possible for the RADIUS messages that comprise the session (i.e., authentication and accounting messages) to be handled by different Translation Agents in the proxy network. Therefore, a RADIUS/Diameter Translation Agent SHOULD NOT be assumed to have an accurate track on session-state information.
ToP   noToC   RFC4005 - Page 56
   When a Translation Agent receives a RADIUS message, the following
   steps should be taken:

      -  If a Message-Authenticator attribute is present, the value MUST
         be checked but not included in the Diameter message.  If it is
         incorrect, the RADIUS message should be silently discarded.
         The gateway system SHOULD generate and include a Message-
         Authenticator in returned RADIUS responses.

      -  The transport address of the sender MUST be checked against the
         NAS identifying attributes.  See the description of NAS-
         Identifier and NAS-IP-Address below.

      -  The Translation Agent must maintain transaction state
         information relevant to the RADIUS request, such as the
         Identifier field in the RADIUS header, any existing RADIUS
         Proxy-State attribute, and the source IP address and port
         number of the UDP packet.  These may be maintained locally in a
         state table or saved in a Proxy-Info AVP group.  A Diameter
         Session-Id AVP value must be created using a session state
         mapping mechanism.

      -  If the RADIUS request contained a State attribute and the
         prefix of the data is "Diameter/", the data following the
         prefix contains the Diameter Origin-Host/Origin-Realm/Session-
         Id.  If no such attributes are present and the RADIUS command
         is an Access-Request, a new Session-Id is created.  The
         Session-Id is included in the Session-Id AVP.

      -  The Diameter Origin-Host and Origin-Realm AVPs MUST be created
         and added by using the information from an FQDN corresponding
         to the NAS-IP-Address attribute (preferred if available),
         and/or to the NAS-Identifier attribute.  (Note that the RADIUS
         NAS-Identifier is not required to be an FQDN.)

      -  The response MUST have an Origin-AAA-Protocol AVP added,
         indicating the protocol of origin of the message.

      -  The Proxy-Info group SHOULD be added, with the local server's
         identity specified in the Proxy-Host AVP.  This should ensure
         that the response is returned to this system.

      -  The Destination-Realm AVP is created from the information found
         in the RADIUS User-Name attribute.
ToP   noToC   RFC4005 - Page 57
      -  If the RADIUS User-Password attribute is present, the password
         must be unencrypted by using the link's RADIUS shared secret.
         The unencrypted value must be forwarded in a User-Password AVP
         using Diameter security.

      -  If the RADIUS CHAP-Password attribute is present, the Ident and
         Data portion of the attribute are used to create the CHAP-Auth
         grouped AVP.

      -  If the RADIUS message contains an address attribute, it MUST be
         converted to the appropriate Diameter AVP and type.

      -  If the RADIUS message contains Tunnel information [RADTunnels],
         the attributes or tagged groups should each be converted to a
         Diameter Tunneling Grouped AVP set.  If the tunnel information
         contains a Tunnel-Password attribute, the RADIUS encryption
         must be resolved, and the password forwarded, by using Diameter
         security methods.

      -  If the RADIUS message received is an Accounting-Request, the
         Acct-Status-Type attribute value must be converted to a
         Accounting-Record-Type AVP value.  If the Acct-Status-Type
         attribute value is STOP, the local server MUST issue a
         Session-Termination-Request message once the Diameter
         Accounting-Answer message has been received.

      -  If the Accounting message contains an Acct-Termination-Cause
         attribute, it should be translated to the equivalent
         Termination-Cause AVP value.  (see below)

      -  If the RADIUS message contains the Accounting-Input-Octets,
         Accounting-Input-Packets, Accounting-Output-Octets, or
         Accounting-Output-Packets, these attributes must be converted
         to the Diameter equivalents.  Further, if the Acct-Input-
         Gigawords or Acct-Output-Gigawords attributes are present,
         these must be used to properly compute the Diameter accounting
         AVPs.

   The corresponding Diameter response is always guaranteed to be
   received by the same Translation Agent that translated the original
   request, due to the contents of the Proxy-Info AVP group in the
   Diameter request.  The following steps are applied to the response
   message during the Diameter-to-RADIUS translation:

      -  If the Diameter Command-Code is set to AA-Answer and the
         Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH, the
         gateway must send a RADIUS Access-Challenge.  This must have
         the Origin-Host, Origin-Realm, and Diameter Session-Id AVPs
ToP   noToC   RFC4005 - Page 58
         encapsulated in the RADIUS State attribute, with the prefix
         "Diameter/", concatenated in the above order separated with "/"
         characters, in UTF-8 [UTF-8].  This is necessary to ensure that
         the Translation Agent receiving the subsequent RADIUS Access-
         Request will have access to the Session Identifier and be able
         to set the Destination-Host to the correct value.  If the
         Multi-Round-Time-Out AVP is present, the value of the AVP MUST
         be inserted in the RADIUS Session-Timeout AVP.

      -  If the Command-Code is set to AA-Answer, the Diameter Session-
         Id AVP is saved in a new RADIUS Class attribute whose format
         consists of the string "Diameter/" followed by the Diameter
         Session Identifier.  This will ensure that the subsequent
         Accounting messages, which could be received by any Translation
         Agent, would have access to the original Diameter Session
         Identifier.
      -  If a Proxy-State attribute was present in the RADIUS request,
         the same attribute is added in the response.  This information
         may be found in the Proxy-Info AVP group, or in a local state
         table.

      -  If state information regarding the RADIUS request was saved in
         a Proxy-Info AVP or local state table, the RADIUS Identifier
         and UDP IP Address and port number are extracted and used in
         issuing the RADIUS reply.

   When translating a Diameter AA-Answer (with successful result code)
   to RADIUS Access-Accept that contains a Session-Timeout or
   Authorization-Lifetime AVP, take the following steps:

      -  If the Diameter message contains a Session-Timeout AVP but no
         Authorization-Lifetime AVP, translate it to a Session-Timeout
         attribute (not a Termination-Action).

      -  If the Diameter message contains an Authorization-Lifetime AVP
         but no Session-Timeout AVP, translate it to a Session-Timeout
         attribute and a Termination-Action set to AA-REQUEST.  (Remove
         Authorization-Lifetime and Re-Auth-Request-Type.)

      -  If the Diameter message has both, the Session-Timeout must be
         greater than or equal to the Authorization-Lifetime (required
         by [BASE]).  Translate it to a Session-Timeout value (with
         value from Authorization-Lifetime AVP, the smaller one) and
         with the Termination-Action set to AA-REQUEST.  (Remove the
         Authorization-Lifetime and Re-Auth-Request-Type.)
ToP   noToC   RFC4005 - Page 59

9.1.1. RADIUS Dynamic Authorization Considerations

A Diameter/RADIUS gateway may communicate with a server that implements RADIUS Dynamic Authorization [RADDynAuth]. If the server supports these functions, it MUST be listening on the assigned port and would receive RADIUS CoA-Request and Disconnect-Request messages. These can be mapped into the Diameter Re-Auth-Request (RAR) and Abort-Session-Request (ASR) message exchanges, respectively [BASE]. If the [RADDynAuth] is not supported, the port would not be active and the RADIUS server would receive an ICMP Port Unreachable indication. Alternatively, if the messages are received but with an inappropriate Service-Type, the gateway can respond with the appropriate NAK message and an Error-Cause attribute with the value of 405, "Unsupported Service". The RADIUS CoA-Request and Disconnect-Request messages will not contain a Diameter Session-Id. Diameter requires that this value match an active session context. The gateway MUST have a session Id cache (or other means) to identify the sessions these functions pertain to. If unable to identify the session, the gateway (or NAS) should return an Error-Cause value 503, "Session Context Not Found". The RADIUS CoA-Request message only supports a change of authorization attributes, and the received CoA-Request SHOULD include a Service-Type of "Authorize-Only". This indicates an extended exchange request by the rules given in [RADDynAuth] section 3.2, note 6. This is the only type of exchange supported by Diameter [BASE]. For the CoA-Request, the translated RAR message will have a Re-Auth- Type of AUTHORIZE_ONLY. The returned RAA will be translated into a CoA-NAK with Error-Cause "Request Initiated". The gateway's Diameter client SHOULD also start a reauthorization sequence by sending an AAR message, which will be translated into an Access-Request message. The RADIUS server will use the Access-Accept (or Access-Reject) message to convey the new authorization attributes, which the gateway will pass back in an AAA message. Any attributes included in the COA-Request or Access-Accept message are to be considered mandatory in Diameter. If they cannot be supported, they MUST result in an error message return to the RADIUS server, with an Error-Cause of "Unsupported Attribute". The Diameter NAS will attempt to apply all the attributes supplied in the AA message to the session. A RADIUS Disconnect-Request message received by the gateway would be translated to a Diameter Abort-Session-Request (ASR) message [BASE]. The results will be returned by the Diameter client in an Abort-
ToP   noToC   RFC4005 - Page 60
   Session-Answer (ASA) message.  A success indication would translate
   to a RADIUS Disconnect-ACK, and a failure would generate a
   Disconnect-NAK.

9.2. Diameter Request Forwarded as RADIUS Request

When a server receives a Diameter request to be forwarded to a RADIUS entity, the following are examples of the steps that may be taken: - The Origin-Host AVP's value is inserted into the NAS-Identifier attribute. - The following information MUST be present in the corresponding Diameter response and therefore MUST be saved, either in a local state table or encoded in a RADIUS Proxy-State attribute: 1. Origin-Host AVP 2. Session-Id AVP 3. Proxy-Info AVP 4. Any other AVP that MUST be present in the response and has no corresponding RADIUS attribute. - If the CHAP-Auth AVP is present, the grouped AVPs are used to create the RADIUS CHAP-Password attribute data. - If the User-Password AVP is present, the data should be encrypted and forwarded by using RADIUS rules. The same is true for any other RADIUS-encrypted attribute values. - AVPs of the type Address must be translated to the corresponding RADIUS attribute. - If the Accounting-Input-Octets, Accounting-Input-Packets, Accounting-Output-Octets, or Accounting-Output-Packets AVPs are present, they must be translated to the corresponding RADIUS attributes. If the value of the Diameter AVPs do not fit within a 32-bit RADIUS attribute, the RADIUS Acct-Input- Gigawords and Acct-Output-Gigawords must be used. - If the RADIUS link supports the Message-Authenticator attribute [RADIUSExt], it SHOULD be generated and added to the request. When the corresponding response is received by the Translation Agent, which is guaranteed in the RADIUS protocol, the following steps may be taken:
ToP   noToC   RFC4005 - Page 61
      -  If the RADIUS code is set to Access-Challenge, a Diameter AA-
         Answer message is created with the Result-Code set to
         DIAMETER_MULTI_ROUND_AUTH.  If the Session-Timeout AVP is
         present in the RADIUS message, its value is inserted into the
         Multi-Round-Time-Out AVP.

      - If a Proxy-State attribute is present, extract the encoded
         information; otherwise, retrieve the original Proxy-Info AVP
         group information from the local state table.

      -  The response's Origin-Host information is created from the FQDN
         of the RADIUS message's source IP address.  The same FQDN is
         also stored to a Route-Record AVP.

      -  The response's Destination-Host AVP is copied from the saved
         request's Origin-Host information.

      -  The Session-Id information can be recovered from local state,
         or from the constructed State or Proxy-State attribute, as
         above.

      -  If a Proxy-Info AVP was present in the request, the same AVP
         MUST be added to the response.

      -  If the RADIUS State attributes are present, they must be
         present in the Diameter response, minus those added by the
         gateway.

      -  Any other AVPs that were saved at request time, and that MUST
         be present in the response, are added to the message.

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

      -  If the RADIUS message contains a Session-Timeout attribute and
         a Termination-Action attribute set to DEFAULT (or no
         Termination-Action attribute at all), translate it to AA-Answer
         with a Session-Timeout AVP and remove the Termination-Action
         attribute.

      -  If the RADIUS message contains a Session-Timeout attribute and
         a Termination-Action attribute set to AA-REQUEST, translate it
         to AA-Answer with Authorization-Lifetime AVP and with Re-Auth-
         Request-Type set to AUTHORIZE_AUTHENTICATE and remove the
         Session-Timeout attribute.
ToP   noToC   RFC4005 - Page 62

9.2.1. RADIUS Dynamic Authorization Considerations

A RADIUS/Diameter gateway communicating with a RADIUS client that implements RADIUS Dynamic Authorization [RADDynAuth] may translate Diameter Re-Auth-Request (RAR) messages and Abort-Session-Request (ASR) messages [BASE] into RADIUS CoA-Request and Disconnect-Request messages respectively. If the RADIUS client does not support the capability, the gateway will receive an ICMP Port Unreachable indication when it transmits the RADIUS message. Even if the NAS supports [RADDynAuth], it may not support the Service-Type in the request message. In this case it will respond with a NAK message and (optionally) an Error-Cause attribute with value 405, "Unsupported Service". If the gateway encounters these error conditions, or if it does not support [RADDynAuth], it sends a Diameter Answer message with an Result-Code AVP of "DIAMETER_COMMAND_UNSUPPORTED" to the AAA server. When encoding the RADIUS messages, the gateway MUST include the Diameter Session-ID in the RADIUS State attribute value, as mentioned above. The RADIUS client should return it in the response. A Diameter Re-Auth-Request (RAR) message [BASE] received by the gateway will be translated into a RADIUS CoA-Request and sent to the RADIUS client. The RADIUS client should respond with a CoA-ACK or CoA-NAK message, which the gateway should translate into a Re-Auth- Answer (RAA) message. If the gateway receives a RADIUS CoA-NAK response containing a Service-Type Attribute with value "Authorize Only" and an Error-Cause Attribute with value "Request Initiated", this indicates an extended exchange request per [RADDynAuth] section 3.2, note 6. The response is translated to a Diameter Re-Auth-Answer (RAA) with a Result-Code AVP of "DIAMETER_LIMITED_SUCCESS" sent to the AAA server. Subsequently, the gateway should receive a RADIUS Access-Request from the NAS, with a Service-Type of "Authorize Only". This is translated into a Diameter AA-Request with an Auth-Request-Type AVP of AUTHORIZE_ONLY and sent to the AAA server. The AAA server will then reply with a Diameter AA-Answer, which is translated into a RADIUS Access-Accept or Access-Reject, depending on the value of the Result-Code AVP. A Diameter Abort-Session-Request (ASR) message [BASE] received by the gateway will be translated into a RADIUS Disconnect-Request and sent to the RADIUS client. The RADIUS client should respond with a
ToP   noToC   RFC4005 - Page 63
   Disconnect-ACK or Disconnect-NAK message, which the gateway should
   translate into an Abort-Session-Answer (ASA) message.

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

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

9.3. AVPs Used Only for Compatibility

The AVPs defined in this section SHOULD only be used for backwards compatibility when a Diameter/RADIUS translation function is invoked and are not typically originated by Diameter systems during normal operations. +---------------------+ | AVP Flag rules | |----+-----+----+-----|----+ AVP Section | | |SHLD| MUST| | Attribute Name Code Defined Value Type |MUST| MAY | NOT| NOT|Encr| -----------------------------------------|----+-----+----+-----|----| NAS-Identifier 32 9.3.1 UTF8String | M | P | | V | Y | NAS-IP-Address 4 9.3.2 OctetString| M | P | | V | Y | NAS-IPv6-Address 95 9.3.3 OctetString| M | P | | V | Y | State 24 9.3.4 OctetString| M | P | | V | Y | Termination- 295 9.3.5 Enumerated | M | P | | V | Y | Cause | | | | | | Origin-AAA- 408 9.3.6 Enumerated | M | P | | V | Y | Protocol | | | | | | -----------------------------------------|----+-----+----+-----|----|

9.3.1. NAS-Identifier AVP

The NAS-Identifier AVP (AVP Code 32) [RADIUS] is of type UTF8String and contains the identity of the NAS providing service to the user. This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent. When this AVP is present, the Origin-Host AVP identifies the NAS providing service to the user.
ToP   noToC   RFC4005 - Page 64
   In RADIUS it would be possible for a rogue NAS to forge the NAS-
   Identifier attribute.  Diameter/RADIUS translation agents SHOULD
   attempt to check a received NAS-Identifier attribute against the
   source address of the RADIUS packet, by doing an A/AAAA RR query.  If
   the NAS-Identifier attribute contains an FQDN, then such a query
   would resolve to an IP address matching the source address.  However,
   the NAS-Identifier attribute is not required to contain an FQDN, so
   such a query could fail.  If it fails, an error should be logged, but
   no action should be taken, other than a reverse lookup on the source
   address and insert the resulting FQDN into the Route-Record AVP.

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

9.3.2. NAS-IP-Address AVP

The NAS-IP-Address AVP (AVP Code 4) [RADIUS] is of type OctetString and contains the IP Address of the NAS providing service to the user. This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent. When this AVP is present, the Origin-Host AVP identifies the NAS providing service to the user. In RADIUS it would be possible for a rogue NAS to forge the NAS-IP- Address attribute value. Diameter/RADIUS translation agents MUST check a received NAS-IP-Address or NAS-IPv6-Address attribute against the source address of the RADIUS packet. If they do not match and the Diameter/RADIUS translation agent does not know whether the packet was sent by a RADIUS proxy or NAS (e.g., no Proxy-State attribute), then by default it is assumed that the source address corresponds to a RADIUS proxy, and that the NAS Address is behind that proxy, potentially with some additional RADIUS proxies in between. The Diameter/RADIUS translation agent MUST insert entries in the Route-Record AVP corresponding to the apparent route. This implies doing a reverse lookup on the source address and NAS-IP- Address or NAS-IPv6-Address attributes to determine the corresponding FQDNs. If the source address and the NAS-IP-Address or NAS-IPv6-Address do not match, and the Diameter/RADIUS translation agent knows that it is talking directly to the NAS (e.g., there are no RADIUS proxies between it and the NAS), then the error should be logged, and the packet MUST be discarded. Diameter agents and servers MUST check whether the NAS-IP-Address AVP corresponds to an entry in the Route-Record AVP. This is done by doing a reverse lookup (PTR RR) for the NAS-IP-Address to retrieve the corresponding FQDN, and by checking for a match with the Route-
ToP   noToC   RFC4005 - Page 65
   Record AVP.  If no match is found, then an error is logged, but no
   other action is taken.

9.3.3. NAS-IPv6-Address AVP

The NAS-IPv6-Address AVP (AVP Code 95) [RADIUSIPv6] is of type OctetString and contains the IPv6 Address of the NAS providing service to the user. This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent. When this AVP is present, the Origin-Host AVP identifies the NAS providing service to the user. In RADIUS it would be possible for a rogue NAS to forge the NAS- IPv6-Address attribute. Diameter/RADIUS translation agents MUST check a received NAS-IPv6-Address attribute against the source address of the RADIUS packet. If they do not match and the Diameter/RADIUS translation agent does not know whether the packet was sent by a RADIUS proxy or NAS (e.g., no Proxy-State attribute), then by default it is assumed that the source address corresponds to a RADIUS proxy, and that the NAS-IPv6-Address is behind that proxy, potentially with some additional RADIUS proxies in between. The Diameter/RADIUS translation agent MUST insert entries in the Route- Record AVP corresponding to the apparent route. This implies doing a reverse lookup on the source address and NAS-IPv6-Address attributes to determine the corresponding FQDNs. If the source address and the NAS-IPv6-Address do not match, and the Diameter/RADIUS translation agent knows that it is talking directly to the NAS (e.g., there are no RADIUS proxies between it and the NAS), then the error should be logged, and the packet MUST be discarded. Diameter agents and servers MUST check whether the NAS-IPv6-Address AVP corresponds to an entry in the Route-Record AVP. This is done by doing a reverse lookup (PTR RR) for the NAS-IPv6-Address to retrieve the corresponding FQDN, and by checking for a match with the Record- Route AVP. If no match is found, then an error is logged, but no other action is taken.

9.3.4. State AVP

The State AVP (AVP Code 24) [RADIUS] is of type OctetString and has two uses in the Diameter NAS application. The State AVP MAY be sent by a Diameter Server to a NAS in an AA- Response command that contains a Result-Code of DIAMETER_MULTI_ROUND_AUTH. If so, the NAS MUST return it unmodified in the subsequent AA-Request command.
ToP   noToC   RFC4005 - Page 66
   The State AVP MAY also be sent by a Diameter Server to a NAS in an
   AA-Response command that also includes a Termination-Action AVP with
   the value of AA-REQUEST.  If the NAS performs the Termination-Action
   by sending a new AA-Request command upon termination of the current
   service, it MUST return the State AVP unmodified in the new request
   command.

   In either usage, the NAS MUST NOT interpret the AVP locally.  Usage
   of the State AVP is implementation dependent.

9.3.5. Termination-Cause AVP Code Values

This section defines a mapping between Termination-Cause AVP code values and RADIUS Acct-Terminate-Cause attribute code values from RFC 2866 [RADIUSAcct] and [RADIUSTypes], thereby allowing a RADIUS/Diameter Translation Agent to convert between the attribute and AVP values. This section thus extends the definitions in the "Termination-Cause AVP" section of the Base Diameter specification.
ToP   noToC   RFC4005 - Page 67
   The table in this section defines the mapping between Termination-
   Cause AVP and RADIUS Acct-Terminate-Cause causes.

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

   From RFC 2866, the termination causes are as follows:

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

   Lost Carrier         DCD was dropped on the port.

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

   Idle Timeout         Idle timer expired.

   Session Timeout      Maximum session length timer expired.

   Admin Reset          Administrator reset the port or session.
ToP   noToC   RFC4005 - Page 68
   Admin Reboot         Administrator is ending service on the NAS,
                        for example, prior to rebooting the NAS.

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

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

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

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

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

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

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

   Service Unavailable  NAS was unable to provide requested service.

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

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

   Host Request         Login Host terminated session normally.

9.3.6. Origin-AAA-Protocol

The Origin-AAA-Protocol AVP (AVP Code 408) is of the type Enumerated and should be inserted in a Diameter message translated by a gateway system from another AAA protocol, such as RADIUS. It identifies the source protocol of the message to the Diameter system receiving the message. The supported values are: 1 RADIUS
ToP   noToC   RFC4005 - Page 69

9.4. Prohibited RADIUS Attributes

The following RADIUS attributes MUST NOT appear in a Diameter message. Instead, they are translated to other Diameter AVPs or handled in some special manner. The rules for the treatment of the attributes are discussed in sections 9.1, 9.2, and 9.6. Attribute Description Defined Nearest Diameter AVP ----------------------------------------------------------------- 3 CHAP-Password RFC 2865 CHAP-Auth Group 26 Vendor-Specific RFC 2865 Vendor Specific AVP 29 Termination-Action RFC 2865 Authorization-Lifetime 40 Acct-Status-Type RFC 2866 Accounting-Record-Type 42 Acct-Input-Octets RFC 2866 Accounting-Input-Octets 43 Acct-Output-Octets RFC 2866 Accounting-Output-Octets 47 Acct-Input-Packets RFC 2866 Accounting-Input-Packets 48 Acct-Output-Packets RFC 2866 Accounting-Output-Packets 49 Acct-Terminate-Cause RFC 2866 Termination-Cause 52 Acct-Input-Gigawords RFC 2869 Accounting-Input-Octets 53 Acct-Output-Gigawords RFC 2869 Accounting-Output-Octets 80 Message-Authenticator RFC 2869 none - check and discard

9.5. Translatable Diameter AVPs

In general, Diameter AVPs that are not RADIUS compatible have code values greater than 255. The table in the section above shows the AVPs that can be converted into RADIUS attributes. Another problem may occur with Diameter AVP values that may be more than 253 octets in length. Some RADIUS attributes (including but not limited to (8)Reply-Message, (79)EAP-Message, and (77)Connect-Info) allow concatenation of multiple instances to overcome this limitation. If this is not possible, a Result-Code of DIAMETER_INVALID_AVP_LENGTH should be returned.

9.6. RADIUS Vendor Specific Attributes

RADIUS supports the inclusion of Vendor Specific Attributes (VSAs) through the use of attribute 26. The recommended format [RADIUS] of the attribute data field includes a 4 octet vendor code followed by a one octet vendor type field and a one octet length field. The last two fields MAY be repeated. A system communicating between Diameter and RADIUS MAY have specific knowledge of vendor formats, and MAY be able to translate between the two formats. However, given the deployment of many RADIUS vendor formats that do not follow the example format in RFC 2865 [RADIUS], (e.g., those that use a longer vendor type code) the translations in
ToP   noToC   RFC4005 - Page 70
   the next two sections will not work in general for those VSAs.  RFC
   2865 states that a robust implementation SHOULD support the field as
   undistinguished octets.

   Systems that don't have vendor format knowledge MAY discard such
   attributes without knowing a suitable translation.  An alternative
   format is under consideration [VSA], which proposes encodings that
   would preserve the native information and not require vendor
   knowledge in the gateway system.

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

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

For Type codes less than 255, the value field length MUST be less than 252 or the AVP will be discarded. The RADIUS VSA attribute should consist of the following fields; RADIUS Type = 26, Vendor Specific Attribute RADIUS Length = total length of attribute (header + data) RADIUS Vendor code = Diameter Vendor code RADIUS Vendor type code = low order byte of Diameter AVP code RADIUS Vendor data length = length of Diameter data If the Diameter AVP code is greater than 255, then the RADIUS speaking code may use a Vendor specific field coding, if it knows one for that vendor. Otherwise, the AVP will be ignored. If it is flagged as Mandatory, a "DIAMETER_AVP_UNSUPPORTED" Result-Code will be returned, and the RADIUS message will not be sent.

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

The Diameter AVP will consist of the following fields: Diameter Flags: V=1, M=0, P=0 Diameter Vendor code = RADIUS VSA Vendor code Diameter AVP code = RADIUS VSA Vendor type code Diameter AVP length = length of AVP (header + data) Diameter Data = RADIUS VSA vendor data Note that the VSAs are considered optional by RADIUS rules, and this specification does not set the Mandatory flag. If an implementor desires a VSA be made mandatory because it represents a required service policy, the RADIUS gateway should have a process to set the bit on the Diameter side.
ToP   noToC   RFC4005 - Page 71
   If the RADIUS receiving code knows of vendor specific field
   interpretations for the specific vendor, it may employ them to parse
   an extended AVP code or data length.  Otherwise the recommended
   standard fields will be used.

   Nested Multiple vendor data fields MUST be expanded into multiple
   Diameter AVPs.



(page 71 continued on part 4)

Next Section