view Side-By-Side changes
AAA Working Group Pat R. Calhoun Internet-Draft Sun Microsystems, Inc. Category: Standards TrackAllan C. Rubens <draft-ietf-aaa-diameter-01.txt> Tut Systems, Inc.Haseeb Akhtar <draft-ietf-aaa-diameter-02.txt> Nortel Networks Jari Arkko Oy LM Ericsson Ab Erik Guttman Sun Microsystems, Inc.MarchAllan C. Rubens Tut Systems, Inc. Glen Zorn Cisco Systems, Inc. April 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. Abstract The Diameter base protocol is intended to provide a AAA framework for Calhoun et al. expires September 2001 [Page 1] Internet-Draft April 2001 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. expiresAugustSeptember 2001 [Page1]2] Internet-DraftMarchApril 2001 Table of Contents 1.0 Introduction 1.1 Diameter Protocol 1.2 Requirements language1.21.3 Terminology 2.0 Protocol Overview 2.1 Transport 2.2 Securing Diameter Messages 2.3 Diameter Extensions 2.4 Diameter Server Discovery2.4 Mandatory Accounting Support3.0 Diameter Header 3.1 Command Code Definitions 3.2 Command Code ABNF specification 3.3 Diameter Command Naming Conventions 3.3.1 Request/Answer 3.3.2 Query/Response 3.3.3 Indication 4.0 Diameter AVPs 4.1 AVP Header 4.2 Optional Header Elements 4.3 AVP Data Formats 4.4 Grouped AVP Values 4.4.1 Example AVP with a Grouped Data type 4.5 Diameter Base Protocol AVPs 5.0 Message Forwarding 5.1 Origin-FQDN AVP 5.2 Origin-Realm AVP 5.3 Destination-FQDN AVP 6.0 Capabilities Negotiation 6.1 Device-Reboot-Ind (DRI) Command 6.1.1 Vendor-Id AVP 6.1.2 Firmware-Revision AVP 6.1.3 Extension-Id AVP 6.1.4 Host-IP-Address AVP 6.1.5 Supported-Vendor-Id AVP 6.1.6 Product-Name AVP 7.0 Transport Failure Detection 7.1 Device-Watchdog-Request 7.2 Device-Watchdog-Answer 7.3 Failover/Failback Procedures 8.0 Peer State Machine 8.1 States 8.2 Events 8.3 Actions 8.4 The Election Process 9.0 Per-Hop Error Signaling 9.1 Device-Status-Ind Calhoun et al. expires September 2001 [Page 3] Internet-Draft April 2001 9.1.1Device-ErrorDSI-Event AVP 9.1.1.1 Informational Events 9.1.1.2 Redirect Event 9.1.1.3 Transient Failure Events 9.1.1.4 Permanent Failure Events 10.0 End-to-End Error Signaling 10.1 Message-Reject-Ind (MRI) Command 10.1.1 Failed-AVP AVP 10.1.2 Failed-Command-Code AVP 10.1.3 Failed-Vendor-Id AVP 10.2 Result-Code AVP 10.2.1 Informational 10.2.2 SuccessCalhoun et al. expires August 2001 [Page 2] Internet-Draft March 200110.2.3 Redirect Notification 10.2.4 Transient Failures 10.2.5 Permanent Failures 10.3 Error-Message AVP 10.4 Error-Reporting-FQDN AVP 11.0 "User" Sessions 11.1 Session State Machine 11.2 Session-Id AVP 11.3 Authorization-Lifetime AVP 11.4 Session-Timeout AVP 11.5 User-Name AVP 11.6 Max-Wait-Time AVP 11.7 Original-Session-Id AVP 11.8 Session Termination11.7.111.8.1 Session-Termination-Ind11.7.211.8.2 Session-Termination-Request11.7.311.8.3 Session-Termination-Answer 12.0 Message Routing 12.1 Realm-Based Message Routing 12.1.1 Realm-Based Routing Table 12.2 Proxy and Redirect Server handling of requests 12.2.1 Proxy and Redirect Server handling of requests 12.3 Redirect Server 12.3.1 Redirect-Host AVP 12.3.2 Redirect-Host-Address AVP 12.3.3 Redirect-Host-Port AVP 12.4 Proxy Server 12.4.1 Proxying Requests 12.4.2 Proxying Responses 12.4.3 Route-Record AVP 12.4.4 Proxy-State AVP 12.4.5 Proxy-Address AVP 12.4.6 Proxy-Info AVP 12.4.7 Destination-Realm AVP 12.5 Applying Local Policies Calhoun et al. expires September 2001 [Page 4] Internet-Draft April 2001 12.6 Hiding Network Topology 12.7 Loop Detection 13.0Diameter Message SecurityAccounting 13.1Hop-by-Hop Security 13.1.1 Integrity-Check-Value AVP 13.1.1.1 Authentication-Transform-Id AVP 13.1.1.2 Digest AVP 13.1.2 Encrypted-PayloadAuthorization-Server Directed Model 13.2 Protocol Messages 13.3 Extension document requirements 13.4 Fault Resilience 13.5 Session Records 14.0 Accounting Command-Codes 14.1 Accounting-Request (ACR) Command 14.2 Accounting-Answer (ACA) Command 14.3 Accounting-Status-Ind (ASI) Command 14.4 Accounting-Poll-Ind (API) Command 15.0 Accounting AVPs 15.1 Accounting-Record-Type AVP13.1.2.1 Encryption-Transform-Id15.2 Accounting-Interim-Interval AVP13.1.2.1.1 MD5 Payload Hiding 13.1.2.2 Plaintext-Data-Length15.3 Accounting-Record-Number AVP13.1.2.3 Encrypted-Data15.4 Accounting-State AVP13.2 Nonce15.5 Accounting-Session-Id AVP13.3 Timestamp16.0 AVPCalhoun et al. expires August 2001 [Page 3] Internet-Draft March 2001 13.4 Key-IdOccurrence Table 16.1 Base Protocol Command AVP14.0Table 16.2 Accounting AVP Table15.017.0 IANA Considerations15.117.1 AVP Attributes15.217.2 Command Code AVP Values15.317.3 Extension Identifier Values15.417.4 Result-Code AVP Values15.5 Integrity-Check-Value AVP Transform Values 15.6 Encryption-Transform-Id AVP Values 15.717.5 Message Header Bits15.817.6 AVP Header Bits15.917.7 DSI-Event AVP Values16.018.0 Open Issues17.019.0 Diameter protocol related configurable parameters18.020.0 Security Considerations19.021.0 References20.022.0 Acknowledgements21.023.0 Authors' Addresses22.024.0 Full Copyright Statement Appendix A. Diameter Service Template Calhoun et al. expiresAugustSeptember 2001 [Page4]5] Internet-DraftMarchApril 2001 1.0 IntroductionThe DiameterHistorically, the RADIUS protocolallows peershas been used toexchange 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 commandsprovide AAA services for dial-up PPP [42] andAVPs, as requiredterminal server access. Over time, routers and network access servers (NAS) have increased in[21] All data delivered bycomplexity and density, making the RADIUS protocolisincreasingly unsuitable for use inthe form of an AVP. Somesuch networks. The Roaming Operations Working Group (ROAMOPS) has published a set ofthese AVP values are used by the Diameter protocol itself, while others deliver data associated with particular applications which employ Diameter. AVPs may be added arbitrarilyspecifications [20, 43, 44] that define how a PPP user can gain access toDiameter messages, so long astherequired AVPs are included and AVPs which are explicitly excluded are not included. AVPs are usedInternet without having to dial into his/her home service provider's modem pool. This is achieved bybase Diameter protocolallowing service providers tosupport the following required features: - Transporting ofcross-authenticate their users. Effectively, a userauthentication information, for the purposes of enabling the Diameter server to authenticate the user. - Transportingcan dial into any service provider's point of presence (POP) that has a roaming agreement with his/her home Internet servicespecific authorization information, between client and servers, allowingprovider (ISP), thepeersbenefit being that the user does not have todecide whetherincur auser's access request should be granted. - Exchanging resource usage information,long distance charge while traveling, whichMAYcan sometimes beused for accounting purposes, capacity planning, etc. - Proxying and Re-directing of Diameter messages through a server hierarchy. - Providing application-level security, throughquite expensive. Given theusenumber of ISPs today, ROAMOPS realized that requiring each ISP to set up roaming agreements with all other ISPs did not scale. Therefore, theIntegrity-Check-Value (ICV) and Encrypted-Payload AVPs. The Diameter base protocol provides the minimum requirements needed for an AAA transport protocol,working group defined a "broker", which acts asrequired by NASREQ [21], Mobile IP [22, 23], and ROAMOPS [20]. The base protocolan intermediate server, whose sole purpose isnot intendedtobe used by itself,set up these roaming agreements. A collection of ISPs andmust 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 initiatearequest. In that sense, Diameterbroker is called apeer"roaming consortium". There are many such brokers in existence today; many also provide settlement services for member ISPs. The Mobile-IP Working Group has recently changed its focus topeer protocol. In this document, a Diameter clientinter administrative domain mobility, which isthe device that normally initiatesarequestrequirement forauthentication and/or authorizationcellular carriers wishing to deploy IETF-based mobility protocols. The current cellular carriers requirements [22, 23] are very similar to the ROAMOPS model, with the exception that the access protocol is Mobile-IP [45] instead ofa user. APPP. The Diameterserver isprotocol was not designed from thedevice that either forwardsground up. Instead, therequestbasic RADIUS model was retained while fixing the flaws in the RADIUS protocol itself. Diameter does not share a common protocol data unit (PDU) with RADIUS, but does borrow sufficiently from the protocol toanotherease migration. The basic concept behind Diameterserver (known asis to provide aproxy), or onebase protocol thatperformscan be extended in order to provide AAA services to new access technologies. Currently, theactual authentication and/or authorization ofprotocol only concerns itself with Internet access, both in theuser based on some profile. Given thattraditional PPP sense as well as taking into account theserver MAY send unsolicited messagesROAMOPS model, and Mobile-IP. Although Diameter could be used toclients, it is possible forsolve a wider set of AAA problems, we are currently limiting theserver to initiate such messages. An examplescope ofan unsolicited message would be for a requestthe protocol in order to Calhoun et al. expiresAugustSeptember 2001 [Page5]6] Internet-DraftMarchApril 2001 ensure that theclient issue an accounting update. Diameter services require sequenced in-order reliable delivery of data, with congestion control (receiver windowing). Timely detectioneffort remains focussed on satisfying the requirements offailed 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 Diameternetwork access. Note that a truly generic AAA protocolis neverusedon its own. It is always extended for a particular application. Four extensions to Diameter are definedbycompanion 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 inmany applications might provide functionality not provided by Diameter. Therefore, it is imperative that thefuture (see Section 15.3).designers of new applications understand their requirements before using Diameter. 1.1 Diameter Protocol ThebaseDiameter protocolconcerns itself with capabilities negotiation, and how messages are sent and howallows peersmay eventually be abandoned. The base protocol also defines certain rules which applytoall exchangesexchange a variety ofmessages between Diameter peers. It is important to note that themessages. The base protocol providesoptional application-level securitythe following facilities: - Delivery of AVPs(Integrity-Check-Value) which MAY be used(attribute value pairs) - Capabilities negotiation, as required inabsence 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[20] - Error notification - Extensibility, through addition ofAVPs includednew commands and AVPs, as required in [21] All data delivered by themessageprotocol isdeterminedin the form of an AVP. Some of these AVP values are used byathe Diameter protocol itself, while others deliver data associated with particularapplication of or extension toapplications which employ Diameter.We will referAVPs may be added arbitrarily tothisDiameter messages, so long as theDiameter extension. One AVP that isrequired AVPs are included and AVPs which are explicitly excluded are not included. AVPs are used by base Diameter protocol toreferencesupport 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'ssession is the Session-Id. The initialaccess request should be granted. - Exchanging resource usage information, which MAY be used forauthentication and/or authorizationaccounting purposes, capacity planning, etc. - Proxying and Re-directing of Diameter messages through auser would includeserver hierarchy. The Diameter base protocol provides theSession-Id.minimum requirements needed for an AAA transport protocol, as required by NASREQ [21], Mobile IP [22, 23], and ROAMOPS [20]. TheSession-Idbase protocol isthennot intended to be usedin allby 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. See section 2.3. for more information on Diameter extensions. 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 Calhoun et al. expiresAugustSeptember 2001 [Page6]7] Internet-DraftMarchApril 2001subsequent messages to identify the user's session (see section 11.0 for more information). The communicating party may accept the request, or reject it by returningnormally initiates aresponse with Result-Code AVP set to indicate an error occurred. The specific behaviorrequest for authentication and/or authorization ofthe diameter server or client receivingarequest depends on theuser. A Diameterextension employed. Session state (associated with a Session-Id) MUST be freed upon receipt ofserver is theSession-Termination-Request, Session-Termination- Answer, expiration of authorized service time indevice that either forwards theSession-Timeout AVP, and accordingrequest torules established inanother Diameter server (known as aparticular extension/application of Diameter. Exchanges of messages are either request/reply oriented,proxy), orinone that performs the actual authentication and/or authorization of the user based on somespecial cases, do not require replies. All such messagesprofile. Given thatdo not require replies have names ending with '-Ind' (short for Indication). The Diameter base protocol providestheAuthorization-Lifetime AVP, whichserver MAYbe used by extensionssend unsolicited messages tospecifyclients, it is possible for thedurationserver to initiate such messages. An example of an unsolicited message would be for aspecific authorized session. 2.1 Transport The baserequest that the client issue an accounting update. Diameterprotocol is run on port TBDservices require sequenced in-order reliable delivery ofbothdata, with congestion control (receiver windowing). Timely detection of failed or unresponsive peers is also required, allowing for robust operation. TCP[27] and SCTP [26] transport protocols (for interoperability test purposes port 1812 willis insufficient for this second requirement. Diameter SHOULD beused until April 2001). Diameter clients [9] MUST support TCP, but are warned that future versions of this specification may mandatetransported over SCTPsupport. Diameter servers MUST support both TCP and SCTP. A Diameter node MAY sent packets from any source port, but MUST be prepared to receive packets on port TBD. When a request is received,[26]. 1.2 Requirements language In this document, thesourcekey words "MAY", "MUST", "MUST NOT", "optional", "recommended", "SHOULD", anddestionation ports"SHOULD NOT", are to be interpreted as described in [13]. 1.3 Terminology Accounting The act of collecting information on resource usage for thereply are reversed. Note thatpurpose of trend analysis, auditing, billing, or cost allocation. Authentication The act of verifying thesource and destination addresses used in request and replies MAY anyidentity of an entity (subject). Authorization The act of determining whether apeer's valid IP addresses. A given Diameter process SHOULD use the same port number to send all messagesrequesting entity (subject) will be allowed access toaid in identifying which process sentagiven message. More than oneresource (object). AVP The Diameterprocess MAY exist withinprotocol consists of asingle host, so the sender's port numberheader followed by one or more Attribute-Value-Pair (AVP). The AVP includes a header and isneededused todiscriminate them. When no transport connection exists withencapsulation authentication, authorization or accounting information. Broker A broker is apeer, an attempt to connect SHOULD be periodically attempted. The recommended connection intervalbusiness term commonly used in AAA infrastructures. A broker is30 seconds. 2.2 Securing Diameter Messageseither a proxy or redirect server, and MAY be operated by roaming consortiums. Calhoun et al. expiresAugustSeptember 2001 [Page7]8] Internet-DraftMarchApril 2001AllDiametermessages MUST be secured between peers, and both SSL [28] and IP Security [37] are supported. Network Access Servers (NASes) and Foreign Agents, commonly referred to as clients, MUST support IP Security, while servers MUST support both SSL and IP Security. The communication betweenClient A Diameter Client is aclient and server MUST use IP Security, while communication between servers MUST use SSL. All hosts runningdevice at theDiameter protocol MUST haveedge of thenecessary security policies to ensurenetwork thatunauthenticated Diameter packets are not processed. 2.3performs access control. An example of a Diameter client is a Network Access ServerDiscovery Allowing for dynamic Diameter server discovery will make it possible for simpler and more robust deployment of AAA services. In order to promote interoperable implementations of(NAS) or a Foreign Agent (FA). Diameterserver discovery, the following mechanisms are described. These are based on existing IETF standards. There are two cases whereServer A Diameter serverdiscovery may be performed. The firstiswhen a Diameter client needs to discoverafirst-hop Diameter server. The second casedevice that iswhennot acting as a NAS or FA. Servers can be proxy, redirect, or home servers Downstream Server Diameter Proxy servers identify a downstream serverneeds to discover anotheras one that is providing routing services towards the home server-forfurther handling ofaDiameter operation. In both cases, the following 'search order'particular message. Home Domain A Home Domain isrecommended: 1. Thethe administrative domain with whom the user maintains an account relationship. Home Server A Diameterimplementation consults its listHome Server is one that authenticates and/or authorizes access for users ofstatic (manual) configured Diametera particular realm. The same serverlocations. These will be used if they exist and respond. 2. The Diameter implementation uses SLPv2 [28] to discover Diameter services. The Diameter service template [32] is includedMAY also act as a proxy or redirect server for other realms, inAppendix A. Itwhich case it isrecommended that SLPv2 security be deployed (this requires distributing keys to SLPv2 agents.) Thisnot acting as a Home Server for these realms. Integrity Check Value (ICV) An Integrity Check Value isdiscussed further in Appendix A. SLPv2 will allow Diameter implementations to discover the locationan unforgeable or secure hash ofDiameter servers inthelocal site, as well as their characteristics. Diameter serversmessage withspecific capabilities (say support for the Accounting extension) can be requested, and only those will be discovered. 3. The Diameter implementation uses DNS to request the SRV RR [33] for the '_diameter._sctp' and/or '_diameter._tcp' server inaparticular domain. The Diameter implementation has to knowshared secret. Interim accounting An interim accounting message provides a snapshot of usage during a user's session. It is typically implemented inadvance which domainorder tolook for an Diameter server in. This could be deduced,provide forexample, from the 'realm'partial accounting of a user's session in the event of aNAIdevice reboot or other network problem thatCalhoun et al. expires August 2001 [Page 8] Internet-Draft March 2001 an Diameter implementation needed to perform an Diameter operation on. Diameter allows AAA peers to protectprevents theintegrity and privacyreception ofcommunication as well as to perform end-point authentication. Still, ita session summary message or session record. Local Domain A local domain isprudentthe administrative domain providing services toemploy DNS Securitya user. An administrative domain MAY act as aprecaution when using DNS SRV RRs to look up the location of a Diameter server. [34, 35, 36] 2.4 Mandatory Accounting Support All Diameter implementations MUST support the Diameter Accounting Extension [15]. An implementation that does not support [15] does NOT comply with the Diameter base protocol. 3.0 Diameter Header A summary of the Diameter header format is shown below. The fields are transmitted in network byte order. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |r r r r r r r r r r E I R| Ver | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Hop-by-Hop Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | End-to-End Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Command-Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVPs ... +-+-+-+-+-+-+-+-+-+-+-+-+- Flags The Message Flags field is thirteen bits. The following bits are assigned: r(eserved) MUST be zero - this flag bit is reservedlocal domain forfuture use. E(xpected Reply) - The message solicitscertain users, while being aresponse. I(nterrogation) -home domain for others. Network Access Identifier Themessage is a QueryNetwork Access Identifier, or NAI [3], is used in the Diameter protocol to extract aReply. R(esponse) -user's identity and realm. Themessageidentity isa responseused toanother message.identify the user during authentication and/or authorization, while the realm is used for message routing purposes. Proxy Server Calhoun et al. expiresAugustSeptember 2001 [Page 9] Internet-DraftMarchApril 2001These flags are set depending onA proxy server ”ses thecommand code used in a Diameter message. This enablesrealm portion of thetypeNAI to route Diameter messages. Proxy servers are typically used to minimize the number ofmessagesecurity relationships that are required between Diameter servers. Realm The string in the NAI that immediately follows the '@' character. NAI realm names are required to beinterpreted, even ifunique, and are piggybacked on thespecific command code is not recognized. Command Type Flags Set Indication - - - Request E - - Answer - - R Query E I - Reply - I R Aadministration of the DNS namespace. Diameternode MUST NOT set these flagsmakes use of the realm, also loosely referred to as domain, to determine whether messages can be satisfied locally, or whether they must be proxied. Real-time Accounting Real-time accounting involves the processing of information on resource usage within a defined time window. Time constraints are typically imposed inany other combination.order to limit financial risk. Redirect Server A Diameternode receiving a message in which these flagsredirect server provides realm to address translation, by returning information necessary for Diameter peers to communicate directly. Redirect servers are different from proxies since they do notset appropriately SHOULD NOT reject the message for this reason, but MAY logparticipate in theevent for diagnosis. Version This Version field MUST be set to 1 to indicaterouting of messages between end DiameterVersion 1. Message Length The Message Length field is two octetsnodes. Roaming Relationships Roaming relationships include relationships between companies andindicatesISPs, relationships among peer ISPs within a roaming association, and relationships between an ISP and a roaming consortia. Together, thelengthset of relationships forming a path between a local ISP's authentication proxy and theDiameter message includinghome authentication server is known as theheader fields. Hop-by-Hop Identifierroaming relationship path. Session TheIdentifier fieldDiameter protocol isfour octets, and aids in matching requests and replies. The sender MUST ensure that the identifier in asession based. When an authorization request(*-Request or *-Query) or indication (*-Ind) messageislocally unique (to the sender) at any given time, and MAY attempt to ensureinitially transmitted, it includes a session identifier thatthe numberisunique across reboots. The senderused for the duration ofa response (*-Answer or *-Response) MUST ensure thatthe session. The Session- IdentifierfieldAVP contains thesame Identifier value that was found in the corresponding request. For Theidentifieris 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-IdandIdentifier fieldmust be globally unique. Session record A session record represents a summary of themessage. End-to-End Identifier Unlikeresource consumption of a user over theHop-by-Hop Identifier,entire session. Accounting gateways creating theEnd-to-End Identifier is usedsession record may do so byservers to detect duplicate messages, and proxies MUST NOT modify this field. The sender of a request, query, indication, answerprocessing interim accounting events orresponse message MUST insert a locally unique value in this field. The combination ofaccounting events from several devices serving theSession-Id AVP and this field is used to detect duplicates. Command-Codesame user. Upstream Server Calhoun et al. expiresAugustSeptember 2001 [Page 10] Internet-DraftMarchApril 2001The Command-Code field is four octets, andDiameter Proxy servers identify an upstream server as one that isused in order to communicate the command associated withproviding routing services towards themessage.Diameter client. 2.0 Protocol Overview The32-bit address spacebase Diameter protocol ismanaged by IANA (see section 15.2). Vendor-ID In the event that the Command-Code field contains a vendor specific command, the four octet Vendor-ID field contains the IANA assigned "SMI Network Management Private Enterprise Codes" [2] value. If the Command-Code field contains an IETF standard Command, the Vendor-ID field MUST be setnever used on its own. It is always extended for a particular application. Four extensions tozero (0). AVPs AVPsDiameter area method of encapsulating information relevantdefined by companion documents: NASREQ [7], Mobile IP [10], Strong Security [11]. These options are introduced in this document but specified elsewhere. Additional extensions to Diameter may be defined in the future (see Section 17.3). The base Diametermessage. See section 4. for more information on AVPs. 3.1 Command Codes Everyprotocol 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 Diametermessage MUST containpeers. Communication between Diameter peers begins with one peer sending avaluemessage to another Diameter peer. The set of AVPs included inits header's Command- Code field, whichthe message isuseddetermined by a particular application of or extension todetermineDiameter. We will refer to this as theactionDiameter extension. One AVP that is included tobe takenreference a user's session is the Session-Id. The initial request for authentication and/or authorization of aparticular message.user would include the Session-Id. Thefollowing Command Codes are definedSession-Id is then used in all subsequent messages to identify theDiameter base protocol: Command-Name Abbrev. Code Reference -------------------------------------------------------- Device-Reboot-Ind DRI 257 6.1 Device-Status-Ind DSI 282 9.1 Device-Watchdog-Req DWR 280 7.1 Device-Watchdog-Answer DWA 281 7.2 Message-Reject-Ind MRI 259 10.1 Session-Termination-Ind STI 274 11.7.1 Session-Termination- STR 275 11.7.2 Request Session-Termination- STA 276 11.7.3 Answer Every Command Code defined MUST includeuser's session (see section 11.0 for more information). The communicating party may accept the request, or reject it by returning acorresponding ABNF specification, which is usedresponse with Result-Code AVP set todefineindicate an error occurred. The specific behavior of theAVPs that MUST, MAY anddiameter server or client receiving a request depends on the Diameter extension employed. Session state (associated with a Session-Id) MUSTNOTbepresent. The following format is usedfreed upon receipt of the Session-Termination-Request, Session-Termination- Answer, expiration of authorized service time in thedefinition: command-def = command-name "::=" diameter-message diameter-name = ALPHA *(ALPHA / DIGIT / "-") command-name = diameter-name ; The command-name hasSession-Timeout AVP, and according tobe Command name, ; definedrules established inthe basea particular extension/application of Diameter. Exchanges of messages are either request/reply oriented, orextendedin 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; specifications.base protocol provides the Authorization-Lifetime AVP, which MAY be used by extensions to specify the duration of a specific authorized session. Calhoun et al. expiresAugustSeptember 2001 [Page 11] Internet-DraftMarchApril 2001diameter-message = header [ *fixed] [ *required] [ *optional] [ *fixed] header = "<Diameter-Header:" command-id ">" fixed = [qual] "<" avp-spec ">" required = [qual] "{" avp-spec "}" optional = [qual] "[" avp-name "]" ;2.1 Transport Theavp-name in the 'optional' rule cannot ; evaluate to any AVP Name which is included ; in a fixed or required rule. qual = [min] "*" [max] ; See ABNF conventions, RFC 2234 section 6.6. ; The absencebase Diameter protocol is run on port TBD ofany qualifiers impliesboth TCP [27] and SCTP [26] transport protocols (for interoperability test purposes port 1812 will be used until April 2001). Diameter clients [9] MUST support TCP, but are warned thatone ;future versions of this specification may mandate SCTP support. Diameter servers MUST support both TCP andonly one such AVPSCTP. A Diameter node MAY send packets from any source port, but MUST bepresent. ; ; NOTE: "[" and "]" haveprepared to receive packets on port TBD. When adifferent meaning ; than in ABNF (seerequest is received, theoptional rule, above). ; These braces cannot be used to express an ; optional fixed rules (such as an optional ; ICV atsource and destionation ports in theend.) To do this,reply are reversed. Note that theconvention ; is '0*1fixed'. min = 1*DIGIT ; The minimum numbersource and destination addresses used in request and replies MAY any oftimesa peer's valid IP addresses. A given Diameter process SHOULD use theelement may ; be present. max = 1*DIGIT ; The maximumsame port numberof times the element may ; be present. avp-spec = diameter-name ; The avp-spec hastobe an AVP Name, defined ;send all messages to aid inthe base or extendedidentifying which process sent a given message. More than one Diameter; specifications. avp-name = avp-spec | "AVP" ; The string "AVP" stands for *any* arbitrary ; AVP Name, which does not conflictprocess MAY exist within a single host, so the sender's port number is needed to discriminate them. When no transport connection exists with a peer, an attempt to connect SHOULD be periodically attempted. The recommended connection interval is 30 seconds. 2.2 Securing Diameter Messages All Diameter messages MUST be secured between peers, and both SSL [38] and IP Security [37] are supported. Network Access Servers (NASes) and Foreign Agents, commonly referred to as clients, MUST support IP Security, while servers MUST support both SSL and IP Security. The communication between a client and server MUST use IP Security, while communication between servers MUST use SSL. All hosts running the; requiredDiameter protocol MUST have the necessary security policies to ensure that unauthenticated Diameter packets are not processed. 2.3 Diameter Extensions As previously mentioned, the Diameter base protocol does not operate on its own, but requires appplication-specific extensions, commonly referred to as Diameter extensions. A Diameter extension is a specification that defines one orfixed positionmore Diameter Command-Codes, the expected AVPsdefinedin;an ABNF [31] grammar (see section 3.2), and MAY also define new AVPs. If thecommand code definition. The following is a definition of a fictitious command code: Example-Command ::= < Diameter-Header: 9999999 > { User-Name }Diameter extension has any accounting requirements, it MUST also specify the AVPs that are to be present in Calhoun et al. expiresAugustSeptember 2001 [Page 12] Internet-DraftMarchApril 2001* { Origin-FQDN } * [ AVP ] 0*1< Integrity-Check-Vector > 4.0the DiameterAVPsAccounting messages (see section 13.3). Every DiameterAVPs carry specific authentication, accounting and authorization information, security information as well as configuration details forExtension specification MUST have an IANA assigned Extension-Id value (see section 6.1.3). This Extension-Id is advertised during therequestcapabilities exchange phase (see section 6.0). Advertising support of a particular extension implies that the sender support all of the Command Codes, andreply. Somethe AVPs specified in the associated ABNF, described in the specification. An implementation MAYbe listed more than once. The effect of suchadd arbitrary AVPs to any command defined in anAVP is specific, and isextension, including vendor-specific AVPs. However, such AVPs MUST NOT have the M(andatory) bit set. An implementation that adds AVPs not specified ineach case bya command's ABNF, and sets theAVP description. Each AVP of type OctetStringAVP's M(andatory) bit MUSTbe padded to align onNOT advertise support of the extension. An implementation MAY support both a32 bit boundary,proprietary version of an extension by requesting an IANA extension identifier (see section 17.3), whileother AVP types align naturally. NULL bytes are added tosupporting theend oforiginal extension. During theAVP Data field tillcapabilities exchange, aword boundary is reached. The length ofDiameter node could know whether it should send thepadding is not reflected inprorietary version, or theAVP Length field. 4.1 AVP Header The fields instandards one, by inspecting theAVP header MUST be sent in network byte order. The formatextensions advertised by the peer. 2.4 Diameter Server Discovery Allowing for dynamic Diameter server discovery will make it possible for simpler and more robust deployment of AAA services. In order to promote interoperable implementations of Diameter server discovery, 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 256 AVP numbers are reserved for backward compatibility with RADIUS andfollowing mechanisms areto be interpreted as per NASREQ [7]. AVP numbers 256 and abovedescribed. These areused for Diameter, whichbased on existing IETF standards. There areallocated by IANA (see section 15.1). AVP Lengthtwo cases where Diameter server discovery may be performed. TheAVP Length fieldfirst istwo octets, and indicates the lengthwhen a Diameter client needs to discover a first-hop Diameter server. The second case is when a Diameter server needs to discover another server - for further handling ofthis AVP including the AVP Code, AVP Length, AVP Flags, Reserved,a Diameter operation. In both cases, theVendor-ID field (if present)following 'search order' is recommended: 1. The Diameter implementation consults its list of static (manual) configured Diameter server locations. These will be used if they exist andthe AVP data. If a messagerespond. 2. The Diameter implementation uses SLPv2 [28] to discover Diameter services. The Diameter service template [32] is included in Appendix A. It is recommended that SLPv2 security be deployed (this requires distributing keys to SLPv2 agents.) This is discussed further in Appendix A. Calhoun et al. expiresAugustSeptember 2001 [Page 13] Internet-DraftMarchApril 2001received with an invalid attribute length, the message SHOULD be rejected. AVP Flags The AVP Flags field informsSLPv2 will allow Diameter implementations to discover the location of Diameterhost how each attribute must be handled. Note that subsequentservers in the local site, as well as their characteristics. Diameterextensions MAY define bits to be used withinservers with specific capabilities (say support for theAVP Header, and an unrecognized bit shouldAccounting extension) can beconsidered an error. The 'r' and the reserved bits are unusedrequested, andshouldonly those will besetdiscovered. 3. The Diameter implementation uses DNS to0 and ignored on receipt, whilerequest the'P' bit is definedSRV RR [33] for the '_diameter._sctp' and/or '_diameter._tcp' server in[11].a particular domain. The'M' Bit, known as the Mandatory bit, indicates whether support of the AVP is required. IfDiameter implementation has to know in advance which domain to look for anAVP is received by a HomeDiameter serveror NAS with the 'M' bit enabled and the receiver does not support the AVP, the message MUSTin. This could berejected. If such an AVP is received by a Proxy or Redirect Server,deduced, for example, from themessage MUST be forwarded'realm' in a NAI that an Diameter implementation needed toits logical destination, and MUST NOT be rejected. It isperform an Diameter operation on. Diameter allows AAA peers to protect theresponsibilityintegrity and privacy of communication as well as to perform end-point authentication. Still, it is prudent to employ DNS Security as a precaution when using DNS SRV RRs to look up theoriginatorlocation of amessage that is rejected for this purpose to correct the error. AVPs withoutDiameter server. [34, 35, 36] 3.0 Diameter Header A summary of the'M' bit enabled are informational only and a receiver that receives a message with such an AVP thatDiameter header format isnot supported MAY simply ignore the AVP.shown below. The'V' bit, known as the Vendor-Specific bit, indicates whether the optional Vendor-ID field is presentfields are transmitted inthe AVP header. When set the AVP Code belongs to the specific vendor code address space. Unless otherwise noted,network byte order. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |r r r r r r r r r r E I R| Ver | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Hop-by-Hop Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | End-to-End Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Command-Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVPswill have the following default AVP... +-+-+-+-+-+-+-+-+-+-+-+-+- Flags The Message Flags fieldsettings:is thirteen bits. The'M' bitfollowing bits are assigned: r(eserved) MUST beset. The 'V'zero - this flag bitMUST NOT be set. 4.2 Optional Header Elements The AVP Header contains one optional field. This fieldisonly present if the respective bit-flagreserved for future use. Calhoun et al. expires September 2001 [Page 14] Internet-Draft April 2001 E(xpected Reply) - The message solicits a response. I(nterrogation) - The message isenabled. Vendor-IDa Query or a Reply. R(esponse) - TheVendor-ID field is present if the 'V' bitmessage is a response to another message. These flags MUST be setin the AVP Flags field. The optional four octet Vendor-ID field containsdepending on theIANA assigned "SMI Network Management Private Enterprise Codes" [2] value, encodedcommand code used innetwork byte order. Any vendor wishing to implementa Diameterextension MUST use their own Vendor-ID along with their privately managed AVP address space, guaranteeing that they willmessage. This enables the type of message to be interpreted, even if the specific command code is notcollide withrecognized. Command Type Flags Set Indication - - - Request E - - Answer - - R Query E I - Reply - I R A Diameter node MUST NOT set these flags in any othervendor's extensions, nor with future IETF extensions. Calhoun et al. expires August 2001 [Page 14] Internet-Draft March 2001combination. Avendor ID value of zero (0) corresponds to the IETF adopted AVP values, as managed by the IANA. Since the absence of the vendor ID field implies that the AVPDiameter node receiving a message inquestion iswhich these flags are notvendor specific, implementationsset appropriately MAY reject the message for this reason, but SHOULDnot uselog thezero (0) vendor ID. 4.3 AVP Data Formatsevent for diagnosis. Version This Version field MUST be set to 1 to indicate Diameter Version 1. Message Length TheDataMessage Length field iszero or moretwo octets andcontains information specific toindicates theAttribute. The format andlength of theData field is determined byDiameter message including theAVP Code and AVP Lengthheader fields. Hop-by-Hop Identifier Theformat of the DataHop-by-Hop Identifier fieldMAY be one of the following data types.is four octets, and aids in matching requests and replies. Theinterpretation of the values depends onsender MUST ensure that thespecification ofHop-by-Hop identifier in a request (*-Request or *-Query) or indication (*-Ind) message is locally unique (to theAVP. For example, an OctetString may be used to transmit human readable string datasender) at any given time, andUnsigned32 may be usedMAY attempt totransmit a time value. Conventions for these common interpretations are described below. OctetStringensure that the number is unique across reboots. Thedata contains arbitrary datasender ofvariable length. Unless otherwise noted,a response (*-Answer or *- Response) MUST ensure that theAVP LengthHop-by-Hop Identifier fieldMUST be set to at least 9 (13 ifcontains the'V' bitsame value that was found in the corresponding request. The Hop-by-Hop identifier is normally a monotonically increasing number, whose start value was randomly generated. End-to-End Identifier Unlike the Hop-by-Hop Identifier, the End-to-End Identifier isenabled). Dataused by servers totransmit (human readable) character string data uses the UTF-8 [24] character setdetect duplicate messages, andisproxies MUST NOTNULL-terminated.modify this field. Theminimum Length field MUST be 9, but can be set to any value up to 65527 bytes. AVP Valuessender ofthis type that do not align ona32-bit boundary MUST have the necessary padding. Address 32 bit (IPv4) [17]request, query, indication, answer or128 bit (IPv6) [16] address, most significant octet first.response message MUST insert a locally unique value in this field. Theformatcombination of theaddress (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. TheSession-Id AVPLengthand this fieldMUST be set to 16 (20 if the 'V' bitisenabled). Unsigned32 32 bit unsigned value, in network byte order. The AVP Length field MUST be setused to12 (16 if the 'V' bit is enabled).detect duplicates. Calhoun et al. expiresAugustSeptember 2001 [Page 15] Internet-DraftMarchApril 2001Unsigned32 valuesCommand-Code The Command-Code field is four octets, and is used in order totransmit time datacommunicate the command associated with the message. The 32-bit address space is managed by IANA (see section 17.2). Vendor-ID In the event that the Command-Code field contains a vendor specific command, the fourmost significant octets returned from NTP [18], in network byte order. Unsigned64 32 bit unsigned value, in network byte order. The AVP Lengthoctet Vendor-ID field contains the IANA assigned "SMI Network Management Private Enterprise Codes" [2] value. If the Command-Code field contains an IETF standard Command, the Vendor-ID field MUST be set to16 (20 if the 'V' bit is enabled). Float32 This represents floating point valueszero (0). AVPs AVPs are a method ofsingle precision as described by [30]. The 32 bit value is transmitted in network byte order. The AVP Length field MUST be setencapsulating information relevant to12 (16 ifthe'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 fieldDiameter message. See section 4. for more information on AVPs. 3.1 Command Codes Every Diameter message MUSTbe 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 bitcontain a valueis transmittedinnetwork byte order. The AVP Length field MUST be setits header's Command- Code field, which is used to24 (28 ifdetermine the'V' bit is enabled). Grouped The Data fieldaction that isspecified asto be taken for asequence of AVPs. Each of these AVPs follows -particular message. The following Command Codes are defined in theorder inDiameter base protocol: Command-Name Abbrev. Code Reference -------------------------------------------------------- Accounting-Answer ACA 272 14.2 Accounting-Poll-Ind API 273 14.4 Accounting-Request ACR 271 14.1 Accounting-Status-Ind ASI 279 14.3 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.8.1 Session-Termination- STR 275 11.8.2 Request Session-Termination- STA 276 11.8.3 Answer 3.2 Command Code ABNF specification Every Command Code defined MUST include a corresponding ABNF specification, whichthey are specified - including their headers and padding. The AVP Length fieldissetused to8 (12 ifdefine the'V' bitAVPs that MUST, MAY and MUST NOT be present. The following format isenabled) plusused in thetotal 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.definition: Calhoun et al. expiresAugustSeptember 2001 [Page 16] Internet-DraftMarchApril 20014.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-valcommand-def =Origin-FQDN Host-IP-Address Origin-FQDNcommand-name "::=" diameter-message diameter-name =; See Section 5.1 Host-IP-AddressALPHA *(ALPHA / DIGIT / "-") command-name = diameter-name ;See Section 6.1.4 An Example AVP withThe command-name has to be Command name, ; defined in theGrouped Data Origin-FQDN = "example.com", Host-IP-Addressbase or extended Diameter ; specifications. diameter-message ="10.10.10.10" would be encoded as follows: 0 1 2 3 4 5 6 7 +-------+-------+-------+-------+-------+-------+-------+-------+ 0 | Example AVP Header (AVP Codeheader [ *fixed] [ *required] [ *optional] [ *fixed] header =999999), Length"<Diameter-Header:" command-id ">" fixed =40 | +-------+-------+-------+-------+-------+-------+-------+-------+ 8 | Origin-FQDN AVP Header (AVP Code[qual] "<" avp-spec ">" required =265), Length[qual] "{" avp-spec "}" optional =19 | +-------+-------+-------+-------+-------+-------+-------+-------+ 16 | 'e' | 'x' | 'a' | 'm' | 'p' | 'l' | 'e' | '.' | +-------+-------+-------+-------+-------+-------+-------+-------+ 24 | 'c' | 'o' | 'm' |Padding| Host-IP-Addr[qual] "[" avp-name "]" ; The avp-name in the 'optional' rule cannot ; evaluate to any AVPHeader | +-------+-------+-------+-------+-------+-------+-------+-------+ 32 | (AVP CodeName which is included ; in a fixed or required rule. qual =257), Length[min] "*" [max] ; See ABNF conventions, RFC 2234 section 6.6. ; The absence of any qualifiers implies that one ; and only one such AVP MUST be present. ; ; NOTE: "[" and "]" have a different meaning ; than in ABNF (see the optional rule, above). ; These braces cannot be used to express ; optional fixed rules (such as an optional ; ICV at the end.) To do this, the convention ; is '0*1fixed'. min =12 | 0x0a | 0x0a | 0x0a | 0x0a | +-------+-------+-------+-------+-------+-------+-------+-------+ 4.5 Diameter Base Protocol AVPs1*DIGIT ; Thefollowing table describesminimum number of times theDiameter AVPselement 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 ; in the baseprotocol, their AVP Code values, types, possible flag values and whether the AVP MAY be encrypted. +---------------------+ | AVP Flag rulesor extended Diameter ; specifications. avp-name = avp-spec ||----+-----+----+-----|----+"AVP" Calhoun et al. expires September 2001 [Page 17] Internet-Draft April 2001 ; The string "AVP" stands for *any* arbitrary ; AVPSection | | |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 | |----+-----+----+-----|----+Name, which does not conflict with the ; required or fixed position AVPs defined in ; the command code definition. The following is a definition of a fictitious command code: Example-Command ::= < Diameter-Header: 9999999 > { User-Name } * { Origin-FQDN } * [ AVPSection | | |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 | | | | |] 3.3 Diameter Command Naming Conventions The following conventions are required for the naming of Diameter messages. Diameter commands typically start with an object name, and end with one of the following verbs: 3.3.1 Request/Answer Request is used when the command is asking the peer to do something for it, for example, authorize a user, or terminate a session. The Answer MUST contain either a positive or negative result code, telling the requester whether or not the request successfully occurred. Other information can also be returned in the Answer. For example, AA-Request asks the peer device to authorize and/or authenticate a user in order to set up a session. The request may fail, thus the answer may be positive or negative. 3.3.2 Query/Response Query is used when the command is asking for information that it expects the peer to have. An example would be querying for current configuration information, or querying for information on resources or sessions in use. The Response usually contains a positive result code and the information, or a negative result code with the reason for not completing the query. For example, Resource-Query requests the peer device to return specific information about one or more resources. The answer is returned in a Resource-Response. 3.3.3 Indication Calhoun et al. expires September 2001 [Page 18] Internet-Draft April 2001 Indication is used either when the node wishes to inform the peer that an event occured, or is requesting that a particular function be performed, but is not expecting a response. The transport level acknowledgement is used to ensure that the message was reliably delivered. 4.0 Diameter AVPs Diameter AVPs carry specific authentication, accounting and authorization information, security information as well as configuration details for the request and reply. Some AVPs MAY be listed more than once. The effect of such an AVP is specific, and is specified in each case by the AVP description. Each AVP of type OctetString MUST be padded to align on a 32 bit boundary, while other AVP types align naturally. NULL bytes are added to the end of the AVP Data field till a word boundary is reached. The length of the padding is not reflected in the AVP Length field. 4.1 AVP Header The fields in the AVP header MUST be sent in network byte order. The format of the header is: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVP Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVP Length | Reserved |P|r|V|r|M| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor-ID (opt) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data ... +-+-+-+-+-+-+-+-+ AVP Code The AVP Code identifies the attribute uniquely. The first 256 AVP numbers are reserved for backward compatibility with RADIUS and are to be interpreted as per NASREQ [7]. AVP numbers 256 and above are used for Diameter, which are allocated by IANA (see section 17.1). AVP Length The AVP Length field is two octets, and indicates the length of Calhoun et al. expires September 2001 [Page 19] Internet-Draft April 2001 this AVP including the AVP Code, AVP Length, AVP Flags, Reserved, the Vendor-ID field (if present) and the AVP data. If a message is received with an invalid attribute length, the message SHOULD be rejected. AVP Flags The AVP Flags field informs the Diameter host how each attribute must be handled. Note that subsequent Diameter extensions MAY define bits to be used within the AVP Header, and an unrecognized bit should be considered an error. The 'r' and the reserved bits are unused and should be set to 0 and ignored on receipt, while the 'P' bit is defined in [11]. The 'M' Bit, known as the Mandatory bit, indicates whether support of the AVP is required. If an AVP is received by a Home server or NAS with the 'M' bit enabled and the receiver does not support the AVP, the message MUST be rejected. If such an AVP is received by a Proxy or Redirect Server, the message MUST be forwarded to its logical destination, and MUST NOT be rejected. It is the responsibility of the originator of a message that is rejected for this purpose to correct the error. AVPs without the 'M' bit enabled are informational only and a receiver that receives a message with such an AVP that is not supported MAY simply ignore the AVP. The 'V' bit, known as the Vendor-Specific bit, indicates whether the optional Vendor-ID field is present in the AVP header. When set the AVP Code belongs to the specific vendor code address space. Unless otherwise noted, AVPs will have the following default AVP Flags field settings: The 'M' bit MUST be set. The 'V' bit MUST NOT be set. 4.2 Optional Header Elements The AVP Header contains one optional field. This field is only present if the respective bit-flag is enabled. Vendor-ID The Vendor-ID field is present if the 'V' bit is set in the AVP Flags field. The optional four octet Vendor-ID field contains the IANA assigned "SMI Network Management Private Enterprise Codes" [2] value, encoded in network byte order. Any vendor wishing to implement a Diameter extension MUST use their own Vendor-ID along with their privately managed AVP address space, guaranteeing that they will not collide with any other vendor's extensions, nor with Calhoun et al. expires September 2001 [Page 20] Internet-Draft April 2001 future IETF extensions. A vendor ID value of zero (0) corresponds to the IETF adopted AVP values, as managed by the IANA. Since the absence of the vendor ID field implies that the AVP in question is not vendor specific, implementations SHOULD not use the zero (0) vendor ID. 4.3 AVP Data Formats The Data field is zero or more octets and contains information specific to the Attribute. The format and length of the Data field is determined by the AVP Code and AVP Length fields. The format of the Data field MAY be one of the following data types. The interpretation of the values depends on the specification of the AVP. For example, an OctetString may be used to transmit human readable string data and Unsigned32 may be used to transmit a time value. Conventions for these common interpretations are described below. OctetString The data contains arbitrary data of variable length. Unless otherwise noted, the AVP Length field MUST be set to at least 9 (13 if the 'V' bit is enabled). Data used to transmit (human readable) character string data uses the UTF-8 [24] character set and is NOT NULL-terminated. The minimum Length field MUST be 9, but can be set to any value up to 65504 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 Calhoun et al. expires September 2001 [Page 21] Internet-Draft April 2001 32 bit unsigned value, in network byte order. The AVP Length field MUST be set to 12 (16 if the 'V' bit is enabled). Unsigned32 values used to transmit time data contains 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 and padding. 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 Calhoun et al. expires September 2001 [Page 22] Internet-Draft April 2001 besides those specified by the Grouped AVP grammar. 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 = 264), 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. Calhoun et al. expires September 2001 [Page 23] Internet-Draft April 2001 +---------------------+ | AVP Flag rules | |----+-----+----+-----|----+ AVP Section | | |SHLD| MUST|MAY | Attribute Name Code Defined Data Type |MUST| MAY | NOT| NOT|Encr| -----------------------------------------|----+-----+----+-----|----| Accounting- 482 15.2 Unsigned32 | M | P | | V | Y | Interim-Interval | | | | | | Accounting- 485 15.3 Unsigned32 | M | P | | V | Y | Record-Number | | | | | | Accounting- 480 15.1 Unsigned32 | M | P | | V | Y | Record-Type | | | | | | Accounting- 44 15.5 OctetString| M | P | | V | Y | Session-Id | | | | | | Accounting-State 486 15.4 Unsigned32 | M | P | | V | Y | Authorization- 291 11.3 Unsigned32 | | | | | N | Lifetime | | | | | | Destination-FQDN 293 5.3 OctetString| | | | | Y | Destination- 283 12.4.7 OctetString| M | | | V | N | Realm | | | | | | DSI-Event 297 9.1.1 Unsigned32 | M | | | | N | 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 | | | | | | Failed-Vendor-Id 262 10.1.3 Unsigned32 | | | | | Y | Firmware- 267 6.1.2 Unsigned32 | | | | V,M | Y | Revision | | | | | | Host-IP-Address 257 6.1.4 Address | M | | | V | N | Max-Wait-Time 295 11.6 Unsigned32 | M | | | V | N | Origin-FQDN 264 5.1 OctetString| M | | | V | N | Origin-Realm 296 5.2 OctetString| M | | | V | N | Original- 261 11.7 OctetString| M | | | V | N | Session-Id | | | | | | Product-Name 269 6.1.6 OctetString| | | | | N | 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 | -----------------------------------------|----+-----+----+-----|----| Calhoun et al. expires September 2001 [Page 24] Internet-Draft April 2001 +---------------------+ | AVP Flag rules | |----+-----+----+-----|----+ AVP Section | | |SHLD| MUST|MAY | Attribute Name Code Defined Data Type |MUST| MAY | NOT| NOT|Encr| -----------------------------------------|----+-----+----+-----|----| Route-Record 282 12.4.3 OctetString| M | | | V | N | Session-Id 263 11.2 OctetString| M | | | | Y | Session-Timeout 27 11.4 Unsigned32 | | | | | Y | Supported- 265 6.1.5 Unsigned32 | | | | | N | Vendor-Id | | | | | | User-Name 1 11.5 OctetString| | | | | Y | Vendor-Id 266 6.1.1 Unsigned32 | | | | V,M | Y | -----------------------------------------|----+-----+----+-----|----| 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 Calhoun et al. expires September 2001 [Page 25] Internet-Draft April 2001 Response and Answer messages). 5.1 Origin-FQDN AVP The Origin-FQDN AVP (AVP Code| | | | | | Firmware 267 6.1.2 Unsigned32 | | | | V,M | Y | -Revision | | | | | | Host-IP-Address 257 6.1.4 Address | M | | | V | N |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 Fully Qualified Domain Name naming conventions. Note that the Origin-FQDN264 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 296AVP may resolve to more than one address as the Diameter peer may support more than one address. 5.2OctetString| 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.2Origin-Realm AVP The Origin-Realm AVP (AVP Code 296) is of type OctetString, encoded in the UTF-8 [24] format. This AVP contains the Realm of the originator of any Diameter message. 5.3 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. Calhoun et al. expires September 2001 [Page 26] Internet-Draft April 2001 The Device-Reboot-Ind message MUST NOT be proxied, or redirected. Since the DRI cannot be proxied, it is still possible that a upstream proxy receives a message for which it has no available peers to handle the extension that corresponds to the Command-Code. In such instances, the Device-Status-Ind message is used (see Section 9.1) to inform the downstream to take action. With the exception of the Device-Reboot-Ind message, a message of type Request, Query or Indication that includes the Extension-Id AVP, or a message with an extension-specific command code, 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 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 } { Product-Name } * { Supported-Vendor-Id } * { Extension-Id } [ Firmware-Revision ] * [ AVP ] 6.1.1 Vendor-Id AVP The Vendor-Id AVP (AVP Code 266) is of type 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.4and contains the IANA "SMI Network Management Private Enterprise Codes" [2] value assigned to the vendor of the Diameter device. Calhoun et al. expires September 2001 [Page 27] Internet-Draft April 2001 In combination with the Supported-Vendor-Id AVP (section 6.1.5), 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-Id, Product-Name (section 6.1.6) and the Firmware-Revision (section 6.1.2) AVPs MAY provide very useful debugging information. A Vendor-Id value of zero in the DRI is reserved and indicates that the Diameter peer is in the experimental or concept stage and that an IANA Private Enterprise Number has yet to be obtained by the implementor. 6.1.2 Firmware-Revision AVP The Firmware-Revision AVP (AVP Code 267) is of type Unsigned32| | | | | Y | Timestamp 262 13.3and 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 The Extension-Id AVP (AVP Code 258) is of type Unsigned32| | | | | N | User-Nameand is used in order to identify a specific Diameter extension. This AVP is used in the Device-Reboot-Ind message in order to inform the peer what extensions are locally supported. The Extension-Id MUST also be present in all messages that are defined in a separate Diameter specification and have an Extension ID assigned. Each Diameter extension draft MUST have an IANA assigned extension Identifier (see section 17.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 111.5 OctetString| | | | | Y | Vendor-Id 266 6.1.1 Unsigned32 | | | | V,M | Y | -----------------------------------------|----+-----+----+-----|----|[7] Strong Security 2 [11] Resource Management 3 [29] Mobile-IP 4 [10] 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 Calhoun et al. expiresAugustSeptember 2001 [Page18]28] Internet-DraftMarchApril 20015.0 Message Forwarding All Diameter messages MUST include the Origin-FQDN and Origin-Realm AVPs. These AVPssender supports all extensions. Proxy servers areused to identify the source of the message. When responding toresponsible for finding arequest or query message, the Origin-FQDN and Origin-Realm AVPs are replaced withdownstream server that supports thelocal node's information. When a Diameter entity receives a Diameter messageextension oftype Request, Query or Indication that includesaDestination-FQDN AVP, and the host specified in the AVPparticular message. If none can becontacted directly, thefound, a DSI messageMUST be forwarded tois returned with thehost in question.DSI-Event AVP set to DIAMETER_UNABLE_TO_DELIVER. 6.1.4 Host-IP-Address AVP TheDestination-FQDNHost-IP-Address AVP (AVP Code 257) isused 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 useofa pre-established session key shared between the sourcetype Address andthe 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, whichis used torequest thatinform aparticular user's session be terminated. Proxies receiving messages that containDiameter peer of theDestination-FQDN AVP MUST verify whether they are able to forwardsender's IP address. All source addresses that a Diametermessagesnode expects to use with SCTP [26] MUST be advertised in thehost specifiedDevice-Reboot-Ind message by including a Host-IP- Address AVP for each address. This AVP MUST ONLY be used in theAVP,Device-Reboot-Ind message. 6.1.5 Supported-Vendor-Id AVP The Supported-Vendor-Id AVP (AVP Code 265) is of type Unsigned32 andif so, MUST forwardcontains themessageIANA "SMI Network Management Private Enterprise Codes" [2] value assigned to a vendor other than thehostdevice vendor. This is used inquestion. Otherwise,the Device-Reboot-Ind messagerouting procedures describedinsection 12.0 MUST be followed. This section definesorder to inform theDiameter AVPspeer thatMUST be added in all messages originated bythe sender supports aDiameter node (including nodes creating Response and Answer messages). 5.1 Origin-FQDNsubset of the vendor-specific commands and/or attributes defined by the vendor identified in this AVP. 6.1.6 Product-Name AVP TheOrigin-FQDNProduct-Name AVP (AVP Code264)269) 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[25] format, and contains thehostvendor assigned nameoffor theoriginatorproduct. The Product-Name AVP SHOULD remain constant across firmware revisions for the same product. 7.0 Transport Failure Detection Given the nature of the Diametermessage and MUST follow the NAI [8] naming conventions. Noteprotocol, it is recommended that transport failures be detected as soon as possible. Detecting such failures will minimize theOrigin-FQDN AVP may resolveoccurrence of messages sent tomore than one address asunavailable servers, resulting in unnecessary delays, and will provide better failover performance. In order to pro-actively detect such failures, the Diameter protocol defines the Device-Watchdog-Request message, which is sent to an inactive peer. A peer is considered inactive if no messages were sent or received from theDiameterpeermay support more than one address.within the current watchdog interval period Calhoun et al. expiresAugustSeptember 2001 [Page19]29] Internet-DraftMarchApril 20015.2 Origin-Realm AVP The Origin-Realm AVP (AVP Code 296) is of type OctetString, encoded in the UTF-8 [24] format. This AVP contains the Realm of the originator of any Diameter message. 5.3 Destination-FQDN AVP The Destination-FQDN AVP (AVP Code 293) is of type OctetString, encoded in the UTF-8 [24] format,(see Section 19.0), andcontains 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 ofno request or query messages are pending with theDestination-FQDN AVP is setpeer. For implementations that have access to the Retransmission Time-Out (RTO) value of theOrigin- FQDN AVP found in a message from the intended target host. 6.0 Capabilities Exchange When two Diameter peers establish aunderlying transport connection,they MUST send the Device-Reboot-Ind message. This message has two purposes. First it allowsapeer's identity toDWR SHOULD bediscovered, and allows for capabilities exchange, such assent once per RTO of that connection, plus thesupported protocol version number, andwatchdog interval period, with a jiterring of +/- 50%. If thelocally supported extensions. The receiver usesDWR is unanswered, theextensions advertised in order to determine whether it SHOULD send certain application-specific Diameter commands. A Diameter node MUST retaintime until thesupported extensions in order to ensure that unrecognized commands and/or AVPs are notnext DWR is sentto a peer. The Device-Reboot-Ind messageMUSTNOTbeproxied, or redirected. Sincerecalculated after exponentially backing off theDRI cannot be proxied, it is still possible that a upstream proxy receives a message for which it has no available peers to handleRTO portion. When theextension that corresponds tovalue of theCommand-Code. In such instances,DWR's current watchdog interval period reaches theDevice-Status-Ind messagemaximum watchdog interval (Secton 19.0), backoff isused (see Section 9.1)not continued, and the peer is marked as failed. DWR messages continue toinformbe sent (jittered) at thedownstreamfinal interval for detection for failover. The current watchdog interval is returned totake action. Withits starting point when a DWA is received or theexception ofpeer resumes activity. Implementations that do not have access to theDevice-Reboot-Ind message,RTO SHOULD perform an Round Trip Time (RTT) measurement for a given peer when a Device- Watchdog-Answer message is received for a non-backed off DWR. The fixed RTO base should be replaced by RTT-Multiplier (Section 19.0) times the measured RTT. An example oftype Request, Query or Indication that includestheExtension-Id AVP MAY onlybackoff sequence, excluding jitter, would be: 30+RTO , 30+2*RTO , 30+4*RTO , 30+8*RTO, 60, 60, 60 Note that exponential backoff MUST beforwardedperformed before the maximum is reached. 7.1 Device-Watchdog-Request The Device-Watchdog-Request (DWR), indicated by the Command-Code set to 280, is sent to ahost that has explicitely advertised support for the extension (orpeer when no traffic hasadvertised the Wildcard Extension). 6.1 Device-Reboot-Ind (DRI) Commandbeen exchanged between two peers as defined in Section 7.0, and no requests are pending with the peer. Message Format <Device-Watchdog-Request> ::= < Diameter Header: 280 > { Origin-FQDN } { Origin-Realm } 7.2 Device-Watchdog-Answer TheDevice-Reboot-Ind (DRI),Device-Watchdog-Answer (DWA), indicated by the Command-Code set to 281, is sent as a response to the Device-Watchdog-Request message. Calhoun et al. expiresAugustSeptember 2001 [Page20]30] Internet-DraftMarchApril 2001257, 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,A receiver of theDevice- 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 resultsDWA 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 > {Origin-FQDN } { Origin-Realm } 1* { Host-IP-AddressResult-Code } {Vendor-IdOrigin-FQDN }*{Extension-IdOrigin-Realm }[ 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 and contains the IANA assigned "SMI Network Management Private Enterprise Codes" [2] value of the Diameter device. This MAY be used in order to know which vendor specific attributes may be sent to7.3 Failover/Failback Procedures In thepeer. It is also envisionedevent thatthe 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)a transport failure isof type Unsigned32detected with a peer, it is necessary for all pending request, query and indication messages to be forwarded to an alternate server, if possible. This isusedcommonly referred toinform a Diameter peer of the firmware revision of the issuing device. For devices that do not haveas failover. In order for afirmware revision (general purpose computers runningDiametersoftware modules,node to perform failover procedures, it is necessary forinstance), the revision oftheDiameter software module may be reported instead. 6.1.3 Extension-Id AVP Calhoun et al. expires August 2001 [Page 21] Internet-Draft March 2001 The Extension-Id AVP (AVP Code 258) is of type Unsigned32 and is used in ordernode toidentifymaintain aspecific Diameter extension. This AVPpending message queue for a given peer. When a response isused inreceived, theDevice-Reboot-Indmessagein order to informis removed from thepeer what extensions are locally supported.queue. TheExtension-Id MUST also be present in all messages that are defined in a separate Diameter specification and have an Extension ID assigned. Each Diameter extension draft MUST have an IANA assigned extensionHop-by-Hop Identifier(see section 15.3). The base protocol does not require an Extension-Id since its support is mandatory. Therefield MAY bemore 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 wishused toeither advertise all supported extensions, ormatch thewildcard extension. The receiver of a wildcard extension MUST assume thatcorresponding response with thesender supportsqueued request. When a transport failure is detected, allextensions. Proxy serversmessages in the queue areresponsible for findingsent to an alternate server, if possible. An example of adownstreamcase where it is not possible for forward the message to an alternate serverthat supportsis when theextension of a particular message. If none can be found, a DSImessage has a fixed destination, and the unavailable peer isreturnedthe message's final destination (see Destination-FQDN AVP). Such an error requires that the server return an DSI with the DSI-Event AVP set to DIAMETER_UNABLE_TO_DELIVER.6.1.4 Host-IP-Address AVP The Host-IP-Address AVP (AVP Code 257) is of type Address andIt isusedimportant toinformnote that multiple identical request or responses MAY be received as aDiameter peerresult ofthe sender's IP address. All source addresses thataDiameter node expects to use with SCTP [26] MUST be advertisedfailover. The End-to-End Identifier field in theDevice-Reboot-Ind message by including a Host-IP- Address AVP for each address. This AVPDiameter header MUSTONLYbe used to identify duplicate messages. As described in section 2.1, a connection request should be periodically attempted with theDevice-Reboot-Ind message. 7.0 Transport Failure Detection Given the nature offailed peer in order to re-establish theDiameter protocol, it is recommended thattransportfailuresconnection. Once a connection has been successfully established, messages can once again bedetected as soon as possible. Detecting such failures will minimizeforwarded to theoccurrence of messages sentpeer. This is commonly referred tounavailable servers, resulting in unnecessary delays, and will provide betteras failback. 8.0 Peer State Machine This section contains a finite state machine, that MUST be observed by all Diameter implementations. Each Diameter node MUST follow the Calhoun et al. expiresAugustSeptember 2001 [Page22]31] Internet-DraftMarchApril 2001failover performance. In order to pro-actively detect such failures, the Diameter protocol defines the Device-Watchdog-Request message, which is sent to an inactive peer. A peer is considered inactive if no messages were sent or received from the peer within the current watchdog interval period (see Section 17.0), and no request or query messages are pendingstate machine described below when communicating withtheeach peer.For implementations that have access to the Retransmission Time-Out (RTO) value of the underlyingMultiple actions are separated by commas, and may continue on succeeding lines as space requires. Similarly, state and next state may also span multiple lines as space requires. There may be at most one transportconnection, a DWR SHOULDconnection between any two peers over which Diameter messages may besent once per RTO of that connection, plus the watchdog interval period, with a jiterring of +/- 50%. If the DWR is unanswered, the time until the next DWRpassed. This state machine issent MUST be recalculated after exponentially backing off the RTO portion. When the value ofintended to handle both theDWR's current watchdog interval period reachessimple case, in which one peer initiates a connection to themaximum watchdog interval (Secton 17.0), backoff is not continued,other, and the complex case, in which each peeris marked as failed. DWR messages continuesimultaneously initiates a connection tobe sent (jittered) atthefinal interval for detection for failover. The current watchdog interval is returnedother. In the complex case, an election occurs toits starting point when a DWAdetermine which transport connection will survive. I- isreceived or the peer resumes activity. Implementations that do not have accessused to represent theRTO SHOULD perform an Round Trip Time (RTT) measurement for a given peer when a Device- Watchdog-Answer messageinitiator (connecting) connection, while the R- isreceived for a non-backed off DWR.used to represent the responder (listening) connection. Thefixed RTO base should be replaced by RTT-Multiplier (Section 17.0) timeslack of a prefix indicates that themeasured RTT. An exampleevent or action is the same regardless of thebackoff sequence, excluding jitter, would be: 30+RTO , 30+2*RTO , 30+4*RTO , 30+8*RTO, 60, 60, 60 Noteconnection on which the event occured. The stable states thatexponential backoff MUSTa state machine may beperformed beforein are Closed, I-Open and R-Open; all other states are intermediate. Note that I-Open and R-Open are equivalent except for whether themaximuminitiator or responder transport connection isreached. 7.1 Device-Watchdog-Requestused for communication. A DRI message is always sent on the responder connection immediately after accepting the connection request. TheDevice-Watchdog-Request (DWR), indicatednon-elected connection will close down. All subsesquent messages are sent on the elected connection. The state machine constrains only the behavior of a Diameter implementation as seen by Diameter peers through events on theCommand-Code set to 280,wire. Any implementation that produces equivalent results is considered compliant. state event action next state ----------------------------------------------------------------- Closed Start I-Snd-Conn-Req Wait-Conn-Ack R-Rcv-Conn-Req I-Snd-Conn-Ack Wait-R-DRI Wait-Conn-Ack I-Rcv-Conn-Ack I-Snd-DRI Wait-I-DRI I-Rcv-Conn-Nack Cleanup Closed R-Rcv-Conn-Req R-Snd-Conn-Ack Wait-Conn-Ack/ Wait-R-DRI Timeout Error Closed Wait-I-DRI I-Rcv-DRI Process-DRI I-Open R-Rcv-Conn-Req R-Snd-Conn-Ack Wait-R-DRI/ Elect Calhoun et al. expires September 2001 [Page 32] Internet-Draft April 2001 I-Peer-Disc I-Disc Closed Timeout Error Closed Wait-Conn-Ack/ I-Rcv-Conn-Ack I-Snd-DRI Wait-R-DRI/ Wait-R-DRI Elect I-Rcv-Conn-Nack Cleanup Wait-R-DRI R-Rcv-DRI Process-DRI Wait-Conn-Ack/ Elect Timeout Error Closed Wait-R-DRI/ R-Rcv-DRI Process-DRI, Wait-Returns Elect Elect I-Peer-Disc I-Disc Wait-R-DRI Timeout Error Closed Wait-Conn-Ack/ I-Rcv-Conn-Ack I-Snd-DRI,Elect Wait-Returns Elect I-Rcv-Conn-Nack R-Snd-DRI R-Open R-Peer-Disc R-Disc Wait-Conn-Ack-2 Timeout Error Closed Wait-Returns Win-Election I-Disc,R-Snd-DRI R-Open I-Peer-Disc I-Disc,R-Snd-DRI R-Open I-Rcv-DRI R-Disc I-Open R-Peer-Disc R-Disc Wait-I-DRI-2 Timeout Error Closed Wait-Conn-Ack-2 I-Rcv-Conn-Ack I-Snd-DRI Wait-I-DRI-2 I-Rcv-Conn-Nack Cleanup Closed R-Rcv-Conn-Req R-Snd-Conn-Nack Wait-Conn-Ack-2 Timeout Error Closed Wait-I-DRI-2 I-Rcv-DRI Process-DRI I-Open I-Peer-Disc I-Disc Closed R-Rcv-Conn-Req R-Snd-Conn-Nack Wait-I-DRI-2 Timeout Error Closed Wait-R-DRI R-Rcv-DRI R-Snd-DRI R-Open Timeout Error Closed R-Open Send-Message R-Snd-Non-DRI R-Open R-Rcv-Non-DRI Process R-Open R-WatchDog-Timer R-Snd-DWR R-Open R-Rcv-DWA Process-DWA R-Open Stop R-Snd-Disc Closed R-Peer-Disc R-Disc Closed R-Rcv-DRI Error Closed I-Open Send-Message I-Snd-Non-DRI R-Open Calhoun et al. expires September 2001 [Page 33] Internet-Draft April 2001 I-Rcv-Non-DRI Process I-Open R-WatchDog-Timer R-Snd-DWR R-Open R-Rcv-DWA Process-DWA R-Open Stop I-Disc Closed I-Peer-Disc I-Disc Closed I-Rcv-DRI Error Closed R-Rcv-Conn-Req R-Snd-Conn-Nack I-Open 8.1 States Following issent toa more detailed description of each automaton state. Closed A peerwhen no traffic has been exchanged between two peers as definedis initially inSection 7.0,the closed state, and norequests are pendingtransport connection exists with the peer.Message Format Calhoun et al. expires August 2001 [Page 23] Internet-Draft March 2001 <Device-Watchdog-Request> ::= < Diameter Header: 280 > { Origin-FQDN } { Origin-Realm } 0*1< Integrity-Check-Value > 7.2 Device-Watchdog-AnswerWait-Conn-Ack A transport connection has been initiated with the peer, and an acknowledgement is pending. Wait-I-DRI TheDevice-Watchdog-Answer (DWA), indicated bylocal Diameter node is waiting for theCommand-Code setpeer to281, is sent asissue aresponse to the Device-Watchdog-Request message.DRI. Wait-Conn-Ack/Wait-R-DRI Areceiver of the DWA SHOULD perform RTT calculation in the event that thetransportRTO information is not available. Message Format <Device-Watchdog-Answer> ::= < Diameter Header: 281 > { Result-Code } { Origin-FQDN } { Origin-Realm } 0*1< Integrity-Check-Value > 7.3 Failover/Failback Procedures Inconnection indication from theevent thatpeer was received, while a transportfailure is detectedconnection has already been locally initiated. Wait-R-DRI/Elect Two transport connections have been established withathe peer,itand a DRI isnecessary for allpendingrequest, query and indication messageson the responder connection. Wait-Conn-Ack/Elect A transport connection exists on the responder connection, while an acknowlegement has yet to beforwardedreceived on the initiator connection. Wait-Returns Multiple transport connections caused an election to occur. Wait-Conn-Ack-2 While analternate server, if possible. This is commonly referredacknowledgement toas failover. In order foraDiameter node to perform failover procedures, it is necessary forlocally initiated transport connection hasn't been received, an election has failed and thenode to maintain a pending message queue for a given peer. Wheninitiator connection will be used between the peers. Wait-I-DRI-2 Following an election, the initiator connection won, and aresponse is received,DRI has yet to be received by themessage is removedpeer. Calhoun et al. expires September 2001 [Page 34] Internet-Draft April 2001 Wait-R-DRI A transport connection indication has been received from thequeue.peer, and a DRI has yet to be received by the peer. R-Open TheHop-by-Hop Identifier field MAYresponder connection will be used tomatchcommunicate with thecorresponding responsepeer. I-Open The initiator connection will be used to communicate with thequeued response. When a transport failure is detected, all messagespeer. 8.2 Events Transitions and actions in thequeueautomaton aresent to an alternate server, if possible. An examplecaused by events. In this section we will ignore the -I and -R prefix, since the actual event would be identical, but would occur on one ofa case where it is nottwo possible connections. Start The Diameter application has signalled that a connection should be initiated with the peer. Rcv-Conn-Req A transport connection indication from the peer has been received. Rcv-Conn-Ack A positive acknowlegement was received to a locally initiated transport connection. Rcv-Conn-Nack A negative acknowledgement was received to a locally initiated transport connection. Timeout An application-defined timer has expired while waiting forforwardsome event. Rcv-DRI A DRI message from the peer was received. Peer-Disc A disconnection indication from the peer was received. Win-Election An election was held, and the local node was the winner. Send-Message A Non-DRI message is toan alternate serverbe sent. Rcv-Non-DRI A Non-DRI message was received. WatchDog-Timer The Watchdog timer expired, indicating that a DWR message iswhento be sent to the peer. Calhoun et al. expires September 2001 [Page 35] Internet-Draft April 2001 Rcv-DWA A DWA message was received. Stop The Diameter application has signalled that afixed destination, and the unavailable peer isconnection should be terminated (e.g., on system shutdown). 8.3 Actions Actions in themessage's final destination (see Destination-FQDN AVP). Such an error requires thatautomaton are caused by events and typically indicate theserver returntransmission of packets and/or anDSI with the DSI-Event AVP setaction toDIAMETER_UNABLE_TO_DELIVER. As described inbe taken on the connection. In this section2.1, a connection request shouldwe will ignore the -I and -R prefix, since the actual action would beperiodically attemptedidentical, but would occur on one of two possible connections. Snd-Conn-Req A transport connection is initiated with thefailed peerpeer. Snd-Conn-Ack an acknowledgement is sent inorderresponse tore-establisha connect request, confirming that the transportconnection. Once alayer connectionhas been successfully established, messages can once again be forwarded to the peer. Thisiscommonly referredopen. Snd-Conn-Nack A negative acknowledgement is sent in response toas failback. Calhoun et al. expires August 2001 [Page 24] Internet-Draft March 2001 8.0 Peer State Machine This section containsafinite state machine,connect request, indicating thatMUST be observed by all Diameter implementations. Each Diameter node MUST followthestate machine described below when communicating with each peer. State Event Action New State ----- ----- ------ --------- Initial Localrequest was refused. Snd-DRI A DRI message is sent toestablish SCTP/TCP Idle communication with a Diameter Connect peer with which therethe peer. Cleanup If necessary, the connection isno existingshutdown, and any local resources are freed. Error The transportlevellayer connectionestablished. Initial Receive transport level Sendis disconnected, either politely or abortively, in response to an error condition. Local resources are freed. Process-DRI A received DRIWait-DRIis processed. Disc The transport layer connectionrequest from a Diameter peer. Idle Connection Established Send DRI Wait-DRI Idle Receive DRI Send DRI + Open Reset Watchdog Timer Wait-DRI Receive DRI Reset Watchdog Open Timer Open Receive other messages Process Open Message + Reset Watchdog Timer Open Idle link,is disconnected, andno pending Send DWR Open requests Open Receivelocal resources are freed. Elect An election occurs (see Section 8.4 for more information). Snd-Non-DRI A non-DRI message is sent. Snd-DWR A DWRSend DWA Open Open Receive DWA Calculate RTT Open Open Receive DRI Cleanup Closed Open Transport level failure Cleanup Closed Closed Diameter Entity shutdown or Close Initial close connection with peer connectionmessage is sent. Process-DWA TheInitial and Idle states MAY be merged if the local SCTP implementationDWA message isable to implement the piggyback of data during theserviced. Calhoun et al. expiresAugustSeptember 2001 [Page25]36] Internet-DraftMarchApril 2001 Process A non-DRI Diameter message is serviced. 8.4 The Election Process The election is performed on the responder. The responder compares the Origin-FQDN received in the DRI sent by its peer with its own Origin-FQDN (which it may or may not have actually sent). The transport layer connectionphase. Whenwith theCleanup actionhigher value of Origin-FQDN isinvoked,thefailover proceduresone that survives. The comparison proceeds by considering the shorter OctetString to be null-padded to the length of the longer, then performing an octet by octet unsigned comparison with the first octet being most significant. Hanging octets areexecuted (see Section 7.3 for more information).assumed to have value 0x80, but dimpled octets are ignored. 9.0 Per-Hop Error Signaling There are many instances where error conditions occur on a Diameter node, that needs to be signalled to the downstream server, and not necessarily to the Diameter client. Examples of such error conditions areinvalid time synchronization,inability to forward a message to a particular domain, etc. In these cases, returning the error back to the Diameter client will only cause delay, and perhaps confusion in roaming networks. Therefore, when such errors occur, it is necessary for the error to be handled by the downstream next hop, and some local action be taken to rectify the problem, such as forwarding to a different next hop. Request +--------+ Link Broken +-------------------------->|Diameter|----///----+ | +---------------------| | v +-----+---+ | DSI | Server | +--------+ |Diameter |<-+ (Unable to Forward) +--------+ |Diameter| |Client or| | | | Server |--+ +--------+ | Server | +---------+ | Request |Diameter| +--------+ +-------------------->| | ^ | Server |-----------+ +--------+ Figure 1 - Example of Per-Hop Error Condition 9.1 Device-Status-Ind The Device-Status-Ind (DSI), indicated by the Command-Code set to 282, is sent to inform a peer that an event has occurred. Calhoun et al. expires September 2001 [Page 37] Internet-Draft April 2001 When a Diameter node issues a DSI message downstream, the target peer MUST attempt to rectify the problem, or issue a similar message downstream. The Device-Status-Ind message MUST NOT be proxied, but MAY be forwarded, as long as the Origin-FQDNAVP isand Origin-Realm AVPs are replaced to include the local node's identity. The Device-Status-Ind message MUST contain the same Hop-by-Hop Identifier value in the header as the message which motivated sending the DSI. If the Session-Id AVP was present in the original message, the same AVP MUST be present in the DSI. Message FormatCalhoun 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 TheResult-CodeDSI-Event AVP (AVP Code 297) is of type Unsigned32 and indicates that an event occurred which requires attention from a Diameter peer. The DSI-Event contains an IANA-managed 32-bit address space representing events (see section15.9).17.7). Diameter provides four different classes of event notification, all identified by the thousands digit: - 1xxx (Informational Events) - 3xxx (Redirect Notification) - 4xxx (Transient Failure Events) - 5xxx (Permanent Failure Events) A non-recognize class (one whose first digit is not defined in this section) MUST be handled as a permanent failure. 9.1.1.1 Informational Events Events that fall within the Informational category are used to inform a peer that a request cannot be immediately satisfied, and a further response will be issued in the near future. DIAMETER_STILL_WORKING 1001 A request's Max-Wait-Time has expired, and the request is still being serviced. This event MAY be sent prior to the Max-Wait- Time expiration, to inform the peer that the request is not Calhoun et al. expires September 2001 [Page 38] Internet-Draft April 2001 expected to be serviced in the alloted time, but the request is not being abandoned. It is important to note that receiving this event will result in another Diameter message being received with the same Hop-by-Hop and End-to-End identifiers. 9.1.1.2 Redirect Event Errors that fall within the Redirect Notification category are used to inform a peer that the request cannot be satisfied locally and should instead be forwarded to another server. DIAMETER_REDIRECT_INDICATION 3001 A proxy or redirect server has determined that the request could not be satisfied locally and the initiator of the requestCalhoun et al. expires August 2001 [Page 27] Internet-Draft March 2001should direct the request directly to the server, whose contact information has been added to the response. 9.1.1.3 Transient Failure Events Errors that fall within the transient failures category are used to inform a peer that the request could not be satisfied at the time it was received, but MAY beable to satisfy the request is the error is corrected. DIAMETER_TIME_INVALID 4001 The originator of the Device-Status-Ind message detected a time synchronization error, and aable to satisfy the requestfor time synchronizationif the error isbeing requested.corrected. DIAMETER_UNSUPPORTED_TRANSFORM40024001 A message was received that included anIntegrity-Check-Value orCMS-Data AVP [11] that made use of an unsupported transform.DIAMETER_INVALID_ICV 4003 The Request did not contain a valid Integrity-Check-Value AVP.9.1.1.4 Permanent Failure Events Errors that fall within the permanent failures category are used to inform the peer that the request failed, and cannot be satified by the originator of the Device-Status-Ind. The receiver of a DSI message with the DSI-Event set to a value that falls within this event class SHOULD forward the message to an alternate peer, if one is available. DIAMETER_INVALID_RECORD_ROUTE 5001 The lastRecord-RouteRoute-Record AVP in the message is not set to the identity of the sender of the message. See Section 12.0 for more information. DIAMETER_COMMAND_UNSUPPORTED 5002 The Request contained a Command-Code that the receiver did not recognize or support. The Device-Status-Ind message MUST also Calhoun et al. expires September 2001 [Page 39] Internet-Draft April 2001 contain an Failed-Command-Code AVP containing the unrecognized Command-Code. DIAMETER_UNABLE_TO_DELIVER 5003 The request could not be delivered to a host that handles the realm, and extension, requested at this time.Calhoun et al. expires August 2001 [Page 28] Internet-Draft March 2001DIAMETER_REALM_NOT_SERVED 5004 The originator of the DSI message could not deliver the message since the realm requested is unknown. DIAMETER_ERROR_TOO_BUSY 5005 When returned, a Diameter node SHOULD attempt to sent the message to an alternate peer. DIAMETER_CANNOT_PROCESS_IN_TIME 5006 The time limit in a request's Max-Wait-Time AVP has expired, and no response is available. This value MAY also be used to inform a peer that the request is not expected to be processed within the Max-Wait-Time value. 10.0 End-to-End Error Signaling There arefivesix different types of error conditions that can occur within Diameter. The first occurs when a Diameter message is poorly formatted, and unrecognizable, indicated in the figure below as "Bad Message". This error condition applies if a received message is less than the length of the Diameter header. Messages that generate such an error are ignored. A second case occurs when a Command-Code field is set to an unsupported value, which is shown as "Unknown Command" in the figure. Such errors generate a Device-Status-Ind message, and require per-hop behavior. A third case occurs when an AVP is received, marked as Mandatory ('M' bit is set), and is unknown by the receiver. This error condition is labelled as "Unknown AVP" in the figure below, and causes a Message- Reject-Ind message to be sent. The fourth case occurs when a message is received that contains an AVP with either an unknown or illegal value. This is labelled as "Bad AVP Value", and requires that a Message-Reject-Ind message be sent. The last two cases require that a Message-Reject-Ind message be Calhoun et al. expires September 2001 [Page 40] Internet-Draft April 2001 generated to ensure that such errors are identified in both request and response messages. The last error condition occurs when an extension specific error is identified in a request or response message. In a message of type request or query, the natural corresponding answer or response message MUST be used. However, if an error occurs while processing anCalhoun et al. expires August 2001 [Page 29] Internet-Draft March 2001indication, answer or response message, a Message-Reject-Ind is used to inform the peer that an error occurred while processing the message. Error Type Ignore Send Send Send Message MRI DSI Response Bad Message X Unknown Command X Unknown AVP X Bad AVP Value X Request,Query Error X Answer,Response,Ind Error X "Ignore Message" indicates that the message is simply dropped. "Send MRI" means that a Message-Reject-Ind message is sent to report the error condition, while "Send DSI" requires that a Device-Status-Ind message is sent (see Section 9.1). "Send Response" means that the response message for a request or query message is returned. 10.1 Message-Reject-Ind (MRI) Command The Message-Reject-Ind (MRI), indicated by the Command-Code set to 259, provides a generic means of completing transactions by indicating errors in the messages that initiated them. The Message- Reject-Ind command is sent in response: 1. An error is found in a message of type Ind, Answer and Response 2. A Unknown AVP, marked as Mandatory, is received 3. An AVP was received with an unknown, or illegal, value. The Message-Reject-Ind message MUST contain the same Hop-by-Hop Identifier value in the header as the message that caused the error condition. If the Session-Id AVP was present in the original message, the same AVP MUST be present in the MRI. Message Format Calhoun et al. expiresAugustSeptember 2001 [Page30]41] Internet-DraftMarchApril 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 ] * [ Proxy-State ] * [ Route-Record ] * [ Destination-Realm ]0*1< Integrity-Check-Value >where the Result-Code AVP indicate the nature of the error causing rejection, and the Failed-AVP AVP provides some minimal debugging data by indicating a specific AVP type which caused the problem. See the description of the Result-Code AVP for indication of when the Failed-AVP AVP MUST be present in the message. See [25] for more information. 10.1.1 Failed-AVP AVP The Failed-AVP AVP (AVP Code 279) is of type OctetString and provides debugging information in cases where a request is rejected or not fully processed due to erroneous information in a specific AVP. The value of the Result-Code AVP will provide information on the reason for the Failed-AVP AVP. A Diameter message MAY contain one or more Failed-AVP AVPs, each containing a complete AVP that could not be processed successfully. The possible reasons for this AVP are the presence of an improperly constructed AVP, an unsupported or unrecognized AVP, an invalid AVPvalue; orvalue, the omission of a requiredAVP.AVP, the presence of an explicitly excluded AVP (see table 14.0), or the presence of two or more occurances of an AVP which table 14.0 restricts to 0, 1, or 0-1 occurances. 10.1.2 Failed-Command-Code AVP The Failed-Command-Code AVP (AVP Code 270) is of type Unsigned32 and contains the offending Command-Code that resulted in sending the Message-Reject-Ind message. 10.1.3 Failed-Vendor-Id AVP Calhoun et al. expires September 2001 [Page 42] Internet-Draft April 2001 The Failed-Command-Code-Vendor-Id AVP (AVP Code 262) is of type Unsigned32 and MUST be present if a vendor-specific Command-Code or AVP caused the error. 10.2 Result-Code AVP The Result-Code AVP (AVP Code 268) is of type Unsigned32 and indicates whether a particular request was completed successfully orCalhoun et al. expires August 2001 [Page 31] Internet-Draft March 2001whether an error occurred. All Diameter messages of type *-Response or *-Answer MUST include one Result-Code AVP, while messages of type -Ind MAY include the Result-Code AVP. A non-successful Result-Code AVP (one containing a non 2001 value) MUST include the Error- Reporting-FQDN AVP. The Result-Code data field contains an IANA-managed 32-bit address space representing errors (see section15.4).17.4). Diameter provides four different classes of errors, all identified by the thousands digit: - 1xxx (Informational) - 2xxx (Success) - 4xxx (Transient Failures) - 5xxx (Permanent Failure) A non-recognize class (one whose first digit is not defined in this section) MUST be handled as a permanent failure. 10.2.1 Informational Errors that fall within the Informational category are used to inform a requester that the request cannot be immediately satisfied and a further response will be issued in the near future. There are currently no errors that fall within this class. 10.2.2 Success Errors that fall within the Success category are used to inform a peer that a request has been successfully completed. DIAMETER_SUCCESS 2001 The Request was successfully completed. 10.2.4 Transient Failures Errors that fall within the transient failures category are used to inform a peer that the request could not be satisfied at the time it Calhoun et al. expires September 2001 [Page 43] Internet-Draft April 2001 was received, but MAY be able to satisfy the request in the future. DIAMETER_AUTHENTICATION_REJECTED 4001 The authentication process for the user failed, most likely due to an invalid password used by the user. Further attempts MUST only be tried after prompting the user for a new password. DIAMETER_NO_END_2_END_SECURITY 4002 A proxy has detected that end-to-end security has been appliedCalhoun et al. expires August 2001 [Page 32] Internet-Draft March 2001to portions of the Diameter message, and the proxy does not allow this security mode since it needs to alter the message by applying some local policies. DIAMETER_OUT_OF_SPACE 4003 A Diameter node received the accounting request but was unable to commit it to stable storage due to a temporary lack of space. 10.2.5 Permanent Failures Errors that fall within the permanent failures category are used to inform the peer that the request failed, and should not be attempted again. DIAMETER_USER_UNKNOWN 5001 A request was received for a user that is unknown, therefore authentication and/or authorization failed. DIAMETER_AVP_UNSUPPORTED 5002 The peer received a message that contained an AVP that is not recognized or supported and was marked with the Mandatory bit. A Diameter message with this error MUST contain one or more Failed-AVP AVP containing the AVPs that caused the failure. DIAMETER_UNKNOWN_SESSION_ID 5003 The request or response contained an unknown Session-Id. DIAMETER_AUTHORIZATION_REJECTED 5004 A request was received for which the user could not be authorized. This error could occur if the service requested is not permitted to the user. DIAMETER_INVALID_AVP_VALUE 5005 The request contained an AVP with an invalid value in its data portion. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP. DIAMETER_MISSING_AVP 5006 Calhoun et al. expires September 2001 [Page 44] Internet-Draft April 2001 The request did not contain an AVP that is required by the Command Code definition. If this value is sent in the Result- Code AVP, a Failed-AVP AVP SHOULD be included in the message. The data portion of the Failed-AVP MUST only contain the AVP Code of the missing AVP. DIAMETER_INVALID_CMS_DATA 5007 The Request did not contain a valid CMS-Data [11] AVP. DIAMETER_LOOP_DETECTED 5008 A Proxy or Redirect server detected a loop while trying to get the message to the Home Diameter server. Further attempts should not be attempted until the loop has been fixed.Calhoun et al. expires August 2001 [Page 33] Internet-Draft March 2001DIAMETER_AUTHORIZATION_FAILED 5009 A request was received for which the user could not be authorized at this time. This error could occur when the user has already expended allowed resources, or is only permitted to access services within a time period. DIAMETER_CONTRADICTING_AVPS 5010 The Home Diameter server has detected AVPs in the request that contradicted each other, andis not willing to provide service tois not willing to provide service to the user. One or more Failed-AVP AVPs MUST be present, containing the AVPs that contradicted each other. DIAMETER_AVP_NOT_ALLOWED 5011 A message was received with an AVP that MUST NOT be present. The Failed-AVP AVP MUST be included and contain theuser. One orAVP Code of the offending AVP. DIAMETER_AVP_OCCURS_TOO_MANY_TIMES 5012 A message was received that included an AVP that appeared more often than permitted in the message definition. The Failed-AVPAVPsAVP MUST bepresent, containingincluded and contain theAVPs that contradicted each other.AVP Code of the offending AVP. 10.3 Error-Message AVP The Error-Message AVP (AVP Code 281) is of type OctetString. It is a human readable UTF-8 character encoded string. It MAY accompany a Result-Code AVP as a human readable error message. The Error-Message AVP is not intended to be useful in real-time, and SHOULD NOT be expected to be parsed by network entities. 10.4 Error-Reporting-FQDN AVP Calhoun et al. expires September 2001 [Page 45] Internet-Draft April 2001 The Error-Reporting-FQDN AVP (AVP Code 294) is of type OctetString, encoded in the UTF-8 [24] format. This AVP contains the Network Access Identifier of the Diameter host that set the Result-Code AVP to a value other than 2001 (Success). This AVP is intended to be used for troubleshooting purposes, and MUST be set when the Result-Code AVP indicates a failure. 11.0 "User" Sessions When a user requests access to the network, a Diameter client issues an authentication and authorization request to its local server. The request contains a Session-Id AVP, which is used in subsequent messages (e.g. subsequent authorization, accounting, etc) relating to the user's session. The Session-Id AVP is a means for the client and servers to correlate a Diameter message with a user session. When a Diameter server authorizes a user to use network resources, it SHOULD add the Authorization-Lifetime AVP to the response. The Authorization-Lifetime AVP defines the maximum amount of time a user MAY make use of the resources before another authorization request is to be transmitted to the server. If the server does not receive another authorization request before the timeout occurs, it SHOULD release any state information related to the user's session. NoteCalhoun et al. expires August 2001 [Page 34] Internet-Draft March 2001that the Authorization-Lifetime AVP implies how long the Diameter server is willing to pay for the services rendered, therefore a Diameter client SHOULD NOT expect payment for services rendered past the session expiration time. The base protocol does not include any authorization request messages, since these are largely application-specific and are defined in a Diameter protocol extension document. However, the base protocol does define a set of messages that are used to terminate user sessions. These are used to allow servers that maintain state information to free resources. 11.1 Session State Machine This section contains a finite state machine, representing the life cycle of Diameter sessions, and MUST be observed by all Diameter implementations. The term Service-Specific below refers to a message defined in a Diameter extension (e.g. Mobile IP, NASREQ). Calhoun et al. expires September 2001 [Page 46] Internet-Draft April 2001 State Event Action New State----- ----- ------ ---------------------------------------------------------------------- Idle Client or Device Requests send serv. Pending access specific auth req Idle Service-Specific authorization send serv. Open request received, and specific successfully processed response Pending Successful Service-Specific Grant Open Authorization response Access received Open Authorization-Lifetime expires send serv. Open specific auth req Open Successful Service-Specific Extend Open Authorization response Access received Open Failed Service-Specific Discon. Closed Authorization response user/device received. Open Session-Timeout Expires on send STR DisconNAS Calhoun et al. expires August 2001 [Page 35] Internet-Draft March 2001Access Device Open STI Received send STR Discon Open Session-Timeout Expires on send STI Discon home AAA server Discon STI Received ignore Discon Discon STR ReceivedDiscon.Send STA Closeduser/deviceDiscon STA Received Discon. Closed user/device Closed Transition to state Cleanup When the Cleanup action is invoked, the Diameter node MAY attempt to release all resources for the particular session. Any event not listed above MUST be considered as an error condition, and a response, if applicable, MUST be returned to the originator of the message. Calhoun et al. expires September 2001 [Page 47] Internet-Draft April 2001 11.2 Session-Id AVP The Session-Id AVP (AVP Code 263) is of type OctetString and is used to identify a specific session (see section 11.0). The Session-Id data uses the UTF-8 [24] character set. All messages pertaining to a specific session MUST include only one Session-Id AVP and the same value MUST be used throughout the life of a session. When present, the Session-Id SHOULD appear immediately following the Diameter Header (see section 3.0). For messages that do not pertain to a specific session, multiple Session-Id AVPs MAY be present as long as they are encapsulated within an AVP of type Grouped. The Session-Id MUST be globally unique at any given time since it is used by the server to identify the session (or flow). The format of the session identifier SHOULD be as follows: <Sender's Origin-FQDN><sender's port number> <monotonically increasing 32 bit value><optional value> The monotonically increasing 32 bit value SHOULD NOT start at zero upon reboot, but rather start at a random value. This will minimize the possibility of overlapping Session-Ids after a reboot. Alternatively, an implementation MAY keep track of the increasing value in non-volatile memory. The optional value is implementationCalhoun et al. expires August 2001 [Page 36] Internet-Draft March 2001specific but may include a modem's device Id, a layer 2 address, timestamp, etc. The session Id is created by the Diameter device initiating the session, which in most cases is done by the client. Note that a Session-Id MAY be used by more than one extension (e.g. authentication for a specific service and accounting, both of which have separate extensions). 11.3 Authorization-Lifetime AVP The Authorization-Lifetime AVP (AVP Code 291) is of type Unsigned32 and contains the maximum number of seconds of service to be provided to the user before the user is to be re-authenticated and/or re- authorized. Great care should be taken when the Authorization- Lifetime value is determined, since a low value could create significant Diameter traffic, which could congest both the network and the servers. This AVP MAY be provided by the client as a hint of the maximum duration that it is willing to accept. However, the server DOES NOT Calhoun et al. expires September 2001 [Page 48] Internet-Draft April 2001 have to observe the hint, and MAY return a value that is smaller than the hint. A value of zero means that no re-authorization is required. 11.4 Session-Timeout AVP The Session-Timeout AVP (AVP Code 27) [1] is of type Unsigned32 and contains the maximum number of seconds of service to be provided to the user before termination of the session. A value of zero means that this session has an unlimited number of seconds before termination. This AVP MAY be provided by the client as a hint of the maximum duration that it is willing to accept. However, the server DOES NOT have to observe the hint, and MAY return a value that is smaller than the hint. 11.5 User-Name AVP The User-Name AVP (AVP Code 1) [1] is of type OctetString, which contains the User-Name. The value is represented as a UTF-8 character encoded string in a format consistent with the NAI specification [8].Calhoun et al. expires August 2001 [Page 37] Internet-Draft March 200111.6 Max-Wait-Time AVP The Max-Wait-Time AVP (AVP Code 295) is of type Unsigned32, and contains the maximum amount of time the downstream server is willing to wait for a response. A server that determines that it cannot satisfy a request within the requested time MUST issue a DSI message with the DSI-Event set to DIAMETER_STILL_WORKING or DIAMETER_CANNOT_PROCESS_IN_TIME. 11.7 Original-Session-Id AVP The Original-Session-Id AVP (AVP Code 261) is of type OctetString and MAY be sent in a message of type Response or Answer if the Home AAA server already has a session identifier for the user, and wishes to keep the existing Session-Id. All further messages from the Access Device for this session MUST use the session identifier in this AVP. This shouldn't be viewed as a new session, but rather renaming the old session. 11.8 Session Termination Calhoun et al. expires September 2001 [Page 49] Internet-Draft April 2001 The Diameter Base Protocol provides a set of messages that MUST be used by any peer to explicitly request that a previously authenticated and/or authorized session be terminated. Since the Session-Id is typically tied to a particular service (i.e. Mobile IP, NASREQ, etc), the session termination messages are used to request that the service tied to the Session Id be terminated.11.7.111.8.1 Session-Termination-Ind The Session-Termination-Ind (STI), indicated by the Command-Code set to 274, MAY be sent by any Diameter entity to the access device to request that a particular session be terminated. This message MAY be used when a server detects that a session MUST be terminated, which is typically done as a policy decision (e.g. local resources have been expended, etc). The Destination-FQDN AVP MUST be present, and contain theNAIfully qualified domain name of the access device that initiated the session (see section 11.0). Upon receipt of the STI message, the access device SHOULD issue a Session-Terminate-Request message. Message Format <Session-Termination-Ind> ::= < Diameter Header: 274 > < Session-Id > { Origin-FQDN } { Origin-Realm } { User-Name } { Destination-Realm } { Destination-FQDN } * [ AVP ] * [ Proxy-State ]0*1< Integrity-Check-Value > Calhoun et al. expires August 2001 [Page 38] Internet-Draft March 2001 11.7.211.8.2 Session-Termination-Request The Session-Termination-Request (STR), indicated by the Command-Code set to 275, is sent by the access device to inform the Diameter Server that an authenticated and/or authorized session is being terminated. Message Format Calhoun et al. expires September 2001 [Page 50] Internet-Draft April 2001 <Session-Termination-Request> ::= < Diameter Header: 275 > < Session-Id > { Origin-FQDN } { Origin-Realm } { User-Name } { Destination-Realm } { Destination-FQDN } * [ AVP ] * [ Proxy-State ] * [ Route-Record ]0*1< Integrity-Check-Value > 11.7.311.8.3 Session-Termination-Answer The Session-Termination-Answer (STA), indicated by the Command-Code set to 276, is sent by the Diameter Server to acknowledge that the session has been terminated. The Result-Code AVP MUST be present, and MAY contain an indication that an error occurred while servicing the STR. Upon sending or receipt of the STA, the Diameter Server MUST release all resources for the session indicated by the Session-Id AVP. Any intermediate server in the Proxy-Chain MAY also release any resources, if necessary. Message Format <Session-Termination-Answer> ::= < Diameter Header: 276 > < Session-Id > { Result-Code } { Origin-FQDN } { Origin-Realm } { Destination-FQDN } { User-Name }{ Destination-Realm }* [ AVP ] * [ Proxy-State ] * [ Route-Record ]0*1< Integrity-Check-Value > Calhoun et al. expires August 2001 [Page 39] Internet-Draft March 200112.0 Message Routing This section describes the expected behavior of a Diameter server acting as a proxy or redirect server. 12.1 Realm-Based Message Routing Diameter request, query and indication message routing is done Calhoun et al. expires September 2001 [Page 51] Internet-Draft April 2001 through the use of the realm portion of the Network Access Identifier(NAI),(NAI) or via a realm encoded in an AVP (e.g. Origin-Realm, Destination-Realm), and an associated realm routing table (see section 12.1.1).TheWhen an NAIhas a formatis used, the realm portion ofuser@realm, andthe user@realm is used to perform the realm lookup. 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. Figure 2 depicts an example where DIA1 receives a request to authenticate user "joe@abc.com". DIA1 looks up "abc.com" in its local realm route table and determines that the message must be proxied to DIA2. DIA2 does the same check, and proxies the message to DIA3. DIA3 checks its realm route table, and determines that the realm is locally supported, and processes the authentication request, and returns the response. How the response actually makes it back to the sender of the original request is described in the 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)(Route-Record=dia1.mno.net) (Route-Record=dia1.mno.net) (Route-Record=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)(Route-Record=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.Calhoun et al. expires August 2001 [Page 40] Internet-Draft March 200112.1.1 Realm-Based Routing Table All Realm-Based routing lookups are performed against what is commonly known as the Domain Routing Table (see section17.0).19.0). A Domain Routing Table Entry contains the following fields: Calhoun et al. expires September 2001 [Page 52] Internet-Draft April 2001 - Domain Name. The Domain Name is analogous to the realm portion of the NAI. This is the field that is typically used as a primary key in the routing table lookups. Note that some implementations perform their lookups based on longest-match- from-the-right on the realm rather than requiring an exact match. - Extension Id. It is possible for a routing entry to have a different destination based on the extension identifier of the message. This field is typically used as a secondary key field in routing table lookups. - Local Action. The Local Action field is used to identify how a message should be treated. The following actions are supported: 1. LOCAL - Diameter messages that resolve to a routing entry with the Local Action set to Local can be satisfied locally, and do not need to be forwarded to another server. 2. PROXY - All Diameter messages that fall within this category MUST be forwarded to a next hop server. The local server MAY apply its local policies to the message by including new AVPs to the message prior to forwarding. See section 12.4 for more information. 3. REDIRECT - Diameter messages that fall within this category MUST have the identity of the home Diameter server(s) appended, and returned to the sender of the message. See section 12.3 for more information. - Server Identifier - One or more servers the message is to be forwarded to. When the Local Action is set to PROXY, this field contains the identities of the server(s) 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 200112.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 Calhoun et al. expires September 2001 [Page 53] Internet-Draft April 2001 in the following order: 1. If the Destination-FQDN AVP is present, and the host specified in the AVP can be directly contacted, the message is forwarded to the host (see section8.15.1 for more information), or 2. If the Destination-Realm AVP is present, a routing table lookup is performed using the domain specific in the AVP. A message that does not contain any of the above AVPs MUST NOT be routed. If the message in question cannot be handled locally, a Message-Reject-Ind is sent with the Result-Code AVP set to an appropriate error condition. 12.3 Redirect Server A Redirect Server is one that providesNAIRealm to Diameter Home Server address resolution. When a message is received by a peer, the Destination-Realm AVP (or the User-Name AVP if the Destination-Realm AVP is not present) is extracted from the message, and is used to perform a lookup in the domain routing table. Implementations MAY also use theExtension IdExtension-Id as a secondary key in the domain routing table lookup. Successful routing table lookups will return one or more home Diameter servers that could satisfy the message. The home servers are encoded in one or more Redirect-Host AVPs, and the Command-Code field is set to Device-Status-Ind. +------------------+ | Diameter | | Redirect Server | +------------------+ ^ | Request | | DSI + joe@xyz.com | | DSI-Event = Redirect + | | Redirect-Host AVP(s) | v +----------+ Request +----------+ | abc.net |------------->| xyz.net | | Diameter | | Diameter | | Server |<-------------| Server | +----------+ Response +----------+ Figure 3: Diameter Redirect ServerCalhoun et al. expires August 2001 [Page 42] Internet-Draft March 2001Lastly, the DSI-Event AVP is added with the Data field of the AVP set to 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 Calhoun et al. expires September 2001 [Page 54] Internet-Draft April 2001 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. 12.3.1 Redirect-Host AVP The Redirect-Host AVP (AVP Code 292) is of type Grouped and is found in Device-Status-Ind messages that include the DSI-Event AVP set to DIAMETER_REDIRECT_REQUEST. This AVP only needs to be used if the host the message is to be redirected to is not listening on the standard Diameter port. Its Data field has the following ABNF grammar: Redirect-Host = Redirect-Host-Address Redirect-Host-Port Redirect-Host-Address = ; See Section 12.3.2 Redirect-Host-Port = ; See Section 12.3.3 The Redirect-Host-Address AVP Data field contains the IP Address of the Diameter host to which the request MUST be redirected. The Redirect-Host-Port contains the port number to which the request should be sent. Upon receipt of such a event, and this AVP, the receiving host SHOULD send the request directly to the host identified by the Redirect-Host-Address AVP. +---------------------------------------------------------------+ | AVP Header (AVP Code = 292) | +---------------------------------------------------------------+ | Redirect-Host-Address AVP | +---------------------------------------------------------------+ | Redirect-Host-Port AVP | +---------------------------------------------------------------+ 12.3.2 Redirect-Host-Address AVP The Redirect-Host-Address AVP (AVP Code 278) is of type Address. Its use is described in Section 12.3.1. 12.3.3 Redirect-Host-Port AVP The Redirect-Host-Port AVP (AVP Code 277) is of type Unsigned32. Its use is described in Section 12.3.1.Calhoun et al. expires August 2001 [Page 43] Internet-Draft March 200112.4 Proxy Server This section outlines the processing rules for Diameter proxy servers. A proxy server can either be stateful or stateless. A Proxy Calhoun et al. expires September 2001 [Page 55] Internet-Draft April 2001 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 maintaintransaction, norsession state, but MUST maintain transaction state.It freesTransaction state SHOULD be released after a request's corresponding response has been forwarded towards themessages sent once acknowledgements are receivedrecipient, and has been acknowledged by thetransport layer.underlying transport. A stateful proxycan be viewed as a Diameter Server upon receiving a request,is one that maintains both transaction andas a Client when forwardingsession state, themessage. For all intents and purposes, stateful servers terminate an upstream "session",latter being done by observing request andinitiatesresponses. Session state SHOULD be released once it is informed that adownstream "session" (see Figure 4), anduser and/or device has relinquished access. A stateful server MAY provide the following features: - Protocol translation (e.g. RADIUS <-> Diameter) - Limiting resources authorized to a particular user - Per user or transaction auditing+--------+ +-----------------+ +--------+ | Client | --------> | Server | Client | -------> | Server | +--------+ +-----------------+ +--------+ Figure 4 - ExampleHome servers processing requests that include the Route-Record and/or the Proxy-State AVPs MUST return these AVPs in the same order in the corresponding response. 12.4.1 Proxying Requests In addition to the rules defined in section 12.2, the following procedures MUST be handled by proxy servers handling messages ofStateful Proxytype request, query or indication. Astatefulproxythat maintains transaction state SHOULD release transaction information afterserver MUST check for forwarding loops before proxying arequest's corresponding responsemessage of type Request, Query or Indication. Such as message has beenforwarded towardslooped if therecipient,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 andhas been acknowledged byensure that the host identified in the AVP is the same as the sender of the message. Calhoun et al. expires September 2001 [Page 56] Internet-Draft April 2001 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, if theunderlying transport. A stateful proxy that maintains session state SHOULD releasevalue of thesession state once itfield isinformed thatchanged, with auser and/or device has relinquished access. Home servers processing requests that include the Route-Record and/orlocally unique value. The saved identifier MAY be encoded in the Proxy-StateAVPs MUST return these AVPsAVP, and will be required in thesame order inprocessing of the corresponding response.Calhoun et al. expires August 2001 [Page 44] Internet-Draft March 2001 12.4.112.4.2 ProxyingRequests In addition to the rules defined in section 12.2, the following procedures MUST be handled by proxy servers handling messages of type request, query or indication.Responses A proxy server MUSTcheck for forwarding loops before proxying a messageonly process messges of typeRequest, QueryResponse orIndication. Such asAnswer 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 messagehas been looped ifbefore it is forwarded to theserver finds its own address in anext hop, which is identified by the second to last Route-Record AVP.AIf the last Proxy-State AVP in the message is targeted to the local Diameter server, the AVP MUST be removed. If a proxy serverthat proxiesreceives amessage or type Request, Query or Indication MUST appendresponse with aRoute-Record AVP, which includes its identity. Diameter Servers that receive messagesResult-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. Prior to forwarding the response, proxy servers MUSTvalidaterestore thelastoriginal value of the Diameter header's Hop-by-Hop Identifier field. 12.4.3 Route-Record AVP The Route-Record AVP (AVP Code 282) is of type OctetString, encoded in themessageUTF-8 [24] format, andensure thatcontains thehost identified inFully Qualified Domain Name of the Proxy appending this AVPisto a Diameter message. The FQDN added in this AVP MUST be the same as thesender ofFQDN sent in themessage. A Proxy Server MAY also includeOrigin- FQDN in the Device-Reboot-Ind message. 12.4.4 Proxy-State AVPin a message of type Request or Query, which is used to encode local state information.The Proxy-State AVP (AVP Code = 33) isguaranteed to be present inof type Grouped. The Grouped Data field has thecorresponding response.following ABNF grammar: Calhoun et al. expires September 2001 [Page 57] Internet-Draft April 2001 Proxy-State = Proxy-Address Proxy-Info Proxy-Address = ; See Section 12.4.5 Proxy-Info = ; See Section 12.4.6 Themessage is then forwarded toProxy-Address AVP Data field contains one of thedownstream Diameter server, as identified inIP addresses of theDomain Routing Table. Proxy Server MUST savesystem that created theHop-by-Hop IdentifierAVP. This assists hosts inrequest messages, ifdetermining whether a Proxy-State AVP is intended for thevaluelocal host. The Proxy- Info AVP contains state information, and MUST be treated as opaque data. +---------------------------------------------------------------+ | AVP Header (AVP Code = 33) | +---------------------------------------------------------------+ | Proxy-Address AVP | +---------------------------------------------------------------+ | Proxy-Info AVP | +---------------------------------------------------------------+ 12.4.5 Proxy-Address AVP The Proxy-Address AVP (AVP Code = 280) is of type Address. Its use is described in Section 12.4.4. 12.4.6 Proxy-Info AVP The Proxy-Info AVP (AVP Code = 284) is ofthe fieldtype OctetString. Its use ischanged, with a locally unique value.described in Section 12.4.4. 12.4.7 Destination-Realm AVP Thesaved identifier MAY beDestination-Realm AVP (AVP Code 283) is of type OctetString, encoded in theProxy-State AVP,UTF-8 [24] format, andwillcontains the realm the message is to berequiredrouted to. The Destination-Realm AVP MUST NOT be present in messages of type Answer of Reply. Diameter Clients insert theprocessingrealm portion of thecorresponding response. 12.4.2 Proxying Responses A proxy server MUST only process messgesUser-Name AVP. Home servers initiating a message of typeResponseRequest, Query orAnswer whose last Route-Record AVP matches oneIndication use the value ofits addresses. Any responses that do not conform to this rule MUST be dropped. The last Route-Recordthe Origin-Realm AVPMUST be removedfromthea previous messagebeforereceived from the intended target host (unless it isforwarded toknown a priori). When present, thenext hop, whichDestination-Realm AVP isidentifiedused to perform message routing decisions. 12.5 Applying Local Policies Proxies MAY apply local access policies to Diameter requests, or responses, by adding, changing or deleting AVPs in thesecondmessages. Calhoun et al. expires September 2001 [Page 58] Internet-Draft April 2001 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 tolast Route-Record AVP. If the last Proxy-State AVP inthe messageis targetedMUST 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 localDiameter server,policy. In theAVP MUST be removed. If a proxyevent that the Home Diameter server receives aresponserequest with contradictory information (possibly due to some proxy adding aResult-Code AVP indicating a failure,local policy), itMUST NOT modifyMAY accept thecontents oflatest AVP, or MAY return theAVP. Any additional local errors detected SHOULD be logged, but not reflected inresponse with the Result-CodeAVP. Calhoun et al. expires August 2001 [Page 45] Internet-Draft March 2001 PriorAVP set to DIAMETER_CONTRADICTING_AVPS. However, a NAS receiving a response that contains contradictory information SHOULD reject service toforwardingtheresponse, proxyuser. 12.6 Hiding Network Topology Stateful proxies forwarding requests to serversMUST restore the original valueoutside of their administrative domain MAY hide theDiameter header's Hop-by-Hop Identifier field. 12.4.3 Route-Record AVP Theinternal network topology. Servers perform this by removing all Route-RecordAVP (AVP Code 282) is of type OctetString, encodedAVPs in theUTF-8 [24] format,message, andcontainsmaintains theFully Qualified Domain Name ofRoute-Record AVPs to add to theProxy appending thiscorresponding response. Such stateful servers MUST still add their own Route-Record AVP to the request prior to forwarding. 12.7 Loop Detection When a Diametermessage. 12.4.4 Proxy-State AVP The Proxy-State AVP (AVP Code = 33) isProxy or Redirect server receives a message of typeGrouped. The Grouped Data field hasRequest, Query or Indication, it MUST examine all Route-Record AVPs in thefollowing ABNF grammar: Proxy-State = Proxy-Address Proxy-Info Proxy-Address = ; See Section 12.4.5 Proxy-Info = ; See Section 12.4.6 The Proxy-Addressmessage to determine whether such an AVPData field contains one ofalready exists with theIP addresseslocal server's identity. If an AVP with the local host's identity is found in the request, it is an indication that the message is being looped through the same set of proxies. When such an event occurs, thesystemDiameter server thatcreateddetects theAVP. This assists hosts in determining whetherloop returns aProxy-State AVP is intended forresponse with thelocal host. The Proxy- Info AVP contains state information, and MUST be treated as opaque data. +---------------------------------------------------------------+ | AVP Header (AVP Code = 33) | +---------------------------------------------------------------+ | Proxy-Address AVP | +---------------------------------------------------------------+ | Proxy-Info AVP | +---------------------------------------------------------------+ 12.4.5 Proxy-Address AVP The Proxy-AddressResult-Code AVP(AVP Code = 280)set to DIAMETER_LOOP_DETECTED. 13.0 Accounting This accounting protocol is based on an authorization-server directed model with capabilities for real-time delivery oftype Address. Its use is describedaccounting information. Several fault resilience methods [40] have been built inSection 12.4.4. 12.4.6 Proxy-Info AVP The Proxy-Info AVP (AVP Code = 284) isto the protocol in order minimize loss oftype OctetString. Its use is describedaccounting data inSection 12.4.4. 12.4.7 Destination-Realm AVPvarious fault situations and under different assumptions about the Calhoun et al. expiresAugustSeptember 2001 [Page46]59] Internet-DraftMarchApril 2001 capabilities of the used devices. 13.1 Authorization-Server Directed Model The authorization-server directed model means that at authorization time, the device generating the accounting data gets information from the authorization server regarding the way accounting data shall be forwarded. This information includes accounting record timeliness requirements. As discussed in [40], real-time transfer of accounting records is a requirement, such as the need to perform credit limit checks and fraud detection. Note that batch accounting is not a requirement, and is therefore not supported by this extension. Should Batched Accounting be required in the future, a new Diameter extension will need to be created, or it could be handled using another protocol. TheDestination-Realm AVP (AVP Code 283) isauthorization server (chain) directs the selection of proper transfer strategy, based on its knowledge oftype OctetString, encoded intheUTF-8 [24] format,user andcontains the realmrelationships of roaming partnerships. The server (or proxies in between) uses themessage isAccounting-Interim-Interval AVP tobe routed to. Diameter Clients insertcontrol therealm portionoperation of theUser-NameDiameter peer operating as a client. The Accounting-Interim-Interval AVP,while home servers insertwhen present, instructs thevalue ofDiameter node acting as a client to produce accounting records continuously even during a session. 13.2 Protocol Messages A Diameter node that receives a successful authentication and/or authorization messages from theOrigin- Realm AVP into this AVP. When present,Home AAA Server, MUST collect accounting information for theDestination-Realm AVPsession. The Accounting-Request message is used toperform message routing decisions. 12.5 Applying Local Policies Proxies MAY apply local access policiestransmit the accounting information toDiameter requests, or responses, by adding, changing or deleting AVPs inthemessages. Proxies that apply local policiesHome AAA server, which MUSTNOT allow end-to-end security on any messagesreply with the Accounting-Answer message to confirm reception. The Accounting-Answer message includes the Result-Code AVP, which MAY indicate thattraverse through it, unless security is terminated locally.an error was present in the accounting message. Aproxy wishingrejected Accounting-Request message SHOULD cause the user's session tomodify abe terminated. Each Diameter Accounting protocol message MAY be compressed using IPComp [41] in order toenforce some local policy that detectsreduce the used network bandwidth, which MAY use IKE [15] to negotiate the compression parameters. 13.3 Extension document requirements Each Service-Specific Diameter extension (e.g. NASREQ, MobileIP), Calhoun et al. expires September 2001 [Page 60] Internet-Draft April 2001 MUST define their Service-Specific AVPs thatend-to-end security has been applied toMUST be present in the Accounting-Request messageMUST returnin aresponse to the originator withsection entitled "Accounting AVPs". The extension MUST assume that theResult-Code setAVPs described in this document will be present in all Accounting messages, so only their respective service-specific AVPs need toDIAMETER_NO_END_2_END_SECURITY. The originatorbe defined in this section. 13.4 Fault Resilience Diameter Base protocol mechanisms are used to overcome small message loss and network faults of temporary nature. Diameter peers acting as clients MUST implement therequest MAY re-issueuse of failover to guard against server failures and certain network failures. Diameter peers acting as servers or related off-line processing systems MUST detect duplicate accounting records caused by therequest with no end-to-end security if it falls within its local policy. Insending of same record to several servers and duplication of messages in transit. This detection MUST be based on theevent thatinspection of theHomeSession-Id and Accounting-Record-Number AVP pairs. Diameterserver receives a request with contradictory information (possibly due to some proxy adding a local policy), itclients MAYaccepthave non-volatile memory for thelatest AVP,safe storage of accounting records over reboots orMAY returnextended network failures, network partitions, and server failures. If such memory is available theresponse withclient SHOULD store new accounting records there as soon as theResult-Code AVP set to DIAMETER_CONTRADICTING_AVPS. However,records are created and until aNAS receivingpositive acknowledgement of their reception from the Diameter Server has been received. Upon aresponse that contains contradictory information SHOULD reject service toreboot, theuser. 12.6 Hiding Network Topology Stateful proxies forwarding requestsclient MUST starting sending the records in the non-volatile memory toservers outside of their administrative domain MAY hidetheinternal network topology. Servers perform this by removing all Route-Record AVPsaccounting server with appropriate modifications inthe message,termination cause, session length, andmaintainsother relevant information in theRoute-Recordrecords. A further extension of this protocol may include AVPs toadd tocontrol how many accounting records may at most be stored in thecorresponding response. Such stateful servers MUST still add their own Route-Record AVPDiameter client without committing them to therequest priornon-volatile memory or transferring them toforwarding. 12.7 Loop Detection When athe DiameterProxy or Redirect server receives a messageserver. The client SHOULD NOT remove the accounting data from any oftype Request, Queryits memory areas before the correct Accounting-Answer has been received. The client MAY remove oldest, undelivered orIndication,yet unacknowledged accounting data if itMUST examine all Route-Record AVPs in the message to determine whetherruns out of resources such as memory. It is anAVP already exists withimplementation dependent matter for thelocal server's identity. If an AVP withclient to accept new sessions under this condition. 13.5 Session Records In all accounting records thelocal host's identitySession-Id and User-Name AVPs MUST be present. If strong authentication isfoundrequired, as described inthe request, it is an indication that the message is[11], Calhoun et al. expiresAugustSeptember 2001 [Page47]61] Internet-DraftMarchApril 2001being looped throughthesame setCMS-Data AVP may be used to authenticate the Accounting Data and Service Specific AVPs. It is not typically necessary, nor recommended, that the strong authentication cover any additional AVPs since the Data and Service Specific AVP, and associated CMS-Data, MAY need to be submitted to a third party. Different types ofproxies. When such ansession records are sent depending on the actual type of accounted service and the authorization server's directions for interim accounting. If the accounted service is a one-time event, meaning that the start and stop of the eventoccurs,are simultaneous, then the Accounting-Record-Type AVP MUST be present and set to theDiameter server that detectsvalue EVENT_RECORD. If theloop returnsaccounted service is of aresponse withmeasurable length, then theResult-CodeAVPsetMUST use the values START_RECORD, STOP_RECORD, and possibly, INTERIM_RECORD. If the authorization server has directed interim accounting toDIAMETER_LOOP_DETECTED. 13.0 Diameter Message Security The Diameter Base protocol MAYbesecured in one of three ways. The first method does not involve any security mechanisms inenabled for theDiameter protocol,session, butrelies on an underlying security mechanism, such as IP Security. The second method is hop-by-hop security, which SHOULDno interim interval was specified, two accounting records MUST besupported by all Diameter implementations. The third methodgenerated for each service of type session. When the initial Accounting-Request isoptional and requiressent for aPublic Key Infrastructure [14], andgiven session isdocumented in [11]. 13.1 Hop-by-Hop Security Diameter Hop-by-Hop security provides message integrity and persent, the Accounting-Record-Type AVPencryption, and requires thatMUST be set to thecommunicating entities have a pre- configured shared secret. Hop-by-Hop securityvalue START_RECORD. When the last Accounting-Request isvery difficult to deploy and administer in large scale networks and involves symmetric trust, unlike security based onsent, the value MUST be STOP_RECORD. If apublic key infrastructure (PKI). PKI is used forspecified interim interval exists, the DiameterEnd-to-End security,client MUST produce additional records between the START_RECORD and STOP_RECORD, marked INTERIM_RECORD. The production of these records isdefined in [11]. Hop-by-Hop security may be desirable in environments where symmetric cryptography is sufficientdirected both by Accounting-Interim-Interval as well as any re-authentication orwhenre-authorization of the session. The Diameter client MUST overwrite any previous interim accounting records that are locally stored for delivery, if aPKInew record isnot available. Figure 5 below provides an example of hop-by-hop security inbeing generated for the same session. This ensures that only one pending interim record can exist on aproxy chain. AssumingNAS for any given session. 14.0 Accounting Command-Codes This section defines new Command-Code values that MUST be supported by all Diameter implementations thatthe packet was receivedprovide Accounting services. 14.1 Accounting-Request (ACR) Command The Accounting-Request command, indicated byDIA2 from DIA1, and wasthe Command-Code field set tobe proxied271, is sent by a Diameter node, acting as a client, in order toDIA3, 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 sharedexchange accounting information withDIA3. 4. Computing the message hash usinga peer. When thesecret shared with DIA3, and adding itAccounting-Request is being submitted to a broker, and includes theICVCMS-Data AVPin[11], theDiameter message. (Shared-Secret-1) (Shared-Secret-2) +------+ -----> +------+ ------> +------+ | | |1 3| | | | DIA1 +------------------>+ DIA2 +------------------>+ DIA3 | | | |2 4| | | +------+ +------+ +------+ Figure 5: Hop-by-Hop Security in Proxy EnvironmentsCMS-Data AVP MUST be signed by Calhoun et al. expiresAugustSeptember 2001 [Page48]62] Internet-DraftMarchApril 2001The above steps that each proxy MUST perform in a proxy chain clearly describesboth thesecurity issues associated with hop-by-hop security in a proxy environment. Sincelocal and home Diameter server using themessage integrity is re-computed at each nodecountersignature procedures described inthe chain, it is not possible to detect if a proxy modified information[11]. The AVP listed below SHOULD include service specific accounting AVPs, as described in section 13.3. Message Format <Accounting-Request> ::= < Diameter Header: 271 > < Session-Id > { Extension-Id } { User-Name } { Origin-FQDN } { Origin-Realm } { Destination-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Accounting-Interim-Interval ] { Accounting-Session-Id } * [ AVP ] [ CMS-Data ] * [ Proxy-State ] * [ Route-Record ] 14.2 Accounting-Answer (ACA) Command The Accounting-Answer command, indicated by themessage (e.g. session time). Furthermore, any sensitive information would be knownCommand-Code field set toall proxies in272, is used to acknowledge an Accounting-Request command. The Accounting-Answer command contains thechain, since each node must decrypt AVPs. Therefore, Anysame Session-Id and MAY contains the same Accounting Description and Usage AVPs thatcontain data that MUST NOT be seen by intermediate Diameter nodes MUST be protected viawere sent in themechanism describedAccounting-Request command. If the CMS-Data AVP was present in thestrong security extension [11]. It is highly recommended thatAccounting-Request, thesize ofcorresponding ACA message MUST include theshared secrets used be sufficiently long (e.g. 128 bits), and that different shared secrets be used for both authentication and encryption. 13.1.1 Integrity-Check-ValueCMS-Data AVPThe Integrity-Check-Valuesigned by the responder to provide strong AVP(AVP Code 259) is of type Grouped and isauthentication, which MAY be used forhop-by-hop message authentication and integrity. Thethe purposes of repudiation. Only the target Diameterheader as wellServer, known asall AVPs (including padding) up totheDigesthome Diameter Server, SHOULD respond with the Accounting-Answer command. The AVPis protectedlisted below SHOULD include service specific accounting AVPs, as described in section 13.3. Calhoun et al. expires September 2001 [Page 63] Internet-Draft April 2001 Message Format <Accounting-Answer> ::= < Diameter Header: 272 > < Session-Id > { Extension-Id } { User-Name } { Result-Code } { Origin-FQDN } { Origin-Realm } { Accounting-Record-Type } { Accounting-Record-Number } { Accounting-Session-Id } [ Error-Reporting-FQDN ] [ Accounting-Interim-Interval ] * [ AVP ] [ CMS-Data ] * [ Proxy-State ] * [ Route-Record ] 14.3 Accounting-Status-Ind (ASI) Command The Accounting-Status-Ind command, indicated by theIntegrity-Check-Value AVP. Note that the Message LengthCommand-Code fieldin the Diameter header MUST beset tozero (0) prior279, is sent by a Diameter node in order to inform its peer of whether Accounting messages will be sent in theICV calculation. The Timestamp AVP provides replay protection andfuture. A Diameter node that is about to be taken out of service SHOULD issue an Accounting-Status-Ind message, with theNonceAccounting-State AVPprovides randomness. If present, any AVPs in a messageset to DISABLED. A Diameter node that detected that it isnot succeeded byable to issue Accounting messages MUST issue an Accounting-Status-Ind message, with theIntegrity-Check-ValueAccounting-State AVPMUST be ignored. Allset to ENABLED. Message Format <Accounting-Status-Ind> ::= < Diameterimplementations SHOULD support this AVP. The Integrity-Check-ValueHeader: 279 > { Extension-Id } { Origin-FQDN } { Origin-Realm } { Destination-Realm } { Accounting-State } * [ AVP(AVP Code = 259) is of type Grouped.] * [ Proxy-State ] * [ Route-Record ] 14.4 Accounting-Poll-Ind (API) Command Thegrammar forAccounting-Poll-Ind command, indicated by thegrouped DataCommand-Code field set to 273, isdefined is: Integrity-Check-Value = Nonce Time Auth-Trans-Id Key-ID Digest Nonce = ; Nonce, See Section 13.2 Timestamp = ; Timestamp, See Section 13.3 Auth-Trans-Id = ; Authentication-Transform-Id, / ; See Section 13.1.1.1 Key-ID = ; Key-ID, See Section 13.4 Digest = ; Digest, See Section 13.1.1.2sent by a Diameter Server in order to force the peer Calhoun et al. expiresAugustSeptember 2001 [Page49]64] Internet-DraftMarchApril 2001+---------------------------------------------------------------+ | AVP Header (AVP Code = 259) | +---------------------------------------------------------------+ | Nonce AVP | +---------------------------------------------------------------+ | Timestamp AVP | +---------------------------------------------------------------+ | Authentication-Transform-Id AVP | +---------------------------------------------------------------+ | Key-ID AVP | +---------------------------------------------------------------+ | Digest AVP | +---------------------------------------------------------------+ 13.1.1.1 Authentication-Transform-Id AVP The Transform-Id AVP (AVP Code = 285) is of type Unsigned32. This value identifies the transform that was usedtocompute 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. Allsend current accounting data. This data MUST include not yet sent accounting records from completed sessions, as well as INTERIM_RECORD records from all ongoing sessions. Diameter implementationssupporting this AVP MUSTMAY supportthis transform. Using the example code provided in [6],thefollowing call would be usedAccounting-Poll-Ind command. An implementation still conforms togenerate the Digest AVP: hmac_md5(DiameterMessage, MessageLength, Secret, Secretlength, Output) where the DiameterMessagethis specification if API is not supported. The receiver MUST use thecomplete message upAccounting-Request command to send theDigest AVP. 13.1.1.2 Digest AVPaccounting data. TheDigest AVP (AVP Code = 287) isuse oftype OctetString. This value contains the output from the hashing algorithm, covering all AVPsAccounting-Poll-Ind is useful in situations where a Diameter server comes up after an unscheduled downtime, and wishes to synchronize with themessage, including all AVPs inclient(s) sooner than at theIntegrity-Check-Value AVP up to, but not including,end of theDigest AVP. 13.1.2 Encrypted-Payload AVPnext INTERIM_RECORD or at the end of a session. Warning: TheEncrypted-Payload AVP (AVP Code 260) isuse oftype Grouped andthe Accounting-Poll-Ind message isused to encapsulate encrypted AVPs for privacy during transmission. Calhoun et al. expires August 2001 [Page 50] Internet-Draft March 2001 Hop-by-Hop confidentialitydiscouraged in roaming networks, since it isachieved by encapsulating all AVPs which areunfeasible for a server tobe encrypted into an Encrypted-Payload AVP. This feature SHOULD be supported byattempt to poll all of it's roaming partner's Diameterimplementations. The grammar for the grouped Data field is defined is: Encrypted-Payload = Enc-Trans-Id Key-ID ptextlen data Enc-Trans-Id = ; Encryption-Transform-Id, / ; See Section 13.1.2.1 Key-ID = ; See Section 13.4 ptextlen = ; Plaintext-Data-Length, See Section 13.1.2.2 data = ; Encrypted-Data, See Section 13.1.2.3 +---------------------------------------------------------------+ | AVP Header (AVP Code = 260) | +---------------------------------------------------------------+ | Encryption-Transform-Id AVP | +---------------------------------------------------------------+ | Key-ID AVP | +---------------------------------------------------------------+ | Plaintext-Data-Length AVP | +---------------------------------------------------------------+ | Encrypted-Datapeers. Message Format <Accounting-Poll-Ind> ::= < Diameter Header: 273 > < Session-Id > { Extension-Id } { Destination-FQDN } { Origin-FQDN } { Origin-Realm } { Destination-Realm } { Accounting-Session-Id } [ Destination-FQDN ] * [ AVP| +---------------------------------------------------------------+ 13.1.2.1 Encryption-Transform-Id] * [ Proxy-State ] * [ Route-Record ] 15.0 Accounting AVPs This section contains AVPs that describe accounting usage information related to a specific session. 15.1 Accounting-Record-Type AVP TheEncryption-Transform-IdAccounting-Record-Type AVP (AVP Code= 288)480) is of typeUnsigned32. This AVP identifies the transform that was used to encrypt the data contained inUnsigned32 and contains theEncrypted-Data AVP.type of accounting record being sent. The following values are currently definedin this document: MD5 1 See section 13.1.2.1.1formore information. 13.1.2.1.1 MD5 Payload Hiding The plain text (which is a buffer containing one or more AVPs)the Accounting-Record-Type AVP: Calhoun et al. expires September 2001 [Page 65] Internet-Draft April 2001 EVENT_RECORD 1 An Accounting Event Record isfirst paddedused to indicate that asixteen (16) byte boundary with 0 bytes. Sinceone-time event has occurred (meaning that theencapsulated AVPs have length fields, itstart and end of the event are simultaneous). This record contains all information relevant to the service, and ispossiblethe only record of the service. START_RECORD 2 An Accounting Start, Interim, and Stop Records are used todetect their boundaries, whether or not paddingindicate that a service of a measurable length has beendone. One or more Nonce AVPs MUST precede an Encrypted-Payload AVP.given. AnMD5 hashAccounting Start Record isperformed on the: - last Nonce AVP which precedesused to initiate an accounting session, and contains accounting information that is relevant to theEncrypted-Payload AVP Calhoun et al. expires August 2001 [Page 51] Internet-Draft March 2001 -initiation of thesharedsession. INTERIM_RECORD 3 An Interim Accounting Record contains cumulative accounting information for an existing accounting session. Interim Accounting Records SHOULD be sent every time a re- authenticationsecret This MD5 hash valueor re-authorization occurs. Further, additional interim record triggers MAY be defined by application-specific Diameter extensions. The selection of whether to use INTERIM_RECORD records isthen XORed withdirected by thefirst 16 octet segmentAccounting-Interim- Interval AVP. STOP_RECORD 4 An Accounting Stop Record is sent to terminate an accounting session and contains cumulative accounting information relevant to the existing session. 15.2 Accounting-Interim-Interval AVP The Accounting-Interim-Interval AVP (AVP Code 482) is of type Unsigned32 and is sent from the Diameter authenticating/authorizing server to thebufferDiameter client. The client uses information in this AVP toencrypt. The resulting 16 octetdecide how and when to produce accounting records. With different values in this AVP, service sessions can resultis saved asin one, two, or two+N accounting records, based on thefirst 16 octetsneeds of theencrypted buffer.home- organization. Theresultfollowing accounting record production behaviour isalso used to calculate a new value using MD5: - the shared authentication secret -directed by the16 byte resultinclusion of this AVP: 1. The omission of theprevious XOR This value is then XORedAccounting-Interim-Interval AVP or its inclusion withthe next 16 bytes. This is doneValue field set to 0 means that EVENT_RECORD, START_RECORD, and STOP_RECORD are produced, as appropriate foreach 16 bytes successively inthebuffer to encrypt, producing an equal sized encrypted buffer.service. 2. Thereceiverinclusion ofa Diameter message with an Encrypted-Payloadthe AVP with Value field set to a non-zero value means that INTERIM_RECORD records MUSTfirst checkbe produced between theintegritySTART_RECORD and STOP_RECORD records. The Value Calhoun et al. expires September 2001 [Page 66] Internet-Draft April 2001 field ofthe message, either through the ICV, or the CMS-Data AVP [11] if it protects the Encrypted-Payload AVP. Then the Encrypted-Payloadthis AVP isdecrypted, by reversingtheabove procedure, which applied tonominal interval between these records in seconds. The Diameter node that originates thebuffer will reproduceaccounting information, known as theplain text version. The decapsulated AVPs are then used to processclient, MUST produce theDiameter message infirst INTERIM_RECORD record roughly at thenormal manner. 13.1.2.2 Plaintext-Data-Length AVP The Plaintext-Data-Length AVP (AVP Code = 289) is of type Unsigned32, and containstime when this nominal interval has elapsed from thelength ofSTART_RECORD, theplaintext data. This AVP is necessary in order to not treat any possible padded data, addednext one again aspart oftheencryption transform, as part ofinterval has elapsed once more, and so on until theplaintext. 13.1.2.3 Encrypted-Data AVP The Encrypted-Data AVP (AVP Code = 290)session ends and a STOP_RECORD record isof type OctetString. This AVP containsproduced. The client MUST ensure that theencrypted AVPs. 13.2 Nonceinterim record production times are randomized so that large accounting message storms are not created either among records or around a common service start time. 15.3 Accounting-Record-Number AVP TheNonceAccounting-Record-Number AVP (AVP Code261)485) is of typeOctetStringUnsigned32 andis present inidentifies this record within one session. As Session-Id AVPs are globally unique, theIntegrity-Check-Value AVPcombination of Session-Id and Accounting- Record-Number AVPs is also globally unique, and can be used in matching accounting records with confirmations. An easy way toensure randomness within a message. The content of this AVP MUST be a randomproduce unique numbers is to set the value to 0 for records ofat least 128 bits. 13.3 Timestamptype EVENT_RECORD and START_RECORD, and set the value to 1 for the first INTERIM_RECORD, 2 for the second, and so on until the value for STOP_RECORD is one more than for the last INTERIM_RECORD. 15.4 Accounting-State AVP TheTimestampAccounting-State AVP (AVP Code262)486) is of type Unsigned32 and is used toCalhoun et al. expires August 2001 [Page 52] Internet-Draft March 2001 add replay protectioncommunicate tothe Diameter protocol. The Data field of this AVP is the most significant four octets returned from an NTP [18] server that indicates the number of seconds expired since Jan. 1, 1900. Messages that are older than a configurable maximum age SHOULD be rejected (see section 17.0) andaresponse SHOULDpeer whether Accounting messages will bereturned 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 involvedsent in thetransmission of the message over the network. The timestamp AVP SHOULD be updated prior to retransmission.future. ADiameternode thatreceives a messageissues an ASI with theResult-CodeAccounting- State AVP set toDIAMETER-TIMEOUT MAY use the time found in the Timestamp AVP within the reply in order to synchronize its clock with its peer. When time synchronizationDISABLED isdone, the sender MUST NOT changeinforming itslocal time, but SHOULD adjust the time delta for all outgoing messages to the peer, and requirepeer thatits local time be used in received messages. Implementations mustit will no longer beprepared to wrap attransmitting Accounting messages until a subsequent ASI message is sent with theepochal 2038 where TimeAccounting-State AVP set to ENABLED. The following valuesare used, and 0,1,... MUST be considered greater than 2^32-1 at that time. 13.4 Key-Idhave been defined: 1 ENABLED 2 DISABLED 15.5 Accounting-Session-Id AVP TheKey-IdAccounting-Session-Id AVP (AVP Code= 286)44) is of typeUnsigned32. This value contains a key identifier, whichOctetString, and SHOULD be encoded in UTF-8 format [13]. The Accounting-Session-Id is not usedto identifyby thekeying informationDiameter protocol, since the Session-Id defined in [1] is used for both authentication/authorization and accounting purposes. However, a RADIUS/Diameter gateway MAY need togenerate the Digest AVP orinclude theEncrypted-Data AVP. 14.0Calhoun et al. expires September 2001 [Page 67] Internet-Draft April 2001 Accounting-Session-Id in Diameter accounting messages. 16.0 AVP Occurrence Table The followingtabletables presents the AVPs defined in this document, and specifies in which Diameter messages they MAY, or MAY NOT be present. Note that AVPs that can only be present within a Grouped AVP are not represented in this table. The table uses the following symbols: 0 The AVP MUST NOT be present in the message. 0+ Zero or more instances of the AVP MAY be present in the message. 0-1 Zero or one instance of the AVP MAY be present in the message.Calhoun et al. expires August 2001 [Page 53] Internet-Draft March 2001It is considered an error if there are more than once instance of the AVP. 1 One instance of the AVP MUST be present in the message. 1+ At least one instance of the AVP MUST be present in the message. 16.1 Base Protocol Command AVP Table The table in this section is limited to the non-accounting Command Codes defined in this specification. Calhoun et al. expires September 2001 [Page 68] Internet-Draft April 2001 +-------------------------------+ |Command-CodeCommand-Code | |---+---+---+---+---+---+---+---+ 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 | Destination-Realm |1 |1 |0 |0 |1 |1 |1 |0 | DSI-Event |0 |1 |0 |0 |0 |0 |0 |0 | Error-Message |0 |0 |0 |0 |0 |0 |0 |0 | Error-Reporting-FQDN |0 |0 |0 |0 |1 |0 |0 |0 | Extension-Id |1+ |0 |0 |0 |0 |0 |0 |0 | Failed-AVP |0 |0 |0 |0 |0-1|0 |0 |0 ||---+---+---+---+---+---+---+---+ Attribute Name |DRI|DSI|DWR|DWA|MRI|STI|STR|STA| ------------------------------|---+---+---+---+---+---+---+---| Authorization-LifetimeFailed-Command-Code |0 |0 |0 |0 |0-1|0 |0 |0 | Failed-Vendor-Id |0 |0 |0 |0 |0-1|0 |0 |0 |Destination-FQDNFirmware-Revision |0-1|0 |0 |0 |0 |0 |0 |0 | Host-IP-Address |1+ |0 |0 |0 |0 |0 |0 |0 | Max-Time-Wait |0 |0 |0 |0 |0 |0 |0 |0 | Origin-FQDN |1 |1 |1 |1 |1 |1|0+|1|0+|1 |Destination-RealmOrigin-Realm |1 |1 |1 |1 |1 |1 |1 |1 |DSI-EventOriginal-Session-Id |0|1|0 |0 |0 |0 |0 |0| Encrypted-Payload|0 | Product-Name |1 |0 |0 |0 |0 |0 |0 |0 |Error-Message |0Proxy-State |0 |0 |0 |0 |0+ |0+ |0+ |0+ | Redirect-Host |0 |0 |0| Error-Reporting-FQDN|0 |0 |0 |0|1|0 | Result-Code |0 |0| Extension-Id |1+|0 |1 |1 |0 |0 |1 | Route-Record |0 |0 |0 |0 |0+ |0+ |0+ |0+ |Failed-AVPSession-Id |0 |0 |0 |0|0-1|0|0-1|1 |1 |1 | Session-Timeout |0 |0| Failed-Command-Code|0 |0 |0 |0|0-1|0|0 |0 |Firmware-Revision |0-1|0 |0Supported-Vendor-Id |0+ |0 |0 |0 |0 |0| Host-IP-Address |1+|0 |0 | User-Name |0 |0 |0 |0 |0 |1 |1 |1 |Integrity-Check-Value |0-1|0-1|0-1|0-1|0-1|0-1|0-1|0-1| Max-Time-Wait |0Vendor-Id |1 |0 |0 |0 |0 |0 |0 |0 | ------------------------------|---+---+---+---+---+---+---+---| 16.2 Accounting AVP Table The table in this section is used to represent which AVPs defined in this document are to be present in the Accounting messages. Calhoun et al. expires September 2001 [Page 69] Internet-Draft April 2001 +-----------------------+ | Command-Code | |-----+-----+-----+-----+ Attribute Name | ACR | ACA | API | ASI | ------------------------------|-----+-----+-----+-----+ Accounting-Interim-Interval | 0-1 | 0-1 | 0 | 0 | Accounting-Record-Number | 1 | 1 | 0 | 0 | Accounting-Record-Type | 1 | 1 | 0 | 0 | Accounting-Session-Id | 1 | 1 | 0 | 1 | Accounting-State | 0 | 0 | 1 | 0 | Destination-FQDN | 0+ | 1 | 0+ | 0-1 | Destination-Realm | 1 | 0 | 1 | 1 | Error-Reporting-FQDN | 0 | 0+ | 0 | 0 | Extension-Id | 1 | 1 | 1 | 1 | Integrity-Check-Value | 0-1 | 0-1 | 0-1 | 0-1 | Origin-FQDN|1 |1 |1 |1 |1 |1 |1 |1| 1 | 1 | 1 | 1 | Origin-Realm|1 |1 |1 |1 |1 |1 |1 |1| 1 | 1 | 1 | 1 | Proxy-State|0 |0 |0 |0 |0+ |0+ |0+ |0+|Redirect-Host |0 |0 |0 |0 |0 |0 |0 |00+ |Result-Code |0 |0 |0 |1 |1 |0 |0 |10+ | 0+ | 0+ | Route-Record|0 |0 |0 |0 |0+ |0+ |0+ |0+| 0+ | 0+ | 0+ | 0+ | Result-Code | 0 | 1 | 0 | 0 | Session-Id|0 |0 |0 |0 |0-1|1 |1 |1|Session-Timeout |0 |0 |0 |0 |0 |0 |0 |01 |Timestamp |0 |0 |0 |0 |0 |0 |0 |01 |User-Name |0 |0 |0 |0 |0 |1 |1 |10 |Vendor-Id |1 |0 |0 |0 |0 |0 |0 |01 |------------------------------|---+---+---+---+---+---+---+---| 15.0------------------------------|-----+-----+-----+-----+ 17.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.15.117.1 AVP Attributes As defined in section 4.0, AVPs contain vendor ID, attribute and Data fields. For vendor ID value of 0, IANA will maintain a registry ofCalhoun et al. expires August 2001 [Page 54] Internet-Draft March 2001assigned 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 Codes256-280256-284, 480, 482, 485 and 486 are assigned within this document. The remaining values are available for assignment through Designated Expert [12].15.217.2 Command Code Values As defined in section 3.0, the Command Code field has an associated value maintained by IANA. Values 0-255 are reserved for backward Calhoun et al. expires September 2001 [Page 70] Internet-Draft April 2001 RADIUS compatibility, and values 257, 259, 271, 272, 273, 274,275275, 276, 279, 280, 281, and276282 aredefinedin this specification. The remaining values are available for assignment via Designated Expert [12].15.317.3 Extension Identifier Values As defined in section 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 changesto the base protocol are required. 15.4 Result-Code AVP Values As defined in Section 10.2, the Result-Code AVP (AVP Code 268) defines the values 2001, 4001-4002 and 5001-5010. All remaining values are available for assignment via IETF Consensus [12]. 15.5 Authentication-Transform-Id AVP Values Section 13.1.1.1 defines the Authentication-Transform-Id AVP (AVP Code 285) which is used to identify the authentication algorithm used to generate the contents of the Digest AVP. This document reserves the value 1. All remaining values are available for assignment via Designated Expert [12]. 15.6 Encryption-Transform-Idto the base protocol are required. 17.4 Result-Code AVP Values As defined in Section13.1.2.1 defines10.2, theEncryption-Transform-IdResult-Code AVP (AVP Code288) 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 reserves268) defines thevalue 1.values 2001, 4001-4003 and 5001-5012. All remaining values are available for assignment viaDesignated ExpertIETF Consensus [12].15.717.5 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].15.817.6 AVP Header Bits There are 16 bits in the Flags field of the AVP 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].15.917.7 DSI-Event AVP Values As defined in Section 9.1.1, the DSI-Event AVP (AVP Code 297) defines the values 1001, 3001,4001-40034001 and 5001-5006. All remaining values are available for assignment via IETF Consensus [12].16.018.0 Open Issues Calhoun et al. expires September 2001 [Page 71] Internet-Draft April 2001 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.17.019.0 Diameter protocol related configurable parametersCalhoun et al. expires August 2001 [Page 56] Internet-Draft March 2001This section contains the configurable parameters that are found throughout this document: Diameter Peer A Diameter entity MAY communicate with peers that are statically configured. A statically configured Diameter peer would require that either the IP address or the fully qualified domain name (FQDN) be supplied, which would then be used to resolve through DNS. Realm Routing Table A Diameter Proxy server routes messages based on the realm portion of a Network Access Identifier (NAI). The server MUST have a table of Realms Names, and the address of the peer to which the message must be forwarded to. The routing table MAY also include a "default route", which is typically used for all messages that cannot be locally processed.Maximum Age of an outstanding message Messages older than the maximum age SHOULD be rejected, as described in section 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.Watchdog Interval Period The Watchdog Interval Period is the frequency at which DWR messages are sent to inactive peers. The recommended value is 30 seconds.18.0Calhoun et al. expires September 2001 [Page 72] Internet-Draft April 2001 20.0 Security Considerations The Diameter base protocolrequiresassumes thattwo communicating peers exchangemessagesin 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. Whenare secured by using either IPSecurity is not available,Security, ordesirable, 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-HopTLS. This securityprovides 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 intermediatemodel is acceptable in environments where there are no untrusted third party Diameternode MUST NOT be encrypted using hop-by-hop encryption.brokers, or redirect servers. Whenthe Diameter protocol is used in an inter-domain network,third party brokers or redirect servers are used, strong application level securityMAYSHOULD be required, such asnon-repudiation.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.19.021.0 References [1] Rigney, et alia, "RADIUS", RFC-2138, April 1997. [2] Reynolds, Postel, "Assigned Numbers", RFC 1700, October 1994. [3] Postel, "User Datagram Protocol", RFC 768, August 1980. [4] Rivest, "The MD5 Message-Digest Algorithm", RFC 1321, April 1992. [5] Kaufman, Perlman, Speciner, "Network Security: Private Communi- cations in a Public World", Prentice Hall, March 1995, ISBN 0- 13-061466-1. [6] Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, January 1997. [7] P. Calhoun, W. Bulley, A. Rubens, J. Haag, "Diameter NASREQ Extension", draft-ietf-aaa-diameter-nasreq-01.txt, IETF work in progress, March 2001. [8] Aboba, Beadles "The Network Access Identifier." RFC 2486. Janu- ary 1999. [9] Calhoun, Zorn, Pan, Akhtar, "Diameter Framework", draft-ietf- aaa-diameter-framework-01.txt, IETF work in progress, March 2001. [10] P. Calhoun, C. Perkins, "Diameter Mobile IP Extensions", draft-ietf-aaa-diameter-mobileip-01.txt, IETF work in progress, MarchCalhoun et al. expiresAugustSeptember 2001 [Page58]73] Internet-DraftMarchApril 2001 ietf-aaa-diameter-mobileip-01.txt, IETF work in progress, March 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-01.txt, IETF work in pro- gress, March 2001.D. Harkins, D. Carrel, "The Internet Key Exchange (IKE)", RFC 2409, November 1998. [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. expiresAugustSeptember 2001 [Page59]74] Internet-DraftMarchApril 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. [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. [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. [40] B. Aboba, J. Arkko, D. Harrington. "Introduction to Accounting Calhoun et al. expiresAugustSeptember 2001 [Page60]75] Internet-DraftMarchApril 200120.0Management", RFC 2975, October 2000. [41] A. Shacham, R. Monsour, R. Pereira, M. Thomas, "IP Payload Compression Protocol (IPComp)", RFC 2393, December 1998. [42] W. Simpson, "The Point-to-Point Protocol (PPP)", RFC 1661, STD 51, July 1994. [43] B. Aboba, J. Lu, J. Alsop, J. Ding, W. Wang, "Review of Roaming Implementations", RFC 2194, September 1997. [44] B. Aboba, J. Vollbrecht, "Proxy Chaining and Policy Implementa- tion in Roaming", RFC 2607, June 1999. [45] C. Perkins, Editor. IP Mobility Support. RFC 2002, October 1996. 22.0 Acknowledgements The authors would like to thank Nenad Trifunovic, Tony Johansson and Pankaj Patel for their participation in the pre-IETF 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. Paul Funk and David Mitton were instrumental in getting the Peer State Machine correct, and our deep thanks go to them for their time. 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, Mark Eklund, David Frascone, Daniel C. Fox, Lol Grant, Ignacio Goyret, Nancy Greene, Peter Heitman, Fredrik Johansson, Mark Jones, Paul Krumviede, Fergal Ladley, Ryan Moats, Victor Muslin, Kenneth Peirce, Stephen Farrell, Sumit Vakil, John R. Vollbrecht, JeffWeisberg, Jon WoodWeisberg andGlen Zorn 21.0Jonathan Wood 23.0 Authors' Addresses Questions about this memo can be directed to: Calhoun et al. expires September 2001 [Page 76] Internet-Draft April 2001 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.comAllan C. Rubens Tut Systems, Inc. 220 E. Huron, Suite 260 Ann Arbor, MI 48104 USA Phone: +1 734-995-1697 E-Mail: arubens@tutsys.comHaseeb Akhtar Wireless Technology Labs Nortel Networks 2221 Lakeside Blvd.Calhoun et al. expires August 2001 [Page 61] Internet-Draft March 2001Richardson, TX 75082-4399 USA Phone: +1 972-684-8850 E-Mail: haseeb@nortelnetworks.com Jari Arkko Oy LM Ericsson Ab 02420 Jorvas Finland Phone: +358 40 5079256 E-Mail: Jari.Arkko@ericsson.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.com22.0Calhoun et al. expires September 2001 [Page 77] Internet-Draft April 2001 Allan C. Rubens Tut Systems, Inc. 220 E. Huron, Suite 260 Ann Arbor, MI 48104 USA Phone: +1 734-995-1697 E-Mail: arubens@tutsys.com Glen Zorn Cisco Systems, Inc. 500 108th Avenue N.E., Suite 500 Bellevue, WA 98004 USA Phone: +1 425 438 8218 24.0 Full Copyright Statement Copyright (C) The Internet Society (2001). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this docu- ment itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of develop- ing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The lim- ited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DIS- CLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.23.025.0 Expiration Date This memo is filed as<draft-ietf-aaa-diameter-01.txt><draft-ietf-aaa-diameter-02.txt> and expires inAugustCalhoun et al. expires September 2001 [Page 78] Internet-Draft April 2001 September 2001. Calhoun et al. expiresAugustSeptember 2001 [Page62]79] Internet-DraftMarchApril 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. expiresAugustSeptember 2001 [Page63]80] Internet-DraftMarchApril 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. expiresAugustSeptember 2001 [Page64]81] ----