idnits 2.17.1 draft-ietf-dime-rfc3588bis-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 16. -- Found old boilerplate from RFC 3978, Section 5.5 on line 6921. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 6932. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 6939. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 6945. ** Found boilerplate matching RFC 3979, Section 5, paragraph 1 (on line 6932), which is fine, but *also* found old RFC 2026, Section 10.4A text on line 6879. ** Found boilerplate matching RFC 3979, Section 5, paragraph 3 (on line 6945), which is fine, but *also* found old RFC 2026, Section 10.4B text on line 6885. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 2 instances of lines with non-RFC2606-compliant FQDNs in the document. == There are 2 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == In addition to RFC 3979, Section 5, paragraph 1 boilerplate, a section with a similar start was also found: The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF Secretariat. == In addition to RFC 3979, Section 5, paragraph 3 boilerplate, a section with a similar start was also found: The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director. == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 4456 has weird spacing: '...ly with wit...' == Line 4652 has weird spacing: '...ealtime user...' == Line 4680 has weird spacing: '... record inter...' == Line 4690 has weird spacing: '...ealtime user...' == Line 4698 has weird spacing: '...ealtime user...' == (1 more instance...) == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The exact meaning of the all-uppercase expression 'MAY NOT' is not defined in RFC 2119. If it is intended as a requirements expression, it should be rewritten using one of the combinations defined in RFC 2119; otherwise it should not be all-uppercase. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: The Destination-Realm AVP MUST be present if the message is proxiable. Request messages that may be forwarded by Diameter agents (proxies, redirects or relays) MUST also contain an Acct-Application-Id AVP, an Auth-Application-Id AVP or a Vendor-Specific-Application-Id AVP. A message that MUST NOT be forwarded by Diameter agents (proxies, redirects or relays) MUST not include the Destination-Realm in its ABNF. The value of the Destination-Realm AVP MAY be extracted from the User-Name AVP, or other application-specific methods. == The expression 'MAY NOT', while looking like RFC 2119 requirements text, is not defined in RFC 2119, and should not be used. Consider using 'MUST NOT' instead (if that is what you mean). Found 'MAY NOT' in this paragraph: The following tables 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 document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (December 07, 2006) is 6321 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFC3162' is mentioned on line 282, but not defined == Missing Reference: 'UFT8' is mentioned on line 2067, but not defined == Missing Reference: 'DIFFSERV' is mentioned on line 2354, but not defined == Missing Reference: 'PXY' is mentioned on line 4220, but not defined == Missing Reference: 'IPsec' is mentioned on line 6289, but not defined == Unused Reference: 'IANAWEB' is defined on line 6448, but no explicit reference was found in the text == Unused Reference: 'RFC2474' is defined on line 6488, but no explicit reference was found in the text == Unused Reference: 'RFC2597' is defined on line 6493, but no explicit reference was found in the text == Unused Reference: 'RFC3246' is defined on line 6496, but no explicit reference was found in the text == Unused Reference: 'RFC2782' is defined on line 6501, but no explicit reference was found in the text == Unused Reference: 'RFC2119' is defined on line 6525, but no explicit reference was found in the text == Unused Reference: 'RFC3436' is defined on line 6556, but no explicit reference was found in the text == Unused Reference: 'RFC2279' is defined on line 6564, but no explicit reference was found in the text == Unused Reference: 'RFC3141' is defined on line 6577, but no explicit reference was found in the text == Unused Reference: 'RFC3344' is defined on line 6592, but no explicit reference was found in the text == Unused Reference: 'RFC2977' is defined on line 6595, but no explicit reference was found in the text == Unused Reference: 'RFC2881' is defined on line 6599, but no explicit reference was found in the text == Unused Reference: 'RFC3169' is defined on line 6603, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'FLOATPOINT' -- Possible downref: Non-RFC (?) normative reference: ref. 'IANAADFAM' -- Possible downref: Non-RFC (?) normative reference: ref. 'IANAWEB' -- Possible downref: Non-RFC (?) normative reference: ref. 'RADTYPE' ** Obsolete normative reference: RFC 793 (ref. 'TCP') (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 4005 (Obsoleted by RFC 7155) ** Obsolete normative reference: RFC 4006 (Obsoleted by RFC 8506) ** Obsolete normative reference: RFC 2234 (Obsoleted by RFC 4234) ** Downref: Normative reference to an Informational RFC: RFC 3232 ** Obsolete normative reference: RFC 2284 (Obsoleted by RFC 3748) ** Obsolete normative reference: RFC 2434 (Obsoleted by RFC 5226) ** Obsolete normative reference: RFC 2409 (Obsoleted by RFC 4306) ** Obsolete normative reference: RFC 2407 (Obsoleted by RFC 4306) ** Obsolete normative reference: RFC 2373 (Obsoleted by RFC 3513) ** Obsolete normative reference: RFC 2486 (Obsoleted by RFC 4282) ** Obsolete normative reference: RFC 2915 (Obsoleted by RFC 3401, RFC 3402, RFC 3403, RFC 3404) ** Obsolete normative reference: RFC 2960 (Obsoleted by RFC 4960) ** Obsolete normative reference: RFC 2030 (Obsoleted by RFC 4330) ** Obsolete normative reference: RFC 2246 (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 2396 (Obsoleted by RFC 3986) ** Obsolete normative reference: RFC 2279 (Obsoleted by RFC 3629) -- Obsolete informational reference (is this intentional?): RFC 3576 (Obsoleted by RFC 5176) -- Obsolete informational reference (is this intentional?): RFC 3344 (Obsoleted by RFC 5944) -- Obsolete informational reference (is this intentional?): RFC 2401 (Obsoleted by RFC 4301) Summary: 22 errors (**), 0 flaws (~~), 32 warnings (==), 16 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 AAA V. Fajardo 3 Internet-Draft Toshiba America Research 4 Intended status: Standards Track J. Loughney 5 Expires: June 10, 2007 Nokia Research Center 6 December 07, 2006 8 Diameter Base Protocol 9 draft-ietf-dime-rfc3588bis-00.txt 11 Status of this Memo 13 By submitting this Internet-Draft, each author represents that any 14 applicable patent or other IPR claims of which he or she is aware 15 have been or will be disclosed, and any of which he or she becomes 16 aware will be disclosed, in accordance with Section 6 of BCP 79. 18 Internet-Drafts are working documents of the Internet Engineering 19 Task Force (IETF), its areas, and its working groups. Note that 20 other groups may also distribute working documents as Internet- 21 Drafts. 23 Internet-Drafts are draft documents valid for a maximum of six months 24 and may be updated, replaced, or obsoleted by other documents at any 25 time. It is inappropriate to use Internet-Drafts as reference 26 material or to cite them other than as "work in progress." 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt. 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html. 34 This Internet-Draft will expire on June 10, 2007. 36 Copyright Notice 38 Copyright (C) The Internet Society (2006). 40 Abstract 42 The Diameter base protocol is intended to provide an Authentication, 43 Authorization and Accounting (AAA) framework for applications such as 44 network access or IP mobility. Diameter is also intended to work in 45 both local Authentication, Authorization & Accounting and roaming 46 situations. This document specifies the message format, transport, 47 error reporting, accounting and security services to be used by all 48 Diameter applications. The Diameter base application needs to be 49 supported by all Diameter implementations. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 7 54 1.1. Diameter Protocol . . . . . . . . . . . . . . . . . . . . 10 55 1.1.1. Description of the Document Set . . . . . . . . . . 11 56 1.2. Approach to Extensibility . . . . . . . . . . . . . . . . 12 57 1.2.1. Defining New AVP Values . . . . . . . . . . . . . . 13 58 1.2.2. Creating New AVPs . . . . . . . . . . . . . . . . . 13 59 1.2.3. Creating New Authentication Applications . . . . . . 13 60 1.2.4. Creating New Accounting Applications . . . . . . . . 14 61 1.2.5. Application Authentication Procedures . . . . . . . 15 62 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 15 63 2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 22 64 2.1. Transport . . . . . . . . . . . . . . . . . . . . . . . . 23 65 2.1.1. SCTP Guidelines . . . . . . . . . . . . . . . . . . 24 66 2.2. Securing Diameter Messages . . . . . . . . . . . . . . . 24 67 2.3. Diameter Application Compliance . . . . . . . . . . . . . 24 68 2.4. Application Identifiers . . . . . . . . . . . . . . . . . 25 69 2.5. Connections vs. Sessions . . . . . . . . . . . . . . . . 25 70 2.6. Peer Table . . . . . . . . . . . . . . . . . . . . . . . 26 71 2.7. Realm-Based Routing Table . . . . . . . . . . . . . . . . 27 72 2.8. Role of Diameter Agents . . . . . . . . . . . . . . . . . 29 73 2.8.1. Relay Agents . . . . . . . . . . . . . . . . . . . . 30 74 2.8.2. Proxy Agents . . . . . . . . . . . . . . . . . . . . 31 75 2.8.3. Redirect Agents . . . . . . . . . . . . . . . . . . 31 76 2.8.4. Translation Agents . . . . . . . . . . . . . . . . . 32 77 2.9. End-to-End Security Framework . . . . . . . . . . . . . . 33 78 2.10. Diameter Path Authorization . . . . . . . . . . . . . . . 34 79 3. Diameter Header . . . . . . . . . . . . . . . . . . . . . . . 36 80 3.1. Command Codes . . . . . . . . . . . . . . . . . . . . . . 39 81 3.2. Command Code ABNF specification . . . . . . . . . . . . . 40 82 3.3. Diameter Command Naming Conventions . . . . . . . . . . . 42 83 4. Diameter AVPs . . . . . . . . . . . . . . . . . . . . . . . . 43 84 4.1. AVP Header . . . . . . . . . . . . . . . . . . . . . . . 43 85 4.1.1. Optional Header Elements . . . . . . . . . . . . . . 45 86 4.2. Basic AVP Data Formats . . . . . . . . . . . . . . . . . 45 87 4.3. Derived AVP Data Formats . . . . . . . . . . . . . . . . 47 88 4.4. Grouped AVP Values . . . . . . . . . . . . . . . . . . . 55 89 4.4.1. Example AVP with a Grouped Data type . . . . . . . . 56 90 4.5. Diameter Base Protocol AVPs . . . . . . . . . . . . . . . 59 91 5. Diameter Peers . . . . . . . . . . . . . . . . . . . . . . . 62 92 5.1. Peer Connections . . . . . . . . . . . . . . . . . . . . 62 93 5.2. Diameter Peer Discovery . . . . . . . . . . . . . . . . . 62 94 5.3. Capabilities Exchange . . . . . . . . . . . . . . . . . . 65 95 5.3.1. Capabilities-Exchange-Request . . . . . . . . . . . 66 96 5.3.2. Capabilities-Exchange-Answer . . . . . . . . . . . . 67 97 5.3.3. Vendor-Id AVP . . . . . . . . . . . . . . . . . . . 67 98 5.3.4. Firmware-Revision AVP . . . . . . . . . . . . . . . 68 99 5.3.5. Host-IP-Address AVP . . . . . . . . . . . . . . . . 68 100 5.3.6. Supported-Vendor-Id AVP . . . . . . . . . . . . . . 68 101 5.3.7. Product-Name AVP . . . . . . . . . . . . . . . . . . 68 102 5.4. Disconnecting Peer connections . . . . . . . . . . . . . 68 103 5.4.1. Disconnect-Peer-Request . . . . . . . . . . . . . . 69 104 5.4.2. Disconnect-Peer-Answer . . . . . . . . . . . . . . . 69 105 5.4.3. Disconnect-Cause AVP . . . . . . . . . . . . . . . . 70 106 5.5. Transport Failure Detection . . . . . . . . . . . . . . . 70 107 5.5.1. Device-Watchdog-Request . . . . . . . . . . . . . . 70 108 5.5.2. Device-Watchdog-Answer . . . . . . . . . . . . . . . 71 109 5.5.3. Transport Failure Algorithm . . . . . . . . . . . . 71 110 5.5.4. Failover and Failback Procedures . . . . . . . . . . 71 111 5.6. Peer State Machine . . . . . . . . . . . . . . . . . . . 72 112 5.6.1. Incoming connections . . . . . . . . . . . . . . . . 74 113 5.6.2. Events . . . . . . . . . . . . . . . . . . . . . . . 75 114 5.6.3. Actions . . . . . . . . . . . . . . . . . . . . . . 76 115 5.6.4. The Election Process . . . . . . . . . . . . . . . . 78 116 6. Diameter message processing . . . . . . . . . . . . . . . . . 79 117 6.1. Diameter Request Routing Overview . . . . . . . . . . . . 79 118 6.1.1. Originating a Request . . . . . . . . . . . . . . . 80 119 6.1.2. Sending a Request . . . . . . . . . . . . . . . . . 81 120 6.1.3. Receiving Requests . . . . . . . . . . . . . . . . . 81 121 6.1.4. Processing Local Requests . . . . . . . . . . . . . 81 122 6.1.5. Request Forwarding . . . . . . . . . . . . . . . . . 81 123 6.1.6. Request Routing . . . . . . . . . . . . . . . . . . 82 124 6.1.7. Redirecting requests . . . . . . . . . . . . . . . . 82 125 6.1.8. Relaying and Proxying Requests . . . . . . . . . . . 83 126 6.2. Diameter Answer Processing . . . . . . . . . . . . . . . 84 127 6.2.1. Processing received Answers . . . . . . . . . . . . 85 128 6.2.2. Relaying and Proxying Answers . . . . . . . . . . . 85 129 6.3. Origin-Host AVP . . . . . . . . . . . . . . . . . . . . . 85 130 6.4. Origin-Realm AVP . . . . . . . . . . . . . . . . . . . . 86 131 6.5. Destination-Host AVP . . . . . . . . . . . . . . . . . . 86 132 6.6. Destination-Realm AVP . . . . . . . . . . . . . . . . . . 86 133 6.7. Routing AVPs . . . . . . . . . . . . . . . . . . . . . . 86 134 6.7.1. Route-Record AVP . . . . . . . . . . . . . . . . . . 87 135 6.7.2. Proxy-Info AVP . . . . . . . . . . . . . . . . . . . 87 136 6.7.3. Proxy-Host AVP . . . . . . . . . . . . . . . . . . . 87 137 6.7.4. Proxy-State AVP . . . . . . . . . . . . . . . . . . 87 138 6.8. Auth-Application-Id AVP . . . . . . . . . . . . . . . . . 87 139 6.9. Acct-Application-Id AVP . . . . . . . . . . . . . . . . . 87 140 6.10. Inband-Security-Id AVP . . . . . . . . . . . . . . . . . 88 141 6.11. Vendor-Specific-Application-Id AVP . . . . . . . . . . . 88 142 6.12. Redirect-Host AVP . . . . . . . . . . . . . . . . . . . . 88 143 6.13. Redirect-Host-Usage AVP . . . . . . . . . . . . . . . . . 89 144 6.14. Redirect-Max-Cache-Time AVP . . . . . . . . . . . . . . . 90 145 6.15. E2E-Sequence AVP . . . . . . . . . . . . . . . . . . . . 90 146 7. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 91 147 7.1. Result-Code AVP . . . . . . . . . . . . . . . . . . . . . 93 148 7.1.1. Informational . . . . . . . . . . . . . . . . . . . 93 149 7.1.2. Success . . . . . . . . . . . . . . . . . . . . . . 94 150 7.1.3. Protocol Errors . . . . . . . . . . . . . . . . . . 94 151 7.1.4. Transient Failures . . . . . . . . . . . . . . . . . 96 152 7.1.5. Permanent Failures . . . . . . . . . . . . . . . . . 96 153 7.2. Error Bit . . . . . . . . . . . . . . . . . . . . . . . . 99 154 7.3. Error-Message AVP . . . . . . . . . . . . . . . . . . . . 100 155 7.4. Error-Reporting-Host AVP . . . . . . . . . . . . . . . . 100 156 7.5. Failed-AVP AVP . . . . . . . . . . . . . . . . . . . . . 100 157 7.6. Experimental-Result AVP . . . . . . . . . . . . . . . . . 101 158 7.7. Experimental-Result-Code AVP . . . . . . . . . . . . . . 101 159 8. Diameter User Sessions . . . . . . . . . . . . . . . . . . . 102 160 8.1. Authorization Session State Machine . . . . . . . . . . . 103 161 8.2. Accounting Session State Machine . . . . . . . . . . . . 107 162 8.3. Server-Initiated Re-Auth . . . . . . . . . . . . . . . . 113 163 8.3.1. Re-Auth-Request . . . . . . . . . . . . . . . . . . 113 164 8.3.2. Re-Auth-Answer . . . . . . . . . . . . . . . . . . . 114 165 8.4. Session Termination . . . . . . . . . . . . . . . . . . . 115 166 8.4.1. Session-Termination-Request . . . . . . . . . . . . 116 167 8.4.2. Session-Termination-Answer . . . . . . . . . . . . . 116 168 8.5. Aborting a Session . . . . . . . . . . . . . . . . . . . 117 169 8.5.1. Abort-Session-Request . . . . . . . . . . . . . . . 118 170 8.5.2. Abort-Session-Answer . . . . . . . . . . . . . . . . 118 171 8.6. Inferring Session Termination from Origin-State-Id . . . 119 172 8.7. Auth-Request-Type AVP . . . . . . . . . . . . . . . . . . 120 173 8.8. Session-Id AVP . . . . . . . . . . . . . . . . . . . . . 120 174 8.9. Authorization-Lifetime AVP . . . . . . . . . . . . . . . 121 175 8.10. Auth-Grace-Period AVP . . . . . . . . . . . . . . . . . . 122 176 8.11. Auth-Session-State AVP . . . . . . . . . . . . . . . . . 122 177 8.12. Re-Auth-Request-Type AVP . . . . . . . . . . . . . . . . 123 178 8.13. Session-Timeout AVP . . . . . . . . . . . . . . . . . . . 123 179 8.14. User-Name AVP . . . . . . . . . . . . . . . . . . . . . . 124 180 8.15. Termination-Cause AVP . . . . . . . . . . . . . . . . . . 124 181 8.16. Origin-State-Id AVP . . . . . . . . . . . . . . . . . . . 125 182 8.17. Session-Binding AVP . . . . . . . . . . . . . . . . . . . 126 183 8.18. Session-Server-Failover AVP . . . . . . . . . . . . . . . 126 184 8.19. Multi-Round-Time-Out AVP . . . . . . . . . . . . . . . . 127 185 8.20. Class AVP . . . . . . . . . . . . . . . . . . . . . . . . 127 186 8.21. Event-Timestamp AVP . . . . . . . . . . . . . . . . . . . 128 187 9. Accounting . . . . . . . . . . . . . . . . . . . . . . . . . 129 188 9.1. Server Directed Model . . . . . . . . . . . . . . . . . . 129 189 9.2. Protocol Messages . . . . . . . . . . . . . . . . . . . . 130 190 9.3. Application document requirements . . . . . . . . . . . . 130 191 9.4. Fault Resilience . . . . . . . . . . . . . . . . . . . . 130 192 9.5. Accounting Records . . . . . . . . . . . . . . . . . . . 131 193 9.6. Correlation of Accounting Records . . . . . . . . . . . . 132 194 9.7. Accounting Command-Codes . . . . . . . . . . . . . . . . 133 195 9.7.1. Accounting-Request . . . . . . . . . . . . . . . . . 133 196 9.7.2. Accounting-Answer . . . . . . . . . . . . . . . . . 134 197 9.8. Accounting AVPs . . . . . . . . . . . . . . . . . . . . . 135 198 9.8.1. Accounting-Record-Type AVP . . . . . . . . . . . . . 135 199 9.8.2. Acct-Interim-Interval . . . . . . . . . . . . . . . 136 200 9.8.3. Accounting-Record-Number AVP . . . . . . . . . . . . 136 201 9.8.4. Acct-Session-Id AVP . . . . . . . . . . . . . . . . 137 202 9.8.5. Acct-Multi-Session-Id AVP . . . . . . . . . . . . . 137 203 9.8.6. Accounting-Sub-Session-Id AVP . . . . . . . . . . . 137 204 9.8.7. Accounting-Realtime-Required AVP . . . . . . . . . . 137 205 10. AVP Occurrence Table . . . . . . . . . . . . . . . . . . . . 139 206 10.1. Base Protocol Command AVP Table . . . . . . . . . . . . . 139 207 10.2. Accounting AVP Table . . . . . . . . . . . . . . . . . . 140 208 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 142 209 11.1. AVP Header . . . . . . . . . . . . . . . . . . . . . . . 142 210 11.1.1. AVP Codes . . . . . . . . . . . . . . . . . . . . . 142 211 11.1.2. AVP Flags . . . . . . . . . . . . . . . . . . . . . 143 212 11.2. Diameter Header . . . . . . . . . . . . . . . . . . . . . 143 213 11.2.1. Command Codes . . . . . . . . . . . . . . . . . . . 143 214 11.2.2. Command Flags . . . . . . . . . . . . . . . . . . . 144 215 11.3. Application Identifiers . . . . . . . . . . . . . . . . . 144 216 11.4. AVP Values . . . . . . . . . . . . . . . . . . . . . . . 144 217 11.4.1. Result-Code AVP Values . . . . . . . . . . . . . . . 144 218 11.4.2. Accounting-Record-Type AVP Values . . . . . . . . . 145 219 11.4.3. Termination-Cause AVP Values . . . . . . . . . . . . 145 220 11.4.4. Redirect-Host-Usage AVP Values . . . . . . . . . . . 145 221 11.4.5. Session-Server-Failover AVP Values . . . . . . . . . 145 222 11.4.6. Session-Binding AVP Values . . . . . . . . . . . . . 145 223 11.4.7. Disconnect-Cause AVP Values . . . . . . . . . . . . 145 224 11.4.8. Auth-Request-Type AVP Values . . . . . . . . . . . . 145 225 11.4.9. Auth-Session-State AVP Values . . . . . . . . . . . 146 226 11.4.10. Re-Auth-Request-Type AVP Values . . . . . . . . . . 146 227 11.4.11. Accounting-Realtime-Required AVP Values . . . . . . 146 228 11.4.12. Inband-Security-Id AVP (code 299) . . . . . . . . . 146 229 11.5. Diameter TCP/SCTP Port Numbers . . . . . . . . . . . . . 146 230 11.6. NAPTR Service Fields . . . . . . . . . . . . . . . . . . 146 232 12. Diameter protocol related configurable parameters . . . . . . 148 233 13. Security Considerations . . . . . . . . . . . . . . . . . . . 149 234 13.1. IPsec Usage . . . . . . . . . . . . . . . . . . . . . . . 149 235 13.2. TLS Usage . . . . . . . . . . . . . . . . . . . . . . . . 150 236 13.3. Peer-to-Peer Considerations . . . . . . . . . . . . . . . 151 237 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 153 238 14.1. Normative References . . . . . . . . . . . . . . . . . . 153 239 14.2. Informational References . . . . . . . . . . . . . . . . 155 240 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 158 241 Appendix B. Diameter Service Template . . . . . . . . . . . . . 159 242 Appendix C. NAPTR Example . . . . . . . . . . . . . . . . . . . 161 243 Appendix D. Duplicate Detection . . . . . . . . . . . . . . . . 162 244 Appendix E. Intellectual Property Statement . . . . . . . . . . 164 245 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 165 246 Intellectual Property and Copyright Statements . . . . . . . . . 166 248 1. Introduction 250 Authentication, Authorization and Accounting (AAA) protocols such as 251 TACACS [RFC1492] and RADIUS [RFC2865] were initially deployed to 252 provide dial-up PPP [RFC1661] and terminal server access. Over time, 253 with the growth of the Internet and the introduction of new access 254 technologies, including wireless, DSL, Mobile IP and Ethernet, 255 routers and network access servers (NAS) have increased in complexity 256 and density, putting new demands on AAA protocols. 258 Network access requirements for AAA protocols are summarized in 259 [RFC2989]. These include: 261 Failover 263 [RFC2865] does not define failover mechanisms, and as a result, 264 failover behavior differs between implementations. In order to 265 provide well defined failover behavior, Diameter supports 266 application-layer acknowledgements, and defines failover 267 algorithms and the associated state machine. This is described in 268 Section 5.5 and [RFC3539]. 270 Transmission-level security 272 [RFC2865] defines an application-layer authentication and 273 integrity scheme that is required only for use with Response 274 packets. While [RFC2869] defines an additional authentication and 275 integrity mechanism, use is only required during Extensible 276 Authentication Protocol (EAP) sessions. While attribute-hiding is 277 supported, [RFC2865] does not provide support for per-packet 278 confidentiality. In accounting, [RFC2866] assumes that replay 279 protection is provided by the backend billing server, rather than 280 within the protocol itself. 282 While [RFC3162] defines the use of IPsec with RADIUS, support for 283 IPsec is not required. Since within [RFC2409] authentication 284 occurs only within Phase 1 prior to the establishment of IPsec SAs 285 in Phase 2, it is typically not possible to define separate trust 286 or authorization schemes for each application. This limits the 287 usefulness of IPsec in inter-domain AAA applications (such as 288 roaming) where it may be desirable to define a distinct 289 certificate hierarchy for use in a AAA deployment. In order to 290 provide universal support for transmission-level security, and 291 enable both intra- and inter-domain AAA deployments, IPsec support 292 is mandatory in Diameter, and TLS support is optional. Security 293 is discussed in Section 13. 295 Reliable transport 297 RADIUS runs over UDP, and does not define retransmission behavior; 298 as a result, reliability varies between implementations. As 299 described in [RFC2975], this is a major issue in accounting, where 300 packet loss may translate directly into revenue loss. In order to 301 provide well defined transport behavior, Diameter runs over 302 reliable transport mechanisms (TCP, SCTP) as defined in [RFC3539]. 304 Agent support 306 [RFC2865] does not provide for explicit support for agents, 307 including Proxies, Redirects and Relays. Since the expected 308 behavior is not defined, it varies between implementations. 309 Diameter defines agent behavior explicitly; this is described in 310 Section 2.8. 312 Server-initiated messages 314 While RADIUS server-initiated messages are defined in [RFC3576], 315 support is optional. This makes it difficult to implement 316 features such as unsolicited disconnect or reauthentication/ 317 reauthorization on demand across a heterogeneous deployment. 318 Support for server-initiated messages is mandatory in Diameter, 319 and is described in Section 8. 321 Auditability 323 RADIUS does not define data-object security mechanisms, and as a 324 result, untrusted proxies may modify attributes or even packet 325 headers without being detected. Combined with lack of support for 326 capabilities negotiation, this makes it very difficult to 327 determine what occurred in the event of a dispute. While 328 implementation of data object security is not mandatory within 329 Diameter, these capabilities are supported, and are described in 330 [AAACMS]. 332 Transition support 334 While Diameter does not share a common protocol data unit (PDU) 335 with RADIUS, considerable effort has been expended in enabling 336 backward compatibility with RADIUS, so that the two protocols may 337 be deployed in the same network. Initially, it is expected that 338 Diameter will be deployed within new network devices, as well as 339 within gateways enabling communication between legacy RADIUS 340 devices and Diameter agents. This capability, described in 341 [RFC4005], enables Diameter support to be added to legacy 342 networks, by addition of a gateway or server speaking both RADIUS 343 and Diameter. 345 In addition to addressing the above requirements, Diameter also 346 provides support for the following: 348 Capability negotiation 350 RADIUS does not support error messages, capability negotiation, or 351 a mandatory/non-mandatory flag for attributes. Since RADIUS 352 clients and servers are not aware of each other's capabilities, 353 they may not be able to successfully negotiate a mutually 354 acceptable service, or in some cases, even be aware of what 355 service has been implemented. Diameter includes support for error 356 handling (Section 7), capability negotiation (Section 5.3), and 357 mandatory/non-mandatory attribute-value pairs (AVPs) (Section 358 4.1). 360 Peer discovery and configuration 362 RADIUS implementations typically require that the name or address 363 of servers or clients be manually configured, along with the 364 corresponding shared secrets. This results in a large 365 administrative burden, and creates the temptation to reuse the 366 RADIUS shared secret, which can result in major security 367 vulnerabilities if the Request Authenticator is not globally and 368 temporally unique as required in [RFC2865]. Through DNS, Diameter 369 enables dynamic discovery of peers. Derivation of dynamic session 370 keys is enabled via transmission-level security. 372 Roaming support 374 The ROAMOPS WG provided a survey of roaming implementations 375 [RFC2194], detailed roaming requirements [RFC2477], defined the 376 Network Access Identifier (NAI) [RFC2486], and documented existing 377 implementations (and imitations) of RADIUS-based roaming 378 [RFC2607]. In order to improve scalability, [RFC2607] introduced 379 the concept of proxy chaining via an intermediate server, 380 facilitating roaming between providers. However, since RADIUS 381 does not provide explicit support for proxies, and lacks 382 auditability and transmission-level security features, RADIUS- 383 based roaming is vulnerable to attack from external parties as 384 well as susceptible to fraud perpetrated by the roaming partners 385 themselves. As a result, it is not suitable for wide-scale 386 deployment on the Internet [RFC2607]. By providing explicit 387 support for inter-domain roaming and message routing (Sections 2.7 388 and 6), auditability [AAACMS], and transmission-layer security 389 (Section 13) features, Diameter addresses these limitations and 390 provides for secure and scalable roaming. 392 In the decade since AAA protocols were first introduced, the 393 capabilities of Network Access Server (NAS) devices have increased 394 substantially. As a result, while Diameter is a considerably more 395 sophisticated protocol than RADIUS, it remains feasible to implement 396 within embedded devices, given improvements in processor speeds and 397 the widespread availability of embedded IPsec and TLS 398 implementations. 400 1.1. Diameter Protocol 402 The Diameter base protocol provides the following facilities: 404 o Delivery of AVPs (attribute value pairs) 406 o Capabilities negotiation 408 o Error notification 410 o Extensibility, through addition of new commands and AVPs (required 411 in [RFC2989]). 413 o Basic services necessary for applications, such as handling of 414 user sessions or accounting 416 All data delivered by the protocol is in the form of an AVP. Some of 417 these AVP values are used by the Diameter protocol itself, while 418 others deliver data associated with particular applications that 419 employ Diameter. AVPs may be added arbitrarily to Diameter messages, 420 so long as the required AVPs are included and AVPs that are 421 explicitly excluded are not included. AVPs are used by the base 422 Diameter protocol to support the following required features: 424 o Transporting of user authentication information, for the purposes 425 of enabling the Diameter server to authenticate the user. 427 o Transporting of service specific authorization information, 428 between client and servers, allowing the peers to decide whether a 429 user's access request should be granted. 431 o Exchanging resource usage information, which MAY be used for 432 accounting purposes, capacity planning, etc. 434 o Relaying, proxying and redirecting of Diameter messages through a 435 server hierarchy. 437 The Diameter base protocol provides the minimum requirements needed 438 for a AAA protocol, as required by [RFC2989]. The base protocol may 439 be used by itself for accounting purposes only, or it may be used 440 with a Diameter application, such as Mobile IPv4 [RFC4004], or 441 network access [RFC4005]. It is also possible for the base protocol 442 to be extended for use in new applications, via the addition of new 443 commands or AVPs. At this time the focus of Diameter is network 444 access and accounting applications. A truly generic AAA protocol 445 used by many applications might provide functionality not provided by 446 Diameter. Therefore, it is imperative that the designers of new 447 applications understand their requirements before using Diameter. 448 See Section 2.4 for more information on Diameter applications. 450 Any node can initiate a request. In that sense, Diameter is a peer- 451 to-peer protocol. In this document, a Diameter Client is a device at 452 the edge of the network that performs access control, such as a 453 Network Access Server (NAS) or a Foreign Agent (FA). A Diameter 454 client generates Diameter messages to request authentication, 455 authorization, and accounting services for the user. A Diameter 456 agent is a node that does not authenticate and/or authorize messages 457 locally; agents include proxies, redirects and relay agents. A 458 Diameter server performs authentication and/or authorization of the 459 user. A Diameter node MAY act as an agent for certain requests while 460 acting as a server for others. 462 The Diameter protocol also supports server-initiated messages, such 463 as a request to abort service to a particular user. 465 1.1.1. Description of the Document Set 467 Currently, the Diameter specification consists of a base 468 specification (this document), Transport Profile [RFC3539] and 469 applications: Mobile IPv4 [RFC4004], NASREQ [RFC4005], Credit Control 470 [RFC4006], EAP [RFC4072] and SIP [RFC4740]. 472 The Transport Profile document [RFC3539] discusses transport layer 473 issues that arise with AAA protocols and recommendations on how to 474 overcome these issues. This document also defines the Diameter 475 failover algorithm and state machine. 477 The Mobile IPv4 [RFC4004] application defines a Diameter application 478 that allows a Diameter server to perform AAA functions for Mobile 479 IPv4 services to a mobile node. 481 The NASREQ [RFC4005] application defines a Diameter Application that 482 allows a Diameter server to be used in a PPP/SLIP Dial-Up and 483 Terminal Server Access environment. Consideration was given for 484 servers that need to perform protocol conversion between Diameter and 485 RADIUS. 487 The Credit Control [RFC4006] application defines a Diameter 488 Application that can be used to implement real-time credit-control 489 for a variety of end user services such as network access, SIP 490 services, messaging services, and download services. It provides a 491 general solution to real-time cost and credit-control. 493 The EAP [RFC4072] application defines a Diameter Application that can 494 be used to carry EAP packets between the Network Access Server (NAS) 495 working as an EAP authenticator and a back-end authentication server. 496 The Diameter EAP application is based on NASREQ and intended for a 497 similar environment. 499 The SIP [RFC4740] application defines a Diameter Application that 500 allows a Diameter client to request authentication and authorization 501 information to a Diameter server for SIP-based IP multimedia services 502 (see SIP [RFC3261]). 504 In summary, this document defines the base protocol specification for 505 AAA, which includes support for accounting. The applications 506 documents describe applications that use this base specification for 507 Authentication, Authorization and Accounting. 509 1.2. Approach to Extensibility 511 The Diameter protocol is designed to be extensible, using several 512 mechanisms, including: 514 o Defining new AVP values 516 o Creating new AVPs 518 o Creating new authentication/authorization applications 520 o Creating new accounting applications 522 o Application authentication procedures 524 Reuse of existing AVP values, AVPs and Diameter applications are 525 strongly recommended. Reuse simplifies standardization and 526 implementation and avoids potential interoperability issues. It is 527 expected that command codes are reused; new command codes can only be 528 created by IETF Consensus (see Section 11.2.1). 530 1.2.1. Defining New AVP Values 532 New applications should attempt to reuse AVPs defined in existing 533 applications when possible, as opposed to creating new AVPs. For 534 AVPs of type Enumerated, an application may require a new value to 535 communicate some service-specific information. 537 In order to allocate a new AVP value, a request MUST be sent to IANA 538 [RFC2434], along with an explanation of the new AVP value. IANA 539 considerations for Diameter are discussed in Section 11. 541 1.2.2. Creating New AVPs 543 When no existing AVP can be used, a new AVP should be created. The 544 new AVP being defined MUST use one of the data types listed in 545 Section 4.2. 547 In the event that a logical grouping of AVPs is necessary, and 548 multiple "groups" are possible in a given command, it is recommended 549 that a Grouped AVP be used (see Section 4.4). 551 In order to create a new AVP, a request MUST be sent to IANA, with a 552 specification for the AVP. The request MUST include the commands 553 that would make use of the AVP. 555 1.2.3. Creating New Authentication Applications 557 Every Diameter application specification MUST have an IANA assigned 558 Application Identifier (see Section 2.4) or a vendor specific 559 Application Identifier. 561 Should a new Diameter usage scenario find itself unable to fit within 562 an existing application without requiring major changes to the 563 specification, it may be desirable to create a new Diameter 564 application. Major changes to an application include: 566 o Adding new AVPs to the command, which have the "M" bit set. 568 o Requiring a command that has a different number of round trips to 569 satisfy a request (e.g., application foo has a command that 570 requires one round trip, but new application bar has a command 571 that requires two round trips to complete). 573 o Adding support for an authentication method requiring definition 574 of new AVPs for use with the application. Since a new EAP 575 authentication method can be supported within Diameter without 576 requiring new AVPs, addition of EAP methods does not require the 577 creation of a new authentication application. 579 Creation of a new application should be viewed as a last resort. An 580 implementation MAY add arbitrary non-mandatory AVPs to any command 581 defined in an application, including vendor-specific AVPs without 582 needing to define a new application. Please refer to Section 11.1.1 583 for details. 585 In order to justify allocation of a new application identifier, 586 Diameter applications MUST define one Command Code, or add new 587 mandatory AVPs to the ABNF. 589 The expected AVPs MUST be defined in an ABNF [RFC2234] grammar (see 590 Section 3.2). If the Diameter application has accounting 591 requirements, it MUST also specify the AVPs that are to be present in 592 the Diameter Accounting messages (see Section 9.3). However, just 593 because a new authentication application id is required, does not 594 imply that a new accounting application id is required. 596 When possible, a new Diameter application SHOULD reuse existing 597 Diameter AVPs, in order to avoid defining multiple AVPs that carry 598 similar information. 600 1.2.4. Creating New Accounting Applications 602 There are services that only require Diameter accounting. Such 603 services need to define the AVPs carried in the Accounting-Request 604 (ACR)/ Accounting-Answer (ACA) messages, but do not need to define 605 new command codes. An implementation MAY add arbitrary non-mandatory 606 AVPs (AVPs with the "M" bit not set) to any command defined in an 607 application, including vendor-specific AVPs, without needing to 608 define a new accounting application. Please refer to Section 11.1.1 609 for details. 611 Application Identifiers are still required for Diameter capability 612 exchange. Every Diameter accounting application specification MUST 613 have an IANA assigned Application Identifier (see Section 2.4) or a 614 vendor specific Application Identifier. 616 Every Diameter implementation MUST support accounting. Basic 617 accounting support is sufficient to handle any application that uses 618 the ACR/ACA commands defined in this document, as long as no new 619 mandatory AVPs are added. A mandatory AVP is defined as one which 620 has the "M" bit set when sent within an accounting command, 621 regardless of whether it is required or optional within the ABNF for 622 the accounting application. 624 The creation of a new accounting application should be viewed as a 625 last resort and MUST NOT be used unless a new command or additional 626 mechanisms (e.g., application defined state machine) is defined 627 within the application, or new mandatory AVPs are added to the ABNF. 629 Within an accounting command, setting the "M" bit implies that a 630 backend server (e.g., billing server) or the accounting server itself 631 MUST understand the AVP in order to compute a correct bill. If the 632 AVP is not relevant to the billing process, when the AVP is included 633 within an accounting command, it MUST NOT have the "M" bit set, even 634 if the "M" bit is set when the same AVP is used within other Diameter 635 commands (i.e., authentication/authorization commands). 637 A DIAMETER base accounting implementation MUST be configurable to 638 advertise supported accounting applications in order to prevent the 639 accounting server from accepting accounting requests for unbillable 640 services. The combination of the home domain and the accounting 641 application Id can be used in order to route the request to the 642 appropriate accounting server. 644 When possible, a new Diameter accounting application SHOULD attempt 645 to reuse existing AVPs, in order to avoid defining multiple AVPs that 646 carry similar information. 648 If the base accounting is used without any mandatory AVPs, new 649 commands or additional mechanisms (e.g., application defined state 650 machine), then the base protocol defined standard accounting 651 application Id (Section 2.4) MUST be used in ACR/ACA commands. 653 1.2.5. Application Authentication Procedures 655 When possible, applications SHOULD be designed such that new 656 authentication methods MAY be added without requiring changes to the 657 application. This MAY require that new AVP values be assigned to 658 represent the new authentication transform, or any other scheme that 659 produces similar results. When possible, authentication frameworks, 660 such as Extensible Authentication Protocol [RFC2284], SHOULD be used. 662 1.3. Terminology 664 AAA 666 Authentication, Authorization and Accounting. 668 Accounting 670 The act of collecting information on resource usage for the 671 purpose of capacity planning, auditing, billing or cost 672 allocation. 674 Accounting Record 676 An accounting record represents a summary of the resource 677 consumption of a user over the entire session. Accounting servers 678 creating the accounting record may do so by processing interim 679 accounting events or accounting events from several devices 680 serving the same user. 682 Authentication 684 The act of verifying the identity of an entity (subject). 686 Authorization 688 The act of determining whether a requesting entity (subject) will 689 be allowed access to a resource (object). 691 AVP 693 The Diameter protocol consists of a header followed by one or more 694 Attribute-Value-Pairs (AVPs). An AVP includes a header and is 695 used to encapsulate protocol-specific data (e.g., routing 696 information) as well as authentication, authorization or 697 accounting information. 699 Broker 701 A broker is a business term commonly used in AAA infrastructures. 702 A broker is either a relay, proxy or redirect agent, and MAY be 703 operated by roaming consortiums. Depending on the business model, 704 a broker may either choose to deploy relay agents or proxy agents. 706 Diameter Agent 708 A Diameter Agent is a Diameter node that provides either relay, 709 proxy, redirect or translation services. 711 Diameter Client 713 A Diameter Client is a device at the edge of the network that 714 performs access control. An example of a Diameter client is a 715 Network Access Server (NAS) or a Foreign Agent (FA). 717 Diameter Node 719 A Diameter node is a host process that implements the Diameter 720 protocol, and acts either as a Client, Agent or Server. 722 Diameter Peer 724 A Diameter Peer is a Diameter Node to which a given Diameter Node 725 has a direct transport connection. 727 Diameter Security Exchange 729 A Diameter Security Exchange is a process through which two 730 Diameter nodes establish end-to-end security. 732 Diameter Server 734 A Diameter Server is one that handles authentication, 735 authorization and accounting requests for a particular realm. By 736 its very nature, a Diameter Server MUST support Diameter 737 applications in addition to the base protocol. 739 Downstream 741 Downstream is used to identify the direction of a particular 742 Diameter message from the home server towards the access device. 744 End-to-End Security 746 TLS and IPsec provide hop-by-hop security, or security across a 747 transport connection. When relays or proxy are involved, this 748 hop-by-hop security does not protect the entire Diameter user 749 session. End-to-end security is security between two Diameter 750 nodes, possibly communicating through Diameter Agents. This 751 security protects the entire Diameter communications path from the 752 originating Diameter node to the terminating Diameter node. 754 Home Realm 756 A Home Realm is the administrative domain with which the user 757 maintains an account relationship. 759 Home Server 761 See Diameter Server. 763 Interim accounting 765 An interim accounting message provides a snapshot of usage during 766 a user's session. It is typically implemented in order to provide 767 for partial accounting of a user's session in the case of a device 768 reboot or other network problem prevents the reception of a 769 session summary message or session record. 771 Local Realm 773 A local realm is the administrative domain providing services to a 774 user. An administrative domain MAY act as a local realm for 775 certain users, while being a home realm for others. 777 Multi-session 779 A multi-session represents a logical linking of several sessions. 780 Multi-sessions are tracked by using the Acct-Multi-Session-Id. An 781 example of a multi-session would be a Multi-link PPP bundle. Each 782 leg of the bundle would be a session while the entire bundle would 783 be a multi-session. 785 Network Access Identifier 787 The Network Access Identifier, or NAI [RFC2486], is used in the 788 Diameter protocol to extract a user's identity and realm. The 789 identity is used to identify the user during authentication and/or 790 authorization, while the realm is used for message routing 791 purposes. 793 Proxy Agent or Proxy 795 In addition to forwarding requests and responses, proxies make 796 policy decisions relating to resource usage and provisioning. 797 This is typically accomplished by tracking the state of NAS 798 devices. While proxies typically do not respond to client 799 Requests prior to receiving a Response from the server, they may 800 originate Reject messages in cases where policies are violated. 801 As a result, proxies need to understand the semantics of the 802 messages passing through them, and may not support all Diameter 803 applications. 805 Realm 807 The string in the NAI that immediately follows the '@' character. 808 NAI realm names are required to be unique, and are piggybacked on 809 the administration of the DNS namespace. Diameter makes use of 810 the realm, also loosely referred to as domain, to determine 811 whether messages can be satisfied locally, or whether they must be 812 routed or redirected. In RADIUS, realm names are not necessarily 813 piggybacked on the DNS namespace but may be independent of it. 815 Real-time Accounting 817 Real-time accounting involves the processing of information on 818 resource usage within a defined time window. Time constraints are 819 typically imposed in order to limit financial risk. 821 Relay Agent or Relay 823 Relays forward requests and responses based on routing-related 824 AVPs and realm routing table entries. Since relays do not make 825 policy decisions, they do not examine or alter non-routing AVPs. 826 As a result, relays never originate messages, do not need to 827 understand the semantics of messages or non-routing AVPs, and are 828 capable of handling any Diameter application or message type. 829 Since relays make decisions based on information in routing AVPs 830 and realm forwarding tables they do not keep state on NAS resource 831 usage or sessions in progress. 833 Redirect Agent 835 Rather than forwarding requests and responses between clients and 836 servers, redirect agents refer clients to servers and allow them 837 to communicate directly. Since redirect agents do not sit in the 838 forwarding path, they do not alter any AVPs transiting between 839 client and server. Redirect agents do not originate messages and 840 are capable of handling any message type, although they may be 841 configured only to redirect messages of certain types, while 842 acting as relay or proxy agents for other types. As with proxy 843 agents, redirect agents do not keep state with respect to sessions 844 or NAS resources. 846 Roaming Relationships 848 Roaming relationships include relationships between companies and 849 ISPs, relationships among peer ISPs within a roaming consortium, 850 and relationships between an ISP and a roaming consortium. 852 Security Association 854 A security association is an association between two endpoints in 855 a Diameter session which allows the endpoints to communicate with 856 integrity and confidentially, even in the presence of relays 857 and/or proxies. 859 Session 861 A session is a related progression of events devoted to a 862 particular activity. Each application SHOULD provide guidelines 863 as to when a session begins and ends. All Diameter packets with 864 the same Session-Identifier are considered to be part of the same 865 session. 867 Session state 869 A stateful agent is one that maintains session state information, 870 by keeping track of all authorized active sessions. Each 871 authorized session is bound to a particular service, and its state 872 is considered active either until it is notified otherwise, or by 873 expiration. 875 Sub-session 877 A sub-session represents a distinct service (e.g., QoS or data 878 characteristics) provided to a given session. These services may 879 happen concurrently (e.g., simultaneous voice and data transfer 880 during the same session) or serially. These changes in sessions 881 are tracked with the Accounting-Sub-Session-Id. 883 Transaction state 885 The Diameter protocol requires that agents maintain transaction 886 state, which is used for failover purposes. Transaction state 887 implies that upon forwarding a request, the Hop-by-Hop identifier 888 is saved; the field is replaced with a locally unique identifier, 889 which is restored to its original value when the corresponding 890 answer is received. The request's state is released upon receipt 891 of the answer. A stateless agent is one that only maintains 892 transaction state. 894 Translation Agent 896 A translation agent is a stateful Diameter node that performs 897 protocol translation between Diameter and another AAA protocol, 898 such as RADIUS. 900 Transport Connection 902 A transport connection is a TCP or SCTP connection existing 903 directly between two Diameter peers, otherwise known as a Peer- 904 to-Peer Connection. 906 Upstream 908 Upstream is used to identify the direction of a particular 909 Diameter message from the access device towards the home server. 911 User 913 The entity requesting or using some resource, in support of which 914 a Diameter client has generated a request. 916 2. Protocol Overview 918 The base Diameter protocol may be used by itself for accounting 919 applications, but for use in authentication and authorization it is 920 always extended for a particular application. Two Diameter 921 applications are defined by companion documents: NASREQ [RFC4005], 922 Mobile IPv4 [RFC4004]. These applications are introduced in this 923 document but specified elsewhere. Additional Diameter applications 924 MAY be defined in the future (see Section 11.3). 926 Diameter Clients MUST support the base protocol, which includes 927 accounting. In addition, they MUST fully support each Diameter 928 application that is needed to implement the client's service, e.g., 929 NASREQ and/or Mobile IPv4. A Diameter Client that does not support 930 both NASREQ and Mobile IPv4, MUST be referred to as "Diameter X 931 Client" where X is the application which it supports, and not a 932 "Diameter Client". 934 Diameter Servers MUST support the base protocol, which includes 935 accounting. In addition, they MUST fully support each Diameter 936 application that is needed to implement the intended service, e.g., 937 NASREQ and/or Mobile IPv4. A Diameter Server that does not support 938 both NASREQ and Mobile IPv4, MUST be referred to as "Diameter X 939 Server" where X is the application which it supports, and not a 940 "Diameter Server". 942 Diameter Relays and redirect agents are, by definition, protocol 943 transparent, and MUST transparently support the Diameter base 944 protocol, which includes accounting, and all Diameter applications. 946 Diameter proxies MUST support the base protocol, which includes 947 accounting. In addition, they MUST fully support each Diameter 948 application that is needed to implement proxied services, e.g., 949 NASREQ and/or Mobile IPv4. A Diameter proxy which does not support 950 also both NASREQ and Mobile IPv4, MUST be referred to as "Diameter X 951 Proxy" where X is the application which it supports, and not a 952 "Diameter Proxy". 954 The base Diameter protocol concerns itself with capabilities 955 negotiation, how messages are sent and how peers may eventually be 956 abandoned. The base protocol also defines certain rules that apply 957 to all exchanges of messages between Diameter nodes. 959 Communication between Diameter peers begins with one peer sending a 960 message to another Diameter peer. The set of AVPs included in the 961 message is determined by a particular Diameter application. One AVP 962 that is included to reference a user's session is the Session-Id. 964 The initial request for authentication and/or authorization of a user 965 would include the Session-Id. The Session-Id is then used in all 966 subsequent messages to identify the user's session (see Section 8 for 967 more information). The communicating party may accept the request, 968 or reject it by returning an answer message with the Result-Code AVP 969 set to indicate an error occurred. The specific behavior of the 970 Diameter server or client receiving a request depends on the Diameter 971 application employed. 973 Session state (associated with a Session-Id) MUST be freed upon 974 receipt of the Session-Termination-Request, Session-Termination- 975 Answer, expiration of authorized service time in the Session-Timeout 976 AVP, and according to rules established in a particular Diameter 977 application. 979 2.1. Transport 981 Transport profile is defined in [RFC3539]. 983 The base Diameter protocol is run on port 3868 of both TCP [TCP] and 984 SCTP [RFC2960] transport protocols. 986 Diameter clients MUST support either TCP or SCTP, while agents and 987 servers MUST support both. Future versions of this specification MAY 988 mandate that clients support SCTP. 990 A Diameter node MAY initiate connections from a source port other 991 than the one that it declares it accepts incoming connections on, and 992 MUST be prepared to receive connections on port 3868. A given 993 Diameter instance of the peer state machine MUST NOT use more than 994 one transport connection to communicate with a given peer, unless 995 multiple instances exist on the peer in which case a separate 996 connection per process is allowed. 998 When no transport connection exists with a peer, an attempt to 999 connect SHOULD be periodically made. This behavior is handled via 1000 the Tc timer, whose recommended value is 30 seconds. There are 1001 certain exceptions to this rule, such as when a peer has terminated 1002 the transport connection stating that it does not wish to 1003 communicate. 1005 When connecting to a peer and either zero or more transports are 1006 specified, SCTP SHOULD be tried first, followed by TCP. See Section 1007 5.2 for more information on peer discovery. 1009 Diameter implementations SHOULD be able to interpret ICMP protocol 1010 port unreachable messages as explicit indications that the server is 1011 not reachable, subject to security policy on trusting such messages. 1013 Diameter implementations SHOULD also be able to interpret a reset 1014 from the transport and timed-out connection attempts. If Diameter 1015 receives data up from TCP that cannot be parsed or identified as a 1016 Diameter error made by the peer, the stream is compromised and cannot 1017 be recovered. The transport connection MUST be closed using a RESET 1018 call (send a TCP RST bit) or an SCTP ABORT message (graceful closure 1019 is compromised). 1021 2.1.1. SCTP Guidelines 1023 The following are guidelines for Diameter implementations that 1024 support SCTP: 1026 1. For interoperability: All Diameter nodes MUST be prepared to 1027 receive Diameter messages on any SCTP stream in the association. 1029 2. To prevent blocking: All Diameter nodes SHOULD utilize all SCTP 1030 streams available to the association to prevent head-of-the-line 1031 blocking. 1033 2.2. Securing Diameter Messages 1035 Diameter clients, such as Network Access Servers (NASes) and Mobility 1036 Agents MUST support IP Security [RFC2401], and MAY support TLS 1037 [RFC2246]. Diameter servers MUST support TLS and IPsec. The 1038 Diameter protocol MUST NOT be used without any security mechanism 1039 (TLS or IPsec). 1041 It is suggested that IPsec can be used primarily at the edges and in 1042 intra-domain traffic, such as using pre-shared keys between a NAS a 1043 local AAA proxy. This also eases the requirements on the NAS to 1044 support certificates. It is also suggested that inter-domain traffic 1045 would primarily use TLS. See Sections 13.1 and 13.2 for more details 1046 on IPsec and TLS usage. 1048 2.3. Diameter Application Compliance 1050 Application Identifiers are advertised during the capabilities 1051 exchange phase (see Section 5.3). For a given application, 1052 advertising support of an application implies that the sender 1053 supports all command codes, and the AVPs specified in the associated 1054 ABNFs, described in the specification. 1056 An implementation MAY add arbitrary non-mandatory AVPs to any command 1057 defined in an application, including vendor-specific AVPs. Please 1058 refer to Section 11.1.1 for details. 1060 2.4. Application Identifiers 1062 Each Diameter application MUST have an IANA assigned Application 1063 Identifier (see Section 11.3). The base protocol does not require an 1064 Application Identifier since its support is mandatory. During the 1065 capabilities exchange, Diameter nodes inform their peers of locally 1066 supported applications. Furthermore, all Diameter messages contain 1067 an Application Identifier, which is used in the message forwarding 1068 process. 1070 The following Application Identifier values are defined: 1072 Diameter Common Messages 0 1073 NASREQ 1 [RFC4005] 1074 Mobile-IP 2 [RFC4004] 1075 Diameter Base Accounting 3 1076 Relay 0xffffffff 1078 Relay and redirect agents MUST advertise the Relay Application 1079 Identifier, while all other Diameter nodes MUST advertise locally 1080 supported applications. The receiver of a Capabilities Exchange 1081 message advertising Relay service MUST assume that the sender 1082 supports all current and future applications. 1084 Diameter relay and proxy agents are responsible for finding an 1085 upstream server that supports the application of a particular 1086 message. If none can be found, an error message is returned with the 1087 Result-Code AVP set to DIAMETER_UNABLE_TO_DELIVER. 1089 2.5. Connections vs. Sessions 1091 This section attempts to provide the reader with an understanding of 1092 the difference between connection and session, which are terms used 1093 extensively throughout this document. 1095 A connection is a transport level connection between two peers, used 1096 to send and receive Diameter messages. A session is a logical 1097 concept at the application layer, and is shared between an access 1098 device and a server, and is identified via the Session-Id AVP. 1100 +--------+ +-------+ +--------+ 1101 | Client | | Relay | | Server | 1102 +--------+ +-------+ +--------+ 1103 <----------> <----------> 1104 peer connection A peer connection B 1106 <-----------------------------> 1107 User session x 1109 Figure 1: Diameter connections and sessions 1111 In the example provided in Figure 1, peer connection A is established 1112 between the Client and its local Relay. Peer connection B is 1113 established between the Relay and the Server. User session X spans 1114 from the Client via the Relay to the Server. Each "user" of a 1115 service causes an auth request to be sent, with a unique session 1116 identifier. Once accepted by the server, both the client and the 1117 server are aware of the session. It is important to note that there 1118 is no relationship between a connection and a session, and that 1119 Diameter messages for multiple sessions are all multiplexed through a 1120 single connection. 1122 2.6. Peer Table 1124 The Diameter Peer Table is used in message forwarding, and referenced 1125 by the Realm Routing Table. A Peer Table entry contains the 1126 following fields: 1128 Host identity 1130 Following the conventions described for the DiameterIdentity 1131 derived AVP data format in Section 4.4. This field contains the 1132 contents of the Origin-Host (Section 6.3) AVP found in the CER or 1133 CEA message. 1135 StatusT 1137 This is the state of the peer entry, and MUST match one of the 1138 values listed in Section 5.6. 1140 Static or Dynamic 1142 Specifies whether a peer entry was statically configured, or 1143 dynamically discovered. 1145 Expiration time 1147 Specifies the time at which dynamically discovered peer table 1148 entries are to be either refreshed, or expired. 1150 TLS Enabled 1152 Specifies whether TLS is to be used when communicating with the 1153 peer. 1155 Additional security information, when needed (e.g., keys, 1156 certificates) 1158 2.7. Realm-Based Routing Table 1160 All Realm-Based routing lookups are performed against what is 1161 commonly known as the Realm Routing Table (see Section 12). A Realm 1162 Routing Table Entry contains the following fields: 1164 Realm Name 1166 This is the field that is typically used as a primary key in the 1167 routing table lookups. Note that some implementations perform 1168 their lookups based on longest-match-from-the-right on the realm 1169 rather than requiring an exact match. 1171 Application Identifier 1173 An application is identified by a vendor id and an application id. 1174 For all IETF standards track Diameter applications, the vendor id 1175 is zero. A route entry can have a different destination based on 1176 the application identification AVP of the message. This field 1177 MUST be used as a secondary key field in routing table lookups. 1179 Local Action 1181 The Local Action field is used to identify how a message should be 1182 treated. The following actions are supported: 1184 1. LOCAL - Diameter messages that resolve to a route entry with 1185 the Local Action set to Local can be satisfied locally, and do 1186 not need to be routed to another server. 1188 2. RELAY - All Diameter messages that fall within this category 1189 MUST be routed to a next hop server, without modifying any 1190 non-routing AVPs. See Section 6.1.8 for relaying guidelines 1192 3. PROXY - All Diameter messages that fall within this category 1193 MUST be routed to a next hop server. The local server MAY 1194 apply its local policies to the message by including new AVPs 1195 to the message prior to routing. See Section 6.1.8 for 1196 proxying guidelines. 1198 4. REDIRECT - Diameter messages that fall within this category 1199 MUST have the identity of the home Diameter server(s) 1200 appended, and returned to the sender of the message. See 1201 Section 6.1.7 for redirect guidelines. 1203 Server Identifier 1205 One or more servers the message is to be routed to. These servers 1206 MUST also be present in the Peer table. When the Local Action is 1207 set to RELAY or PROXY, this field contains the identity of the 1208 server(s) the message must be routed to. When the Local Action 1209 field is set to REDIRECT, this field contains the identity of one 1210 or more servers the message should be redirected to. 1212 Static or Dynamic 1214 Specifies whether a route entry was statically configured, or 1215 dynamically discovered. 1217 Expiration time 1219 Specifies the time which a dynamically discovered route table 1220 entry expires. 1222 It is important to note that Diameter agents MUST support at least 1223 one of the LOCAL, RELAY, PROXY or REDIRECT modes of operation. 1224 Agents do not need to support all modes of operation in order to 1225 conform with the protocol specification, but MUST follow the protocol 1226 compliance guidelines in Section 2. Relay agents MUST NOT reorder 1227 AVPs, and proxies MUST NOT reorder AVPs. 1229 The routing table MAY include a default entry that MUST be used for 1230 any requests not matching any of the other entries. The routing 1231 table MAY consist of only such an entry. 1233 When a request is routed, the target server MUST have advertised the 1234 Application Identifier (see Section 2.4) for the given message, or 1235 have advertised itself as a relay or proxy agent. Otherwise, an 1236 error is returned with the Result-Code AVP set to 1237 DIAMETER_UNABLE_TO_DELIVER. 1239 2.8. Role of Diameter Agents 1241 In addition to client and servers, the Diameter protocol introduces 1242 relay, proxy, redirect, and translation agents, each of which is 1243 defined in Section 1.3. These Diameter agents are useful for several 1244 reasons: 1246 o They can distribute administration of systems to a configurable 1247 grouping, including the maintenance of security associations. 1249 o They can be used for concentration of requests from an number of 1250 co-located or distributed NAS equipment sets to a set of like user 1251 groups. 1253 o They can do value-added processing to the requests or responses. 1255 o They can be used for load balancing. 1257 o A complex network will have multiple authentication sources, they 1258 can sort requests and forward towards the correct target. 1260 The Diameter protocol requires that agents maintain transaction 1261 state, which is used for failover purposes. Transaction state 1262 implies that upon forwarding a request, its Hop-by-Hop identifier is 1263 saved; the field is replaced with a locally unique identifier, which 1264 is restored to its original value when the corresponding answer is 1265 received. The request's state is released upon receipt of the 1266 answer. A stateless agent is one that only maintains transaction 1267 state. 1269 The Proxy-Info AVP allows stateless agents to add local state to a 1270 Diameter request, with the guarantee that the same state will be 1271 present in the answer. However, the protocol's failover procedures 1272 require that agents maintain a copy of pending requests. 1274 A stateful agent is one that maintains session state information; by 1275 keeping track of all authorized active sessions. Each authorized 1276 session is bound to a particular service, and its state is considered 1277 active either until it is notified otherwise, or by expiration. Each 1278 authorized session has an expiration, which is communicated by 1279 Diameter servers via the Session-Timeout AVP. 1281 Maintaining session state MAY be useful in certain applications, such 1282 as: 1284 o Protocol translation (e.g., RADIUS <-> Diameter) 1286 o Limiting resources authorized to a particular user 1288 o Per user or transaction auditing 1290 A Diameter agent MAY act in a stateful manner for some requests and 1291 be stateless for others. A Diameter implementation MAY act as one 1292 type of agent for some requests, and as another type of agent for 1293 others. 1295 2.8.1. Relay Agents 1297 Relay Agents are Diameter agents that accept requests and route 1298 messages to other Diameter nodes based on information found in the 1299 messages (e.g., Destination-Realm). This routing decision is 1300 performed using a list of supported realms, and known peers. This is 1301 known as the Realm Routing Table, as is defined further in Section 1302 2.7. 1304 Relays MAY be used to aggregate requests from multiple Network Access 1305 Servers (NASes) within a common geographical area (POP). The use of 1306 Relays is advantageous since it eliminates the need for NASes to be 1307 configured with the necessary security information they would 1308 otherwise require to communicate with Diameter servers in other 1309 realms. Likewise, this reduces the configuration load on Diameter 1310 servers that would otherwise be necessary when NASes are added, 1311 changed or deleted. 1313 Relays modify Diameter messages by inserting and removing routing 1314 information, but do not modify any other portion of a message. 1315 Relays SHOULD NOT maintain session state but MUST maintain 1316 transaction state. 1318 +------+ ---------> +------+ ---------> +------+ 1319 | | 1. Request | | 2. Request | | 1320 | NAS | | DRL | | HMS | 1321 | | 4. Answer | | 3. Answer | | 1322 +------+ <--------- +------+ <--------- +------+ 1323 example.net example.net example.com 1325 Figure 2: Relaying of Diameter messages 1327 The example provided in Figure 2 depicts a request issued from NAS, 1328 which is an access device, for the user bob@example.com. Prior to 1329 issuing the request, NAS performs a Diameter route lookup, using 1330 "example.com" as the key, and determines that the message is to be 1331 relayed to DRL, which is a Diameter Relay. DRL performs the same 1332 route lookup as NAS, and relays the message to HMS, which is 1333 example.com's Home Diameter Server. HMS identifies that the request 1334 can be locally supported (via the realm), processes the 1335 authentication and/or authorization request, and replies with an 1336 answer, which is routed back to NAS using saved transaction state. 1338 Since Relays do not perform any application level processing, they 1339 provide relaying services for all Diameter applications, and 1340 therefore MUST advertise the Relay Application Identifier. 1342 2.8.2. Proxy Agents 1344 Similarly to relays, proxy agents route Diameter messages using the 1345 Diameter Routing Table. However, they differ since they modify 1346 messages to implement policy enforcement. This requires that proxies 1347 maintain the state of their downstream peers (e.g., access devices) 1348 to enforce resource usage, provide admission control, and 1349 provisioning. 1351 It is important to note that although proxies MAY provide a value-add 1352 function for NASes, they do not allow access devices to use end-to- 1353 end security, since modifying messages breaks authentication. 1355 Proxies MAY be used in call control centers or access ISPs that 1356 provide outsourced connections, they can monitor the number and types 1357 of ports in use, and make allocation and admission decisions 1358 according to their configuration. 1360 Proxies that wish to limit resources MUST maintain session state. 1361 All proxies MUST maintain transaction state. 1363 Since enforcing policies requires an understanding of the service 1364 being provided, Proxies MUST only advertise the Diameter applications 1365 they support. 1367 2.8.3. Redirect Agents 1369 Redirect agents are useful in scenarios where the Diameter routing 1370 configuration needs to be centralized. An example is a redirect 1371 agent that provides services to all members of a consortium, but does 1372 not wish to be burdened with relaying all messages between realms. 1373 This scenario is advantageous since it does not require that the 1374 consortium provide routing updates to its members when changes are 1375 made to a member's infrastructure. 1377 Since redirect agents do not relay messages, and only return an 1378 answer with the information necessary for Diameter agents to 1379 communicate directly, they do not modify messages. Since redirect 1380 agents do not receive answer messages, they cannot maintain session 1381 state. Further, since redirect agents never relay requests, they are 1382 not required to maintain transaction state. 1384 The example provided in Figure 3 depicts a request issued from the 1385 access device, NAS, for the user bob@example.com. The message is 1386 forwarded by the NAS to its relay, DRL, which does not have a routing 1387 entry in its Diameter Routing Table for example.com. DRL has a 1388 default route configured to DRD, which is a redirect agent that 1389 returns a redirect notification to DRL, as well as HMS' contact 1390 information. Upon receipt of the redirect notification, DRL 1391 establishes a transport connection with HMS, if one doesn't already 1392 exist, and forwards the request to it. 1394 +------+ 1395 | | 1396 | DRD | 1397 | | 1398 +------+ 1399 ^ | 1400 2. Request | | 3. Redirection 1401 | | Notification 1402 | v 1403 +------+ ---------> +------+ ---------> +------+ 1404 | | 1. Request | | 4. Request | | 1405 | NAS | | DRL | | HMS | 1406 | | 6. Answer | | 5. Answer | | 1407 +------+ <--------- +------+ <--------- +------+ 1408 example.net example.net example.com 1410 Figure 3: Redirecting a Diameter Message 1412 Since redirect agents do not perform any application level 1413 processing, they provide relaying services for all Diameter 1414 applications, and therefore MUST advertise the Relay Application 1415 Identifier. 1417 2.8.4. Translation Agents 1419 A translation agent is a device that provides translation between two 1420 protocols (e.g., RADIUS<->Diameter, TACACS+<->Diameter). Translation 1421 agents are likely to be used as aggregation servers to communicate 1422 with a Diameter infrastructure, while allowing for the embedded 1423 systems to be migrated at a slower pace. 1425 Given that the Diameter protocol introduces the concept of long-lived 1426 authorized sessions, translation agents MUST be session stateful and 1427 MUST maintain transaction state. 1429 Translation of messages can only occur if the agent recognizes the 1430 application of a particular request, and therefore translation agents 1431 MUST only advertise their locally supported applications. 1433 +------+ ---------> +------+ ---------> +------+ 1434 | | RADIUS Request | | Diameter Request | | 1435 | NAS | | TLA | | HMS | 1436 | | RADIUS Answer | | Diameter Answer | | 1437 +------+ <--------- +------+ <--------- +------+ 1438 example.net example.net example.com 1440 Figure 4: Translation of RADIUS to Diameter 1442 2.9. End-to-End Security Framework 1444 End-to-end security services include confidentiality and message 1445 origin authentication. These services are provided by supporting AVP 1446 integrity and confidentiality between two peers, communicating 1447 through agents. 1449 End-to-end security is provided via the End-to-End security 1450 extension, described in [AAACMS]. The circumstances requiring the 1451 use of end-to-end security are determined by policy on each of the 1452 peers. Security policies, which are not the subject of 1453 standardization, may be applied by next hop Diameter peer or by 1454 destination realm. For example, where TLS or IPsec transmission- 1455 level security is sufficient, there may be no need for end-to-end 1456 security. 1458 End-to-end security policies include: 1460 o Never use end-to-end security. 1462 o Use end-to-end security on messages containing sensitive AVPs. 1463 Which AVPs are sensitive is determined by service provider policy. 1464 AVPs containing keys and passwords should be considered sensitive. 1465 Accounting AVPs may be considered sensitive. Any AVP for which 1466 the P bit may be set or which may be encrypted may be considered 1467 sensitive. 1469 o Always use end-to-end security. 1471 It is strongly RECOMMENDED that all Diameter implementations support 1472 end-to-end security. 1474 2.10. Diameter Path Authorization 1476 As noted in Section 2.2, Diameter requires transmission level 1477 security to be used on each connection (TLS or IPsec). Therefore, 1478 each connection is authenticated, replay and integrity protected and 1479 confidential on a per-packet basis. 1481 In addition to authenticating each connection, each connection as 1482 well as the entire session MUST also be authorized. Before 1483 initiating a connection, a Diameter Peer MUST check that its peers 1484 are authorized to act in their roles. For example, a Diameter peer 1485 may be authentic, but that does not mean that it is authorized to act 1486 as a Diameter Server advertising a set of Diameter applications. 1488 Prior to bringing up a connection, authorization checks are performed 1489 at each connection along the path. Diameter capabilities negotiation 1490 (CER/CEA) also MUST be carried out, in order to determine what 1491 Diameter applications are supported by each peer. Diameter sessions 1492 MUST be routed only through authorized nodes that have advertised 1493 support for the Diameter application required by the session. 1495 As noted in Section 6.1.8, a relay or proxy agent MUST append a 1496 Route-Record AVP to all requests forwarded. The AVP contains the 1497 identity of the peer the request was received from. 1499 The home Diameter server, prior to authorizing a session, MUST check 1500 the Route-Record AVPs to make sure that the route traversed by the 1501 request is acceptable. For example, administrators within the home 1502 realm may not wish to honor requests that have been routed through an 1503 untrusted realm. By authorizing a request, the home Diameter server 1504 is implicitly indicating its willingness to engage in the business 1505 transaction as specified by the contractual relationship between the 1506 server and the previous hop. A DIAMETER_AUTHORIZATION_REJECTED error 1507 message (see Section 7.1.5) is sent if the route traversed by the 1508 request is unacceptable. 1510 A home realm may also wish to check that each accounting request 1511 message corresponds to a Diameter response authorizing the session. 1512 Accounting requests without corresponding authorization responses 1513 SHOULD be subjected to further scrutiny, as should accounting 1514 requests indicating a difference between the requested and provided 1515 service. 1517 Similarly, the local Diameter agent, on receiving a Diameter response 1518 authorizing a session, MUST check the Route-Record AVPs to make sure 1519 that the route traversed by the response is acceptable. At each 1520 step, forwarding of an authorization response is considered evidence 1521 of a willingness to take on financial risk relative to the session. 1522 A local realm may wish to limit this exposure, for example, by 1523 establishing credit limits for intermediate realms and refusing to 1524 accept responses which would violate those limits. By issuing an 1525 accounting request corresponding to the authorization response, the 1526 local realm implicitly indicates its agreement to provide the service 1527 indicated in the authorization response. If the service cannot be 1528 provided by the local realm, then a DIAMETER_UNABLE_TO_COMPLY error 1529 message MUST be sent within the accounting request; a Diameter client 1530 receiving an authorization response for a service that it cannot 1531 perform MUST NOT substitute an alternate service, and then send 1532 accounting requests for the alternate service instead. 1534 3. Diameter Header 1536 A summary of the Diameter header format is shown below. The fields 1537 are transmitted in network byte order. 1539 0 1 2 3 1540 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 1541 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1542 | Version | Message Length | 1543 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1544 | command flags | Command-Code | 1545 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1546 | Application-ID | 1547 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1548 | Hop-by-Hop Identifier | 1549 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1550 | End-to-End Identifier | 1551 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1552 | AVPs ... 1553 +-+-+-+-+-+-+-+-+-+-+-+-+- 1555 Version 1557 This Version field MUST be set to 1 to indicate Diameter Version 1558 1. 1560 Message Length 1562 The Message Length field is three octets and indicates the length 1563 of the Diameter message including the header fields. 1565 Command Flags 1567 The Command Flags field is eight bits. The following bits are 1568 assigned: 1570 0 1 2 3 4 5 6 7 1571 +-+-+-+-+-+-+-+-+ 1572 |R P E T r r r r| 1573 +-+-+-+-+-+-+-+-+ 1575 R(equest) 1577 If set, the message is a request. If cleared, the message is 1578 an answer. 1580 P(roxiable) 1582 If set, the message MAY be proxied, relayed or redirected. If 1583 cleared, the message MUST be locally processed. 1585 E(rror) 1587 If set, the message contains a protocol error, and the message 1588 will not conform to the ABNF described for this command. 1589 Messages with the 'E' bit set are commonly referred to as error 1590 messages. This bit MUST NOT be set in request messages. See 1591 Section 7.2. 1593 T(Potentially re-transmitted message) 1595 This flag is set after a link failover procedure, to aid the 1596 removal of duplicate requests. It is set when resending 1597 requests not yet acknowledged, as an indication of a possible 1598 duplicate due to a link failure. This bit MUST be cleared when 1599 sending a request for the first time, otherwise the sender MUST 1600 set this flag. Diameter agents only need to be concerned about 1601 the number of requests they send based on a single received 1602 request; retransmissions by other entities need not be tracked. 1603 Diameter agents that receive a request with the T flag set, 1604 MUST keep the T flag set in the forwarded request. This flag 1605 MUST NOT be set if an error answer message (e.g., a protocol 1606 error) has been received for the earlier message. It can be 1607 set only in cases where no answer has been received from the 1608 server for a request and the request is sent again. This flag 1609 MUST NOT be set in answer messages. 1611 r(eserved) 1613 These flag bits are reserved for future use, and MUST be set to 1614 zero, and ignored by the receiver. 1616 Command-Code 1618 The Command-Code field is three octets, and is used in order to 1619 communicate the command associated with the message. The 24-bit 1620 address space is managed by IANA (see Section 11.2.1). 1622 Command-Code values 16,777,214 and 16,777,215 (hexadecimal values 1623 FFFFFE -FFFFFF) are reserved for experimental use (See Section 1624 11.3). 1626 Application-ID 1628 Application-ID is four octets and is used to identify to which 1629 application the message is applicable for. The application can be 1630 an authentication application, an accounting application or a 1631 vendor specific application. See Section 11.3 for the possible 1632 values that the application-id may use. 1634 The application-id in the header MUST be the same as what is 1635 contained in any relevant AVPs contained in the message. 1637 Hop-by-Hop Identifier 1639 The Hop-by-Hop Identifier is an unsigned 32-bit integer field (in 1640 network byte order) and aids in matching requests and replies. 1641 The sender MUST ensure that the Hop-by-Hop identifier in a request 1642 is unique on a given connection at any given time, and MAY attempt 1643 to ensure that the number is unique across reboots. The sender of 1644 an Answer message MUST ensure that the Hop-by-Hop Identifier field 1645 contains the same value that was found in the corresponding 1646 request. The Hop-by-Hop identifier is normally a monotonically 1647 increasing number, whose start value was randomly generated. An 1648 answer message that is received with an unknown Hop-by-Hop 1649 Identifier MUST be discarded. 1651 End-to-End Identifier 1653 The End-to-End Identifier is an unsigned 32-bit integer field (in 1654 network byte order) and is used to detect duplicate messages. 1655 Upon reboot implementations MAY set the high order 12 bits to 1656 contain the low order 12 bits of current time, and the low order 1657 20 bits to a random value. Senders of request messages MUST 1658 insert a unique identifier on each message. The identifier MUST 1659 remain locally unique for a period of at least 4 minutes, even 1660 across reboots. The originator of an Answer message MUST ensure 1661 that the End-to-End Identifier field contains the same value that 1662 was found in the corresponding request. The End-to-End Identifier 1663 MUST NOT be modified by Diameter agents of any kind. The 1664 combination of the Origin-Host (see Section 6.3) and this field is 1665 used to detect duplicates. Duplicate requests SHOULD cause the 1666 same answer to be transmitted (modulo the hop-by-hop Identifier 1667 field and any routing AVPs that may be present), and MUST NOT 1668 affect any state that was set when the original request was 1669 processed. Duplicate answer messages that are to be locally 1670 consumed (see Section 6.2) SHOULD be silently discarded. 1672 AVPs 1674 AVPs are a method of encapsulating information relevant to the 1675 Diameter message. See Section 4 for more information on AVPs. 1677 3.1. Command Codes 1679 Each command Request/Answer pair is assigned a command code, and the 1680 sub-type (i.e., request or answer) is identified via the 'R' bit in 1681 the Command Flags field of the Diameter header. 1683 Every Diameter message MUST contain a command code in its header's 1684 Command-Code field, which is used to determine the action that is to 1685 be taken for a particular message. The following Command Codes are 1686 defined in the Diameter base protocol: 1688 Command-Name Abbrev. Code Reference 1689 -------------------------------------------------------- 1690 Abort-Session-Request ASR 274 8.5.1 1691 Abort-Session-Answer ASA 274 8.5.2 1692 Accounting-Request ACR 271 9.7.1 1693 Accounting-Answer ACA 271 9.7.2 1694 Capabilities-Exchange- CER 257 5.3.1 1695 Request 1696 Capabilities-Exchange- CEA 257 5.3.2 1697 Answer 1698 Device-Watchdog-Request DWR 280 5.5.1 1699 Device-Watchdog-Answer DWA 280 5.5.2 1700 Disconnect-Peer-Request DPR 282 5.4.1 1701 Disconnect-Peer-Answer DPA 282 5.4.2 1702 Re-Auth-Request RAR 258 8.3.1 1703 Re-Auth-Answer RAA 258 8.3.2 1704 Session-Termination- STR 275 8.4.1 1705 Request 1706 Session-Termination- STA 275 8.4.2 1707 Answer 1709 3.2. Command Code ABNF specification 1711 Every Command Code defined MUST include a corresponding ABNF 1712 specification, which is used to define the AVPs that MUST or MAY be 1713 present. The following format is used in the definition: 1715 command-def = command-name "::=" diameter-message 1717 command-name = diameter-name 1719 diameter-name = ALPHA *(ALPHA / DIGIT / "-") 1721 diameter-message = header [ *fixed] [ *required] [ *optional] 1722 [ *fixed] 1724 header = "<" Diameter-Header:" command-id 1725 [r-bit] [p-bit] [e-bit] [application-id]">" 1727 application-id = 1*DIGIT 1729 command-id = 1*DIGIT 1730 ; The Command Code assigned to the command 1732 r-bit = ", REQ" 1733 ; If present, the 'R' bit in the Command 1734 ; Flags is set, indicating that the message 1735 ; is a request, as opposed to an answer. 1737 p-bit = ", PXY" 1738 ; If present, the 'P' bit in the Command 1739 ; Flags is set, indicating that the message 1740 ; is proxiable. 1742 e-bit = ", ERR" 1743 ; If present, the 'E' bit in the Command 1744 ; Flags is set, indicating that the answer 1745 ; message contains a Result-Code AVP in 1746 ; the "protocol error" class. 1748 fixed = [qual] "<" avp-spec ">" 1749 ; Defines the fixed position of an AVP 1751 required = [qual] "{" avp-spec "}" 1752 ; The AVP MUST be present and can appear 1753 ; anywhere in the message. 1755 optional = [qual] "[" avp-name "]" 1756 ; The avp-name in the 'optional' rule cannot 1757 ; evaluate to any AVP Name which is included 1758 ; in a fixed or required rule. The AVP can 1759 ; appear anywhere in the message. 1761 qual = [min] "*" [max] 1762 ; See ABNF conventions, RFC 2234 Section 6.6. 1763 ; The absence of any qualifiers depends on 1764 ; whether it precedes a fixed, required, or 1765 ; optional rule. If a fixed or required rule has 1766 ; no qualifier, then exactly one such AVP MUST 1767 ; be present. If an optional rule has no 1768 ; qualifier, then 0 or 1 such AVP may be 1769 ; present. 1770 ; 1771 ; NOTE: "[" and "]" have a different meaning 1772 ; than in ABNF (see the optional rule, above). 1773 ; These braces cannot be used to express 1774 ; optional fixed rules (such as an optional 1775 ; ICV at the end). To do this, the convention 1776 ; is '0*1fixed'. 1778 min = 1*DIGIT 1779 ; The minimum number of times the element may 1780 ; be present. The default value is zero. 1782 max = 1*DIGIT 1783 ; The maximum number of times the element may 1784 ; be present. The default value is infinity. A 1785 ; value of zero implies the AVP MUST NOT be 1786 ; present. 1788 avp-spec = diameter-name 1789 ; The avp-spec has to be an AVP Name, defined 1790 ; in the base or extended Diameter 1791 ; specifications. 1793 avp-name = avp-spec / "AVP" 1794 ; The string "AVP" stands for *any* arbitrary 1795 ; AVP Name, which does not conflict with the 1796 ; required or fixed position AVPs defined in 1797 ; the command code definition. 1799 The following is a definition of a fictitious command code: 1801 Example-Request ::= < "Diameter-Header: 9999999, REQ, PXY > 1802 { User-Name } 1803 * { Origin-Host } 1804 * [ AVP 1806 3.3. Diameter Command Naming Conventions 1808 Diameter command names typically includes one or more English words 1809 followed by the verb Request or Answer. Each English word is 1810 delimited by a hyphen. A three-letter acronym for both the request 1811 and answer is also normally provided. 1813 An example is a message set used to terminate a session. The command 1814 name is Session-Terminate-Request and Session-Terminate-Answer, while 1815 the acronyms are STR and STA, respectively. 1817 Both the request and the answer for a given command share the same 1818 command code. The request is identified by the R(equest) bit in the 1819 Diameter header set to one (1), to ask that a particular action be 1820 performed, such as authorizing a user or terminating a session. Once 1821 the receiver has completed the request it issues the corresponding 1822 answer, which includes a result code that communicates one of the 1823 following: 1825 o The request was successful 1827 o The request failed 1829 o An additional request must be sent to provide information the peer 1830 requires prior to returning a successful or failed answer. 1832 o The receiver could not process the request, but provides 1833 information about a Diameter peer that is able to satisfy the 1834 request, known as redirect. 1836 Additional information, encoded within AVPs, MAY also be included in 1837 answer messages. 1839 4. Diameter AVPs 1841 Diameter AVPs carry specific authentication, accounting, 1842 authorization, routing and security information as well as 1843 configuration details for the request and reply. 1845 Some AVPs MAY be listed more than once. The effect of such an AVP is 1846 specific, and is specified in each case by the AVP description. 1848 Each AVP of type OctetString MUST be padded to align on a 32-bit 1849 boundary, while other AVP types align naturally. A number of zero- 1850 valued bytes are added to the end of the AVP Data field till a word 1851 boundary is reached. The length of the padding is not reflected in 1852 the AVP Length field. 1854 4.1. AVP Header 1856 The fields in the AVP header MUST be sent in network byte order. The 1857 format of the header is: 1859 0 1 2 3 1860 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 1861 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1862 | AVP Code | 1863 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1864 |V M P r r r r r| AVP Length | 1865 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1866 | Vendor-ID (opt) | 1867 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1868 | Data ... 1869 +-+-+-+-+-+-+-+-+ 1871 AVP Code 1873 The AVP Code, combined with the Vendor-Id field, identifies the 1874 attribute uniquely. AVP numbers 1 through 255 are reserved for 1875 backward compatibility with RADIUS, without setting the Vendor-Id 1876 field. AVP numbers 256 and above are used for Diameter, which are 1877 allocated by IANA (see Section 11.1). 1879 AVP Flags 1881 The AVP Flags field informs the receiver how each attribute must 1882 be handled. The 'r' (reserved) bits are unused and SHOULD be set 1883 to 0. Note that subsequent Diameter applications MAY define 1884 additional bits within the AVP Header, and an unrecognized bit 1885 SHOULD be considered an error. The 'P' bit indicates the need for 1886 encryption for end-to-end security. 1888 The 'M' Bit, known as the Mandatory bit, indicates whether support 1889 of the AVP is required. If an AVP with the 'M' bit set is 1890 received by a Diameter client, server, proxy, or translation agent 1891 and either the AVP or its value is unrecognized, the message MUST 1892 be rejected. Diameter Relay and redirect agents MUST NOT reject 1893 messages with unrecognized AVPs. 1895 The 'M' bit MUST be set according to the rules defined for the AVP 1896 containing it. In order to preserve interoperability, a Diameter 1897 implementation MUST be able to exclude from a Diameter message any 1898 Mandatory AVP which is neither defined in the base Diameter 1899 protocol nor in any of the Diameter Application specifications 1900 governing the message in which it appears. It MAY do this in one 1901 of the following ways: 1903 1. If a message is rejected because it contains a Mandatory AVP 1904 which is neither defined in the base Diameter standard nor in 1905 any of the Diameter Application specifications governing the 1906 message in which it appears, the implementation may resend the 1907 message without the AVP, possibly inserting additional 1908 standard AVPs instead. 1910 2. A configuration option may be provided on a system wide, per 1911 peer, or per realm basis that would allow/prevent particular 1912 Mandatory AVPs to be sent. Thus an administrator could change 1913 the configuration to avoid interoperability problems. 1915 Diameter implementations are required to support all Mandatory 1916 AVPs which are allowed by the message's formal syntax and defined 1917 either in the base Diameter standard or in one of the Diameter 1918 Application specifications governing the message. 1920 AVPs with the 'M' bit cleared are informational only and a 1921 receiver that receives a message with such an AVP that is not 1922 supported, or whose value is not supported, MAY simply ignore the 1923 AVP. 1925 The 'V' bit, known as the Vendor-Specific bit, indicates whether 1926 the optional Vendor-ID field is present in the AVP header. When 1927 set the AVP Code belongs to the specific vendor code address 1928 space. 1930 Unless otherwise noted, AVPs will have the following default AVP 1931 Flags field settings: 1933 The 'M' bit MUST be set. The 'V' bit MUST NOT be set. 1935 AVP Length 1937 The AVP Length field is three octets, and indicates the number of 1938 octets in this AVP including the AVP Code, AVP Length, AVP Flags, 1939 Vendor-ID field (if present) and the AVP data. If a message is 1940 received with an invalid attribute length, the message SHOULD be 1941 rejected. 1943 4.1.1. Optional Header Elements 1945 The AVP Header contains one optional field. This field is only 1946 present if the respective bit-flag is enabled. 1948 Vendor-ID 1950 The Vendor-ID field is present if the 'V' bit is set in the AVP 1951 Flags field. The optional four-octet Vendor-ID field contains the 1952 IANA assigned "SMI Network Management Private Enterprise Codes" 1953 [RFC3232] value, encoded in network byte order. Any vendor 1954 wishing to implement a vendor-specific Diameter AVP MUST use their 1955 own Vendor-ID along with their privately managed AVP address 1956 space, guaranteeing that they will not collide with any other 1957 vendor's vendor-specific AVP(s), nor with future IETF 1958 applications. 1960 A vendor ID value of zero (0) corresponds to the IETF adopted AVP 1961 values, as managed by the IANA. Since the absence of the vendor 1962 ID field implies that the AVP in question is not vendor specific, 1963 implementations MUST NOT use the zero (0) vendor ID. 1965 4.2. Basic AVP Data Formats 1967 The Data field is zero or more octets and contains information 1968 specific to the Attribute. The format and length of the Data field 1969 is determined by the AVP Code and AVP Length fields. The format of 1970 the Data field MUST be one of the following base data types or a data 1971 type derived from the base data types. In the event that a new Basic 1972 AVP Data Format is needed, a new version of this RFC must be created. 1974 OctetString 1976 The data contains arbitrary data of variable length. Unless 1977 otherwise noted, the AVP Length field MUST be set to at least 8 1978 (12 if the 'V' bit is enabled). AVP Values of this type that are 1979 not a multiple of four-octets in length is followed by the 1980 necessary padding so that the next AVP (if any) will start on a 1981 32-bit boundary. 1983 Integer32 1985 32 bit signed value, in network byte order. The AVP Length field 1986 MUST be set to 12 (16 if the 'V' bit is enabled). 1988 Integer64 1990 64 bit signed value, in network byte order. The AVP Length field 1991 MUST be set to 16 (20 if the 'V' bit is enabled). 1993 Unsigned32 1995 32 bit unsigned value, in network byte order. The AVP Length 1996 field MUST be set to 12 (16 if the 'V' bit is enabled). 1998 Unsigned64 2000 64 bit unsigned value, in network byte order. The AVP Length 2001 field MUST be set to 16 (20 if the 'V' bit is enabled). 2003 Float32 2005 This represents floating point values of single precision as 2006 described by [FLOATPOINT]. The 32-bit value is transmitted in 2007 network byte order. The AVP Length field MUST be set to 12 (16 if 2008 the 'V' bit is enabled). 2010 Float64 2012 This represents floating point values of double precision as 2013 described by [FLOATPOINT]. The 64-bit value is transmitted in 2014 network byte order. The AVP Length field MUST be set to 16 (20 if 2015 the 'V' bit is enabled). 2017 Grouped 2019 The Data field is specified as a sequence of AVPs. Each of these 2020 AVPs follows - in the order in which they are specified - 2021 including their headers and padding. The AVP Length field is set 2022 to 8 (12 if the 'V' bit is enabled) plus the total length of all 2023 included AVPs, including their headers and padding. Thus the AVP 2024 length field of an AVP of type Grouped is always a multiple of 4. 2026 4.3. Derived AVP Data Formats 2028 In addition to using the Basic AVP Data Formats, applications may 2029 define data formats derived from the Basic AVP Data Formats. An 2030 application that defines new AVP Derived Data Formats MUST include 2031 them in a section entitled "AVP Derived Data Formats", using the same 2032 format as the definitions below. Each new definition must be either 2033 defined or listed with a reference to the RFC that defines the 2034 format. 2036 The below AVP Derived Data Formats are commonly used by applications. 2038 Address 2040 The Address format is derived from the OctetString AVP Base 2041 Format. It is a discriminated union, representing, for example a 2042 32-bit (IPv4) [IPV4] or 128-bit (IPv6) [RFC2373] address, most 2043 significant octet first. The first two octets of the Address AVP 2044 represents the AddressType, which contains an Address Family 2045 defined in [IANAADFAM]. The AddressType is used to discriminate 2046 the content and format of the remaining octets. 2048 Time 2050 The Time format is derived from the OctetString AVP Base Format. 2051 The string MUST contain four octets, in the same format as the 2052 first four bytes are in the NTP timestamp format. The NTP 2053 Timestamp format is defined in chapter 3 of [RFC2030]. 2055 This represents the number of seconds since 0h on 1 January 1900 2056 with respect to the Coordinated Universal Time (UTC). 2058 On 6h 28m 16s UTC, 7 February 2036 the time value will overflow. 2059 SNTP [RFC2030] describes a procedure to extend the time to 2104. 2060 This procedure MUST be supported by all DIAMETER nodes. 2062 UTF8String 2064 The UTF8String format is derived from the OctetString AVP Base 2065 Format. This is a human readable string represented using the 2066 ISO/IEC IS 10646-1 character set, encoded as an OctetString using 2067 the UTF-8 [UFT8] transformation format described in RFC 2279. 2069 Since additional code points are added by amendments to the 10646 2070 standard from time to time, implementations MUST be prepared to 2071 encounter any code point from 0x00000001 to 0x7fffffff. Byte 2072 sequences that do not correspond to the valid encoding of a code 2073 point into UTF-8 charset or are outside this range are prohibited. 2075 The use of control codes SHOULD be avoided. When it is necessary 2076 to represent a new line, the control code sequence CR LF SHOULD be 2077 used. 2079 The use of leading or trailing white space SHOULD be avoided. 2081 For code points not directly supported by user interface hardware 2082 or software, an alternative means of entry and display, such as 2083 hexadecimal, MAY be provided. 2085 For information encoded in 7-bit US-ASCII, the UTF-8 charset is 2086 identical to the US-ASCII charset. 2088 UTF-8 may require multiple bytes to represent a single character / 2089 code point; thus the length of an UTF8String in octets may be 2090 different from the number of characters encoded. 2092 Note that the AVP Length field of an UTF8String is measured in 2093 octets, not characters. 2095 DiameterIdentity 2097 The DiameterIdentity format is derived from the OctetString AVP 2098 Base Format. 2100 DiameterIdentity = FQDN 2102 DiameterIdentity value is used to uniquely identify a Diameter 2103 node for purposes of duplicate connection and routing loop 2104 detection. 2106 The contents of the string MUST be the FQDN of the Diameter node. 2107 If multiple Diameter nodes run on the same host, each Diameter 2108 node MUST be assigned a unique DiameterIdentity. If a Diameter 2109 node can be identified by several FQDNs, a single FQDN should be 2110 picked at startup, and used as the only DiameterIdentity for that 2111 node, whatever the connection it is sent on. 2113 DiameterURI 2115 The DiameterURI MUST follow the Uniform Resource Identifiers (URI) 2116 syntax [RFC2396] rules specified below: 2118 "aaa://" FQDN [ port ] [ transport ] [ protocol ] 2120 ; No transport security 2122 "aaas://" FQDN [ port ] [ transport ] [ protocol ] 2124 ; Transport security used 2126 FQDN = Fully Qualified Host Name 2128 port = ":" 1*DIGIT 2130 ; One of the ports used to listen for 2131 ; incoming connections. 2132 ; If absent, 2133 ; the default Diameter port (3868) is 2134 ; assumed. 2136 transport = ";transport=" transport-protocol 2138 ; One of the transports used to listen 2139 ; for incoming connections. If absent, 2140 ; the default SCTP [RFC2960] protocol is 2141 ; assumed. UDP MUST NOT be used when 2142 ; the aaa-protocol field is set to 2143 ; diameter. 2145 transport-protocol = ( "tcp" / "sctp" / "udp" ) 2147 protocol = ";protocol=" aaa-protocol 2149 ; If absent, the default AAA protocol 2150 ; is diameter. 2152 aaa-protocol = ( "diameter" / "radius" / "tacacs+" ) 2154 The following are examples of valid Diameter host identities: 2156 aaa://host.example.com;transport=tcp 2157 aaa://host.example.com:6666;transport=tcp 2158 aaa://host.example.com;protocol=diameter 2159 aaa://host.example.com:6666;protocol=diameter 2160 aaa://host.example.com:6666;transport=tcp;protocol=diameter 2161 aaa://host.example.com:1813;transport=udp;protocol=radius 2163 Enumerated 2165 Enumerated is derived from the Integer32 AVP Base Format. The 2166 definition contains a list of valid values and their 2167 interpretation and is described in the Diameter application 2168 introducing the AVP. 2170 IPFilterRule 2172 The IPFilterRule format is derived from the OctetString AVP Base 2173 Format. It uses the ASCII charset. Packets may be filtered based 2174 on the following information that is associated with it: 2176 Direction (in or out) 2177 Source and destination IP address (possibly masked) 2178 Protocol 2179 Source and destination port (lists or ranges) 2180 TCP flags 2181 IP fragment flag 2182 IP options 2183 ICMP types 2185 Rules for the appropriate direction are evaluated in order, with 2186 the first matched rule terminating the evaluation. Each packet is 2187 evaluated once. If no rule matches, the packet is dropped if the 2188 last rule evaluated was a permit, and passed if the last rule was 2189 a deny. 2191 IPFilterRule filters MUST follow the format: 2193 action dir proto from src to dst [options] 2195 action permit - Allow packets that match the rule. 2196 deny - Drop packets that match the rule. 2198 dir "in" is from the terminal, "out" is to the 2199 terminal. 2201 proto An IP protocol specified by number. The "ip" 2202 keyword means any protocol will match. 2204 src and dst
[ports] 2206 The
may be specified as: 2207 ipno An IPv4 or IPv6 number in dotted- 2208 quad or canonical IPv6 form. Only 2209 this exact IP number will match the 2210 rule. 2211 ipno/bits An IP number as above with a mask 2212 width of the form 1.2.3.4/24. In 2213 this case, all IP numbers from 2214 1.2.3.0 to 1.2.3.255 will match. 2215 The bit width MUST be valid for the 2216 IP version and the IP number MUST 2217 NOT have bits set beyond the mask. 2218 For a match to occur, the same IP 2219 version must be present in the 2220 packet that was used in describing 2221 the IP address. To test for a 2222 particular IP version, the bits part 2223 can be set to zero. The keyword 2224 "any" is 0.0.0.0/0 or the IPv6 2225 equivalent. The keyword "assigned" 2226 is the address or set of addresses 2227 assigned to the terminal. For IPv4, 2228 a typical first rule is often "deny 2229 in ip! assigned" 2231 The sense of the match can be inverted by 2232 preceding an address with the not modifier (!), 2233 causing all other addresses to be matched 2234 instead. This does not affect the selection of 2235 port numbers. 2237 With the TCP, UDP and SCTP protocols, optional 2238 ports may be specified as: 2240 {port/port-port}[,ports[,...]] 2242 The '-' notation specifies a range of ports 2243 (including boundaries). 2245 Fragmented packets that have a non-zero offset 2246 (i.e., not the first fragment) will never match 2247 a rule that has one or more port 2248 specifications. See the frag option for 2249 details on matching fragmented packets. 2251 options: 2253 frag Match if the packet is a fragment and this is not 2254 the first fragment of the datagram. frag may not 2255 be used in conjunction with either tcpflags or 2256 TCP/UDP port specifications. 2258 ipoptions spec 2259 Match if the IP header contains the comma 2260 separated list of options specified in spec. The 2261 supported IP options are: 2263 ssrr (strict source route), lsrr (loose source 2264 route), rr (record packet route) and ts 2265 (timestamp). The absence of a particular option 2266 may be denoted with a '!'. 2268 tcpoptions spec 2269 Match if the TCP header contains the comma 2270 separated list of options specified in spec. The 2271 supported TCP options are: 2273 mss (maximum segment size), window (tcp window 2274 advertisement), sack (selective ack), ts (rfc1323 2275 timestamp) and cc (rfc1644 t/tcp connection 2276 count). The absence of a particular option may 2277 be denoted with a '!'. 2279 established 2280 TCP packets only. Match packets that have the RST 2281 or ACK bits set. 2283 setup TCP packets only. Match packets that have the SYN 2284 bit set but no ACK bit. 2286 tcpflags spec 2287 TCP packets only. Match if the TCP header 2288 contains the comma separated list of flags 2289 specified in spec. The supported TCP flags are: 2291 fin, syn, rst, psh, ack and urg. The absence of a 2292 particular flag may be denoted with a '!'. A rule 2293 that contains a tcpflags specification can never 2294 match a fragmented packet that has a non-zero 2295 offset. See the frag option for details on 2296 matching fragmented packets. 2298 icmptypes types 2299 ICMP packets only. Match if the ICMP type is in 2300 the list types. The list may be specified as any 2301 combination of ranges or individual types 2302 separated by commas. Both the numeric values and 2303 the symbolic values listed below can be used. The 2304 supported ICMP types are: 2306 echo reply (0), destination unreachable (3), 2307 source quench (4), redirect (5), echo request 2308 (8), router advertisement (9), router 2309 solicitation (10), time-to-live exceeded (11), IP 2310 header bad (12), timestamp request (13), 2311 timestamp reply (14), information request (15), 2312 information reply (16), address mask request (17) 2313 and address mask reply (18). 2315 There is one kind of packet that the access device MUST always 2316 discard, that is an IP fragment with a fragment offset of one. 2317 This is a valid packet, but it only has one use, to try to 2318 circumvent firewalls. 2320 An access device that is unable to interpret or apply a deny rule 2321 MUST terminate the session. An access device that is unable to 2322 interpret or apply a permit rule MAY apply a more restrictive 2323 rule. An access device MAY apply deny rules of its own before the 2324 supplied rules, for example to protect the access device owner's 2325 infrastructure. 2327 The rule syntax is a modified subset of ipfw(8) from FreeBSD, and 2328 the ipfw.c code may provide a useful base for implementations. 2330 QoSFilterRule 2332 The QosFilterRule format is derived from the OctetString AVP Base 2333 Format. It uses the ASCII charset. Packets may be marked or 2334 metered based on the following information that is associated with 2335 it: 2337 Direction (in or out) 2338 Source and destination IP address (possibly masked) 2339 Protocol 2340 Source and destination port (lists or ranges) 2341 DSCP values (no mask or range) 2343 Rules for the appropriate direction are evaluated in order, with 2344 the first matched rule terminating the evaluation. Each packet is 2345 evaluated once. If no rule matches, the packet is treated as best 2346 effort. An access device that is unable to interpret or apply a 2347 QoS rule SHOULD NOT terminate the session. 2349 QoSFilterRule filters MUST follow the format: 2351 action dir proto from src to dst [options] 2353 tag - Mark packet with a specific DSCP 2354 [DIFFSERV]. The DSCP option MUST be 2355 included. 2356 meter - Meter traffic. The metering options 2357 MUST be included. 2359 dir The format is as described under IPFilterRule. 2361 proto The format is as described under 2362 IPFilterRule. 2364 src and dst The format is as described under 2365 IPFilterRule. 2367 4.4. Grouped AVP Values 2369 The Diameter protocol allows AVP values of type 'Grouped.' This 2370 implies that the Data field is actually a sequence of AVPs. It is 2371 possible to include an AVP with a Grouped type within a Grouped type, 2372 that is, to nest them. AVPs within an AVP of type Grouped have the 2373 same padding requirements as non-Grouped AVPs, as defined in Section 2374 4. 2376 The AVP Code numbering space of all AVPs included in a Grouped AVP is 2377 the same as for non-grouped AVPs. Further, if any of the AVPs 2378 encapsulated within a Grouped AVP has the 'M' (mandatory) bit set, 2379 the Grouped AVP itself MUST also include the 'M' bit set. 2381 Every Grouped AVP defined MUST include a corresponding grammar, using 2382 ABNF [RFC2234] (with modifications), as defined below. 2384 grouped-avp-def = name "::=" avp 2386 name-fmt = ALPHA *(ALPHA / DIGIT / "-") 2388 name = name-fmt 2389 ; The name has to be the name of an AVP, 2390 ; defined in the base or extended Diameter 2391 ; specifications. 2393 avp = header [ *fixed] [ *required] [ *optional] 2394 [ *fixed] 2396 header = "<" "AVP-Header:" avpcode [vendor] ">" 2398 avpcode = 1*DIGIT 2399 ; The AVP Code assigned to the Grouped AVP 2401 vendor = 1*DIGIT 2402 ; The Vendor-ID assigned to the Grouped AVP. 2403 ; If absent, the default value of zero is 2404 ; used. 2406 4.4.1. Example AVP with a Grouped Data type 2408 The Example-AVP (AVP Code 999999) is of type Grouped and is used to 2409 clarify how Grouped AVP values work. The Grouped Data field has the 2410 following ABNF grammar: 2412 Example-AVP ::= < AVP Header: 999999 > 2413 { Origin-Host } 2414 1*{ Session-Id } 2415 *[ AVP ] 2417 An Example-AVP with Grouped Data follows. 2419 The Origin-Host AVP is required (Section 6.3). In this case: 2421 Origin-Host = "example.com". 2423 One or more Session-Ids must follow. Here there are two: 2425 Session-Id = 2426 "grump.example.com:33041;23432;893;0AF3B81" 2428 Session-Id = 2429 "grump.example.com:33054;23561;2358;0AF3B82" 2431 optional AVPs included are 2433 Recovery-Policy = 2434 2163bc1d0ad82371f6bc09484133c3f09ad74a0dd5346d54195a7cf0b35 2435 2cabc881839a4fdcfbc1769e2677a4c1fb499284c5f70b48f58503a45c5 2436 c2d6943f82d5930f2b7c1da640f476f0e9c9572a50db8ea6e51e1c2c7bd 2437 f8bb43dc995144b8dbe297ac739493946803e1cee3e15d9b765008a1b2a 2438 cf4ac777c80041d72c01e691cf751dbf86e85f509f3988e5875dc905119 2439 26841f00f0e29a6d1ddc1a842289d440268681e052b30fb638045f7779c 2440 1d873c784f054f688f5001559ecff64865ef975f3e60d2fd7966b8c7f92 2442 Futuristic-Acct-Record = 2443 fe19da5802acd98b07a5b86cb4d5d03f0314ab9ef1ad0b67111ff3b90a0 2444 57fe29620bf3585fd2dd9fcc38ce62f6cc208c6163c008f4258d1bc88b8 2445 17694a74ccad3ec69269461b14b2e7a4c111fb239e33714da207983f58c 2446 41d018d56fe938f3cbf089aac12a912a2f0d1923a9390e5f789cb2e5067 2447 d3427475e49968f841 2449 The data for the optional AVPs is represented in hex since the format 2450 of these AVPs is neither known at the time of definition of the 2451 Example-AVP group, nor (likely) at the time when the example instance 2452 of this AVP is interpreted - except by Diameter implementations which 2453 support the same set of AVPs. The encoding example illustrates how 2454 padding is used and how length fields are calculated. Also note that 2455 AVPs may be present in the Grouped AVP value which the receiver 2456 cannot interpret (here, the Recover-Policy and Futuristic-Acct-Record 2457 AVPs). 2459 This AVP would be encoded as follows: 2461 0 1 2 3 4 5 6 7 2462 +-------+-------+-------+-------+-------+-------+-------+-------+ 2463 0 | Example AVP Header (AVP Code = 999999), Length = 468 | 2464 +-------+-------+-------+-------+-------+-------+-------+-------+ 2465 8 | Origin-Host AVP Header (AVP Code = 264), Length = 19 | 2466 +-------+-------+-------+-------+-------+-------+-------+-------+ 2467 16 | 'e' | 'x' | 'a' | 'm' | 'p' | 'l' | 'e' | '.' | 2468 +-------+-------+-------+-------+-------+-------+-------+-------+ 2469 24 | 'c' | 'o' | 'm' |Padding| Session-Id AVP Header | 2470 +-------+-------+-------+-------+-------+-------+-------+-------+ 2471 32 | (AVP Code = 263), Length = 50 | 'g' | 'r' | 'u' | 'm' | 2472 +-------+-------+-------+-------+-------+-------+-------+-------+ 2473 . . . 2474 +-------+-------+-------+-------+-------+-------+-------+-------+ 2475 64 | 'A' | 'F' | '3' | 'B' | '8' | '1' |Padding|Padding| 2476 +-------+-------+-------+-------+-------+-------+-------+-------+ 2477 72 | Session-Id AVP Header (AVP Code = 263), Length = 51 | 2478 +-------+-------+-------+-------+-------+-------+-------+-------+ 2479 80 | 'g' | 'r' | 'u' | 'm' | 'p' | '.' | 'e' | 'x' | 2480 +-------+-------+-------+-------+-------+-------+-------+-------+ 2481 . . . 2482 +-------+-------+-------+-------+-------+-------+-------+-------+ 2483 104| '0' | 'A' | 'F' | '3' | 'B' | '8' | '2' |Padding| 2484 +-------+-------+-------+-------+-------+-------+-------+-------+ 2485 112| Recovery-Policy Header (AVP Code = 8341), Length = 223 | 2486 +-------+-------+-------+-------+-------+-------+-------+-------+ 2487 120| 0x21 | 0x63 | 0xbc | 0x1d | 0x0a | 0xd8 | 0x23 | 0x71 | 2488 +-------+-------+-------+-------+-------+-------+-------+-------+ 2489 . . . 2490 +-------+-------+-------+-------+-------+-------+-------+-------+ 2491 320| 0x2f | 0xd7 | 0x96 | 0x6b | 0x8c | 0x7f | 0x92 |Padding| 2492 +-------+-------+-------+-------+-------+-------+-------+-------+ 2493 328| Futuristic-Acct-Record Header (AVP Code = 15930), Length = 137| 2494 +-------+-------+-------+-------+-------+-------+-------+-------+ 2495 336| 0xfe | 0x19 | 0xda | 0x58 | 0x02 | 0xac | 0xd9 | 0x8b | 2496 +-------+-------+-------+-------+-------+-------+-------+-------+ 2497 . . . 2498 +-------+-------+-------+-------+-------+-------+-------+-------+ 2499 464| 0x41 |Padding|Padding|Padding| 2500 +-------+-------+-------+-------+ 2502 4.5. Diameter Base Protocol AVPs 2504 The following table describes the Diameter AVPs defined in the base 2505 protocol, their AVP Code values, types, possible flag values and 2506 whether the AVP MAY be encrypted. For the originator of a Diameter 2507 message, "Encr" (Encryption) means that if a message containing that 2508 AVP is to be sent via a Diameter agent (proxy, redirect or relay) 2509 then the message MUST NOT be sent unless there is end-to-end security 2510 between the originator and the recipient and integrity / 2511 confidentiality protection is offered for this AVP OR the originator 2512 has locally trusted configuration that indicates that end-to-end 2513 security is not needed. Similarly, for the originator of a Diameter 2514 message, a "P" in the "MAY" column means that if a message containing 2515 that AVP is to be sent via a Diameter agent (proxy, redirect or 2516 relay) then the message MUST NOT be sent unless there is end-to-end 2517 security between the originator and the recipient or the originator 2518 has locally trusted configuration that indicates that end-to-end 2519 security is not needed. 2521 Due to space constraints, the short form DiamIdent is used to 2522 represent DiameterIdentity. 2524 +---------------------+ 2525 | AVP Flag rules | 2526 |----+-----+----+-----|----+ 2527 AVP Section | | |SHLD| MUST| | 2528 Attribute Name Code Defined Data Type |MUST| MAY | NOT| NOT|Encr| 2529 -----------------------------------------|----+-----+----+-----|----| 2530 Acct- 85 9.8.2 Unsigned32 | M | P | | V | Y | 2531 Interim-Interval | | | | | | 2532 Accounting- 483 9.8.7 Enumerated | M | P | | V | Y | 2533 Realtime-Required | | | | | | 2534 Acct- 50 9.8.5 UTF8String | M | P | | V | Y | 2535 Multi-Session-Id | | | | | | 2536 Accounting- 485 9.8.3 Unsigned32 | M | P | | V | Y | 2537 Record-Number | | | | | | 2538 Accounting- 480 9.8.1 Enumerated | M | P | | V | Y | 2539 Record-Type | | | | | | 2540 Accounting- 44 9.8.4 OctetString| M | P | | V | Y | 2541 Session-Id | | | | | | 2542 Accounting- 287 9.8.6 Unsigned64 | M | P | | V | Y | 2543 Sub-Session-Id | | | | | | 2544 Acct- 259 6.9 Unsigned32 | M | P | | V | N | 2545 Application-Id | | | | | | 2546 Auth- 258 6.8 Unsigned32 | M | P | | V | N | 2547 Application-Id | | | | | | 2548 Auth-Request- 274 8.7 Enumerated | M | P | | V | N | 2549 Type | | | | | | 2550 Authorization- 291 8.9 Unsigned32 | M | P | | V | N | 2551 Lifetime | | | | | | 2552 Auth-Grace- 276 8.10 Unsigned32 | M | P | | V | N | 2553 Period | | | | | | 2554 Auth-Session- 277 8.11 Enumerated | M | P | | V | N | 2555 State | | | | | | 2556 Re-Auth-Request- 285 8.12 Enumerated | M | P | | V | N | 2557 Type | | | | | | 2558 Class 25 8.20 OctetString| M | P | | V | Y | 2559 Destination-Host 293 6.5 DiamIdent | M | P | | V | N | 2560 Destination- 283 6.6 DiamIdent | M | P | | V | N | 2561 Realm | | | | | | 2562 Disconnect-Cause 273 5.4.3 Enumerated | M | P | | V | N | 2563 E2E-Sequence AVP 300 6.15 Grouped | M | P | | V | Y | 2564 Error-Message 281 7.3 UTF8String | | P | | V,M | N | 2565 Error-Reporting- 294 7.4 DiamIdent | | P | | V,M | N | 2566 Host | | | | | | 2567 Event-Timestamp 55 8.21 Time | M | P | | V | N | 2568 Experimental- 297 7.6 Grouped | M | P | | V | N | 2569 Result | | | | | | 2570 -----------------------------------------|----+-----+----+-----|----| 2571 +---------------------+ 2572 | AVP Flag rules | 2573 |----+-----+----+-----|----+ 2574 AVP Section | | |SHLD| MUST|MAY | 2575 Attribute Name Code Defined Data Type |MUST| MAY | NOT| NOT|Encr| 2576 -----------------------------------------|----+-----+----+-----|----| 2577 Experimental- 298 7.7 Unsigned32 | M | P | | V | N | 2578 Result-Code | | | | | | 2579 Failed-AVP 279 7.5 Grouped | M | P | | V | N | 2580 Firmware- 267 5.3.4 Unsigned32 | | | |P,V,M| N | 2581 Revision | | | | | | 2582 Host-IP-Address 257 5.3.5 Address | M | P | | V | N | 2583 Inband-Security | M | P | | V | N | 2584 -Id 299 6.10 Unsigned32 | | | | | | 2585 Multi-Round- 272 8.19 Unsigned32 | M | P | | V | Y | 2586 Time-Out | | | | | | 2587 Origin-Host 264 6.3 DiamIdent | M | P | | V | N | 2588 Origin-Realm 296 6.4 DiamIdent | M | P | | V | N | 2589 Origin-State-Id 278 8.16 Unsigned32 | M | P | | V | N | 2590 Product-Name 269 5.3.7 UTF8String | | | |P,V,M| N | 2591 Proxy-Host 280 6.7.3 DiamIdent | M | | | P,V | N | 2592 Proxy-Info 284 6.7.2 Grouped | M | | | P,V | N | 2593 Proxy-State 33 6.7.4 OctetString| M | | | P,V | N | 2594 Redirect-Host 292 6.12 DiamURI | M | P | | V | N | 2595 Redirect-Host- 261 6.13 Enumerated | M | P | | V | N | 2596 Usage | | | | | | 2597 Redirect-Max- 262 6.14 Unsigned32 | M | P | | V | N | 2598 Cache-Time | | | | | | 2599 Result-Code 268 7.1 Unsigned32 | M | P | | V | N | 2600 Route-Record 282 6.7.1 DiamIdent | M | | | P,V | N | 2601 Session-Id 263 8.8 UTF8String | M | P | | V | Y | 2602 Session-Timeout 27 8.13 Unsigned32 | M | P | | V | N | 2603 Session-Binding 270 8.17 Unsigned32 | M | P | | V | Y | 2604 Session-Server- 271 8.18 Enumerated | M | P | | V | Y | 2605 Failover | | | | | | 2606 Supported- 265 5.3.6 Unsigned32 | M | P | | V | N | 2607 Vendor-Id | | | | | | 2608 Termination- 295 8.15 Enumerated | M | P | | V | N | 2609 Cause | | | | | | 2610 User-Name 1 8.14 UTF8String | M | P | | V | Y | 2611 Vendor-Id 266 5.3.3 Unsigned32 | M | P | | V | N | 2612 Vendor-Specific- 260 6.11 Grouped | M | P | | V | N | 2613 Application-Id | | | | | | 2614 -----------------------------------------|----+-----+----+-----|----| 2616 5. Diameter Peers 2618 This section describes how Diameter nodes establish connections and 2619 communicate with peers. 2621 5.1. Peer Connections 2623 Although a Diameter node may have many possible peers that it is able 2624 to communicate with, it may not be economical to have an established 2625 connection to all of them. At a minimum, a Diameter node SHOULD have 2626 an established connection with two peers per realm, known as the 2627 primary and secondary peers. Of course, a node MAY have additional 2628 connections, if it is deemed necessary. Typically, all messages for 2629 a realm are sent to the primary peer, but in the event that failover 2630 procedures are invoked, any pending requests are sent to the 2631 secondary peer. However, implementations are free to load balance 2632 requests between a set of peers. 2634 Note that a given peer MAY act as a primary for a given realm, while 2635 acting as a secondary for another realm. 2637 When a peer is deemed suspect, which could occur for various reasons, 2638 including not receiving a DWA within an allotted timeframe, no new 2639 requests should be forwarded to the peer, but failover procedures are 2640 invoked. When an active peer is moved to this mode, additional 2641 connections SHOULD be established to ensure that the necessary number 2642 of active connections exists. 2644 There are two ways that a peer is removed from the suspect peer list: 2646 1. The peer is no longer reachable, causing the transport connection 2647 to be shutdown. The peer is moved to the closed state. 2649 2. Three watchdog messages are exchanged with accepted round trip 2650 times, and the connection to the peer is considered stabilized. 2652 In the event the peer being removed is either the primary or 2653 secondary, an alternate peer SHOULD replace the deleted peer, and 2654 assume the role of either primary or secondary. 2656 5.2. Diameter Peer Discovery 2658 Allowing for dynamic Diameter agent discovery will make it possible 2659 for simpler and more robust deployment of Diameter services. In 2660 order to promote interoperable implementations of Diameter peer 2661 discovery, the following mechanisms are described. These are based 2662 on existing IETF standards. The first option (manual configuration) 2663 MUST be supported by all DIAMETER nodes, while the latter two options 2664 (SRVLOC and DNS) MAY be supported. 2666 There are two cases where Diameter peer discovery may be performed. 2667 The first is when a Diameter client needs to discover a first-hop 2668 Diameter agent. The second case is when a Diameter agent needs to 2669 discover another agent - for further handling of a Diameter 2670 operation. In both cases, the following 'search order' is 2671 recommended: 2673 1. The Diameter implementation consults its list of static 2674 (manually) configured Diameter agent locations. These will be 2675 used if they exist and respond. 2677 2. The Diameter implementation uses SLPv2 [RFC2165] to discover 2678 Diameter services. The Diameter service template [RFC2609] is 2679 included in Appendix B. 2681 It is recommended that SLPv2 security be deployed (this requires 2682 distributing keys to SLPv2 agents). This is discussed further in 2683 Appendix B. SLPv2 security SHOULD be used (requiring 2684 distribution of keys to SLPv2 agents) in order to ensure that 2685 discovered peers are authorized for their roles. SLPv2 is 2686 discussed further in Appendix B. 2688 3. The Diameter implementation performs a NAPTR query for a server 2689 in a particular realm. The Diameter implementation has to know 2690 in advance which realm to look for a Diameter agent in. This 2691 could be deduced, for example, from the 'realm' in a NAI that a 2692 Diameter implementation needed to perform a Diameter operation 2693 on. 2695 * The services relevant for the task of transport protocol 2696 selection are those with NAPTR service fields with values 2697 "AAA+D2x", where x is a letter that corresponds to a transport 2698 protocol supported by the domain. This specification defines 2699 D2T for TCP and D2S for SCTP. We also establish an IANA 2700 registry for NAPTR service name to transport protocol 2701 mappings. 2703 These NAPTR records provide a mapping from a domain, to the 2704 SRV record for contacting a server with the specific transport 2705 protocol in the NAPTR services field. The resource record 2706 will contain an empty regular expression and a replacement 2707 value, which is the SRV record for that particular transport 2708 protocol. If the server supports multiple transport 2709 protocols, there will be multiple NAPTR records, each with a 2710 different service value. As per RFC 2915 [RFC2915], the 2711 client discards any records whose services fields are not 2712 applicable. For the purposes of this specification, several 2713 rules are defined. 2715 * A client MUST discard any service fields that identify a 2716 resolution service whose value is not "D2X", for values of X 2717 that indicate transport protocols supported by the client. 2718 The NAPTR processing as described in RFC 2915 will result in 2719 discovery of the most preferred transport protocol of the 2720 server that is supported by the client, as well as an SRV 2721 record for the server. 2723 The domain suffixes in the NAPTR replacement field SHOULD 2724 match the domain of the original query. 2726 4. If no NAPTR records are found, the requester queries for those 2727 address records for the destination address, 2728 '_diameter._sctp'.realm or '_diameter._tcp'.realm. Address 2729 records include A RR's, AAAA RR's or other similar records, 2730 chosen according to the requestor's network protocol 2731 capabilities. If the DNS server returns no address records, the 2732 requestor gives up. 2734 If the server is using a site certificate, the domain name in the 2735 query and the domain name in the replacement field MUST both be 2736 valid based on the site certificate handed out by the server in 2737 the TLS or IKE exchange. Similarly, the domain name in the SRV 2738 query and the domain name in the target in the SRV record MUST 2739 both be valid based on the same site certificate. Otherwise, an 2740 attacker could modify the DNS records to contain replacement 2741 values in a different domain, and the client could not validate 2742 that this was the desired behavior, or the result of an attack 2744 Also, the Diameter Peer MUST check to make sure that the 2745 discovered peers are authorized to act in its role. 2746 Authentication via IKE or TLS, or validation of DNS RRs via 2747 DNSSEC is not sufficient to conclude this. For example, a web 2748 server may have obtained a valid TLS certificate, and secured RRs 2749 may be included in the DNS, but this does not imply that it is 2750 authorized to act as a Diameter Server. 2752 Authorization can be achieved for example, by configuration of a 2753 Diameter Server CA. Alternatively this can be achieved by 2754 definition of OIDs within TLS or IKE certificates so as to 2755 signify Diameter Server authorization. 2757 A dynamically discovered peer causes an entry in the Peer Table (see 2758 Section 2.6) to be created. Note that entries created via DNS MUST 2759 expire (or be refreshed) within the DNS TTL. If a peer is discovered 2760 outside of the local realm, a routing table entry (see Section 2.7) 2761 for the peer's realm is created. The routing table entry's 2762 expiration MUST match the peer's expiration value. 2764 5.3. Capabilities Exchange 2766 When two Diameter peers establish a transport connection, they MUST 2767 exchange the Capabilities Exchange messages, as specified in the peer 2768 state machine (see Section 5.6). This message allows the discovery 2769 of a peer's identity and its capabilities (protocol version number, 2770 supported Diameter applications, security mechanisms, etc.) 2772 The receiver only issues commands to its peers that have advertised 2773 support for the Diameter application that defines the command. A 2774 Diameter node MUST cache the supported applications in order to 2775 ensure that unrecognized commands and/or AVPs are not unnecessarily 2776 sent to a peer. 2778 A receiver of a Capabilities-Exchange-Req (CER) message that does not 2779 have any applications in common with the sender MUST return a 2780 Capabilities-Exchange-Answer (CEA) with the Result-Code AVP set to 2781 DIAMETER_NO_COMMON_APPLICATION, and SHOULD disconnect the transport 2782 layer connection. Note that receiving a CER or CEA from a peer 2783 advertising itself as a Relay (see Section 2.4) MUST be interpreted 2784 as having common applications with the peer. 2786 Similarly, a receiver of a Capabilities-Exchange-Req (CER) message 2787 that does not have any security mechanisms in common with the sender 2788 MUST return a Capabilities-Exchange-Answer (CEA) with the Result-Code 2789 AVP set to DIAMETER_NO_COMMON_SECURITY, and SHOULD disconnect the 2790 transport layer connection. 2792 CERs received from unknown peers MAY be silently discarded, or a CEA 2793 MAY be issued with the Result-Code AVP set to DIAMETER_UNKNOWN_PEER. 2794 In both cases, the transport connection is closed. If the local 2795 policy permits receiving CERs from unknown hosts, a successful CEA 2796 MAY be returned. If a CER from an unknown peer is answered with a 2797 successful CEA, the lifetime of the peer entry is equal to the 2798 lifetime of the transport connection. In case of a transport 2799 failure, all the pending transactions destined to the unknown peer 2800 can be discarded. 2802 The CER and CEA messages MUST NOT be proxied, redirected or relayed. 2804 Since the CER/CEA messages cannot be proxied, it is still possible 2805 that an upstream agent receives a message for which it has no 2806 available peers to handle the application that corresponds to the 2807 Command-Code. In such instances, the 'E' bit is set in the answer 2808 message (see Section 7.) with the Result-Code AVP set to 2809 DIAMETER_UNABLE_TO_DELIVER to inform the downstream to take action 2810 (e.g., re-routing request to an alternate peer). 2812 With the exception of the Capabilities-Exchange-Request message, a 2813 message of type Request that includes the Auth-Application-Id or 2814 Acct-Application-Id AVPs, or a message with an application-specific 2815 command code, MAY only be forwarded to a host that has explicitly 2816 advertised support for the application (or has advertised the Relay 2817 Application Identifier). 2819 5.3.1. Capabilities-Exchange-Request 2821 The Capabilities-Exchange-Request (CER), indicated by the Command- 2822 Code set to 257 and the Command Flags' 'R' bit set, is sent to 2823 exchange local capabilities. Upon detection of a transport failure, 2824 this message MUST NOT be sent to an alternate peer. 2826 When Diameter is run over SCTP [RFC2960], which allows for 2827 connections to span multiple interfaces and multiple IP addresses, 2828 the Capabilities-Exchange-Request message MUST contain one Host-IP- 2829 Address AVP for each potential IP address that MAY be locally used 2830 when transmitting Diameter messages. 2832 Message Format 2834 ::= < Diameter Header: 257, REQ > 2835 { Origin-Host } 2836 { Origin-Realm } 2837 1* { Host-IP-Address } 2838 { Vendor-Id } 2839 { Product-Name } 2840 [ Origin-State-Id ] 2841 * [ Supported-Vendor-Id ] 2842 * [ Auth-Application-Id ] 2843 * [ Inband-Security-Id ] 2844 * [ Acct-Application-Id ] 2845 * [ Vendor-Specific-Application-Id ] 2846 [ Firmware-Revision ] 2847 * [ AVP ] 2849 5.3.2. Capabilities-Exchange-Answer 2851 The Capabilities-Exchange-Answer (CEA), indicated by the Command-Code 2852 set to 257 and the Command Flags' 'R' bit cleared, is sent in 2853 response to a CER message. 2855 When Diameter is run over SCTP [RFC2960], which allows connections to 2856 span multiple interfaces, hence, multiple IP addresses, the 2857 Capabilities-Exchange-Answer message MUST contain one Host-IP-Address 2858 AVP for each potential IP address that MAY be locally used when 2859 transmitting Diameter messages. 2861 Message Format 2863 ::= < Diameter Header: 257 > 2864 { Result-Code } 2865 { Origin-Host } 2866 { Origin-Realm } 2867 1* { Host-IP-Address } 2868 { Vendor-Id } 2869 { Product-Name } 2870 [ Origin-State-Id ] 2871 [ Error-Message ] 2872 * [ Failed-AVP ] 2873 * [ Supported-Vendor-Id ] 2874 * [ Auth-Application-Id ] 2875 * [ Inband-Security-Id ] 2876 * [ Acct-Application-Id ] 2877 * [ Vendor-Specific-Application-Id ] 2878 [ Firmware-Revision ] 2879 * [ AVP ] 2881 5.3.3. Vendor-Id AVP 2883 The Vendor-Id AVP (AVP Code 266) is of type Unsigned32 and contains 2884 the IANA "SMI Network Management Private Enterprise Codes" [RFC3232] 2885 value assigned to the vendor of the Diameter application. In 2886 combination with the Supported-Vendor-Id AVP (Section 5.3.6), this 2887 MAY be used in order to know which vendor specific attributes may be 2888 sent to the peer. It is also envisioned that the combination of the 2889 Vendor-Id, Product-Name (Section 5.3.7) and the Firmware-Revision 2890 (Section 5.3.4) AVPs MAY provide very useful debugging information. 2892 A Vendor-Id value of zero in the CER or CEA messages is reserved and 2893 indicates that this field is ignored. 2895 5.3.4. Firmware-Revision AVP 2897 The Firmware-Revision AVP (AVP Code 267) is of type Unsigned32 and is 2898 used to inform a Diameter peer of the firmware revision of the 2899 issuing device. 2901 For devices that do not have a firmware revision (general purpose 2902 computers running Diameter software modules, for instance), the 2903 revision of the Diameter software module may be reported instead. 2905 5.3.5. Host-IP-Address AVP 2907 The Host-IP-Address AVP (AVP Code 257) is of type Address and is used 2908 to inform a Diameter peer of the sender's IP address. All source 2909 addresses that a Diameter node expects to use with SCTP [RFC2960] 2910 MUST be advertised in the CER and CEA messages by including a 2911 Host-IP- Address AVP for each address. This AVP MUST ONLY be used in 2912 the CER and CEA messages. 2914 5.3.6. Supported-Vendor-Id AVP 2916 The Supported-Vendor-Id AVP (AVP Code 265) is of type Unsigned32 and 2917 contains the IANA "SMI Network Management Private Enterprise Codes" 2918 [RFC3232] value assigned to a vendor other than the device vendor. 2919 This is used in the CER and CEA messages in order to inform the peer 2920 that the sender supports (a subset of) the vendor-specific AVPs 2921 defined by the vendor identified in this AVP. 2923 5.3.7. Product-Name AVP 2925 The Product-Name AVP (AVP Code 269) is of type UTF8String, and 2926 contains the vendor assigned name for the product. The Product-Name 2927 AVP SHOULD remain constant across firmware revisions for the same 2928 product. 2930 5.4. Disconnecting Peer connections 2932 When a Diameter node disconnects one of its transport connections, 2933 its peer cannot know the reason for the disconnect, and will most 2934 likely assume that a connectivity problem occurred, or that the peer 2935 has rebooted. In these cases, the peer may periodically attempt to 2936 reconnect, as stated in Section 2.1. In the event that the 2937 disconnect was a result of either a shortage of internal resources, 2938 or simply that the node in question has no intentions of forwarding 2939 any Diameter messages to the peer in the foreseeable future, a 2940 periodic connection request would not be welcomed. The 2941 Disconnection-Reason AVP contains the reason the Diameter node issued 2942 the Disconnect-Peer-Request message. 2944 The Disconnect-Peer-Request message is used by a Diameter node to 2945 inform its peer of its intent to disconnect the transport layer, and 2946 that the peer shouldn't reconnect unless it has a valid reason to do 2947 so (e.g., message to be forwarded). Upon receipt of the message, the 2948 Disconnect-Peer-Answer is returned, which SHOULD contain an error if 2949 messages have recently been forwarded, and are likely in flight, 2950 which would otherwise cause a race condition. 2952 The receiver of the Disconnect-Peer-Answer initiates the transport 2953 disconnect. 2955 5.4.1. Disconnect-Peer-Request 2957 The Disconnect-Peer-Request (DPR), indicated by the Command-Code set 2958 to 282 and the Command Flags' 'R' bit set, is sent to a peer to 2959 inform its intentions to shutdown the transport connection. Upon 2960 detection of a transport failure, this message MUST NOT be sent to an 2961 alternate peer. 2963 Message Format 2965 ::= < Diameter Header: 282, REQ > 2966 { Origin-Host } 2967 { Origin-Realm } 2968 { Disconnect-Cause } 2970 5.4.2. Disconnect-Peer-Answer 2972 The Disconnect-Peer-Answer (DPA), indicated by the Command-Code set 2973 to 282 and the Command Flags' 'R' bit cleared, is sent as a response 2974 to the Disconnect-Peer-Request message. Upon receipt of this 2975 message, the transport connection is shutdown. 2977 Message Format 2979 ::= < Diameter Header: 282 > 2980 { Result-Code } 2981 { Origin-Host } 2982 { Origin-Realm } 2983 [ Error-Message ] 2984 * [ Failed-AVP ] 2986 5.4.3. Disconnect-Cause AVP 2988 The Disconnect-Cause AVP (AVP Code 273) is of type Enumerated. A 2989 Diameter node MUST include this AVP in the Disconnect-Peer-Request 2990 message to inform the peer of the reason for its intention to 2991 shutdown the transport connection. The following values are 2992 supported: 2994 REBOOTING 0 2995 A scheduled reboot is imminent. 2997 BUSY 1 2998 The peer's internal resources are constrained, and it has 2999 determined that the transport connection needs to be closed. 3001 DO_NOT_WANT_TO_TALK_TO_YOU 2 3002 The peer has determined that it does not see a need for the 3003 transport connection to exist, since it does not expect any 3004 messages to be exchanged in the near future. 3006 5.5. Transport Failure Detection 3008 Given the nature of the Diameter protocol, it is recommended that 3009 transport failures be detected as soon as possible. Detecting such 3010 failures will minimize the occurrence of messages sent to unavailable 3011 agents, resulting in unnecessary delays, and will provide better 3012 failover performance. The Device-Watchdog-Request and Device- 3013 Watchdog-Answer messages, defined in this section, are used to pro- 3014 actively detect transport failures. 3016 5.5.1. Device-Watchdog-Request 3018 The Device-Watchdog-Request (DWR), indicated by the Command-Code set 3019 to 280 and the Command Flags' 'R' bit set, is sent to a peer when no 3020 traffic has been exchanged between two peers (see Section 5.5.3). 3021 Upon detection of a transport failure, this message MUST NOT be sent 3022 to an alternate peer. 3024 Message Format 3026 ::= < Diameter Header: 280, REQ > 3027 { Origin-Host } 3028 { Origin-Realm } 3029 [ Origin-State-Id ] 3031 5.5.2. Device-Watchdog-Answer 3033 The Device-Watchdog-Answer (DWA), indicated by the Command-Code set 3034 to 280 and the Command Flags' 'R' bit cleared, is sent as a response 3035 to the Device-Watchdog-Request message. 3037 Message Format 3039 ::= < Diameter Header: 280 > 3040 { Result-Code } 3041 { Origin-Host } 3042 { Origin-Realm } 3043 [ Error-Message ] 3044 * [ Failed-AVP ] 3045 [ Original-State-Id ] 3047 5.5.3. Transport Failure Algorithm 3049 The transport failure algorithm is defined in [RFC3539]. All 3050 Diameter implementations MUST support the algorithm defined in the 3051 specification in order to be compliant to the Diameter base protocol. 3053 5.5.4. Failover and Failback Procedures 3055 In the event that a transport failure is detected with a peer, it is 3056 necessary for all pending request messages to be forwarded to an 3057 alternate agent, if possible. This is commonly referred to as 3058 failover. 3060 In order for a Diameter node to perform failover procedures, it is 3061 necessary for the node to maintain a pending message queue for a 3062 given peer. When an answer message is received, the corresponding 3063 request is removed from the queue. The Hop-by-Hop Identifier field 3064 is used to match the answer with the queued request. 3066 When a transport failure is detected, if possible all messages in the 3067 queue are sent to an alternate agent with the T flag set. On booting 3068 a Diameter client or agent, the T flag is also set on any records 3069 still remaining to be transmitted in non-volatile storage. An 3070 example of a case where it is not possible to forward the message to 3071 an alternate server is when the message has a fixed destination, and 3072 the unavailable peer is the message's final destination (see 3073 Destination-Host AVP). Such an error requires that the agent return 3074 an answer message with the 'E' bit set and the Result-Code AVP set to 3075 DIAMETER_UNABLE_TO_DELIVER. 3077 It is important to note that multiple identical requests or answers 3078 MAY be received as a result of a failover. The End-to-End Identifier 3079 field in the Diameter header along with the Origin-Host AVP MUST be 3080 used to identify duplicate messages. 3082 As described in Section 2.1, a connection request should be 3083 periodically attempted with the failed peer in order to re-establish 3084 the transport connection. Once a connection has been successfully 3085 established, messages can once again be forwarded to the peer. This 3086 is commonly referred to as failback. 3088 5.6. Peer State Machine 3090 This section contains a finite state machine that MUST be observed by 3091 all Diameter implementations. Each Diameter node MUST follow the 3092 state machine described below when communicating with each peer. 3093 Multiple actions are separated by commas, and may continue on 3094 succeeding lines, as space requires. Similarly, state and next state 3095 may also span multiple lines, as space requires. 3097 This state machine is closely coupled with the state machine 3098 described in [RFC3539], which is used to open, close, failover, 3099 probe, and reopen transport connections. Note in particular that 3100 [RFC3539] requires the use of watchdog messages to probe connections. 3101 For Diameter, DWR and DWA messages are to be used. 3103 I- is used to represent the initiator (connecting) connection, while 3104 the R- is used to represent the responder (listening) connection. 3105 The lack of a prefix indicates that the event or action is the same 3106 regardless of the connection on which the event occurred. 3108 The stable states that a state machine may be in are Closed, I-Open 3109 and R-Open; all other states are intermediate. Note that I-Open and 3110 R-Open are equivalent except for whether the initiator or responder 3111 transport connection is used for communication. 3113 A CER message is always sent on the initiating connection immediately 3114 after the connection request is successfully completed. In the case 3115 of an election, one of the two connections will shut down. The 3116 responder connection will survive if the Origin-Host of the local 3117 Diameter entity is higher than that of the peer; the initiator 3118 connection will survive if the peer's Origin-Host is higher. All 3119 subsequent messages are sent on the surviving connection. Note that 3120 the results of an election on one peer are guaranteed to be the 3121 inverse of the results on the other. 3123 For TLS usage, a TLS handshake will begin when both ends are in the 3124 open state. If the TLS handshake is successful, all further messages 3125 will be sent via TLS. If the handshake fails, both ends move to the 3126 closed state. 3128 The state machine constrains only the behavior of a Diameter 3129 implementation as seen by Diameter peers through events on the wire. 3131 Any implementation that produces equivalent results is considered 3132 compliant. 3134 state event action next state 3135 ----------------------------------------------------------------- 3136 Closed Start I-Snd-Conn-Req Wait-Conn-Ack 3137 R-Conn-CER R-Accept, R-Open 3138 Process-CER, 3139 R-Snd-CEA 3141 Wait-Conn-Ack I-Rcv-Conn-Ack I-Snd-CER Wait-I-CEA 3142 I-Rcv-Conn-Nack Cleanup Closed 3143 R-Conn-CER R-Accept, Wait-Conn-Ack/ 3144 Process-CER Elect 3145 Timeout Error Closed 3147 Wait-I-CEA I-Rcv-CEA Process-CEA I-Open 3148 R-Conn-CER R-Accept, Wait-Returns 3149 Process-CER, 3150 Elect 3151 I-Peer-Disc I-Disc Closed 3152 I-Rcv-Non-CEA Error Closed 3153 Timeout Error Closed 3155 Wait-Conn-Ack/ I-Rcv-Conn-Ack I-Snd-CER,Elect Wait-Returns 3156 Elect I-Rcv-Conn-Nack R-Snd-CEA R-Open 3157 R-Peer-Disc R-Disc Wait-Conn-Ack 3158 R-Conn-CER R-Reject Wait-Conn-Ack/ 3159 Elect 3160 Timeout Error Closed 3162 Wait-Returns Win-Election I-Disc,R-Snd-CEA R-Open 3163 I-Peer-Disc I-Disc, R-Open 3164 R-Snd-CEA 3165 I-Rcv-CEA R-Disc I-Open 3166 R-Peer-Disc R-Disc Wait-I-CEA 3167 R-Conn-CER R-Reject Wait-Returns 3168 Timeout Error Closed 3170 R-Open Send-Message R-Snd-Message R-Open 3171 R-Rcv-Message Process R-Open 3172 R-Rcv-DWR Process-DWR, R-Open 3173 R-Snd-DWA 3174 R-Rcv-DWA Process-DWA R-Open 3175 R-Conn-CER R-Reject R-Open 3176 Stop R-Snd-DPR Closing 3177 R-Rcv-DPR R-Snd-DPA, Closed 3178 R-Disc 3180 R-Peer-Disc R-Disc Closed 3181 R-Rcv-CER R-Snd-CEA R-Open 3182 R-Rcv-CEA Process-CEA R-Open 3184 I-Open Send-Message I-Snd-Message I-Open 3185 I-Rcv-Message Process I-Open 3186 I-Rcv-DWR Process-DWR, I-Open 3187 I-Snd-DWA 3188 I-Rcv-DWA Process-DWA I-Open 3189 R-Conn-CER R-Reject I-Open 3190 Stop I-Snd-DPR Closing 3191 I-Rcv-DPR I-Snd-DPA, Closed 3192 I-Disc 3193 I-Peer-Disc I-Disc Closed 3194 I-Rcv-CER I-Snd-CEA I-Open 3195 I-Rcv-CEA Process-CEA I-Open 3197 Closing I-Rcv-DPA I-Disc Closed 3198 R-Rcv-DPA R-Disc Closed 3199 Timeout Error Closed 3200 I-Peer-Disc I-Disc Closed 3201 R-Peer-Disc R-Disc Closed 3203 5.6.1. Incoming connections 3205 When a connection request is received from a Diameter peer, it is 3206 not, in the general case, possible to know the identity of that peer 3207 until a CER is received from it. This is because host and port 3208 determine the identity of a Diameter peer; and the source port of an 3209 incoming connection is arbitrary. Upon receipt of CER, the identity 3210 of the connecting peer can be uniquely determined from Origin-Host. 3212 For this reason, a Diameter peer must employ logic separate from the 3213 state machine to receive connection requests, accept them, and await 3214 CER. Once CER arrives on a new connection, the Origin-Host that 3215 identifies the peer is used to locate the state machine associated 3216 with that peer, and the new connection and CER are passed to the 3217 state machine as an R-Conn-CER event. 3219 The logic that handles incoming connections SHOULD close and discard 3220 the connection if any message other than CER arrives, or if an 3221 implementation-defined timeout occurs prior to receipt of CER. 3223 Because handling of incoming connections up to and including receipt 3224 of CER requires logic, separate from that of any individual state 3225 machine associated with a particular peer, it is described separately 3226 in this section rather than in the state machine above. 3228 5.6.2. Events 3230 Transitions and actions in the automaton are caused by events. In 3231 this section, we will ignore the -I and -R prefix, since the actual 3232 event would be identical, but would occur on one of two possible 3233 connections. 3235 Start The Diameter application has signaled that a 3236 connection should be initiated with the peer. 3238 R-Conn-CER An acknowledgement is received stating that the 3239 transport connection has been established, and the 3240 associated CER has arrived. 3242 Rcv-Conn-Ack A positive acknowledgement is received confirming that 3243 the transport connection is established. 3245 Rcv-Conn-Nack A negative acknowledgement was received stating that 3246 the transport connection was not established. 3248 Timeout An application-defined timer has expired while waiting 3249 for some event. 3251 Rcv-CER A CER message from the peer was received. 3253 Rcv-CEA A CEA message from the peer was received. 3255 Rcv-Non-CEA A message other than CEA from the peer was received. 3257 Peer-Disc A disconnection indication from the peer was received. 3259 Rcv-DPR A DPR message from the peer was received. 3261 Rcv-DPA A DPA message from the peer was received. 3263 Win-Election An election was held, and the local node was the 3264 winner. 3266 Send-Message A message is to be sent. 3268 Rcv-Message A message other than CER, CEA, DPR, DPA, DWR or DWA 3269 was received. 3271 Stop The Diameter application has signaled that a 3272 connection should be terminated (e.g., on system 3273 shutdown). 3275 5.6.3. Actions 3277 Actions in the automaton are caused by events and typically indicate 3278 the transmission of packets and/or an action to be taken on the 3279 connection. In this section we will ignore the I- and R-prefix, 3280 since the actual action would be identical, but would occur on one of 3281 two possible connections. 3283 Snd-Conn-Req A transport connection is initiated with the peer. 3285 Accept The incoming connection associated with the R-Conn-CER 3286 is accepted as the responder connection. 3288 Reject The incoming connection associated with the R-Conn-CER 3289 is disconnected. 3291 Process-CER The CER associated with the R-Conn-CER is processed. 3292 Snd-CER A CER message is sent to the peer. 3294 Snd-CEA A CEA message is sent to the peer. 3296 Cleanup If necessary, the connection is shutdown, and any 3297 local resources are freed. 3299 Error The transport layer connection is disconnected, either 3300 politely or abortively, in response to an error 3301 condition. Local resources are freed. 3303 Process-CEA A received CEA is processed. 3305 Snd-DPR A DPR message is sent to the peer. 3307 Snd-DPA A DPA message is sent to the peer. 3309 Disc The transport layer connection is disconnected, and 3310 local resources are freed. 3312 Elect An election occurs (see Section 5.6.4 for more 3313 information). 3315 Snd-Message A message is sent. 3317 Snd-DWR A DWR message is sent. 3319 Snd-DWA A DWA message is sent. 3321 Process-DWR The DWR message is serviced. 3323 Process-DWA The DWA message is serviced. 3325 Process A message is serviced. 3327 5.6.4. The Election Process 3329 The election is performed on the responder. The responder compares 3330 the Origin-Host received in the CER sent by its peer with its own 3331 Origin-Host. If the local Diameter entity's Origin-Host is higher 3332 than the peer's, a Win-Election event is issued locally. 3334 The comparison proceeds by considering the shorter OctetString to be 3335 padded with zeros so that it length is the same as the length of the 3336 longer, then performing an octet-by-octet unsigned comparison with 3337 the first octet being most significant. Any remaining octets are 3338 assumed to have value 0x80. 3340 6. Diameter message processing 3342 This section describes how Diameter requests and answers are created 3343 and processed. 3345 6.1. Diameter Request Routing Overview 3347 A request is sent towards its final destination using a combination 3348 of the Destination-Realm and Destination-Host AVPs, in one of these 3349 three combinations: 3351 o a request that is not able to be proxied (such as CER) MUST NOT 3352 contain either Destination-Realm or Destination-Host AVPs. 3354 o a request that needs to be sent to a home server serving a 3355 specific realm, but not to a specific server (such as the first 3356 request of a series of round-trips), MUST contain a Destination- 3357 Realm AVP, but MUST NOT contain a Destination-Host AVP. 3359 o otherwise, a request that needs to be sent to a specific home 3360 server among those serving a given realm, MUST contain both the 3361 Destination-Realm and Destination-Host AVPs. 3363 The Destination-Host AVP is used as described above when the 3364 destination of the request is fixed, which includes: 3366 o Authentication requests that span multiple round trips 3368 o A Diameter message that uses a security mechanism that makes use 3369 of a pre-established session key shared between the source and the 3370 final destination of the message. 3372 o Server initiated messages that MUST be received by a specific 3373 Diameter client (e.g., access device), such as the Abort-Session- 3374 Request message, which is used to request that a particular user's 3375 session be terminated. 3377 Note that an agent can forward a request to a host described in the 3378 Destination-Host AVP only if the host in question is included in its 3379 peer table (see Section 2.7). Otherwise, the request is routed based 3380 on the Destination-Realm only (see Sections 6.1.6). 3382 The Destination-Realm AVP MUST be present if the message is 3383 proxiable. Request messages that may be forwarded by Diameter agents 3384 (proxies, redirects or relays) MUST also contain an Acct- 3385 Application-Id AVP, an Auth-Application-Id AVP or a Vendor-Specific- 3386 Application-Id AVP. A message that MUST NOT be forwarded by Diameter 3387 agents (proxies, redirects or relays) MUST not include the 3388 Destination-Realm in its ABNF. The value of the Destination-Realm 3389 AVP MAY be extracted from the User-Name AVP, or other application- 3390 specific methods. 3392 When a message is received, the message is processed in the following 3393 order: 3395 o If the message is destined for the local host, the procedures 3396 listed in Section 6.1.4 are followed. 3398 o If the message is intended for a Diameter peer with whom the local 3399 host is able to directly communicate, the procedures listed in 3400 Section 6.1.5 are followed. This is known as Request Forwarding. 3402 o The procedures listed in Section 6.1.6 are followed, which is 3403 known as Request Routing. 3405 o If none of the above is successful, an answer is returned with the 3406 Result-Code set to DIAMETER_UNABLE_TO_DELIVER, with the E-bit set. 3408 For routing of Diameter messages to work within an administrative 3409 domain, all Diameter nodes within the realm MUST be peers. 3411 Note the processing rules contained in this section are intended to 3412 be used as general guidelines to Diameter developers. Certain 3413 implementations MAY use different methods than the ones described 3414 here, and still comply with the protocol specification. See Section 3415 7 for more detail on error handling. 3417 6.1.1. Originating a Request 3419 When creating a request, in addition to any other procedures 3420 described in the application definition for that specific request, 3421 the following procedures MUST be followed: 3423 o the Command-Code is set to the appropriate value 3425 o the 'R' bit is set 3427 o the End-to-End Identifier is set to a locally unique value 3429 o the Origin-Host and Origin-Realm AVPs MUST be set to the 3430 appropriate values, used to identify the source of the message 3432 o the Destination-Host and Destination-Realm AVPs MUST be set to the 3433 appropriate values as described in Section 6.1. 3435 o an Acct-Application-Id AVP, an Auth-Application-Id or a Vendor- 3436 Specific-Application-Id AVP must be included if the request is 3437 proxiable. 3439 6.1.2. Sending a Request 3441 When sending a request, originated either locally, or as the result 3442 of a forwarding or routing operation, the following procedures MUST 3443 be followed: 3445 o the Hop-by-Hop Identifier should be set to a locally unique value. 3447 o The message should be saved in the list of pending requests. 3449 Other actions to perform on the message based on the particular role 3450 the agent is playing are described in the following sections. 3452 6.1.3. Receiving Requests 3454 A relay or proxy agent MUST check for forwarding loops when receiving 3455 requests. A loop is detected if the server finds its own identity in 3456 a Route-Record AVP. When such an event occurs, the agent MUST answer 3457 with the Result-Code AVP set to DIAMETER_LOOP_DETECTED. 3459 6.1.4. Processing Local Requests 3461 A request is known to be for local consumption when one of the 3462 following conditions occur: 3464 o The Destination-Host AVP contains the local host's identity, 3466 o The Destination-Host AVP is not present, the Destination-Realm AVP 3467 contains a realm the server is configured to process locally, and 3468 the Diameter application is locally supported, or 3470 o Both the Destination-Host and the Destination-Realm are not 3471 present. 3473 When a request is locally processed, the rules in Section 6.2 should 3474 be used to generate the corresponding answer. 3476 6.1.5. Request Forwarding 3478 Request forwarding is done using the Diameter Peer Table. The 3479 Diameter peer table contains all of the peers that the local node is 3480 able to directly communicate with. 3482 When a request is received, and the host encoded in the Destination- 3483 Host AVP is one that is present in the peer table, the message SHOULD 3484 be forwarded to the peer. 3486 6.1.6. Request Routing 3488 Diameter request message routing is done via realms and applications. 3489 A Diameter message that may be forwarded by Diameter agents (proxies, 3490 redirects or relays) MUST include the target realm in the 3491 Destination-Realm AVP and one of the application identification AVPs 3492 Auth-Application-Id, Acct-Application-Id or Vendor-Specific- 3493 Application-Id. The realm MAY be retrieved from the User-Name AVP, 3494 which is in the form of a Network Access Identifier (NAI). The realm 3495 portion of the NAI is inserted in the Destination-Realm AVP. 3497 Diameter agents MAY have a list of locally supported realms and 3498 applications, and MAY have a list of externally supported realms and 3499 applications. When a request is received that includes a realm 3500 and/or application that is not locally supported, the message is 3501 routed to the peer configured in the Realm Routing Table (see Section 3502 2.7). 3504 6.1.7. Redirecting requests 3506 When a redirect agent receives a request whose routing entry is set 3507 to REDIRECT, it MUST reply with an answer message with the 'E' bit 3508 set, while maintaining the Hop-by-Hop Identifier in the header, and 3509 include the Result-Code AVP to DIAMETER_REDIRECT_INDICATION. Each of 3510 the servers associated with the routing entry are added in separate 3511 Redirect-Host AVP. 3513 +------------------+ 3514 | Diameter | 3515 | Redirect Agent | 3516 +------------------+ 3517 ^ | 2. command + 'E' bit 3518 1. Request | | Result-Code = 3519 joe@example.com | | DIAMETER_REDIRECT_INDICATION + 3520 | | Redirect-Host AVP(s) 3521 | v 3522 +-------------+ 3. Request +-------------+ 3523 | example.com |------------->| example.net | 3524 | Relay | | Diameter | 3525 | Agent |<-------------| Server | 3526 +-------------+ 4. Answer +-------------+ 3527 Figure 5: Diameter Redirect Agent 3529 The receiver of the answer message with the 'E' bit set, and the 3530 Result-Code AVP set to DIAMETER_REDIRECT_INDICATION uses the hop-by- 3531 hop field in the Diameter header to identify the request in the 3532 pending message queue (see Section 5.3) that is to be redirected. If 3533 no transport connection exists with the new agent, one is created, 3534 and the request is sent directly to it. 3536 Multiple Redirect-Host AVPs are allowed. The receiver of the answer 3537 message with the 'E' bit set selects exactly one of these hosts as 3538 the destination of the redirected message. 3540 6.1.8. Relaying and Proxying Requests 3542 A relay or proxy agent MUST append a Route-Record AVP to all requests 3543 forwarded. The AVP contains the identity of the peer the request was 3544 received from. 3546 The Hop-by-Hop identifier in the request is saved, and replaced with 3547 a locally unique value. The source of the request is also saved, 3548 which includes the IP address, port and protocol. 3550 A relay or proxy agent MAY include the Proxy-Info AVP in requests if 3551 it requires access to any local state information when the 3552 corresponding response is received. Proxy-Info AVP has certain 3553 security implications and SHOULD contain an embedded HMAC with a 3554 node-local key. Alternatively, it MAY simply use local storage to 3555 store state information. 3557 The message is then forwarded to the next hop, as identified in the 3558 Realm Routing Table. 3560 Figure 6 provides an example of message routing using the procedures 3561 listed in these sections. 3563 (Origin-Host=nas.mno.net) (Origin-Host=nas.mno.net) 3564 (Origin-Realm=mno.net) (Origin-Realm=mno.net) 3565 (Destination-Realm=example.com) (Destination- 3566 Realm=example.com) 3567 (Route-Record=nas.example.net) 3568 +------+ ------> +------+ ------> +------+ 3569 | | (Request) | | (Request) | | 3570 | NAS +-------------------+ DRL +-------------------+ HMS | 3571 | | | | | | 3572 +------+ <------ +------+ <------ +------+ 3573 example.net (Answer) example.net (Answer) example.com 3574 (Origin-Host=hms.example.com) (Origin-Host=hms.example.com) 3575 (Origin-Realm=example.com) (Origin-Realm=example.com) 3577 Figure 6: Routing of Diameter messages 3579 6.2. Diameter Answer Processing 3581 When a request is locally processed, the following procedures MUST be 3582 applied to create the associated answer, in addition to any 3583 additional procedures that MAY be discussed in the Diameter 3584 application defining the command: 3586 o The same Hop-by-Hop identifier in the request is used in the 3587 answer. 3589 o The local host's identity is encoded in the Origin-Host AVP. 3591 o The Destination-Host and Destination-Realm AVPs MUST NOT be 3592 present in the answer message. 3594 o The Result-Code AVP is added with its value indicating success or 3595 failure. 3597 o If the Session-Id is present in the request, it MUST be included 3598 in the answer. 3600 o Any Proxy-Info AVPs in the request MUST be added to the answer 3601 message, in the same order they were present in the request. 3603 o The 'P' bit is set to the same value as the one in the request. 3605 o The same End-to-End identifier in the request is used in the 3606 answer. 3608 Note that the error messages (see Section 7.3) are also subjected to 3609 the above processing rules. 3611 6.2.1. Processing received Answers 3613 A Diameter client or proxy MUST match the Hop-by-Hop Identifier in an 3614 answer received against the list of pending requests. The 3615 corresponding message should be removed from the list of pending 3616 requests. It SHOULD ignore answers received that do not match a 3617 known Hop-by-Hop Identifier. 3619 6.2.2. Relaying and Proxying Answers 3621 If the answer is for a request which was proxied or relayed, the 3622 agent MUST restore the original value of the Diameter header's Hop- 3623 by-Hop Identifier field. 3625 If the last Proxy-Info AVP in the message is targeted to the local 3626 Diameter server, the AVP MUST be removed before the answer is 3627 forwarded. 3629 If a relay or proxy agent receives an answer with a Result-Code AVP 3630 indicating a failure, it MUST NOT modify the contents of the AVP. 3631 Any additional local errors detected SHOULD be logged, but not 3632 reflected in the Result-Code AVP. If the agent receives an answer 3633 message with a Result-Code AVP indicating success, and it wishes to 3634 modify the AVP to indicate an error, it MUST modify the Result-Code 3635 AVP to contain the appropriate error in the message destined towards 3636 the access device as well as include the Error-Reporting-Host AVP and 3637 it MUST issue an STR on behalf of the access device. 3639 The agent MUST then send the answer to the host that it received the 3640 original request from. 3642 6.3. Origin-Host AVP 3644 The Origin-Host AVP (AVP Code 264) is of type DiameterIdentity, and 3645 MUST be present in all Diameter messages. This AVP identifies the 3646 endpoint that originated the Diameter message. Relay agents MUST NOT 3647 modify this AVP. 3649 The value of the Origin-Host AVP is guaranteed to be unique within a 3650 single host. 3652 Note that the Origin-Host AVP may resolve to more than one address as 3653 the Diameter peer may support more than one address. 3655 This AVP SHOULD be placed as close to the Diameter header as 3656 possible. 6.10 3658 6.4. Origin-Realm AVP 3660 The Origin-Realm AVP (AVP Code 296) is of type DiameterIdentity. 3661 This AVP contains the Realm of the originator of any Diameter message 3662 and MUST be present in all messages. 3664 This AVP SHOULD be placed as close to the Diameter header as 3665 possible. 3667 6.5. Destination-Host AVP 3669 The Destination-Host AVP (AVP Code 293) is of type DiameterIdentity. 3670 This AVP MUST be present in all unsolicited agent initiated messages, 3671 MAY be present in request messages, and MUST NOT be present in Answer 3672 messages. 3674 The absence of the Destination-Host AVP will cause a message to be 3675 sent to any Diameter server supporting the application within the 3676 realm specified in Destination-Realm AVP. 3678 This AVP SHOULD be placed as close to the Diameter header as 3679 possible. 3681 6.6. Destination-Realm AVP 3683 The Destination-Realm AVP (AVP Code 283) is of type DiameterIdentity, 3684 and contains the realm the message is to be routed to. The 3685 Destination-Realm AVP MUST NOT be present in Answer messages. 3686 Diameter Clients insert the realm portion of the User-Name AVP. 3687 Diameter servers initiating a request message use the value of the 3688 Origin-Realm AVP from a previous message received from the intended 3689 target host (unless it is known a priori). When present, the 3690 Destination-Realm AVP is used to perform message routing decisions. 3692 Request messages whose ABNF does not list the Destination-Realm AVP 3693 as a mandatory AVP are inherently non-routable messages. 3695 This AVP SHOULD be placed as close to the Diameter header as 3696 possible. 3698 6.7. Routing AVPs 3700 The AVPs defined in this section are Diameter AVPs used for routing 3701 purposes. These AVPs change as Diameter messages are processed by 3702 agents, and therefore MUST NOT be protected by end-to-end security. 3704 6.7.1. Route-Record AVP 3706 The Route-Record AVP (AVP Code 282) is of type DiameterIdentity. The 3707 identity added in this AVP MUST be the same as the one received in 3708 the Origin-Host of the Capabilities Exchange message. 3710 6.7.2. Proxy-Info AVP 3712 The Proxy-Info AVP (AVP Code 284) is of type Grouped. The Grouped 3713 Data field has the following ABNF grammar: 3715 Proxy-Info ::= < AVP Header: 284 > 3716 { Proxy-Host } 3717 { Proxy-State } 3718 * [ AVP ] 3720 6.7.3. Proxy-Host AVP 3722 The Proxy-Host AVP (AVP Code 280) is of type DiameterIdentity. This 3723 AVP contains the identity of the host that added the Proxy-Info AVP. 3725 6.7.4. Proxy-State AVP 3727 The Proxy-State AVP (AVP Code 33) is of type OctetString, and 3728 contains state local information, and MUST be treated as opaque data. 3730 6.8. Auth-Application-Id AVP 3732 The Auth-Application-Id AVP (AVP Code 258) is of type Unsigned32 and 3733 is used in order to advertise support of the Authentication and 3734 Authorization portion of an application (see Section 2.4). The Auth- 3735 Application-Id MUST also be present in all Authentication and/or 3736 Authorization messages that are defined in a separate Diameter 3737 specification and have an Application ID assigned. 3739 6.9. Acct-Application-Id AVP 3741 The Acct-Application-Id AVP (AVP Code 259) is of type Unsigned32 and 3742 is used in order to advertise support of the Accounting portion of an 3743 application (see Section 2.4). The Acct-Application-Id MUST also be 3744 present in all Accounting messages. Exactly one of the Auth- 3745 Application-Id and Acct-Application-Id AVPs MAY be present. 3747 6.10. Inband-Security-Id AVP 3749 The Inband-Security-Id AVP (AVP Code 299) is of type Unsigned32 and 3750 is used in order to advertise support of the Security portion of the 3751 application. 3753 Currently, the following values are supported, but there is ample 3754 room to add new security Ids. 3756 NO_INBAND_SECURITY 0 3758 This peer does not support TLS. This is the default value, if the 3759 AVP is omitted. 3761 TLS 1 3763 This node supports TLS security, as defined by [RFC2246]. 3765 6.11. Vendor-Specific-Application-Id AVP 3767 The Vendor-Specific-Application-Id AVP (AVP Code 260) is of type 3768 Grouped and is used to advertise support of a vendor-specific 3769 Diameter Application. Exactly one of the Auth-Application-Id and 3770 Acct-Application-Id AVPs MAY be present. 3772 This AVP MUST also be present as the first AVP in all experimental 3773 commands defined in the vendor-specific application. 3775 This AVP SHOULD be placed as close to the Diameter header as 3776 possible. 3778 AVP Format 3780 ::= < AVP Header: 260 > 3781 1* [ Vendor-Id ] 3782 0*1{ Auth-Application-Id } 3783 0*1{ Acct-Application-Id } 3785 6.12. Redirect-Host AVP 3787 One or more of instances of this AVP MUST be present if the answer 3788 message's 'E' bit is set and the Result-Code AVP is set to 3789 DIAMETER_REDIRECT_INDICATION. 3791 Upon receiving the above, the receiving Diameter node SHOULD forward 3792 the request directly to one of the hosts identified in these AVPs. 3793 The server contained in the selected Redirect-Host AVP SHOULD be used 3794 for all messages pertaining to this session. 3796 6.13. Redirect-Host-Usage AVP 3798 The Redirect-Host-Usage AVP (AVP Code 261) is of type Enumerated. 3799 This AVP MAY be present in answer messages whose 'E' bit is set and 3800 the Result-Code AVP is set to DIAMETER_REDIRECT_INDICATION. 3802 When present, this AVP dictates how the routing entry resulting from 3803 the Redirect-Host is to be used. The following values are supported: 3805 DONT_CACHE 0 3807 The host specified in the Redirect-Host AVP should not be cached. 3808 This is the default value. 3810 ALL_SESSION 1 3812 All messages within the same session, as defined by the same value 3813 of the Session-ID AVP MAY be sent to the host specified in the 3814 Redirect-Host AVP. 3816 ALL_REALM 2 3818 All messages destined for the realm requested MAY be sent to the 3819 host specified in the Redirect-Host AVP. 3821 REALM_AND_APPLICATION 3 3823 All messages for the application requested to the realm specified 3824 MAY be sent to the host specified in the Redirect-Host AVP. 3826 ALL_APPLICATION 4 3828 All messages for the application requested MAY be sent to the host 3829 specified in the Redirect-Host AVP. 3831 ALL_HOST 5 3833 All messages that would be sent to the host that generated the 3834 Redirect-Host MAY be sent to the host specified in the Redirect- 3835 Host AVP. 3837 ALL_USER 6 3839 All messages for the user requested MAY be sent to the host 3840 specified in the Redirect-Host AVP. 3842 6.14. Redirect-Max-Cache-Time AVP 3844 The Redirect-Max-Cache-Time AVP (AVP Code 262) is of type Unsigned32. 3845 This AVP MUST be present in answer messages whose 'E' bit is set, the 3846 Result-Code AVP is set to DIAMETER_REDIRECT_INDICATION and the 3847 Redirect-Host-Usage AVP set to a non-zero value. 3849 This AVP contains the maximum number of seconds the peer and route 3850 table entries, created as a result of the Redirect-Host, will be 3851 cached. Note that once a host created due to a redirect indication 3852 is no longer reachable, any associated peer and routing table entries 3853 MUST be deleted. 3855 6.15. E2E-Sequence AVP 3857 The E2E-Sequence AVP (AVP Code 300) provides anti-replay protection 3858 for end to end messages and is of type grouped. It contains a random 3859 value (an OctetString with a nonce) and counter (an Integer). For 3860 each end-to-end peer with which a node communicates (or remembers 3861 communicating) a different nonce value MUST be used and the counter 3862 is initiated at zero and increases by one each time this AVP is 3863 emitted to that peer. This AVP MUST be included in all messages 3864 which use end-to-end protection (e.g., CMS signing or encryption). 3866 7. Error Handling 3868 There are two different types of errors in Diameter; protocol and 3869 application errors. A protocol error is one that occurs at the base 3870 protocol level, and MAY require per hop attention (e.g., message 3871 routing error). Application errors, on the other hand, generally 3872 occur due to a problem with a function specified in a Diameter 3873 application (e.g., user authentication, Missing AVP). 3875 Result-Code AVP values that are used to report protocol errors MUST 3876 only be present in answer messages whose 'E' bit is set. When a 3877 request message is received that causes a protocol error, an answer 3878 message is returned with the 'E' bit set, and the Result-Code AVP is 3879 set to the appropriate protocol error value. As the answer is sent 3880 back towards the originator of the request, each proxy or relay agent 3881 MAY take action on the message. 3883 1. Request +---------+ Link Broken 3884 +-------------------------->|Diameter |----///----+ 3885 | +---------------------| | v 3886 +------+--+ | 2. answer + 'E' set | Relay 2 | +--------+ 3887 |Diameter |<-+ (Unable to Forward) +---------+ |Diameter| 3888 | | | Home | 3889 | Relay 1 |--+ +---------+ | Server | 3890 +---------+ | 3. Request |Diameter | +--------+ 3891 +-------------------->| | ^ 3892 | Relay 3 |-----------+ 3893 +---------+ 3895 Figure 7: Example of Protocol Error causing answer message 3897 Figure 7 provides an example of a message forwarded upstream by a 3898 Diameter relay. When the message is received by Relay 2, and it 3899 detects that it cannot forward the request to the home server, an 3900 answer message is returned with the 'E' bit set and the Result-Code 3901 AVP set to DIAMETER_UNABLE_TO_DELIVER. Given that this error falls 3902 within the protocol error category, Relay 1 would take special 3903 action, and given the error, attempt to route the message through its 3904 alternate Relay 3. 3906 +---------+ 1. Request +---------+ 2. Request +---------+ 3907 | Access |------------>|Diameter |------------>|Diameter | 3908 | | | | | Home | 3909 | Device |<------------| Relay |<------------| Server | 3910 +---------+ 4. Answer +---------+ 3. Answer +---------+ 3911 (Missing AVP) (Missing AVP) 3913 Figure 8: Example of Application Error Answer message 3915 Figure 8 provides an example of a Diameter message that caused an 3916 application error. When application errors occur, the Diameter 3917 entity reporting the error clears the 'R' bit in the Command Flags, 3918 and adds the Result-Code AVP with the proper value. Application 3919 errors do not require any proxy or relay agent involvement, and 3920 therefore the message would be forwarded back to the originator of 3921 the request. 3923 There are certain Result-Code AVP application errors that require 3924 additional AVPs to be present in the answer. In these cases, the 3925 Diameter node that sets the Result-Code AVP to indicate the error 3926 MUST add the AVPs. Examples are: 3928 o An unrecognized AVP is received with the 'M' bit (Mandatory bit) 3929 set, causes an answer to be sent with the Result-Code AVP set to 3930 DIAMETER_AVP_UNSUPPORTED, and the Failed-AVP AVP containing the 3931 offending AVP. 3933 o An AVP that is received with an unrecognized value causes an 3934 answer to be returned with the Result-Code AVP set to 3935 DIAMETER_INVALID_AVP_VALUE, with the Failed-AVP AVP containing the 3936 AVP causing the error. 3938 o A command is received with an AVP that is omitted, yet is 3939 mandatory according to the command's ABNF. The receiver issues an 3940 answer with the Result-Code set to DIAMETER_MISSING_AVP, and 3941 creates an AVP with the AVP Code and other fields set as expected 3942 in the missing AVP. The created AVP is then added to the Failed- 3943 AVP AVP. 3945 The Result-Code AVP describes the error that the Diameter node 3946 encountered in its processing. In case there are multiple errors, 3947 the Diameter node MUST report only the first error it encountered 3948 (detected possibly in some implementation dependent order). The 3949 specific errors that can be described by this AVP are described in 3950 the following section. 3952 7.1. Result-Code AVP 3954 The Result-Code AVP (AVP Code 268) is of type Unsigned32 and 3955 indicates whether a particular request was completed successfully or 3956 whether an error occurred. All Diameter answer messages defined in 3957 IETF applications MUST include one Result-Code AVP. A non-successful 3958 Result-Code AVP (one containing a non 2xxx value other than 3959 DIAMETER_REDIRECT_INDICATION) MUST include the Error-Reporting-Host 3960 AVP if the host setting the Result-Code AVP is different from the 3961 identity encoded in the Origin-Host AVP. 3963 The Result-Code data field contains an IANA-managed 32-bit address 3964 space representing errors (see Section 11.4). Diameter provides the 3965 following classes of errors, all identified by the thousands digit in 3966 the decimal notation: 3968 o 1xxx (Informational) 3970 o 2xxx (Success) 3972 o 3xxx (Protocol Errors) 3974 o 4xxx (Transient Failures) 3976 o 5xxx (Permanent Failure) 3978 A non-recognized class (one whose first digit is not defined in this 3979 section) MUST be handled as a permanent failure. 3981 7.1.1. Informational 3983 Errors that fall within this category are used to inform the 3984 requester that a request could not be satisfied, and additional 3985 action is required on its part before access is granted. 3987 DIAMETER_MULTI_ROUND_AUTH 1001 3989 This informational error is returned by a Diameter server to 3990 inform the access device that the authentication mechanism being 3991 used requires multiple round trips, and a subsequent request needs 3992 to be issued in order for access to be granted. 3994 7.1.2. Success 3996 Errors that fall within the Success category are used to inform a 3997 peer that a request has been successfully completed. 3999 DIAMETER_SUCCESS 2001 4001 The Request was successfully completed. 4003 DIAMETER_LIMITED_SUCCESS 2002 4005 When returned, the request was successfully completed, but 4006 additional processing is required by the application in order to 4007 provide service to the user. 4009 7.1.3. Protocol Errors 4011 Errors that fall within the Protocol Error category SHOULD be treated 4012 on a per-hop basis, and Diameter proxies MAY attempt to correct the 4013 error, if it is possible. Note that these and only these errors MUST 4014 only be used in answer messages whose 'E' bit is set. 4016 DIAMETER_COMMAND_UNSUPPORTED 3001 4018 The Request contained a Command-Code that the receiver did not 4019 recognize or support. This MUST be used when a Diameter node 4020 receives an experimental command that it does not understand. 4022 DIAMETER_UNABLE_TO_DELIVER 3002 4024 This error is given when Diameter can not deliver the message to 4025 the destination, either because no host within the realm 4026 supporting the required application was available to process the 4027 request, or because Destination-Host AVP was given without the 4028 associated Destination-Realm AVP. 4030 DIAMETER_REALM_NOT_SERVED 3003 4032 The intended realm of the request is not recognized. 4034 DIAMETER_TOO_BUSY 3004 4036 When returned, a Diameter node SHOULD attempt to send the message 4037 to an alternate peer. This error MUST only be used when a 4038 specific server is requested, and it cannot provide the requested 4039 service. 4041 DIAMETER_LOOP_DETECTED 3005 4043 An agent detected a loop while trying to get the message to the 4044 intended recipient. The message MAY be sent to an alternate peer, 4045 if one is available, but the peer reporting the error has 4046 identified a configuration problem. 4048 DIAMETER_REDIRECT_INDICATION 3006 4050 A redirect agent has determined that the request could not be 4051 satisfied locally and the initiator of the request should direct 4052 the request directly to the server, whose contact information has 4053 been added to the response. When set, the Redirect-Host AVP MUST 4054 be present. 4056 DIAMETER_APPLICATION_UNSUPPORTED 3007 4058 A request was sent for an application that is not supported. 4060 DIAMETER_INVALID_HDR_BITS 3008 4062 A request was received whose bits in the Diameter header were 4063 either set to an invalid combination, or to a value that is 4064 inconsistent with the command code's definition. 4066 DIAMETER_INVALID_AVP_BITS 3009 4068 A request was received that included an AVP whose flag bits are 4069 set to an unrecognized value, or that is inconsistent with the 4070 AVP's definition. 4072 DIAMETER_UNKNOWN_PEER 3010 4074 A CER was received from an unknown peer. 4076 7.1.4. Transient Failures 4078 Errors that fall within the transient failures category are used to 4079 inform a peer that the request could not be satisfied at the time it 4080 was received, but MAY be able to satisfy the request in the future. 4082 DIAMETER_AUTHENTICATION_REJECTED 4001 4084 The authentication process for the user failed, most likely due to 4085 an invalid password used by the user. Further attempts MUST only 4086 be tried after prompting the user for a new password. 4088 DIAMETER_OUT_OF_SPACE 4002 4090 A Diameter node received the accounting request but was unable to 4091 commit it to stable storage due to a temporary lack of space. 4093 ELECTION_LOST 4003 4095 The peer has determined that it has lost the election process and 4096 has therefore disconnected the transport connection. 4098 7.1.5. Permanent Failures 4100 Errors that fall within the permanent failures category are used to 4101 inform the peer that the request failed, and should not be attempted 4102 again. 4104 DIAMETER_AVP_UNSUPPORTED 5001 4106 The peer received a message that contained an AVP that is not 4107 recognized or supported and was marked with the Mandatory bit. A 4108 Diameter message with this error MUST contain one or more Failed- 4109 AVP AVP containing the AVPs that caused the failure. 4111 DIAMETER_UNKNOWN_SESSION_ID 5002 4113 The request contained an unknown Session-Id. 4115 DIAMETER_AUTHORIZATION_REJECTED 5003 4117 A request was received for which the user could not be authorized. 4118 This error could occur if the service requested is not permitted 4119 to the user. 4121 DIAMETER_INVALID_AVP_VALUE 5004 4123 The request contained an AVP with an invalid value in its data 4124 portion. A Diameter message indicating this error MUST include 4125 the offending AVPs within a Failed-AVP AVP. 4127 DIAMETER_MISSING_AVP 5005 4129 The request did not contain an AVP that is required by the Command 4130 Code definition. If this value is sent in the Result-Code AVP, a 4131 Failed-AVP AVP SHOULD be included in the message. The Failed-AVP 4132 AVP MUST contain an example of the missing AVP complete with the 4133 Vendor-Id if applicable. The value field of the missing AVP 4134 should be of correct minimum length and contain zeroes. 4136 DIAMETER_RESOURCES_EXCEEDED 5006 4138 A request was received that cannot be authorized because the user 4139 has already expended allowed resources. An example of this error 4140 condition is a user that is restricted to one dial-up PPP port, 4141 attempts to establish a second PPP connection. 4143 DIAMETER_CONTRADICTING_AVPS 5007 4145 The Home Diameter server has detected AVPs in the request that 4146 contradicted each other, and is not willing to provide service to 4147 the user. One or more Failed-AVP AVPs MUST be present, containing 4148 the AVPs that contradicted each other. 4150 DIAMETER_AVP_NOT_ALLOWED 5008 4152 A message was received with an AVP that MUST NOT be present. The 4153 Failed-AVP AVP MUST be included and contain a copy of the 4154 offending AVP. 4156 DIAMETER_AVP_OCCURS_TOO_MANY_TIMES 5009 4158 A message was received that included an AVP that appeared more 4159 often than permitted in the message definition. The Failed-AVP 4160 AVP MUST be included and contain a copy of the first instance of 4161 the offending AVP that exceeded the maximum number of occurrences 4163 DIAMETER_NO_COMMON_APPLICATION 5010 4165 This error is returned when a CER message is received, and there 4166 are no common applications supported between the peers. 4168 DIAMETER_UNSUPPORTED_VERSION 5011 4170 This error is returned when a request was received, whose version 4171 number is unsupported. 4173 DIAMETER_UNABLE_TO_COMPLY 5012 4175 This error is returned when a request is rejected for unspecified 4176 reasons. 4178 DIAMETER_INVALID_BIT_IN_HEADER 5013 4180 This error is returned when an unrecognized bit in the Diameter 4181 header is set to one (1). 4183 DIAMETER_INVALID_AVP_LENGTH 5014 4185 The request contained an AVP with an invalid length. A Diameter 4186 message indicating this error MUST include the offending AVPs 4187 within a Failed-AVP AVP. 4189 DIAMETER_INVALID_MESSAGE_LENGTH 5015 4191 This error is returned when a request is received with an invalid 4192 message length. 4194 DIAMETER_INVALID_AVP_BIT_COMBO 5016 4196 The request contained an AVP with which is not allowed to have the 4197 given value in the AVP Flags field. A Diameter message indicating 4198 this error MUST include the offending AVPs within a Failed-AVP 4199 AVP. 4201 DIAMETER_NO_COMMON_SECURITY 5017 4203 This error is returned when a CER message is received, and there 4204 are no common security mechanisms supported between the peers. A 4205 Capabilities-Exchange-Answer (CEA) MUST be returned with the 4206 Result-Code AVP set to DIAMETER_NO_COMMON_SECURITY. 4208 7.2. Error Bit 4210 The 'E' (Error Bit) in the Diameter header is set when the request 4211 caused a protocol-related error (see Section 7.1.3). A message with 4212 the 'E' bit MUST NOT be sent as a response to an answer message. 4213 Note that a message with the 'E' bit set is still subjected to the 4214 processing rules defined in Section 6.2. When set, the answer 4215 message will not conform to the ABNF specification for the command, 4216 and will instead conform to the following ABNF: 4218 Message Format 4220 ::= < Diameter Header: code, ERR [PXY] > 4221 0*1< Session-Id > 4222 { Origin-Host } 4223 { Origin-Realm } 4224 { Result-Code } 4225 [ Origin-State-Id ] 4226 [ Error-Reporting-Host ] 4227 [ Proxy-Info ] 4228 * [ AVP ] 4230 Note that the code used in the header is the same than the one found 4231 in the request message, but with the 'R' bit cleared and the 'E' bit 4232 set. The 'P' bit in the header is set to the same value as the one 4233 found in the request message. 4235 7.3. Error-Message AVP 4237 The Error-Message AVP (AVP Code 281) is of type UTF8String. It MAY 4238 accompany a Result-Code AVP as a human readable error message. The 4239 Error-Message AVP is not intended to be useful in real-time, and 4240 SHOULD NOT be expected to be parsed by network entities. 4242 7.4. Error-Reporting-Host AVP 4244 The Error-Reporting-Host AVP (AVP Code 294) is of type 4245 DiameterIdentity. This AVP contains the identity of the Diameter 4246 host that sent the Result-Code AVP to a value other than 2001 4247 (Success), only if the host setting the Result-Code is different from 4248 the one encoded in the Origin-Host AVP. This AVP is intended to be 4249 used for troubleshooting purposes, and MUST be set when the Result- 4250 Code AVP indicates a failure. 4252 7.5. Failed-AVP AVP 4254 The Failed-AVP AVP (AVP Code 279) is of type Grouped and provides 4255 debugging information in cases where a request is rejected or not 4256 fully processed due to erroneous information in a specific AVP. The 4257 value of the Result-Code AVP will provide information on the reason 4258 for the Failed-AVP AVP. 4260 The possible reasons for this AVP are the presence of an improperly 4261 constructed AVP, an unsupported or unrecognized AVP, an invalid AVP 4262 value, the omission of a required AVP, the presence of an explicitly 4263 excluded AVP (see tables in Section 10), or the presence of two or 4264 more occurrences of an AVP which is restricted to 0, 1, or 0-1 4265 occurrences. 4267 A Diameter message MAY contain one Failed-AVP AVP, containing the 4268 entire AVP that could not be processed successfully. If the failure 4269 reason is omission of a required AVP, an AVP with the missing AVP 4270 code, the missing vendor id, and a zero filled payload of the minimum 4271 required length for the omitted AVP will be added. 4273 AVP Format 4275 ::= < AVP Header: 279 > 4276 1* {AVP} 4278 7.6. Experimental-Result AVP 4280 The Experimental-Result AVP (AVP Code 297) is of type Grouped, and 4281 indicates whether a particular vendor-specific request was completed 4282 successfully or whether an error occurred. Its Data field has the 4283 following ABNF grammar: 4285 AVP Format 4287 Experimental-Result ::= < AVP Header: 297 > 4288 { Vendor-Id } 4289 { Experimental-Result-Code } 4291 The Vendor-Id AVP (see Section 5.3.3) in this grouped AVP identifies 4292 the vendor responsible for the assignment of the result code which 4293 follows. All Diameter answer messages defined in vendor-specific 4294 applications MUST include either one Result-Code AVP or one 4295 Experimental-Result AVP. 4297 7.7. Experimental-Result-Code AVP 4299 The Experimental-Result-Code AVP (AVP Code 298) is of type Unsigned32 4300 and contains a vendor-assigned value representing the result of 4301 processing the request. 4303 It is recommended that vendor-specific result codes follow the same 4304 conventions given for the Result-Code AVP regarding the different 4305 types of result codes and the handling of errors (for non 2xxx 4306 values). 4308 8. Diameter User Sessions 4310 Diameter can provide two different types of services to applications. 4311 The first involves authentication and authorization, and can 4312 optionally make use of accounting. The second only makes use of 4313 accounting. 4315 When a service makes use of the authentication and/or authorization 4316 portion of an application, and a user requests access to the network, 4317 the Diameter client issues an auth request to its local server. The 4318 auth request is defined in a service specific Diameter application 4319 (e.g., NASREQ). The request contains a Session-Id AVP, which is used 4320 in subsequent messages (e.g., subsequent authorization, accounting, 4321 etc) relating to the user's session. The Session-Id AVP is a means 4322 for the client and servers to correlate a Diameter message with a 4323 user session. 4325 When a Diameter server authorizes a user to use network resources for 4326 a finite amount of time, and it is willing to extend the 4327 authorization via a future request, it MUST add the Authorization- 4328 Lifetime AVP to the answer message. The Authorization-Lifetime AVP 4329 defines the maximum number of seconds a user MAY make use of the 4330 resources before another authorization request is expected by the 4331 server. The Auth-Grace-Period AVP contains the number of seconds 4332 following the expiration of the Authorization-Lifetime, after which 4333 the server will release all state information related to the user's 4334 session. Note that if payment for services is expected by the 4335 serving realm from the user's home realm, the Authorization-Lifetime 4336 AVP, combined with the Auth-Grace-Period AVP, implies the maximum 4337 length of the session the home realm is willing to be fiscally 4338 responsible for. Services provided past the expiration of the 4339 Authorization-Lifetime and Auth-Grace-Period AVPs are the 4340 responsibility of the access device. Of course, the actual cost of 4341 services rendered is clearly outside the scope of the protocol. 4343 An access device that does not expect to send a re-authorization or a 4344 session termination request to the server MAY include the Auth- 4345 Session-State AVP with the value set to NO_STATE_MAINTAINED as a hint 4346 to the server. If the server accepts the hint, it agrees that since 4347 no session termination message will be received once service to the 4348 user is terminated, it cannot maintain state for the session. If the 4349 answer message from the server contains a different value in the 4350 Auth-Session-State AVP (or the default value if the AVP is absent), 4351 the access device MUST follow the server's directives. Note that the 4352 value NO_STATE_MAINTAINED MUST NOT be set in subsequent re- 4353 authorization requests and answers. 4355 The base protocol does not include any authorization request 4356 messages, since these are largely application-specific and are 4357 defined in a Diameter application document. However, the base 4358 protocol does define a set of messages that is used to terminate user 4359 sessions. These are used to allow servers that maintain state 4360 information to free resources. 4362 When a service only makes use of the Accounting portion of the 4363 Diameter protocol, even in combination with an application, the 4364 Session-Id is still used to identify user sessions. However, the 4365 session termination messages are not used, since a session is 4366 signaled as being terminated by issuing an accounting stop message. 4368 8.1. Authorization Session State Machine 4370 This section contains a set of finite state machines, representing 4371 the life cycle of Diameter sessions, and which MUST be observed by 4372 all Diameter implementations that make use of the authentication 4373 and/or authorization portion of a Diameter application. The term 4374 Service-Specific below refers to a message defined in a Diameter 4375 application (e.g., Mobile IPv4, NASREQ). 4377 There are four different authorization session state machines 4378 supported in the Diameter base protocol. The first two describe a 4379 session in which the server is maintaining session state, indicated 4380 by the value of the Auth-Session-State AVP (or its absence). One 4381 describes the session from a client perspective, the other from a 4382 server perspective. The second two state machines are used when the 4383 server does not maintain session state. Here again, one describes 4384 the session from a client perspective, the other from a server 4385 perspective. 4387 When a session is moved to the Idle state, any resources that were 4388 allocated for the particular session must be released. Any event not 4389 listed in the state machines MUST be considered as an error 4390 condition, and an answer, if applicable, MUST be returned to the 4391 originator of the message. 4393 In the state table, the event 'Failure to send X' means that the 4394 Diameter agent is unable to send command X to the desired 4395 destination. This could be due to the peer being down, or due to the 4396 peer sending back a transient failure or temporary protocol error 4397 notification DIAMETER_TOO_BUSY or DIAMETER_LOOP_DETECTED in the 4398 Result-Code AVP of the corresponding Answer command. The event 'X 4399 successfully sent' is the complement of 'Failure to send X'. 4401 The following state machine is observed by a client when state is 4402 maintained on the server: 4404 CLIENT, STATEFUL 4405 State Event Action New State 4406 ------------------------------------------------------------- 4407 Idle Client or Device Requests Send Pending 4408 access service 4409 specific 4410 auth req 4412 Idle ASR Received Send ASA Idle 4413 for unknown session with 4414 Result-Code 4415 = UNKNOWN_ 4416 SESSION_ID 4418 Pending Successful Service-specific Grant Open 4419 authorization answer Access 4420 received with default 4421 Auth-Session-State value 4423 Pending Successful Service-specific Sent STR Discon 4424 authorization answer received 4425 but service not provided 4427 Pending Error processing successful Sent STR Discon 4428 Service-specific authorization 4429 answer 4431 Pending Failed Service-specific Cleanup Idle 4432 authorization answer received 4434 Open User or client device Send Open 4435 requests access to service service 4436 specific 4437 auth req 4439 Open Successful Service-specific Provide Open 4440 authorization answer received Service 4442 Open Failed Service-specific Discon. Idle 4443 authorization answer user/device 4444 received. 4446 Open Session-Timeout Expires on Send STR Discon 4447 Access Device 4449 Open ASR Received, Send ASA Discon 4450 client will comply with with 4451 request to end the session Result-Code 4452 = SUCCESS, 4453 Send STR. 4455 Open ASR Received, Send ASA Open 4456 client will not comply with with 4457 request to end the session Result-Code 4458 != SUCCESS 4460 Open Authorization-Lifetime + Send STR Discon 4461 Auth-Grace-Period expires on 4462 access device 4464 Discon ASR Received Send ASA Discon 4466 Discon STA Received Discon. Idle 4467 user/device 4469 The following state machine is observed by a server when it is 4470 maintaining state for the session: 4472 SERVER, STATEFUL 4473 State Event Action New State 4474 ------------------------------------------------------------- 4475 Idle Service-specific authorization Send Open 4476 request received, and successful 4477 user is authorized serv. 4478 specific answer 4480 Idle Service-specific authorization Send Idle 4481 request received, and failed serv. 4482 user is not authorized specific answer 4484 Open Service-specific authorization Send Open 4485 request received, and user successful 4486 is authorized serv. specific 4487 answer 4489 Open Service-specific authorization Send Idle 4490 request received, and user failed serv. 4491 is not authorized specific 4492 answer, 4493 Cleanup 4495 Open Home server wants to Send ASR Discon 4496 terminate the service 4498 Open Authorization-Lifetime (and Cleanup Idle 4499 Auth-Grace-Period) expires 4500 on home server. 4502 Open Session-Timeout expires on Cleanup Idle 4503 home server 4505 Discon Failure to send ASR Wait, Discon 4506 resend ASR 4508 Discon ASR successfully sent and Cleanup Idle 4509 ASA Received with Result-Code 4511 Not ASA Received None No Change. 4512 Discon 4514 Any STR Received Send STA, Idle 4515 Cleanup. 4517 The following state machine is observed by a client when state is not 4518 maintained on the server: 4520 CLIENT, STATELESS 4521 State Event Action New State 4522 ------------------------------------------------------------- 4523 Idle Client or Device Requests Send Pending 4524 access service 4525 specific 4526 auth req 4528 Pending Successful Service-specific Grant Open 4529 authorization answer Access 4530 received with Auth-Session- 4531 State set to 4532 NO_STATE_MAINTAINED 4534 Pending Failed Service-specific Cleanup Idle 4535 authorization answer 4536 received 4538 Open Session-Timeout Expires on Discon. Idle 4539 Access Device user/device 4541 Open Service to user is terminated Discon. Idle 4542 user/device 4544 The following state machine is observed by a server when it is not 4545 maintaining state for the session: 4547 SERVER, STATELESS 4548 State Event Action New State 4549 ------------------------------------------------------------- 4550 Idle Service-specific authorization Send serv. Idle 4551 request received, and specific 4552 successfully processed answer 4554 8.2. Accounting Session State Machine 4556 The following state machines MUST be supported for applications that 4557 have an accounting portion or that require only accounting services. 4558 The first state machine is to be observed by clients. 4560 See Section 9.7 for Accounting Command Codes and Section 9.8 for 4561 Accounting AVPs. 4563 The server side in the accounting state machine depends in some cases 4564 on the particular application. The Diameter base protocol defines a 4565 default state machine that MUST be followed by all applications that 4566 have not specified other state machines. This is the second state 4567 machine in this section described below. 4569 The default server side state machine requires the reception of 4570 accounting records in any order and at any time, and does not place 4571 any standards requirement on the processing of these records. 4572 Implementations of Diameter MAY perform checking, ordering, 4573 correlation, fraud detection, and other tasks based on these records. 4574 Both base Diameter AVPs as well as application specific AVPs MAY be 4575 inspected as a part of these tasks. The tasks can happen either 4576 immediately after record reception or in a post-processing phase. 4577 However, as these tasks are typically application or even policy 4578 dependent, they are not standardized by the Diameter specifications. 4579 Applications MAY define requirements on when to accept accounting 4580 records based on the used value of Accounting-Realtime-Required AVP, 4581 credit limits checks, and so on. 4583 However, the Diameter base protocol defines one optional server side 4584 state machine that MAY be followed by applications that require 4585 keeping track of the session state at the accounting server. Note 4586 that such tracking is incompatible with the ability to sustain long 4587 duration connectivity problems. Therefore, the use of this state 4588 machine is recommended only in applications where the value of the 4589 Accounting-Realtime-Required AVP is DELIVER_AND_GRANT, and hence 4590 accounting connectivity problems are required to cause the serviced 4591 user to be disconnected. Otherwise, records produced by the client 4592 may be lost by the server which no longer accepts them after the 4593 connectivity is re-established. This state machine is the third 4594 state machine in this section. The state machine is supervised by a 4595 supervision session timer Ts, which the value should be reasonably 4596 higher than the Acct_Interim_Interval value. Ts MAY be set to two 4597 times the value of the Acct_Interim_Interval so as to avoid the 4598 accounting session in the Diameter server to change to Idle state in 4599 case of short transient network failure. 4601 Any event not listed in the state machines MUST be considered as an 4602 error condition, and a corresponding answer, if applicable, MUST be 4603 returned to the originator of the message. 4605 In the state table, the event 'Failure to send' means that the 4606 Diameter client is unable to communicate with the desired 4607 destination. This could be due to the peer being down, or due to the 4608 peer sending back a transient failure or temporary protocol error 4609 notification DIAMETER_OUT_OF_SPACE, DIAMETER_TOO_BUSY, or 4610 DIAMETER_LOOP_DETECTED in the Result-Code AVP of the Accounting 4611 Answer command. 4613 The event 'Failed answer' means that the Diameter client received a 4614 non-transient failure notification in the Accounting Answer command. 4616 Note that the action 'Disconnect user/dev' MUST have an effect also 4617 to the authorization session state table, e.g., cause the STR message 4618 to be sent, if the given application has both authentication/ 4619 authorization and accounting portions. 4621 The states PendingS, PendingI, PendingL, PendingE and PendingB stand 4622 for pending states to wait for an answer to an accounting request 4623 related to a Start, Interim, Stop, Event or buffered record, 4624 respectively. 4626 CLIENT, ACCOUNTING 4627 State Event Action New State 4628 ------------------------------------------------------------- 4629 Idle Client or device requests Send PendingS 4630 access accounting 4631 start req. 4633 Idle Client or device requests Send PendingE 4634 a one-time service accounting 4635 event req 4637 Idle Records in storage Send PendingB 4638 record 4640 PendingS Successful accounting Open 4641 start answer received 4643 PendingS Failure to send and buffer Store Open 4644 space available and realtime Start 4645 not equal to DELIVER_AND_GRANT Record 4647 PendingS Failure to send and no buffer Open 4648 space available and realtime 4649 equal to GRANT_AND_LOSE 4651 PendingS Failure to send and no buffer Disconnect Idle 4652 space available and realtime user/dev 4653 not equal to 4654 GRANT_AND_LOSE 4656 PendingS Failed accounting start answer Open 4657 received and realtime equal 4658 to GRANT_AND_LOSE 4660 PendingS Failed accounting start answer Disconnect Idle 4661 received and realtime not user/dev 4662 equal to GRANT_AND_LOSE 4664 PendingS User service terminated Store PendingS 4665 stop 4666 record 4668 Open Interim interval elapses Send PendingI 4669 accounting 4670 interim 4671 record 4672 Open User service terminated Send PendingL 4673 accounting 4674 stop req. 4676 PendingI Successful accounting interim Open 4677 answer received 4679 PendingI Failure to send and (buffer Store Open 4680 space available or old record interim 4681 can be overwritten) and record 4682 realtime not equal to 4683 DELIVER_AND_GRANT 4685 PendingI Failure to send and no buffer Open 4686 space available and realtime 4687 equal to GRANT_AND_LOSE 4689 PendingI Failure to send and no buffer Disconnect Idle 4690 space available and realtime user/dev 4691 not equal to GRANT_AND_LOSE 4693 PendingI Failed accounting interim Open 4694 answer received and realtime 4695 equal to GRANT_AND_LOSE 4697 PendingI Failed accounting interim Disconnect Idle 4698 answer received and realtime user/dev 4699 not equal to GRANT_AND_LOSE 4701 PendingI User service terminated Store PendingI 4702 stop 4703 record 4704 PendingE Successful accounting Idle 4705 event answer received 4707 PendingE Failure to send and buffer Store Idle 4708 space available event 4709 record 4711 PendingE Failure to send and no buffer Idle 4712 space available 4714 PendingE Failed accounting event answer Idle 4715 received 4717 PendingB Successful accounting answer Delete Idle 4718 received record 4720 PendingB Failure to send Idle 4722 PendingB Failed accounting answer Delete Idle 4723 received record 4725 PendingL Successful accounting Idle 4726 stop answer received 4728 PendingL Failure to send and buffer Store Idle 4729 space available stop 4730 record 4732 PendingL Failure to send and no buffer Idle 4733 space available 4735 PendingL Failed accounting stop answer Idle 4736 received 4738 SERVER, STATELESS ACCOUNTING 4739 State Event Action New State 4740 ------------------------------------------------------------- 4742 Idle Accounting start request Send Idle 4743 received, and successfully accounting 4744 processed. start 4745 answer 4747 Idle Accounting event request Send Idle 4748 received, and successfully accounting 4749 processed. event 4750 answer 4752 Idle Interim record received, Send Idle 4753 and successfully processed. accounting 4754 interim 4755 answer 4757 Idle Accounting stop request Send Idle 4758 received, and successfully accounting 4759 processed stop answer 4761 Idle Accounting request received, Send Idle 4762 no space left to store accounting 4763 records answer, 4764 Result-Code 4765 = OUT_OF_ 4766 SPACE 4768 SERVER, STATEFUL ACCOUNTING 4769 State Event Action New State 4770 ------------------------------------------------------------- 4772 Idle Accounting start request Send Open 4773 received, and successfully accounting 4774 processed. start 4775 answer, 4776 Start Ts 4778 Idle Accounting event request Send Idle 4779 received, and successfully accounting 4780 processed. event 4781 answer 4783 Idle Accounting request received, Send Idle 4784 no space left to store accounting 4785 records answer, 4786 Result-Code 4787 = OUT_OF_ 4788 SPACE 4790 Open Interim record received, Send Open 4791 and successfully processed. accounting 4792 interim 4793 answer, 4794 Restart Ts 4796 Open Accounting stop request Send Idle 4797 received, and successfully accounting 4798 processed stop answer, 4799 Stop Ts 4801 Open Accounting request received, Send Idle 4802 no space left to store accounting 4803 records answer, 4804 Result-Code 4805 = OUT_OF_ 4806 SPACE, 4807 Stop Ts 4809 Open Session supervision timer Ts Stop Ts Idle 4810 expired 4812 8.3. Server-Initiated Re-Auth 4814 A Diameter server may initiate a re-authentication and/or re- 4815 authorization service for a particular session by issuing a Re-Auth- 4816 Request (RAR). 4818 For example, for pre-paid services, the Diameter server that 4819 originally authorized a session may need some confirmation that the 4820 user is still using the services. 4822 An access device that receives a RAR message with Session-Id equal to 4823 a currently active session MUST initiate a re-auth towards the user, 4824 if the service supports this particular feature. Each Diameter 4825 application MUST state whether service-initiated re-auth is 4826 supported, since some applications do not allow access devices to 4827 prompt the user for re-auth. 4829 8.3.1. Re-Auth-Request 4831 The Re-Auth-Request (RAR), indicated by the Command-Code set to 258 4832 and the message flags' 'R' bit set, may be sent by any server to the 4833 access device that is providing session service, to request that the 4834 user be re-authenticated and/or re-authorized. 4836 Message Format 4838 ::= < Diameter Header: 258, REQ, PXY > 4839 < Session-Id > 4840 { Origin-Host } 4841 { Origin-Realm } 4842 { Destination-Realm } 4843 { Destination-Host } 4844 { Auth-Application-Id } 4845 { Re-Auth-Request-Type } 4846 [ User-Name ] 4847 [ Origin-State-Id ] 4848 * [ Proxy-Info ] 4849 * [ Route-Record ] 4850 * [ AVP ] 4852 8.3.2. Re-Auth-Answer 4854 The Re-Auth-Answer (RAA), indicated by the Command-Code set to 258 4855 and the message flags' 'R' bit clear, is sent in response to the RAR. 4856 The Result-Code AVP MUST be present, and indicates the disposition of 4857 the request. 4859 A successful RAA message MUST be followed by an application-specific 4860 authentication and/or authorization message. 4862 Message Format 4864 ::= < Diameter Header: 258, PXY > 4865 < Session-Id > 4866 { Result-Code } 4867 { Origin-Host } 4868 { Origin-Realm } 4869 [ User-Name ] 4870 [ Origin-State-Id ] 4871 [ Error-Message ] 4872 [ Error-Reporting-Host ] 4873 * [ Failed-AVP ] 4874 * [ Redirect-Host ] 4875 [ Redirect-Host-Usage ] 4876 [ Redirect-Host-Cache-Time ] 4877 * [ Proxy-Info ] 4878 * [ AVP ] 4880 8.4. Session Termination 4882 It is necessary for a Diameter server that authorized a session, for 4883 which it is maintaining state, to be notified when that session is no 4884 longer active, both for tracking purposes as well as to allow 4885 stateful agents to release any resources that they may have provided 4886 for the user's session. For sessions whose state is not being 4887 maintained, this section is not used. 4889 When a user session that required Diameter authorization terminates, 4890 the access device that provided the service MUST issue a Session- 4891 Termination-Request (STR) message to the Diameter server that 4892 authorized the service, to notify it that the session is no longer 4893 active. An STR MUST be issued when a user session terminates for any 4894 reason, including user logoff, expiration of Session-Timeout, 4895 administrative action, termination upon receipt of an Abort-Session- 4896 Request (see below), orderly shutdown of the access device, etc. 4898 The access device also MUST issue an STR for a session that was 4899 authorized but never actually started. This could occur, for 4900 example, due to a sudden resource shortage in the access device, or 4901 because the access device is unwilling to provide the type of service 4902 requested in the authorization, or because the access device does not 4903 support a mandatory AVP returned in the authorization, etc. 4905 It is also possible that a session that was authorized is never 4906 actually started due to action of a proxy. For example, a proxy may 4907 modify an authorization answer, converting the result from success to 4908 failure, prior to forwarding the message to the access device. If 4909 the answer did not contain an Auth-Session-State AVP with the value 4910 NO_STATE_MAINTAINED, a proxy that causes an authorized session not to 4911 be started MUST issue an STR to the Diameter server that authorized 4912 the session, since the access device has no way of knowing that the 4913 session had been authorized. 4915 A Diameter server that receives an STR message MUST clean up 4916 resources (e.g., session state) associated with the Session-Id 4917 specified in the STR, and return a Session-Termination-Answer. 4919 A Diameter server also MUST clean up resources when the Session- 4920 Timeout expires, or when the Authorization-Lifetime and the Auth- 4921 Grace-Period AVPs expires without receipt of a re-authorization 4922 request, regardless of whether an STR for that session is received. 4923 The access device is not expected to provide service beyond the 4924 expiration of these timers; thus, expiration of either of these 4925 timers implies that the access device may have unexpectedly shut 4926 down. 4928 8.4.1. Session-Termination-Request 4930 The Session-Termination-Request (STR), indicated by the Command-Code 4931 set to 275 and the Command Flags' 'R' bit set, is sent by the access 4932 device to inform the Diameter Server that an authenticated and/or 4933 authorized session is being terminated. 4935 Message Format 4937 ::= < Diameter Header: 275, REQ, PXY > 4938 < Session-Id > 4939 { Origin-Host } 4940 { Origin-Realm } 4941 { Destination-Realm } 4942 { Auth-Application-Id } 4943 { Termination-Cause } 4944 [ User-Name ] 4945 [ Destination-Host ] 4946 * [ Class ] 4947 [ Origin-State-Id ] 4948 * [ Proxy-Info ] 4949 * [ Route-Record ] 4950 * [ AVP ] 4952 8.4.2. Session-Termination-Answer 4954 The Session-Termination-Answer (STA), indicated by the Command-Code 4955 set to 275 and the message flags' 'R' bit clear, is sent by the 4956 Diameter Server to acknowledge the notification that the session has 4957 been terminated. The Result-Code AVP MUST be present, and MAY 4958 contain an indication that an error occurred while servicing the STR. 4960 Upon sending or receipt of the STA, the Diameter Server MUST release 4961 all resources for the session indicated by the Session-Id AVP. Any 4962 intermediate server in the Proxy-Chain MAY also release any 4963 resources, if necessary. 4965 Message Format 4967 ::= < Diameter Header: 275, PXY > 4968 < Session-Id > 4969 { Result-Code } 4970 { Origin-Host } 4971 { Origin-Realm } 4972 [ User-Name ] 4973 * [ Class ] 4974 [ Error-Message ] 4975 [ Error-Reporting-Host ] 4976 * [ Failed-AVP ] 4977 [ Origin-State-Id ] 4978 * [ Redirect-Host ] 4979 [ Redirect-Host-Usage ] 4980 ^ 4981 [ Redirect-Max-Cache-Time ] 4982 * [ Proxy-Info ] 4983 * [ AVP ] 4985 8.5. Aborting a Session 4987 A Diameter server may request that the access device stop providing 4988 service for a particular session by issuing an Abort-Session-Request 4989 (ASR). 4991 For example, the Diameter server that originally authorized the 4992 session may be required to cause that session to be stopped for 4993 credit or other reasons that were not anticipated when the session 4994 was first authorized. On the other hand, an operator may maintain a 4995 management server for the purpose of issuing ASRs to administratively 4996 remove users from the network. 4998 An access device that receives an ASR with Session-ID equal to a 4999 currently active session MAY stop the session. Whether the access 5000 device stops the session or not is implementation- and/or 5001 configuration-dependent. For example, an access device may honor 5002 ASRs from certain agents only. In any case, the access device MUST 5003 respond with an Abort-Session-Answer, including a Result-Code AVP to 5004 indicate what action it took. 5006 Note that if the access device does stop the session upon receipt of 5007 an ASR, it issues an STR to the authorizing server (which may or may 5008 not be the agent issuing the ASR) just as it would if the session 5009 were terminated for any other reason. 5011 8.5.1. Abort-Session-Request 5013 The Abort-Session-Request (ASR), indicated by the Command-Code set to 5014 274 and the message flags' 'R' bit set, may be sent by any server to 5015 the access device that is providing session service, to request that 5016 the session identified by the Session-Id be stopped. 5018 Message Format 5020 ::= < Diameter Header: 274, REQ, PXY > 5021 < Session-Id > 5022 { Origin-Host } 5023 { Origin-Realm } 5024 { Destination-Realm } 5025 { Destination-Host } 5026 { Auth-Application-Id } 5027 [ User-Name ] 5028 [ Origin-State-Id ] 5029 * [ Proxy-Info ] 5030 * [ Route-Record ] 5031 * [ AVP ] 5033 8.5.2. Abort-Session-Answer 5035 The Abort-Session-Answer (ASA), indicated by the Command-Code set to 5036 274 and the message flags' 'R' bit clear, is sent in response to the 5037 ASR. The Result-Code AVP MUST be present, and indicates the 5038 disposition of the request. 5040 If the session identified by Session-Id in the ASR was successfully 5041 terminated, Result-Code is set to DIAMETER_SUCCESS. If the session 5042 is not currently active, Result-Code is set to 5043 DIAMETER_UNKNOWN_SESSION_ID. If the access device does not stop the 5044 session for any other reason, Result-Code is set to 5045 DIAMETER_UNABLE_TO_COMPLY. 5047 Message Format 5049 ::= < Diameter Header: 274, PXY > 5050 < Session-Id > 5051 { Result-Code } 5052 { Origin-Host } 5053 { Origin-Realm } 5054 [ User-Name ] 5055 [ Origin-State-Id ] 5056 [ Error-Message ] 5057 [ Error-Reporting-Host ] 5058 * [ Failed-AVP ] 5059 * [ Redirect-Host ] 5060 [ Redirect-Host-Usage ] 5061 [ Redirect-Max-Cache-Time ] 5062 * [ Proxy-Info ] 5063 * [ AVP ] 5065 8.6. Inferring Session Termination from Origin-State-Id 5067 Origin-State-Id is used to allow rapid detection of terminated 5068 sessions for which no STR would have been issued, due to 5069 unanticipated shutdown of an access device. 5071 By including Origin-State-Id in CER/CEA messages, an access device 5072 allows a next-hop server to determine immediately upon connection 5073 whether the device has lost its sessions since the last connection. 5075 By including Origin-State-Id in request messages, an access device 5076 also allows a server with which it communicates via proxy to make 5077 such a determination. However, a server that is not directly 5078 connected with the access device will not discover that the access 5079 device has been restarted unless and until it receives a new request 5080 from the access device. Thus, use of this mechanism across proxies 5081 is opportunistic rather than reliable, but useful nonetheless. 5083 When a Diameter server receives an Origin-State-Id that is greater 5084 than the Origin-State-Id previously received from the same issuer, it 5085 may assume that the issuer has lost state since the previous message 5086 and that all sessions that were active under the lower Origin-State- 5087 Id have been terminated. The Diameter server MAY clean up all 5088 session state associated with such lost sessions, and MAY also issues 5089 STRs for all such lost sessions that were authorized on upstream 5090 servers, to allow session state to be cleaned up globally. 5092 8.7. Auth-Request-Type AVP 5094 The Auth-Request-Type AVP (AVP Code 274) is of type Enumerated and is 5095 included in application-specific auth requests to inform the peers 5096 whether a user is to be authenticated only, authorized only or both. 5097 Note any value other than both MAY cause RADIUS interoperability 5098 issues. The following values are defined: 5100 AUTHENTICATE_ONLY 1 5102 The request being sent is for authentication only, and MUST 5103 contain the relevant application specific authentication AVPs that 5104 are needed by the Diameter server to authenticate the user. 5106 AUTHORIZE_ONLY 2 5108 The request being sent is for authorization only, and MUST contain 5109 the application specific authorization AVPs that are necessary to 5110 identify the service being requested/offered. 5112 AUTHORIZE_AUTHENTICATE 3 5114 The request contains a request for both authentication and 5115 authorization. The request MUST include both the relevant 5116 application specific authentication information, and authorization 5117 information necessary to identify the service being requested/ 5118 offered. 5120 8.8. Session-Id AVP 5122 The Session-Id AVP (AVP Code 263) is of type UTF8String and is used 5123 to identify a specific session (see Section 8). All messages 5124 pertaining to a specific session MUST include only one Session-Id AVP 5125 and the same value MUST be used throughout the life of a session. 5126 When present, the Session-Id SHOULD appear immediately following the 5127 Diameter Header (see Section 3). 5129 The Session-Id MUST be globally and eternally unique, as it is meant 5130 to uniquely identify a user session without reference to any other 5131 information, and may be needed to correlate historical authentication 5132 information with accounting information. The Session-Id includes a 5133 mandatory portion and an implementation-defined portion; a 5134 recommended format for the implementation-defined portion is outlined 5135 below. 5137 The Session-Id MUST begin with the sender's identity encoded in the 5138 DiameterIdentity type (see Section 4.4). The remainder of the 5139 Session-Id is delimited by a ";" character, and MAY be any sequence 5140 that the client can guarantee to be eternally unique; however, the 5141 following format is recommended, (square brackets [] indicate an 5142 optional element): 5144 ;;[;] 5146 and are decimal representations of the 5147 high and low 32 bits of a monotonically increasing 64-bit value. The 5148 64-bit value is rendered in two part to simplify formatting by 32-bit 5149 processors. At startup, the high 32 bits of the 64-bit value MAY be 5150 initialized to the time, and the low 32 bits MAY be initialized to 5151 zero. This will for practical purposes eliminate the possibility of 5152 overlapping Session-Ids after a reboot, assuming the reboot process 5153 takes longer than a second. Alternatively, an implementation MAY 5154 keep track of the increasing value in non-volatile memory. 5156 is implementation specific but may include a modem's 5157 device Id, a layer 2 address, timestamp, etc. 5159 Example, in which there is no optional value: 5160 accesspoint7.acme.com;1876543210;523 5162 Example, in which there is an optional value: 5163 accesspoint7.acme.com;1876543210;523;mobile@200.1.1.88 5165 The Session-Id is created by the Diameter application initiating the 5166 session, which in most cases is done by the client. Note that a 5167 Session-Id MAY be used for both the authorization and accounting 5168 commands of a given application. 5170 8.9. Authorization-Lifetime AVP 5172 The Authorization-Lifetime AVP (AVP Code 291) is of type Unsigned32 5173 and contains the maximum number of seconds of service to be provided 5174 to the user before the user is to be re-authenticated and/or re- 5175 authorized. Great care should be taken when the Authorization- 5176 Lifetime value is determined, since a low, non-zero, value could 5177 create significant Diameter traffic, which could congest both the 5178 network and the agents. 5180 A value of zero (0) means that immediate re-auth is necessary by the 5181 access device. This is typically used in cases where multiple 5182 authentication methods are used, and a successful auth response with 5183 this AVP set to zero is used to signal that the next authentication 5184 method is to be immediately initiated. The absence of this AVP, or a 5185 value of all ones (meaning all bits in the 32 bit field are set to 5186 one) means no re-auth is expected. 5188 If both this AVP and the Session-Timeout AVP are present in a 5189 message, the value of the latter MUST NOT be smaller than the 5190 Authorization-Lifetime AVP. 5192 An Authorization-Lifetime AVP MAY be present in re-authorization 5193 messages, and contains the number of seconds the user is authorized 5194 to receive service from the time the re-auth answer message is 5195 received by the access device. 5197 This AVP MAY be provided by the client as a hint of the maximum 5198 lifetime that it is willing to accept. However, the server MAY 5199 return a value that is equal to, or smaller, than the one provided by 5200 the client. 5202 8.10. Auth-Grace-Period AVP 5204 The Auth-Grace-Period AVP (AVP Code 276) is of type Unsigned32 and 5205 contains the number of seconds the Diameter server will wait 5206 following the expiration of the Authorization-Lifetime AVP before 5207 cleaning up resources for the session. 5209 8.11. Auth-Session-State AVP 5211 The Auth-Session-State AVP (AVP Code 277) is of type Enumerated and 5212 specifies whether state is maintained for a particular session. The 5213 client MAY include this AVP in requests as a hint to the server, but 5214 the value in the server's answer message is binding. The following 5215 values are supported: 5217 STATE_MAINTAINED 0 5219 This value is used to specify that session state is being 5220 maintained, and the access device MUST issue a session termination 5221 message when service to the user is terminated. This is the 5222 default value. 5224 NO_STATE_MAINTAINED 1 5226 This value is used to specify that no session termination messages 5227 will be sent by the access device upon expiration of the 5228 Authorization-Lifetime. 5230 8.12. Re-Auth-Request-Type AVP 5232 The Re-Auth-Request-Type AVP (AVP Code 285) is of type Enumerated and 5233 is included in application-specific auth answers to inform the client 5234 of the action expected upon expiration of the Authorization-Lifetime. 5235 If the answer message contains an Authorization-Lifetime AVP with a 5236 positive value, the Re-Auth-Request-Type AVP MUST be present in an 5237 answer message. The following values are defined: 5239 AUTHORIZE_ONLY 0 5241 An authorization only re-auth is expected upon expiration of the 5242 Authorization-Lifetime. This is the default value if the AVP is 5243 not present in answer messages that include the Authorization- 5244 Lifetime. 5246 AUTHORIZE_AUTHENTICATE 1 5248 An authentication and authorization re-auth is expected upon 5249 expiration of the Authorization-Lifetime. 5251 8.13. Session-Timeout AVP 5253 The Session-Timeout AVP (AVP Code 27) [RFC2865] is of type Unsigned32 5254 and contains the maximum number of seconds of service to be provided 5255 to the user before termination of the session. When both the 5256 Session-Timeout and the Authorization-Lifetime AVPs are present in an 5257 answer message, the former MUST be equal to or greater than the value 5258 of the latter. 5260 A session that terminates on an access device due to the expiration 5261 of the Session-Timeout MUST cause an STR to be issued, unless both 5262 the access device and the home server had previously agreed that no 5263 session termination messages would be sent (see Section 8.9). 5265 A Session-Timeout AVP MAY be present in a re-authorization answer 5266 message, and contains the remaining number of seconds from the 5267 beginning of the re-auth. 5269 A value of zero, or the absence of this AVP, means that this session 5270 has an unlimited number of seconds before termination. 5272 This AVP MAY be provided by the client as a hint of the maximum 5273 timeout that it is willing to accept. However, the server MAY return 5274 a value that is equal to, or smaller, than the one provided by the 5275 client. 5277 8.14. User-Name AVP 5279 The User-Name AVP (AVP Code 1) [RFC2865] is of type UTF8String, which 5280 contains the User-Name, in a format consistent with the NAI 5281 specification [RFC2486]. 5283 8.15. Termination-Cause AVP 5285 The Termination-Cause AVP (AVP Code 295) is of type Enumerated, and 5286 is used to indicate the reason why a session was terminated on the 5287 access device. The following values are defined: 5289 DIAMETER_LOGOUT 1 5291 The user initiated a disconnect 5293 DIAMETER_SERVICE_NOT_PROVIDED 2 5295 This value is used when the user disconnected prior to the receipt 5296 of the authorization answer message. 5298 DIAMETER_BAD_ANSWER 3 5300 This value indicates that the authorization answer received by the 5301 access device was not processed successfully. 5303 DIAMETER_ADMINISTRATIVE 4 5305 The user was not granted access, or was disconnected, due to 5306 administrative reasons, such as the receipt of a Abort-Session- 5307 Request message. 5309 DIAMETER_LINK_BROKEN 5 5311 The communication to the user was abruptly disconnected. 5313 DIAMETER_AUTH_EXPIRED 6 5315 The user's access was terminated since its authorized session time 5316 has expired. 5318 DIAMETER_USER_MOVED 7 5320 The user is receiving services from another access device. 5322 DIAMETER_SESSION_TIMEOUT 8 5324 The user's session has timed out, and service has been terminated. 5326 8.16. Origin-State-Id AVP 5328 The Origin-State-Id AVP (AVP Code 278), of type Unsigned32, is a 5329 monotonically increasing value that is advanced whenever a Diameter 5330 entity restarts with loss of previous state, for example upon reboot. 5331 Origin-State-Id MAY be included in any Diameter message, including 5332 CER. 5334 A Diameter entity issuing this AVP MUST create a higher value for 5335 this AVP each time its state is reset. A Diameter entity MAY set 5336 Origin-State-Id to the time of startup, or it MAY use an incrementing 5337 counter retained in non-volatile memory across restarts. 5339 The Origin-State-Id, if present, MUST reflect the state of the entity 5340 indicated by Origin-Host. If a proxy modifies Origin-Host, it MUST 5341 either remove Origin-State-Id or modify it appropriately as well. 5342 Typically, Origin-State-Id is used by an access device that always 5343 starts up with no active sessions; that is, any session active prior 5344 to restart will have been lost. By including Origin-State-Id in a 5345 message, it allows other Diameter entities to infer that sessions 5346 associated with a lower Origin-State-Id are no longer active. If an 5347 access device does not intend for such inferences to be made, it MUST 5348 either not include Origin-State-Id in any message, or set its value 5349 to 0. 5351 8.17. Session-Binding AVP 5353 The Session-Binding AVP (AVP Code 270) is of type Unsigned32, and MAY 5354 be present in application-specific authorization answer messages. If 5355 present, this AVP MAY inform the Diameter client that all future 5356 application-specific re-auth messages for this session MUST be sent 5357 to the same authorization server. This AVP MAY also specify that a 5358 Session-Termination-Request message for this session MUST be sent to 5359 the same authorizing server. 5361 This field is a bit mask, and the following bits have been defined: 5363 RE_AUTH 1 5365 When set, future re-auth messages for this session MUST NOT 5366 include the Destination-Host AVP. When cleared, the default 5367 value, the Destination-Host AVP MUST be present in all re-auth 5368 messages for this session. 5370 STR 2 5372 When set, the STR message for this session MUST NOT include the 5373 Destination-Host AVP. When cleared, the default value, the 5374 Destination-Host AVP MUST be present in the STR message for this 5375 session. 5377 ACCOUNTING 4 5379 When set, all accounting messages for this session MUST NOT 5380 include the Destination-Host AVP. When cleared, the default 5381 value, the Destination-Host AVP, if known, MUST be present in all 5382 accounting messages for this session. 5384 8.18. Session-Server-Failover AVP 5386 The Session-Server-Failover AVP (AVP Code 271) is of type Enumerated, 5387 and MAY be present in application-specific authorization answer 5388 messages that either do not include the Session-Binding AVP or 5389 include the Session-Binding AVP with any of the bits set to a zero 5390 value. If present, this AVP MAY inform the Diameter client that if a 5391 re-auth or STR message fails due to a delivery problem, the Diameter 5392 client SHOULD issue a subsequent message without the Destination-Host 5393 AVP. When absent, the default value is REFUSE_SERVICE. 5395 The following values are supported: 5397 REFUSE_SERVICE 0 5399 If either the re-auth or the STR message delivery fails, terminate 5400 service with the user, and do not attempt any subsequent attempts. 5402 TRY_AGAIN 1 5404 If either the re-auth or the STR message delivery fails, resend 5405 the failed message without the Destination-Host AVP present. 5407 ALLOW_SERVICE 2 5409 If re-auth message delivery fails, assume that re-authorization 5410 succeeded. If STR message delivery fails, terminate the session. 5412 TRY_AGAIN_ALLOW_SERVICE 3 5414 If either the re-auth or the STR message delivery fails, resend 5415 the failed message without the Destination-Host AVP present. If 5416 the second delivery fails for re-auth, assume re-authorization 5417 succeeded. If the second delivery fails for STR, terminate the 5418 session. 5420 8.19. Multi-Round-Time-Out AVP 5422 The Multi-Round-Time-Out AVP (AVP Code 272) is of type Unsigned32, 5423 and SHOULD be present in application-specific authorization answer 5424 messages whose Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH. 5425 This AVP contains the maximum number of seconds that the access 5426 device MUST provide the user in responding to an authentication 5427 request. 5429 8.20. Class AVP 5431 The Class AVP (AVP Code 25) is of type OctetString and is used to by 5432 Diameter servers to return state information to the access device. 5433 When one or more Class AVPs are present in application-specific 5434 authorization answer messages, they MUST be present in subsequent re- 5435 authorization, session termination and accounting messages. Class 5436 AVPs found in a re-authorization answer message override the ones 5437 found in any previous authorization answer message. Diameter server 5438 implementations SHOULD NOT return Class AVPs that require more than 5439 4096 bytes of storage on the Diameter client. A Diameter client that 5440 receives Class AVPs whose size exceeds local available storage MUST 5441 terminate the session. 5443 8.21. Event-Timestamp AVP 5445 The Event-Timestamp (AVP Code 55) is of type Time, and MAY be 5446 included in an Accounting-Request and Accounting-Answer messages to 5447 record the time that the reported event occurred, in seconds since 5448 January 1, 1900 00:00 UTC. 5450 9. Accounting 5452 This accounting protocol is based on a server directed model with 5453 capabilities for real-time delivery of accounting information. 5454 Several fault resilience methods [RFC2975] have been built in to the 5455 protocol in order minimize loss of accounting data in various fault 5456 situations and under different assumptions about the capabilities of 5457 the used devices. 5459 9.1. Server Directed Model 5461 The server directed model means that the device generating the 5462 accounting data gets information from either the authorization server 5463 (if contacted) or the accounting server regarding the way accounting 5464 data shall be forwarded. This information includes accounting record 5465 timeliness requirements. 5467 As discussed in [RFC2975], real-time transfer of accounting records 5468 is a requirement, such as the need to perform credit limit checks and 5469 fraud detection. Note that batch accounting is not a requirement, 5470 and is therefore not supported by Diameter. Should batched 5471 accounting be required in the future, a new Diameter application will 5472 need to be created, or it could be handled using another protocol. 5473 Note, however, that even if at the Diameter layer accounting requests 5474 are processed one by one, transport protocols used under Diameter 5475 typically batch several requests in the same packet under heavy 5476 traffic conditions. This may be sufficient for many applications. 5478 The authorization server (chain) directs the selection of proper 5479 transfer strategy, based on its knowledge of the user and 5480 relationships of roaming partnerships. The server (or agents) uses 5481 the Acct-Interim-Interval and Accounting-Realtime-Required AVPs to 5482 control the operation of the Diameter peer operating as a client. 5483 The Acct-Interim-Interval AVP, when present, instructs the Diameter 5484 node acting as a client to produce accounting records continuously 5485 even during a session. Accounting-Realtime-Required AVP is used to 5486 control the behavior of the client when the transfer of accounting 5487 records from the Diameter client is delayed or unsuccessful. 5489 The Diameter accounting server MAY override the interim interval or 5490 the realtime requirements by including the Acct-Interim-Interval or 5491 Accounting-Realtime-Required AVP in the Accounting-Answer message. 5492 When one of these AVPs is present, the latest value received SHOULD 5493 be used in further accounting activities for the same session. 5495 9.2. Protocol Messages 5497 A Diameter node that receives a successful authentication and/or 5498 authorization messages from the Home AAA server MUST collect 5499 accounting information for the session. The Accounting-Request 5500 message is used to transmit the accounting information to the Home 5501 AAA server, which MUST reply with the Accounting-Answer message to 5502 confirm reception. The Accounting-Answer message includes the 5503 Result-Code AVP, which MAY indicate that an error was present in the 5504 accounting message. A rejected Accounting-Request message MAY cause 5505 the user's session to be terminated, depending on the value of the 5506 Accounting-Realtime-Required AVP received earlier for the session in 5507 question. 5509 Each Diameter Accounting protocol message MAY be compressed, in order 5510 to reduce network bandwidth usage. If IPsec and IKE are used to 5511 secure the Diameter session, then IP compression [RFC3173] MAY be 5512 used and IKE [RFC2409] MAY be used to negotiate the compression 5513 parameters. If TLS is used to secure the Diameter session, then TLS 5514 compression [RFC2246] MAY be used. 5516 9.3. Application document requirements 5518 Each Diameter application (e.g., NASREQ, MobileIP), MUST define their 5519 Service-Specific AVPs that MUST be present in the Accounting-Request 5520 message in a section entitled "Accounting AVPs". The application 5521 MUST assume that the AVPs described in this document will be present 5522 in all Accounting messages, so only their respective service-specific 5523 AVPs need to be defined in this section. 5525 9.4. Fault Resilience 5527 Diameter Base protocol mechanisms are used to overcome small message 5528 loss and network faults of temporary nature. 5530 Diameter peers acting as clients MUST implement the use of failover 5531 to guard against server failures and certain network failures. 5532 Diameter peers acting as agents or related off-line processing 5533 systems MUST detect duplicate accounting records caused by the 5534 sending of same record to several servers and duplication of messages 5535 in transit. This detection MUST be based on the inspection of the 5536 Session-Id and Accounting-Record-Number AVP pairs. Appendix D 5537 discusses duplicate detection needs and implementation issues. 5539 Diameter clients MAY have non-volatile memory for the safe storage of 5540 accounting records over reboots or extended network failures, network 5541 partitions, and server failures. If such memory is available, the 5542 client SHOULD store new accounting records there as soon as the 5543 records are created and until a positive acknowledgement of their 5544 reception from the Diameter Server has been received. Upon a reboot, 5545 the client MUST starting sending the records in the non-volatile 5546 memory to the accounting server with appropriate modifications in 5547 termination cause, session length, and other relevant information in 5548 the records. 5550 A further application of this protocol may include AVPs to control 5551 how many accounting records may at most be stored in the Diameter 5552 client without committing them to the non-volatile memory or 5553 transferring them to the Diameter server. 5555 The client SHOULD NOT remove the accounting data from any of its 5556 memory areas before the correct Accounting-Answer has been received. 5557 The client MAY remove oldest, undelivered or yet unacknowledged 5558 accounting data if it runs out of resources such as memory. It is an 5559 implementation dependent matter for the client to accept new sessions 5560 under this condition. 5562 9.5. Accounting Records 5564 In all accounting records, the Session-Id AVP MUST be present; the 5565 User-Name AVP MUST be present if it is available to the Diameter 5566 client. If strong authentication across agents is required, end-to- 5567 end security may be used for authentication purposes. 5569 Different types of accounting records are sent depending on the 5570 actual type of accounted service and the authorization server's 5571 directions for interim accounting. If the accounted service is a 5572 one-time event, meaning that the start and stop of the event are 5573 simultaneous, then the Accounting-Record-Type AVP MUST be present and 5574 set to the value EVENT_RECORD. 5576 If the accounted service is of a measurable length, then the AVP MUST 5577 use the values START_RECORD, STOP_RECORD, and possibly, 5578 INTERIM_RECORD. If the authorization server has not directed interim 5579 accounting to be enabled for the session, two accounting records MUST 5580 be generated for each service of type session. When the initial 5581 Accounting-Request for a given session is sent, the Accounting- 5582 Record-Type AVP MUST be set to the value START_RECORD. When the last 5583 Accounting-Request is sent, the value MUST be STOP_RECORD. 5585 If the authorization server has directed interim accounting to be 5586 enabled, the Diameter client MUST produce additional records between 5587 the START_RECORD and STOP_RECORD, marked INTERIM_RECORD. The 5588 production of these records is directed by Acct-Interim-Interval as 5589 well as any re-authentication or re-authorization of the session. 5590 The Diameter client MUST overwrite any previous interim accounting 5591 records that are locally stored for delivery, if a new record is 5592 being generated for the same session. This ensures that only one 5593 pending interim record can exist on an access device for any given 5594 session. 5596 A particular value of Accounting-Sub-Session-Id MUST appear only in 5597 one sequence of accounting records from a DIAMETER client, except for 5598 the purposes of retransmission. The one sequence that is sent MUST 5599 be either one record with Accounting-Record-Type AVP set to the value 5600 EVENT_RECORD, or several records starting with one having the value 5601 START_RECORD, followed by zero or more INTERIM_RECORD and a single 5602 STOP_RECORD. A particular Diameter application specification MUST 5603 define the type of sequences that MUST be used. 5605 9.6. Correlation of Accounting Records 5607 The Diameter protocol's Session-Id AVP, which is globally unique (see 5608 Section 8.8), is used during the authorization phase to identify a 5609 particular session. Services that do not require any authorization 5610 still use the Session-Id AVP to identify sessions. Accounting 5611 messages MAY use a different Session-Id from that sent in 5612 authorization messages. Specific applications MAY require different 5613 a Session-ID for accounting messages. 5615 However, there are certain applications that require multiple 5616 accounting sub-sessions. Such applications would send messages with 5617 a constant Session-Id AVP, but a different Accounting-Sub-Session-Id 5618 AVP. In these cases, correlation is performed using the Session-Id. 5619 It is important to note that receiving a STOP_RECORD with no 5620 Accounting-Sub-Session-Id AVP when sub-sessions were originally used 5621 in the START_RECORD messages implies that all sub-sessions are 5622 terminated. 5624 Furthermore, there are certain applications where a user receives 5625 service from different access devices (e.g., Mobile IPv4), each with 5626 their own unique Session-Id. In such cases, the Acct-Multi-Session- 5627 Id AVP is used for correlation. During authorization, a server that 5628 determines that a request is for an existing session SHOULD include 5629 the Acct-Multi-Session-Id AVP, which the access device MUST include 5630 in all subsequent accounting messages. 5632 The Acct-Multi-Session-Id AVP MAY include the value of the original 5633 Session-Id. It's contents are implementation specific, but MUST be 5634 globally unique across other Acct-Multi-Session-Id, and MUST NOT 5635 change during the life of a session. 5637 A Diameter application document MUST define the exact concept of a 5638 session that is being accounted, and MAY define the concept of a 5639 multi-session. For instance, the NASREQ DIAMETER application treats 5640 a single PPP connection to a Network Access Server as one session, 5641 and a set of Multilink PPP sessions as one multi-session. 5643 9.7. Accounting Command-Codes 5645 This section defines Command-Code values that MUST be supported by 5646 all Diameter implementations that provide Accounting services. 5648 9.7.1. Accounting-Request 5650 The Accounting-Request (ACR) command, indicated by the Command-Code 5651 field set to 271 and the Command Flags' 'R' bit set, is sent by a 5652 Diameter node, acting as a client, in order to exchange accounting 5653 information with a peer. 5655 One of Acct-Application-Id and Vendor-Specific-Application-Id AVPs 5656 MUST be present. If the Vendor-Specific-Application-Id grouped AVP 5657 is present, it must have an Acct-Application-Id inside. 5659 The AVP listed below SHOULD include service specific accounting AVPs, 5660 as described in Section 9.3. 5662 Message Format 5664 ::= < Diameter Header: 271, REQ, PXY > 5665 < Session-Id > 5666 { Origin-Host } 5667 { Origin-Realm } 5668 { Destination-Realm } 5669 { Accounting-Record-Type } 5670 { Accounting-Record-Number } 5671 [ Acct-Application-Id ] 5672 [ Vendor-Specific-Application-Id ] 5673 [ User-Name ] 5674 [ Accounting-Sub-Session-Id ] 5675 [ Acct-Session-Id ] 5676 [ Acct-Multi-Session-Id ] 5677 [ Acct-Interim-Interval ] 5678 [ Accounting-Realtime-Required ] 5679 [ Origin-State-Id ] 5680 [ Event-Timestamp ] 5681 * [ Proxy-Info ] 5682 * [ Route-Record ] 5683 * [ AVP ] 5685 9.7.2. Accounting-Answer 5687 The Accounting-Answer (ACA) command, indicated by the Command-Code 5688 field set to 271 and the Command Flags' 'R' bit cleared, is used to 5689 acknowledge an Accounting-Request command. The Accounting-Answer 5690 command contains the same Session-Id and includes the usage AVPs only 5691 if CMS is in use when sending this command. Note that the inclusion 5692 of the usage AVPs when CMS is not being used leads to unnecessarily 5693 large answer messages, and can not be used as a server's proof of the 5694 receipt of these AVPs in an end-to-end fashion. If the Accounting- 5695 Request was protected by end-to-end security, then the corresponding 5696 ACA message MUST be protected by end-to-end security. 5698 Only the target Diameter Server, known as the home Diameter Server, 5699 SHOULD respond with the Accounting-Answer command. 5701 One of Acct-Application-Id and Vendor-Specific-Application-Id AVPs 5702 MUST be present. If the Vendor-Specific-Application-Id grouped AVP 5703 is present, it must have an Acct-Application-Id inside. 5705 The AVP listed below SHOULD include service specific accounting AVPs, 5706 as described in Section 9.3. 5708 Message Format 5710 ::= < Diameter Header: 271, PXY > 5711 < Session-Id > 5712 { Result-Code } 5713 { Origin-Host } 5714 { Origin-Realm } 5715 { Accounting-Record-Type } 5716 { Accounting-Record-Number } 5717 [ Acct-Application-Id ] 5718 [ Vendor-Specific-Application-Id ] 5719 [ User-Name ] 5720 [ Accounting-Sub-Session-Id ] 5721 [ Acct-Session-Id ] 5722 [ Acct-Multi-Session-Id ] 5723 [ Error-Reporting-Host ] 5724 [ Acct-Interim-Interval ] 5725 [ Accounting-Realtime-Required ] 5726 [ Origin-State-Id ] 5727 [ Event-Timestamp ] 5728 * [ Proxy-Info ] 5729 * [ AVP ] 5731 9.8. Accounting AVPs 5733 This section contains AVPs that describe accounting usage information 5734 related to a specific session. 5736 9.8.1. Accounting-Record-Type AVP 5738 The Accounting-Record-Type AVP (AVP Code 480) is of type Enumerated 5739 and contains the type of accounting record being sent. The following 5740 values are currently defined for the Accounting-Record-Type AVP: 5742 EVENT_RECORD 1 5744 An Accounting Event Record is used to indicate that a one-time 5745 event has occurred (meaning that the start and end of the event 5746 are simultaneous). This record contains all information relevant 5747 to the service, and is the only record of the service. 5749 START_RECORD 2 5751 An Accounting Start, Interim, and Stop Records are used to 5752 indicate that a service of a measurable length has been given. An 5753 Accounting Start Record is used to initiate an accounting session, 5754 and contains accounting information that is relevant to the 5755 initiation of the session. 5757 INTERIM_RECORD 3 5759 An Interim Accounting Record contains cumulative accounting 5760 information for an existing accounting session. Interim 5761 Accounting Records SHOULD be sent every time a re-authentication 5762 or re-authorization occurs. Further, additional interim record 5763 triggers MAY be defined by application-specific Diameter 5764 applications. The selection of whether to use INTERIM_RECORD 5765 records is done by the Acct-Interim-Interval AVP. 5767 STOP_RECORD 4 5769 An Accounting Stop Record is sent to terminate an accounting 5770 session and contains cumulative accounting information relevant to 5771 the existing session. 5773 9.8.2. Acct-Interim-Interval 5775 The Acct-Interim-Interval AVP (AVP Code 85) is of type Unsigned32 and 5776 is sent from the Diameter home authorization server to the Diameter 5777 client. The client uses information in this AVP to decide how and 5778 when to produce accounting records. With different values in this 5779 AVP, service sessions can result in one, two, or two+N accounting 5780 records, based on the needs of the home-organization. The following 5781 accounting record production behavior is directed by the inclusion of 5782 this AVP: 5784 1. The omission of the Acct-Interim-Interval AVP or its inclusion 5785 with Value field set to 0 means that EVENT_RECORD, START_RECORD, 5786 and STOP_RECORD are produced, as appropriate for the service. 5788 2. The inclusion of the AVP with Value field set to a non-zero value 5789 means that INTERIM_RECORD records MUST be produced between the 5790 START_RECORD and STOP_RECORD records. The Value field of this 5791 AVP is the nominal interval between these records in seconds. 5792 The Diameter node that originates the accounting information, 5793 known as the client, MUST produce the first INTERIM_RECORD record 5794 roughly at the time when this nominal interval has elapsed from 5795 the START_RECORD, the next one again as the interval has elapsed 5796 once more, and so on until the session ends and a STOP_RECORD 5797 record is produced. 5799 The client MUST ensure that the interim record production times 5800 are randomized so that large accounting message storms are not 5801 created either among records or around a common service start 5802 time. 5804 9.8.3. Accounting-Record-Number AVP 5806 The Accounting-Record-Number AVP (AVP Code 485) is of type Unsigned32 5807 and identifies this record within one session. As Session-Id AVPs 5808 are globally unique, the combination of Session-Id and Accounting- 5809 Record-Number AVPs is also globally unique, and can be used in 5810 matching accounting records with confirmations. An easy way to 5811 produce unique numbers is to set the value to 0 for records of type 5812 EVENT_RECORD and START_RECORD, and set the value to 1 for the first 5813 INTERIM_RECORD, 2 for the second, and so on until the value for 5814 STOP_RECORD is one more than for the last INTERIM_RECORD. 5816 9.8.4. Acct-Session-Id AVP 5818 The Acct-Session-Id AVP (AVP Code 44) is of type OctetString is only 5819 used when RADIUS/Diameter translation occurs. This AVP contains the 5820 contents of the RADIUS Acct-Session-Id attribute. 5822 9.8.5. Acct-Multi-Session-Id AVP 5824 The Acct-Multi-Session-Id AVP (AVP Code 50) is of type UTF8String, 5825 following the format specified in Section 8.8. The Acct-Multi- 5826 Session-Id AVP is used to link together multiple related accounting 5827 sessions, where each session would have a unique Session-Id, but the 5828 same Acct-Multi-Session-Id AVP. This AVP MAY be returned by the 5829 Diameter server in an authorization answer, and MUST be used in all 5830 accounting messages for the given session. 5832 9.8.6. Accounting-Sub-Session-Id AVP 5834 The Accounting-Sub-Session-Id AVP (AVP Code 287) is of type 5835 Unsigned64 and contains the accounting sub-session identifier. The 5836 combination of the Session-Id and this AVP MUST be unique per sub- 5837 session, and the value of this AVP MUST be monotonically increased by 5838 one for all new sub-sessions. The absence of this AVP implies no 5839 sub-sessions are in use, with the exception of an Accounting-Request 5840 whose Accounting-Record-Type is set to STOP_RECORD. A STOP_RECORD 5841 message with no Accounting-Sub-Session-Id AVP present will signal the 5842 termination of all sub-sessions for a given Session-Id. 5844 9.8.7. Accounting-Realtime-Required AVP 5846 The Accounting-Realtime-Required AVP (AVP Code 483) is of type 5847 Enumerated and is sent from the Diameter home authorization server to 5848 the Diameter client or in the Accounting-Answer from the accounting 5849 server. The client uses information in this AVP to decide what to do 5850 if the sending of accounting records to the accounting server has 5851 been temporarily prevented due to, for instance, a network problem. 5853 DELIVER_AND_GRANT 1 5855 The AVP with Value field set to DELIVER_AND_GRANT means that the 5856 service MUST only be granted as long as there is a connection to 5857 an accounting server. Note that the set of alternative accounting 5858 servers are treated as one server in this sense. Having to move 5859 the accounting record stream to a backup server is not a reason to 5860 discontinue the service to the user. 5862 GRANT_AND_STORE 2 5864 The AVP with Value field set to GRANT_AND_STORE means that service 5865 SHOULD be granted if there is a connection, or as long as records 5866 can still be stored as described in Section 9.4. 5868 This is the default behavior if the AVP isn't included in the 5869 reply from the authorization server. 5871 GRANT_AND_LOSE 3 5873 The AVP with Value field set to GRANT_AND_LOSE means that service 5874 SHOULD be granted even if the records can not be delivered or 5875 stored. 5877 10. AVP Occurrence Table 5879 The following tables presents the AVPs defined in this document, and 5880 specifies in which Diameter messages they MAY, or MAY NOT be present. 5881 Note that AVPs that can only be present within a Grouped AVP are not 5882 represented in this table. 5884 The table uses the following symbols: 5886 0 The AVP MUST NOT be present in the message. 5888 0+ Zero or more instances of the AVP MAY be present in the 5889 message. 5891 0-1 Zero or one instance of the AVP MAY be present in the message. 5892 It is considered an error if there are more than one instance of 5893 the AVP. 5895 1 One instance of the AVP MUST be present in the message. 5897 1+ At least one instance of the AVP MUST be present in the 5898 message. 5900 10.1. Base Protocol Command AVP Table 5902 The table in this section is limited to the non-accounting Command 5903 Codes defined in this specification. 5905 +-----------------------------------------------+ 5906 | Command-Code | 5907 +---+---+---+---+---+---+---+---+---+---+---+---+ 5908 Attribute Name |CER|CEA|DPR|DPA|DWR|DWA|RAR|RAA|ASR|ASA|STR|STA| 5909 --------------------+---+---+---+---+---+---+---+---+---+---+---+---+ 5910 Acct-Interim- |0 |0 |0 |0 |0 |0 |0-1|0 |0 |0 |0 |0 | 5911 Interval | | | | | | | | | | | | | 5912 Accounting-Realtime-|0 |0 |0 |0 |0 |0 |0-1|0 |0 |0 |0 |0 | 5913 Required | | | | | | | | | | | | | 5914 Acct-Application-Id |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5915 Auth-Application-Id |0+ |0+ |0 |0 |0 |0 |1 |0 |1 |0 |1 |0 | 5916 Auth-Grace-Period |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5917 Auth-Request-Type |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5918 Auth-Session-State |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5919 Authorization- |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5920 Lifetime | | | | | | | | | | | | | 5922 Class |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0+ |0+ | 5923 Destination-Host |0 |0 |0 |0 |0 |0 |1 |0 |1 |0 |0-1|0 | 5924 Destination-Realm |0 |0 |0 |0 |0 |0 |1 |0 |1 |0 |1 |0 | 5925 Disconnect-Cause |0 |0 |1 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5926 Error-Message |0 |0-1|0 |0-1|0 |0-1|0 |0-1|0 |0-1|0 |0-1| 5927 Error-Reporting-Host|0 |0 |0 |0 |0 |0 |0 |0-1|0 |0-1|0 |0-1| 5928 Failed-AVP |0 |0+ |0 |0+ |0 |0+ |0 |0+ |0 |0+ |0 |0+ | 5929 Firmware-Revision |0-1|0-1|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5930 Host-IP-Address |1+ |1+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5931 Inband-Security-Id |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5932 Multi-Round-Time-Out|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5933 Origin-Host |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 | 5934 Origin-Realm |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 | 5935 Origin-State-Id |0-1|0-1|0 |0 |0-1|0-1|0-1|0-1|0-1|0-1|0-1|0-1| 5936 Product-Name |1 |1 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5937 Proxy-Info |0 |0 |0 |0 |0 |0 |0+ |0+ |0+ |0+ |0+ |0+ | 5938 Redirect-Host |0 |0 |0 |0 |0 |0 |0 |0+ |0 |0+ |0 |0+ | 5939 Redirect-Host-Usage |0 |0 |0 |0 |0 |0 |0 |0-1|0 |0-1|0 |0-1| 5940 Redirect-Max-Cache- |0 |0 |0 |0 |0 |0 |0 |0-1|0 |0-1|0 |0-1| 5941 Time | | | | | | | | | | | | | 5942 Result-Code |0 |1 |0 |1 |0 |1 |0 |1 |0 |0 |0 |1 | 5943 Re-Auth-Request-Type|0 |0 |0 |0 |0 |0 |1 |0 |0 |0 |0 |0 | 5944 Route-Record |0 |0 |0 |0 |0 |0 |0+ |0 |0+ |0 |0+ |0 | 5945 Session-Binding |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5946 Session-Id |0 |0 |0 |0 |0 |0 |1 |1 |1 |1 |1 |1 | 5947 Session-Server- |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5948 Failover | | | | | | | | | | | | | 5949 Session-Timeout |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5950 Supported-Vendor-Id |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5951 Termination-Cause |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |1 |0 | 5952 User-Name |0 |0 |0 |0 |0 |0 |0-1|0-1|0-1|0-1|0-1|0-1| 5953 Vendor-Id |1 |1 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5954 Vendor-Specific- |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | 5955 Application-Id | | | | | | | | | | | | | 5956 --------------------+---+---+---+---+---+---+---+---+---+---+---+---+ 5958 10.2. Accounting AVP Table 5960 The table in this section is used to represent which AVPs defined in 5961 this document are to be present in the Accounting messages. These 5962 AVP occurrence requirements are guidelines, which may be expanded, 5963 and/or overridden by application-specific requirements in the 5964 Diameter applications documents. 5966 +-----------+ 5967 | Command | 5968 | Code | 5969 +-----+-----+ 5970 Attribute Name | ACR | ACA | 5971 ------------------------------+-----+-----+ 5972 Acct-Interim-Interval | 0-1 | 0-1 | 5973 Acct-Multi-Session-Id | 0-1 | 0-1 | 5974 Accounting-Record-Number | 1 | 1 | 5975 Accounting-Record-Type | 1 | 1 | 5976 Acct-Session-Id | 0-1 | 0-1 | 5977 Accounting-Sub-Session-Id | 0-1 | 0-1 | 5978 Accounting-Realtime-Required | 0-1 | 0-1 | 5979 Acct-Application-Id | 0-1 | 0-1 | 5980 Auth-Application-Id | 0 | 0 | 5981 Class | 0+ | 0+ | 5982 Destination-Host | 0-1 | 0 | 5983 Destination-Realm | 1 | 0 | 5984 Error-Reporting-Host | 0 | 0+ | 5985 Event-Timestamp | 0-1 | 0-1 | 5986 Origin-Host | 1 | 1 | 5987 Origin-Realm | 1 | 1 | 5988 Proxy-Info | 0+ | 0+ | 5989 Route-Record | 0+ | 0+ | 5990 Result-Code | 0 | 1 | 5991 Session-Id | 1 | 1 | 5992 Termination-Cause | 0-1 | 0-1 | 5993 User-Name | 0-1 | 0-1 | 5994 Vendor-Specific-Application-Id| 0-1 | 0-1 | 5995 ------------------------------+-----+-----+ 5997 11. IANA Considerations 5999 This section provides guidance to the Internet Assigned Numbers 6000 Authority (IANA) regarding registration of values related to the 6001 Diameter protocol, in accordance with BCP 26 [RFC2434]. The 6002 following policies are used here with the meanings defined in BCP 26: 6003 "Private Use", "First Come First Served", "Expert Review", 6004 "Specification Required", "IETF Consensus", "Standards Action". 6006 This section explains the criteria to be used by the IANA for 6007 assignment of numbers within namespaces defined within this document. 6009 Diameter is not intended as a general purpose protocol, and 6010 allocations SHOULD NOT be made for purposes unrelated to 6011 authentication, authorization or accounting. 6013 For registration requests where a Designated Expert should be 6014 consulted, the responsible IESG area director should appoint the 6015 Designated Expert. For Designated Expert with Specification 6016 Required, the request is posted to the AAA WG mailing list (or, if it 6017 has been disbanded, a successor designated by the Area Director) for 6018 comment and review, and MUST include a pointer to a public 6019 specification. Before a period of 30 days has passed, the Designated 6020 Expert will either approve or deny the registration request and 6021 publish a notice of the decision to the AAA WG mailing list or its 6022 successor. A denial notice must be justified by an explanation and, 6023 in the cases where it is possible, concrete suggestions on how the 6024 request can be modified so as to become acceptable. 6026 11.1. AVP Header 6028 As defined in Section 4, the AVP header contains three fields that 6029 requires IANA namespace management; the AVP Code, Vendor-ID and Flags 6030 field. 6032 11.1.1. AVP Codes 6034 The AVP Code namespace is used to identify attributes. There are 6035 multiple namespaces. Vendors can have their own AVP Codes namespace 6036 which will be identified by their Vendor-ID (also known as 6037 Enterprise-Number) and they control the assignments of their vendor- 6038 specific AVP codes within their own namespace. The absence of a 6039 Vendor-ID or a Vendor-ID value of zero (0) identifies the IETF IANA 6040 controlled AVP Codes namespace. The AVP Codes and sometimes also 6041 possible values in an AVP are controlled and maintained by IANA. 6043 AVP Code 0 is not used. AVP Codes 1-255 are managed separately as 6044 RADIUS Attribute Types [RADTYPE]. This document defines the AVP 6045 Codes 257-274, 276-285, 287, 291-300, 480, 483 and 485-486. See 6046 Section 4.5 for the assignment of the namespace in this 6047 specification. 6049 AVPs may be allocated following Designated Expert with Specification 6050 Required [RFC2434]. Release of blocks of AVPs (more than 3 at a time 6051 for a given purpose) should require IETF Consensus. 6053 Note that Diameter defines a mechanism for Vendor-Specific AVPs, 6054 where the Vendor-Id field in the AVP header is set to a non-zero 6055 value. Vendor-Specific AVPs codes are for Private Use and should be 6056 encouraged instead of allocation of global attribute types, for 6057 functions specific only to one vendor's implementation of Diameter, 6058 where no interoperability is deemed useful. Where a Vendor-Specific 6059 AVP is implemented by more than one vendor, allocation of global AVPs 6060 should be encouraged instead. 6062 11.1.2. AVP Flags 6064 There are 8 bits in the AVP Flags field of the AVP header, defined in 6065 Section 4. This document assigns bit 0 ('V'endor Specific), bit 1 6066 ('M'andatory) and bit 2 ('P'rotected). The remaining bits should 6067 only be assigned via a Standards Action [RFC2434]. 6069 11.2. Diameter Header 6071 As defined in Section 3, the Diameter header contains two fields that 6072 require IANA namespace management; Command Code and Command Flags. 6074 11.2.1. Command Codes 6076 The Command Code namespace is used to identify Diameter commands. 6077 The values 0-255 are reserved for RADIUS backward compatibility, and 6078 are defined as "RADIUS Packet Type Codes" in [RADTYPE]. Values 256- 6079 16,777,213 are for permanent, standard commands, allocated by IETF 6080 Consensus [RFC2434]. This document defines the Command Codes 257, 6081 258, 271, 274-275, 280 and 282. See Section 3.1 for the assignment 6082 of the namespace in this specification. 6084 The values 16,777,214 and 16,777,215 (hexadecimal values 0xfffffe - 6085 0xffffff) are reserved for experimental commands. As these codes are 6086 only for experimental and testing purposes, no guarantee is made for 6087 interoperability between Diameter peers using experimental commands, 6088 as outlined in [IANA-EXP]. 6090 11.2.2. Command Flags 6092 There are eight bits in the Command Flags field of the Diameter 6093 header. This document assigns bit 0 ('R'equest), bit 1 ('P'roxy), 6094 bit 2 ('E'rror) and bit 3 ('T'). Bits 4 through 7 MUST only be 6095 assigned via a Standards Action [RFC2434]. 6097 11.3. Application Identifiers 6099 As defined in Section 2.4, the Application Identifier is used to 6100 identify a specific Diameter Application. There are standards-track 6101 application ids and vendor specific application ids. 6103 IANA [RFC2434] has assigned the range 0x00000001 to 0x00ffffff for 6104 standards-track applications; and 0x01000000 - 0xfffffffe for vendor 6105 specific applications, on a first-come, first-served basis. The 6106 following values are allocated. 6108 Diameter Common Messages 0 6109 NASREQ 1 [RFC4005] 6110 Mobile-IP 2 [RFC4004] 6111 Diameter Base Accounting 3 6112 Relay 0xffffffff 6114 Assignment of standards-track application IDs are by Designated 6115 Expert with Specification Required [RFC2434]. 6117 Both Application-Id and Acct-Application-Id AVPs use the same 6118 Application Identifier space. 6120 Vendor-Specific Application Identifiers, are for Private Use. Vendor- 6121 Specific Application Identifiers are assigned on a First Come, First 6122 Served basis by IANA. 6124 11.4. AVP Values 6126 Certain AVPs in Diameter define a list of values with various 6127 meanings. For attributes other than those specified in this section, 6128 adding additional values to the list can be done on a First Come, 6129 First Served basis by IANA. 6131 11.4.1. Result-Code AVP Values 6133 As defined in Section 7.1, the Result-Code AVP (AVP Code 268) defines 6134 the values 1001, 2001-2002, 3001-3010, 4001-4002 and 5001-5017. 6136 All remaining values are available for assignment via IETF Consensus 6137 [RFC2434]. 6139 11.4.2. Accounting-Record-Type AVP Values 6141 As defined in Section 9.8.1, the Accounting-Record-Type AVP (AVP Code 6142 480) defines the values 1-4. All remaining values are available for 6143 assignment via IETF Consensus [RFC2434]. 6145 11.4.3. Termination-Cause AVP Values 6147 As defined in Section 8.15, the Termination-Cause AVP (AVP Code 295) 6148 defines the values 1-8. All remaining values are available for 6149 assignment via IETF Consensus [RFC2434]. 6151 11.4.4. Redirect-Host-Usage AVP Values 6153 As defined in Section 6.13, the Redirect-Host-Usage AVP (AVP Code 6154 261) defines the values 0-5. All remaining values are available for 6155 assignment via IETF Consensus [RFC2434]. 6157 11.4.5. Session-Server-Failover AVP Values 6159 As defined in Section 8.18, the Session-Server-Failover AVP (AVP Code 6160 271) defines the values 0-3. All remaining values are available for 6161 assignment via IETF Consensus [RFC2434]. 6163 11.4.6. Session-Binding AVP Values 6165 As defined in Section 8.17, the Session-Binding AVP (AVP Code 270) 6166 defines the bits 1-4. All remaining bits are available for 6167 assignment via IETF Consensus [RFC2434]. 6169 11.4.7. Disconnect-Cause AVP Values 6171 As defined in Section 5.4.3, the Disconnect-Cause AVP (AVP Code 273) 6172 defines the values 0-2. All remaining values are available for 6173 assignment via IETF Consensus [RFC2434]. 6175 11.4.8. Auth-Request-Type AVP Values 6177 As defined in Section 8.7, the Auth-Request-Type AVP (AVP Code 274) 6178 defines the values 1-3. All remaining values are available for 6179 assignment via IETF Consensus [RFC2434]. 6181 11.4.9. Auth-Session-State AVP Values 6183 As defined in Section 8.11, the Auth-Session-State AVP (AVP Code 277) 6184 defines the values 0-1. All remaining values are available for 6185 assignment via IETF Consensus [RFC2434]. 6187 11.4.10. Re-Auth-Request-Type AVP Values 6189 As defined in Section 8.12, the Re-Auth-Request-Type AVP (AVP Code 6190 285) defines the values 0-1. All remaining values are available for 6191 assignment via IETF Consensus [RFC2434]. 6193 11.4.11. Accounting-Realtime-Required AVP Values 6195 As defined in Section 9.8.7, the Accounting-Realtime-Required AVP 6196 (AVP Code 483) defines the values 1-3. All remaining values are 6197 available for assignment via IETF Consensus [RFC2434]. 6199 11.4.12. Inband-Security-Id AVP (code 299) 6201 As defined in Section 6.10, the Inband-Security-Id AVP (AVP Code 299) 6202 defines the values 0-1. All remaining values are available for 6203 assignment via IETF Consensus [RFC2434]. 6205 11.5. Diameter TCP/SCTP Port Numbers 6207 The IANA has assigned TCP and SCTP port number 3868 to Diameter. 6209 11.6. NAPTR Service Fields 6211 The registration in the RFC MUST include the following information: 6213 Service Field: The service field being registered. An example for a 6214 new fictitious transport protocol called NCTP might be "AAA+D2N". 6216 Protocol: The specific transport protocol associated with that 6217 service field. This MUST include the name and acronym for the 6218 protocol, along with reference to a document that describes the 6219 transport protocol. For example - "New Connectionless Transport 6220 Protocol (NCTP), RFC 5766". 6222 Name and Contact Information: The name, address, email address and 6223 telephone number for the person performing the registration. 6225 The following values have been placed into the registry: 6227 Services Field Protocol 6229 AAA+D2T TCP 6230 AAA+D2S SCTP 6232 12. Diameter protocol related configurable parameters 6234 This section contains the configurable parameters that are found 6235 throughout this document: 6237 Diameter Peer 6239 A Diameter entity MAY communicate with peers that are statically 6240 configured. A statically configured Diameter peer would require 6241 that either the IP address or the fully qualified domain name 6242 (FQDN) be supplied, which would then be used to resolve through 6243 DNS. 6245 Realm Routing Table 6247 A Diameter proxy server routes messages based on the realm portion 6248 of a Network Access Identifier (NAI). The server MUST have a 6249 table of Realm Names, and the address of the peer to which the 6250 message must be forwarded to. The routing table MAY also include 6251 a "default route", which is typically used for all messages that 6252 cannot be locally processed. 6254 Tc timer 6256 The Tc timer controls the frequency that transport connection 6257 attempts are done to a peer with whom no active transport 6258 connection exists. The recommended value is 30 seconds. 6260 13. Security Considerations 6262 The Diameter base protocol assumes that messages are secured by using 6263 either IPSec or TLS. This security mechanism is acceptable in 6264 environments where there is no untrusted third party agent. In other 6265 situations, end-to-end security is needed. 6267 Diameter clients, such as Network Access Servers (NASes) and Mobility 6268 Agents MUST support IP Security [RFC2401] and MAY support TLS 6269 [RFC2246]. Diameter servers MUST support TLS and IPsec. Diameter 6270 implementations MUST use transmission-level security of some kind 6271 (IPsec or TLS) on each connection. 6273 If a Diameter connection is not protected by IPsec, then the CER/CEA 6274 exchange MUST include an Inband-Security-ID AVP with a value of TLS. 6275 For TLS usage, a TLS handshake will begin when both ends are in the 6276 open state, after completion of the CER/CEA exchange. If the TLS 6277 handshake is successful, all further messages will be sent via TLS. 6278 If the handshake fails, both ends move to the closed state. 6280 It is suggested that IPsec be used primarily at the edges for intra- 6281 domain exchanges. For NAS devices without certificate support, pre- 6282 shared keys can be used between the NAS and a local AAA proxy. 6284 For protection of inter-domain exchanges, TLS is recommended. See 6285 Sections 13.1 and 13.2 for more details on IPsec and TLS usage. 6287 13.1. IPsec Usage 6289 All Diameter implementations MUST support IPsec ESP [IPsec] in 6290 transport mode with non-null encryption and authentication algorithms 6291 to provide per-packet authentication, integrity protection and 6292 confidentiality, and MUST support the replay protection mechanisms of 6293 IPsec. 6295 Diameter implementations MUST support IKE for peer authentication, 6296 negotiation of security associations, and key management, using the 6297 IPsec DOI [RFC2407]. Diameter implementations MUST support peer 6298 authentication using a pre-shared key, and MAY support certificate- 6299 based peer authentication using digital signatures. Peer 6300 authentication using the public key encryption methods outlined in 6301 IKE's Sections 5.2 and 5.3 [RFC2409] SHOULD NOT be used. 6303 Conformant implementations MUST support both IKE Main Mode and 6304 Aggressive Mode. When pre-shared keys are used for authentication, 6305 IKE Aggressive Mode SHOULD be used, and IKE Main Mode SHOULD NOT be 6306 used. When digital signatures are used for authentication, either 6307 IKE Main Mode or IKE Aggressive Mode MAY be used. 6309 When digital signatures are used to achieve authentication, an IKE 6310 negotiator SHOULD use IKE Certificate Request Payload(s) to specify 6311 the certificate authority (or authorities) that are trusted in 6312 accordance with its local policy. IKE negotiators SHOULD use 6313 pertinent certificate revocation checks before accepting a PKI 6314 certificate for use in IKE's authentication procedures. 6316 The Phase 2 Quick Mode exchanges used to negotiate protection for 6317 Diameter connections MUST explicitly carry the Identity Payload 6318 fields (IDci and IDcr). The DOI provides for several types of 6319 identification data. However, when used in conformant 6320 implementations, each ID Payload MUST carry a single IP address and a 6321 single non-zero port number, and MUST NOT use the IP Subnet or IP 6322 Address Range formats. This allows the Phase 2 security association 6323 to correspond to specific TCP and SCTP connections. 6325 Since IPsec acceleration hardware may only be able to handle a 6326 limited number of active IKE Phase 2 SAs, Phase 2 delete messages may 6327 be sent for idle SAs, as a means of keeping the number of active 6328 Phase 2 SAs to a minimum. The receipt of an IKE Phase 2 delete 6329 message SHOULD NOT be interpreted as a reason for tearing down a 6330 Diameter connection. Rather, it is preferable to leave the 6331 connection up, and if additional traffic is sent on it, to bring up 6332 another IKE Phase 2 SA to protect it. This avoids the potential for 6333 continually bringing connections up and down. 6335 13.2. TLS Usage 6337 A Diameter node that initiates a connection to another Diameter node 6338 acts as a TLS client according to [RFC2246], and a Diameter node that 6339 accepts a connection acts as a TLS server. Diameter nodes 6340 implementing TLS for security MUST mutually authenticate as part of 6341 TLS session establishment. In order to ensure mutual authentication, 6342 the Diameter node acting as TLS server must request a certificate 6343 from the Diameter node acting as TLS client, and the Diameter node 6344 acting as TLS client MUST be prepared to supply a certificate on 6345 request. 6347 Diameter nodes MUST be able to negotiate the following TLS cipher 6348 suites: 6350 TLS_RSA_WITH_RC4_128_MD5 6351 TLS_RSA_WITH_RC4_128_SHA 6352 TLS_RSA_WITH_3DES_EDE_CBC_SHA 6354 Diameter nodes SHOULD be able to negotiate the following TLS cipher 6355 suite: 6357 TLS_RSA_WITH_AES_128_CBC_SHA 6359 Diameter nodes MAY negotiate other TLS cipher suites. 6361 13.3. Peer-to-Peer Considerations 6363 As with any peer-to-peer protocol, proper configuration of the trust 6364 model within a Diameter peer is essential to security. When 6365 certificates are used, it is necessary to configure the root 6366 certificate authorities trusted by the Diameter peer. These root CAs 6367 are likely to be unique to Diameter usage and distinct from the root 6368 CAs that might be trusted for other purposes such as Web browsing. 6369 In general, it is expected that those root CAs will be configured so 6370 as to reflect the business relationships between the organization 6371 hosting the Diameter peer and other organizations. As a result, a 6372 Diameter peer will typically not be configured to allow connectivity 6373 with any arbitrary peer. When certificate authentication Diameter 6374 peers may not be known beforehand, and therefore peer discovery may 6375 be required. 6377 Note that IPsec is considerably less flexible than TLS when it comes 6378 to configuring root CAs. Since use of Port identifiers is prohibited 6379 within IKE Phase 1, within IPsec it is not possible to uniquely 6380 configure trusted root CAs for each application individually; the 6381 same policy must be used for all applications. This implies, for 6382 example, that a root CA trusted for use with Diameter must also be 6383 trusted to protect SNMP. These restrictions can be awkward at best. 6384 Since TLS supports application-level granularity in certificate 6385 policy, TLS SHOULD be used to protect Diameter connections between 6386 administrative domains. IPsec is most appropriate for intra-domain 6387 usage when pre-shared keys are used as a security mechanism. 6389 When pre-shared key authentication is used with IPsec to protect 6390 Diameter, unique pre-shared keys are configured with Diameter peers, 6391 who are identified by their IP address (Main Mode), or possibly their 6392 FQDN (Aggressive Mode). As a result, it is necessary for the set of 6393 Diameter peers to be known beforehand. Therefore, peer discovery is 6394 typically not necessary. 6396 The following is intended to provide some guidance on the issue. 6398 It is recommended that a Diameter peer implement the same security 6399 mechanism (IPsec or TLS) across all its peer-to-peer connections. 6400 Inconsistent use of security mechanisms can result in redundant 6401 security mechanisms being used (e.g., TLS over IPsec) or worse, 6402 potential security vulnerabilities. When IPsec is used with 6403 Diameter, a typical security policy for outbound traffic is "Initiate 6404 IPsec, from me to any, destination port Diameter"; for inbound 6405 traffic, the policy would be "Require IPsec, from any to me, 6406 destination port Diameter". 6408 This policy causes IPsec to be used whenever a Diameter peer 6409 initiates a connection to another Diameter peer, and to be required 6410 whenever an inbound Diameter connection occurs. This policy is 6411 attractive, since it does not require policy to be set for each peer 6412 or dynamically modified each time a new Diameter connection is 6413 created; an IPsec SA is automatically created based on a simple 6414 static policy. Since IPsec extensions are typically not available to 6415 the sockets API on most platforms, and IPsec policy functionality is 6416 implementation dependent, use of a simple static policy is the often 6417 the simplest route to IPsec-enabling a Diameter implementation. 6419 One implication of the recommended policy is that if a node is using 6420 both TLS and IPsec, there is not a convenient way in which to use 6421 either TLS or IPsec, but not both, without reserving an additional 6422 port for TLS usage. Since Diameter uses the same port for TLS and 6423 non-TLS usage, where the recommended IPsec policy is put in place, a 6424 TLS-protected connection will match the IPsec policy, and both IPsec 6425 and TLS will be used to protect the Diameter connection. To avoid 6426 this, it would be necessary to plumb peer-specific policies either 6427 statically or dynamically. 6429 If IPsec is used to secure Diameter peer-to-peer connections, IPsec 6430 policy SHOULD be set so as to require IPsec protection for inbound 6431 connections, and to initiate IPsec protection for outbound 6432 connections. This can be accomplished via use of inbound and 6433 outbound filter policy. 6435 14. References 6437 14.1. Normative References 6439 [FLOATPOINT] 6440 Institute of Electrical and Electronics Engineers, "IEEE 6441 Standard for Binary Floating-Point Arithmetic, ANSI/IEEE 6442 Standard 754-1985", August 1985. 6444 [IANAADFAM] 6445 IANA,, "Address Family Numbers", 6446 http://www.iana.org/assignments/address-family-numbers. 6448 [IANAWEB] IANA,, "Number assignment", http://www.iana.org. 6450 [RADTYPE] IANA,, "RADIUS Types", 6451 http://www.iana.org/assignments/radius-types. 6453 [IPV4] Postel, J., "Internet Protocol", RFC 791, September 1981. 6455 [TCP] Postel, J., "Transmission Control Protocol", RFC 793, 6456 January 1981. 6458 [RFC3539] Aboba, B. and J. Wood, "Authentication, Authorization and 6459 Accounting (AAA) Transport Profile", RFC 3539, June 2003. 6461 [RFC4004] Calhoun, P., Johansson, T., Perkins, C., Hiller, T., and 6462 P. McCann, "Diameter Mobile IPv4 Application", RFC 4004, 6463 August 2005. 6465 [RFC4005] Calhoun, P., Zorn, G., Spence, D., and D. Mitton, 6466 "Diameter Network Access Server Application", RFC 4005, 6467 August 2005. 6469 [RFC4006] Hakala, H., Mattila, L., Koskinen, J-P., Stura, M., and J. 6470 Loughney, "Diameter Credit-Control Application", RFC 4006, 6471 August 2005. 6473 [RFC4072] Eronen, P., Hiller, T., and G. Zorn, "Diameter Extensible 6474 Authentication Protocol (EAP) Application", RFC 4072, 6475 August 2005. 6477 [RFC4740] Garcia-Martin, M., Belinchon, M., Pallares-Lopez, M., 6478 Canales-Valenzuela, C., and K. Tammi, "Diameter Session 6479 Initiation Protocol (SIP) Application", RFC 4740, 6480 November 2006. 6482 [RFC2234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 6483 Specifications: ABNF", RFC 2234, November 1997. 6485 [RFC3232] Reynolds, J., "Assigned Numbers: RFC 1700 is Replaced by 6486 an On-line Database", RFC 3232, January 2002. 6488 [RFC2474] Nichols, K., Blake, S., Baker, F., and D. Black, 6489 "Definition of the Differentiated Services Field (DS 6490 Field) in the IPv4 and IPv6 Headers", RFC 2474, 6491 December 1998. 6493 [RFC2597] Heinanen, J., Baker, F., Weiss, W., and J. Wroclawski, 6494 "Assured Forwarding PHB Group", RFC 2597, June 1999. 6496 [RFC3246] Davie, B., Charny, A., Bennet, J., Benson, K., Le Boudec, 6497 J., Courtney, W., Davari, S., Firoiu, V., and D. 6498 Stiliadis, "An Expedited Forwarding PHB (Per-Hop 6499 Behavior)", RFC 3246, March 2002. 6501 [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 6502 specifying the location of services (DNS SRV)", RFC 2782, 6503 February 2000. 6505 [RFC2284] Blunk, L. and J. Vollbrecht, "PPP Extensible 6506 Authentication Protocol (EAP)", RFC 2284, March 1998. 6508 [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an 6509 IANA Considerations Section in RFCs", BCP 26, RFC 2434, 6510 October 1998. 6512 [RFC2409] Harkins, D. and D. Carrel, "The Internet Key Exchange 6513 (IKE)", RFC 2409, November 1998. 6515 [RFC3173] Shacham, A., Monsour, B., Pereira, R., and M. Thomas, "IP 6516 Payload Compression Protocol (IPComp)", RFC 3173, 6517 September 2001. 6519 [RFC2407] Piper, D., "The Internet IP Security Domain of 6520 Interpretation for ISAKMP", RFC 2407, November 1998. 6522 [RFC2373] Hinden, R. and S. Deering, "IP Version 6 Addressing 6523 Architecture", RFC 2373, July 1998. 6525 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 6526 Requirement Levels", BCP 14, RFC 2119, March 1997. 6528 [RFC2486] Aboba, B. and M. Beadles, "The Network Access Identifier", 6529 RFC 2486, January 1999. 6531 [RFC2915] Mealling, M. and R. Daniel, "The Naming Authority Pointer 6532 (NAPTR) DNS Resource Record", RFC 2915, September 2000. 6534 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 6535 A., Peterson, J., Sparks, R., Handley, M., and E. 6536 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 6537 June 2002. 6539 [RFC2960] Stewart, R., Xie, Q., Morneault, K., Sharp, C., 6540 Schwarzbauer, H., Taylor, T., Rytina, I., Kalla, M., 6541 Zhang, L., and V. Paxson, "Stream Control Transmission 6542 Protocol", RFC 2960, October 2000. 6544 [RFC2165] Veizades, J., Guttman, E., Perkins, C., and S. Kaplan, 6545 "Service Location Protocol", RFC 2165, June 1997. 6547 [RFC2030] Mills, D., "Simple Network Time Protocol (SNTP) Version 4 6548 for IPv4, IPv6 and OSI", RFC 2030, October 1996. 6550 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 6551 RFC 2246, January 1999. 6553 [RFC2609] Guttman, E., Perkins, C., and J. Kempf, "Service Templates 6554 and Service: Schemes", RFC 2609, June 1999. 6556 [RFC3436] Jungmaier, A., Rescorla, E., and M. Tuexen, "Transport 6557 Layer Security over Stream Control Transmission Protocol", 6558 RFC 3436, December 2002. 6560 [RFC2396] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 6561 Resource Identifiers (URI): Generic Syntax", RFC 2396, 6562 August 1998. 6564 [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO 6565 10646", RFC 2279, January 1998. 6567 14.2. Informational References 6569 [RFC2989] Aboba, B., Calhoun, P., Glass, S., Hiller, T., McCann, P., 6570 Shiino, H., Zorn, G., Dommety, G., C.Perkins, B.Patil, 6571 D.Mitton, S.Manning, M.Beadles, P.Walsh, X.Chen, 6572 S.Sivalingham, A.Hameed, M.Munson, S.Jacobs, B.Lim, 6573 B.Hirschman, R.Hsu, Y.Xu, E.Campell, S.Baba, and E.Jaques, 6574 "Criteria for Evaluating AAA Protocols for Network 6575 Access", RFC 2989, November 2000. 6577 [RFC3141] Hiller, T., Walsh, P., Chen, X., Munson, M., Dommety, G., 6578 Sivalingham, S., Lim, B., McCann, P., Shiino, H., 6579 Hirschman, B., Manning, S., Hsu, R., Koo, H., Lipford, M., 6580 Calhoun, P., Lo, C., Jaques, E., Campbell, E., Y.Xu, 6581 S.Baba, T.Ayaki, T.Seki, and A.Hameed, "CDMA2000 Wireless 6582 Data Requirements for AAA", RFC 3141, June 2001. 6584 [RFC2975] Aboba, B., Arkko, J., and D. Harrington, "Introduction to 6585 Accounting Management", RFC 2975, October 2000. 6587 [RFC3576] Chiba, M., Dommety, G., Eklund, M., Mitton, D., and B. 6588 Aboba, "Dynamic Authorization Extensions to Remote 6589 Authentication Dial In User Service (RADIUS)", RFC 3576, 6590 July 2003. 6592 [RFC3344] Perkins, C., "IP Mobility Support for IPv4", RFC 3344, 6593 August 2002. 6595 [RFC2977] Glass, S., Hiller, T., Jacobs, S., and C. Perkins, "Mobile 6596 IP Authentication, Authorization, and Accounting 6597 Requirements", RFC 2977, October 2000. 6599 [RFC2881] Mitton, D. and M. Beadles, "Network Access Server 6600 Requirements Next Generation (NASREQNG) NAS Model", 6601 RFC 2881, July 2000. 6603 [RFC3169] Beadles, M. and D. Mitton, "Criteria for Evaluating 6604 Network Access Server Protocols", RFC 3169, 6605 September 2001. 6607 [RFC1661] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51, 6608 RFC 1661, July 1994. 6610 [RFC2607] Aboba, B. and J. Vollbrecht, "Proxy Chaining and Policy 6611 Implementation in Roaming", RFC 2607, June 1999. 6613 [RFC2866] Rigney, C., "RADIUS Accounting", RFC 2866, June 2000. 6615 [RFC2869] Rigney, C., Willats, W., and P. Calhoun, "RADIUS 6616 Extensions", RFC 2869, June 2000. 6618 [RFC2865] Rigney, C., Willens, S., Rubens, A., and W. Simpson, 6619 "Remote Authentication Dial In User Service (RADIUS)", 6620 RFC 2865, June 2000. 6622 [RFC2194] Aboba, B., Lu, J., Alsop, J., Ding, J., and W. Wang, 6623 "Review of Roaming Implementations", RFC 2194, 6624 September 1997. 6626 [RFC2477] Aboba, B. and G. Zorn, "Criteria for Evaluating Roaming 6627 Protocols", RFC 2477, January 1999. 6629 [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for the 6630 Internet Protocol", RFC 2401, November 1998. 6632 [RFC1492] Finseth, C., "An Access Control Protocol, Sometimes Called 6633 TACACS", RFC 1492, July 1993. 6635 [AAACMS] Calhoun, P., Bulley, W., and S. Farrell, "Diameter CMS 6636 Security Application", Work in Progress. 6638 [IANA-EXP] 6639 Narten, T., "Assigning Experimental and Testing Numbers 6640 Considered Useful, Work in Progress.". 6642 Appendix A. Acknowledgements 6644 The authors would like to thank Nenad Trifunovic, Tony Johansson and 6645 Pankaj Patel for their participation in the pre-IETF Document Reading 6646 Party. Allison Mankin, Jonathan Wood and Bernard Aboba provided 6647 invaluable assistance in working out transport issues, and similarly 6648 with Steven Bellovin in the security area. 6650 Paul Funk and David Mitton were instrumental in getting the Peer 6651 State Machine correct, and our deep thanks go to them for their time. 6653 Text in this document was also provided by Paul Funk, Mark Eklund, 6654 Mark Jones and Dave Spence. Jacques Caron provided many great 6655 comments as a result of a thorough review of the spec. 6657 The authors would also like to acknowledge the following people for 6658 their contribution in the development of the Diameter protocol: Allan 6659 C. Rubens, Haseeb Akhtar, William Bulley, Stephen Farrell, David 6660 Frascone, Daniel C. Fox, Lol Grant, Ignacio Goyret, Nancy Greene, 6661 Peter Heitman, Fredrik Johansson, Mark Jones, Martin Julien, Bob 6662 Kopacz, Paul Krumviede, Fergal Ladley, Ryan Moats, Victor Muslin, 6663 Kenneth Peirce, John Schnizlein, Sumit Vakil, John R. Vollbrecht and 6664 Jeff Weisberg. 6666 Finally, Pat Calhoun would like to thank Sun Microsystems since most 6667 of the effort put into this document was done while he was in their 6668 employ. 6670 Appendix B. Diameter Service Template 6672 The following service template describes the attributes used by 6673 Diameter servers to advertise themselves. This simplifies the 6674 process of selecting an appropriate server to communicate with. A 6675 Diameter client can request specific Diameter servers based on 6676 characteristics of the Diameter service desired (for example, an AAA 6677 server to use for accounting.) 6679 Name of submitter: "Erik Guttman" Language of 6680 service template: en 6682 Security Considerations: 6684 Diameter clients and servers use various cryptographic mechanisms 6685 to protect communication integrity, confidentiality as well as 6686 perform end-point authentication. It would thus be difficult if 6687 not impossible for an attacker to advertise itself using SLPv2 and 6688 pose as a legitimate Diameter peer without proper preconfigured 6689 secrets or cryptographic keys. Still, as Diameter services are 6690 vital for network operation it is important to use SLPv2 6691 authentication to prevent an attacker from modifying or 6692 eliminating service advertisements for legitimate Diameter 6693 servers. 6695 Template text: 6696 -------------------------template begins here----------------------- 6697 template-type=service:diameter 6699 template-version=0.0 6701 template-description= 6702 The Diameter protocol is defined by RFC 3588. 6704 template-url-syntax= 6705 url-path= ; The Diameter URL format is described in Section 2.9. 6706 ; Example: 'aaa://aaa.example.com:1812;transport=tcp 6707 supported-auth-applications= string L M 6709 # This attribute lists the Diameter applications supported by the 6710 # AAA implementation. The applications currently defined are: 6711 # 6712 # Application Name Defined by 6713 # ---------------- ----------------------------------- 6714 # NASREQ Diameter Network Access Server Application 6715 # MobileIP Diameter Mobile IP Application 6716 # 6717 # Notes: 6718 # . Diameter implementations support one or more applications. 6719 # . Additional applications may be defined in the future. 6720 # An updated service template will be created at that time. 6721 # 6723 NASREQ,MobileIP 6724 supported-acct-applications= string L M 6726 # This attribute lists the Diameter applications supported by the 6727 # AAA implementation. The applications currently defined are: 6728 # Application Name Defined by 6729 # ---------------- ----------------------------------- 6730 # NASREQ Diameter Network Access Server Application 6731 # MobileIP Diameter Mobile IP Application 6732 # 6733 # Notes: 6734 # . Diameter implementations support one or more applications. 6735 # . Additional applications may be defined in the future. 6736 # An updated service template will be created at that time. 6737 # 6738 NASREQ,MobileIP 6739 supported-transports= string L M 6741 SCTP 6742 # This attribute lists the supported transports that the Diameter 6743 # implementation accepts. Note that a compliant Diameter 6744 # implementation MUST support SCTP, though it MAY support other 6745 # transports, too. 6746 SCTP,TCP 6748 -------------------------template ends here----------------------- 6750 Appendix C. NAPTR Example 6752 As an example, consider a client that wishes to resolve aaa:ex.com. 6753 The client performs a NAPTR query for that domain, and the following 6754 NAPTR records are returned: 6756 ;; order pref flags service regexp replacement 6757 IN NAPTR 50 50 "s" "AAA+D2S" "" 6758 _diameter._sctp.example.com IN NAPTR 100 50 "s" "AAA+D2T" 6759 "" _aaa._tcp.example.com 6761 This indicates that the server supports SCTP, and TCP, in that order. 6762 If the client supports over SCTP, SCTP will be used, targeted to a 6763 host determined by an SRV lookup of _diameter._sctp.ex.com. That 6764 lookup would return: 6766 ;; Priority Weight Port Target 6767 IN SRV 0 1 5060 server1.example.com IN SRV 0 6768 2 5060 server2.example.com 6770 Appendix D. Duplicate Detection 6772 As described in Section 9.4, accounting record duplicate detection is 6773 based on session identifiers. Duplicates can appear for various 6774 reasons: 6776 o Failover to an alternate server. Where close to real-time 6777 performance is required, failover thresholds need to be kept low 6778 and this may lead to an increased likelihood of duplicates. 6779 Failover can occur at the client or within Diameter agents. 6781 o Failure of a client or agent after sending of a record from non- 6782 volatile memory, but prior to receipt of an application layer ACK 6783 and deletion of the record. record to be sent. This will result 6784 in retransmission of the record soon after the client or agent has 6785 rebooted. 6787 o Duplicates received from RADIUS gateways. Since the 6788 retransmission behavior of RADIUS is not defined within [RFC2865], 6789 the likelihood of duplication will vary according to the 6790 implementation. 6792 o Implementation problems and misconfiguration. 6794 The T flag is used as an indication of an application layer 6795 retransmission event, e.g., due to failover to an alternate server. 6796 It is defined only for request messages sent by Diameter clients or 6797 agents. For instance, after a reboot, a client may not know whether 6798 it has already tried to send the accounting records in its non- 6799 volatile memory before the reboot occurred. Diameter servers MAY use 6800 the T flag as an aid when processing requests and detecting duplicate 6801 messages. However, servers that do this MUST ensure that duplicates 6802 are found even when the first transmitted request arrives at the 6803 server after the retransmitted request. It can be used only in cases 6804 where no answer has been received from the Server for a request and 6805 the request is sent again, (e.g., due to a failover to an alternate 6806 peer, due to a recovered primary peer or due to a client re-sending a 6807 stored record from non-volatile memory such as after reboot of a 6808 client or agent). 6810 In some cases the Diameter accounting server can delay the duplicate 6811 detection and accounting record processing until a post-processing 6812 phase takes place. At that time records are likely to be sorted 6813 according to the included User-Name and duplicate elimination is easy 6814 in this case. In other situations it may be necessary to perform 6815 real-time duplicate detection, such as when credit limits are imposed 6816 or real-time fraud detection is desired. 6818 In general, only generation of duplicates due to failover or re- 6819 sending of records in non-volatile storage can be reliably detected 6820 by Diameter clients or agents. In such cases the Diameter client or 6821 agents can mark the message as possible duplicate by setting the T 6822 flag. Since the Diameter server is responsible for duplicate 6823 detection, it can choose to make use of the T flag or not, in order 6824 to optimize duplicate detection. Since the T flag does not affect 6825 interoperability, and may not be needed by some servers, generation 6826 of the T flag is REQUIRED for Diameter clients and agents, but MAY be 6827 implemented by Diameter servers. 6829 As an example, it can be usually be assumed that duplicates appear 6830 within a time window of longest recorded network partition or device 6831 fault, perhaps a day. So only records within this time window need 6832 to be looked at in the backward direction. Secondly, hashing 6833 techniques or other schemes, such as the use of the T flag in the 6834 received messages, may be used to eliminate the need to do a full 6835 search even in this set except for rare cases. 6837 The following is an example of how the T flag may be used by the 6838 server to detect duplicate requests. 6840 A Diameter server MAY check the T flag of the received message to 6841 determine if the record is a possible duplicate. If the T flag is 6842 set in the request message, the server searches for a duplicate 6843 within a configurable duplication time window backward and 6844 forward. This limits database searching to those records where 6845 the T flag is set. In a well run network, network partitions and 6846 device faults will presumably be rare events, so this approach 6847 represents a substantial optimization of the duplicate detection 6848 process. During failover, it is possible for the original record 6849 to be received after the T flag marked record, due to differences 6850 in network delays experienced along the path by the original and 6851 duplicate transmissions. The likelihood of this occurring 6852 increases as the failover interval is decreased. In order to be 6853 able to detect out of order duplicates, the Diameter server should 6854 use backward and forward time windows when performing duplicate 6855 checking for the T flag marked request. For example, in order to 6856 allow time for the original record to exit the network and be 6857 recorded by the accounting server, the Diameter server can delay 6858 processing records with the T flag set until a time period 6859 TIME_WAIT + RECORD_PROCESSING_TIME has elapsed after the closing 6860 of the original transport connection. After this time period has 6861 expired, then it may check the T flag marked records against the 6862 database with relative assurance that the original records, if 6863 sent, have been received and recorded. 6865 Appendix E. Intellectual Property Statement 6867 The IETF takes no position regarding the validity or scope of any 6868 intellectual property or other rights that might be claimed to 6869 pertain to the implementation or use of the technology described in 6870 this document or the extent to which any license under such rights 6871 might or might not be available; neither does it represent that it 6872 has made any effort to identify any such rights. Information on the 6873 IETF's procedures with respect to rights in standards-track and 6874 standards-related documentation can be found in BCP-11. Copies of 6875 claims of rights made available for publication and any assurances of 6876 licenses to be made available, or the result of an attempt made to 6877 obtain a general license or permission for the use of such 6878 proprietary rights by implementers or users of this specification can 6879 be obtained from the IETF Secretariat. 6881 The IETF invites any interested party to bring to its attention any 6882 copyrights, patents or patent applications, or other proprietary 6883 rights which may cover technology that may be required to practice 6884 this standard. Please address the information to the IETF Executive 6885 Director. 6887 Authors' Addresses 6889 Victor Fajardo 6890 Toshiba America Research 6891 One Telcordia Drive, 1S-222 6892 Piscataway, NJ 08854 6893 USA 6895 Phone: 1 908-421-1845 6896 Email: vfajardo@tari.toshiba.com 6898 John Loughney 6899 Nokia Research Center 6900 Itamerenkatu 11-13 6901 Helsinki, 00180 6902 Finland 6904 Phone: +358 50 483 6242 6905 Email: john.loughney@nokia.com 6907 Full Copyright Statement 6909 Copyright (C) The Internet Society (2006). 6911 This document is subject to the rights, licenses and restrictions 6912 contained in BCP 78, and except as set forth therein, the authors 6913 retain all their rights. 6915 This document and the information contained herein are provided on an 6916 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 6917 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 6918 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 6919 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 6920 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 6921 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 6923 Intellectual Property 6925 The IETF takes no position regarding the validity or scope of any 6926 Intellectual Property Rights or other rights that might be claimed to 6927 pertain to the implementation or use of the technology described in 6928 this document or the extent to which any license under such rights 6929 might or might not be available; nor does it represent that it has 6930 made any independent effort to identify any such rights. Information 6931 on the procedures with respect to rights in RFC documents can be 6932 found in BCP 78 and BCP 79. 6934 Copies of IPR disclosures made to the IETF Secretariat and any 6935 assurances of licenses to be made available, or the result of an 6936 attempt made to obtain a general license or permission for the use of 6937 such proprietary rights by implementers or users of this 6938 specification can be obtained from the IETF on-line IPR repository at 6939 http://www.ietf.org/ipr. 6941 The IETF invites any interested party to bring to its attention any 6942 copyrights, patents or patent applications, or other proprietary 6943 rights that may cover technology that may be required to implement 6944 this standard. Please address the information to the IETF at 6945 ietf-ipr@ietf.org. 6947 Acknowledgment 6949 Funding for the RFC Editor function is provided by the IETF 6950 Administrative Support Activity (IASA).