draft-ietf-aaa-diameter-00.txt  -->   draft-ietf-aaa-diameter-01.txt

view Side-By-Side changes






AAA Working Group                                         Pat R. Calhoun
Internet-Draft                                    Sun Microsystems, Inc.
Category: Standards Track                                Allan C. Rubens
<draft-ietf-aaa-diameter-00.txt>
<draft-ietf-aaa-diameter-01.txt>                       Tut Systems, Inc.
                                                           Haseeb Akhtar
                                                         Nortel Networks
                                                            Erik Guttman
                                                  Sun Microsystems, Inc.
                                                           February
                                                              March 2001



                         Diameter Base Protocol



Status of this Memo

   This document is an Internet-Draft and is in full conformance with
   all provisions of Section 10 of RFC2026.  Internet-Drafts are working
   documents of the Internet Engineering Task Force (IETF), its areas,
   and its working groups.  Note that other groups may also distribute
   working documents as Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at:

      http://www.ietf.org/ietf/1id-abstracts.txt

   The list of Internet-Draft Shadow Directories can be accessed at:

      http://www.ietf.org/shadow.html.

   Distribution of this memo is unlimited.

   Copyright   (C) The Internet Society 2001.  All Rights Reserved.











Calhoun et al.             expires July 2001                    [Page 1]





Internet-Draft                                             February 2001

Abstract

   The Diameter base protocol is intended to provide a AAA framework for
   Mobile-IP, NASREQ and ROAMOPS. This draft specifies the message
   format, transport, error reporting and security services to be used
   by all Diameter extensions and MUST be supported by all Diameter
   implementations.



Calhoun et al.            expires August 2001                   [Page 1]





Internet-Draft                                                March 2001


Table of Contents

      1.0  Introduction
            1.1  Requirements language
            1.2  Terminology
      2.0  Protocol Overview
            2.1  Header Format  Transport
            2.2  Securing Diameter Messages
            2.3  Diameter Server Discovery
            2.4  Mandatory Accounting Support
      3.0  Diameter Header
            3.1  Command Code Definitions
            2.3  AVP Format
                  2.3.1
      4.0  Diameter AVPs
                  4.1  AVP Header
                  2.3.2
                  4.2  Optional Header Elements
                  2.3.3
                  4.3  AVP Data Formats
                  2.3.4
                  4.4  Grouped AVP Values
                     2.3.4.1
                     4.4.1  Example AVP with a Grouped Data type
                  2.3.5
                  4.5  Diameter Base Protocol AVPs
            2.4  Mandatory AVPs
                  2.4.1  Host-Name
      5.0  Message Forwarding
            5.1  Origin-FQDN AVP
            2.5  State Machine
            2.6
            5.2  Origin-Realm AVP
            5.3  Destination-FQDN AVP
   6.0  Capabilities Negotiation
            6.1  Device-Reboot-Ind (DRI) Command
                  2.6.1
                  6.1.1  Vendor-Id AVP
                  2.6.2
                  6.1.2  Firmware-Revision AVP
                  2.6.3
                  6.1.3  Extension-Id AVP
                  2.6.4
                  6.1.4  Host-IP-Address AVP
            2.7  Diameter Server Discovery
      3.0  "User" Sessions
            3.1
      7.0  Transport Failure Detection
            7.1  Device-Watchdog-Request
            7.2  Device-Watchdog-Answer
            7.3  Failover/Failback Procedures
      8.0  Peer State Machine
            3.2  Session-Id AVP
            3.3  Authorization-Lifetime AVP
            3.4  Session-Timeout AVP
            3.5  User-Name
      9.0  Per-Hop Error Signaling
            9.1  Device-Status-Ind
                  9.1.1  Device-Error AVP
            3.6  Session Termination
                  3.6.1  Session-Termination-Ind
                  3.6.2  Session-Termination-Request
                  3.6.3  Session-Termination-Answer
      4.0  Reliable Transport
      5.0
                        9.1.1.1  Informational Events
                        9.1.1.2  Redirect Event
                        9.1.1.3  Transient Failure Events
                        9.1.1.4  Permanent Failure Events
      10.0  End-to-End Error Reporting
            5.1 Signaling
            10.1  Message-Reject-Ind (MRI) Command
                  5.1.1
                  10.1.1  Failed-AVP AVP
                  5.1.2
                  10.1.2  Failed-Command-Code
            10.2  Result-Code AVP
                  10.2.1  Informational
                  10.2.2  Success



Calhoun et al.            expires July August 2001                   [Page 2]





Internet-Draft                                             February                                                March 2001


            5.2  Result-Code AVP
                  5.2.1  Informational
                  5.2.2  Success
                  5.2.3


                  10.2.3  Redirect Notification
                  5.2.4
                  10.2.4  Transient Failures
                  5.2.5
                  10.2.5  Permanent Failures
                  5.2.6  Hop-by-Hop Failures
            5.3
            10.3  Error-Message AVP
            5.4  Error-Reporting-NAI
            10.4  Error-Reporting-FQDN AVP
      6.0
      11.0  "User" Sessions
            11.1  Session State Machine
            11.2  Session-Id AVP
            11.3  Authorization-Lifetime AVP
            11.4  Session-Timeout AVP
            11.5  User-Name AVP
            11.6  Max-Wait-Time AVP
            11.7  Session Termination
                  11.7.1  Session-Termination-Ind
                  11.7.2  Session-Termination-Request
                  11.7.3  Session-Termination-Answer
      12.0  Message Routing
            6.1
            12.1  Realm-Based Message Routing
            6.2  Behavior of
                  12.1.1  Realm-Based Routing Table
            12.2  Proxy and Redirect Servers
                  6.2.1 Server handling of requests
                  12.2.1  Proxy and Redirect Server handling of requests
            6.3
            12.3  Redirect Server
                  6.3.1
                  12.3.1  Redirect-Host AVP
                  6.3.2
                  12.3.2  Redirect-Host-Address AVP
                  6.3.3
                  12.3.3  Redirect-Host-Port AVP
            6.4
            12.4  Proxy Server
                  6.4.1
                  12.4.1  Proxying Requests
                  6.4.2
                  12.4.2  Proxying Responses
                  6.4.3
                  12.4.3  Route-Record AVP
                  6.4.4
                  12.4.4  Proxy-State AVP
                  6.4.5
                  12.4.5  Proxy-Address AVP
                  6.4.6
                  12.4.6  Proxy-Info AVP
                  6.4.7  Routing-Realm
                  12.4.7  Destination-Realm AVP
            6.5
            12.5  Applying Local Policies
            6.6
            12.6  Hiding Network Topology
            6.7
            12.7  Loop Detection
            6.8  Finding a Target NAS within a Domain
                  6.8.1  Destination-NAI AVP
      7.0
      13.0  Diameter Message Security
            7.1
            13.1  Hop-by-Hop Security
                  7.1.1
                  13.1.1  Integrity-Check-Value AVP
                     7.1.1.1
                     13.1.1.1  Authentication-Transform-Id AVP
                     7.1.1.2
                     13.1.1.2  Digest AVP
                  7.1.2
                  13.1.2  Encrypted-Payload AVP
                     7.1.2.1
                     13.1.2.1  Encryption-Transform-Id AVP
                        7.1.2.1.1
                        13.1.2.1.1  MD5 Payload Hiding
                     7.1.2.2
                     13.1.2.2  Plaintext-Data-Length AVP
                     7.1.2.3
                     13.1.2.3  Encrypted-Data AVP
            7.2
            13.2  Nonce AVP
            7.3
            13.3  Timestamp AVP
            7.4



Calhoun et al.            expires August 2001                   [Page 3]





Internet-Draft                                                March 2001


            13.4  Key-Id AVP
      8.0
      14.0  AVP Table
      9.0
      15.0  IANA Considerations
            9.1
            15.1  AVP Attributes
            9.2
            15.2  Command Code AVP Values
            9.3
            15.3  Extension Identifier Values



Calhoun et al.             expires July 2001                    [Page 3]





Internet-Draft                                             February 2001


            9.4
            15.4  Result-Code AVP Values
            9.5
            15.5  Integrity-Check-Value AVP Transform Values
            9.6
            15.6  Encryption-Transform-Id AVP Values
            9.7
            15.7  Message Header Bits
            9.8
            15.8  AVP Header Bits
      10.0
            15.9  DSI-Event AVP Values
      16.0 Open Issues
      11.0
      17.0 Diameter protocol related configurable parameters
      12.0
      18.0 Security Considerations
      13.0
      19.0 References
      14.0
      20.0 Acknowledgements
      15.0
      21.0 Authors' Addresses
      16.0
      22.0 Full Copyright Statement
      Appendix A. Diameter Service Template































Calhoun et al.            expires July August 2001                   [Page 4]





Internet-Draft                                             February                                                March 2001


1.0  Introduction

   The Diameter protocol allows peers to exchange a variety of messages.
   The base protocol provides the following facilities:

      - Delivery of AVPs (attribute value pairs)
      - Capabilities negotiation, as required in [20]
      - Error notification
      - Extensibility, through addition of new commands and AVPs, as
        required in [21]

   All data delivered by the protocol is in the form of an AVP.  Some of
   these AVP values are used by the Diameter protocol itself, while
   others deliver data associated with particular applications which
   employ Diameter.  AVPs may be added arbitrarily to Diameter messages,
   so long as the required AVPs are included and AVPs which are
   explicitly excluded are not included.  AVPs are used by base Diameter
   protocol to support the following required features:

      - Transporting of user authentication information, for the
        purposes of enabling the Diameter server to authenticate the
        user.
      - Transporting of service specific authorization information,
        between client and servers, allowing the peers to decide whether
        a user's access request should be granted.
      - Exchanging resource usage information, which MAY be used for
        accounting purposes, capacity planning, etc.
      - Proxying and Re-directing of Diameter messages through a server
        hierarchy.
      - Providing application-level security, through the use of the
        Integrity-Check-Value (ICV) and Encrypted-Payload AVPs.

   The Diameter base protocol provides the minimum requirements needed
   for an AAA transport protocol, as required by NASREQ [21], Mobile IP
   [22, 23], and ROAMOPS [20]. The base protocol is not intended to be
   used by itself, and must be used with an application-specific
   extension, such as Mobile IP [10]. The Diameter protocol was heavily
   inspired and builds upon the tradition of the RADIUS [1] protocol.

   Any node can initiate a request. In that sense, Diameter is a peer to
   peer protocol. In this document, a Diameter client is the device that
   normally initiates a request for authentication and/or authorization
   of a user. A Diameter server is the device that either forwards the
   request to another Diameter server (known as a proxy), or one that
   performs the actual authentication and/or authorization of the user
   based on some profile. Given that the server MAY send unsolicited
   messages to clients, it is possible for the server to initiate such
   messages. An example of an unsolicited message would be for a request



Calhoun et al.            expires July August 2001                   [Page 5]





Internet-Draft                                             February                                                March 2001


   that the client issue an accounting update.

   Diameter services require sequenced in-order reliable delivery of
   data, with congestion control (receiver windowing).  Timely detection
   of failed or unresponsive peers is also required, allowing for robust
   operation.  TCP is insufficient for this second requirement.
   Diameter SHOULD be transported over SCTP [26].


1.1  Requirements language

   In this document, the key words "MAY", "MUST", "MUST NOT",
   "optional", "recommended", "SHOULD", and "SHOULD NOT", are to be
   interpreted as described in [13].


1.2  Terminology

   Refer to [9] for terminology used in this document.


2.0  Protocol Overview

   The base Diameter protocol is never used on its own.  It is always
   extended for a particular application.  Four extensions to Diameter
   are defined by companion documents:  NASREQ [7], Mobile IP [10],
   Accounting Extension [15], Strong Security [11].  These options are
   introduced in this document but specified elsewhere.  Additional
   extensions to Diameter may be defined in the future (see Section
   9.3).
   15.3).

   The base Diameter protocol concerns itself with capabilities
   negotiation, and how messages are sent and how peers may eventually
   be abandoned.  The base protocol also defines certain rules which
   apply to all exchanges of messages between Diameter peers.  It is
   important to note that the base protocol provides optional
   application-level security AVPs (Integrity-Check-Value) which MAY be
   used in absence of an underlying security protocol (e.g. IP
   Security).

   Communication between Diameter peers begins with one peer sending a
   message to another Diameter peer. The set of AVPs included in the
   message is determined by a particular application of or extension to
   Diameter. We will refer to this as the Diameter extension. One AVP
   that is included to reference a user's session is the Session-Id.

   The initial request for authentication and/or authorization of a user
   would include the Session-Id. The Session-Id is then used in all



Calhoun et al.            expires July August 2001                   [Page 6]





Internet-Draft                                             February                                                March 2001


   subsequent messages to identify the user's session (see section 3.0 11.0
   for more information). The communicating party may accept the
   request, or reject it by returning a response with Result-Code AVP
   set to indicate an error occurred. The specific behavior of the
   diameter server or client receiving a request depends on the Diameter
   extension employed.

   Session state (associated with a Session-Id) MUST be freed upon
   receipt of the Session-Termination-Request, Session-Termination-
   Answer, expiration of authorized service time in the Session-Timeout
   AVP, and according to rules established in a particular
   extension/application of Diameter.

   Exchanges of messages are either request/reply oriented, or in some
   special cases, do not require replies.  All such messages that do not
   require replies have names ending with '-Ind' (short for Indication).

   The Diameter base protocol provides the Authorization-Lifetime AVP,
   which MAY be used by extensions to specify the duration of a specific
   authorized session.


2.1  Header Format  Transport

   The base Diameter protocol is run over SCTP [26] on port TBD of both TCP [27] and
   SCTP [26] transport protocols (for interoperability test purposes we will support
   port 1812 will be used until April 2001).  Implementations MAY send packets from any source port, but Diameter clients [9] MUST be prepared to receive packets on port TBD. When a request is
   received, in order
   support TCP, but are warned that future versions of this
   specification may mandate SCTP support. Diameter servers MUST support
   both TCP and SCTP.

   A Diameter node MAY sent packets from any source port, but MUST be
   prepared to send receive packets on port TBD. When a reply, request is received,
   the source and destination destionation ports in the reply are reversed. Note
   that the source and destination addresses used in request and replies
   MAY be any of the a peer's valid IP addresses.

   A given Diameter process SHOULD use the same port number to send all
   messages to aid in identifying which process sent a given message.
   More than one Diameter process MAY exist within a single host, so the
   sender's port number is needed to discriminate them.

   A summary of the Diameter data format is shown below.

   When no transport connection exists with a peer, an attempt to
   connect SHOULD be periodically attempted. The fields are
   transmitted in network byte order. recommended connection
   interval is 30 seconds.


2.2  Securing Diameter Messages



Calhoun et al.            expires July August 2001                   [Page 7]





Internet-Draft                                             February                                                March 2001


       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |r r r r r r r r r r E I R| Ver |         Message Length        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Identifier                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Command-Code                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Vendor-ID                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  AVPs ...
      +-+-+-+-+-+-+-+-+-+-+-+-+-

   Flags
      The Message Flags field is thirteen bits.  The following bits are
      assigned:

         r(eserved)


   All Diameter messages MUST be zero - this flag bit is reserved for
                    future use.
         E(xpected Reply) - The message solicits a response.
         I(nterrogation) - The message is a Query or a Reply.
         R(esponse) - The message is a response to another message.

      These flags secured between peers, and both SSL
   [28] and IP Security [37] are set depending on the command code used in a
      Diameter message.  This enables the type of message supported. Network Access Servers
   (NASes) and Foreign Agents, commonly referred to be
      interpreted, even if as clients, MUST
   support IP Security, while servers MUST support both SSL and IP
   Security. The communication between a client and server MUST use IP
   Security, while communication between servers MUST use SSL.

   All hosts running the specific command code is not recognized.

      Command Type   Flags Set
      Indication      - - -
      Request         E - -
      Answer          - - R
      Query           E I -
      Reply           - I R

      A Diameter node protocol MUST NOT set these flags in any other combination.
      A have the necessary
   security policies to ensure that unauthenticated Diameter node receiving a message in which these flags packets are
   not
      set appropriately SHOULD NOT reject the message processed.


2.3  Diameter Server Discovery

   Allowing for this reason,
      but MAY log the event dynamic Diameter server discovery will make it possible
   for diagnosis.


   Version
      This Version field MUST be set simpler and more robust deployment of AAA services.  In order to 1
   promote interoperable implementations of Diameter server discovery,
   the following mechanisms are described.  These are based on existing
   IETF standards.

   There are two cases where Diameter server discovery may be performed.
   The first is when a Diameter client needs to indicate discover a first-hop
   Diameter Version
      1.

   Message Length server.  The Message Length field second case is two octets and indicates the length when a Diameter server needs to
   discover another server - for further handling of
      the a Diameter message including
   operation. In both cases, the header fields.



Calhoun et al.             expires July 2001                    [Page 8]





Internet-Draft                                             February 2001


   Identifier
      The Identifier field following 'search order' is four octets, and aids in matching requests
      and replies.
   recommended:

      1. The sender MUST ensure that the identifier in a
      request (*-Request or *-Query) or indication (*-Ind) message is
      locally unique (to the sender) at any given time, Diameter implementation consults its list of static
         (manual) configured Diameter server locations.  These will be
         used if they exist and MAY attempt respond.

      2. The Diameter implementation uses SLPv2 [28] to ensure that the number is unique across reboots. discover
         Diameter services.  The sender of
      a response (*-Answer or *-Response) MUST ensure Diameter service template [32] is
         included in Appendix A. It is recommended that SLPv2 security
         be deployed (this requires distributing keys to SLPv2 agents.)
         This is discussed further in Appendix A.

         SLPv2 will allow Diameter implementations to discover the
      Identifier field contains the same Identifier value that was found
         location of Diameter servers in the corresponding request. For The identifier is normally a
      monotonically increasing number, whose start value was randomly
      generated. local site, as well as
         their characteristics.  Diameter servers should consider a message to be unique
      by examining with specific
         capabilities (say support for the source address, source port, Session-Id Accounting extension) can be
         requested, and
      Identifier field of the message.

   Command-Code only those will be discovered.

      3. The Command-Code field is four octets, and is used in order Diameter implementation uses DNS to
      communicate request the command associated with SRV RR [33]
         for the message. The 32-bit
      address space is managed by IANA (see section 9.2). '_diameter._sctp' and/or '_diameter._tcp' server in a
         particular domain.  The following
      Command Codes are currently defined Diameter implementation has to know in the
         advance which domain to look for an Diameter base protocol:

         Command-Name             Abbrev.    Code       Reference
         --------------------------------------------------------
         Device-Reboot-Ind         DRI       257           2.6
         Message-Reject-Ind        MRI       259           5.1
         Session-Termination-Ind   STI       274           3.6.1
         Session-Termination-      STR       275           3.6.2
            Request
         Session-Termination-      STA       276           3.6.3
            Answer

   Vendor-ID
      In the event that server in.  This
         could be deduced, for example, from the Command-Code field contains 'realm' in a vendor
      specific command, the four octet Vendor-ID field contains the IANA
      assigned "SMI Network Management Private Enterprise Codes" [2]
      value. If the Command-Code field contains NAI that



Calhoun et al.            expires August 2001                   [Page 8]





Internet-Draft                                                March 2001


         an IETF standard
      Command, Diameter implementation needed to perform an Diameter
         operation on.

         Diameter allows AAA peers to protect the Vendor-ID field MUST be set integrity and privacy
         of communication as well as to zero (0).

   AVPs
      AVPs are perform end-point
         authentication.  Still, it is prudent to employ DNS Security as
         a method of encapsulating information relevant precaution when using DNS SRV RRs to look up the location of
         a Diameter message. See section 2.3 for more information on AVPs.


2.2  Command Code Message Definitions server.  [34, 35, 36]


2.4  Mandatory Accounting Support

   All Diameter Command Code implementations MUST include a corresponding ABNF
   specification, which is used to define support the AVPs Diameter Accounting
   Extension [15]. An implementation that MUST, MAY and
   MUST does not support [15] does NOT be present.  The following format is used in the definition:




Calhoun et al.             expires July 2001                    [Page 9]





Internet-Draft                                             February 2001


      command-def      = command-name "::=" diameter-message

      diameter-name    = ALPHA *(ALPHA / DIGIT / "-")

      command-name     = diameter-name
                          ; The command-name has to be Command name,
                          ; defined in
   comply with the Diameter base or extended protocol.


3.0  Diameter Header

   A summary of the Diameter
                          ; specifications.

      diameter-message = header  [ *fixed] [ *required] [ *optional] [ *fixed] header           = "<Diameter-Header:" command-id ">"

      fixed            = [qual] "<" avp-spec ">"

      required         = [qual] "{" avp-spec "}"

      optional         = [qual] "[" avp-name "]"
                          ; format is shown below. The avp-name fields
   are transmitted in the 'optional' rule cannot
                          ; evaluate to any AVP Name which network byte order.

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |r r r r r r r r r r E I R| Ver |         Message Length        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Hop-by-Hop Identifier                    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      End-to-End Identifier                    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Command-Code                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Vendor-ID                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  AVPs ...
      +-+-+-+-+-+-+-+-+-+-+-+-+-

   Flags
      The Message Flags field is included
                          ; in a fixed or required rule.

      qual             = [min] "*" [max]
                          ; See ABNF conventions, RFC 2234 section 3.6.
                          ; thirteen bits.  The absence of any qualifiers implies that one
                          ; and only one such AVP following bits are
      assigned:

         r(eserved) MUST be present.
                          ;
                          ; NOTE:  "[" and "]" have zero - this flag bit is reserved for
                    future use.
         E(xpected Reply) - The message solicits a different meaning
                          ; than response.
         I(nterrogation) - The message is a Query or a Reply.
         R(esponse) - The message is a response to another message.




Calhoun et al.            expires August 2001                   [Page 9]





Internet-Draft                                                March 2001


      These flags are set depending on the command code used in ABNF (see a
      Diameter message.  This enables the optional rule, above).
                          ; These braces cannot type of message to be used to express an
                          ; optional fixed rules (such as an optional
                          ; ICV at the end.)  To do this,
      interpreted, even if the convention
                          ; specific command code is '0*1fixed'.

      min              = 1*DIGIT
                          ; The minimum number of times the element may
                          ; be present.

      max              = 1*DIGIT
                          ; The maximum number of times the element may
                          ; be present.

      avp-spec         = diameter-name
                          ; The avp-spec has to be an AVP Name, defined
                          ; not recognized.

      Command Type   Flags Set
      Indication      - - -
      Request         E - -
      Answer          - - R
      Query           E I -
      Reply           - I R

      A Diameter node MUST NOT set these flags in the base or extended any other combination.
      A Diameter
                          ; specifications.

      avp-name         = avp-spec | "AVP"



Calhoun et al.             expires July 2001                   [Page 10]





Internet-Draft                                             February 2001


                          ; The string "AVP" stands for *any* arbitrary
                          ; AVP Name, node receiving a message in which does these flags are not conflict with
      set appropriately SHOULD NOT reject the
                          ; required or fixed position AVPs defined in
                          ; message for this reason,
      but MAY log the command code definition. event for diagnosis.


   Version
      This Version field MUST be set to 1 to indicate Diameter Version
      1.

   Message Length
      The following Message Length field is a definition two octets and indicates the length of a fictitious command code:

      Example-Command ::= < Diameter-Header: 9999999 >
                          { User-Name }
                        * { Host-Name }
                        * [ AVP ]
                       0*1< Integrity-Check-Vector >


2.3  AVP Format
      the Diameter AVPs carry specific authentication, accounting and
   authorization information, security information as well as
   configuration details for message including the request and reply.

   Some AVPs MAY be listed more than once. header fields.

   Hop-by-Hop Identifier
      The effect of such an AVP Identifier field is
   specific, four octets, and is specified aids in each case by the AVP description.

   Each AVP of type OctetString matching requests
      and replies. The sender MUST be padded to align on ensure that the identifier in a 32 bit
   boundary, while other AVP types align naturally. NULL bytes are added
      request (*-Request or *-Query) or indication (*-Ind) message is
      locally unique (to the sender) at any given time, and MAY attempt
      to ensure that the end number is unique across reboots. The sender of
      a response (*-Answer or *-Response) MUST ensure that the AVP Data
      Identifier field till a word boundary is reached. contains the same Identifier value that was found
      in the corresponding request. For The
   length identifier is normally a
      monotonically increasing number, whose start value was randomly
      generated. Diameter servers should consider a message to be unique
      by examining the source address, source port, Session-Id and
      Identifier field of the padding is not reflected in message.

   End-to-End Identifier
      Unlike the AVP Length Hop-by-Hop Identifier, the End-to-End Identifier is
      used by servers to detect duplicate messages, and proxies MUST NOT
      modify this field.


2.3.1  AVP Header The fields in the AVP header sender of a request, query, indication,
      answer or response message MUST be sent insert a locally unique value in network byte order.
      this field.  The
   format combination of the header is:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           AVP Code                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          AVP Length           |     Reserved        |P|R|V|R|M|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Vendor-ID (opt)                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Data ...
      +-+-+-+-+-+-+-+-+

   AVP Code
      The AVP Code identifies the attribute uniquely. The first 256 Session-Id AVP and this field
      is used to detect duplicates.

   Command-Code



Calhoun et al.            expires July August 2001                  [Page 11] 10]





Internet-Draft                                             February                                                March 2001


      numbers are reserved for backward compatibility with RADIUS and
      are to be interpreted as per NASREQ [7]. AVP numbers 256


      The Command-Code field is four octets, and above
      are is used for Diameter, which are allocated in order to
      communicate the command associated with the message. The 32-bit
      address space is managed by IANA (see section
      9.1).

   AVP Length
      The AVP Length field is two octets, and indicates 15.2).

   Vendor-ID
      In the length of
      this AVP including event that the AVP Code, AVP Length, AVP Flags, Reserved, Command-Code field contains a vendor
      specific command, the four octet Vendor-ID field (if present) and contains the AVP data. IANA
      assigned "SMI Network Management Private Enterprise Codes" [2]
      value. If a message is
      received with the Command-Code field contains an invalid attribute length, IETF standard
      Command, the message SHOULD be
      rejected.

   AVP Flags
      The AVP Flags Vendor-ID field informs MUST be set to zero (0).

   AVPs
      AVPs are a method of encapsulating information relevant to the
      Diameter host how each attribute
      must be handled. Note that subsequent message. See section 4. for more information on AVPs.


3.1  Command Codes

   Every Diameter extensions MAY
      define bits to be message MUST contain a value in its header's Command-
   Code field, which is used within to determine the AVP Header, and an unrecognized
      bit should action that is to be considered an error. taken
   for a particular message. The 'R' and the reserved bits following Command Codes are unused and should be set to 0 and ignored on receipt, while
      the 'P' bit is defined in [11].

      The 'M' Bit, known as the Mandatory bit, indicates whether support
      of the AVP is required. If an AVP is received by a Home server or
      NAS with the 'M'  bit enabled and the receiver does not support
      the AVP, the message MUST  be rejected. If such an AVP is received
      by a Proxy or Redirect Server,
   the message MUST be forwarded to
      its logical destination, and Diameter base protocol:

         Command-Name             Abbrev.    Code       Reference
         --------------------------------------------------------
         Device-Reboot-Ind         DRI       257           6.1
         Device-Status-Ind         DSI       282           9.1
         Device-Watchdog-Req       DWR       280           7.1
         Device-Watchdog-Answer    DWA       281           7.2
         Message-Reject-Ind        MRI       259           10.1
         Session-Termination-Ind   STI       274           11.7.1
         Session-Termination-      STR       275           11.7.2
            Request
         Session-Termination-      STA       276           11.7.3
            Answer

   Every Command Code defined MUST NOT be rejected. It is the
      responsibility of the originator of include a message that corresponding ABNF
   specification, which is rejected for
      this purpose used to correct define the error. AVPs without the 'M' bit
      enabled are informational only and a receiver that receives a
      message with such an AVP that is not supported MUST, MAY simply ignore
      the AVP.

      The 'V' bit, known as the Vendor-Specific bit, indicates whether
      the optional Vendor-ID field is present in the AVP header. When
      set the AVP Code belongs to the specific vendor code address
      space.

      Unless otherwise noted, AVPs will have the following default AVP
      Flags field settings:
         The 'M' bit MUST be set. The 'V' bit and
   MUST NOT be set.


2.3.2  Optional Header Elements present.  The AVP Header contains one optional field. This field following format is only
   present if used in the respective bit-flag is enabled.

   Vendor-ID



Calhoun definition:

      command-def      = command-name "::=" diameter-message

      diameter-name    = ALPHA *(ALPHA / DIGIT / "-")

      command-name     = diameter-name
                          ; The command-name has to be Command name,
                          ; defined in the base or extended Diameter
                          ; specifications.



Calhoun et al.            expires July August 2001                  [Page 12] 11]





Internet-Draft                                             February                                                March 2001


      diameter-message = header  [ *fixed] [ *required] [ *optional] [ *fixed]

      header           = "<Diameter-Header:" command-id ">"

      fixed            = [qual] "<" avp-spec ">"

      required         = [qual] "{" avp-spec "}"

      optional         = [qual] "[" avp-name "]"
                          ; The Vendor-ID field is present if the 'V' bit is set avp-name in the AVP
      Flags field. The optional four octet Vendor-ID field contains the
      IANA assigned "SMI Network Management Private Enterprise Codes"
      [2] value, encoded in network byte order. Any vendor wishing 'optional' rule cannot
                          ; evaluate to
      implement a Diameter extension MUST use their own Vendor-ID along
      with their privately managed AVP address space, guaranteeing that
      they will not collide with any other vendor's extensions, nor with
      future IETF extensions.

      A vendor ID value of zero (0) corresponds to the IETF adopted AVP
      values, as managed by the IANA. Since the Name which is included
                          ; in a fixed or required rule.

      qual             = [min] "*" [max]
                          ; See ABNF conventions, RFC 2234 section 6.6.
                          ; The absence of the vendor ID
      field any qualifiers implies that the one
                          ; and only one such AVP MUST be present.
                          ;
                          ; NOTE:  "[" and "]" have a different meaning
                          ; than in question is not vendor specific,
      implementations SHOULD not use ABNF (see the zero (0) vendor ID.


2.3.3  AVP Data Formats

   The Data field is zero or more octets and contains information
   specific optional rule, above).
                          ; These braces cannot be used to express an
                          ; optional fixed rules (such as an optional
                          ; ICV at the Attribute. The format and length of end.)  To do this, the Data field convention
                          ; is
   determined by the AVP Code and AVP Length fields. '0*1fixed'.

      min              = 1*DIGIT
                          ; The format minimum number of times the
   Data field MAY element may
                          ; be one of the following data types. present.

      max              = 1*DIGIT
                          ; The interpretation of the values depends on the specification maximum number of times the
   AVP.  For example, an OctetString element may
                          ; be used present.

      avp-spec         = diameter-name
                          ; The avp-spec has to transmit human
   readable string data and Unsigned32 may be used to transmit a time
   value.  Conventions for these common interpretations are described
   below.

      OctetString an AVP Name, defined
                          ; in the base or extended Diameter
                          ; specifications.

      avp-name         = avp-spec | "AVP"
                          ; The data contains string "AVP" stands for *any* arbitrary data of variable length. Unless
         otherwise noted, the
                          ; AVP Length field MUST be set to at least 9
         (13 if Name, which does not conflict with the 'V' bit is enabled).  Data used to transmit (human
         readable) character string data uses
                          ; required or fixed position AVPs defined in
                          ; the UTF-8 [24] character
         set and is NOT NULL-terminated. command code definition.

   The minimum Length field MUST
         be 9, but can be set to any value up to 65527 bytes. AVP Values following is a definition of this type that do not align on a 32-bit boundary MUST adding
         necessary padding.

      Address
         32 bit (IPv4) [17] or 128 bit (IPv6) [16] address, most
         significant octet first. fictitious command code:

      Example-Command ::= < Diameter-Header: 9999999 >
                          { User-Name }



Calhoun et al.            expires August 2001                  [Page 12]





Internet-Draft                                                March 2001


                        * { Origin-FQDN }
                        * [ AVP ]
                       0*1< Integrity-Check-Vector >


4.0  Diameter AVPs

   Diameter AVPs carry specific authentication, accounting and
   authorization information, security information as well as
   configuration details for the request and reply.

   Some AVPs MAY be listed more than once. The format effect of the address (IPv4 or
         IPv6) is determined by the length. If the attribute value is such an
         IPv4 address, the AVP Length field MUST be 12 (16 if 'V' bit is
         enabled), otherwise
   specific, and is specified in each case by the AVP Length field description.

   Each AVP of type OctetString MUST be set padded to 24 (28
         if the 'V' bit is enabled) for IPv6 addresses.

      Integer32 align on a 32 bit signed value, in network byte order. The
   boundary, while other AVP Length



Calhoun et al.             expires July 2001                   [Page 13]





Internet-Draft                                             February 2001


         field MUST be set types align naturally. NULL bytes are added
   to 12 (16 if the 'V' bit end of the AVP Data field till a word boundary is enabled).

      Integer64
         64 bit signed value, in network byte order. reached. The
   length of the padding is not reflected in the AVP Length
         field field.


4.1  AVP Header

   The fields in the AVP header MUST be set to 16 (20 if the 'V' bit is enabled).

      Unsigned32
         32 bit unsigned value, sent in network byte order.  The AVP Length
         field MUST be set to 12 (16 if the 'V' bit is enabled).
         Unsigned32 values used to transmit time data contains
   format of the four
         most significant octets returned from NTP [18], in network byte
         order.

      Unsigned64
         32 bit unsigned value, in network byte order. The header is:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           AVP Code                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          AVP Length
         field MUST be set to 16 (20 if the 'V' bit is enabled).

      Float32
         This represents floating point values of single precision as
         described by [30].           |     Reserved        |P|r|V|r|M|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Vendor-ID (opt)                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Data ...
      +-+-+-+-+-+-+-+-+

   AVP Code
      The 32 bit value is transmitted in network
         byte order. AVP Code identifies the attribute uniquely. The first 256 AVP Length field MUST be set
      numbers are reserved for backward compatibility with RADIUS and
      are to 12 (16 if the
         'V' bit is enabled).

      Float64
         This represents floating point values of double precision be interpreted as
         described per NASREQ [7]. AVP numbers 256 and above
      are used for Diameter, which are allocated by [30].  The 64 bit value is transmitted in network
         byte order. IANA (see section
      15.1).

   AVP Length
      The AVP Length field MUST be set to 16 (20 if the
         'V' bit is enabled).

      Float128
         This represents floating point values two octets, and indicates the length of quadruple precision as
         described by [30].  The 128 bit value is transmitted in network
         byte order. The
      this AVP Length including the AVP Code, AVP Length, AVP Flags, Reserved,
      the Vendor-ID field MUST be set to 24 (28 if (if present) and the
         'V' bit AVP data. If a message is enabled).

      Grouped



Calhoun et al.            expires August 2001                  [Page 13]





Internet-Draft                                                March 2001


      received with an invalid attribute length, the message SHOULD be
      rejected.

   AVP Flags
      The Data AVP Flags field is specified as a sequence of AVPs.  Each of
         these AVPs follows - in informs the order in which they are specified -
         including their headers Diameter host how each attribute
      must be handled. Note that subsequent Diameter extensions MAY
      define bits to be used within the AVP Header, and padding. an unrecognized
      bit should be considered an error. The AVP Length field is 'r' and the reserved bits
      are unused and should be set to 8 (12 if 0 and ignored on receipt, while
      the 'V' 'P' bit is enabled) plus defined in [11].

      The 'M' Bit, known as the total length Mandatory bit, indicates whether support
      of all included AVPs, including their headers.


2.3.4  Grouped the AVP Values

   The Diameter protocol allows is required. If an AVP values of type 'Grouped.'  This
   implies that the Data field is actually received by a well defined sequence of
   AVPs.  It is possible to include Home server or
      NAS with the 'M'  bit enabled and the receiver does not support
      the AVP, the message MUST  be rejected. If such an AVP with is received
      by a Grouped type within Proxy or Redirect Server, the message MUST be forwarded to
      its logical destination, and MUST NOT be rejected. It is the
      responsibility of the originator of a



Calhoun et al.             expires July 2001                   [Page 14]





Internet-Draft                                             February 2001


   Grouped type, message that is, is rejected for
      this purpose to nest them. AVPs within an AVP of type
   Grouped have correct the same padding requirements as non-Grouped AVPs, error.  AVPs without the 'M' bit
      enabled are informational only and a receiver that receives a
      message with such an AVP that is not supported MAY simply ignore
      the AVP.

      The 'V' bit, known as
   defined the Vendor-Specific bit, indicates whether
      the optional Vendor-ID field is present in section 2.3.

   Grouped type the AVP specifications include an ABNF grammar [31]
   specifying header. When
      set the required sequence of AVPs.  Grouped AVP values Code belongs to the specific vendor code address
      space.

      Unless otherwise noted, AVPs will have the following default AVP
      Flags field settings:
         The 'M' bit MUST be
   in the specified sequence and set. The 'V' bit MUST NOT include other AVP values
   besides those specified by the Grouped AVP grammar.


2.3.4.1  Example AVP with a Grouped Data type be set.


4.2  Optional Header Elements

   The Example AVP (AVP Code 999999) Header contains one optional field. This field is of type Grouped and only
   present if the respective bit-flag is used to
   clarify how Grouped AVP values work. enabled.

   Vendor-ID
      The Grouped Data Vendor-ID field has is present if the 'V' bit is set in the
   following ABNF grammar:

      example-avp-val = Host-Name Host-IP-Address
         Host-Name       = ; See Section 2.4.1
         Host-IP-Address = ; See Section 2.6.4

   An Example AVP with
      Flags field. The optional four octet Vendor-ID field contains the Grouped Data Host-Name = "example.com",
   Host-IP-Address = "10.10.10.10" would be
      IANA assigned "SMI Network Management Private Enterprise Codes"
      [2] value, encoded as follows:

          0       1       2       3       4       5       6       7
      +-------+-------+-------+-------+-------+-------+-------+-------+
    0 |     Example in network byte order. Any vendor wishing to
      implement a Diameter extension MUST use their own Vendor-ID along
      with their privately managed AVP Header (AVP Code = 999999), Length = 40       |
      +-------+-------+-------+-------+-------+-------+-------+-------+
    8 |      Host-Name AVP Header (AVP Code = 265), Length = 19       |
      +-------+-------+-------+-------+-------+-------+-------+-------+
   16 |  'e'  |  'x'  |  'a'  |  'm'  |  'p'  |  'l'  |  'e'  |  '.'  |
      +-------+-------+-------+-------+-------+-------+-------+-------+
   24 |  'c'  |  'o'  |  'm'  |Padding|    Host-IP-Addr AVP Header    |
      +-------+-------+-------+-------+-------+-------+-------+-------+
   32 | (AVP Code = 257), Length = 12 |  0x0a |  0x0a |  0x0a | 0x0a  |
      +-------+-------+-------+-------+-------+-------+-------+-------+


2.3.5  Diameter Base Protocol AVPs

   The following table describes the Diameter AVPs defined in the base
   protocol, their AVP Code values, types, possible flag values and
   whether the AVP MAY be encrypted. address space, guaranteeing that
      they will not collide with any other vendor's extensions, nor with
      future IETF extensions.




Calhoun et al.            expires July August 2001                  [Page 15] 14]





Internet-Draft                                             February                                                March 2001


                                            +---------------------+
                                            |


      A vendor ID value of zero (0) corresponds to the IETF adopted AVP Flag rules   |
                                            |----+-----+----+-----|----+
      values, as managed by the IANA. Since the absence of the vendor ID
      field implies that the AVP in question is not vendor specific,
      implementations SHOULD not use the zero (0) vendor ID.


4.3  AVP Data Formats

   The Data field is zero or more octets and contains information
   specific to the Attribute. The format and length of the Data field is
   determined by the AVP  Section             |    |     |SHLD| MUST|MAY |
   Attribute Name Code Defined and AVP Length fields. The format of the
   Data Type  |MUST| field MAY | NOT|  NOT|Encr|
   -----------------------------------------|----+-----+----+-----|----|
   Authentication-  285  7.1.1.1 Unsigned32 |    |     |    |     | N  |
     Transform-Id                           |    |     |    |     |    |
   Authorization-   291  3.3     Unsigned32 |    |     |    |     | N  |
     Lifetime                               |    |     |    |     |    |
   Destination-NAI  293  6.8     OctetString|    |     |    |     | Y  |
   Digest           287  7.1.1.2 OctetString|    |     |    |     | N  |
   Encrypted-Data   290  7.1.2.3 OctetString|    |     |    |     | N  |
   Encrypted-       260  7.1.2   Grouped    | M  |     |    |     | N  |
     Payload                                |    |     |    |     |    |
   Encryption-      288  7.1.2.1 be one of the following data types.

   The interpretation of the values depends on the specification of the
   AVP.  For example, an OctetString may be used to transmit human
   readable string data and Unsigned32 |    |     |    |     | N  |
     Transform-Id                           |    |     |    |     |    |
   Error-Message    281  5.3     OctetString|    |     |    |     | N  |
   Error-Reporting- 294 may be used to transmit a time
   value.  Conventions for these common interpretations are described
   below.

      OctetString
         The data contains arbitrary data of variable length. Unless
         otherwise noted, the AVP Length field MUST be set to at least 9
         (13 if the 'V' bit is enabled).  Data used to transmit (human
         readable) character string data uses the UTF-8 [24] character
         set and is NOT NULL-terminated. The minimum Length field MUST
         be 9, but can be set to any value up to 65527 bytes. AVP Values
         of this type that do not align on a 32-bit boundary MUST have
         the necessary padding.

      Address
         32 bit (IPv4) [17] or 128 bit (IPv6) [16] address, most
         significant octet first. The format of the address (IPv4 or
         IPv6) is determined by the length. If the attribute value is an
         IPv4 address, the AVP Length field MUST be 12 (16 if 'V' bit is
         enabled), otherwise the AVP Length field MUST be set to 24 (28
         if the 'V' bit is enabled) for IPv6 addresses.

      Integer32
         32 bit signed value, in network byte order. The AVP Length
         field MUST be set to 12 (16 if the 'V' bit is enabled).

      Integer64
         64 bit signed value, in network byte order. The AVP Length
         field MUST be set to 16 (20 if the 'V' bit is enabled).

      Unsigned32
         32 bit unsigned value, in network byte order. The AVP Length
         field MUST be set to 12 (16 if the 'V' bit is enabled).



Calhoun et al.            expires August 2001                  [Page 15]





Internet-Draft                                                March 2001


         Unsigned32 values used to transmit time data contains the four
         most significant octets returned from NTP [18], in network byte
         order.

      Unsigned64
         32 bit unsigned value, in network byte order. The AVP Length
         field MUST be set to 16 (20 if the 'V' bit is enabled).

      Float32
         This represents floating point values of single precision as
         described by [30].  The 32 bit value is transmitted in network
         byte order. The AVP Length field MUST be set to 12 (16 if the
         'V' bit is enabled).

      Float64
         This represents floating point values of double precision as
         described by [30].  The 64 bit value is transmitted in network
         byte order. The AVP Length field MUST be set to 16 (20 if the
         'V' bit is enabled).

      Float128
         This represents floating point values of quadruple precision as
         described by [30].  The 128 bit value is transmitted in network
         byte order. The AVP Length field MUST be set to 24 (28 if the
         'V' bit is enabled).

      Grouped
         The Data field is specified as a sequence of AVPs.  Each of
         these AVPs follows - in the order in which they are specified -
         including their headers and padding.  The AVP Length field is
         set to 8 (12 if the 'V' bit is enabled) plus the total length
         of all included AVPs, including their headers.


4.4  Grouped AVP Values

   The Diameter protocol allows AVP values of type 'Grouped.'  This
   implies that the Data field is actually a well defined sequence of
   AVPs.  It is possible to include an AVP with a Grouped type within a
   Grouped type, that is, to nest them. AVPs within an AVP of type
   Grouped have the same padding requirements as non-Grouped AVPs, as
   defined in section 4.0.

   Grouped type AVP specifications include an ABNF grammar [31]
   specifying the required sequence of AVPs.  Grouped AVP values MUST be
   in the specified sequence and MUST NOT include other AVP values
   besides those specified by the Grouped AVP grammar.




Calhoun et al.            expires August 2001                  [Page 16]





Internet-Draft                                                March 2001


4.4.1  Example AVP with a Grouped Data type

   The Example AVP (AVP Code 999999) is of type Grouped and is used to
   clarify how Grouped AVP values work.  The Grouped Data field has the
   following ABNF grammar:

      example-avp-val = Origin-FQDN Host-IP-Address
         Origin-FQDN     = ; See Section 5.1
         Host-IP-Address = ; See Section 6.1.4

   An Example AVP with the Grouped Data Origin-FQDN = "example.com",
   Host-IP-Address = "10.10.10.10" would be encoded as follows:

          0       1       2       3       4       5       6       7
      +-------+-------+-------+-------+-------+-------+-------+-------+
    0 |     Example AVP Header (AVP Code = 999999), Length = 40       |
      +-------+-------+-------+-------+-------+-------+-------+-------+
    8 |     Origin-FQDN AVP Header (AVP Code = 265), Length = 19      |
      +-------+-------+-------+-------+-------+-------+-------+-------+
   16 |  'e'  |  'x'  |  'a'  |  'm'  |  'p'  |  'l'  |  'e'  |  '.'  |
      +-------+-------+-------+-------+-------+-------+-------+-------+
   24 |  'c'  |  'o'  |  'm'  |Padding|    Host-IP-Addr AVP Header    |
      +-------+-------+-------+-------+-------+-------+-------+-------+
   32 | (AVP Code = 257), Length = 12 |  0x0a |  0x0a |  0x0a | 0x0a  |
      +-------+-------+-------+-------+-------+-------+-------+-------+


4.5  Diameter Base Protocol AVPs

   The following table describes the Diameter AVPs defined in the base
   protocol, their AVP Code values, types, possible flag values and
   whether the AVP MAY be encrypted.

                                            +---------------------+
                                            |    AVP Flag rules   |
                                            |----+-----+----+-----|----+
                   AVP  Section             |    |     |SHLD| MUST|MAY |
   Attribute Name  Code Defined  Data Type  |MUST| MAY | NOT|  NOT|Encr|
   -----------------------------------------|----+-----+----+-----|----|
   Authentication-  285 13.1.1.1 Unsigned32 |    |     |    |     | N  |
     Transform-Id                           |    |     |    |     |    |
   Authorization-   291  11.3    Unsigned32 |    |     |    |     | N  |
     Lifetime                               |    |     |    |     |    |
   Destination-FQDN 293  5.3     OctetString|    |     |    |     | Y  |
   Digest           287 13.1.1.2 OctetString|    |     |    |     | N  |
   DSI-Event        297  9.1.1   Unsigned32 | M  |     |    |     | N  |
   -----------------------------------------|----+-----+----+-----|----|




Calhoun et al.            expires August 2001                  [Page 17]





Internet-Draft                                                March 2001


                                            +---------------------+
                                            |    AVP Flag rules   |
                                            |----+-----+----+-----|----+
                   AVP  Section             |    |     |SHLD| MUST|MAY |
   Attribute Name  Code Defined  Data Type  |MUST| MAY | NOT|  NOT|Encr|
   -----------------------------------------|----+-----+----+-----|----|
   Encrypted-Data   290 13.1.2.3 OctetString|    |     |    |     | N  |
   Encrypted-       260  13.1.2  Grouped    | M  |     |    |     | N  |
     Payload                                |    |     |    |     |    |
   Encryption-      288 13.1.2.1 Unsigned32 |    |     |    |     | N  |
     Transform-Id                           |    |     |    |     |    |
   Error-Message    281  10.3    OctetString|    |     |    |     | N  |
   Error-Reporting- 294  10.4    OctetString|    |     |    |     | Y  |
     FQDN                                   |    |     |    |     |    |
   Extension-Id     258  6.1.3   Integer32  | M  |     |    |     | Y  |
   Failed-AVP       279  10.1.1  OctetString|    |     |    |     | Y  |
   Failed-Command-  270  10.1.2  Unsigned32 |    |     |    |     | Y  |
     Code                                   |    |     |    |     |    |
   Firmware         267  6.1.2   Unsigned32 |    |     |    | V,M | Y  |
     -Revision                              |    |     |    |     |    |
   Host-IP-Address  257  6.1.4   Address    | M  |     |    |  V  | N  |
   Origin-FQDN      264  5.1     OctetString| M  |     |    |  V  | N  |
   Integrity-Check  259  13.1.1  Grouped    | M  |     |    |     | N  |
     -Value                                 |    |     |    |     |    |
   Key-Id           286  13.4    Unsigned32 |    |     |    |     | N  |
   Max-Wait-Time    295  11.6    Unsigned32 | M  |     |    |  V  | N  |
   Nonce            261  13.2    OctetString|    |     |    |     | N  |
   Origin-Realm     296  5.2     OctetString| M  |     |    |  V  | N  |
   Plaintext-Data-  289 13.1.2.2 Unsigned32 |    |     |    |     | N  |
     Length                                 |    |     |    |     |    |
   Proxy-Address    280  12.4.5  Address    | M  |     |    |  V  | N  |
   Proxy-Info       284  12.4.6  OctetString| M  |     |    |  V  | N  |
   Proxy-State       33  12.4.4  Grouped    | M  |     |    |  V  | N  |
   Redirect-Host    292  12.3.1  Grouped    |    |     |    |     | Y  |
   Redirect-Host-   278  12.3.2  Address    |    |     |    |     | Y  |
     Address                                |    |     |    |     |    |
   Redirect-Host-   277  12.3.3  Unsigned32 |    |     |    |     | Y  |
     Port                                   |    |     |    |     |    |
   Result-Code      268  10.2    Unsigned32 | M  |     |    |     | N  |
   Route-Record     282  12.4.3  OctetString| M  |     |    |  V  | N  |
   Destination-     283  12.4.7  OctetString| M  |     |    |  V  | N  |
     Realm                                  |    |     |    |     |    |
   Session-Id       263  11.2    OctetString| M  |     |    |     | Y  |
   Session-Timeout   27  11.4    Unsigned32 |    |     |    |     | Y  |
   Timestamp        262  13.3    Unsigned32 |    |     |    |     | N  |
   User-Name          1  11.5    OctetString|    |     |    |     | Y  |
   Vendor-Id        266  6.1.1   Unsigned32 |    |     |    | V,M | Y  |
   -----------------------------------------|----+-----+----+-----|----|



Calhoun et al.            expires August 2001                  [Page 18]





Internet-Draft                                                March 2001


5.0  Message Forwarding

   All Diameter messages MUST include the Origin-FQDN and Origin-Realm
   AVPs. These AVPs are used to identify the source of the message.
   When responding to a request or query message, the Origin-FQDN and
   Origin-Realm AVPs are replaced with the local node's information.

   When a Diameter entity receives a Diameter message of type Request,
   Query or Indication that includes a Destination-FQDN AVP, and the
   host specified in the AVP can be contacted directly, the message MUST
   be forwarded to the host in question.

   The Destination-FQDN AVP is used when the destination of the message
   is fixed, such as:

      - Authentication requests that span multiple round trips
      - A Diameter message that uses a security mechanism that makes use
        of a pre-established session key shared between the source and
        the final destination of the message.
      - Server initiated messages that MUST be received by a specific
        Diameter client (e.g. NAS), such as the Session-Termination-Ind
        message, which is used to request that a particular user's
        session be terminated.

   Proxies receiving messages that contain the Destination-FQDN AVP MUST
   verify whether they are able to forward Diameter messages to the host
   specified in the AVP, and if so, MUST forward the message to the host
   in question. Otherwise, the message routing procedures described in
   section 12.0 MUST be followed.

   This section defines the Diameter AVPs that MUST be added in all
   messages originated by a Diameter node (including nodes creating
   Response and Answer messages).


5.1 Origin-FQDN AVP

   The Origin-FQDN AVP (AVP Code 264) is of type OctetString, encoded in
   the UTF-8 [24] format. This AVP identifies the endpoint which
   originated the Diameter message, i.e. the NAS, home server, or
   broker. Proxy servers do not modify this AVP. All Diameter messages
   MUST include the Origin-FQDN AVP, which contains the host name of the
   originator of the Diameter message and MUST follow the NAI [8] naming
   conventions.

   Note that the Origin-FQDN AVP may resolve to more than one address as
   the Diameter peer may support more than one address.




Calhoun et al.            expires August 2001                  [Page 19]





Internet-Draft                                                March 2001


5.2 Origin-Realm AVP

   The Origin-Realm AVP (AVP Code 296) is of type OctetString, encoded
   in the UTF-8 [24] format. This AVP contains the Realm of the
   originator of any Diameter message.


5.3     OctetString|    |     |    |     | Y  |
     NAI                                    |    |     |    |     |    |  Destination-FQDN AVP

   The Destination-FQDN AVP (AVP Code 293) is of type OctetString,
   encoded in the UTF-8 [24] format, and contains the Fully Qualified
   Domain Name (FQDN) of the intended recipient of the message. This AVP
   MUST be present in all unsolicited server initiated messages. The
   value of the Destination-FQDN AVP is set to the value of the Origin-
   FQDN AVP found in a message from the intended target host.


6.0  Capabilities Exchange

   When two Diameter peers establish a transport connection, they MUST
   send the Device-Reboot-Ind message. This message has two purposes.
   First it allows a peer's identity to be discovered, and allows for
   capabilities exchange, such as the supported protocol version number,
   and the locally supported extensions.

   The receiver uses the extensions advertised in order to determine
   whether it SHOULD send certain application-specific Diameter
   commands. A Diameter node MUST retain the supported extensions in
   order to ensure that unrecognized commands and/or AVPs are not sent
   to a peer.

   The Device-Reboot-Ind message MUST NOT be proxied, or redirected.

   Since the DRI cannot be proxied, it is still possible that a upstream
   proxy receives a message for which it has no available peers to
   handle the extension that corresponds to the Command-Code. In such
   instances, the Device-Status-Ind message is used (see Section 9.1) to
   inform the downstream to take action.

   With the exception of the Device-Reboot-Ind message, a message of
   type Request, Query or Indication that includes the Extension-Id     258  2.6.3   Integer32  | M  |     |    |     | Y  |
   Failed-AVP       279  5.1.1   OctetString|    |     |    |     | Y  |
   Failed-Command-  270  5.1.2   Unsigned32 |    |     |    |     | Y  |
     Code                                   |    |     |    |     |    |
   Firmware         267  2.6.2   Unsigned32 |    |     |    | V,M | Y  |
     -Revision                              |    |     |    |     |    |
   Host-IP-Address  257  2.6.4   Address    | M  |     |    |  V  | N  |
   Host-Name        264  2.4.1   OctetString| M  |     |    |  V  | N  |
   Integrity-Check  259  7.1.1   Grouped    | M  |     |    |     | N  |
     -Value                                 |    |     |    |     |    |
   Key-Id           286  7.4     Unsigned32 |    |     |    |     | N  |
   Nonce            261  7.2     OctetString|    |     |    |     | N  |
   Plaintext-Data-  289  7.1.2.2 Unsigned32 |    |     |    |     | N  |
     Length                                 |    |     |    |     |    |
   Proxy-Address    280  6.4.5   Address    | M  |     |    |  V  | N  |
   Proxy-Info       284  6.4.6   OctetString| M  |     |    |  V  | N  |
   Proxy-State       33  6.4.4   Grouped    | M  |     |    |  V  | N  |
   Redirect-Host    292  6.3.1   Grouped    |    |     |    |     | Y  |
   Redirect-Host-   278  6.3.2   Address    |    |     |    |     | Y  |
     Address                                |    |     |    |     |    |
   Redirect-Host-   277  6.3.3   Unsigned32 |    |     |    |     | Y  |
     Port                                   |    |     |    |     |    |
   Result-Code      268  5.2 AVP
   MAY only be forwarded to a host that has explicitely advertised
   support for the extension (or has advertised the Wildcard Extension).


6.1  Device-Reboot-Ind (DRI) Command

   The Device-Reboot-Ind (DRI), indicated by the Command-Code set to



Calhoun et al.            expires August 2001                  [Page 20]





Internet-Draft                                                March 2001


   257, is sent to inform a peer that a reboot has, or will, occur.

   When Diameter is run over SCTP [26], which allows for connections to
   span multiple interfaces, hence multiple IP addresses, the Device-
   Reboot-Ind message MUST contain one Host-IP-Address AVP for each
   potential IP address that MAY be locally used when transmitting
   Diameter messages.

   If a Diameter node receives a DRI message that results in an error, a
   Message-Reject-Ind message MUST be returned.

   Message Format

      <Device-Reboot-Ind> ::= < Diameter Header: 257 >
                              { Origin-FQDN }
                              { Origin-Realm }
                           1* { Host-IP-Address }
                              { Vendor-Id }
                            * { Extension-Id }
                              [ Firmware-Revision ]
                            * [ AVP ]
                           0*1< Integrity-Check-Value >


6.1.1  Vendor-Id AVP

   The Vendor-Id AVP (AVP Code 266) is of type Unsigned32 | M  |     |    |     | N  |
   Route-Record     282  6.4.3   OctetString| M  |     |    |  V  | N  |
   Routing-Realm    283  6.4.7   OctetString| M  |     |    |  V  | N  |
   Session-Id       263  3.2     OctetString|    |     |    |     | Y  |
   Session-Timeout   27  3.6 and contains
   the IANA assigned "SMI Network Management Private Enterprise Codes"
   [2] value of the Diameter device.

   This MAY be used in order to know which vendor specific attributes
   may be sent to the peer. It is also envisioned that the combination
   of the Vendor-Name and the Firmware-Revision (section 6.1.2) AVPs MAY
   provide very useful debugging information.


6.1.2  Firmware-Revision AVP

   The Firmware-Revision AVP (AVP Code 267) is of type Unsigned32 |    |     |    |     | Y  | and is
   used to inform a Diameter peer of the firmware revision of the
   issuing device.

   For devices that do not have a firmware revision (general purpose
   computers running Diameter software modules, for instance), the
   revision of the Diameter software module may be reported instead.


6.1.3  Extension-Id AVP



Calhoun et al.            expires July August 2001                  [Page 16] 21]





Internet-Draft                                             February                                                March 2001


                                            +---------------------+
                                            |    AVP Flag rules   |
                                            |----+-----+----+-----|----+


   The Extension-Id AVP  Section             |    |     |SHLD| MUST|MAY |
   Attribute Name (AVP Code Defined  Data Type  |MUST| MAY | NOT|  NOT|Encr|
   -----------------------------------------|----+-----+----+-----|----|
   Timestamp        262  7.3     Unsigned32 |    |     |    |     | N  |
   User-Name          1  3.5     OctetString|    |     |    |     | Y  |
   Vendor-Id        266  2.6.1 258) is of type Unsigned32 |    |     |    | V,M | Y  |
   -----------------------------------------|----+-----+----+-----|----|


2.4  Mandatory AVPs and is used
   in order to identify a specific Diameter extension. This section defines AVP is used
   in the Diameter AVPs that Device-Reboot-Ind message in order to inform the peer what
   extensions are locally supported.  The Extension-Id MUST also be
   present in all messages that are defined in a separate Diameter messages.


2.4.1 Host-Name
   specification and have an Extension ID assigned.

   Each Diameter extension draft MUST have an IANA assigned extension
   Identifier (see section 15.3). The base protocol does not require an
   Extension-Id since its support is mandatory.

   There MAY be more than one Extension-Id AVP within a Diameter
   Device-Reboot-Ind message. The following values are recognized:

      NASREQ              1 [7]
      Strong Security     2 [11]
      Resource Management 3 [29]
      Mobile-IP           4 [10]
      Accounting          5 [15]
      Wildcard Extension  0xffffffff

   Servers acting as Redirect or Proxy servers (see Section 12.0) MAY
   wish to either advertise all supported extensions, or the wildcard
   extension. The receiver of a wildcard extension MUST assume that the
   sender supports all extensions.

   Proxy servers are responsible for finding a downstream server that
   supports the extension of a particular message. If none can be found,
   a DSI message is returned with the DSI-Event AVP set to
   DIAMETER_UNABLE_TO_DELIVER.


6.1.4  Host-IP-Address AVP

   The Host-Name Host-IP-Address AVP (AVP Code 264) [1] 257) is of type OctetString. This AVP
   identifies the endpoint which originated the Diameter message, i.e. the
   NAS, home server, or broker. Proxy servers do not modify this AVP.
   All Diameter messages MUST include the Host-Name AVP, which contains the
   host name of the originator of the Diameter message Address and MUST follow
   the NAI [8] naming conventions.

   Note that the Host-Name AVP may resolve is used
   to more than one address
   as the inform a Diameter peer may support more than one of the sender's IP address.


2.5  State Machine

   This section contains a finite state machine,  All source
   addresses that MUST be observed
   by all Diameter implementations. Each a Diameter node MUST follow the
   state machine described below when communicating with each peer.

      State     Event                          Action    New State
      -----     -----                          ------    ---------
      Initial   Local request expects to establish     SCTP      Idle
                communication with a Diameter  Connect
                peer use with which there is no
                existing transport level
                connection established.

      Initial   Receive transport level        Send DRI  Wait-DRI
                connection request from SCTP [26] MUST be
   advertised in the Device-Reboot-Ind message by including a
                Diameter peer.



Calhoun et al.             expires July 2001                   [Page 17]





Internet-Draft                                             February 2001


      Idle      Connection Established         Send DRI  Wait-DRI

      Idle      Receive DRI                    Send DRI  Open

      Wait-DRI  Receive DRI                    None      Open

      Open      Receive other messages         Process   Open
                                               Message

      Open      Receive DRI                    Cleanup   Closed

      Open      Transport level failure        Cleanup   Closed

      Closed    Diameter Entity shutdown       Close     Initial
                or close connection with peer  connection

   The Initial and Idle states MAY Host-IP-
   Address AVP for each address. This AVP MUST ONLY be merged if used in the local SCTP
   implementation is able to implement
   Device-Reboot-Ind message.


7.0  Transport Failure Detection

   Given the piggyback nature of data during the
   connection phase.

   When the Cleanup action Diameter protocol, it is invoked, recommended that
   transport failures be detected as soon as possible. Detecting such
   failures will minimize the Diameter node SHOULD attempt occurrence of messages sent to forward all pending requests unavailable
   servers, resulting in unnecessary delays, and replies, which haven't been
   acknowledged, will provide better



Calhoun et al.            expires August 2001                  [Page 22]





Internet-Draft                                                March 2001


   failover performance.

   In order to an alternate server (when possible). If pro-actively detect such failures, the final
   destination for a specific message is Diameter protocol
   defines the host that Device-Watchdog-Request message, which is sent to an
   inactive peer. A peer is considered inactive if no longer
   accessible, messages were sent
   or received from the message in question SHOULD be responded peer within the current watchdog interval period
   (see Section 17.0), and no request or query messages are pending with
   the
   Result-Code AVP set peer.

   For implementations that have access to DIAMETER_UNABLE_TO_DELIVER.


2.6  Device-Reboot-Ind (DRI) Command

   A Diameter device sends the Device-Reboot-Ind message, by setting the
   Command-Code field with a Retransmission Time-Out
   (RTO) value of 257, to inform the underlying transport connection, a peer DWR SHOULD be
   sent once per RTO of that connection, plus the watchdog interval
   period, with a
   reboot has just occurred. Since SCTP [26] allows for connections to
   span multiple interfaces, hence multiple IP addresses, jiterring of +/- 50%.

   If the Device-
   Reboot-Ind message DWR is unanswered, the time until the next DWR is sent MUST contain one Host-IP-Address AVP for each
   potential IP address that MAY be locally used when transmitting
   Diameter messages.

   The DRI message is also used for capabilities negotiation, such as
   recalculated after exponentially backing off the supported protocol version number, RTO portion.  When
   the value of the DWR's current watchdog interval period reaches the
   maximum watchdog interval (Secton 17.0), backoff is not continued,
   and the locally supported
   extensions. peer is marked as failed.  DWR messages continue to be sent
   (jittered) at the final interval for detection for failover.  The receiver uses the extensions advertised in order
   current watchdog interval is returned to
   determine whether it SHOULD send certain application-specific
   Diameter commands. A Diameter node MUST retain its starting point when a
   DWA is received or the supported
   extensions in order to ensure peer resumes activity.

   Implementations that unrecognized commands and/or AVPs
   are do not sent have access to the RTO SHOULD perform an
   Round Trip Time (RTT) measurement for a peer. Note that in given peer when a proxy environment, it Device-
   Watchdog-Answer message is still
   possible that received for a downstream proxy has no available peer that have
   advertised non-backed off DWR.  The
   fixed RTO base should be replaced by RTT-Multiplier (Section 17.0)
   times the extension measured RTT.

   An example of the backoff sequence, excluding jitter, would be:
      30+RTO , 30+2*RTO , 30+4*RTO , 30+8*RTO, 60, 60, 60

   Note that corresponds to exponential backoff MUST be performed before the maximum is
   reached.


7.1  Device-Watchdog-Request

   The Device-Watchdog-Request (DWR), indicated by the Command-Code, Command-Code set
   to 280, is sent to a peer when no traffic has been exchanged between
   two peers as defined in Section 7.0, and
   therefore no requests are pending with
   the request cannot be forwarded any further. The Diameter peer.

   Message Format







Calhoun et al.            expires July August 2001                  [Page 18] 23]





Internet-Draft                                             February                                                March 2001


   base protocol provides this error reporting, via the Result-Code AVP.

   Once the transport layer connection has been established, a


      <Device-Watchdog-Request>  ::= < Diameter
   entity MUST issue a DRI message, regardless of whether Header: 280 >
                                     { Origin-FQDN }
                                     { Origin-Realm }
                                  0*1< Integrity-Check-Value >


7.2  Device-Watchdog-Answer

   The Device-Watchdog-Answer (DWA), indicated by the peer was
   statically configured, or dynamically discovered (see Section 2.7 for
   more information).

   If a peer Command-Code set
   to 281, is no longer reachable, sent as a Diameter device SHOULD
   periodically attempt response to establish a transport level connection with the peer and send a DRI Device-Watchdog-Request message. This message does not require a
   reply. If a Diameter node receives a DRI message that results
   A receiver of the DWA SHOULD perform RTT calculation in an
   error, a Message-Reject-Ind message MUST be returned. the event
   that the transport RTO information is not available.

   Message Format

      <Device-Reboot-Ind>

      <Device-Watchdog-Answer>  ::= < Diameter Header: 257 281 >
                                    { Host-Name }
                           1* { Host-IP-Address Result-Code }
                                    { Vendor-Id Origin-FQDN }
                            *
                                    { Extension-Id Origin-Realm }
                              [ Firmware-Revision ]
                            * [ AVP ]
                                 0*1< Integrity-Check-Value >


2.6.1  Vendor-Id AVP

   The Vendor-Id AVP (AVP Code 266)


7.3  Failover/Failback Procedures

   In the event that a transport failure is of type Unsigned32 detected with a peer, it is
   necessary for all pending request, query and contains
   the IANA assigned "SMI Network Management Private Enterprise Codes"
   [2] value of the Diameter device.

   This MAY be used in order indication messages to know which vendor specific attributes
   may
   be sent forwarded to an alternate server, if possible. This is commonly
   referred to as failover.

   In order for a Diameter node to perform failover procedures, it is
   necessary for the node to maintain a pending message queue for a
   given peer. It When a response is also envisioned that the combination
   of received, the Vendor-Name and message is removed from
   the Firmware-Revision (section 2.6.2) AVPs MAY
   provide very useful debugging information.


2.6.2  Firmware-Revision AVP queue. The Firmware-Revision AVP (AVP Code 267) Hop-by-Hop Identifier field MAY be used to match the
   corresponding response with the queued response.

   When a transport failure is detected, all messages in the queue are
   sent to an alternate server, if possible. An example of type Unsigned32 and a case where
   it is
   used not possible for forward the message to inform an alternate server is
   when the message has a Diameter peer of fixed destination, and the firmware revision of unavailable peer is
   the
   issuing device.

   For devices message's final destination (see Destination-FQDN AVP). Such an
   error requires that do not have a firmware revision (general purpose
   computers running Diameter software modules, for instance), the
   revision of server return an DSI with the DSI-Event AVP
   set to DIAMETER_UNABLE_TO_DELIVER.

   As described in section 2.1, a connection request should be
   periodically attempted with the failed peer in order to re-establish
   the Diameter software module may transport connection. Once a connection has been successfully
   established, messages can once again be reported instead. forwarded to the peer. This
   is commonly referred to as failback.



Calhoun et al.            expires July August 2001                  [Page 19] 24]





Internet-Draft                                             February                                                March 2001


2.6.3  Extension-Id AVP

   The Extension-Id AVP (AVP Code 258) is of type Unsigned32 and is used
   in order to identify a specific Diameter extension.


8.0  Peer State Machine

   This AVP is used
   in the Device-Reboot-Ind message in order to inform the peer what
   extensions are locally supported.  The Extension-Id section contains a finite state machine, that MUST also be
   present in observed
   by all messages that are defined in a separate Diameter
   specification and have an Extension ID assigned. implementations. Each Diameter extension draft node MUST have an IANA assigned extension
   Identifier (see section 9.3). The base protocol does not require an
   Extension-Id since its support is mandatory.

   There MAY be more than one Extension-Id AVP within a Diameter
   Device-Reboot-Ind message. The following values are recognized:

      NASREQ              1 [7]
      Strong Security     2 [11]
      Resource Management 3 [29]
      Mobile-IP           4 [10]
      Accounting          5 [15]

   Furthermore, servers acting as Redirect or Proxy servers (see Section
   6.0) MAY wish to advertise support for ALL possible extensions. Such
   servers are then responsible for finding a downstream server that
   supports the extension of a particular message. This is done by
   including follow the Extension-Id AVP with a value of zero (0).


2.6.4  Host-IP-Address AVP

   The Host-IP-Address AVP (AVP Code 257) [1] is of type Address and is
   used
   state machine described below when communicating with each peer.

      State     Event                          Action         New State
      -----     -----                          ------         ---------
      Initial   Local request to inform establish     SCTP/TCP       Idle
                communication with a Diameter  Connect
                peer of the sender's IP address.  All
   source addresses that a Diameter node expects to use with SCTP [26]
   MUST be advertised in the Device-Reboot-Ind message by including which there is no
                existing transport level
                connection established.

      Initial   Receive transport level        Send DRI       Wait-DRI
                connection request from a
   Host-IP-Address AVP for each address. This AVP MUST ONLY be used in
   the Device-Reboot-Ind message.


2.7
                Diameter Server Discovery

   Allowing for dynamic peer.

      Idle      Connection Established         Send DRI       Wait-DRI

      Idle      Receive DRI                    Send DRI +     Open
                                               Reset Watchdog
                                               Timer

      Wait-DRI  Receive DRI                    Reset Watchdog Open
                                               Timer

      Open      Receive other messages         Process        Open
                                               Message +
                                               Reset Watchdog
                                               Timer

      Open      Idle link, and no pending      Send DWR       Open
                requests

      Open      Receive DWR                    Send DWA       Open

      Open      Receive DWA                    Calculate RTT  Open

      Open      Receive DRI                    Cleanup        Closed

      Open      Transport level failure        Cleanup        Closed

      Closed    Diameter server discovery will make it possible
   for simpler Entity shutdown or    Close          Initial
                close connection with peer     connection

   The Initial and more robust deployment of AAA services.  In order Idle states MAY be merged if the local SCTP
   implementation is able to
   promote interoperable implementations implement the piggyback of Diameter server discovery, data during the following mechanisms are described.  These are based on existing
   IETF standards.

   There are two cases where Diameter server discovery may be performed.



Calhoun et al.            expires July August 2001                  [Page 20] 25]





Internet-Draft                                             February                                                March 2001


   The first is when a Diameter client needs to discover a first-hop
   Diameter server.  The second case


   connection phase.

   When the Cleanup action is when invoked, the failover procedures are
   executed (see Section 7.3 for more information).


9.0  Per-Hop Error Signaling

   There are many instances where error conditions occur on a Diameter server
   node, that needs to
   discover another server - for further handling be signalled to the downstream server, and not
   necessarily to the Diameter client. Examples of such error conditions
   are invalid time synchronization, inability to forward a Diameter
   operation. message to a
   particular domain, etc. In both these cases, returning the error back to
   the following 'search order' is
   recommended:

      1. The Diameter implementation consults its list of static
         (manual) configured Diameter server locations.  These client will be
         used if they exist only cause delay, and respond.

      2. The Diameter implementation uses SLPv2 [28] to discover
         Diameter services.  The Diameter service template [32] is
         included perhaps confusion in Appendix A. It is recommended that SLPv2 security
         be deployed (this requires distributing keys to SLPv2 agents.)
         This
   roaming networks.

   Therefore, when such errors occur, it is discussed further in Appendix A.

         SLPv2 will allow Diameter implementations to discover the
         location of Diameter servers in the local site, as well as
         their characteristics.  Diameter servers with specific
         capabilities (say support necessary for the Accounting extension) can error to
   be
         requested, handled by the downstream next hop, and only those will some local action be discovered.

      3. The Diameter implementation uses DNS taken
   to request rectify the SRV RR [33]
         for the '_diameter._sctp' server in a particular domain.  The
         Diameter implementation has to know in advance which domain problem, such as forwarding to
         look for an Diameter server in.  This could be deduced, for
         example, from the 'realm' in a NAI that an Diameter
         implementation needed to perform an Diameter operation on.

         Diameter allows AAA peers different next hop.

                      Request         +--------+ Link Broken
          +-------------------------->|Diameter|----///----+
          |     +---------------------|        |           v
   +-----+---+  |         DSI         | Server |     +--------+
   |Diameter |<-+ (Unable to protect the integrity and privacy Forward) +--------+     |Diameter|
   |Client or|                                       |        |
   | Server  |--+                     +--------+     | Server |
   +---------+  |      Request        |Diameter|     +--------+
                +-------------------->|        |           ^
                                      | Server |-----------+
                                      +--------+
               Figure 1 - Example of communication as well as Per-Hop Error Condition


9.1  Device-Status-Ind

   The Device-Status-Ind (DSI), indicated by the Command-Code set to perform end-point
         authentication.  Still, it
   282, is prudent sent to employ DNS Security as inform a precaution when using DNS SRV RRs to look up the location of peer that an event has occurred.

   When a Diameter server.  [34, 35, 36]


3.0  "User" Sessions

   When node issues a user requests access DSI message downstream, the target peer
   MUST attempt to rectify the network, problem, or issue a Diameter client issues
   an authentication and authorization request to its local server. similar message
   downstream. The
   request contains a Session-Id AVP, which Device-Status-Ind message MUST NOT be proxied, but
   MAY be forwarded, as long as the Origin-FQDN AVP is used in subsequent
   messages (e.g. subsequent authorization, accounting, etc) relating replaced to
   include the user's session. local node's identity.

   Message Format





Calhoun et al.            expires August 2001                  [Page 26]





Internet-Draft                                                March 2001


      <Device-Status-Ind> ::= < Diameter Header: 282 >
                              { Origin-FQDN }
                              { Origin-Realm }
                              [ DSI-Event ]
                            * [ AVP ]
                           0*1< Integrity-Check-Value >


9.1.1  DSI-Event AVP

   The Session-Id Result-Code AVP (AVP Code 297) is a means for the client of type Unsigned32 and
   servers to correlate
   indicates that an event occurred which requires attention from a
   Diameter message with a user session.

   When a peer.  The DSI-Event contains an IANA-managed 32-bit address
   space representing events (see section 15.9). Diameter server authorizes provides four
   different classes of event notification, all identified by the
   thousands digit:
      - 1xxx (Informational Events)
      - 3xxx (Redirect Notification)
      - 4xxx (Transient Failure Events)
      - 5xxx (Permanent Failure Events)

   A non-recognize class (one whose first digit is not defined in this
   section) MUST be handled as a user to use network resources, it
   SHOULD add permanent failure.


9.1.1.1  Informational Events

   Events that fall within the Authorization-Lifetime AVP Informational category are used to the response. The
   Authorization-Lifetime AVP defines the maximum amount of time inform
   a peer that a user



Calhoun et al.             expires July 2001                   [Page 21]





Internet-Draft                                             February 2001


   MAY make use of the resources before another authorization request is
   to cannot be transmitted to immediately satisfied, and a further
   response will be issued in the server. If near future.

      DIAMETER_STILL_WORKING             1001
         A request's Max-Wait-Time has expired, and the server does not receive
   another authorization request before is still
         being serviced. This event MAY be sent prior to the timeout occurs, it SHOULD
   release any state information related Max-Wait-
         Time expiration, to inform the user's session. Note peer that the Authorization-Lifetime AVP implies how long the Diameter
   server request is willing not
         expected to pay for be serviced in the services rendered, therefore a
   Diameter client SHOULD NOT expect payment for services rendered past alloted time, but the session expiration time.

   The base protocol does not include any authorization request
   messages, since these are largely application-specific and are
   defined in a Diameter protocol extension document. However, the base
   protocol does define a set of messages is
         not being abandoned.


9.1.1.2  Redirect Event

   Errors that fall within the Redirect Notification category are used
   to terminate
   user sessions. These are used to allow servers that maintain state
   information to free resources.


3.1  State Machine

   This section contains inform a finite state machine, representing peer that the life
   cycle of Diameter sessions, request cannot be satisfied locally and MUST
   should instead be observed by all Diameter
   implementations.  The term Service-Specific below refers forwarded to a message
   defined in a Diameter extension (e.g. Mobile IP, NASREQ).

      State     Event                          Action     New State
      -----     -----                          ------     ---------
      Idle      Client another server.

      DIAMETER_REDIRECT_INDICATION       3001
         A proxy or Device Requests      send serv. Pending
                access                         specific
                                               auth req

      Idle      Service-Specific authorization send serv. Open redirect server has determined that the request received,
         could not be satisfied locally and          specific
                successfully processed         response

      Pending   Successful Service-Specific    Grant      Open
                Authorization response         Access
                received

      Open      Authorization-Lifetime expires send serv. Open
                                               specific
                                               auth req

      Open      Successful Service-Specific    Extend     Open
                Authorization response         Access
                received

      Open      Failed Service-Specific        Discon.    Closed
                Authorization response         user/device the initiator of the request



Calhoun et al.            expires July August 2001                  [Page 22] 27]





Internet-Draft                                             February                                                March 2001


                received.

      Open      Session-Timeout Expires on     send STR   Discon
                NAS

      Open      STI Received                   send STR   Discon

      Open      Session-Timeout Expires on     send STI   Discon
                home AAA server

      Discon    STI Received                   ignore     Discon

      Discon    STR Received                   Discon.    Closed
                                               user/device

      Discon    STA Received                   Discon.    Closed
                                               user/device

      Closed    Transition


         should direct the request directly to state            Cleanup

   When the Cleanup action is invoked, server, whose contact
         information has been added to the Diameter node response.


9.1.1.3  Transient Failure Events

   Errors that fall within the transient failures category are used to
   inform a peer that the request could not be satisfied at the time it
   was received, but MAY attempt be able to
   release all resources satisfy the request is the error is
   corrected.

      DIAMETER_TIME_INVALID              4001
         The originator of the Device-Status-Ind message detected a time
         synchronization error, and a request for time synchronization
         is being requested.

      DIAMETER_UNSUPPORTED_TRANSFORM     4002
         A message was received that included an Integrity-Check-Value
         or CMS-Data AVP [11] that made use of an unsupported transform.

      DIAMETER_INVALID_ICV               4003
         The Request did not contain a valid Integrity-Check-Value AVP.


9.1.1.4  Permanent Failure Events

   Errors that fall within the permanent failures category are used to
   inform the peer that the particular session. Any event not
   listed above MUST be considered as an error condition, request failed, and a
   response, if applicable, MUST cannot be returned to satified by
   the originator of the
   message.


3.2  Session-Id AVP Device-Status-Ind. The Session-Id AVP (AVP Code 263) is receiver of type OctetString and is used
   to identify a specific session (see section 3.0). The Session-Id data
   uses DSI
   message with the UTF-8 [24] character set. All messages pertaining DSI-Event set to a
   specific session MUST include only value that falls within this
   event class SHOULD forward the message to an alternate peer, if one Session-Id
   is available.

      DIAMETER_INVALID_RECORD_ROUTE      5001
         The last Record-Route AVP and in the same
   value MUST be used throughout message is not set to the life
         identity of a session. When present, the Session-Id SHOULD appear immediately following sender of the Diameter
   Header (see section 2.1).

   For messages message. See Section 12.0 for
         more information.

      DIAMETER_COMMAND_UNSUPPORTED       5002
         The Request contained a Command-Code that do the receiver did not pertain to a specific session, multiple
   Session-Id AVPs MAY be present as long as they are encapsulated
   within
         recognize or support. The Device-Status-Ind message MUST also
         contain an Failed-Command-Code AVP of type Grouped. containing the unrecognized
         Command-Code.

      DIAMETER_UNABLE_TO_DELIVER         5003
         The Session-Id MUST request could not be globally unique delivered to a host that handles the
         realm, and extension, requested at any given time this time.




Calhoun et al.            expires August 2001                  [Page 28]





Internet-Draft                                                March 2001


      DIAMETER_REALM_NOT_SERVED          5004
         The originator of the DSI message could not deliver the message
         since it the realm requested is unknown.

      DIAMETER_ERROR_TOO_BUSY            5005
         When returned, a Diameter node SHOULD attempt to sent the
         message to an alternate peer.

      DIAMETER_CANNOT_PROCESS_IN_TIME    5006
         The time limit in a request's Max-Wait-Time AVP has expired,
         and no response is available. This value MAY also be used by to
         inform a peer that the server request is not expected to identify be processed
         within the session (or flow). The format Max-Wait-Time value.


10.0  End-to-End Error Signaling

   There are five different types of
   the session identifier SHOULD be as follows:

   <Sender's Host-Name><sender's port number> <monotonically increasing
   32 bit value><optional value>




Calhoun et al.             expires July 2001                   [Page 23]





Internet-Draft                                             February 2001 error conditions that can occur
   within Diameter.

   The monotonically increasing 32 bit value SHOULD NOT start at zero
   upon reboot, but rather start at first occurs when a random value. Diameter message is poorly formatted, and
   unrecognizable, indicated in the figure below as "Bad Message". This will minimize
   error condition applies if a received message is less than the possibility length
   of overlapping Session-Ids after the Diameter header. Messages that generate such an error are
   ignored.

   A second case occurs when a reboot.
   Alternatively, Command-Code field is set to an implementation MAY keep track of the increasing
   value in non-volatile memory. The optional value
   unsupported value, which is implementation
   specific but may include a modem's device Id, shown as "Unknown Command" in the figure.
   Such errors generate a layer 2 address,
   timestamp, etc.

   The session Id Device-Status-Ind message, and require per-hop
   behavior.

   A third case occurs when an AVP is created received, marked as Mandatory ('M'
   bit is set), and is unknown by the Diameter device initiating the
   session, which in most cases receiver. This error condition is done by
   labelled as "Unknown AVP" in the client. Note figure below, and causes a Message-
   Reject-Ind message to be sent.

   The fourth case occurs when a message is received that contains an
   AVP with either an unknown or illegal value. This is labelled as "Bad
   AVP Value", and requires that a
   Session-Id MAY Message-Reject-Ind message be used by more than one extension (e.g.
   authentication for sent.

   The last two cases require that a specific service and accounting, Message-Reject-Ind message be
   generated to ensure that such errors are identified in both of which
   have separate extensions).


3.3  Authorization-Lifetime AVP request
   and response messages.

   The Authorization-Lifetime AVP (AVP Code 291) last error condition occurs when an extension specific error is
   identified in a request or response message. In a message of type Unsigned32
   and contains
   request or query, the maximum number of seconds of service to natural corresponding answer or response
   message MUST be provided used. However, if an error occurs while processing an



Calhoun et al.            expires August 2001                  [Page 29]





Internet-Draft                                                March 2001


   indication, answer or response message, a Message-Reject-Ind is used
   to inform the user before peer that an error occurred while processing the user
   message.

   Error Type           Ignore       Send    Send     Send
                        Message      MRI     DSI      Response
   Bad Message             X
   Unknown Command                            X
   Unknown AVP                        X
   Bad AVP Value                      X
   Request,Query Error                                  X
   Answer,Response,Ind Error          X

   "Ignore Message" indicates that the message is simply dropped. "Send
   MRI" means that a Message-Reject-Ind message is sent to be re-authenticated and/or re-
   authorized. Great care should be taken when report the Authorization-
   Lifetime value
   error condition, while "Send DSI" requires that a Device-Status-Ind
   message is determined, since sent (see Section 9.1). "Send Response" means that the
   response message for a low value could create
   significant Diameter traffic, which could congest both request or query message is returned.


10.1  Message-Reject-Ind (MRI) Command

   The Message-Reject-Ind (MRI), indicated by the network Command-Code set to
   259, provides a generic means of completing transactions by
   indicating errors in the messages that initiated them. The Message-
   Reject-Ind command is sent in response:

      1. An error is found in a message of type Ind, Answer and the servers.

   This Response
      2. A Unknown AVP, marked as Mandatory, is received
      3. An AVP MAY be provided by was received with an unknown, or illegal, value.

   The Message-Reject-Ind message MUST contain the client same Hop-by-Hop
   Identifier value in the header as a hint of the maximum
   duration message that it is willing to accept. However, caused the server DOES NOT
   have to observe error
   condition. If the hint, and MAY return a value that is smaller than Session-Id AVP was present in the hint. A value of zero means that no re-authorization is required.


3.4  Session-Timeout original message,
   the same AVP

   The Session-Timeout MUST be present in the MRI.

   Message Format














Calhoun et al.            expires August 2001                  [Page 30]





Internet-Draft                                                March 2001


      <Message-Reject-Ind message> ::= < Diameter Header: 259 >
                                       [ Session-Id ]
                                       { Result-Code }
                                       { Origin-FQDN }
                                       { Origin-Realm }
                                       { Error-Reporting-FQDN }
                                       [ Failed-Command-Code ]
                                       [ Failed-AVP ]
                                     * [ AVP (AVP Code 27) [1] is of type Unsigned32 and
   contains ]
                                     * [ Proxy-State ]
                                     * [ Route-Record ]
                                     * [ Destination-Realm ]
                                    0*1< Integrity-Check-Value >

      where the maximum number of seconds of service to be provided to Result-Code AVP indicate the user before termination nature of the session. A value of zero means
   that this session has an unlimited number of seconds before
   termination.

   This error causing
      rejection, and the Failed-AVP AVP MAY be provided provides some minimal debugging
      data by the client as indicating a hint of specific AVP type which caused the maximum
   duration that it is willing to accept. However, problem.
      See the server DOES NOT
   have to observe description of the hint, and MAY return a value that is smaller than Result-Code AVP for indication of when
      the hint.


3.5  User-Name Failed-AVP AVP MUST be present in the message.  See [25] for
      more information.


10.1.1  Failed-AVP AVP

   The User-Name Failed-AVP AVP (AVP Code 1) [1] 279) is of type OctetString, which



Calhoun et al.             expires July 2001                   [Page 24]





Internet-Draft                                             February 2001


   contains the User-Name.  The value is represented as a UTF-8
   character encoded string in a format consistent with the NAI
   specification [8].


3.6  Session Termination

   The Diameter Base Protocol OctetString and provides
   debugging information in cases where a set of messages that MAY be
   used by any peer to explicitly request that a previously
   authenticated and/or authorized session be terminated. Since the
   Session-Id is typically tied rejected or not
   fully processed due to erroneous information in a particular service (i.e. Mobile IP,
   NASREQ, etc), the session termination messages are used to request
   that specific AVP. The
   value of the service tied to Result-Code AVP will provide information on the Session Id be terminated.


3.6.1  Session-Termination-Ind

   The Session-Termination-Ind (STI), indicated by reason
   for the Command-Code set
   to 274, MAY be sent by any Failed-AVP AVP.

   A Diameter entity to the access device to
   request that a particular session be terminated. This message MAY be
   used when contain one or more Failed-AVP AVPs, each
   containing a server detects complete AVP that a session MUST could not be terminated, which
   is typically done as processed successfully.
   The possible reasons for this AVP are the presence of an improperly
   constructed AVP, an unsupported or unrecognized AVP, an invalid AVP
   value; or the omission of a policy decision (e.g. local resources have
   been expended, etc). required AVP.


10.1.2  Failed-Command-Code

   The Destination-NAI Failed-Command-Code AVP MUST be present, and
   contain the NAI (AVP Code 270) is of type Unsigned32 and
   contains the access device offending Command-Code that initiated the session (see
   section 3.0).

   Upon receipt of the STI message, resulted in sending the access device SHOULD issue a
   Session-Terminate-Request
   Message-Reject-Ind message.

   Message Format

      <Session-Termination-Ind>  ::= < Diameter Header: 274 >
                                     < Session-Id >
                                     { Host-Name }
                                     { User-Name }
                                     { Destination-NAI }
                                   * [


10.2  Result-Code AVP ]
                                   * [ Proxy-State ]
                                   * [ Route-Record ]
                                   * [ Routing-Realm ]
                                  0*1< Integrity-Check-Value >

3.6.2  Session-Termination-Request

   The Session-Termination-Request (STR), indicated by the Command-Code
   set to 275, is sent by the access device to inform the Diameter
   Server that an authenticated and/or authorized session Result-Code AVP (AVP Code 268) is being
   terminated. of type Unsigned32 and
   indicates whether a particular request was completed successfully or



Calhoun et al.            expires July August 2001                  [Page 25] 31]





Internet-Draft                                             February                                                March 2001


   Upon receipt of the STR, the


   whether an error occurred. All Diameter Server SHOULD release all
   resources for the session indicated by messages of type *-Response
   or *-Answer MUST include one Result-Code AVP, while messages of type
   -Ind MAY include the Session-Id Result-Code AVP. Any
   intermediate server in the Proxy-Chain MAY also release any
   resources, if necessary.

   Message Format

      <Session-Termination-Request>  ::= < Diameter Header: 275 >
                                         < Session-Id >
                                         { Host-Name }
                                         { User-Name }
                                       * [ A non-successful Result-Code
   AVP ]
                                       * [ Proxy-State ]
                                       * [ Route-Record ]
                                       * [ Routing-Realm ]
                                      0*1< Integrity-Check-Value >


3.6.3  Session-Termination-Answer (one containing a non 2001 value) MUST include the Error-
   Reporting-FQDN AVP.

   The Session-Termination-Answer (STA), indicated Result-Code data field contains an IANA-managed 32-bit address
   space representing errors (see section 15.4). Diameter provides four
   different classes of errors, all identified by the Command-Code
   set to 276, thousands digit:
      - 1xxx (Informational)
      - 2xxx (Success)
      - 4xxx (Transient Failures)
      - 5xxx (Permanent Failure)

   A non-recognize class (one whose first digit is sent by not defined in this
   section) MUST be handled as a permanent failure.


10.2.1  Informational

   Errors that fall within the Diameter Server Informational category are used to acknowledge inform
   a requester that the
   session has been terminated. The Result-Code AVP MUST request cannot be present, immediately satisfied and
   MAY contain an indication a
   further response will be issued in the near future. There are
   currently no errors that an error occurred while servicing fall within this class.


10.2.2  Success

   Errors that fall within the
   STR.

   Message Format

      <Session-Termination-Answer>  ::= < Diameter Header: 276 >
                                        < Session-Id >
                                        { Result-Code }
                                        { Host-Name }
                                        { User-Name }
                                      * [ AVP ]
                                      * [ Proxy-State ]
                                      * [ Route-Record ]
                                      * [ Routing-Realm ]
                                     0*1< Integrity-Check-Value >


4.0  Reliable Transport

   In order Success category are used to provide rapid discovery of inform a
   peer that a request has been successfully completed.

      DIAMETER_SUCCESS                   2001
         The Request was successfully completed.


10.2.4  Transient Failures

   Errors that fall within the failure of transient failures category are used to
   inform a communicating
   peer, aggressive retransmission and rapid transactions, Diameter
   peers MUST peer that the request could not be satisfied at the time it
   was received, but MAY be able to send and receive messages over SCTP [26].  A
   Diameter peer MAY use TCP [27], as TCP does provide reliable
   transport, though it does not have satisfy the request in the future.

      DIAMETER_AUTHENTICATION_REJECTED   4001
         The authentication process for the user failed, most likely due
         to an invalid password used by the user. Further attempts MUST
         only be tried after prompting the properties listed above. user for a new password.

      DIAMETER_NO_END_2_END_SECURITY     4002
         A proxy has detected that end-to-end security has been applied



Calhoun et al.            expires July August 2001                  [Page 26] 32]





Internet-Draft                                             February                                                March 2001


5.0  Error Reporting

   There are five different types


         to portions of errors within Diameter. The first
   being where a the Diameter message is poorly formatted message, and
   unrecognizable, indicated below by "Bad Message". This error
   condition applies if a received message creates a fatal error (e.g.
   fails transport level authentication, cannot be parsed, etc).

   The second case involves receiving a Command-Code that is the proxy does not
   supported, which is shown below by "Unknown Command". The third case
   is where an AVP is received, marked mandatory and is unknown by
         allow this security mode since it needs to alter the
   receiver, which is labeled below as "Unknown AVP".

   This fourth case involves receiving a message with a known AVP, yet by
         applying some local policies.


10.2.5  Permanent Failures

   Errors that fall within the value is either unknown or illegal, which is shown below as "Bad
   AVP Value".  The last case occurs when an error occurs while
   processing a specific extension command, which is not related permanent failures category are used to
   inform the
   message format and is labeled "Extension Error" below.

   Error Type           Ignore Message          Send         Extension
                                         Message-Reject-Ind  Response +
                                                             Result-Code
   Bad Message                 X
   Unknown Command                               X
   Unknown AVP                                                   X
   Bad AVP Value                                                 X
   Extension Error                                               X

   "Ignore Message" indicates peer that the message request failed, and should not be attempted
   again.

      DIAMETER_USER_UNKNOWN              5001
         A request was received for a user that is simply dropped. unknown, therefore
         authentication and/or authorization failed.

      DIAMETER_AVP_UNSUPPORTED           5002
         The
   "Message-Reject-Ind" indicates peer received a message that contained an AVP that a Message-Reject-Ind is not
         recognized or supported and was marked with the Mandatory bit.
         A Diameter message with this error MUST
   be sent to contain one or more
         Failed-AVP AVP containing the peer as described in AVPs that caused the appropriate section. failure.

      DIAMETER_UNKNOWN_SESSION_ID        5003
         The
   "Extension Response + Result-Code" error has request or response contained an extension-specific
   command code, and indicates that unknown Session-Id.

      DIAMETER_AUTHORIZATION_REJECTED    5004
         A request was received for which the appropriate Response user could not be
         authorized.  This error could occur if the service requested is
         not permitted to the user.

      DIAMETER_INVALID_AVP_VALUE         5005
         The request contained an AVP with an invalid value in its data
         portion. A Diameter message indicating this error MUST be sent with include
         the Result-Code AVP set to offending AVPs within a value Failed-AVP AVP.

      DIAMETER_MISSING_AVP               5006
         The request did not contain an AVP that
   enables is required by the peer to understand
         Command Code definition. If this value is sent in the nature of Result-
         Code AVP, a Failed-AVP AVP SHOULD be included in the problem.


5.1  Message-Reject-Ind (MRI) Command message.
         The Message-Reject-Ind (MRI), indicated by data portion of the Command-Code set to
   259, provides a generic means Failed-AVP MUST only contain the AVP
         Code of completing transactions by
   indicating errors in the messages that initiated them. missing AVP.

      DIAMETER_INVALID_CMS_DATA          5007
         The Message-
   Reject-Ind command is sent in response:

      1. An error is found in Request did not contain a message of type Ind, Answer and Response
      2. A message that contains an unrecognized command code
      3. valid CMS-Data [11] AVP.

      DIAMETER_LOOP_DETECTED             5008
         A Proxy or Redirect server detected a loop while trying to get
         the message was received that cannot pass to the Home Diameter server. Further attempts
         should not be attempted until the base protocol error
         checking. loop has been fixed.



Calhoun et al.            expires July August 2001                  [Page 27] 33]





Internet-Draft                                             February                                                March 2001


   In the event that a


      DIAMETER_AUTHORIZATION_FAILED      5009
         A request is was received that causes an error defined
   in a Diameter extension, the appropriate response with for which the Result-
   Code AVP SHOULD user could not be sent.

   The Message-Reject-Ind message MUST contain the same identification
   in the header and include the Session-Id if it was present in the
   original message that it is responding to, even if
         authorized at this time. This error could occur when the identification user
         has already expended allowed resources, or is erroneous.

   Message Format only permitted to
         access services within a time period.

      DIAMETER_CONTRADICTING_AVPS        5010
         The structure of the Message-Reject-Ind message is defined as
      follows:

      <Message-Reject-Ind message> ::= < Home Diameter Header: 259 >
                                       [ Session-Id ]
                                       { Result-Code }
                                       { Host-Name }
                                       { Error-Reporting-NAI }
                                       [ Failed-Command-Code ]
                                       [ Failed-AVP ]
                                     * [ AVP ]
                                     * [ Proxy-State ]
                                     * [ Route-Record ]
                                     * [ Routing-Realm ]
                                    0*1< Integrity-Check-Value >

      where the Identifier value server has detected AVPs in the message header request that
         contradicted each other, and optionally is not willing to provide service
         to the Session-Id AVP are copied from user. One or more Failed-AVP AVPs MUST be present,
         containing the message being rejected. AVPs that contradicted each other.


10.3  Error-Message AVP

   The
      Result-Code Error-Message AVP indicate the nature (AVP Code 281) is of the error causing
      rejection, and the Failed-AVP AVP provides some minimal debugging
      data by indicating a specific AVP type which caused the problem.
      See the description of the OctetString.  It is a
   human readable UTF-8 character encoded string.  It MAY accompany a
   Result-Code AVP for indication of when
      the Failed-AVP as a human readable error message. The Error-Message
   AVP MUST is not intended to be present useful in the message.  See [25] for
      more information.


5.1.1  Failed-AVP real-time, and SHOULD NOT be
   expected to be parsed by network entities.


10.4  Error-Reporting-FQDN AVP

   The Failed-AVP Error-Reporting-FQDN AVP (AVP Code 279) 294) is of type OctetString and provides
   debugging information OctetString,
   encoded in cases where a request is rejected or not
   fully processed due the UTF-8 [24] format.  This AVP contains the Network
   Access Identifier of the Diameter host that set the Result-Code AVP
   to erroneous information in a specific AVP. The value of other than 2001 (Success). This AVP is intended to be used
   for troubleshooting purposes, and MUST be set when the Result-Code
   AVP will provide information on indicates a failure.


11.0  "User" Sessions

   When a user requests access to the reason network, a Diameter client issues
   an authentication and authorization request to its local server. The
   request contains a Session-Id AVP, which is used in subsequent
   messages (e.g. subsequent authorization, accounting, etc) relating to
   the user's session. The Session-Id AVP is a means for the Failed-AVP AVP.

   A client and
   servers to correlate a Diameter message MAY contain one or more Failed-AVP AVPs, each
   containing with a complete user session.

   When a Diameter server authorizes a user to use network resources, it
   SHOULD add the Authorization-Lifetime AVP that could not be processed successfully. to the response. The possible reasons for this
   Authorization-Lifetime AVP are defines the maximum amount of time a user
   MAY make use of the resources before another authorization request is
   to be transmitted to the server. If the server does not receive
   another authorization request before the timeout occurs, it SHOULD
   release any state information related to the presence of an improperly user's session. Note



Calhoun et al.            expires July August 2001                  [Page 28] 34]





Internet-Draft                                             February                                                March 2001


   constructed AVP, an unsupported or unrecognized AVP, an invalid AVP
   value; or the omission of a required AVP.


5.1.2  Failed-Command-Code

   The Failed-Command-Code AVP (AVP Code 270) is of type Unsigned32 and
   contains the offending Command-Code


   that resulted in sending the
   Message-Reject-Ind message.


5.2  Result-Code AVP

   The Result-Code Authorization-Lifetime AVP (AVP Code 268) is of type Unsigned32 and
   indicates whether a particular request was completed successfully or
   whether an error occurred. All implies how long the Diameter messages of type *-Response
   or *-Answer MUST include one Result-Code AVP, while messages of type
   -Ind MAY include
   server is willing to pay for the Result-Code AVP. A non-successful Result-Code
   AVP (one containing services rendered, therefore a non 2001 value) MUST include the Error-
   Reporting-NAI AVP.

   The Result Code field contains an IANA-managed 32-bit address space
   representing errors (see section 9.4).
   Diameter provides five
   different classes of errors, all identified by client SHOULD NOT expect payment for services rendered past
   the thousands digit:
      - 1xxx (Informational)
      - 2xxx (Success)
      - 3xxx (Redirect Notification)
      - 4xxx (Transient Failures)
      - 5xxx (Permanent Failure)
      - 6xxx (Hop-by-Hop Failure)

   A non-recognize class (one whose first digit is session expiration time.

   The base protocol does not include any authorization request
   messages, since these are largely application-specific and are
   defined in this
   section) MUST be handled as a permanent failure.


5.2.1  Informational

   Errors that fall within Diameter protocol extension document. However, the Informational category base
   protocol does define a set of messages that are used to terminate
   user sessions. These are used to inform allow servers that maintain state
   information to free resources.


11.1  Session State Machine

   This section contains a requester that finite state machine, representing the request cannot be immediately satisfied life
   cycle of Diameter sessions, and a
   further response will MUST be issued in the near future.

      DIAMETER_BE_PATIENT                1001 observed by all Diameter
   implementations.  The term Service-Specific below refers to a message
   defined in a Diameter server responsible for authentication and/or
         authorizing the user cannot satisfy the extension (e.g. Mobile IP, NASREQ).

      State     Event                          Action     New State
      -----     -----                          ------     ---------
      Idle      Client or Device Requests      send serv. Pending
                access                         specific
                                               auth req

      Idle      Service-Specific authorization send serv. Open
                request at the moment, received, and will respond within the next 3 seconds.


5.2.2  Success          specific
                successfully processed         response

      Pending   Successful Service-Specific    Grant      Open
                Authorization response         Access
                received

      Open      Authorization-Lifetime expires send serv. Open
                                               specific
                                               auth req

      Open      Successful Service-Specific    Extend     Open
                Authorization response         Access
                received

      Open      Failed Service-Specific        Discon.    Closed
                Authorization response         user/device
                received.

      Open      Session-Timeout Expires on     send STR   Discon
                NAS



Calhoun et al.            expires July August 2001                  [Page 29] 35]





Internet-Draft                                             February 2001


   Errors that fall within the Success category are used to inform a
   peer that a request has been successfully completed.

      DIAMETER_SUCCESS                                                March 2001
         The Request was successfully completed.


5.2.3  Redirect Notification

   Errors that fall within the Redirect Notification category are used


      Open      STI Received                   send STR   Discon

      Open      Session-Timeout Expires on     send STI   Discon
                home AAA server

      Discon    STI Received                   ignore     Discon

      Discon    STR Received                   Discon.    Closed
                                               user/device

      Discon    STA Received                   Discon.    Closed
                                               user/device

      Closed    Transition to inform a peer that state            Cleanup

   When the request cannot be satisfied locally and
   should instead be forwarded Cleanup action is invoked, the Diameter node MAY attempt to another server.

      DIAMETER_REDIRECT_INDICATION       3001
         A proxy or redirect server has determined that
   release all resources for the request
         could particular session. Any event not
   listed above MUST be satisfied locally considered as an error condition, and the initiator of the request
         should direct the request directly a
   response, if applicable, MUST be returned to the server, whose contact
         information has been added to originator of the response. This error code
         MUST NOT be sent in a Message-Reject-Ind
   message.


5.2.4  Transient Failures

   Errors that fall within the transient failures category are


11.2  Session-Id AVP

   The Session-Id AVP (AVP Code 263) is of type OctetString and is used
   to
   inform identify a peer that the request could not be satisfied at the time it
   was received, but MAY be able to satisfy the request in the future.

      DIAMETER_AUTHENTICATION_REJECTED   4001 specific session (see section 11.0). The authentication process for Session-Id
   data uses the user failed, most likely due UTF-8 [24] character set. All messages pertaining to an invalid password used by the user. Further attempts a
   specific session MUST include only one Session-Id AVP and the same
   value MUST be tried after prompting used throughout the user for a new password.

      DIAMETER_NO_END_2_END_SECURITY     4002
         A proxy has detected that end-to-end security has been applied
         to portions life of a session. When present,
   the Diameter message, and Session-Id SHOULD appear immediately following the proxy does Diameter
   Header (see section 3.0).

   For messages that do not
         allow this security mode pertain to a specific session, multiple
   Session-Id AVPs MAY be present as long as they are encapsulated
   within an AVP of type Grouped.

   The Session-Id MUST be globally unique at any given time since it needs to alter the message is
   used by
         applying some local policies.


5.2.5  Permanent Failures

   Errors that fall within the permanent failures category are used server to
   inform identify the peer that session (or flow). The format of
   the request failed, and should not session identifier SHOULD be attempted
   again.

      DIAMETER_USER_UNKNOWN              5001
         A request was received for as follows:

   <Sender's Origin-FQDN><sender's port number> <monotonically
   increasing 32 bit value><optional value>

   The monotonically increasing 32 bit value SHOULD NOT start at zero
   upon reboot, but rather start at a user that random value. This will minimize
   the possibility of overlapping Session-Ids after a reboot.
   Alternatively, an implementation MAY keep track of the increasing
   value in non-volatile memory. The optional value is unknown, therefore
         authentication and/or authorization failed. implementation



Calhoun et al.            expires July August 2001                  [Page 30] 36]





Internet-Draft                                             February                                                March 2001


      DIAMETER_AVP_UNSUPPORTED           5002
         The peer received


   specific but may include a message that contained an AVP that modem's device Id, a layer 2 address,
   timestamp, etc.

   The session Id is not
         recognized or supported and was marked with created by the Mandatory bit.
         A Diameter message with this error MUST contain one or more
         Failed-AVP AVP containing device initiating the AVPs that caused
   session, which in most cases is done by the failure.

      DIAMETER_UNKNOWN_SESSION_ID        5003
         The request or response contained an unknown Session-Id.

      DIAMETER_AUTHORIZATION_REJECTED    5004
         A request was received client. Note that a
   Session-Id MAY be used by more than one extension (e.g.
   authentication for a specific service and accounting, both of which
   have separate extensions).


11.3  Authorization-Lifetime AVP

   The Authorization-Lifetime AVP (AVP Code 291) is of type Unsigned32
   and contains the maximum number of seconds of service to be provided
   to the user could not be
         authorized.  This error could occur if before the service requested user is
         not permitted to be re-authenticated and/or re-
   authorized. Great care should be taken when the user.

      DIAMETER_INVALID_AVP_VALUE         5005
         The request contained an AVP with an invalid Authorization-
   Lifetime value in its data
         portion. A is determined, since a low value could create
   significant Diameter message with this result code MUST include traffic, which could congest both the offending AVPs within a Failed-AVP AVP.

      DIAMETER_MISSING_AVP               5006
         The request did not contain an network
   and the servers.

   This AVP MAY be provided by the client as a hint of the maximum
   duration that it is required by willing to accept. However, the
         Command Code definition. If this server DOES NOT
   have to observe the hint, and MAY return a value that is sent in smaller than
   the Result-
         Code AVP, a Failed-AVP hint. A value of zero means that no re-authorization is required.


11.4  Session-Timeout AVP SHOULD be included in the message.

   The data portion of the Failed-AVP MUST have its Session-Timeout AVP (AVP Code set
         to the Data field 27) [1] is of type Unsigned32 and
   contains the missing AVP.

      DIAMETER_INVALID_CMS_DATA          5007
         The Request did not contain a valid CMS-Data [11] AVP.

      DIAMETER_LOOP_DETECTED             5008
         A Proxy or Redirect server detected a loop while trying maximum number of seconds of service to get
         the message be provided to
   the Home Diameter server. Further attempts
         should not be attempted until user before termination of the loop has been fixed.

      DIAMETER_AUTHORIZATION_FAILED      5009 session. A request was received for which the user could not be
         authorized at value of zero means
   that this time. session has an unlimited number of seconds before
   termination.

   This error could occur when AVP MAY be provided by the user
         has already expended allowed resources, or is only permitted to
         access services within client as a time period.

      DIAMETER_CONTRADICTING_AVPS        5010
         The Home Diameter server has detected AVPs in hint of the request maximum
   duration that
         contradicted each other, and it is not willing to provide service
         to accept. However, the user. One or more Failed-AVP AVPs MUST be present,
         containing server DOES NOT
   have to observe the AVPs hint, and MAY return a value that contradicted each other.


5.2.6  Hop-by-Hop Failures is smaller than
   the hint.


11.5  User-Name AVP

   The User-Name AVP (AVP Code 1) [1] is of type OctetString, which
   contains the User-Name.  The value is represented as a UTF-8
   character encoded string in a format consistent with the NAI
   specification [8].





Calhoun et al.            expires July August 2001                  [Page 31] 37]





Internet-Draft                                             February                                                March 2001


   Proxies receiving messages with the Result-Code


11.6  Max-Wait-Time AVP set to an error
   within the Hop-by-Hop failure category SHOULD attempt to take some
   local action to correct the error. If no local action can be taken to
   correct the problem, the error MUST be forwarded towards the
   originator of the message.

      DIAMETER_INVALID_RECORD_ROUTE      6001

   The last Record-Route Max-Wait-Time AVP in the message (AVP Code 295) is not set to the
         identity of type Unsigned32, and
   contains the sender maximum amount of time the message. See Section 6.0 downstream server is willing
   to wait for more
         information.

      DIAMETER_COMMAND_UNSUPPORTED       6002
         The Request contained a Command-Code response. A server that determines that it cannot
   satisfy a request within the receiver did not
         recognize or support. The Message-Reject-Ind message requested time MUST also
         contain an Failed-Command-Code AVP containing issue a DSI message
   with the unrecognized
         Command-Code.

      DIAMETER_TIME_INVALID              6003
         This Result-Code value is return DSI-Event set to inform DIAMETER_STILL_WORKING or
   DIAMETER_CANNOT_PROCESS_IN_TIME.


11.7  Session Termination

   The Diameter Base Protocol provides a peer set of messages that the
         message received contained an invalid timestamp value (in
         Timestamp AVP).

      DIAMETER_UNABLE_TO_DELIVER         6004
         The request could not MUST be delivered
   used by any peer to a host explicitly request that handles a previously
   authenticated and/or authorized session be terminated. Since the
         realm requested at this time.

      DIAMETER_REALM_NOT_SERVED          6005
         A proxy or redirect server has determined that it
   Session-Id is unable typically tied to
         forward a particular service (i.e. Mobile IP,
   NASREQ, etc), the session termination messages are used to request or provide redirect information since
   that the
         realm portion of service tied to the NAI requested is unknown.

      DIAMETER_UNSUPPORTED_TRANSFORM     6006
         A message was received that included an Integrity-Check-Value
         or CMS-Data AVP [11] that made use of an unsupported transform.

      DIAMETER_INVALID_ICV               6007 Session Id be terminated.


11.7.1  Session-Termination-Ind

   The Request did not contain a valid Integrity-Check-Value AVP.

      DIAMETER_ERROR_TOO_BUSY            6008
         When returned, a Diameter node SHOULD attempt Session-Termination-Ind (STI), indicated by the Command-Code set
   to 274, MAY be sent by any Diameter entity to the
         message access device to an alternate peer.


5.3  Error-Message AVP
   request that a particular session be terminated. This message MAY be
   used when a server detects that a session MUST be terminated, which
   is typically done as a policy decision (e.g. local resources have
   been expended, etc). The Error-Message Destination-FQDN AVP (AVP Code 281) is MUST be present, and
   contain the NAI of type OctetString.  It is a
   human readable UTF-8 character encoded string.  It MAY accompany the access device that initiated the session (see
   section 11.0).

   Upon receipt of the STI message, the access device SHOULD issue a
   Result-Code
   Session-Terminate-Request message.

   Message Format

      <Session-Termination-Ind>  ::= < Diameter Header: 274 >
                                     < Session-Id >
                                     { Origin-FQDN }
                                     { Origin-Realm }
                                     { User-Name }
                                     { Destination-Realm }
                                     { Destination-FQDN }
                                   * [ AVP as a human readable error message. The Error-Message ]
                                   * [ Proxy-State ]
                                  0*1< Integrity-Check-Value >





Calhoun et al.            expires July August 2001                  [Page 32] 38]





Internet-Draft                                             February                                                March 2001


   AVP is not intended to be useful in real-time, and SHOULD NOT be
   expected


11.7.2  Session-Termination-Request

   The Session-Termination-Request (STR), indicated by the Command-Code
   set to be parsed 275, is sent by network entities.


5.4  Error-Reporting-NAI AVP

   The Error-Reporting-NAI AVP (AVP Code 294) the access device to inform the Diameter
   Server that an authenticated and/or authorized session is of type OctetString.
   This being
   terminated.

   Message Format

      <Session-Termination-Request>  ::= < Diameter Header: 275 >
                                         < Session-Id >
                                         { Origin-FQDN }
                                         { Origin-Realm }
                                         { User-Name }
                                         { Destination-Realm }
                                       * [ AVP contains ]
                                       * [ Proxy-State ]
                                       * [ Route-Record ]
                                      0*1< Integrity-Check-Value >


11.7.3  Session-Termination-Answer

   The Session-Termination-Answer (STA), indicated by the Network Access Identifier of Command-Code
   set to 276, is sent by the Diameter host Server to acknowledge that set the
   session has been terminated. The Result-Code AVP to a value other than 2001 (Success).
   This AVP is intended to MUST be used for troubleshooting purposes, present, and
   MAY contain an indication that an error occurred while servicing the
   STR.

   Upon sending or receipt of the STA, the Diameter Server MUST be set when 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

      <Session-Termination-Answer>  ::= < Diameter Header: 276 >
                                        < Session-Id >
                                        { Result-Code }
                                        { Origin-FQDN }
                                        { Origin-Realm }
                                        { Destination-FQDN }
                                        { User-Name }
                                        { Destination-Realm }
                                      * [ AVP indicates a failure.


6.0 ]
                                      * [ Proxy-State ]
                                      * [ Route-Record ]
                                     0*1< Integrity-Check-Value >



Calhoun et al.            expires August 2001                  [Page 39]





Internet-Draft                                                March 2001


12.0  Message Routing

   This section describes the expected behavior of a Diameter server
   acting as a proxy or redirect server.


6.1


12.1  Realm-Based Message Routing

   Diameter Message request, query and indication message routing is done
   through the use of the realm portion of the Network Access Identifier
   (NAI), and an associated realm routing table (see section 11.0). 12.1.1).
   The NAI has a format of user@realm, and Diameter servers have a list
   of locally supported realms, and MAY have a list of externally
   supported realms. When a request, query or indication message is
   received that includes a realm that is not locally supported, the
   message is proxied to the Diameter entity configured in the "route"
   table.

   There are instances where the User-Name AVP is not present in
   authorization requests. This is typically true in networks where a
   request is sent to the network before the call was even answered.
   However, such requests MAY need to be proxied. In such cases, the
   first hop Diameter proxy MAY append the Routing-Realm AVP to the
   Diameter message, by using a DNIS or ANI to Routing-Realm association
   table, if it is known.  If the message is forwarded to a downstream
   proxy, the proxy MAY add the missing Routing-Realm AVP (or replace an
   existing Routing-Realm AVP), if the realm associated with the DNIS or
   ANI is known.

   Figure 1 2 depicts an example where DIA1 receives a request to
   authenticate user "joe@abc.com". DIA1 looks up "abc.com" in its local
   realm route table and determines that the message must be proxied to
   DIA2. DIA2 does the same check, and proxies the message to DIA3. DIA3
   checks its realm route table, and determines that the realm is
   locally supported, and processes the authentication request, and
   returns the response. How the response actually makes it back to the



Calhoun et al.             expires July 2001                   [Page 33]





Internet-Draft                                             February 2001
   sender of the original request is described in the next section.

                   (Request)                  (Request)
            (User-Name=joe@abc.com)    (User-Name=joe@abc.com)
      +------+      ------>      +------+      ------>      +------+
      |      |                   |      |                   |      |
      | DIA1 +-------------------+ DIA2 +-------------------+ DIA3 |
      |      |                   |      |                   |      |
      +------+      <------      +------+      <------      +------+
                   (Response)                 (Response)
            (User-Name=joe@abc.com)    (User-Name=joe@abc.com)

      mno.net                    xyz.com                    abc.com
                       Figure 1: Realm-Based Routing


6.2  Behavior of Proxy and Redirect Servers

   This section describes the behavior of Diameter proxy and redirect
   servers in detail. In both cases, determining the next hop for a
   Diameter message is done via the Routing-Realm or the User-Name AVP
   [1], whose syntax must comply with the Network Access Identifier
   (NAI) [12] specification.  When present, the Routing-Realm takes
   precedence over the User-Name AVP for routing decisions. The
   Routing-Realm AVP, or the realm portion of the User-Name AVP is used
   to identify the next hop server the message must be forwarded to. next section.

          (Origin-FQDN=dia1.mno.net)   (Origin-FQDN=dia1.mno.net)
          (Origin-Realm=mno.net)       (Origin-Realm=mno.net)
          (Destination-Realm=abc.com)  (Destination-Realm=abc.com)
                                       (Record-Route=dia2.xyz.com)
      +------+      ------>      +------+      ------>      +------+
      |      |     (Request)     |      |      (Request)    |      |
      | DIA1 +-------------------+ DIA2 +-------------------+ DIA3 |
      |      |                   |      |                   |      |
      +------+      <------      +------+      <------      +------+
      mno.net      (Response)    xyz.com      (Response)     abc.com
         (Destination-Realm=mno.net)   (Destination-Realm=abc.net)
          (Origin-Realm=abc.com)       (Origin-Realm=abc.com)
      (Destination-FQDN=dia1.mno.net)  (Destination-FQDN=dia1.mno.net)
                                       (Record-Route=dia2.xyz.com)
                       Figure 2: Realm-Based Routing

   Note the processing rules contained in this section are intended to
   be used as general guidelines to Diameter developers. Certain
   implementations MAY use different methods than the ones described
   here, and still be in compliance with the protocol specification.


6.2.1  Proxy and Redirect Server handling of requests

   Any request received by a Diameter server MUST perform a next hop
   lookup.  Lookups




Calhoun et al.            expires August 2001                  [Page 40]





Internet-Draft                                                March 2001


12.1.1  Realm-Based Routing Table

   All Realm-Based routing lookups are performed against what is
   commonly known as the Domain Routing Table (see section 11.0). 17.0). A
   Domain Routing Table Entry contains the following fields:
      - Domain Name. The Domain Name is analogous to the realm portion
        of the NAI.  This is the field that is typically used as a
        primary key in the routing table lookups. Note that some
        implementations perform their lookups based on longest-match-
        from-the-right on the realm rather than requiring an exact
        match.
      - Extension Id. It is possible for a routing entry to have a
        different destination based on the extension identifier of the
        message. This field is typically used as a secondary key field



Calhoun et al.             expires July 2001                   [Page 34]





Internet-Draft                                             February 2001
        in routing table lookups.
      - Local Action. The Local Action field is used to identify how a
        message should be treated. The following actions are supported:
           1. LOCAL - Diameter messages that resolve to a routing entry
              with the Local Action set to Local can be satisfied
              locally, and do not need to be forwarded to another
              server.
           2. PROXY - All Diameter messages that fall within this
              category MUST be forwarded to a next hop server. The local
              server MAY apply its local policies to the message by
              including new AVPs to the message prior to forwarding.
              See section 6.4 12.4 for more information.
           3. REDIRECT - Diameter messages that fall within this
              category MUST have the identity of the home Diameter
              server(s) appended, and returned to the sender of the
              message. See section 6.3 12.3 for more information.
      - Server Identifier - One or more servers the message is to be
        forwarded to.  When the Local Action is set to PROXY, this field
        contains the identities of the server(s) server(s) the message must be
        forwarded to. When the Local Action field is set to REDIRECT,
        this field contains the Home Diameter server(s) for the realm.

   It is important to note that Diameter servers MUST support at least
   one of the PROXY, REDIRECT, or LOCAL modes of operation. Servers do
   not need to support all modes of operation in order to conform with
   the protocol specification. Servers MUST NOT reorder AVPs with the
   same AVP Code.

   When a message is being proxied, the servers in a given domain
   routing entry MUST have advertised the Extension Identifier (see
   section 6.1.3) for the given message, or have advertised the Wildcard
   Extension.





Calhoun et al.            expires August 2001                  [Page 41]





Internet-Draft                                                March 2001


12.2  Proxy and Redirect Server handling of requests

   When a message of type request, query or indication is received by a
   proxy or redirect server, and it is determined that the request
   cannot be locally handled, the next hop for the request is determined
   in the following order:
      1. If the Destination-FQDN AVP is present, and the message must host specified
         in the AVP can be
        forwarded to. When directly contacted, the Local Action field message is set forwarded
         to REDIRECT,
        this field contains the Home Diameter server(s) host (see section 8.1 for more information), or
      2. If the realm.

   It Destination-Realm AVP is important to note that Diameter servers MUST support at least
   one of present, a routing table lookup
         is performed using the PROXY, REDIRECT, or LOCAL modes of operation. Servers do domain specific in the AVP.

   A message that does not need to support all modes contain any of operation in order to conform with the protocol specification.  Servers above AVPs MUST NOT reorder AVPs be
   routed.  If the message in question cannot be handled locally, a
   Message-Reject-Ind is sent with the
   same Result-Code AVP Code.


6.3 set to an
   appropriate error condition.


12.3  Redirect Server

   A Redirect Server is one that provides NAI Realm to Diameter Home
   Server address resolution. When a message is received by a peer, the
   Routing-Realm or the realm portion of the User-Name AVP
   Destination-Realm is extracted from the message, and the realm portion is used to
   perform a lookup in the domain routing table. Implementations MAY
   also use the Extension Id as a secondary key in the domain routing
   table lookup.

   Successful routing table lookups will return one or more home
   Diameter servers that could satisfy the message. The home servers are
   encoded in one or more Redirect-Host-Address AVPs. If Redirect-Host AVPs, and the Redirect-
   Host-Port Command-Code field
   is set to be included (meaning that the host is not listening
   on the standard Diameter port), it MUST be encapsulated within the
   Redirect-Host AVP along with its corresponding Redirect-Host-Address
   AVP.






Calhoun et al.             expires July 2001                   [Page 35]





Internet-Draft                                             February 2001 Device-Status-Ind.

                             +------------------+
                             |     Diameter     |
                             | Redirect Server  |
                             +------------------+
                              ^    |
                      Request |    | Response DSI +
                  joe@xyz.com |    | Result Code DSI-Event = Redirect +
                              |    | Redirect Redirect-Host AVP(s)
                              |    v
                            +----------+   Request    +----------+
                            | abc.net  |------------->| xyz.net  |
                            | Diameter |              | Diameter |
                            |  Server  |<-------------|  Server  |
                            +----------+   Response   +----------+
                    Figure 2: 3: Diameter Redirect Server




Calhoun et al.            expires August 2001                  [Page 42]





Internet-Draft                                                March 2001


   Lastly, the Result-Code DSI-Event AVP is added with the Data field of the AVP set
   to DIAMETER_REDIRECT_INDICATION [1], DIAMETER_REDIRECT_INDICATION, and the message is returned to the
   sender of the request. Redirect servers MAY also include the
   certificate of the Home server(s). These certificates are
   encapsulated in a CMS-Data AVP [11].  When this occurs, the server
   forwarding the request directly to the Home Diameter server SHOULD
   include its own certificate in the message.


6.3.1


12.3.1  Redirect-Host AVP

   The Redirect-Host AVP (AVP Code 292) is of type Grouped and is found
   in responses Device-Status-Ind messages that include the Result-Code DSI-Event AVP set to
   DIAMETER_REDIRECT_REQUEST. This AVP only needs to be used if the host
   the message is to be redirected to is not listening on the standard
   Diameter port. Its Data field has the following ABNF grammar:

      Redirect-Host   = Redirect-Host-Address Redirect-Host-Port
         Redirect-Host-Address = ; See Section 6.3.2 12.3.2
         Redirect-Host-Port    = ; See Section 6.3.3 12.3.3

   The Redirect-Host-Address AVP Data field contains the IP Address of
   the Diameter host to which the request MUST be redirected. The
   Redirect-Host-Port contains the port number to which the request
   should be sent. Upon receipt of such a Result Code, event, and this AVP, the
   receiving host SHOULD send the request directly to the host
   identified by the Redirect-Host-Address AVP.








Calhoun et al.             expires July 2001                   [Page 36]





Internet-Draft                                             February 2001

      +---------------------------------------------------------------+
      |                 AVP Header (AVP Code = 292)                   |
      +---------------------------------------------------------------+
      |                  Redirect-Host-Address AVP                    |
      +---------------------------------------------------------------+
      |                    Redirect-Host-Port AVP                     |
      +---------------------------------------------------------------+

6.3.2

12.3.2  Redirect-Host-Address AVP

   The Redirect-Host-Address AVP (AVP Code 278) is of type Address.  Its
   use is described in Section 6.3.1.


6.3.3 12.3.1.


12.3.3  Redirect-Host-Port AVP

   The Redirect-Host-Port AVP (AVP Code 277) is of type Unsigned32.  Its
   use is described in Section 6.3.1.


6.4 12.3.1.





Calhoun et al.            expires August 2001                  [Page 43]





Internet-Draft                                                March 2001


12.4  Proxy Server

   This section outlines the processing rules for Diameter proxy
   servers.  A proxy server can either be stateful or stateless. A Proxy
   server MAY act in a stateful manner for some requests, and be
   stateless for others. There are two types of states that servers MAY
   wish to maintain; transaction and session.

   Maintaining transaction state implies that a server keeps a copy of a
   request, which is then used when the corresponding response is
   received.  This could be done to apply local policies to the message,
   or simply for auditing purposes. Maintaining session state implies
   that a server keeps track of all "active" users. An active user is
   one that has been authorized for a particular service, and the server
   has not received any indication that the user has relinquished
   access.

   A stateless proxy is one that does not maintain transaction, nor
   session state. It frees the messages sent once acknowledgements are
   received by the transport layer.

   A stateful proxy can be viewed as a Diameter Server upon receiving a
   request, and as a Client when forwarding the message. For all intents
   and purposes, stateful servers terminate an upstream "session", and
   initiates a downstream "session" (see Figure 3), 4), and MAY provide the
   following features:
      - Protocol translation (e.g. RADIUS <-> Diameter)
      - Limiting resources authorized to a particular user



Calhoun et al.             expires July 2001                   [Page 37]





Internet-Draft                                             February 2001
      - Per user or transaction auditing

        +--------+           +-----------------+          +--------+
        | Client | --------> | Server | Client | -------> | Server |
        +--------+           +-----------------+          +--------+
                     Figure 3 4 - Example of Stateful Proxy

   A stateful proxy that maintains transaction state SHOULD release
   transaction information after a request's corresponding response has
   been forwarded towards the recipient, and has been acknowledged by
   the underlying transport.

   A stateful proxy that maintains session state SHOULD release the
   session state once it is informed that a user and/or device has
   relinquished access.

   Home servers processing requests that include the Route-Record and/or
   the Proxy-State AVPs MUST return these AVPs in the same order same order in the
   corresponding response.




Calhoun et al.            expires August 2001                  [Page 44]





Internet-Draft                                                March 2001


12.4.1  Proxying Requests

   In addition to the rules defined in section 12.2, the
   corresponding response.


6.4.1  Proxying Requests following
   procedures MUST be handled by proxy servers handling messages of type
   request, query or indication.

   A proxy server MUST check for forwarding loops before proxying a
   message of type Request, Query or Indication. Such as message has
   been looped if the server finds its own address in a Route-Record
   AVP.

   A Diameter server that proxies a message or type Request, Query or
   Indication MUST append a Route-Record AVP, which includes its
   identity.  Diameter Servers that receive messages MUST validate the
   last Route-Record AVP in the message and ensure that the host
   identified in the AVP is the same as the sender of the message.

   A Proxy Server MAY also include the Proxy-State AVP in a message of
   type Request or Query, which is used to encode local state
   information. The Proxy-State AVP is guaranteed to be present in the
   corresponding response.

   The message is then forwarded to the downstream Diameter server, as
   identified in the Domain Routing Table.

   Proxy Server MUST save the Hop-by-Hop Identifier in request messages, and update
   if the value of the header field is changed, with a locally unique value.
   The saved identifier MAY be encoded in the Proxy-State AVP, and will
   be required in the processing of the corresponding response.





Calhoun et al.             expires July 2001                   [Page 38]





Internet-Draft                                             February 2001


6.4.2


12.4.2  Proxying Responses

   A proxy server MUST only process messges of type Response or Answer
   whose last Route-Record AVP matches one of its addresses. Any
   responses that do not conform to this rule MUST be dropped. The last
   Route-Record AVP MUST be removed from the message before it is
   forwarded to the next hop, which is identified by the second to last
   Route-Record AVP.

   If the last Proxy-State AVP in the message is targeted to the local
   Diameter server, the AVP MUST be removed.

   If a proxy server receives a response with a Result-Code AVP
   indicating a failure, it MUST NOT modify the contents of the AVP. Any
   additional local errors detected SHOULD be logged, but not reflected
   in the Result-Code AVP.




Calhoun et al.            expires August 2001                  [Page 45]





Internet-Draft                                                March 2001


   Prior to forwarding the response, proxy servers MUST restore the
   original value of the Diameter header's Hop-by-Hop Identifier field.


6.4.3


12.4.3  Route-Record AVP

   The Route-Record AVP (AVP Code 282) is of type OctetString, encoded
   in the UTF-8 [24] format, and contains the Fully Qualified Domain
   Name of the Proxy appending this AVP to a Diameter message.


6.4.4


12.4.4  Proxy-State AVP

   The Proxy-State AVP (AVP Code = 33) is of type Grouped.  The Grouped
   Data field has the following ABNF grammar:

      Proxy-State   = Proxy-Address Proxy-Info
         Proxy-Address = ; See Section 6.4.5 12.4.5
         Proxy-Info    = ; See Section 6.4.6 12.4.6

   The Proxy-Address AVP Data field contains one of the IP addresses of
   the system that created the AVP. This assists hosts in determining
   whether a Proxy-State AVP is intended for the local host. The Proxy-
   Info AVP contains state information, and MUST be treated as opaque
   data.









Calhoun et al.             expires July 2001                   [Page 39]





Internet-Draft                                             February 2001

      +---------------------------------------------------------------+
      |                 AVP Header (AVP Code = 33)                    |
      +---------------------------------------------------------------+
      |                      Proxy-Address AVP                        |
      +---------------------------------------------------------------+
      |                        Proxy-Info AVP                         |
      +---------------------------------------------------------------+


6.4.5


12.4.5  Proxy-Address AVP

   The Proxy-Address AVP (AVP Code = 280) is of type Address.  Its use
   is described in Section 6.4.4.


6.4.6 12.4.4.


12.4.6  Proxy-Info AVP

   The Proxy-Info AVP (AVP Code = 284) is of type OctetString.  Its use
   is described in Section 6.4.4.


6.4.7  Routing-Realm 12.4.4.


12.4.7  Destination-Realm AVP



Calhoun et al.            expires August 2001                  [Page 46]





Internet-Draft                                                March 2001


   The Routing-Realm Destination-Realm AVP (AVP Code 283) is of type OctetString OctetString,
   encoded in the UTF-8 [24] format, and contains the realm the message
   is to be routed to. Diameter Clients insert the realm portion of the Network Access Identifier.
   User-Name AVP, while home servers insert the value of the Origin-
   Realm AVP into this AVP. When present, the Routing-Realm Destination-Realm AVP MAY be is
   used to perform any message routing decisions.


6.5


12.5  Applying Local Policies

   Proxies MAY apply local access policies to Diameter requests, or
   responses, by adding, changing or deleting AVPs in the messages.
   Proxies that apply local policies MUST NOT allow end-to-end security
   on any messages that traverse through it, unless security is
   terminated locally.

   A proxy wishing to modify a Diameter message to enforce some local
   policy that detects that end-to-end security has been applied to the
   message MUST return a response to the originator with the Result-Code
   set to DIAMETER_NO_END_2_END_SECURITY. The originator of the request
   MAY re-issue the request with no end-to-end security if it falls
   within its local policy.

   In the event that the Home Diameter server receives a request with
   contradictory information (possibly due to some proxy adding a local
   policy), it MAY accept the latest AVP, or MAY return the response
   with the Result Code Result-Code AVP set to DIAMETER_CONTRADICTING_AVPS. However,



Calhoun et al.             expires July 2001                   [Page 40]





Internet-Draft                                             February 2001
   a NAS receiving a response that contains contradictory information
   SHOULD reject service to the user.


6.6


12.6  Hiding Network Topology

   Stateful proxies forwarding requests to servers outside of their
   administrative domain MAY hide the internal network topology. Servers
   perform this by removing all Route-Record AVPs in the message, and
   maintains the Route-Record AVPs to add to the corresponding response.
   Such stateful servers MUST still add their own Route-Record AVP to
   the request prior to forwarding.


6.7


12.7  Loop Detection

   When a Diameter Proxy or Redirect server receives a message of type
   Request, Query or Indication, it MUST examine all Route-Record AVPs
   in the message to determine whether such an AVP already exists with
   the local server's identity. If an AVP with the local host's identity
   is found in the request, it is an indication that the message is
   being looped through the same set of proxies. When such an event
   occurs, the Diameter server that detects the loop returns a response
   with the Result-Code AVP set to DIAMETER_LOOP_DETECTED.


6.8  Finding a Target NAS within a Domain

   The Diameter protocol supports unsolicited server initiated messages.
   However, when such messages are transmitted, they have a specific
   target Network Access Server (NAS) in mind. Unsolicited server
   initiated messages are unique in that they contain the Destination-
   NAI AVP. Routing of such messages follow the same set of guidelines
   described in section 6.0, with one exception. When a proxy server has
   determined that a message, which includes the Destination-NAI AVP,
   has reached its target realm, the Destination-NAI AVP local host's identity
   is used to
   identify found in the actual NAS request, it is an indication that the message should be forwarded to.


6.8.1  Destination-NAI AVP

   The Destination-NAI AVP (AVP Code 293) [1] is of type OctetString,
   and contains the NAI [8] of the intended recipient of the message.
   This AVP MUST be present in all unsolicited server initiated
   messages.


7.0  Diameter Message Security



Calhoun et al.            expires July August 2001                  [Page 41] 47]





Internet-Draft                                             February                                                March 2001


   being looped through the same set of proxies. When such an event
   occurs, the Diameter server that detects the loop returns a response
   with the Result-Code AVP set to DIAMETER_LOOP_DETECTED.


13.0  Diameter Message Security

   The Diameter Base protocol MAY be secured in one of three ways. The
   first method does not involve any security mechanisms in the Diameter
   protocol, but relies on an underlying security mechanism, such as IP
   Security. The second method is hop-by-hop security, which SHOULD be
   supported by all Diameter implementations. The third method is
   optional and requires a Public Key Infrastructure [14], and is
   documented in [11].


7.1


13.1  Hop-by-Hop Security

   Diameter Hop-by-Hop security provides message integrity and per AVP
   encryption, and requires that the communicating entities have a pre-
   configured shared secret. Hop-by-Hop security is very difficult to
   deploy and administer in large scale networks and involves symmetric
   trust, unlike security based on a public key infrastructure (PKI).
   PKI is used for Diameter End-to-End security, and is defined in [11].
   Hop-by-Hop security may be desirable in environments where symmetric
   cryptography is sufficient or when a PKI is not available.

   Figure 4 5 below provides an example of hop-by-hop security in a proxy
   chain. Assuming that the packet was received by DIA2 from DIA1, and
   was to be proxied to DIA3, the following steps would be taken:

     1. Validating the message's integrity using the shared secret with
        DIA1, and removing the authenticated security AVPs.

     2. Decrypting any encrypted AVPs using the secret shared with DIA1.

     3. Re-encrypting AVPs using the secret shared with DIA3.

     4. Computing the message hash using the secret shared with DIA3,
        and adding it to the ICV AVP in the Diameter message.

               (Shared-Secret-1)          (Shared-Secret-2)
      +------+       ----->      +------+      ------>      +------+
      |      |                   |1    3|                   |      |
      | DIA1 +------------------>+ DIA2 +------------------>+ DIA3 |
      |      |                   |2    4|                   |      |
      +------+                   +------+                   +------+
            Figure 4: 5: Hop-by-Hop Security in Proxy Environments



Calhoun et al.            expires August 2001                  [Page 48]





Internet-Draft                                                March 2001


   The above steps that each proxy MUST perform in a proxy chain clearly
   describes the security issues associated with hop-by-hop security in
   a proxy environment. Since the message integrity is re-computed at
   each node in the chain, it is not possible to detect if a proxy
   modified information in the message (e.g. session time). Furthermore,
   any sensitive information would be known to all proxies in the chain,



Calhoun et al.             expires July 2001                   [Page 42]





Internet-Draft                                             February 2001
   since each node must decrypt AVPs. Therefore, Any AVPs that contain
   data that MUST NOT be seen by intermediate Diameter nodes MUST be
   protected via the mechanism described in the strong security
   extension [11].

   It is highly recommended that the size of the shared secrets used be
   sufficiently long (e.g. 128 bits), and that different shared secrets
   be used for both authentication and encryption.


7.1.1


13.1.1  Integrity-Check-Value AVP

   The Integrity-Check-Value AVP (AVP Code 259) is of type Grouped and
   is used for hop-by-hop message authentication and integrity.

   The Diameter header as well as all AVPs (including padding) up to the
   Digest AVP is protected by the Integrity-Check-Value AVP. Note that
   the Message Length field in the Diameter header MUST be set to zero
   (0) prior to the ICV calculation. The Timestamp AVP provides replay
   protection and the Nonce AVP provides randomness. If present, any
   AVPs in a message that is not succeeded by the Integrity-Check-Value
   AVP MUST be ignored.

   All Diameter implementations SHOULD support this AVP.

   The Integrity-Check-Value AVP (AVP Code = 259) is of type Grouped.
   The grammar for the grouped Data field is defined is:

      Integrity-Check-Value = Nonce Time Auth-Trans-Id Key-ID Digest
         Nonce           = ; Nonce, See Section 7.2 13.2
         Timestamp       = ; Timestamp, See Section 7.3 13.3
         Auth-Trans-Id   = ; Authentication-Transform-Id, /
                           ; See Section 7.1.1.1 13.1.1.1
         Key-ID          = ; Key-ID, See Section 7.4 13.4
         Digest          = ; Digest, See Section 7.1.1.2 13.1.1.2










Calhoun et al.            expires July August 2001                  [Page 43] 49]





Internet-Draft                                             February                                                March 2001


      +---------------------------------------------------------------+
      |                  AVP Header (AVP Code = 259)                  |
      +---------------------------------------------------------------+
      |                          Nonce AVP                            |
      +---------------------------------------------------------------+
      |                        Timestamp AVP                          |
      +---------------------------------------------------------------+
      |                Authentication-Transform-Id AVP                |
      +---------------------------------------------------------------+
      |                          Key-ID AVP                           |
      +---------------------------------------------------------------+
      |                           Digest AVP                          |
      +---------------------------------------------------------------+


7.1.1.1


13.1.1.1  Authentication-Transform-Id AVP

   The Transform-Id AVP (AVP Code = 285) is of type Unsigned32.  This
   value identifies the transform that was used to compute the ICV. The
   following values are defined in this document:

      HMAC-MD5-96[6]          1
         The ICV is computed using the HMAC-MD5 algorithm, and the first
         12 bytes of the hash output is included in the Digest AVP.  All
         Diameter implementations supporting this AVP MUST support this
         transform. Using the example code provided in [6], the
         following call would be used to generate the Digest AVP:

            hmac_md5(DiameterMessage, MessageLength, Secret,
                     Secretlength, Output)

            where the DiameterMessage is the complete message up to the
            Digest AVP.


7.1.1.2


13.1.1.2  Digest AVP

   The Digest AVP (AVP Code = 287) is of type OctetString.  This value
   contains the output from the hashing algorithm, covering all AVPs in
   the message, including all AVPs in the Integrity-Check-Value AVP up
   to, but not including, the Digest AVP.


7.1.2


13.1.2  Encrypted-Payload AVP

   The Encrypted-Payload AVP (AVP Code 260) is of type Grouped and is
   used to encapsulate encrypted AVPs for privacy during transmission.




Calhoun et al.            expires July August 2001                  [Page 44] 50]





Internet-Draft                                             February                                                March 2001


   Hop-by-Hop confidentiality is achieved by encapsulating all AVPs
   which are to be encrypted into an Encrypted-Payload AVP.  This
   feature SHOULD be supported by Diameter implementations.

   The grammar for the grouped Data field is defined is:

      Encrypted-Payload = Enc-Trans-Id Key-ID ptextlen data
         Enc-Trans-Id    = ; Encryption-Transform-Id, /
                           ; See Section 7.1.2.1 13.1.2.1
         Key-ID          = ; See Section 7.4 13.4
         ptextlen        = ; Plaintext-Data-Length, See Section 7.1.2.2 13.1.2.2
         data            = ; Encrypted-Data, See Section 7.1.2.3 13.1.2.3

      +---------------------------------------------------------------+
      |                 AVP Header (AVP Code = 260)                   |
      +---------------------------------------------------------------+
      |                 Encryption-Transform-Id AVP                   |
      +---------------------------------------------------------------+
      |                          Key-ID AVP                           |
      +---------------------------------------------------------------+
      |                   Plaintext-Data-Length AVP                   |
      +---------------------------------------------------------------+
      |                      Encrypted-Data AVP                       |
      +---------------------------------------------------------------+


7.1.2.1


13.1.2.1  Encryption-Transform-Id AVP

   The Encryption-Transform-Id AVP (AVP Code = 288) is of type
   Unsigned32. This AVP identifies the transform that was used to
   encrypt the data contained in the Encrypted-Data AVP. The following
   values are defined in this document:

   MD5                     1
            See section 7.1.2.4 13.1.2.1.1 for more information.


7.1.2.1.1


13.1.2.1.1  MD5 Payload Hiding

   The plain text (which is a buffer containing one or more AVPs) is
   first padded to a sixteen (16) byte boundary with 0 bytes.  Since the
   encapsulated AVPs have length fields, it is possible to detect their
   boundaries, whether or not padding has been done.

   One or more Nonce AVPs MUST precede an Encrypted-Payload AVP.  An MD5
   hash is performed on the:

      - last Nonce AVP which precedes the Encrypted-Payload AVP



Calhoun et al.            expires July August 2001                  [Page 45] 51]





Internet-Draft                                             February                                                March 2001


      - the shared authentication secret

   This MD5 hash value is then XORed with the first 16 octet segment of
   the buffer to encrypt.  The resulting 16 octet result is saved as the
   first 16 octets of the encrypted buffer.  The result is also used to
   calculate a new value using MD5:

       - the shared authentication secret
       - the 16 byte result of the previous XOR

   This value is then XORed with the next 16 bytes.  This is done for
   each 16 bytes successively in the buffer to encrypt, producing an
   equal sized encrypted buffer.

   The receiver of a Diameter message with an Encrypted-Payload AVP MUST
   first check the integrity of the message, either through the ICV, or
   the CMS-Data AVP [11] if it protects the Encrypted-Payload AVP.  Then
   the Encrypted-Payload AVP is decrypted, by reversing the above
   procedure, which applied to the buffer will reproduce the plain text
   version.  The decapsulated AVPs are then used to process the Diameter
   message in the normal manner.


7.1.2.2


13.1.2.2  Plaintext-Data-Length AVP

   The Plaintext-Data-Length AVP (AVP Code = 289) is of type Unsigned32,
   and contains the length of the plaintext data. This AVP is necessary
   in order to not treat any possible padded data, added as part of the
   encryption transform, as part of the plaintext.


7.1.2.3


13.1.2.3  Encrypted-Data AVP

   The Encrypted-Data AVP (AVP Code = 290) is of type OctetString.  This
   AVP contains the encrypted AVPs.


7.2


13.2  Nonce AVP

   The Nonce AVP (AVP Code 261) is of type OctetString and is present in
   the Integrity-Check-Value AVP and is used to ensure randomness within
   a message. The content of this AVP MUST be a random value of at least
   128 bits.


7.3


13.3  Timestamp AVP

   The Timestamp AVP (AVP Code 262) is of type Unsigned32 and is used to



Calhoun et al.            expires July August 2001                  [Page 46] 52]





Internet-Draft                                             February                                                March 2001


   add replay protection to the Diameter protocol. The Data field of
   this AVP is the most significant four octets returned from an NTP
   [18] server that indicates the number of seconds expired since Jan.
   1, 1900.

   Messages that are older than a configurable maximum age SHOULD be
   rejected (see section 11.0) 17.0) and a response SHOULD be returned with
   the Result-Code AVP Data field set to DIAMETER_TIMEOUT. Note that the
   larger the configurable value, the more susceptible one is to a
   replay attack. However, one does have to take into account the
   possibility for clock drift, and the latency involved in the
   transmission of the message over the network. The timestamp AVP
   SHOULD be updated prior to retransmission.

   A Diameter node that receives a message with the Result-Code AVP set
   to Diameter-TIMEOUT DIAMETER-TIMEOUT MAY use the time found in the Timestamp AVP
   within the reply in order to synchronize its clock with its peer.
   When time synchronization is done, the sender MUST NOT change its
   local time, but SHOULD adjust the time delta for all outgoing
   messages to the peer, and require that its local time be used in
   received messages.

   Implementations must be prepared to wrap at the epochal 2038 where
   Time values are used, and 0,1,... MUST be considered greater than
   2^32-1 at that time.


7.4


13.4  Key-Id AVP

   The Key-Id AVP (AVP Code = 286) is of type Unsigned32.  This value
   contains a key identifier, which is used to identify the keying
   information used to generate the Digest AVP or the Encrypted-Data
   AVP.


8.0


14.0  AVP Table

   The following table presents the AVPs defined in this document, and
   specifies in which Diameter messages they MAY, or MAY NOT be present.
   Note that AVPs that can only be present within a Grouped AVP are not
   represented in this table.

   The table uses the following symbols:
      0      The AVP MUST NOT be present in the message.
      0+     Zero or more instances of the AVP MAY be present in the
            message.
      0-1    Zero or one instance of the AVP MAY be present in the
            message.



Calhoun et al.            expires July August 2001                  [Page 47] 53]





Internet-Draft                                             February                                                March 2001


      1     One instance of the AVP MUST be present in the message.

                                 +-----------------------------+
                                 |         Command-Code        |
                                 |-----+-----+-----+-----+-----+
   Attribute Name                | DRI | MRI | STI | STR | STA |
   ------------------------------|-----+-----+-----+-----+-----|
   Authorization-Lifetime        | 0   | 0   | 0   | 0   | 0   |
   Destination-NAI               | 0   | 0   | 1   | 0   | 0   |
   Encrypted-Payload             | 0   | 0   | 0   | 0   | 0   |
   Error-Message                 | 0   | 0   | 0   | 0   | 0   |
   Error-Reporting-NAI           | 0   | 1   | 0   | 0   | 0   |
   Extension-Id                  | 1+  | 0   | 0   | 0   | 0   |
   Failed-AVP                    | 0   | 0-1 AVP MUST be present in the message.

                                 +-------------------------------+
                                 | 0          Command-Code         | 0
                                 |---+---+---+---+---+---+---+---+
   Attribute Name                |DRI|DSI|DWR|DWA|MRI|STI|STR|STA|
   ------------------------------|---+---+---+---+---+---+---+---|
   Authorization-Lifetime        |0  |0  |0  |0  |0  |0  |0  |0  |
   Destination-FQDN              |0  |0  |0  |1  |0+ |1  |0+ |1  | 0
   Destination-Realm             |1  |1  |1  |1  |1  |1  |1  |1  |
   Failed-Command-Code
   DSI-Event                     |0  |1  |0  |0  |0  |0  |0  |0  | 0
   Encrypted-Payload             |0  |0  |0  |0  |0  |0  |0  |0  | 0-1
   Error-Message                 |0  |0  |0  |0  |0  |0  |0  |0  |
   Error-Reporting-FQDN          |0  |0  |0  |0  |1  |0  |0  |0  | 0
   Extension-Id                  |1+ |0  |0  |0  |0  |0  |0  |0  | 0
   Failed-AVP                    |0  |0  |0  |0  |0-1|0  |0  |0  | 0
   Failed-Command-Code           |0  |0  |0  |0  |0-1|0  |0  |0  |
   Firmware-Revision             | 0-1 | 0   | 0   | 0   | 0             |0-1|0  |0  |0  |0  |0  |0  |0  |
   Host-IP-Address               | 1+  | 0   | 0   | 0   | 0   |
   Host-Name                     | 1   | 1   | 1   | 1   | 1               |1+ |0  |0  |0  |0  |0  |0  |0  |
   Integrity-Check-Value         |0-1|0-1|0-1|0-1|0-1|0-1|0-1|0-1|
   Max-Time-Wait                 |0  |0  |0  |0  |0  |0  |0  |0  | 0-1 | 0-1 | 0-1 | 0-1
   Origin-FQDN                   |1  |1  |1  |1  |1  |1  |1  |1  | 0-1
   Origin-Realm                  |1  |1  |1  |1  |1  |1  |1  |1  |
   Proxy-State                   | 0   | 0+  | 0+  | 0+  | 0+                   |0  |0  |0  |0  |0+ |0+ |0+ |0+ |
   Redirect-Host                 | 0   | 0   | 0   | 0   | 0                 |0  |0  |0  |0  |0  |0  |0  |0  |
   Result-Code                   | 0   | 1   | 0   | 0   | 1                   |0  |0  |0  |1  |1  |0  |0  |1  |
   Route-Record                  | 0   | 0+  | 0+  | 0+  | 0+  |
   Routing-Realm                 | 0   | 0+  | 0+  | 0+  | 0+                  |0  |0  |0  |0  |0+ |0+ |0+ |0+ |
   Session-Id                    | 0   | 0-1 | 1   | 1   | 1                    |0  |0  |0  |0  |0-1|1  |1  |1  |
   Session-Timeout               | 0   | 0   | 0   | 0   | 0               |0  |0  |0  |0  |0  |0  |0  |0  |
   Timestamp                     | 0   | 0   | 0   | 0   | 0                     |0  |0  |0  |0  |0  |0  |0  |0  |
   User-Name                     | 0   | 0   | 1   | 1   | 1                     |0  |0  |0  |0  |0  |1  |1  |1  |
   Vendor-Id                     |1  |0  |0  |0  |0  |0  |0  |0  | 1   | 0   | 0   | 0   | 0   |
   ------------------------------|-----+-----+-----+-----+-----|


9.0
   ------------------------------|---+---+---+---+---+---+---+---|


15.0  IANA Considerations

   This document defines a number of assigned numbers to be maintained
   by the IANA.  This section explains the criteria to be used by the
   IANA to assign additional numbers in each of these lists. The
   following subsections describe the assignment policy for the
   namespaces defined elsewhere in this document.


9.1


15.1  AVP Attributes

   As defined in section 2.3, 4.0, AVPs contain vendor ID, attribute and Data
   fields. For vendor ID value of 0, IANA will maintain a registry of



Calhoun et al.            expires August 2001                  [Page 54]





Internet-Draft                                                March 2001


   assigned AVP codes and in some case also values. Attribute 0-254 are
   assigned from the RADIUS protocol [1], whose attributes are also
   maintained through IANA. AVP Codes 256-280 are assigned within this



Calhoun et al.             expires July 2001                   [Page 48]





Internet-Draft                                             February 2001
   document. The remaining values are available for assignment through
   Designated Expert [12].


9.2


15.2  Command Code Values

   As defined in section 2.1, 3.0, the Command Code field has an associated
   value maintained by IANA. Values 0-255 are reserved for backward
   RADIUS compatibility, and values 257, 259, 274, 275 and 276 are
   defined in this specification. The remaining values are available for
   assignment via Designated Expert [12].


9.3


15.3  Extension Identifier Values

   As defined in section 2.6.5, 6.1.3, the Extension Identifier is used to
   identify a specific Diameter Extension. All values, other than zero
   (0) are available for assignment via Standards Action [12].

   Note that the Diameter protocol is not inteded to be extended for any
   purpose. Any extensions added to the protocol MUST ensure that they
   fit within the existing framework, and that no changes to the base
   protocol are required.


9.4


15.4  Result-Code AVP Values

   As defined in Section 5.2, 10.2, the Result Code Result-Code AVP (AVP Code 268)
   defines the values 1001, 2001, 3001, 4001-4002, 5001-5010 4001-4002 and 6001-6008. 5001-5010.  All remaining
   values are available for assignment via IETF Consensus [12].


9.5


15.5  Authentication-Transform-Id AVP Values

   Section 7.1.1.1 13.1.1.1 defines the Authentication-Transform-Id AVP (AVP
   Code 285) which is used to identify the authentication algorithm used
   to generate the contents of the Digest AVP. This document reserves
   the value 1. All remaining values are available for assignment via
   Designated Expert [12].


9.6


15.6  Encryption-Transform-Id AVP Values

   Section 7.1.2.1 13.1.2.1 defines the Encryption-Transform-Id AVP (AVP Code
   288) which is used to identify the encryption algorithm used to



Calhoun et al.            expires August 2001                  [Page 55]





Internet-Draft                                                March 2001


   generate the contents of the Encrypted-Data AVP. This document
   reserves the value 1. All remaining values are available for



Calhoun et al.             expires July 2001                   [Page 49]





Internet-Draft                                             February 2001
   assignment via Designated Expert [12].


9.7


15.7  Message Header Bits

   There are thirteen bits in the Flags field of the Diameter header.
   This document assigns bit 1 ('R'esponse), bit 2 ('I'nterrogation) and
   bit 3 ('E'xpected Reply). Bits 4 through 13 should only be assigned
   via a Standards Action [12].


9.8


15.8  AVP Header Bits

   There are 16 bits in the Flags field of the AVP Header. Header, defined in
   section 4.0. This document assigns bit 1 ('M'andatory), bit 3
   ('V'endor Specific) and bit 5 ('P'rotected). The remaining bits
   should only be assigned via a Standards Action [12].


10.0


15.9  DSI-Event AVP Values

   As defined in Section 9.1.1, the DSI-Event AVP (AVP Code 297) defines
   the values 1001, 3001, 4001-4003 and 5001-5006. All remaining values
   are available for assignment via IETF Consensus [12].


16.0  Open Issues

   The following are the open issues that SHOULD be addressed in future
   versions of the Diameter protocol:

      - AVPs with time values are represented by Unsigned32 type data.
        This value is a timestamp consistent with NTP [18]. This field
        is expected to expire sometime in 2038. Future investigation
        SHOULD be done to determine if a 64 bit time format could be
        used.

      - The fact that the Sender's IP Address is used in the
        construction of the Session-Id means that the introduction of
        Network Address Translation MAY cause two hosts to represent the
        same Session Identifier.  This area needs to be investigated
        further to be able to support Diameter hosts on a private
        network.


11.0


17.0  Diameter protocol related configurable parameters



Calhoun et al.            expires August 2001                  [Page 56]





Internet-Draft                                                March 2001


   This section contains the configurable parameters that are found
   throughout this document:

      Diameter Peer
         A Diameter entity MAY communicate with peers that are
         statically configured. A statically configured Diameter peer
         would require that either the IP address or the fully qualified
         domain name (FQDN) be supplied, which would then be used to



Calhoun et al.             expires July 2001                   [Page 50]





Internet-Draft                                             February 2001
         resolve through DNS.

      Realm Routing Table
         A Diameter Proxy server routes messages based on the realm
         portion of a Network Access Identifier (NAI). The server MUST
         have a table of Realms Names, and the address of the peer to
         which the message must be forwarded to. The routing table MAY
         also include a "default route", which is typically used for all
         messages that cannot be locally processed.

      Maximum Age of an outstanding message
         Messages older than the maximum age SHOULD be rejected, as
         described in section 7.3. 13.3.  The recommended value is 4 seconds.

      RTT-Multiplier
         The Round Trip Time Multiplier is used to determine when a DWR
         message is to be sent to an inactive peer. The recommended
         valus is 4.

      Shared Secret
         The shared secret is a value that is known by two communicating
         peers, and is used to generate the Integrity-Check-Value and
         the Encryption-Payload AVP. There is no default.


11.0

      Watchdog Interval Period
         The Watchdog Interval Period is the frequency at which DWR
         messages are sent to inactive peers. The recommended value is
         30 seconds.


18.0  Security Considerations

   The Diameter base protocol requires that two communicating peers
   exchange messages in a secure fashion. This document describes two
   security methods that can be used. The first requires no security at
   the application layer, but rather relies on an underlying security
   mechanism, such as IP Security.

   When IP Security is not available, or desirable, the Diameter
   protocol MAY use hop-by-hop security, which requires communicating



Calhoun et al.            expires August 2001                  [Page 57]





Internet-Draft                                                March 2001


   peers to negotiate a symmetric key through some out of band
   mechanism. Hop-by-Hop security provides replay protection by
   requiring that the communicating peers share a time source, such as
   an NTP server. Information of a sensitive nature, which MUST NOT be
   seen by any intermediate Diameter node MUST NOT be encrypted using
   hop-by-hop encryption.

   When the Diameter protocol is used in an inter-domain network, strong
   application level security MAY be required, such as non-repudiation.
   When the communicating peers do require this level of security either
   for legal or business purposes, the extension defined in [11] MAY be
   used. This security model provides AVP-level authentication, and the
   encryption mechanism is designed such that only the target host has
   the keying information required to decrypt the information.


12.0


19.0  References




Calhoun et al.             expires July 2001                   [Page 51]





Internet-Draft                                             February 2001


   [1]  Rigney, et alia, "RADIUS", RFC-2138, April 1997 1997.

   [2]  Reynolds, Postel, "Assigned Numbers", RFC 1700, October 1994.

   [3]  Postel, "User Datagram Protocol", RFC 768, August 1980.

   [4]  Rivest, "The MD5 Message-Digest Algorithm", RFC 1321, April
        1992.

   [5]  Kaufman, Perlman, Speciner, "Network Security: Private Communi-
        cations in a Public World", Prentice Hall, March 1995, ISBN 0-
        13-061466-1.

   [6]  Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for Message
        Authentication", RFC 2104, January 1997.

   [7]  P. Calhoun, W. Bulley, A. Rubens, J. Haag, "Diameter NASREQ
        Extension", draft-ietf-aaa-diameter-nasreq-00.txt, draft-ietf-aaa-diameter-nasreq-01.txt, IETF work in
        progress, February March 2001.

   [8]  Aboba, Beadles "The Network Access Identifier." RFC 2486. Janu-
        ary 1999.

   [9]  Calhoun, Zorn, Pan, Akhtar, "Diameter Framework", draft-ietf-
        aaa-diameter-framework-00.txt,
        aaa-diameter-framework-01.txt, IETF work in progress, February March
        2001.

   [10] P. Calhoun, C. Perkins, "Diameter Mobile IP Extensions", draft-
        ietf-aaa-diameter-mobileip-00.txt,
        ietf-aaa-diameter-mobileip-01.txt, IETF work in progress, Febru-
        ary March



Calhoun et al.            expires August 2001                  [Page 58]





Internet-Draft                                                March 2001


        2001.

   [11] P. Calhoun, W. Bulley, S. Farrell, "Diameter Strong Security
        Extension", draft-calhoun-diameter-strong-crypto-06.txt (work in
        progress), February 2001.

   [12] Narten, Alvestrand,"Guidelines for Writing an IANA Considera-
        tions Section in RFCs", BCP 26, RFC 2434, October 1998

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

   [14] Myers, Ankney, Malpani, Galperin, Adams, "X.509 Internet Public
        Key Infrastructure Online Certificate Status Protocol (OCSP)",
        RFC 2560, June 1999.

   [15] Arkko, Calhoun, Patel, Zorn, "Diameter Accounting Extension",
        draft-ietf-aaa-diameter-accounting-00.txt,
        draft-ietf-aaa-diameter-accounting-01.txt, IETF work in pro-
        gress, February March 2001.



Calhoun et al.             expires July 2001                   [Page 52]





Internet-Draft                                             February 2001

   [16] Hinden, Deering, "IP Version 6 Addressing Architecture", RFC
        2373, July 1998.

   [17] ISI, "Internet Protocol", RFC 791, September 1981.

   [18] Mills, "Simple Network Time Protocol (SNTP) Version 4 for IPv4,
        IPv6 and OSI, RFC 2030, October 1996.

   [19] Housley, Ford, Polk, Solo, "Internet X.509 Public Key Infras-
        tructure Certificate and CRL Profile", RFC 2459, January 1999.

   [20] B. Aboba, G. Zorn, "Criteria for Evaluating Roaming Protocols",
        RFC 2477, January 1999.

   [21] M. Beadles, D. Mitton, "Criteria for Evaluating Network Access
        Server Protocols", draft-ietf-nasreq-criteria-05.txt, IETF work
        in progress, June 2000.

   [22] T. Hiller and al, "CDMA2000 Wireless Data Requirements for AAA",
        draft-hiller-cdma2000-aaa-02.txt, IETF work in progress, Sep-
        tember 2000.

   [23] S. Glass, S. Jacobs, C. Perkins, "Mobile IP Authentication,
        Authorization, and Accounting Requirements". RFC 2977. October
        2000.

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



Calhoun et al.            expires August 2001                  [Page 59]





Internet-Draft                                                March 2001


   [25] P. Calhoun, A. Rubens, H. Akhtar, E. Guttman, W. Bulley, J.
        Haag, "Diameter Implementation Guidelines", draft-ietf-aaa-
        diameter-impl-guide-00.txt, IETF work in progress, June 2000.

   [26] R. Stewart et al., "Stream Control Transmission Protocol". RFC
        2960.  October 2000.

   [27] Postel, J. "Transmission Control Protocol", RFC 793, January
        1981.

   [28] E. Guttman, C. Perkins, J. Veizades, M. Day. "Service Location
        Protocol, Version 2", RFC 2165, June 1999.

   [29] P. Calhoun, "Diameter Resource Management", draft-calhoun-
        diameter-res-mgmt-06.txt, IETF Work in Progress, February 2001.

   [30] Institute of Electrical and Electronics Engineers, "IEEE Stan-
        dard for Binary Floating-Point Arithmetic", ANSI/IEEE Standard
        754-1985, August 1985.



Calhoun et al.             expires July 2001                   [Page 53]





Internet-Draft                                             February 2001

   [31] D. Crocker, P. Overell, "Augmented BNF for Syntax Specifica-
        tions:  ABNF", RFC 2234, November 1997.

   [32] E. Guttman, C. Perkins, J. Kempf, "Service Templates and Ser-
        vice: Schemes", RFC 2609, June 1999.

   [33] A. Gulbrandsen, P. Vixie, L. Esibov, "A DNS RR for specifying
        the location of services (DNS SRV)", RFC 2782, February 2000.

   [34] D. Eastlake, "Domain Name System Security Extensions", RFC 2535,
        March 1999.

   [35] D. Eastlake, "DNS Security Operational Considerations", RFC
        2541, March 1999.

   [36] D. Eastlake, "DNS Request and Transaction Signatures ( SIG(0)s
        )", RFC 2931, September 2000.


13.0

   [37] S. Kent, R. Atkinson, "Security Architecture for the Internet
        Protocol", RFC 2401, November 1998.

   [38] A. Frier, P. Karlton, and P. Kocher, "The SSL 3.0 Protocol",
        Netscape Communications Corp., Nov 18, 1996.

   [39] "The Communications of the ACM"  Vol.33, No.6 (June 1990), pp.
        677-680.





Calhoun et al.            expires August 2001                  [Page 60]





Internet-Draft                                                March 2001


20.0  Acknowledgements

   The authors would like to thank Nenad Trifunovic, Tony Johansson and
   Pankaj Patel for their participation in the Document Reading Party.
   Allison Mankin's assistance was invaluable in working out transport
   issues, and similarly with Steven Bellovin's help in the security
   area.

   The authors would also like to acknowledge the following people for
   their contribution in the development of the Diameter protocol:

   Bernard Aboba, Jari Arkko, William Bulley, Daniel C. Fox, Lol Grant,
   Ignacio Goyret, Nancy Greene, Peter Heitman, Paul Krumviede, Fergal
   Ladley, Ryan Moats, Victor Muslin, Kenneth Peirce, Stephen Farrell,
   Sumit Vakil, John R. Vollbrecht, Jeff Weisberg, Jon Wood and Glen
   Zorn


14.0


21.0  Authors' Addresses

   Questions about this memo can be directed to:

      Pat R. Calhoun
      Network and Security Research Center, Sun Laboratories
      Sun Microsystems, Inc.
      15 Network Circle
      Menlo Park, California, 94025
      USA

       Phone:  +1 650-786-7733
         Fax:  +1 650-786-6445
      E-mail:  pcalhoun@eng.sun.com



Calhoun et al.             expires July 2001                   [Page 54]





Internet-Draft                                             February 2001


      Allan C. Rubens
      Tut Systems, Inc.
      220 E. Huron, Suite 260
      Ann Arbor, MI 48104
      USA

       Phone:  +1 734-995-1697
      E-Mail:  arubens@tutsys.com


      Haseeb Akhtar
      Wireless Technology Labs
      Nortel Networks
      2221 Lakeside Blvd.



Calhoun et al.            expires August 2001                  [Page 61]





Internet-Draft                                                March 2001


      Richardson, TX 75082-4399
      USA

       Phone:  +1 972-684-8850
      E-Mail:  haseeb@nortelnetworks.com


      Erik Guttman
      Solaris Advanced Development
      Sun Microsystems, Inc.
      Eichhoelzelstr. 7
      74915 Waibstadt
      Germany

       Phone:  +49-7263-911-701
      E-mail:  erik.guttman@germany.sun.com


15.0


22.0  Full Copyright Statement

   Copyright (C) The Internet Society (2001).  All Rights Reserved.

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



Calhoun et al.             expires July 2001                   [Page 55]





Internet-Draft                                             February 2001


   limited lim-
   ited permissions granted above are perpetual and will not be revoked
   by the Internet Society or its successors or assigns. This document
   and the information contained herein is provided on an "AS IS" basis
   and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS DIS-
   CLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
   TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
   INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
   FITNESS FOR A PARTICULAR PURPOSE.


16.0


23.0  Expiration Date

   This memo is filed as <draft-ietf-aaa-diameter-00.txt> <draft-ietf-aaa-diameter-01.txt> and expires in
   July
   August 2001.



Calhoun et al.            expires July August 2001                  [Page 56] 62]





Internet-Draft                                             February                                                March 2001


Appendix A. Diameter Service Template

   The following service template describes the attributes used by Diam-
   eter servers to advertise themselves.  This simplifies the process of
   selecting an appropriate server to communicate with.  A Diameter
   client can request specific Diameter servers based on characteristics
   of the Diameter service desired (for example, an AAA server to use
   for accounting.)

   Name of submitter:  "Erik Guttman" <Erik.Guttman@sun.com>
   Language of service template:  en


   Security Considerations:
      Diameter clients and servers use various cryptographic mechanisms
      to protect communication integrity, confidentiality as well as
      perform end-point authentication.  It would thus be difficult if
      not impossible for an attacker to advertise itself using SLPv2 and
      pose as a legitimate Diameter peer without proper preconfigured
      secrets or cryptographic keys.  Still, as Diameter services are
      vital for network operation it is important to use SLPv2 authenti-
      cation to prevent an attacker from modifying or eliminating ser-
      vice advertisements for legitimate Diameter servers.

   Template text:
   -------------------------template begins here-----------------------
   template-type=service:diameter

   template-version=0.0

   template-description=
     The Diameter protocol is defined by draft-ietf-aaa-diameter-00.txt

   template-url-syntax=
     url-path= ; The standard service URL syntax is used.
               ; For example: 'service:diameter://aaa.example.com:1812















Calhoun et al.            expires July August 2001                  [Page 57] 63]





Internet-Draft                                             February                                                March 2001


      supported-extensions= string L M
      # This attribute lists the Diameter extensions supported by the
      # AAA implementation.  The extensions currently defined are:
      #  Extension Name       Defined by
      #  ---------------      -----------------------------------
      #  NASREQ               draft-ietf-aaa-diameter-nasreq-00.txt
      #  MobileIP             draft-ietf-aaa-diameter-mobileip-00.txt
      #  Accounting           draft-ietf-aaa-diameter-accounting-00.txt
      #  Strong Security      draft-calhoun-diameter-strong-crypto-05.txt
      #  Resource Management  draft-calhoun-diameter-res-mgmt-06.txt
      #
      # Notes:
      #   . Diameter implementations support one or more extensions.
      #   . Additional extensions may be defined in the future.
      #     An updated service template will be created at that time.
      #
      NASREQ,MobileIP,Accounting,Strong Security,Resource Management

      supported-transports= string L M
      SCTP
      # This attribute lists the supported transports that the Diameter
      # implementation accepts.  Note that a compliant Diameter
      # implementation MUST support SCTP, though it MAY support other
      # transports, too.
      SCTP,TCP

   -------------------------template ends here-----------------------
























Calhoun et al.            expires July August 2001                  [Page 58] 64]


----