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.FebruaryMarch 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 2001Abstract 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.1Header FormatTransport 2.2 Securing Diameter Messages 2.3 Diameter Server Discovery 2.4 Mandatory Accounting Support 3.0 Diameter Header 3.1 Command Code Definitions2.3 AVP Format 2.3.14.0 Diameter AVPs 4.1 AVP Header2.3.24.2 Optional Header Elements2.3.34.3 AVP Data Formats2.3.44.4 Grouped AVP Values2.3.4.14.4.1 Example AVP with a Grouped Data type2.3.54.5 Diameter Base Protocol AVPs2.4 Mandatory AVPs 2.4.1 Host-Name5.0 Message Forwarding 5.1 Origin-FQDN AVP2.5 State Machine 2.65.2 Origin-Realm AVP 5.3 Destination-FQDN AVP 6.0 Capabilities Negotiation 6.1 Device-Reboot-Ind (DRI) Command2.6.16.1.1 Vendor-Id AVP2.6.26.1.2 Firmware-Revision AVP2.6.36.1.3 Extension-Id AVP2.6.46.1.4 Host-IP-Address AVP2.7 Diameter Server Discovery 3.0 "User" Sessions 3.17.0 Transport Failure Detection 7.1 Device-Watchdog-Request 7.2 Device-Watchdog-Answer 7.3 Failover/Failback Procedures 8.0 Peer State Machine3.2 Session-Id AVP 3.3 Authorization-Lifetime AVP 3.4 Session-Timeout AVP 3.5 User-Name9.0 Per-Hop Error Signaling 9.1 Device-Status-Ind 9.1.1 Device-Error AVP3.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.09.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 ErrorReporting 5.1Signaling 10.1 Message-Reject-Ind (MRI) Command5.1.110.1.1 Failed-AVP AVP5.1.210.1.2 Failed-Command-Code 10.2 Result-Code AVP 10.2.1 Informational 10.2.2 Success Calhoun et al. expiresJulyAugust 2001 [Page 2] Internet-DraftFebruaryMarch 20015.2 Result-Code AVP 5.2.1 Informational 5.2.2 Success 5.2.310.2.3 Redirect Notification5.2.410.2.4 Transient Failures5.2.510.2.5 Permanent Failures5.2.6 Hop-by-Hop Failures 5.310.3 Error-Message AVP5.4 Error-Reporting-NAI10.4 Error-Reporting-FQDN AVP6.011.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 Routing6.112.1 Realm-Based Message Routing6.2 Behavior of12.1.1 Realm-Based Routing Table 12.2 Proxy and RedirectServers 6.2.1Server handling of requests 12.2.1 Proxy and Redirect Server handling of requests6.312.3 Redirect Server6.3.112.3.1 Redirect-Host AVP6.3.212.3.2 Redirect-Host-Address AVP6.3.312.3.3 Redirect-Host-Port AVP6.412.4 Proxy Server6.4.112.4.1 Proxying Requests6.4.212.4.2 Proxying Responses6.4.312.4.3 Route-Record AVP6.4.412.4.4 Proxy-State AVP6.4.512.4.5 Proxy-Address AVP6.4.612.4.6 Proxy-Info AVP6.4.7 Routing-Realm12.4.7 Destination-Realm AVP6.512.5 Applying Local Policies6.612.6 Hiding Network Topology6.712.7 Loop Detection6.8 Finding a Target NAS within a Domain 6.8.1 Destination-NAI AVP 7.013.0 Diameter Message Security7.113.1 Hop-by-Hop Security7.1.113.1.1 Integrity-Check-Value AVP7.1.1.113.1.1.1 Authentication-Transform-Id AVP7.1.1.213.1.1.2 Digest AVP7.1.213.1.2 Encrypted-Payload AVP7.1.2.113.1.2.1 Encryption-Transform-Id AVP7.1.2.1.113.1.2.1.1 MD5 Payload Hiding7.1.2.213.1.2.2 Plaintext-Data-Length AVP7.1.2.313.1.2.3 Encrypted-Data AVP7.213.2 Nonce AVP7.313.3 Timestamp AVP7.4Calhoun et al. expires August 2001 [Page 3] Internet-Draft March 2001 13.4 Key-Id AVP8.014.0 AVP Table9.015.0 IANA Considerations9.115.1 AVP Attributes9.215.2 Command Code AVP Values9.315.3 Extension Identifier ValuesCalhoun et al. expires July 2001 [Page 3] Internet-Draft February 2001 9.415.4 Result-Code AVP Values9.515.5 Integrity-Check-Value AVP Transform Values9.615.6 Encryption-Transform-Id AVP Values9.715.7 Message Header Bits9.815.8 AVP Header Bits10.015.9 DSI-Event AVP Values 16.0 Open Issues11.017.0 Diameter protocol related configurable parameters12.018.0 Security Considerations13.019.0 References14.020.0 Acknowledgements15.021.0 Authors' Addresses16.022.0 Full Copyright Statement Appendix A. Diameter Service Template Calhoun et al. expiresJulyAugust 2001 [Page 4] Internet-DraftFebruaryMarch 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. expiresJulyAugust 2001 [Page 5] Internet-DraftFebruaryMarch 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 Section9.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. expiresJulyAugust 2001 [Page 6] Internet-DraftFebruaryMarch 2001 subsequent messages to identify the user's session (see section3.011.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.1Header FormatTransport The base Diameter protocol is runover SCTP [26]on port TBD of both TCP [27] and SCTP [26] transport protocols (for interoperability test purposeswe will supportport 1812 will be used until April 2001).Implementations MAY send packets from any source port, butDiameter clients [9] MUSTbe prepared to receive packets on port TBD. When a request is received, in ordersupport 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 tosendreceive packets on port TBD. When areply,request is received, the source anddestinationdestionation ports in the reply are reversed. Note that the source and destination addresses used in request and replies MAYbeany ofthea 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. Thefields are transmitted in network byte order.recommended connection interval is 30 seconds. 2.2 Securing Diameter Messages Calhoun et al. expiresJulyAugust 2001 [Page 7] Internet-DraftFebruaryMarch 20010 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 bezero - 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 flagssecured between peers, and both SSL [28] and IP Security [37] areset depending on the command code used in a Diameter message. This enables the type of messagesupported. Network Access Servers (NASes) and Foreign Agents, commonly referred tobe interpreted, even ifas 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 thespecific command code is not recognized. Command Type Flags Set Indication - - - Request E - - Answer - - R Query E I - Reply - I R ADiameternodeprotocol MUSTNOT set these flags in any other combination. Ahave the necessary security policies to ensure that unauthenticated Diameternode receiving a message in which these flagspackets are notset appropriately SHOULD NOT reject the messageprocessed. 2.3 Diameter Server Discovery Allowing forthis reason, but MAY log the eventdynamic Diameter server discovery will make it possible fordiagnosis. Version This Version field MUST be setsimpler and more robust deployment of AAA services. In order to1promote 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 toindicatediscover a first-hop DiameterVersion 1. Message Lengthserver. TheMessage Length fieldsecond case istwo octets and indicates the lengthwhen a Diameter server needs to discover another server - for further handling ofthea Diametermessage includingoperation. In both cases, theheader fields. Calhoun et al. expires July 2001 [Page 8] Internet-Draft February 2001 Identifier The Identifier fieldfollowing 'search order' isfour octets, and aids in matching requests and replies.recommended: 1. Thesender 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 andMAY attemptrespond. 2. The Diameter implementation uses SLPv2 [28] toensure that the number is unique across reboots.discover Diameter services. Thesender of a response (*-Answer or *-Response) MUST ensureDiameter 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 theIdentifier field contains the same Identifier value that was foundlocation of Diameter servers in thecorresponding request. For The identifier is normally a monotonically increasing number, whose start value was randomly generated.local site, as well as their characteristics. Diameter serversshould consider a message to be unique by examiningwith specific capabilities (say support for thesource address, source port, Session-IdAccounting extension) can be requested, andIdentifier field of the message. Command-Codeonly those will be discovered. 3. TheCommand-Code field is four octets, and is used in orderDiameter implementation uses DNS tocommunicaterequest thecommand associated withSRV RR [33] for themessage. The 32-bit address space is managed by IANA (see section 9.2).'_diameter._sctp' and/or '_diameter._tcp' server in a particular domain. Thefollowing Command Codes are currently definedDiameter implementation has to know intheadvance which domain to look for an Diameterbase 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 thatserver in. This could be deduced, for example, from theCommand-Code field contains'realm' in avendor 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 containsNAI that Calhoun et al. expires August 2001 [Page 8] Internet-Draft March 2001 anIETF standard Command,Diameter implementation needed to perform an Diameter operation on. Diameter allows AAA peers to protect theVendor-ID field MUST be setintegrity and privacy of communication as well as tozero (0). AVPs AVPs areperform end-point authentication. Still, it is prudent to employ DNS Security as amethod of encapsulating information relevantprecaution when using DNS SRV RRs to look up the location of a Diametermessage. See section 2.3 for more information on AVPs. 2.2 Command Code Message Definitionsserver. [34, 35, 36] 2.4 Mandatory Accounting Support All DiameterCommand Codeimplementations MUSTinclude a corresponding ABNF specification, which is used to definesupport theAVPsDiameter Accounting Extension [15]. An implementation thatMUST, MAY and MUSTdoes not support [15] does NOTbe 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 incomply with the Diameter baseor extendedprotocol. 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. Theavp-namefields are transmitted inthe 'optional' rule cannot ; evaluate to any AVP Name whichnetwork 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 isincluded ; in a fixed or required rule. qual = [min] "*" [max] ; See ABNF conventions, RFC 2234 section 3.6. ;thirteen bits. Theabsence of any qualifiers implies that one ; and only one such AVPfollowing bits are assigned: r(eserved) MUST bepresent. ; ; NOTE: "[" and "]" havezero - this flag bit is reserved for future use. E(xpected Reply) - The message solicits adifferent meaning ; thanresponse. 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 inABNF (seea Diameter message. This enables theoptional rule, above). ; These braces cannottype of message to beused to express an ; optional fixed rules (such as an optional ; ICV at the end.) To do this,interpreted, even if theconvention ;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 inthe base or extendedany 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 whichdoesthese flags are notconflict withset appropriately SHOULD NOT reject the; required or fixed position AVPs defined in ;message for this reason, but MAY log thecommand code definition.event for diagnosis. Version This Version field MUST be set to 1 to indicate Diameter Version 1. Message Length ThefollowingMessage Length field isa definitiontwo octets and indicates the length ofa fictitious command code: Example-Command ::= < Diameter-Header: 9999999 > { User-Name } * { Host-Name } * [ AVP ] 0*1< Integrity-Check-Vector > 2.3 AVP Formatthe DiameterAVPs carry specific authentication, accounting and authorization information, security information as well as configuration details formessage including therequest and reply. Some AVPs MAY be listed more than once.header fields. Hop-by-Hop Identifier Theeffect of such an AVPIdentifier field isspecific,four octets, andis specifiedaids ineach case by the AVP description. Each AVP of type OctetStringmatching requests and replies. The sender MUSTbe padded to align onensure that the identifier in a32 bit boundary, while other AVP types align naturally. NULL bytes are addedrequest (*-Request or *-Query) or indication (*-Ind) message is locally unique (to the sender) at any given time, and MAY attempt to ensure that theendnumber is unique across reboots. The sender of a response (*-Answer or *-Response) MUST ensure that theAVP DataIdentifier fieldtill a word boundary is reached.contains the same Identifier value that was found in the corresponding request. For Thelengthidentifier 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 thepadding is not reflected inmessage. End-to-End Identifier Unlike theAVP LengthHop-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 HeaderThefields in the AVP headersender of a request, query, indication, answer or response message MUSTbe sentinsert a locally unique value innetwork byte order.this field. Theformatcombination of theheader 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 256Session-Id AVP and this field is used to detect duplicates. Command-Code Calhoun et al. expiresJulyAugust 2001 [Page11]10] Internet-DraftFebruaryMarch 2001numbers are reserved for backward compatibility with RADIUS and are to be interpreted as per NASREQ [7]. AVP numbers 256The Command-Code field is four octets, andabove areis usedfor Diameter, which are allocatedin order to communicate the command associated with the message. The 32-bit address space is managed by IANA (see section9.1). AVP Length The AVP Length field is two octets, and indicates15.2). Vendor-ID In thelength of this AVP includingevent that theAVP Code, AVP Length, AVP Flags, Reserved,Command-Code field contains a vendor specific command, the four octet Vendor-ID field(if present) andcontains theAVP data.IANA assigned "SMI Network Management Private Enterprise Codes" [2] value. Ifa message is received withthe Command-Code field contains aninvalid attribute length,IETF standard Command, themessage SHOULD be rejected. AVP Flags The AVP FlagsVendor-ID fieldinformsMUST be set to zero (0). AVPs AVPs are a method of encapsulating information relevant to the Diameterhost how each attribute must be handled. Note that subsequentmessage. See section 4. for more information on AVPs. 3.1 Command Codes Every Diameterextensions MAY define bits to bemessage MUST contain a value in its header's Command- Code field, which is usedwithinto determine theAVP Header, and an unrecognized bit shouldaction that is to beconsidered an error.taken for a particular message. The'R' and the reserved bitsfollowing Command Codes areunused and should be set to 0 and ignored on receipt, while the 'P' bit isdefined 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,themessage MUST be forwarded to its logical destination, andDiameter 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 MUSTNOT be rejected. It is the responsibility of the originator ofinclude amessage thatcorresponding ABNF specification, which isrejected for this purposeused tocorrectdefine theerror.AVPswithout the 'M' bit enabled are informational only and a receiver that receives a message with such an AVPthatis not supportedMUST, MAYsimply 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' bitand MUST NOT beset. 2.3.2 Optional Header Elementspresent. TheAVP Header contains one optional field. This fieldfollowing format isonly present ifused in therespective bit-flag is enabled. Vendor-ID Calhoundefinition: 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. expiresJulyAugust 2001 [Page12]11] Internet-DraftFebruaryMarch 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 "]" ; TheVendor-ID field is present if the 'V' bit is setavp-name in theAVP 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 toimplement a Diameter extension MUST use their own Vendor-ID along with their privately managed AVP address space, guaranteeing that they will not collide withanyother vendor's extensions, nor with future IETF extensions. A vendor ID value of zero (0) corresponds to the IETF adoptedAVPvalues, as managed by the IANA. Since theName which is included ; in a fixed or required rule. qual = [min] "*" [max] ; See ABNF conventions, RFC 2234 section 6.6. ; The absence ofthe vendor ID fieldany qualifiers implies thattheone ; and only one such AVP MUST be present. ; ; NOTE: "[" and "]" have a different meaning ; than inquestion is not vendor specific, implementations SHOULD not useABNF (see thezero (0) vendor ID. 2.3.3 AVP Data Formats The Data field is zero or more octets and contains information specificoptional rule, above). ; These braces cannot be used to express an ; optional fixed rules (such as an optional ; ICV at theAttribute. The format and length ofend.) To do this, theData fieldconvention ; isdetermined by the AVP Code and AVP Length fields.'0*1fixed'. min = 1*DIGIT ; Theformatminimum number of times theData field MAYelement may ; beone of the following data types.present. max = 1*DIGIT ; Theinterpretation of the values depends on the specificationmaximum number of times theAVP. For example, an OctetStringelement may ; beusedpresent. avp-spec = diameter-name ; The avp-spec has totransmit human readable string data and Unsigned32 maybeused to transmit a time value. Conventions for these common interpretations are described below. OctetStringan AVP Name, defined ; in the base or extended Diameter ; specifications. avp-name = avp-spec | "AVP" ; Thedata containsstring "AVP" stands for *any* arbitrarydata of variable length. Unless otherwise noted, the; AVPLength field MUST be set to at least 9 (13 ifName, 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 ; theUTF-8 [24] character set and is NOT NULL-terminated.command code definition. Theminimum Length field MUST be 9, but can be set to any value up to 65527 bytes. AVP Valuesfollowing is a definition ofthis type that do not align ona32-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. Theformateffect ofthe address (IPv4 or IPv6) is determined by the length. If the attribute value issuch anIPv4 address, theAVPLength field MUST be 12 (16 if 'V' bitisenabled), otherwisespecific, and is specified in each case by the AVPLength fielddescription. Each AVP of type OctetString MUST besetpadded to24 (28 if the 'V' bit is enabled) for IPv6 addresses. Integer32align on a 32 bitsigned value, in network byte order. Theboundary, while other AVPLength Calhoun et al. expires July 2001 [Page 13] Internet-Draft February 2001 field MUST be settypes align naturally. NULL bytes are added to12 (16 ifthe'V' bitend of the AVP Data field till a word boundary isenabled). Integer64 64 bit signed value, in network byte order.reached. The length of the padding is not reflected in the AVP Lengthfieldfield. 4.1 AVP Header The fields in the AVP header MUST beset to 16 (20 if the 'V' bit is enabled). Unsigned32 32 bit unsigned value,sent in network byte order. TheAVP Length field MUST be set to 12 (16 if the 'V' bit is enabled). Unsigned32 values used to transmit time data containsformat of thefour most significant octets returned from NTP [18], in network byte order. Unsigned64 32 bit unsigned value, in network byte order. Theheader 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 Lengthfield 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 The32 bit value is transmitted in network byte order.AVP Code identifies the attribute uniquely. The first 256 AVPLength field MUST be setnumbers are reserved for backward compatibility with RADIUS and are to12 (16 if the 'V' bit is enabled). Float64 This represents floating point values of double precisionbe interpreted asdescribedper 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 fieldMUST be set to 16 (20 if the 'V' bitisenabled). Float128 This represents floating point valuestwo octets, and indicates the length ofquadruple precision as described by [30]. The 128 bit value is transmitted in network byte order. Thethis AVPLengthincluding the AVP Code, AVP Length, AVP Flags, Reserved, the Vendor-ID fieldMUST be set to 24 (28 if(if present) and the'V' bitAVP data. If a message isenabled). GroupedCalhoun et al. expires August 2001 [Page 13] Internet-Draft March 2001 received with an invalid attribute length, the message SHOULD be rejected. AVP Flags TheDataAVP Flags fieldis specified as a sequence of AVPs. Each of these AVPs follows - ininforms theorder in which they are specified - including their headersDiameter host how each attribute must be handled. Note that subsequent Diameter extensions MAY define bits to be used within the AVP Header, andpadding.an unrecognized bit should be considered an error. TheAVP Length field is'r' and the reserved bits are unused and should be set to8 (12 if0 and ignored on receipt, while the'V''P' bit isenabled) plusdefined in [11]. The 'M' Bit, known as thetotal lengthMandatory bit, indicates whether support ofall included AVPs, including their headers. 2.3.4 Groupedthe AVPValues The Diameter protocol allowsis required. If an AVPvalues of type 'Grouped.' This implies that the Data fieldisactuallyreceived by awell defined sequence of AVPs. It is possible to includeHome server or NAS with the 'M' bit enabled and the receiver does not support the AVP, the message MUST be rejected. If such an AVPwithis received by aGrouped type withinProxy 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 aCalhoun et al. expires July 2001 [Page 14] Internet-Draft February 2001 Grouped type,message thatis,is rejected for this purpose tonest them. AVPs within an AVP of type Grouped havecorrect thesame 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 asdefinedthe Vendor-Specific bit, indicates whether the optional Vendor-ID field is present insection 2.3. Grouped typethe AVPspecifications include an ABNF grammar [31] specifyingheader. When set therequired sequence of AVPs. GroupedAVPvaluesCode 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 bein the specified sequence andset. The 'V' bit MUST NOTinclude other AVP values besides those specified by the Grouped AVP grammar. 2.3.4.1 Example AVP with a Grouped Data typebe set. 4.2 Optional Header Elements TheExampleAVP(AVP Code 999999)Header contains one optional field. This field isof type Grouped andonly present if the respective bit-flag isused to clarify how Grouped AVP values work.enabled. Vendor-ID TheGrouped DataVendor-ID fieldhasis present if the 'V' bit is set in thefollowing 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 ExampleAVPwithFlags field. The optional four octet Vendor-ID field contains theGrouped Data Host-Name = "example.com", Host-IP-Address = "10.10.10.10" would beIANA assigned "SMI Network Management Private Enterprise Codes" [2] value, encodedas follows: 0 1 2 3 4 5 6 7 +-------+-------+-------+-------+-------+-------+-------+-------+ 0 | Examplein network byte order. Any vendor wishing to implement a Diameter extension MUST use their own Vendor-ID along with their privately managed AVPHeader (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. expiresJulyAugust 2001 [Page15]14] Internet-DraftFebruaryMarch 2001+---------------------+ |A vendor ID value of zero (0) corresponds to the IETF adopted AVPFlag 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 AVPSection | | |SHLD| MUST|MAY | Attribute NameCodeDefinedand AVP Length fields. The format of the DataType |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.1be 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- 294may 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.3OctetString| | | | | 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-Id258 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.2AVP 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.6and 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. expiresJulyAugust 2001 [Page16]21] Internet-DraftFebruaryMarch 2001+---------------------+ | AVP Flag rules | |----+-----+----+-----|----+The Extension-Id AVPSection | | |SHLD| MUST|MAY | Attribute Name(AVP CodeDefined 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.1258) is of type Unsigned32| | | | V,M | Y | -----------------------------------------|----+-----+----+-----|----| 2.4 Mandatory AVPsand is used in order to identify a specific Diameter extension. Thissection definesAVP is used in theDiameter AVPs thatDevice-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 Diametermessages. 2.4.1 Host-Namespecification 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 TheHost-NameHost-IP-Address AVP (AVP Code264) [1]257) is of typeOctetString. 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 messageAddress andMUST follow the NAI [8] naming conventions. Note that the Host-Name AVP may resolveis used tomore than one address as theinform a Diameter peermay support more than oneof the sender's IP address.2.5 State Machine This section contains a finite state machine,All source addresses thatMUST be observed by all Diameter implementations. Eacha Diameter nodeMUST follow the state machine described below when communicating with each peer. State Event Action New State ----- ----- ------ --------- Initial Local requestexpects toestablish SCTP Idle communication with a Diameter Connect peeruse withwhich there is no existing transport level connection established. Initial Receive transport level Send DRI Wait-DRI connection request fromSCTP [26] MUST be advertised in the Device-Reboot-Ind message by including aDiameter 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 MAYHost-IP- Address AVP for each address. This AVP MUST ONLY bemerged ifused in thelocal SCTP implementation is able to implementDevice-Reboot-Ind message. 7.0 Transport Failure Detection Given thepiggybacknature ofdata during the connection phase. WhentheCleanup actionDiameter protocol, it isinvoked,recommended that transport failures be detected as soon as possible. Detecting such failures will minimize theDiameter node SHOULD attemptoccurrence of messages sent toforward all pending requestsunavailable servers, resulting in unnecessary delays, andreplies, which haven't been acknowledged,will provide better Calhoun et al. expires August 2001 [Page 22] Internet-Draft March 2001 failover performance. In order toan alternate server (when possible). Ifpro-actively detect such failures, thefinal destination for a specific message isDiameter protocol defines thehost thatDevice-Watchdog-Request message, which is sent to an inactive peer. A peer is considered inactive if nolonger accessible,messages were sent or received from themessage in question SHOULD be respondedpeer within the current watchdog interval period (see Section 17.0), and no request or query messages are pending with theResult-Code AVP setpeer. For implementations that have access toDIAMETER_UNABLE_TO_DELIVER. 2.6 Device-Reboot-Ind (DRI) Command A Diameter device sends the Device-Reboot-Ind message, by settingtheCommand-Code field with aRetransmission Time-Out (RTO) value of257, to informthe underlying transport connection, apeerDWR SHOULD be sent once per RTO of that connection, plus the watchdog interval period, with areboot has just occurred. Since SCTP [26] allows for connections to span multiple interfaces, hence multiple IP addresses,jiterring of +/- 50%. If theDevice- Reboot-Ind messageDWR is unanswered, the time until the next DWR is sent MUSTcontain one Host-IP-Address AVP for each potential IP address that MAYbelocally used when transmitting Diameter messages. The DRI message is also used for capabilities negotiation, such asrecalculated after exponentially backing off thesupported 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 thelocally supported extensions.peer is marked as failed. DWR messages continue to be sent (jittered) at the final interval for detection for failover. Thereceiver uses the extensions advertised in ordercurrent watchdog interval is returned todetermine whether it SHOULD send certain application-specific Diameter commands. A Diameter node MUST retainits starting point when a DWA is received or thesupported extensions in order to ensurepeer resumes activity. Implementations thatunrecognized commands and/or AVPs aredo notsenthave access to the RTO SHOULD perform an Round Trip Time (RTT) measurement for apeer. Note that ingiven peer when aproxy environment, itDevice- Watchdog-Answer message isstill possible thatreceived for adownstream proxy has no available peer that have advertisednon-backed off DWR. The fixed RTO base should be replaced by RTT-Multiplier (Section 17.0) times theextensionmeasured 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 thatcorresponds toexponential backoff MUST be performed before the maximum is reached. 7.1 Device-Watchdog-Request The Device-Watchdog-Request (DWR), indicated by theCommand-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, andthereforeno requests are pending with therequest cannot be forwarded any further. The Diameterpeer. Message Format Calhoun et al. expiresJulyAugust 2001 [Page18]23] Internet-DraftFebruaryMarch 2001base protocol provides this error reporting, via the Result-Code AVP. Once the transport layer connection has been established, a<Device-Watchdog-Request> ::= < Diameterentity MUST issue a DRI message, regardless of whetherHeader: 280 > { Origin-FQDN } { Origin-Realm } 0*1< Integrity-Check-Value > 7.2 Device-Watchdog-Answer The Device-Watchdog-Answer (DWA), indicated by thepeer was statically configured, or dynamically discovered (see Section 2.7 for more information). If a peerCommand-Code set to 281, isno longer reachable,sent as aDiameter device SHOULD periodically attemptresponse toestablish a transport level connection withthepeer and send a DRIDevice-Watchdog-Request message.This message does not require a reply. If a Diameter node receives a DRI message that resultsA receiver of the DWA SHOULD perform RTT calculation inan 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:257281 > {Host-Name } 1* { Host-IP-AddressResult-Code } {Vendor-IdOrigin-FQDN }*{Extension-IdOrigin-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 isof type Unsigned32detected with a peer, it is necessary for all pending request, query andcontains the IANA assigned "SMI Network Management Private Enterprise Codes" [2] value of the Diameter device. This MAY be used in orderindication messages toknow which vendor specific attributes maybesentforwarded 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.ItWhen a response isalso envisioned that the combination ofreceived, theVendor-Name andmessage is removed from theFirmware-Revision (section 2.6.2) AVPs MAY provide very useful debugging information. 2.6.2 Firmware-Revision AVPqueue. TheFirmware-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 oftype Unsigned32 anda case where it isusednot possible for forward the message toinforman alternate server is when the message has aDiameter peer offixed destination, and thefirmware revision ofunavailable peer is theissuing device. For devicesmessage's final destination (see Destination-FQDN AVP). Such an error requires thatdo not have a firmware revision (general purpose computers running Diameter software modules, for instance),therevision ofserver 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 theDiameter software module maytransport connection. Once a connection has been successfully established, messages can once again bereported instead.forwarded to the peer. This is commonly referred to as failback. Calhoun et al. expiresJulyAugust 2001 [Page19]24] Internet-DraftFebruaryMarch 20012.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 ThisAVP is used in the Device-Reboot-Ind message in order to inform the peer what extensions are locally supported. The Extension-Idsection contains a finite state machine, that MUSTalsobepresent inobserved by allmessages that are defined in a separateDiameterspecification and have an Extension ID assigned.implementations. Each Diameterextension draftnode MUSThave 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 includingfollow theExtension-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 usedstate machine described below when communicating with each peer. State Event Action New State ----- ----- ------ --------- Initial Local request toinformestablish SCTP/TCP Idle communication with a Diameter Connect peerof the sender's IP address. All source addresses that a Diameter node expects to usewithSCTP [26] MUST be advertised in the Device-Reboot-Ind message by includingwhich there is no existing transport level connection established. Initial Receive transport level Send DRI Wait-DRI connection request from aHost-IP-Address AVP for each address. This AVP MUST ONLY be used in the Device-Reboot-Ind message. 2.7DiameterServer Discovery Allowing for dynamicpeer. 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 Diameterserver discovery will make it possible for simplerEntity shutdown or Close Initial close connection with peer connection The Initial andmore robust deployment of AAA services. In orderIdle states MAY be merged if the local SCTP implementation is able topromote interoperable implementationsimplement the piggyback ofDiameter server discovery,data during thefollowing mechanisms are described. These are based on existing IETF standards. There are two cases where Diameter server discovery may be performed.Calhoun et al. expiresJulyAugust 2001 [Page20]25] Internet-DraftFebruaryMarch 2001The first is when a Diameter client needs to discover a first-hop Diameter server. The second caseconnection phase. When the Cleanup action iswheninvoked, 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 Diameterservernode, that needs todiscover another server - for further handlingbe signalled to the downstream server, and not necessarily to the Diameter client. Examples of such error conditions are invalid time synchronization, inability to forward aDiameter operation.message to a particular domain, etc. Inboththese cases, returning the error back to thefollowing 'search order' is recommended: 1. The Diameter implementation consults its list of static (manual) configuredDiameterserver locations. Theseclient willbe used if they existonly cause delay, andrespond. 2. The Diameter implementation uses SLPv2 [28] to discover Diameter services. The Diameter service template [32] is includedperhaps confusion inAppendix A. It is recommended that SLPv2 security be deployed (this requires distributing keys to SLPv2 agents.) Thisroaming networks. Therefore, when such errors occur, it isdiscussed 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 supportnecessary for theAccounting extension) canerror to berequested,handled by the downstream next hop, andonly those willsome local action bediscovered. 3. The Diameter implementation uses DNStaken torequestrectify theSRV RR [33] for the '_diameter._sctp' server in a particular domain. The Diameter implementation has to know in advance which domainproblem, such as forwarding tolook for an Diameter server in. This could be deduced, for example, from the 'realm' inaNAI that an Diameter implementation needed to perform an Diameter operation on. Diameter allows AAA peersdifferent next hop. Request +--------+ Link Broken +-------------------------->|Diameter|----///----+ | +---------------------| | v +-----+---+ | DSI | Server | +--------+ |Diameter |<-+ (Unable toprotect the integrity and privacyForward) +--------+ |Diameter| |Client or| | | | Server |--+ +--------+ | Server | +---------+ | Request |Diameter| +--------+ +-------------------->| | ^ | Server |-----------+ +--------+ Figure 1 - Example ofcommunication as well asPer-Hop Error Condition 9.1 Device-Status-Ind The Device-Status-Ind (DSI), indicated by the Command-Code set toperform end-point authentication. Still, it282, isprudentsent toemploy DNS Security asinform aprecaution when using DNS SRV RRs to look up the location ofpeer that an event has occurred. When a Diameterserver. [34, 35, 36] 3.0 "User" Sessions Whennode issues auser requests accessDSI message downstream, the target peer MUST attempt to rectify thenetwork,problem, or issue aDiameter client issues an authentication and authorization request to its local server.similar message downstream. Therequest contains a Session-Id AVP, whichDevice-Status-Ind message MUST NOT be proxied, but MAY be forwarded, as long as the Origin-FQDN AVP isused in subsequent messages (e.g. subsequent authorization, accounting, etc) relatingreplaced to include theuser'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 TheSession-IdResult-Code AVP (AVP Code 297) isa means for the clientof type Unsigned32 andservers to correlateindicates that an event occurred which requires attention from a Diametermessage with a user session. When apeer. The DSI-Event contains an IANA-managed 32-bit address space representing events (see section 15.9). Diameterserver authorizesprovides 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 auser to use network resources, it SHOULD addpermanent failure. 9.1.1.1 Informational Events Events that fall within theAuthorization-Lifetime AVPInformational category are used tothe response. The Authorization-Lifetime AVP defines the maximum amount of timeinform a peer that auser Calhoun et al. expires July 2001 [Page 21] Internet-Draft February 2001 MAY make use of the resources before another authorizationrequestis tocannot betransmitted toimmediately satisfied, and a further response will be issued in theserver. Ifnear future. DIAMETER_STILL_WORKING 1001 A request's Max-Wait-Time has expired, and theserver does not receive another authorizationrequestbeforeis still being serviced. This event MAY be sent prior to thetimeout occurs, it SHOULD release any state information relatedMax-Wait- Time expiration, to inform theuser's session. Notepeer that theAuthorization-Lifetime AVP implies how long the Diameter serverrequest iswillingnot expected topay forbe serviced in theservices rendered, therefore a Diameter client SHOULD NOT expect payment for services rendered pastalloted time, but thesession expiration time. The base protocol does not include any authorizationrequestmessages, since these are largely application-specific and are defined in a Diameter protocol extension document. However, the base protocol does define a set of messagesis not being abandoned. 9.1.1.2 Redirect Event Errors that fall within the Redirect Notification category are used toterminate user sessions. These are used to allow servers that maintain state information to free resources. 3.1 State Machine This section containsinform afinite state machine, representingpeer that thelife cycle of Diameter sessions,request cannot be satisfied locally andMUSTshould instead beobserved by all Diameter implementations. The term Service-Specific below refersforwarded toa message defined in a Diameter extension (e.g. Mobile IP, NASREQ). State Event Action New State ----- ----- ------ --------- Idle Clientanother server. DIAMETER_REDIRECT_INDICATION 3001 A proxy orDevice Requests send serv. Pending access specific auth req Idle Service-Specific authorization send serv. Openredirect server has determined that the requestreceived,could not be satisfied locally andspecific 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/devicethe initiator of the request Calhoun et al. expiresJulyAugust 2001 [Page22]27] Internet-DraftFebruaryMarch 2001received. 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 Transitionshould direct the request directly tostate Cleanup WhentheCleanup action is invoked,server, whose contact information has been added to theDiameter noderesponse. 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 MAYattemptbe able torelease all resourcessatisfy 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 theparticular session. Any event not listed above MUST be considered as an error condition,request failed, anda response, if applicable, MUSTcannot bereturned tosatified by the originator of themessage. 3.2 Session-Id AVPDevice-Status-Ind. TheSession-Id AVP (AVP Code 263) isreceiver oftype OctetString and is used to identifyaspecific session (see section 3.0). The Session-Id data usesDSI message with theUTF-8 [24] character set. All messages pertainingDSI-Event set to aspecific session MUST include onlyvalue that falls within this event class SHOULD forward the message to an alternate peer, if oneSession-Idis available. DIAMETER_INVALID_RECORD_ROUTE 5001 The last Record-Route AVPandin thesame value MUST be used throughoutmessage is not set to thelifeidentity ofa session. When present,theSession-Id SHOULD appear immediately followingsender of theDiameter Header (see section 2.1). For messagesmessage. See Section 12.0 for more information. DIAMETER_COMMAND_UNSUPPORTED 5002 The Request contained a Command-Code thatdothe receiver did notpertain to a specific session, multiple Session-Id AVPs MAY be present as long as they are encapsulated withinrecognize or support. The Device-Status-Ind message MUST also contain an Failed-Command-Code AVPof type Grouped.containing the unrecognized Command-Code. DIAMETER_UNABLE_TO_DELIVER 5003 TheSession-Id MUSTrequest could not beglobally uniquedelivered to a host that handles the realm, and extension, requested atany given timethis 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 sinceitthe 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 usedbyto inform a peer that theserverrequest is not expected toidentifybe processed within thesession (or flow). The formatMax-Wait-Time value. 10.0 End-to-End Error Signaling There are five different types ofthe 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 2001error conditions that can occur within Diameter. Themonotonically increasing 32 bit value SHOULD NOT start at zero upon reboot, but rather start atfirst occurs when arandom value.Diameter message is poorly formatted, and unrecognizable, indicated in the figure below as "Bad Message". Thiswill minimizeerror condition applies if a received message is less than thepossibilitylength ofoverlapping Session-Ids afterthe Diameter header. Messages that generate such an error are ignored. A second case occurs when areboot. Alternatively,Command-Code field is set to animplementation MAY keep track of the increasing value in non-volatile memory. The optional valueunsupported value, which isimplementation specific but may include a modem's device Id,shown as "Unknown Command" in the figure. Such errors generate alayer 2 address, timestamp, etc. The session IdDevice-Status-Ind message, and require per-hop behavior. A third case occurs when an AVP iscreatedreceived, marked as Mandatory ('M' bit is set), and is unknown by theDiameter device initiating the session, which in most casesreceiver. This error condition isdone bylabelled as "Unknown AVP" in theclient. Notefigure 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 aSession-Id MAYMessage-Reject-Ind message beused by more than one extension (e.g. authentication forsent. The last two cases require that aspecific service and accounting,Message-Reject-Ind message be generated to ensure that such errors are identified in bothof which have separate extensions). 3.3 Authorization-Lifetime AVPrequest and response messages. TheAuthorization-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 typeUnsigned32 and containsrequest or query, themaximum number of seconds of service tonatural corresponding answer or response message MUST beprovidedused. 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 theuser beforepeer that an error occurred while processing theusermessage. 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 tobe re-authenticated and/or re- authorized. Great care should be taken whenreport theAuthorization- Lifetime valueerror condition, while "Send DSI" requires that a Device-Status-Ind message isdetermined, sincesent (see Section 9.1). "Send Response" means that the response message for alow value could create significant Diameter traffic, which could congest bothrequest or query message is returned. 10.1 Message-Reject-Ind (MRI) Command The Message-Reject-Ind (MRI), indicated by thenetworkCommand-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 andthe servers. ThisResponse 2. A Unknown AVP, marked as Mandatory, is received 3. An AVPMAY be provided bywas received with an unknown, or illegal, value. The Message-Reject-Ind message MUST contain theclientsame Hop-by-Hop Identifier value in the header asa hint ofthemaximum durationmessage thatit is willing to accept. However,caused theserver DOES NOT have to observeerror condition. If thehint, and MAY return a value that is smaller thanSession-Id AVP was present in thehint. A value of zero means that no re-authorization is required. 3.4 Session-Timeoutoriginal message, the same AVPThe Session-TimeoutMUST 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 themaximum number of seconds of service to be provided toResult-Code AVP indicate theuser before terminationnature of thesession. A value of zero means that this session has an unlimited number of seconds before termination. Thiserror causing rejection, and the Failed-AVP AVPMAY be providedprovides some minimal debugging data bythe client asindicating ahint ofspecific AVP type which caused themaximum duration that it is willing to accept. However,problem. See theserver DOES NOT have to observedescription of thehint, and MAY return a value that is smaller thanResult-Code AVP for indication of when thehint. 3.5 User-NameFailed-AVP AVP MUST be present in the message. See [25] for more information. 10.1.1 Failed-AVP AVP TheUser-NameFailed-AVP AVP (AVP Code1) [1]279) is of typeOctetString, 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 ProtocolOctetString and provides debugging information in cases where aset of messages that MAY be used by any peer to explicitlyrequestthat a previously authenticated and/or authorized session be terminated. Since the Session-Idistypically tiedrejected or not fully processed due to erroneous information in aparticular service (i.e. Mobile IP, NASREQ, etc), the session termination messages are used to request thatspecific AVP. The value of theservice tied toResult-Code AVP will provide information on theSession Id be terminated. 3.6.1 Session-Termination-Ind The Session-Termination-Ind (STI), indicated byreason for theCommand-Code set to 274, MAY be sent by anyFailed-AVP AVP. A Diameterentity to the access device to request that a particular session be terminated. Thismessage MAYbe used whencontain one or more Failed-AVP AVPs, each containing aserver detectscomplete AVP thata session MUSTcould not beterminated, which is typically done asprocessed 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 apolicy decision (e.g. local resources have been expended, etc).required AVP. 10.1.2 Failed-Command-Code TheDestination-NAIFailed-Command-Code AVPMUST be present, and contain the NAI(AVP Code 270) is of type Unsigned32 and contains theaccess deviceoffending Command-Code thatinitiated the session (see section 3.0). Upon receipt of the STI message,resulted in sending theaccess device SHOULD issue a Session-Terminate-RequestMessage-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-RequestTheSession-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 sessionResult-Code AVP (AVP Code 268) isbeing terminated.of type Unsigned32 and indicates whether a particular request was completed successfully or Calhoun et al. expiresJulyAugust 2001 [Page25]31] Internet-DraftFebruaryMarch 2001Upon receipt of the STR, thewhether an error occurred. All DiameterServer SHOULD release all resources for the session indicated bymessages of type *-Response or *-Answer MUST include one Result-Code AVP, while messages of type -Ind MAY include theSession-IdResult-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. TheSession-Termination-Answer (STA), indicatedResult-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 theCommand-Code set to 276,thousands digit: - 1xxx (Informational) - 2xxx (Success) - 4xxx (Transient Failures) - 5xxx (Permanent Failure) A non-recognize class (one whose first digit issent bynot defined in this section) MUST be handled as a permanent failure. 10.2.1 Informational Errors that fall within theDiameter ServerInformational category are used toacknowledgeinform a requester that thesession has been terminated. The Result-Code AVP MUSTrequest cannot bepresent,immediately satisfied andMAY contain an indicationa further response will be issued in the near future. There are currently no errors thatan error occurred while servicingfall within this class. 10.2.2 Success Errors that fall within theSTR. 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 orderSuccess category are used toprovide rapid discovery ofinform 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 thefailure oftransient failures category are used to inform acommunicating peer, aggressive retransmission and rapid transactions, Diameter peers MUSTpeer that the request could not be satisfied at the time it was received, but MAY be able tosend and receive messages over SCTP [26]. A Diameter peer MAY use TCP [27], as TCP does provide reliable transport, though it does not havesatisfy 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 theproperties 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. expiresJulyAugust 2001 [Page26]32] Internet-DraftFebruaryMarch 20015.0 Error Reporting There are five different typesto portions oferrors within Diameter. The first being where athe Diametermessage is poorly formattedmessage, andunrecognizable, 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 isthe proxy does notsupported, which is shown below by "Unknown Command". The third case is where an AVP is received, marked mandatory and is unknown byallow this security mode since it needs to alter thereceiver, which is labeled below as "Unknown AVP". This fourth case involves receiving amessagewith a known AVP, yetby applying some local policies. 10.2.5 Permanent Failures Errors that fall within thevalue 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 relatedpermanent failures category are used to inform themessage 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" indicatespeer that themessagerequest failed, and should not be attempted again. DIAMETER_USER_UNKNOWN 5001 A request was received for a user that issimply dropped.unknown, therefore authentication and/or authorization failed. DIAMETER_AVP_UNSUPPORTED 5002 The"Message-Reject-Ind" indicatespeer received a message that contained an AVP thata Message-Reject-Indis not recognized or supported and was marked with the Mandatory bit. A Diameter message with this error MUSTbe sent tocontain one or more Failed-AVP AVP containing thepeer as described inAVPs that caused theappropriate section.failure. DIAMETER_UNKNOWN_SESSION_ID 5003 The"Extension Response + Result-Code" error hasrequest or response contained anextension-specific command code, and indicates thatunknown Session-Id. DIAMETER_AUTHORIZATION_REJECTED 5004 A request was received for which theappropriate Responseuser 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 MUSTbe sent withinclude theResult-Code AVP set tooffending AVPs within avalueFailed-AVP AVP. DIAMETER_MISSING_AVP 5006 The request did not contain an AVP thatenablesis required by thepeer to understandCommand Code definition. If this value is sent in thenature ofResult- Code AVP, a Failed-AVP AVP SHOULD be included in theproblem. 5.1 Message-Reject-Ind (MRI) Commandmessage. TheMessage-Reject-Ind (MRI), indicated bydata portion of theCommand-Code set to 259, provides a generic meansFailed-AVP MUST only contain the AVP Code ofcompleting transactions by indicating errors inthemessages that initiated them.missing AVP. DIAMETER_INVALID_CMS_DATA 5007 TheMessage- Reject-Ind command is sent in response: 1. An error is found inRequest did not contain amessage 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 messagewas received that cannot passto the Home Diameter server. Further attempts should not be attempted until thebase protocol error checking.loop has been fixed. Calhoun et al. expiresJulyAugust 2001 [Page27]33] Internet-DraftFebruaryMarch 2001In the event that aDIAMETER_AUTHORIZATION_FAILED 5009 A requestiswas receivedthat causes an error defined in a Diameter extension, the appropriate response withfor which theResult- Code AVP SHOULDuser could not besent. 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 ifauthorized at this time. This error could occur when theidentificationuser has already expended allowed resources, or iserroneous. Message Formatonly permitted to access services within a time period. DIAMETER_CONTRADICTING_AVPS 5010 Thestructure of the Message-Reject-Ind message is defined as follows: <Message-Reject-Ind message> ::= <Home DiameterHeader: 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 valueserver has detected AVPs in themessage headerrequest that contradicted each other, andoptionallyis not willing to provide service to theSession-Id AVP are copied fromuser. One or more Failed-AVP AVPs MUST be present, containing themessage being rejected.AVPs that contradicted each other. 10.3 Error-Message AVP TheResult-CodeError-Message AVPindicate the nature(AVP Code 281) is ofthe error causing rejection, and the Failed-AVP AVP provides some minimal debugging data by indicating a specific AVPtypewhich caused the problem. See the description of theOctetString. It is a human readable UTF-8 character encoded string. It MAY accompany a Result-Code AVPfor indication of when the Failed-AVPas a human readable error message. The Error-Message AVPMUSTis not intended to bepresentuseful inthe message. See [25] for more information. 5.1.1 Failed-AVPreal-time, and SHOULD NOT be expected to be parsed by network entities. 10.4 Error-Reporting-FQDN AVP TheFailed-AVPError-Reporting-FQDN AVP (AVP Code279)294) is of typeOctetString and provides debugging informationOctetString, encoded incases where a request is rejected or not fully processed duethe UTF-8 [24] format. This AVP contains the Network Access Identifier of the Diameter host that set the Result-Code AVP toerroneous information inaspecific AVP. Thevalueofother than 2001 (Success). This AVP is intended to be used for troubleshooting purposes, and MUST be set when the Result-Code AVPwill provide information onindicates a failure. 11.0 "User" Sessions When a user requests access to thereasonnetwork, 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 theFailed-AVP AVP. Aclient and servers to correlate a Diameter messageMAY contain one or more Failed-AVP AVPs, each containingwith acompleteuser session. When a Diameter server authorizes a user to use network resources, it SHOULD add the Authorization-Lifetime AVPthat could not be processed successfully.to the response. Thepossible reasons for thisAuthorization-Lifetime AVParedefines 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 thepresence of an improperlyuser's session. Note Calhoun et al. expiresJulyAugust 2001 [Page28]34] Internet-DraftFebruaryMarch 2001constructed 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-Codethatresulted in sendingtheMessage-Reject-Ind message. 5.2 Result-Code AVP The Result-CodeAuthorization-Lifetime AVP(AVP Code 268) is of type Unsigned32 and indicates whether a particular request was completed successfully or whether an error occurred. Allimplies how long the Diametermessages of type *-Response or *-Answer MUST include one Result-Code AVP, while messages of type -Ind MAY includeserver is willing to pay for theResult-Code AVP. A non-successful Result-Code AVP (one containingservices rendered, therefore anon 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).Diameterprovides five different classes of errors, all identified byclient SHOULD NOT expect payment for services rendered past thethousands 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 issession expiration time. The base protocol does not include any authorization request messages, since these are largely application-specific and are defined inthis section) MUST be handled asapermanent failure. 5.2.1 Informational Errors that fall withinDiameter protocol extension document. However, theInformational categorybase protocol does define a set of messages that are used to terminate user sessions. These are used toinformallow servers that maintain state information to free resources. 11.1 Session State Machine This section contains arequester thatfinite state machine, representing therequest cannot be immediately satisfiedlife cycle of Diameter sessions, anda further response willMUST beissued in the near future. DIAMETER_BE_PATIENT 1001observed by all Diameter implementations. The term Service-Specific below refers to a message defined in a Diameterserver responsible for authentication and/or authorizing the user cannot satisfy theextension (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 requestat the moment,received, andwill respond within the next 3 seconds. 5.2.2 Successspecific 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. expiresJulyAugust 2001 [Page29]35] Internet-DraftFebruary 2001 Errors that fall within the Success category are used to inform a peer that a request has been successfully completed. DIAMETER_SUCCESSMarch 2001The Request was successfully completed. 5.2.3 Redirect Notification Errors that fall within the Redirect Notification category are usedOpen 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 toinform a peer thatstate Cleanup When therequest cannot be satisfied locally and should instead be forwardedCleanup action is invoked, the Diameter node MAY attempt toanother server. DIAMETER_REDIRECT_INDICATION 3001 A proxy or redirect server has determined thatrelease all resources for therequest couldparticular session. Any event not listed above MUST besatisfied locallyconsidered as an error condition, andthe initiator of the request should direct the request directlya response, if applicable, MUST be returned to theserver, whose contact information has been added tooriginator of theresponse. This error code MUST NOT be sent in a Message-Reject-Indmessage.5.2.4 Transient Failures Errors that fall within the transient failures category are11.2 Session-Id AVP The Session-Id AVP (AVP Code 263) is of type OctetString and is used toinformidentify apeer 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 4001specific session (see section 11.0). Theauthentication process forSession-Id data uses theuser failed, most likely dueUTF-8 [24] character set. All messages pertaining toan invalid password used by the user. Further attemptsa specific session MUST include only one Session-Id AVP and the same value MUST betried after promptingused throughout theuser for a new password. DIAMETER_NO_END_2_END_SECURITY 4002 A proxy has detected that end-to-end security has been applied to portionslife of a session. When present, theDiameter message, andSession-Id SHOULD appear immediately following theproxy doesDiameter Header (see section 3.0). For messages that do notallow this security modepertain 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 itneeds to alter the messageis used byapplying some local policies. 5.2.5 Permanent Failures Errors that fall withinthepermanent failures category are usedserver toinformidentify thepeer thatsession (or flow). The format of therequest failed, and should notsession identifier SHOULD beattempted again. DIAMETER_USER_UNKNOWN 5001 A request was received foras 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 auser thatrandom 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 isunknown, therefore authentication and/or authorization failed.implementation Calhoun et al. expiresJulyAugust 2001 [Page30]36] Internet-DraftFebruaryMarch 2001DIAMETER_AVP_UNSUPPORTED 5002 The peer receivedspecific but may include amessage that contained an AVP thatmodem's device Id, a layer 2 address, timestamp, etc. The session Id isnot recognized or supported and was marked withcreated by theMandatory bit. ADiametermessage with this error MUST contain one or more Failed-AVP AVP containingdevice initiating theAVPs that causedsession, which in most cases is done by thefailure. DIAMETER_UNKNOWN_SESSION_ID 5003 The request or response contained an unknown Session-Id. DIAMETER_AUTHORIZATION_REJECTED 5004 A request was receivedclient. 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 usercould not be authorized. This error could occur ifbefore theservice requesteduser isnot permittedto be re-authenticated and/or re- authorized. Great care should be taken when theuser. DIAMETER_INVALID_AVP_VALUE 5005 The request contained an AVP with an invalidAuthorization- Lifetime valuein its data portion. Ais determined, since a low value could create significant Diametermessage with this result code MUST includetraffic, which could congest both theoffending AVPs within a Failed-AVP AVP. DIAMETER_MISSING_AVP 5006 The request did not contain annetwork and the servers. This AVP MAY be provided by the client as a hint of the maximum duration that it isrequired bywilling to accept. However, theCommand Code definition. If thisserver DOES NOT have to observe the hint, and MAY return a value that issent insmaller than theResult- Code AVP, a Failed-AVPhint. A value of zero means that no re-authorization is required. 11.4 Session-Timeout AVPSHOULD be included in the message.Thedata portion of the Failed-AVP MUST have itsSession-Timeout AVP (AVP Codeset to the Data field27) [1] is of type Unsigned32 and contains themissing 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 tryingmaximum number of seconds of service toget the messagebe provided to theHome Diameter server. Further attempts should not be attempted untiluser before termination of theloop has been fixed. DIAMETER_AUTHORIZATION_FAILED 5009session. Arequest was received for which the user could not be authorized atvalue of zero means that thistime.session has an unlimited number of seconds before termination. Thiserror could occur whenAVP MAY be provided by theuser has already expended allowed resources, or is only permitted to access services withinclient as atime period. DIAMETER_CONTRADICTING_AVPS 5010 The Home Diameter server has detected AVPs inhint of therequestmaximum duration thatcontradicted each other, andit isnotwilling toprovide service toaccept. However, theuser. One or more Failed-AVP AVPs MUST be present, containingserver DOES NOT have to observe theAVPshint, and MAY return a value thatcontradicted each other. 5.2.6 Hop-by-Hop Failuresis 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. expiresJulyAugust 2001 [Page31]37] Internet-DraftFebruaryMarch 2001Proxies receiving messages with the Result-Code11.6 Max-Wait-Time AVPset 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 6001Thelast Record-RouteMax-Wait-Time AVPin the message(AVP Code 295) isnot set to the identityof type Unsigned32, and contains thesendermaximum amount of time themessage. See Section 6.0downstream server is willing to wait formore information. DIAMETER_COMMAND_UNSUPPORTED 6002 The Request containedaCommand-Coderesponse. A server that determines that it cannot satisfy a request within thereceiver did not recognize or support. The Message-Reject-Ind messagerequested time MUSTalso contain an Failed-Command-Code AVP containingissue a DSI message with theunrecognized Command-Code. DIAMETER_TIME_INVALID 6003 This Result-Code value is returnDSI-Event set toinformDIAMETER_STILL_WORKING or DIAMETER_CANNOT_PROCESS_IN_TIME. 11.7 Session Termination The Diameter Base Protocol provides apeerset of messages thatthe message received contained an invalid timestamp value (in Timestamp AVP). DIAMETER_UNABLE_TO_DELIVER 6004 The request could notMUST bedeliveredused by any peer toa hostexplicitly request thathandlesa previously authenticated and/or authorized session be terminated. Since therealm requested at this time. DIAMETER_REALM_NOT_SERVED 6005 A proxy or redirect server has determined that itSession-Id isunabletypically tied toforwarda particular service (i.e. Mobile IP, NASREQ, etc), the session termination messages are used to requestor provide redirect information sincethat therealm portion ofservice tied to theNAI 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 6007Session Id be terminated. 11.7.1 Session-Termination-Ind TheRequest did not contain a valid Integrity-Check-Value AVP. DIAMETER_ERROR_TOO_BUSY 6008 When returned, a Diameter node SHOULD attemptSession-Termination-Ind (STI), indicated by the Command-Code set to 274, MAY be sent by any Diameter entity to themessageaccess device toan alternate peer. 5.3 Error-Message AVPrequest 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). TheError-MessageDestination-FQDN AVP(AVP Code 281) isMUST be present, and contain the NAI oftype OctetString. It is a human readable UTF-8 character encoded string. It MAY accompanythe access device that initiated the session (see section 11.0). Upon receipt of the STI message, the access device SHOULD issue aResult-CodeSession-Terminate-Request message. Message Format <Session-Termination-Ind> ::= < Diameter Header: 274 > < Session-Id > { Origin-FQDN } { Origin-Realm } { User-Name } { Destination-Realm } { Destination-FQDN } * [ AVPas a human readable error message. The Error-Message] * [ Proxy-State ] 0*1< Integrity-Check-Value > Calhoun et al. expiresJulyAugust 2001 [Page32]38] Internet-DraftFebruaryMarch 2001AVP is not intended to be useful in real-time, and SHOULD NOT be expected11.7.2 Session-Termination-Request The Session-Termination-Request (STR), indicated by the Command-Code set tobe parsed275, is sent bynetwork 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 isof type OctetString. Thisbeing terminated. Message Format <Session-Termination-Request> ::= < Diameter Header: 275 > < Session-Id > { Origin-FQDN } { Origin-Realm } { User-Name } { Destination-Realm } * [ AVPcontains] * [ Proxy-State ] * [ Route-Record ] 0*1< Integrity-Check-Value > 11.7.3 Session-Termination-Answer The Session-Termination-Answer (STA), indicated by theNetwork Access Identifier ofCommand-Code set to 276, is sent by the DiameterhostServer to acknowledge thatsetthe session has been terminated. The Result-Code AVPto a value other than 2001 (Success). This AVP is intended toMUST beused 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 MUSTbe set whenrelease 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 } * [ AVPindicates 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.112.1 Realm-Based Message Routing DiameterMessagerequest, 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 section11.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.Figure12 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 theCalhoun et al. expires July 2001 [Page 33] Internet-Draft February 2001sender of the original request is described in thenext 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. LookupsCalhoun 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 section11.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 fieldCalhoun et al. expires July 2001 [Page 34] Internet-Draft February 2001in 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 section6.412.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 section6.312.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 theserver(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 themessage musthost specified in the AVP can beforwarded to. Whendirectly contacted, theLocal Action fieldmessage issetforwarded toREDIRECT, this field containstheHome Diameter server(s)host (see section 8.1 for more information), or 2. If therealm. ItDestination-Realm AVP isimportant to note that Diameter servers MUST support at least one ofpresent, a routing table lookup is performed using thePROXY, REDIRECT, or LOCAL modes of operation. Servers dodomain specific in the AVP. A message that does notneed to support all modescontain any ofoperation in order to conform withtheprotocol specification. Serversabove AVPs MUST NOTreorder AVPsbe routed. If the message in question cannot be handled locally, a Message-Reject-Ind is sent with thesameResult-Code AVPCode. 6.3set 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, theRouting-Realm or the realm portion of the User-Name AVPDestination-Realm is extracted from the message, andthe realm portionis 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 moreRedirect-Host-Address AVPs. IfRedirect-Host AVPs, and theRedirect- Host-PortCommand-Code field is set tobe 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 2001Device-Status-Ind. +------------------+ | Diameter | | Redirect Server | +------------------+ ^ | Request | |ResponseDSI + joe@xyz.com | |Result CodeDSI-Event = Redirect + | |RedirectRedirect-Host AVP(s) | v +----------+ Request +----------+ | abc.net |------------->| xyz.net | | Diameter | | Diameter | | Server |<-------------| Server | +----------+ Response +----------+ Figure2:3: Diameter Redirect Server Calhoun et al. expires August 2001 [Page 42] Internet-Draft March 2001 Lastly, theResult-CodeDSI-Event AVP is added with the Data field of the AVP set toDIAMETER_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.112.3.1 Redirect-Host AVP The Redirect-Host AVP (AVP Code 292) is of type Grouped and is found inresponsesDevice-Status-Ind messages that include theResult-CodeDSI-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 Section6.3.212.3.2 Redirect-Host-Port = ; See Section6.3.312.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 aResult 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.212.3.2 Redirect-Host-Address AVP The Redirect-Host-Address AVP (AVP Code 278) is of type Address. Its use is described in Section6.3.1. 6.3.312.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 Section6.3.1. 6.412.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 Figure3),4), and MAY provide the following features: - Protocol translation (e.g. RADIUS <-> Diameter) - Limiting resources authorized to a particular userCalhoun et al. expires July 2001 [Page 37] Internet-Draft February 2001- Per user or transaction auditing +--------+ +-----------------+ +--------+ | Client | --------> | Server | Client | -------> | Server | +--------+ +-----------------+ +--------+ Figure34 - 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 thesame ordersame 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, thecorresponding response. 6.4.1 Proxying Requestsfollowing 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 updateif the value of theheaderfield 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.212.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.312.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.412.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 Section6.4.512.4.5 Proxy-Info = ; See Section6.4.612.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.512.4.5 Proxy-Address AVP The Proxy-Address AVP (AVP Code = 280) is of type Address. Its use is described in Section6.4.4. 6.4.612.4.4. 12.4.6 Proxy-Info AVP The Proxy-Info AVP (AVP Code = 284) is of type OctetString. Its use is described in Section6.4.4. 6.4.7 Routing-Realm12.4.4. 12.4.7 Destination-Realm AVP Calhoun et al. expires August 2001 [Page 46] Internet-Draft March 2001 TheRouting-RealmDestination-Realm AVP (AVP Code 283) is of typeOctetStringOctetString, 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 theNetwork Access Identifier.User-Name AVP, while home servers insert the value of the Origin- Realm AVP into this AVP. When present, theRouting-RealmDestination-Realm AVPMAY beis used to performanymessage routing decisions.6.512.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 theResult CodeResult-Code AVP set to DIAMETER_CONTRADICTING_AVPS. However,Calhoun et al. expires July 2001 [Page 40] Internet-Draft February 2001a NAS receiving a response that contains contradictory information SHOULD reject service to the user.6.612.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.712.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 thelocal 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 AVPlocal host's identity isused to identifyfound in theactual NASrequest, it is an indication that the messageshould be forwarded to. 6.8.1 Destination-NAI AVP The Destination-NAI AVP (AVP Code 293) [1]isof 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 SecurityCalhoun et al. expiresJulyAugust 2001 [Page41]47] Internet-DraftFebruaryMarch 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.113.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. Figure45 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| | | +------+ +------+ +------+ Figure4: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 2001since 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.113.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 Section7.213.2 Timestamp = ; Timestamp, See Section7.313.3 Auth-Trans-Id = ; Authentication-Transform-Id, / ; See Section7.1.1.113.1.1.1 Key-ID = ; Key-ID, See Section7.413.4 Digest = ; Digest, See Section7.1.1.213.1.1.2 Calhoun et al. expiresJulyAugust 2001 [Page43]49] Internet-DraftFebruaryMarch 2001 +---------------------------------------------------------------+ | AVP Header (AVP Code = 259) | +---------------------------------------------------------------+ | Nonce AVP | +---------------------------------------------------------------+ | Timestamp AVP | +---------------------------------------------------------------+ | Authentication-Transform-Id AVP | +---------------------------------------------------------------+ | Key-ID AVP | +---------------------------------------------------------------+ | Digest AVP | +---------------------------------------------------------------+7.1.1.113.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.213.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.213.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. expiresJulyAugust 2001 [Page44]50] Internet-DraftFebruaryMarch 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 Section7.1.2.113.1.2.1 Key-ID = ; See Section7.413.4 ptextlen = ; Plaintext-Data-Length, See Section7.1.2.213.1.2.2 data = ; Encrypted-Data, See Section7.1.2.313.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.113.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 section7.1.2.413.1.2.1.1 for more information.7.1.2.1.113.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. expiresJulyAugust 2001 [Page45]51] Internet-DraftFebruaryMarch 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.213.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.313.1.2.3 Encrypted-Data AVP The Encrypted-Data AVP (AVP Code = 290) is of type OctetString. This AVP contains the encrypted AVPs.7.213.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.313.3 Timestamp AVP The Timestamp AVP (AVP Code 262) is of type Unsigned32 and is used to Calhoun et al. expiresJulyAugust 2001 [Page46]52] Internet-DraftFebruaryMarch 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 section11.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 toDiameter-TIMEOUTDIAMETER-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.413.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.014.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. expiresJulyAugust 2001 [Page47]53] Internet-DraftFebruaryMarch 2001 1 One instance of theAVP 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-1AVP MUST be present in the message. +-------------------------------+ |0Command-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 |0Destination-Realm |1 |1 |1 |1 |1 |1 |1 |1 |Failed-Command-CodeDSI-Event |0 |1 |0 |0 |0 |0 |0 |0 |0Encrypted-Payload |0 |0 |0 |0 |0 |0 |0 |0 |0-1Error-Message |0 |0 |0 |0 |0 |0 |0 |0 | Error-Reporting-FQDN |0 |0 |0 |0 |1 |0 |0 |0 |0Extension-Id |1+ |0 |0 |0 |0 |0 |0 |0 |0Failed-AVP |0 |0 |0 |0 |0-1|0 |0 |0 |0Failed-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-1Origin-FQDN |1 |1 |1 |1 |1 |1 |1 |1 |0-1Origin-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.115.1 AVP Attributes As defined in section2.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 thisCalhoun et al. expires July 2001 [Page 48] Internet-Draft February 2001document. The remaining values are available for assignment through Designated Expert [12].9.215.2 Command Code Values As defined in section2.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.315.3 Extension Identifier Values As defined in section2.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.415.4 Result-Code AVP Values As defined in Section5.2,10.2, theResult CodeResult-Code AVP (AVP Code 268) defines the values1001,2001,3001, 4001-4002, 5001-50104001-4002 and6001-6008.5001-5010. All remaining values are available for assignment via IETF Consensus [12].9.515.5 Authentication-Transform-Id AVP Values Section7.1.1.113.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.615.6 Encryption-Transform-Id AVP Values Section7.1.2.113.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 forCalhoun et al. expires July 2001 [Page 49] Internet-Draft February 2001assignment via Designated Expert [12].9.715.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.815.8 AVP Header Bits There are 16 bits in the Flags field of the AVPHeader.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.015.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.017.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 toCalhoun et al. expires July 2001 [Page 50] Internet-Draft February 2001resolve 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 section7.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.0Watchdog 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.019.0 ReferencesCalhoun et al. expires July 2001 [Page 51] Internet-Draft February 2001[1] Rigney, et alia, "RADIUS", RFC-2138, April19971997. [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,FebruaryMarch 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,FebruaryMarch 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- aryMarch 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,FebruaryMarch 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 Zorn14.021.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.comCalhoun et al. expires July 2001 [Page 54] Internet-Draft February 2001Allan 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.com15.022.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. TheCalhoun et al. expires July 2001 [Page 55] Internet-Draft February 2001 limitedlim- 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 FORCEDISCLAIMSDIS- 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.023.0 Expiration Date This memo is filed as<draft-ietf-aaa-diameter-00.txt><draft-ietf-aaa-diameter-01.txt> and expires inJulyAugust 2001. Calhoun et al. expiresJulyAugust 2001 [Page56]62] Internet-DraftFebruaryMarch 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. expiresJulyAugust 2001 [Page57]63] Internet-DraftFebruaryMarch 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. expiresJulyAugust 2001 [Page58]64] ----