Network Working Group P. Calhoun Request for Comments: 3588 Airespace, Inc. Category: Standards Track J. Loughney Nokia E. Guttman Sun Microsystems, Inc. G. Zorn Cisco Systems, Inc. J. Arkko Ericsson September 2003
Network Working Group P. Calhoun Request for Comments: 3588 Airespace, Inc. Category: Standards Track J. Loughney Nokia E. Guttman Sun Microsystems, Inc. G. Zorn Cisco Systems, Inc. J. Arkko Ericsson September 2003
Diameter Base Protocol
Diameter基本协议
Status of this Memo
本备忘录的状况
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。
Copyright Notice
版权公告
Copyright (C) The Internet Society (2003). All Rights Reserved.
版权所有(C)互联网协会(2003年)。版权所有。
Abstract
摘要
The Diameter base protocol is intended to provide an Authentication, Authorization and Accounting (AAA) framework for applications such as network access or IP mobility. Diameter is also intended to work in both local Authentication, Authorization & Accounting and roaming situations. This document specifies the message format, transport, error reporting, accounting and security services to be used by all Diameter applications. The Diameter base application needs to be supported by all Diameter implementations.
Diameter基本协议旨在为网络访问或IP移动性等应用程序提供身份验证、授权和计费(AAA)框架。Diameter还适用于本地身份验证、授权和记帐以及漫游情况。本文档指定了所有Diameter应用程序要使用的消息格式、传输、错误报告、记帐和安全服务。Diameter基础应用程序需要得到所有Diameter实现的支持。
Conventions Used In This Document
本文件中使用的公约
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119 [KEYWORD].
本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照BCP 14、RFC 2119[关键词]中的描述进行解释。
Table of Contents
目录
1. Introduction................................................. 6 1.1. Diameter Protocol..................................... 9 1.1.1. Description of the Document Set.............. 10 1.2. Approach to Extensibility............................. 11 1.2.1. Defining New AVP Values...................... 11 1.2.2. Creating New AVPs............................ 11 1.2.3. Creating New Authentication Applications..... 11 1.2.4. Creating New Accounting Applications......... 12 1.2.5. Application Authentication Procedures........ 14 1.3. Terminology........................................... 14 2. Protocol Overview............................................ 18 2.1. Transport............................................. 20 2.1.1. SCTP Guidelines.............................. 21 2.2. Securing Diameter Messages............................ 21 2.3. Diameter Application Compliance....................... 21 2.4. Application Identifiers............................... 22 2.5. Connections vs. Sessions.............................. 22 2.6. Peer Table............................................ 23 2.7. Realm-Based Routing Table............................. 24 2.8. Role of Diameter Agents............................... 25 2.8.1. Relay Agents................................. 26 2.8.2. Proxy Agents................................. 27 2.8.3. Redirect Agents.............................. 28 2.8.4. Translation Agents........................... 29 2.9. End-to-End Security Framework......................... 30 2.10. Diameter Path Authorization........................... 30 3. Diameter Header.............................................. 32 3.1. Command Codes......................................... 35 3.2. Command Code ABNF specification....................... 36 3.3. Diameter Command Naming Conventions................... 38 4. Diameter AVPs................................................ 38 4.1. AVP Header............................................ 39 4.1.1. Optional Header Elements..................... 41 4.2. Basic AVP Data Formats................................ 41 4.3. Derived AVP Data Formats.............................. 42 4.4. Grouped AVP Values.................................... 49 4.4.1. Example AVP with a Grouped Data Type......... 50 4.5. Diameter Base Protocol AVPs........................... 53 5. Diameter Peers............................................... 56 5.1. Peer Connections...................................... 56 5.2. Diameter Peer Discovery............................... 56 5.3. Capabilities Exchange................................. 59 5.3.1. Capabilities-Exchange-Request................ 60 5.3.2. Capabilities-Exchange-Answer................. 60 5.3.3. Vendor-Id AVP................................ 61 5.3.4. Firmware-Revision AVP........................ 61
1. Introduction................................................. 6 1.1. Diameter Protocol..................................... 9 1.1.1. Description of the Document Set.............. 10 1.2. Approach to Extensibility............................. 11 1.2.1. Defining New AVP Values...................... 11 1.2.2. Creating New AVPs............................ 11 1.2.3. Creating New Authentication Applications..... 11 1.2.4. Creating New Accounting Applications......... 12 1.2.5. Application Authentication Procedures........ 14 1.3. Terminology........................................... 14 2. Protocol Overview............................................ 18 2.1. Transport............................................. 20 2.1.1. SCTP Guidelines.............................. 21 2.2. Securing Diameter Messages............................ 21 2.3. Diameter Application Compliance....................... 21 2.4. Application Identifiers............................... 22 2.5. Connections vs. Sessions.............................. 22 2.6. Peer Table............................................ 23 2.7. Realm-Based Routing Table............................. 24 2.8. Role of Diameter Agents............................... 25 2.8.1. Relay Agents................................. 26 2.8.2. Proxy Agents................................. 27 2.8.3. Redirect Agents.............................. 28 2.8.4. Translation Agents........................... 29 2.9. End-to-End Security Framework......................... 30 2.10. Diameter Path Authorization........................... 30 3. Diameter Header.............................................. 32 3.1. Command Codes......................................... 35 3.2. Command Code ABNF specification....................... 36 3.3. Diameter Command Naming Conventions................... 38 4. Diameter AVPs................................................ 38 4.1. AVP Header............................................ 39 4.1.1. Optional Header Elements..................... 41 4.2. Basic AVP Data Formats................................ 41 4.3. Derived AVP Data Formats.............................. 42 4.4. Grouped AVP Values.................................... 49 4.4.1. Example AVP with a Grouped Data Type......... 50 4.5. Diameter Base Protocol AVPs........................... 53 5. Diameter Peers............................................... 56 5.1. Peer Connections...................................... 56 5.2. Diameter Peer Discovery............................... 56 5.3. Capabilities Exchange................................. 59 5.3.1. Capabilities-Exchange-Request................ 60 5.3.2. Capabilities-Exchange-Answer................. 60 5.3.3. Vendor-Id AVP................................ 61 5.3.4. Firmware-Revision AVP........................ 61
5.3.5. Host-IP-Address AVP.......................... 62 5.3.6. Supported-Vendor-Id AVP...................... 62 5.3.7. Product-Name AVP............................. 62 5.4. Disconnecting Peer Connections........................ 62 5.4.1. Disconnect-Peer-Request...................... 63 5.4.2. Disconnect-Peer-Answer....................... 63 5.4.3. Disconnect-Cause AVP......................... 63 5.5. Transport Failure Detection........................... 64 5.5.1. Device-Watchdog-Request...................... 64 5.5.2. Device-Watchdog-Answer....................... 64 5.5.3. Transport Failure Algorithm.................. 65 5.5.4. Failover and Failback Procedures............. 65 5.6. Peer State Machine.................................... 66 5.6.1. Incoming connections......................... 68 5.6.2. Events....................................... 69 5.6.3. Actions...................................... 70 5.6.4. The Election Process......................... 71 6. Diameter Message Processing.................................. 71 6.1. Diameter Request Routing Overview..................... 71 6.1.1. Originating a Request........................ 73 6.1.2. Sending a Request............................ 73 6.1.3. Receiving Requests........................... 73 6.1.4. Processing Local Requests.................... 73 6.1.5. Request Forwarding........................... 74 6.1.6. Request Routing.............................. 74 6.1.7. Redirecting Requests......................... 74 6.1.8. Relaying and Proxying Requests............... 75 6.2. Diameter Answer Processing............................ 76 6.2.1. Processing Received Answers.................. 77 6.2.2. Relaying and Proxying Answers................ 77 6.3. Origin-Host AVP....................................... 77 6.4. Origin-Realm AVP...................................... 78 6.5. Destination-Host AVP.................................. 78 6.6. Destination-Realm AVP................................. 78 6.7. Routing AVPs.......................................... 78 6.7.1. Route-Record AVP............................. 79 6.7.2. Proxy-Info AVP............................... 79 6.7.3. Proxy-Host AVP............................... 79 6.7.4. Proxy-State AVP.............................. 79 6.8. Auth-Application-Id AVP............................... 79 6.9. Acct-Application-Id AVP............................... 79 6.10. Inband-Security-Id AVP................................ 79 6.11. Vendor-Specific-Application-Id AVP.................... 80 6.12. Redirect-Host AVP..................................... 80 6.13. Redirect-Host-Usage AVP............................... 80 6.14. Redirect-Max-Cache-Time AVP........................... 81 6.15. E2E-Sequence AVP...................................... 82
5.3.5. Host-IP-Address AVP.......................... 62 5.3.6. Supported-Vendor-Id AVP...................... 62 5.3.7. Product-Name AVP............................. 62 5.4. Disconnecting Peer Connections........................ 62 5.4.1. Disconnect-Peer-Request...................... 63 5.4.2. Disconnect-Peer-Answer....................... 63 5.4.3. Disconnect-Cause AVP......................... 63 5.5. Transport Failure Detection........................... 64 5.5.1. Device-Watchdog-Request...................... 64 5.5.2. Device-Watchdog-Answer....................... 64 5.5.3. Transport Failure Algorithm.................. 65 5.5.4. Failover and Failback Procedures............. 65 5.6. Peer State Machine.................................... 66 5.6.1. Incoming connections......................... 68 5.6.2. Events....................................... 69 5.6.3. Actions...................................... 70 5.6.4. The Election Process......................... 71 6. Diameter Message Processing.................................. 71 6.1. Diameter Request Routing Overview..................... 71 6.1.1. Originating a Request........................ 73 6.1.2. Sending a Request............................ 73 6.1.3. Receiving Requests........................... 73 6.1.4. Processing Local Requests.................... 73 6.1.5. Request Forwarding........................... 74 6.1.6. Request Routing.............................. 74 6.1.7. Redirecting Requests......................... 74 6.1.8. Relaying and Proxying Requests............... 75 6.2. Diameter Answer Processing............................ 76 6.2.1. Processing Received Answers.................. 77 6.2.2. Relaying and Proxying Answers................ 77 6.3. Origin-Host AVP....................................... 77 6.4. Origin-Realm AVP...................................... 78 6.5. Destination-Host AVP.................................. 78 6.6. Destination-Realm AVP................................. 78 6.7. Routing AVPs.......................................... 78 6.7.1. Route-Record AVP............................. 79 6.7.2. Proxy-Info AVP............................... 79 6.7.3. Proxy-Host AVP............................... 79 6.7.4. Proxy-State AVP.............................. 79 6.8. Auth-Application-Id AVP............................... 79 6.9. Acct-Application-Id AVP............................... 79 6.10. Inband-Security-Id AVP................................ 79 6.11. Vendor-Specific-Application-Id AVP.................... 80 6.12. Redirect-Host AVP..................................... 80 6.13. Redirect-Host-Usage AVP............................... 80 6.14. Redirect-Max-Cache-Time AVP........................... 81 6.15. E2E-Sequence AVP...................................... 82
7. Error Handling............................................... 82 7.1. Result-Code AVP....................................... 84 7.1.1. Informational................................ 84 7.1.2. Success...................................... 84 7.1.3. Protocol Errors.............................. 85 7.1.4. Transient Failures........................... 86 7.1.5. Permanent Failures........................... 86 7.2. Error Bit............................................. 88 7.3. Error-Message AVP..................................... 89 7.4. Error-Reporting-Host AVP.............................. 89 7.5. Failed-AVP AVP........................................ 89 7.6. Experimental-Result AVP............................... 90 7.7. Experimental-Result-Code AVP.......................... 90 8. Diameter User Sessions....................................... 90 8.1. Authorization Session State Machine................... 92 8.2. Accounting Session State Machine...................... 96 8.3. Server-Initiated Re-Auth.............................. 101 8.3.1. Re-Auth-Request.............................. 102 8.3.2. Re-Auth-Answer............................... 102 8.4. Session Termination................................... 103 8.4.1. Session-Termination-Request.................. 104 8.4.2. Session-Termination-Answer................... 105 8.5. Aborting a Session.................................... 105 8.5.1. Abort-Session-Request........................ 106 8.5.2. Abort-Session-Answer......................... 106 8.6. Inferring Session Termination from Origin-State-Id.... 107 8.7. Auth-Request-Type AVP................................. 108 8.8. Session-Id AVP........................................ 108 8.9. Authorization-Lifetime AVP............................ 109 8.10. Auth-Grace-Period AVP................................. 110 8.11. Auth-Session-State AVP................................ 110 8.12. Re-Auth-Request-Type AVP.............................. 110 8.13. Session-Timeout AVP................................... 111 8.14. User-Name AVP......................................... 111 8.15. Termination-Cause AVP................................. 111 8.16. Origin-State-Id AVP................................... 112 8.17. Session-Binding AVP................................... 113 8.18. Session-Server-Failover AVP........................... 113 8.19. Multi-Round-Time-Out AVP.............................. 114 8.20. Class AVP............................................. 114 8.21. Event-Timestamp AVP................................... 115 9. Accounting................................................... 115 9.1. Server Directed Model................................. 115 9.2. Protocol Messages..................................... 116 9.3. Application Document Requirements..................... 116 9.4. Fault Resilience...................................... 116 9.5. Accounting Records.................................... 117 9.6. Correlation of Accounting Records..................... 118
7. Error Handling............................................... 82 7.1. Result-Code AVP....................................... 84 7.1.1. Informational................................ 84 7.1.2. Success...................................... 84 7.1.3. Protocol Errors.............................. 85 7.1.4. Transient Failures........................... 86 7.1.5. Permanent Failures........................... 86 7.2. Error Bit............................................. 88 7.3. Error-Message AVP..................................... 89 7.4. Error-Reporting-Host AVP.............................. 89 7.5. Failed-AVP AVP........................................ 89 7.6. Experimental-Result AVP............................... 90 7.7. Experimental-Result-Code AVP.......................... 90 8. Diameter User Sessions....................................... 90 8.1. Authorization Session State Machine................... 92 8.2. Accounting Session State Machine...................... 96 8.3. Server-Initiated Re-Auth.............................. 101 8.3.1. Re-Auth-Request.............................. 102 8.3.2. Re-Auth-Answer............................... 102 8.4. Session Termination................................... 103 8.4.1. Session-Termination-Request.................. 104 8.4.2. Session-Termination-Answer................... 105 8.5. Aborting a Session.................................... 105 8.5.1. Abort-Session-Request........................ 106 8.5.2. Abort-Session-Answer......................... 106 8.6. Inferring Session Termination from Origin-State-Id.... 107 8.7. Auth-Request-Type AVP................................. 108 8.8. Session-Id AVP........................................ 108 8.9. Authorization-Lifetime AVP............................ 109 8.10. Auth-Grace-Period AVP................................. 110 8.11. Auth-Session-State AVP................................ 110 8.12. Re-Auth-Request-Type AVP.............................. 110 8.13. Session-Timeout AVP................................... 111 8.14. User-Name AVP......................................... 111 8.15. Termination-Cause AVP................................. 111 8.16. Origin-State-Id AVP................................... 112 8.17. Session-Binding AVP................................... 113 8.18. Session-Server-Failover AVP........................... 113 8.19. Multi-Round-Time-Out AVP.............................. 114 8.20. Class AVP............................................. 114 8.21. Event-Timestamp AVP................................... 115 9. Accounting................................................... 115 9.1. Server Directed Model................................. 115 9.2. Protocol Messages..................................... 116 9.3. Application Document Requirements..................... 116 9.4. Fault Resilience...................................... 116 9.5. Accounting Records.................................... 117 9.6. Correlation of Accounting Records..................... 118
9.7. Accounting Command-Codes.............................. 119 9.7.1. Accounting-Request........................... 119 9.7.2. Accounting-Answer............................ 120 9.8. Accounting AVPs....................................... 121 9.8.1. Accounting-Record-Type AVP................... 121 9.8.2. Acct-Interim-Interval AVP.................... 122 9.8.3. Accounting-Record-Number AVP................. 123 9.8.4. Acct-Session-Id AVP.......................... 123 9.8.5. Acct-Multi-Session-Id AVP.................... 123 9.8.6. Accounting-Sub-Session-Id AVP................ 123 9.8.7. Accounting-Realtime-Required AVP............. 123 10. AVP Occurrence Table......................................... 124 10.1. Base Protocol Command AVP Table....................... 124 10.2. Accounting AVP Table.................................. 126 11. IANA Considerations.......................................... 127 11.1. AVP Header............................................ 127 11.1.1. AVP Code..................................... 127 11.1.2. AVP Flags.................................... 128 11.2. Diameter Header....................................... 128 11.2.1. Command Codes................................ 128 11.2.2. Command Flags................................ 129 11.3. Application Identifiers............................... 129 11.4. AVP Values............................................ 129 11.4.1. Result-Code AVP Values....................... 129 11.4.2. Accounting-Record-Type AVP Values............ 130 11.4.3. Termination-Cause AVP Values................. 130 11.4.4. Redirect-Host-Usage AVP Values............... 130 11.4.5. Session-Server-Failover AVP Values........... 130 11.4.6. Session-Binding AVP Values................... 130 11.4.7. Disconnect-Cause AVP Values.................. 130 11.4.8. Auth-Request-Type AVP Values................. 130 11.4.9. Auth-Session-State AVP Values................ 130 11.4.10. Re-Auth-Request-Type AVP Values.............. 131 11.4.11. Accounting-Realtime-Required AVP Values...... 131 11.5. Diameter TCP/SCTP Port Numbers........................ 131 11.6. NAPTR Service Fields.................................. 131 12. Diameter Protocol Related Configurable Parameters............ 131 13. Security Considerations...................................... 132 13.1. IPsec Usage........................................... 133 13.2. TLS Usage............................................. 134 13.3. Peer-to-Peer Considerations........................... 134 14. References................................................... 136 14.1. Normative References.................................. 136 14.2. Informative References................................ 138 15. Acknowledgements............................................. 140 Appendix A. Diameter Service Template........................... 141 Appendix B. NAPTR Example....................................... 142 Appendix C. Duplicate Detection................................. 143
9.7. Accounting Command-Codes.............................. 119 9.7.1. Accounting-Request........................... 119 9.7.2. Accounting-Answer............................ 120 9.8. Accounting AVPs....................................... 121 9.8.1. Accounting-Record-Type AVP................... 121 9.8.2. Acct-Interim-Interval AVP.................... 122 9.8.3. Accounting-Record-Number AVP................. 123 9.8.4. Acct-Session-Id AVP.......................... 123 9.8.5. Acct-Multi-Session-Id AVP.................... 123 9.8.6. Accounting-Sub-Session-Id AVP................ 123 9.8.7. Accounting-Realtime-Required AVP............. 123 10. AVP Occurrence Table......................................... 124 10.1. Base Protocol Command AVP Table....................... 124 10.2. Accounting AVP Table.................................. 126 11. IANA Considerations.......................................... 127 11.1. AVP Header............................................ 127 11.1.1. AVP Code..................................... 127 11.1.2. AVP Flags.................................... 128 11.2. Diameter Header....................................... 128 11.2.1. Command Codes................................ 128 11.2.2. Command Flags................................ 129 11.3. Application Identifiers............................... 129 11.4. AVP Values............................................ 129 11.4.1. Result-Code AVP Values....................... 129 11.4.2. Accounting-Record-Type AVP Values............ 130 11.4.3. Termination-Cause AVP Values................. 130 11.4.4. Redirect-Host-Usage AVP Values............... 130 11.4.5. Session-Server-Failover AVP Values........... 130 11.4.6. Session-Binding AVP Values................... 130 11.4.7. Disconnect-Cause AVP Values.................. 130 11.4.8. Auth-Request-Type AVP Values................. 130 11.4.9. Auth-Session-State AVP Values................ 130 11.4.10. Re-Auth-Request-Type AVP Values.............. 131 11.4.11. Accounting-Realtime-Required AVP Values...... 131 11.5. Diameter TCP/SCTP Port Numbers........................ 131 11.6. NAPTR Service Fields.................................. 131 12. Diameter Protocol Related Configurable Parameters............ 131 13. Security Considerations...................................... 132 13.1. IPsec Usage........................................... 133 13.2. TLS Usage............................................. 134 13.3. Peer-to-Peer Considerations........................... 134 14. References................................................... 136 14.1. Normative References.................................. 136 14.2. Informative References................................ 138 15. Acknowledgements............................................. 140 Appendix A. Diameter Service Template........................... 141 Appendix B. NAPTR Example....................................... 142 Appendix C. Duplicate Detection................................. 143
Appendix D. Intellectual Property Statement..................... 145 Authors' Addresses............................................... 146 Full Copyright Statement......................................... 147
Appendix D. Intellectual Property Statement..................... 145 Authors' Addresses............................................... 146 Full Copyright Statement......................................... 147
Authentication, Authorization and Accounting (AAA) protocols such as TACACS [TACACS] and RADIUS [RADIUS] were initially deployed to provide dial-up PPP [PPP] and terminal server access. Over time, with the growth of the Internet and the introduction of new access technologies, including wireless, DSL, Mobile IP and Ethernet, routers and network access servers (NAS) have increased in complexity and density, putting new demands on AAA protocols.
身份验证、授权和计费(AAA)协议,如TACACS[TACACS]和RADIUS[RADIUS]最初被部署用于提供拨号PPP[PPP]和终端服务器访问。随着时间的推移,随着互联网的发展和新接入技术(包括无线、DSL、移动IP和以太网)的引入,路由器和网络接入服务器(NAS)的复杂性和密度不断增加,对AAA协议提出了新的要求。
Network access requirements for AAA protocols are summarized in [AAAREQ]. These include:
AAA协议的网络访问要求总结在[AAAREQ]中。这些措施包括:
Failover [RADIUS] does not define failover mechanisms, and as a result, failover behavior differs between implementations. In order to provide well defined failover behavior, Diameter supports application-layer acknowledgements, and defines failover algorithms and the associated state machine. This is described in Section 5.5 and [AAATRANS].
故障转移[RADIUS]未定义故障转移机制,因此,不同实现的故障转移行为不同。为了提供定义良好的故障转移行为,Diameter支持应用层确认,并定义故障转移算法和关联的状态机。第5.5节和[AAATRANS]中对此进行了描述。
Transmission-level security [RADIUS] defines an application-layer authentication and integrity scheme that is required only for use with Response packets. While [RADEXT] defines an additional authentication and integrity mechanism, use is only required during Extensible Authentication Protocol (EAP) sessions. While attribute-hiding is supported, [RADIUS] does not provide support for per-packet confidentiality. In accounting, [RADACCT] assumes that replay protection is provided by the backend billing server, rather than within the protocol itself.
Transmission-level security [RADIUS] defines an application-layer authentication and integrity scheme that is required only for use with Response packets. While [RADEXT] defines an additional authentication and integrity mechanism, use is only required during Extensible Authentication Protocol (EAP) sessions. While attribute-hiding is supported, [RADIUS] does not provide support for per-packet confidentiality. In accounting, [RADACCT] assumes that replay protection is provided by the backend billing server, rather than within the protocol itself.
While [RFC3162] defines the use of IPsec with RADIUS, support for IPsec is not required. Since within [IKE] authentication occurs only within Phase 1 prior to the establishment of IPsec SAs in Phase 2, it is typically not possible to define separate trust or authorization schemes for each application. This limits the usefulness of IPsec in inter-domain AAA applications (such as roaming) where it may be desirable to define a distinct certificate hierarchy for use in a AAA deployment. In order to provide universal support for transmission-level security, and enable both intra- and inter-domain AAA deployments, IPsec support is mandatory in Diameter, and TLS support is optional. Security is discussed in Section 13.
虽然[RFC3162]定义了使用带RADIUS的IPsec,但不需要支持IPsec。由于[IKE]内认证仅在第2阶段中建立IPsec SAs之前的第1阶段中发生,因此通常不可能为每个应用程序定义单独的信任或授权方案。这限制了IPsec在域间AAA应用程序(如漫游)中的实用性,其中可能需要定义一个不同的证书层次结构以用于AAA部署。为了提供对传输级别安全性的通用支持,并支持域内和域间AAA部署,在Diameter中IPsec支持是必需的,TLS支持是可选的。第13节讨论了安全性。
Reliable transport RADIUS runs over UDP, and does not define retransmission behavior; as a result, reliability varies between implementations. As described in [ACCMGMT], this is a major issue in accounting, where packet loss may translate directly into revenue loss. In order to provide well defined transport behavior, Diameter runs over reliable transport mechanisms (TCP, SCTP) as defined in [AAATRANS].
可靠传输半径在UDP上运行,不定义重传行为;因此,实现之间的可靠性各不相同。如[ACCMGMT]所述,这是会计中的一个主要问题,数据包丢失可能直接转化为收入损失。为了提供定义良好的传输行为,Diameter运行在[AAATRANS]中定义的可靠传输机制(TCP、SCTP)上。
Agent support [RADIUS] does not provide for explicit support for agents, including Proxies, Redirects and Relays. Since the expected behavior is not defined, it varies between implementations. Diameter defines agent behavior explicitly; this is described in Section 2.8.
代理支持[RADIUS]不提供对代理的明确支持,包括代理、重定向和中继。由于未定义预期的行为,因此不同的实现会有所不同。Diameter明确定义了agent行为;第2.8节对此进行了说明。
Server-initiated messages While RADIUS server-initiated messages are defined in [DYNAUTH], support is optional. This makes it difficult to implement features such as unsolicited disconnect or reauthentication/reauthorization on demand across a heterogeneous deployment. Support for server-initiated messages is mandatory in Diameter, and is described in Section 8.
服务器启动的消息当RADIUS服务器启动的消息在[DYNAUTH]中定义时,支持是可选的。这使得在异构部署中很难实现诸如主动断开连接或按需重新验证/重新验证等功能。Diameter中必须支持服务器启动的消息,第8节对此进行了描述。
Auditability RADIUS does not define data-object security mechanisms, and as a result, untrusted proxies may modify attributes or even packet headers without being detected. Combined with lack of support for capabilities negotiation, this makes it very difficult to determine what occurred in the event of a dispute. While implementation of data object security is not mandatory within Diameter, these capabilities are supported, and are described in [AAACMS].
Auditability RADIUS不定义数据对象安全机制,因此,不受信任的代理可能会修改属性,甚至修改数据包头,而不会被检测到。再加上缺乏对谈判能力的支持,这使得在发生争议时很难确定发生了什么。虽然数据对象安全性的实现在Diameter中不是强制性的,但这些功能是受支持的,并在[AAACMS]中进行了描述。
Transition support While Diameter does not share a common protocol data unit (PDU) with RADIUS, considerable effort has been expended in enabling backward compatibility with RADIUS, so that the two protocols may be deployed in the same network. Initially, it is expected that Diameter will be deployed within new network devices, as well as within gateways enabling communication between legacy RADIUS devices and Diameter agents. This capability, described in [NASREQ], enables Diameter support to be added to legacy networks, by addition of a gateway or server speaking both RADIUS and Diameter.
转换支持虽然Diameter与RADIUS不共享公共协议数据单元(PDU),但在实现与RADIUS的向后兼容性方面已经付出了相当大的努力,因此这两个协议可以部署在同一网络中。最初,预计Diameter将部署在新的网络设备中,以及支持传统RADIUS设备和Diameter代理之间通信的网关中。[NASREQ]中描述的这一功能,通过添加同时使用RADIUS和Diameter的网关或服务器,可以将Diameter支持添加到传统网络中。
In addition to addressing the above requirements, Diameter also provides support for the following:
除满足上述要求外,Diameter还提供以下支持:
Capability negotiation RADIUS does not support error messages, capability negotiation, or a mandatory/non-mandatory flag for attributes. Since RADIUS clients and servers are not aware of each other's capabilities, they may not be able to successfully negotiate a mutually acceptable service, or in some cases, even be aware of what service has been implemented. Diameter includes support for error handling (Section 7), capability negotiation (Section 5.3), and mandatory/non-mandatory attribute-value pairs (AVPs) (Section 4.1).
能力协商半径不支持错误消息、能力协商或属性的强制性/非强制性标志。由于RADIUS客户端和服务器不知道彼此的能力,因此它们可能无法成功协商双方都能接受的服务,或者在某些情况下,甚至无法知道已实现了什么服务。直径包括对错误处理(第7节)、能力协商(第5.3节)和强制性/非强制性属性值对(AVP)(第4.1节)的支持。
Peer discovery and configuration RADIUS implementations typically require that the name or address of servers or clients be manually configured, along with the corresponding shared secrets. This results in a large administrative burden, and creates the temptation to reuse the RADIUS shared secret, which can result in major security vulnerabilities if the Request Authenticator is not globally and temporally unique as required in [RADIUS]. Through DNS, Diameter enables dynamic discovery of peers. Derivation of dynamic session keys is enabled via transmission-level security.
对等发现和配置RADIUS实现通常需要手动配置服务器或客户端的名称或地址以及相应的共享机密。这导致了巨大的管理负担,并产生了重用RADIUS共享机密的诱惑,如果请求验证器不是[RADIUS]中所要求的全局和时间唯一的,则可能导致严重的安全漏洞。通过DNS,Diameter支持对等点的动态发现。动态会话密钥的派生通过传输级安全性启用。
Roaming support The ROAMOPS WG provided a survey of roaming implementations [ROAMREV], detailed roaming requirements [ROAMCRIT], defined the Network Access Identifier (NAI) [NAI], and documented existing implementations (and imitations) of RADIUS-based roaming [PROXYCHAIN]. In order to improve scalability, [PROXYCHAIN] introduced the concept of proxy chaining via an intermediate server, facilitating roaming between providers. However, since RADIUS does not provide explicit support for proxies, and lacks auditability and transmission-level security features, RADIUS-based roaming is vulnerable to attack from external parties as well as susceptible to fraud perpetrated by the roaming partners themselves. As a result, it is not suitable for wide-scale deployment on the Internet [PROXYCHAIN]. By providing explicit support for inter-domain roaming and message routing (Sections 2.7 and 6), auditability [AAACMS], and transmission-layer security (Section 13) features, Diameter addresses these limitations and provides for secure and scalable roaming.
漫游支持ROAMOPS工作组提供了漫游实施调查[ROAMREV],详细的漫游要求[ROAMCRIT],定义了网络访问标识符(NAI)[NAI],并记录了基于RADIUS的漫游[PROXYCHAIN]的现有实施(和模拟)。为了提高可伸缩性,[PROXYCHAIN]引入了通过中间服务器进行代理链接的概念,方便了提供商之间的漫游。但是,由于RADIUS不提供对代理的明确支持,并且缺乏可审核性和传输级安全功能,因此基于RADIUS的漫游容易受到外部方的攻击,也容易受到漫游伙伴自己实施的欺诈。因此,它不适合在Internet上广泛部署[PROXYCHAIN]。Diameter通过明确支持域间漫游和消息路由(第2.7节和第6节)、可审核性[AAACMS]和传输层安全(第13节)功能,解决了这些限制,并提供了安全和可扩展的漫游。
In the decade since AAA protocols were first introduced, the capabilities of Network Access Server (NAS) devices have increased substantially. As a result, while Diameter is a considerably more sophisticated protocol than RADIUS, it remains feasible to implement
自AAA协议首次引入以来的十年中,网络访问服务器(NAS)设备的能力大幅提高。因此,虽然Diameter是一个比RADIUS复杂得多的协议,但它仍然可以实现
within embedded devices, given improvements in processor speeds and the widespread availability of embedded IPsec and TLS implementations.
在嵌入式设备中,考虑到处理器速度的提高以及嵌入式IPsec和TLS实现的广泛可用性。
The Diameter base protocol provides the following facilities:
Diameter base协议提供以下功能:
- Delivery of AVPs (attribute value pairs) - Capabilities negotiation - Error notification - Extensibility, through addition of new commands and AVPs (required in [AAAREQ]). - Basic services necessary for applications, such as handling of user sessions or accounting
- AVP(属性-值对)的交付-功能协商-错误通知-通过添加新命令和AVP(在[AAAREQ]中需要)的可扩展性应用程序所需的基本服务,如处理用户会话或记帐
All data delivered by the protocol is in the form of an AVP. Some of these AVP values are used by the Diameter protocol itself, while others deliver data associated with particular applications that employ Diameter. AVPs may be added arbitrarily to Diameter messages, so long as the required AVPs are included and AVPs that are explicitly excluded are not included. AVPs are used by the base Diameter protocol to support the following required features:
协议提供的所有数据均采用AVP格式。其中一些AVP值由Diameter协议本身使用,而其他值则提供与使用Diameter的特定应用程序相关的数据。可以将AVP任意添加到Diameter消息中,只要包括所需的AVP且不包括明确排除的AVP。基本直径协议使用AVP支持以下所需功能:
- Transporting of user authentication information, for the purposes of enabling the Diameter server to authenticate the user.
- 传输用户身份验证信息,以使Diameter服务器能够对用户进行身份验证。
- Transporting of service specific authorization information, between client and servers, allowing the peers to decide whether a user's access request should be granted.
- 在客户端和服务器之间传输特定于服务的授权信息,允许对等方决定是否应授予用户的访问请求。
- Exchanging resource usage information, which MAY be used for accounting purposes, capacity planning, etc.
- 交换资源使用信息,这些信息可用于记帐、容量规划等。
- Relaying, proxying and redirecting of Diameter messages through a server hierarchy.
- 通过服务器层次结构中继、代理和重定向Diameter消息。
The Diameter base protocol provides the minimum requirements needed for a AAA protocol, as required by [AAAREQ]. The base protocol may be used by itself for accounting purposes only, or it may be used with a Diameter application, such as Mobile IPv4 [DIAMMIP], or network access [NASREQ]. It is also possible for the base protocol to be extended for use in new applications, via the addition of new commands or AVPs. At this time the focus of Diameter is network access and accounting applications. A truly generic AAA protocol used by many applications might provide functionality not provided by Diameter. Therefore, it is imperative that the designers of new applications understand their requirements before using Diameter.
Diameter基本协议按照[AAAREQ]的要求提供AAA协议所需的最低要求。基本协议可以仅用于记帐目的,也可以与Diameter应用程序一起使用,例如移动IPv4[DIAMMIP]或网络访问[NASREQ]。还可以通过添加新命令或AVP来扩展基本协议,以便在新的应用程序中使用。此时,Diameter的重点是网络接入和计费应用。许多应用程序使用的真正通用的AAA协议可能提供Diameter未提供的功能。因此,在使用直径之前,新应用程序的设计者必须了解其要求。
See Section 2.4 for more information on Diameter applications.
有关直径应用的更多信息,请参见第2.4节。
Any node can initiate a request. In that sense, Diameter is a peer-to-peer protocol. In this document, a Diameter Client is a device at the edge of the network that performs access control, such as a Network Access Server (NAS) or a Foreign Agent (FA). A Diameter client generates Diameter messages to request authentication, authorization, and accounting services for the user. A Diameter agent is a node that does not authenticate and/or authorize messages locally; agents include proxies, redirects and relay agents. A Diameter server performs authentication and/or authorization of the user. A Diameter node MAY act as an agent for certain requests while acting as a server for others.
任何节点都可以发起请求。从这个意义上讲,Diameter是一种对等协议。在本文档中,Diameter客户端是网络边缘执行访问控制的设备,如网络访问服务器(NAS)或外部代理(FA)。Diameter客户端生成Diameter消息以请求用户的身份验证、授权和记帐服务。Diameter代理是不在本地对消息进行身份验证和/或授权的节点;代理包括代理、重定向和中继代理。Diameter服务器执行用户的身份验证和/或授权。Diameter节点可以充当某些请求的代理,同时充当其他请求的服务器。
The Diameter protocol also supports server-initiated messages, such as a request to abort service to a particular user.
Diameter协议还支持服务器启动的消息,例如向特定用户请求中止服务。
Currently, the Diameter specification consists of a base specification (this document), Transport Profile [AAATRANS] and applications: Mobile IPv4 [DIAMMIP], and NASREQ [NASREQ].
目前,Diameter规范包括基本规范(本文档)、传输配置文件[AAATRANS]和应用程序:移动IPv4[DIAMMIP]和NASREQ[NASREQ]。
The Transport Profile document [AAATRANS] discusses transport layer issues that arise with AAA protocols and recommendations on how to overcome these issues. This document also defines the Diameter failover algorithm and state machine.
传输配置文件文档[AAATRANS]讨论了AAA协议中出现的传输层问题,并就如何克服这些问题提出了建议。本文档还定义了Diameter故障切换算法和状态机。
The Mobile IPv4 [DIAMMIP] application defines a Diameter application that allows a Diameter server to perform AAA functions for Mobile IPv4 services to a mobile node.
移动IPv4[DIAMMIP]应用程序定义了一个Diameter应用程序,该应用程序允许Diameter服务器为移动节点的移动IPv4服务执行AAA功能。
The NASREQ [NASREQ] application defines a Diameter Application that allows a Diameter server to be used in a PPP/SLIP Dial-Up and Terminal Server Access environment. Consideration was given for servers that need to perform protocol conversion between Diameter and RADIUS.
NASREQ[NASREQ]应用程序定义了一个Diameter应用程序,该应用程序允许在PPP/SLIP拨号和终端服务器访问环境中使用Diameter服务器。考虑了需要在Diameter和RADIUS之间执行协议转换的服务器。
In summary, this document defines the base protocol specification for AAA, which includes support for accounting. The Mobile IPv4 and the NASREQ documents describe applications that use this base specification for Authentication, Authorization and Accounting.
总之,本文档定义了AAA的基本协议规范,其中包括对记帐的支持。移动IPv4和NASREQ文档描述了使用此基本规范进行身份验证、授权和记帐的应用程序。
The Diameter protocol is designed to be extensible, using several mechanisms, including:
Diameter协议设计为可扩展,使用了多种机制,包括:
- Defining new AVP values - Creating new AVPs - Creating new authentication/authorization applications - Creating new accounting applications - Application authentication procedures
- 定义新的AVP值-创建新的AVP-创建新的身份验证/授权应用程序-创建新的会计应用程序-应用程序身份验证程序
Reuse of existing AVP values, AVPs and Diameter applications are strongly recommended. Reuse simplifies standardization and implementation and avoids potential interoperability issues. It is expected that command codes are reused; new command codes can only be created by IETF Consensus (see Section 11.2.1).
强烈建议重用现有的AVP值、AVP和直径应用。重用简化了标准化和实现,避免了潜在的互操作性问题。预期可重复使用命令代码;新的命令代码只能由IETF协商一致创建(见第11.2.1节)。
New applications should attempt to reuse AVPs defined in existing applications when possible, as opposed to creating new AVPs. For AVPs of type Enumerated, an application may require a new value to communicate some service-specific information.
新应用程序应尽可能重用现有应用程序中定义的AVP,而不是创建新的AVP。对于枚举类型的AVP,应用程序可能需要一个新值来传递某些特定于服务的信息。
In order to allocate a new AVP value, a request MUST be sent to IANA [IANA], along with an explanation of the new AVP value. IANA considerations for Diameter are discussed in Section 11.
为了分配一个新的AVP值,必须向IANA[IANA]发送一个请求,并说明新的AVP值。第11节讨论了IANA对直径的考虑。
When no existing AVP can be used, a new AVP should be created. The new AVP being defined MUST use one of the data types listed in Section 4.2.
当无法使用现有AVP时,应创建新的AVP。定义的新AVP必须使用第4.2节中列出的数据类型之一。
In the event that a logical grouping of AVPs is necessary, and multiple "groups" are possible in a given command, it is recommended that a Grouped AVP be used (see Section 4.4).
如果需要对AVP进行逻辑分组,并且给定命令中可能存在多个“组”,建议使用分组AVP(见第4.4节)。
In order to create a new AVP, a request MUST be sent to IANA, with a specification for the AVP. The request MUST include the commands that would make use of the AVP.
为了创建一个新的AVP,必须向IANA发送一个带有AVP规范的请求。请求必须包括将使用AVP的命令。
Every Diameter application specification MUST have an IANA assigned Application Identifier (see Section 2.4) or a vendor specific Application Identifier.
每个Diameter应用规范必须具有IANA指定的应用标识符(见第2.4节)或供应商特定的应用标识符。
Should a new Diameter usage scenario find itself unable to fit within an existing application without requiring major changes to the specification, it may be desirable to create a new Diameter application. Major changes to an application include:
如果新的Diameter使用场景发现自己无法在不需要对规范进行重大更改的情况下适应现有应用程序,则可能需要创建新的Diameter应用程序。对应用程序的主要更改包括:
- Adding new AVPs to the command, which have the "M" bit set.
- 向命令中添加新的AVP,设置了“M”位。
- Requiring a command that has a different number of round trips to satisfy a request (e.g., application foo has a command that requires one round trip, but new application bar has a command that requires two round trips to complete).
- 需要具有不同往返次数的命令来满足请求(例如,应用程序foo有一个需要一次往返的命令,但新的应用程序栏有一个需要两次往返才能完成的命令)。
- Adding support for an authentication method requiring definition of new AVPs for use with the application. Since a new EAP authentication method can be supported within Diameter without requiring new AVPs, addition of EAP methods does not require the creation of a new authentication application.
- 添加对身份验证方法的支持,该方法要求定义新的AVP以与应用程序一起使用。由于新的EAP身份验证方法可以在直径范围内得到支持,而不需要新的AVP,因此添加EAP方法不需要创建新的身份验证应用程序。
Creation of a new application should be viewed as a last resort. An implementation MAY add arbitrary non-mandatory AVPs to any command defined in an application, including vendor-specific AVPs without needing to define a new application. Please refer to Section 11.1.1 for details.
应将创建新应用程序视为最后手段。实现可以将任意非强制性AVP添加到应用程序中定义的任何命令中,包括特定于供应商的AVP,而无需定义新的应用程序。详情请参考第11.1.1节。
In order to justify allocation of a new application identifier, Diameter applications MUST define one Command Code, or add new mandatory AVPs to the ABNF.
为了证明分配新应用程序标识符的合理性,Diameter应用程序必须定义一个命令代码,或向ABNF添加新的强制AVP。
The expected AVPs MUST be defined in an ABNF [ABNF] grammar (see Section 3.2). If the Diameter application has accounting requirements, it MUST also specify the AVPs that are to be present in the Diameter Accounting messages (see Section 9.3). However, just because a new authentication application id is required, does not imply that a new accounting application id is required.
预期的AVP必须在ABNF[ABNF]语法中定义(见第3.2节)。如果Diameter应用程序有记帐要求,它还必须指定Diameter记帐消息中要出现的AVP(参见第9.3节)。但是,仅仅因为需要新的身份验证应用程序id,并不意味着需要新的记帐应用程序id。
When possible, a new Diameter application SHOULD reuse existing Diameter AVPs, in order to avoid defining multiple AVPs that carry similar information.
如果可能,新的Diameter应用程序应该重用现有的Diameter AVP,以避免定义多个携带类似信息的AVP。
There are services that only require Diameter accounting. Such services need to define the AVPs carried in the Accounting-Request (ACR)/ Accounting-Answer (ACA) messages, but do not need to define new command codes. An implementation MAY add arbitrary non-mandatory AVPs (AVPs with the "M" bit not set) to any command defined in an
有些服务只需要直径计算。此类服务需要定义会计请求(ACR)/会计应答(ACA)消息中携带的AVP,但不需要定义新的命令代码。实现可以将任意非强制性AVP(未设置“M”位的AVP)添加到
application, including vendor-specific AVPs, without needing to define a new accounting application. Please refer to Section 11.1.1 for details.
应用程序,包括特定于供应商的AVP,无需定义新的会计应用程序。详情请参考第11.1.1节。
Application Identifiers are still required for Diameter capability exchange. Every Diameter accounting application specification MUST have an IANA assigned Application Identifier (see Section 2.4) or a vendor specific Application Identifier.
Diameter功能交换仍然需要应用程序标识符。每个Diameter会计应用程序规范必须具有IANA分配的应用程序标识符(见第2.4节)或供应商特定的应用程序标识符。
Every Diameter implementation MUST support accounting. Basic accounting support is sufficient to handle any application that uses the ACR/ACA commands defined in this document, as long as no new mandatory AVPs are added. A mandatory AVP is defined as one which has the "M" bit set when sent within an accounting command, regardless of whether it is required or optional within the ABNF for the accounting application.
每个Diameter实现都必须支持记帐。只要未添加新的强制AVP,基本会计支持足以处理使用本文档中定义的ACR/ACA命令的任何应用程序。强制AVP被定义为在记帐命令中发送时设置了“M”位的AVP,无论它在ABNF中是记帐应用程序所必需的还是可选的。
The creation of a new accounting application should be viewed as a last resort and MUST NOT be used unless a new command or additional mechanisms (e.g., application defined state machine) is defined within the application, or new mandatory AVPs are added to the ABNF.
创建新的会计应用程序应视为最后手段,除非在应用程序中定义了新的命令或其他机制(例如,应用程序定义的状态机),或者在ABNF中添加了新的强制性AVP,否则不得使用。
Within an accounting command, setting the "M" bit implies that a backend server (e.g., billing server) or the accounting server itself MUST understand the AVP in order to compute a correct bill. If the AVP is not relevant to the billing process, when the AVP is included within an accounting command, it MUST NOT have the "M" bit set, even if the "M" bit is set when the same AVP is used within other Diameter commands (i.e., authentication/authorization commands).
在记帐命令中,设置“M”位意味着后端服务器(例如计费服务器)或记帐服务器本身必须理解AVP才能计算正确的账单。如果AVP与计费流程无关,则当AVP包含在记帐命令中时,它不得设置“M”位,即使在其他Diameter命令(即认证/授权命令)中使用相同AVP时设置了“M”位。
A DIAMETER base accounting implementation MUST be configurable to advertise supported accounting applications in order to prevent the accounting server from accepting accounting requests for unbillable services. The combination of the home domain and the accounting application Id can be used in order to route the request to the appropriate accounting server.
DIAMETER基础记帐实现必须可配置为公布受支持的记帐应用程序,以防止记帐服务器接受不可更改服务的记帐请求。可以使用主域和记帐应用程序Id的组合将请求路由到适当的记帐服务器。
When possible, a new Diameter accounting application SHOULD attempt to reuse existing AVPs, in order to avoid defining multiple AVPs that carry similar information.
如果可能,新的Diameter accounting应用程序应尝试重用现有AVP,以避免定义多个携带类似信息的AVP。
If the base accounting is used without any mandatory AVPs, new commands or additional mechanisms (e.g., application defined state machine), then the base protocol defined standard accounting application Id (Section 2.4) MUST be used in ACR/ACA commands.
如果使用基本记帐时没有任何强制AVP、新命令或附加机制(例如,应用程序定义的状态机),则必须在ACR/ACA命令中使用基本协议定义的标准记帐应用程序Id(第2.4节)。
When possible, applications SHOULD be designed such that new authentication methods MAY be added without requiring changes to the application. This MAY require that new AVP values be assigned to represent the new authentication transform, or any other scheme that produces similar results. When possible, authentication frameworks, such as Extensible Authentication Protocol [EAP], SHOULD be used.
如果可能,应用程序的设计应确保可以添加新的身份验证方法,而无需更改应用程序。这可能需要分配新的AVP值来表示新的身份验证转换,或产生类似结果的任何其他方案。如果可能,应使用可扩展身份验证协议[EAP]等身份验证框架。
AAA Authentication, Authorization and Accounting.
AAA认证、授权和记帐。
Accounting The act of collecting information on resource usage for the purpose of capacity planning, auditing, billing or cost allocation.
为容量规划、审计、计费或成本分配收集资源使用信息的行为。
Accounting Record An accounting record represents a summary of the resource consumption of a user over the entire session. Accounting servers creating the accounting record may do so by processing interim accounting events or accounting events from several devices serving the same user.
记帐记录记帐记录表示用户在整个会话中的资源消耗汇总。创建记帐记录的记帐服务器可以通过处理临时记帐事件或来自为同一用户服务的多个设备的记帐事件来实现。
Authentication The act of verifying the identity of an entity (subject).
验证验证实体(主体)身份的行为。
Authorization The act of determining whether a requesting entity (subject) will be allowed access to a resource (object).
授权确定是否允许请求实体(主体)访问资源(对象)的行为。
AVP The Diameter protocol consists of a header followed by one or more Attribute-Value-Pairs (AVPs). An AVP includes a header and is used to encapsulate protocol-specific data (e.g., routing information) as well as authentication, authorization or accounting information.
AVP Diameter协议由一个标头和一个或多个属性值对(AVP)组成。AVP包括报头,用于封装协议特定数据(例如,路由信息)以及认证、授权或记帐信息。
Broker A broker is a business term commonly used in AAA infrastructures. A broker is either a relay, proxy or redirect agent, and MAY be operated by roaming consortiums. Depending on the business model, a broker may either choose to deploy relay agents or proxy agents.
经纪人经纪人是AAA基础设施中常用的商业术语。代理是中继、代理或重定向代理,可以由漫游联盟操作。根据业务模型,代理可以选择部署中继代理或代理代理。
Diameter Agent A Diameter Agent is a Diameter node that provides either relay, proxy, redirect or translation services.
Diameter代理Diameter代理是提供中继、代理、重定向或转换服务的Diameter节点。
Diameter Client A Diameter Client is a device at the edge of the network that performs access control. An example of a Diameter client is a Network Access Server (NAS) or a Foreign Agent (FA).
Diameter客户端Diameter客户端是网络边缘执行访问控制的设备。Diameter客户端的一个示例是网络访问服务器(NAS)或外部代理(FA)。
Diameter Node A Diameter node is a host process that implements the Diameter protocol, and acts either as a Client, Agent or Server.
Diameter节点Diameter节点是实现Diameter协议的主机进程,充当客户机、代理或服务器。
Diameter Peer A Diameter Peer is a Diameter Node to which a given Diameter Node has a direct transport connection.
Diameter Peer Diameter Peer是一个Diameter节点,给定的Diameter节点与之有直接传输连接。
Diameter Security Exchange A Diameter Security Exchange is a process through which two Diameter nodes establish end-to-end security.
Diameter安全交换Diameter安全交换是两个Diameter节点建立端到端安全性的过程。
Diameter Server A Diameter Server is one that handles authentication, authorization and accounting requests for a particular realm. By its very nature, a Diameter Server MUST support Diameter applications in addition to the base protocol.
Diameter服务器Diameter服务器是处理特定领域的身份验证、授权和记帐请求的服务器。就其本质而言,Diameter服务器必须支持基本协议之外的Diameter应用程序。
Downstream Downstream is used to identify the direction of a particular Diameter message from the home server towards the access device.
下行-下行用于识别从家庭服务器到接入设备的特定直径消息的方向。
End-to-End Security TLS and IPsec provide hop-by-hop security, or security across a transport connection. When relays or proxy are involved, this hop-by-hop security does not protect the entire Diameter user session. End-to-end security is security between two Diameter nodes, possibly communicating through Diameter Agents. This security protects the entire Diameter communications path from the originating Diameter node to the terminating Diameter node.
端到端安全TLS和IPsec提供逐跳安全性,或者跨传输连接提供安全性。当涉及中继或代理时,这种逐跳安全性不会保护整个Diameter用户会话。端到端安全性是两个Diameter节点之间的安全性,可能通过Diameter代理进行通信。此安全性保护从发起Diameter节点到终止Diameter节点的整个Diameter通信路径。
Home Realm A Home Realm is the administrative domain with which the user maintains an account relationship.
主域主域是用户与之保持帐户关系的管理域。
Home Server See Diameter Server.
家庭服务器请参阅Diameter服务器。
Interim accounting An interim accounting message provides a snapshot of usage during a user's session. It is typically implemented in order to provide for partial accounting of a user's session in the case of a device reboot or other network problem prevents the reception of a session summary message or session record.
临时记帐临时记帐消息提供用户会话期间使用情况的快照。它通常是为了在设备重新启动或其他网络问题阻止接收会话摘要消息或会话记录的情况下提供用户会话的部分记帐而实现的。
Local Realm A local realm is the administrative domain providing services to a user. An administrative domain MAY act as a local realm for certain users, while being a home realm for others.
本地域本地域是向用户提供服务的管理域。管理域可以作为某些用户的本地域,而作为其他用户的主域。
Multi-session A multi-session represents a logical linking of several sessions. Multi-sessions are tracked by using the Acct-Multi-Session-Id. An example of a multi-session would be a Multi-link PPP bundle. Each leg of the bundle would be a session while the entire bundle would be a multi-session.
多会话多会话表示多个会话的逻辑链接。使用Acct-Multi-Session-Id跟踪多个会话。多会话的一个示例是多链路PPP捆绑包。捆绑包的每个分支将是一个会话,而整个捆绑包将是一个多会话。
Network Access Identifier The Network Access Identifier, or NAI [NAI], is used in the Diameter protocol to extract a user's identity and realm. The identity is used to identify the user during authentication and/or authorization, while the realm is used for message routing purposes.
网络访问标识符网络访问标识符或NAI[NAI]在Diameter协议中用于提取用户的身份和领域。身份用于在身份验证和/或授权期间标识用户,而域用于消息路由目的。
Proxy Agent or Proxy In addition to forwarding requests and responses, proxies make policy decisions relating to resource usage and provisioning. This is typically accomplished by tracking the state of NAS devices. While proxies typically do not respond to client Requests prior to receiving a Response from the server, they may originate Reject messages in cases where policies are violated. As a result, proxies need to understand the semantics of the messages passing through them, and may not support all Diameter applications.
代理或代理除了转发请求和响应外,代理还做出与资源使用和供应相关的策略决策。这通常通过跟踪NAS设备的状态来实现。虽然代理通常在从服务器接收响应之前不响应客户端请求,但在违反策略的情况下,它们可能会发出拒绝消息。因此,代理需要理解通过它们传递的消息的语义,并且可能不支持所有Diameter应用程序。
Realm The string in the NAI that immediately follows the '@' character. NAI realm names are required to be unique, and are piggybacked on the administration of the DNS namespace. Diameter makes use of the realm, also loosely referred to as domain, to determine whether messages can be satisfied locally, or whether they must be routed or redirected. In RADIUS, realm names are not necessarily piggybacked on the DNS namespace but may be independent of it.
领域NAI中紧跟“@”字符的字符串。NAI领域名称必须是唯一的,并且由DNS名称空间的管理提供支持。Diameter利用领域(也称为域)来确定消息是否可以在本地得到满足,或者它们是否必须路由或重定向。在RADIUS中,域名不一定是DNS名称空间上的载体,但可能独立于DNS名称空间。
Real-time Accounting Real-time accounting involves the processing of information on resource usage within a defined time window. Time constraints are typically imposed in order to limit financial risk.
实时会计实时会计包括在规定的时间窗口内处理有关资源使用情况的信息。时间限制通常是为了限制金融风险。
Relay Agent or Relay Relays forward requests and responses based on routing-related AVPs and realm routing table entries. Since relays do not make policy decisions, they do not examine or alter non-routing AVPs. As a result, relays never originate messages, do not need to understand the semantics of messages or non-routing AVPs, and are capable of handling any Diameter application or message type. Since relays make decisions based on information in routing AVPs and realm forwarding tables they do not keep state on NAS resource usage or sessions in progress.
中继代理或中继根据路由相关的AVP和领域路由表条目转发请求和响应。由于中继器不会做出策略决策,因此它们不会检查或更改非路由AVP。因此,中继从不发起消息,不需要理解消息或非路由AVP的语义,并且能够处理任何Diameter应用程序或消息类型。由于中继根据路由AVP和领域转发表中的信息做出决策,因此它们不保持NAS资源使用或正在进行的会话的状态。
Redirect Agent Rather than forwarding requests and responses between clients and servers, redirect agents refer clients to servers and allow them to communicate directly. Since redirect agents do not sit in the forwarding path, they do not alter any AVPs transiting between client and server. Redirect agents do not originate messages and are capable of handling any message type, although they may be configured only to redirect messages of certain types, while acting as relay or proxy agents for other types. As with proxy agents, redirect agents do not keep state with respect to sessions or NAS resources.
重定向代理不是在客户端和服务器之间转发请求和响应,而是将客户端引用到服务器并允许它们直接通信。由于重定向代理不位于转发路径中,因此它们不会更改在客户端和服务器之间传输的任何AVP。重定向代理不发起消息,并且能够处理任何消息类型,尽管它们可能仅配置为重定向某些类型的消息,同时充当其他类型的中继或代理。与代理一样,重定向代理不保持会话或NAS资源的状态。
Roaming Relationships Roaming relationships include relationships between companies and ISPs, relationships among peer ISPs within a roaming consortium, and relationships between an ISP and a roaming consortium.
漫游关系漫游关系包括公司与ISP之间的关系、漫游联盟内对等ISP之间的关系以及ISP与漫游联盟之间的关系。
Security Association A security association is an association between two endpoints in a Diameter session which allows the endpoints to communicate with integrity and confidentially, even in the presence of relays and/or proxies.
安全关联安全关联是Diameter会话中两个端点之间的关联,允许端点以完整和保密的方式进行通信,即使在存在中继和/或代理的情况下也是如此。
Session A session is a related progression of events devoted to a particular activity. Each application SHOULD provide guidelines as to when a session begins and ends. All Diameter packets with the same Session-Identifier are considered to be part of the same session.
会话会话是专门用于特定活动的事件的相关进展。每个应用程序都应该提供会话开始和结束的指导原则。具有相同会话标识符的所有Diameter数据包都被视为同一会话的一部分。
Session state A stateful agent is one that maintains session state information, by keeping track of all authorized active sessions. Each authorized session is bound to a particular service, and its state is considered active either until it is notified otherwise, or by expiration.
会话状态有状态代理通过跟踪所有授权的活动会话来维护会话状态信息。每个授权会话都绑定到一个特定的服务,其状态被认为是活动的,直到另行通知为止,或者在到期之前。
Sub-session A sub-session represents a distinct service (e.g., QoS or data characteristics) provided to a given session. These services may happen concurrently (e.g., simultaneous voice and data transfer during the same session) or serially. These changes in sessions are tracked with the Accounting-Sub-Session-Id.
子会话子会话表示提供给给定会话的不同服务(例如,QoS或数据特征)。这些服务可以同时发生(例如,在同一会话期间同时进行语音和数据传输)或连续发生。会话中的这些更改通过Accounting-Sub-Session-Id进行跟踪。
Transaction state The Diameter protocol requires that agents maintain transaction state, which is used for failover purposes. Transaction state implies that upon forwarding a request, the Hop-by-Hop identifier is saved; the field is replaced with a locally unique identifier, which is restored to its original value when the corresponding answer is received. The request's state is released upon receipt of the answer. A stateless agent is one that only maintains transaction state.
事务状态Diameter协议要求代理维护用于故障切换目的的事务状态。事务状态意味着在转发请求时,逐跳标识符被保存;该字段将替换为本地唯一标识符,当收到相应的答案时,该标识符将恢复为其原始值。请求的状态在收到答复后即被释放。无状态代理是只维护事务状态的代理。
Translation Agent A translation agent is a stateful Diameter node that performs protocol translation between Diameter and another AAA protocol, such as RADIUS.
翻译代理翻译代理是一个有状态的Diameter节点,它在Diameter和另一个AAA协议(如RADIUS)之间执行协议转换。
Transport Connection A transport connection is a TCP or SCTP connection existing directly between two Diameter peers, otherwise known as a Peer-to-Peer Connection.
传输连接传输连接是直接存在于两个Diameter对等点之间的TCP或SCTP连接,也称为对等连接。
Upstream Upstream is used to identify the direction of a particular Diameter message from the access device towards the home server.
上游用于识别从接入设备到家庭服务器的特定直径消息的方向。
User The entity requesting or using some resource, in support of which a Diameter client has generated a request.
用户请求或使用某个资源的实体,Diameter客户端已为其生成请求。
The base Diameter protocol may be used by itself for accounting applications, but for use in authentication and authorization it is always extended for a particular application. Two Diameter applications are defined by companion documents: NASREQ [NASREQ],
base Diameter协议本身可用于记帐应用程序,但用于身份验证和授权时,它总是针对特定应用程序进行扩展。两个直径应用由配套文件定义:NASREQ[NASREQ],
Mobile IPv4 [DIAMMIP]. These applications are introduced in this document but specified elsewhere. Additional Diameter applications MAY be defined in the future (see Section 11.3).
移动IPv4[DIAMMIP]。本文件介绍了这些应用程序,但在其他地方有详细说明。将来可能会定义其他直径应用(见第11.3节)。
Diameter Clients MUST support the base protocol, which includes accounting. In addition, they MUST fully support each Diameter application that is needed to implement the client's service, e.g., NASREQ and/or Mobile IPv4. A Diameter Client that does not support both NASREQ and Mobile IPv4, MUST be referred to as "Diameter X Client" where X is the application which it supports, and not a "Diameter Client".
Diameter客户端必须支持基本协议,其中包括记帐。此外,它们必须完全支持实现客户端服务所需的每个Diameter应用程序,例如NASREQ和/或移动IPv4。不支持NASREQ和移动IPv4的Diameter客户端必须称为“Diameter X客户端”,其中X是它支持的应用程序,而不是“Diameter客户端”。
Diameter Servers MUST support the base protocol, which includes accounting. In addition, they MUST fully support each Diameter application that is needed to implement the intended service, e.g., NASREQ and/or Mobile IPv4. A Diameter Server that does not support both NASREQ and Mobile IPv4, MUST be referred to as "Diameter X Server" where X is the application which it supports, and not a "Diameter Server".
Diameter服务器必须支持基本协议,其中包括记帐。此外,它们必须完全支持实现预期服务所需的每个Diameter应用程序,例如NASREQ和/或移动IPv4。不同时支持NASREQ和移动IPv4的Diameter服务器必须称为“Diameter X服务器”,其中X是其支持的应用程序,而不是“Diameter服务器”。
Diameter Relays and redirect agents are, by definition, protocol transparent, and MUST transparently support the Diameter base protocol, which includes accounting, and all Diameter applications.
根据定义,Diameter中继和重定向代理是协议透明的,并且必须透明地支持Diameter基本协议(包括记帐)和所有Diameter应用程序。
Diameter proxies MUST support the base protocol, which includes accounting. In addition, they MUST fully support each Diameter application that is needed to implement proxied services, e.g., NASREQ and/or Mobile IPv4. A Diameter proxy which does not support also both NASREQ and Mobile IPv4, MUST be referred to as "Diameter X Proxy" where X is the application which it supports, and not a "Diameter Proxy".
Diameter代理必须支持基本协议,其中包括记帐。此外,它们必须完全支持实现代理服务(例如NASREQ和/或移动IPv4)所需的每个Diameter应用程序。不同时支持NASREQ和移动IPv4的Diameter代理必须称为“Diameter X代理”,其中X是其支持的应用程序,而不是“Diameter代理”。
The base Diameter protocol concerns itself with capabilities negotiation, how messages are sent and how peers may eventually be abandoned. The base protocol also defines certain rules that apply to all exchanges of messages between Diameter nodes.
base Diameter协议关注的是功能协商、消息如何发送以及最终如何放弃对等点。基本协议还定义了适用于Diameter节点之间所有消息交换的特定规则。
Communication between Diameter peers begins with one peer sending a message to another Diameter peer. The set of AVPs included in the message is determined by a particular Diameter application. One AVP that is included to reference a user's session is the Session-Id.
Diameter对等点之间的通信始于一个对等点向另一个Diameter对等点发送消息。消息中包含的AVP集由特定直径应用程序确定。一个用于引用用户会话的AVP是session-Id。
The initial request for authentication and/or authorization of a user would include the Session-Id. The Session-Id is then used in all subsequent messages to identify the user's session (see Section 8 for more information). The communicating party may accept the request, or reject it by returning an answer message with the Result-Code AVP
用户身份验证和/或授权的初始请求将包括会话Id。然后在所有后续消息中使用会话Id来标识用户的会话(有关更多信息,请参阅第8节)。通信方可以接受请求,也可以通过返回带有结果代码AVP的应答消息来拒绝请求
set to indicate an error occurred. The specific behavior of the Diameter server or client receiving a request depends on the Diameter application employed.
设置以指示发生错误。接收请求的Diameter服务器或客户端的特定行为取决于所使用的Diameter应用程序。
Session state (associated with a Session-Id) MUST be freed upon receipt of the Session-Termination-Request, Session-Termination-Answer, expiration of authorized service time in the Session-Timeout AVP, and according to rules established in a particular Diameter application.
会话状态(与会话Id关联)必须在收到会话终止请求、会话终止应答、会话超时AVP中的授权服务时间到期后,根据特定Diameter应用程序中建立的规则释放。
Transport profile is defined in [AAATRANS].
传输配置文件在[AAATRANS]中定义。
The base Diameter protocol is run on port 3868 of both TCP [TCP] and SCTP [SCTP] transport protocols.
基本直径协议在TCP[TCP]和SCTP[SCTP]传输协议的端口3868上运行。
Diameter clients MUST support either TCP or SCTP, while agents and servers MUST support both. Future versions of this specification MAY mandate that clients support SCTP.
Diameter客户端必须支持TCP或SCTP,而代理和服务器必须同时支持两者。本规范的未来版本可能要求客户端支持SCTP。
A Diameter node MAY initiate connections from a source port other than the one that it declares it accepts incoming connections on, and MUST be prepared to receive connections on port 3868. A given Diameter instance of the peer state machine MUST NOT use more than one transport connection to communicate with a given peer, unless multiple instances exist on the peer in which case a separate connection per process is allowed.
Diameter节点可以从源端口启动连接,而不是从它声明接受传入连接的端口,并且必须准备好在端口3868上接收连接。对等状态机的给定Diameter实例不得使用多个传输连接与给定对等进行通信,除非对等上存在多个实例,在这种情况下,允许每个进程单独连接。
When no transport connection exists with a peer, an attempt to connect SHOULD be periodically made. This behavior is handled via the Tc timer, whose recommended value is 30 seconds. There are certain exceptions to this rule, such as when a peer has terminated the transport connection stating that it does not wish to communicate.
当不存在与对等方的传输连接时,应定期尝试连接。此行为通过Tc计时器处理,其建议值为30秒。此规则存在某些例外情况,例如当对等方终止传输连接并声明不希望通信时。
When connecting to a peer and either zero or more transports are specified, SCTP SHOULD be tried first, followed by TCP. See Section 5.2 for more information on peer discovery.
当连接到对等方并且指定了零个或多个传输时,应首先尝试SCTP,然后是TCP。有关对等发现的更多信息,请参见第5.2节。
Diameter implementations SHOULD be able to interpret ICMP protocol port unreachable messages as explicit indications that the server is not reachable, subject to security policy on trusting such messages. Diameter implementations SHOULD also be able to interpret a reset from the transport and timed-out connection attempts.
Diameter实现应能够将ICMP协议端口不可访问消息解释为服务器不可访问的明确指示,并遵守信任此类消息的安全策略。Diameter实现还应该能够解释来自传输的重置和超时连接尝试。
If Diameter receives data up from TCP that cannot be parsed or identified as a Diameter error made by the peer, the stream is compromised and cannot be recovered. The transport connection MUST be closed using a RESET call (send a TCP RST bit) or an SCTP ABORT message (graceful closure is compromised).
如果Diameter从TCP接收到无法解析或识别为对等方造成的Diameter错误的数据,则流将受到破坏,无法恢复。必须使用重置调用(发送TCP RST位)或SCTP中止消息关闭传输连接(正常关闭受到损害)。
The following are guidelines for Diameter implementations that support SCTP:
以下是支持SCTP的Diameter实施指南:
1. For interoperability: All Diameter nodes MUST be prepared to receive Diameter messages on any SCTP stream in the association.
1. 对于互操作性:所有Diameter节点必须准备好在关联中的任何SCTP流上接收Diameter消息。
2. To prevent blocking: All Diameter nodes SHOULD utilize all SCTP streams available to the association to prevent head-of-the-line blocking.
2. 为防止阻塞:所有Diameter节点应利用关联可用的所有SCTP流,以防止线路阻塞。
Diameter clients, such as Network Access Servers (NASes) and Mobility Agents MUST support IP Security [SECARCH], and MAY support TLS [TLS]. Diameter servers MUST support TLS and IPsec. The Diameter protocol MUST NOT be used without any security mechanism (TLS or IPsec).
Diameter客户端,如网络访问服务器(NASE)和移动代理必须支持IP安全[SECARCH],并且可能支持TLS[TLS]。Diameter服务器必须支持TLS和IPsec。在没有任何安全机制(TLS或IPsec)的情况下,不得使用Diameter协议。
It is suggested that IPsec can be used primarily at the edges and in intra-domain traffic, such as using pre-shared keys between a NAS a local AAA proxy. This also eases the requirements on the NAS to support certificates. It is also suggested that inter-domain traffic would primarily use TLS. See Sections 13.1 and 13.2 for more details on IPsec and TLS usage.
建议IPsec主要用于边缘和域内流量,例如在NAS和本地AAA代理之间使用预共享密钥。这也简化了NAS支持证书的要求。还建议域间通信主要使用TLS。有关IPsec和TLS使用的更多详细信息,请参见第13.1节和第13.2节。
Application Identifiers are advertised during the capabilities exchange phase (see Section 5.3). For a given application, advertising support of an application implies that the sender supports all command codes, and the AVPs specified in the associated ABNFs, described in the specification.
在能力交换阶段公布应用程序标识符(见第5.3节)。对于给定的应用程序,应用程序的广告支持意味着发送方支持规范中描述的所有命令代码和相关ABNFs中指定的AVP。
An implementation MAY add arbitrary non-mandatory AVPs to any command defined in an application, including vendor-specific AVPs. Please refer to Section 11.1.1 for details.
实现可以将任意非强制性AVP添加到应用程序中定义的任何命令中,包括特定于供应商的AVP。详情请参考第11.1.1节。
Each Diameter application MUST have an IANA assigned Application Identifier (see Section 11.3). The base protocol does not require an Application Identifier since its support is mandatory. During the capabilities exchange, Diameter nodes inform their peers of locally supported applications. Furthermore, all Diameter messages contain an Application Identifier, which is used in the message forwarding process.
每个Diameter应用程序必须具有IANA分配的应用程序标识符(见第11.3节)。基本协议不需要应用程序标识符,因为它的支持是强制性的。在功能交换期间,Diameter节点将本地支持的应用程序通知其对等方。此外,所有Diameter消息都包含一个应用程序标识符,用于消息转发过程。
The following Application Identifier values are defined:
定义了以下应用程序标识符值:
Diameter Common Messages 0 NASREQ 1 [NASREQ] Mobile-IP 2 [DIAMMIP] Diameter Base Accounting 3 Relay 0xffffffff
Diameter公用消息0 NASREQ 1[NASREQ]移动IP 2[DIAMMIP]Diameter基本计费3中继0xFFFFFF
Relay and redirect agents MUST advertise the Relay Application Identifier, while all other Diameter nodes MUST advertise locally supported applications. The receiver of a Capabilities Exchange message advertising Relay service MUST assume that the sender supports all current and future applications.
中继和重定向代理必须播发中继应用程序标识符,而所有其他Diameter节点必须播发本地支持的应用程序。功能交换消息广告中继服务的接收方必须假定发送方支持所有当前和未来的应用程序。
Diameter relay and proxy agents are responsible for finding an upstream server that supports the application of a particular message. If none can be found, an error message is returned with the Result-Code AVP set to DIAMETER_UNABLE_TO_DELIVER.
Diameter中继和代理负责查找支持特定消息应用程序的上游服务器。如果找不到,则返回一条错误消息,结果代码AVP设置为DIAMETER\u UNABLE\u to\u DELIVER。
This section attempts to provide the reader with an understanding of the difference between connection and session, which are terms used extensively throughout this document.
本节试图让读者了解连接和会话之间的区别,这是本文档中广泛使用的术语。
A connection is a transport level connection between two peers, used to send and receive Diameter messages. A session is a logical concept at the application layer, and is shared between an access device and a server, and is identified via the Session-Id AVP
连接是两个对等方之间的传输级连接,用于发送和接收Diameter消息。会话是应用层的逻辑概念,在访问设备和服务器之间共享,并通过会话Id AVP进行标识
+--------+ +-------+ +--------+ | Client | | Relay | | Server | +--------+ +-------+ +--------+ <----------> <----------> peer connection A peer connection B
+--------+ +-------+ +--------+ | Client | | Relay | | Server | +--------+ +-------+ +--------+ <----------> <----------> peer connection A peer connection B
<-----------------------------> User session x
<-----------------------------> User session x
Figure 1: Diameter connections and sessions
图1:直径连接和会话
In the example provided in Figure 1, peer connection A is established between the Client and its local Relay. Peer connection B is established between the Relay and the Server. User session X spans from the Client via the Relay to the Server. Each "user" of a service causes an auth request to be sent, with a unique session identifier. Once accepted by the server, both the client and the server are aware of the session. It is important to note that there is no relationship between a connection and a session, and that Diameter messages for multiple sessions are all multiplexed through a single connection.
在图1中提供的示例中,在客户端与其本地中继之间建立对等连接A。在中继和服务器之间建立对等连接B。用户会话X通过中继从客户端扩展到服务器。服务的每个“用户”都会发送一个具有唯一会话标识符的身份验证请求。一旦被服务器接受,客户端和服务器都会知道会话。需要注意的是,连接和会话之间没有关系,多个会话的Diameter消息都是通过单个连接多路传输的。
The Diameter Peer Table is used in message forwarding, and referenced by the Realm Routing Table. A Peer Table entry contains the following fields:
Diameter对等表用于消息转发,并由领域路由表引用。对等表条目包含以下字段:
Host identity Following the conventions described for the DiameterIdentity derived AVP data format in Section 4.4. This field contains the contents of the Origin-Host (Section 6.3) AVP found in the CER or CEA message.
主机标识遵循第4.4节中描述的直径衍生AVP数据格式的约定。此字段包含CER或CEA消息中的源主机(第6.3节)AVP的内容。
StatusT This is the state of the peer entry, and MUST match one of the values listed in Section 5.6.
Status t这是对等条目的状态,必须与第5.6节中列出的值之一匹配。
Static or Dynamic Specifies whether a peer entry was statically configured, or dynamically discovered.
静态或动态指定是静态配置对等项,还是动态发现对等项。
Expiration time Specifies the time at which dynamically discovered peer table entries are to be either refreshed, or expired.
过期时间指定刷新或过期动态发现的对等表项的时间。
TLS Enabled Specifies whether TLS is to be used when communicating with the peer.
TLS Enabled指定与对等方通信时是否使用TLS。
Additional security information, when needed (e.g., keys, certificates)
需要时的附加安全信息(例如,密钥、证书)
All Realm-Based routing lookups are performed against what is commonly known as the Realm Routing Table (see Section 12). A Realm Routing Table Entry contains the following fields:
所有基于领域的路由查找都是针对通常所称的领域路由表执行的(参见第12节)。领域路由表条目包含以下字段:
Realm Name This is the field that is typically used as a primary key in the routing table lookups. Note that some implementations perform their lookups based on longest-match-from-the-right on the realm rather than requiring an exact match.
领域名称此字段通常用作路由表查找中的主键。请注意,有些实现基于领域右侧的最长匹配执行查找,而不需要精确匹配。
Application Identifier An application is identified by a vendor id and an application id. For all IETF standards track Diameter applications, the vendor id is zero. A route entry can have a different destination based on the application identification AVP of the message. This field MUST be used as a secondary key field in routing table lookups.
应用程序标识符应用程序由供应商id和应用程序id标识。对于所有IETF标准磁道直径应用程序,供应商id为零。基于消息的应用程序标识AVP,路由条目可以具有不同的目的地。此字段必须用作路由表查找中的辅助关键字字段。
Local Action The Local Action field is used to identify how a message should be treated. The following actions are supported:
本地操作本地操作字段用于标识应如何处理消息。支持以下操作:
1. LOCAL - Diameter messages that resolve to a route entry with the Local Action set to Local can be satisfied locally, and do not need to be routed to another server.
1. LOCAL-Diameter消息解析为路由条目,并将LOCAL操作设置为LOCAL,可以在本地满足,而不需要路由到另一台服务器。
2. RELAY - All Diameter messages that fall within this category MUST be routed to a next hop server, without modifying any non-routing AVPs. See Section 6.1.8 for relaying guidelines
2. 中继-属于此类别的所有Diameter消息必须路由到下一跳服务器,而不修改任何非路由AVP。继电保护指南见第6.1.8节
3. PROXY - All Diameter messages that fall within this category MUST be routed to a next hop server. The local server MAY apply its local policies to the message by including new AVPs to the message prior to routing. See Section 6.1.8 for proxying guidelines.
3. 代理-属于此类别的所有Diameter邮件必须路由到下一跳服务器。本地服务器可以通过在路由之前将新avp包括到消息来将其本地策略应用到消息。代理指南见第6.1.8节。
4. REDIRECT - Diameter messages that fall within this category MUST have the identity of the home Diameter server(s) appended, and returned to the sender of the message. See Section 6.1.7 for redirect guidelines.
4. 重定向-属于此类别的Diameter邮件必须附加home Diameter服务器的标识,并返回给邮件的发件人。重定向指南见第6.1.7节。
Server Identifier One or more servers the message is to be routed to. These servers MUST also be present in the Peer table. When the Local Action is set to RELAY or PROXY, this field contains the identity of the server(s) the message must be routed to. When the Local Action field is set to REDIRECT, this field contains the identity of one or more servers the message should be redirected to.
服务器标识符消息要路由到的一个或多个服务器。这些服务器也必须存在于对等表中。当本地操作设置为中继或代理时,此字段包含消息必须路由到的服务器的标识。当本地操作字段设置为重定向时,此字段包含消息应重定向到的一个或多个服务器的标识。
Static or Dynamic Specifies whether a route entry was statically configured, or dynamically discovered.
静态或动态指定路由条目是静态配置的,还是动态发现的。
Expiration time Specifies the time which a dynamically discovered route table entry expires.
过期时间指定动态发现的路由表项过期的时间。
It is important to note that Diameter agents MUST support at least one of the LOCAL, RELAY, PROXY or REDIRECT modes of operation. Agents do not need to support all modes of operation in order to conform with the protocol specification, but MUST follow the protocol compliance guidelines in Section 2. Relay agents MUST NOT reorder AVPs, and proxies MUST NOT reorder AVPs.
请务必注意,Diameter代理必须至少支持一种本地、中继、代理或重定向操作模式。代理不需要支持所有操作模式以符合协议规范,但必须遵守第2节中的协议合规指南。中继代理不得重新订购AVP,代理不得重新订购AVP。
The routing table MAY include a default entry that MUST be used for any requests not matching any of the other entries. The routing table MAY consist of only such an entry.
路由表可能包括一个默认条目,该条目必须用于与任何其他条目不匹配的任何请求。路由表可能只包含这样一个条目。
When a request is routed, the target server MUST have advertised the Application Identifier (see Section 2.4) for the given message, or have advertised itself as a relay or proxy agent. Otherwise, an error is returned with the Result-Code AVP set to DIAMETER_UNABLE_TO_DELIVER.
路由请求时,目标服务器必须已公布给定消息的应用程序标识符(请参阅第2.4节),或者已将自身作为中继或代理进行公布。否则,返回一个错误,结果代码AVP设置为DIAMETER\u UNABLE\u to\u DELIVER。
In addition to client and servers, the Diameter protocol introduces relay, proxy, redirect, and translation agents, each of which is defined in Section 1.3. These Diameter agents are useful for several reasons:
除了客户端和服务器之外,Diameter协议还引入了中继、代理、重定向和翻译代理,每种代理都在第1.3节中定义。由于以下几个原因,这些直径剂很有用:
- They can distribute administration of systems to a configurable grouping, including the maintenance of security associations.
- 他们可以将系统管理分配给可配置的组,包括维护安全关联。
- They can be used for concentration of requests from an number of co-located or distributed NAS equipment sets to a set of like user groups.
- 它们可用于将多个同址或分布式NAS设备集的请求集中到一组类似的用户组。
- They can do value-added processing to the requests or responses.
- 他们可以对请求或响应进行增值处理。
- They can be used for load balancing.
- 它们可以用于负载平衡。
- A complex network will have multiple authentication sources, they can sort requests and forward towards the correct target.
- 一个复杂的网络将有多个身份验证源,它们可以对请求进行排序并转发到正确的目标。
The Diameter protocol requires that agents maintain transaction state, which is used for failover purposes. Transaction state implies that upon forwarding a request, its Hop-by-Hop identifier is saved; the field is replaced with a locally unique identifier, which is restored to its original value when the corresponding answer is received. The request's state is released upon receipt of the answer. A stateless agent is one that only maintains transaction state.
Diameter协议要求代理维护事务状态,事务状态用于故障切换。事务状态意味着在转发请求时,其逐跳标识符被保存;该字段将替换为本地唯一标识符,当收到相应的答案时,该标识符将恢复为其原始值。请求的状态在收到答复后即被释放。无状态代理是只维护事务状态的代理。
The Proxy-Info AVP allows stateless agents to add local state to a Diameter request, with the guarantee that the same state will be present in the answer. However, the protocol's failover procedures require that agents maintain a copy of pending requests.
Proxy Info AVP允许无状态代理向Diameter请求添加本地状态,并保证相同的状态将出现在应答中。但是,协议的故障切换过程要求代理维护挂起请求的副本。
A stateful agent is one that maintains session state information; by keeping track of all authorized active sessions. Each authorized session is bound to a particular service, and its state is considered active either until it is notified otherwise, or by expiration. Each authorized session has an expiration, which is communicated by Diameter servers via the Session-Timeout AVP.
有状态代理是维护会话状态信息的代理;通过跟踪所有授权的活动会话。每个授权会话都绑定到一个特定的服务,其状态被认为是活动的,直到另行通知为止,或者在到期之前。每个授权会话都有一个过期时间,由Diameter服务器通过会话超时AVP进行通信。
Maintaining session state MAY be useful in certain applications, such as:
在某些应用程序中,维护会话状态可能很有用,例如:
- Protocol translation (e.g., RADIUS <-> Diameter)
- 协议转换(例如,半径<->直径)
- Limiting resources authorized to a particular user
- 限制授权给特定用户的资源
- Per user or transaction auditing
- 每个用户或事务审核
A Diameter agent MAY act in a stateful manner for some requests and be stateless for others. A Diameter implementation MAY act as one type of agent for some requests, and as another type of agent for others.
Diameter代理可以以有状态的方式处理某些请求,而对于其他请求则是无状态的。Diameter实现可以作为某些请求的一种类型的代理,也可以作为其他请求的另一种类型的代理。
Relay Agents are Diameter agents that accept requests and route messages to other Diameter nodes based on information found in the messages (e.g., Destination-Realm). This routing decision is performed using a list of supported realms, and known peers. This is known as the Realm Routing Table, as is defined further in Section 2.7.
中继代理是Diameter代理,它接受请求并根据在消息中找到的信息(例如,目标域)将消息路由到其他Diameter节点。此路由决策使用受支持领域和已知对等方的列表执行。这被称为领域路由表,如第2.7节中的进一步定义。
Relays MAY be used to aggregate requests from multiple Network Access Servers (NASes) within a common geographical area (POP). The use of Relays is advantageous since it eliminates the need for NASes to be configured with the necessary security information they would otherwise require to communicate with Diameter servers in other realms. Likewise, this reduces the configuration load on Diameter servers that would otherwise be necessary when NASes are added, changed or deleted.
中继可用于聚合来自公共地理区域(POP)内多个网络接入服务器(NASE)的请求。使用中继器是有利的,因为它不需要为NASE配置必要的安全信息,否则NASE将需要与其他领域中的Diameter服务器通信。同样,这减少了Diameter服务器上的配置负载,否则,在添加、更改或删除NASE时,这些配置负载是必需的。
Relays modify Diameter messages by inserting and removing routing information, but do not modify any other portion of a message. Relays SHOULD NOT maintain session state but MUST maintain transaction state.
中继通过插入和删除路由信息来修改Diameter消息,但不修改消息的任何其他部分。中继不应保持会话状态,但必须保持事务状态。
+------+ ---------> +------+ ---------> +------+ | | 1. Request | | 2. Request | | | NAS | | DRL | | HMS | | | 4. Answer | | 3. Answer | | +------+ <--------- +------+ <--------- +------+ example.net example.net example.com
+------+ ---------> +------+ ---------> +------+ | | 1. Request | | 2. Request | | | NAS | | DRL | | HMS | | | 4. Answer | | 3. Answer | | +------+ <--------- +------+ <--------- +------+ example.net example.net example.com
Figure 2: Relaying of Diameter messages
图2:Diameter消息的中继
The example provided in Figure 2 depicts a request issued from NAS, which is an access device, for the user bob@example.com. Prior to issuing the request, NAS performs a Diameter route lookup, using "example.com" as the key, and determines that the message is to be relayed to DRL, which is a Diameter Relay. DRL performs the same route lookup as NAS, and relays the message to HMS, which is example.com's Home Diameter Server. HMS identifies that the request can be locally supported (via the realm), processes the authentication and/or authorization request, and replies with an answer, which is routed back to NAS using saved transaction state.
图2中提供的示例描述了从NAS(一种访问设备)向用户发出的请求bob@example.com. 在发出请求之前,NAS使用“example.com”作为密钥执行Diameter路由查找,并确定消息要中继到DRL,DRL是Diameter中继。DRL执行与NAS相同的路由查找,并将消息转发给HMS,HMS是example.com的HomeDiameter服务器。HMS确定请求可以在本地(通过领域)得到支持,处理身份验证和/或授权请求,并用应答进行回复,应答将使用保存的事务状态路由回NAS。
Since Relays do not perform any application level processing, they provide relaying services for all Diameter applications, and therefore MUST advertise the Relay Application Identifier.
由于中继不执行任何应用程序级处理,它们为所有Diameter应用程序提供中继服务,因此必须公布中继应用程序标识符。
Similarly to relays, proxy agents route Diameter messages using the Diameter Routing Table. However, they differ since they modify messages to implement policy enforcement. This requires that proxies maintain the state of their downstream peers (e.g., access devices) to enforce resource usage, provide admission control, and provisioning.
与中继类似,代理使用Diameter路由表路由Diameter消息。但是,它们有所不同,因为它们修改消息以实现策略强制。这要求代理维护其下游对等方(例如,访问设备)的状态,以强制执行资源使用、提供准入控制和资源调配。
It is important to note that although proxies MAY provide a value-add function for NASes, they do not allow access devices to use end-to-end security, since modifying messages breaks authentication.
需要注意的是,尽管代理可以为NASE提供增值功能,但它们不允许访问设备使用端到端安全性,因为修改消息会破坏身份验证。
Proxies MAY be used in call control centers or access ISPs that provide outsourced connections, they can monitor the number and types of ports in use, and make allocation and admission decisions according to their configuration.
代理可以用于呼叫控制中心或访问提供外包连接的ISP,它们可以监控正在使用的端口的数量和类型,并根据其配置做出分配和准入决策。
Proxies that wish to limit resources MUST maintain session state. All proxies MUST maintain transaction state.
希望限制资源的代理必须保持会话状态。所有代理必须维护事务状态。
Since enforcing policies requires an understanding of the service being provided, Proxies MUST only advertise the Diameter applications they support.
由于强制执行策略需要了解所提供的服务,因此代理必须仅公布其支持的Diameter应用程序。
Redirect agents are useful in scenarios where the Diameter routing configuration needs to be centralized. An example is a redirect agent that provides services to all members of a consortium, but does not wish to be burdened with relaying all messages between realms. This scenario is advantageous since it does not require that the consortium provide routing updates to its members when changes are made to a member's infrastructure.
重定向代理在需要集中化Diameter路由配置的场景中非常有用。一个例子是重定向代理,它向联合体的所有成员提供服务,但不希望承担在领域之间中继所有消息的负担。这种情况是有利的,因为它不要求联合体在成员的基础设施发生更改时向其成员提供路由更新。
Since redirect agents do not relay messages, and only return an answer with the information necessary for Diameter agents to communicate directly, they do not modify messages. Since redirect agents do not receive answer messages, they cannot maintain session state. Further, since redirect agents never relay requests, they are not required to maintain transaction state.
由于重定向代理不中继消息,只返回带有Diameter代理直接通信所需信息的答案,所以它们不会修改消息。由于重定向代理不接收应答消息,因此它们无法维护会话状态。此外,由于重定向代理从不中继请求,因此不需要它们来维护事务状态。
The example provided in Figure 3 depicts a request issued from the access device, NAS, for the user bob@example.com. The message is forwarded by the NAS to its relay, DRL, which does not have a routing entry in its Diameter Routing Table for example.com. DRL has a default route configured to DRD, which is a redirect agent that returns a redirect notification to DRL, as well as HMS' contact information. Upon receipt of the redirect notification, DRL establishes a transport connection with HMS, if one doesn't already exist, and forwards the request to it.
图3中提供的示例描述了从访问设备NAS向用户发出的请求bob@example.com. NAS将消息转发到其中继DRL,DRL在其Diameter routing Table(例如.com)中没有路由条目。DRL有一个配置为DRD的默认路由,DRD是一个重定向代理,它向DRL返回重定向通知以及HMS的联系信息。收到重定向通知后,DRL与HMS建立传输连接(如果还不存在),并将请求转发给HMS。
+------+ | | | DRD | | | +------+ ^ | 2. Request | | 3. Redirection | | Notification | v +------+ ---------> +------+ ---------> +------+ | | 1. Request | | 4. Request | | | NAS | | DRL | | HMS | | | 6. Answer | | 5. Answer | | +------+ <--------- +------+ <--------- +------+ example.net example.net example.com
+------+ | | | DRD | | | +------+ ^ | 2. Request | | 3. Redirection | | Notification | v +------+ ---------> +------+ ---------> +------+ | | 1. Request | | 4. Request | | | NAS | | DRL | | HMS | | | 6. Answer | | 5. Answer | | +------+ <--------- +------+ <--------- +------+ example.net example.net example.com
Figure 3: Redirecting a Diameter Message
图3:重定向Diameter消息
Since redirect agents do not perform any application level processing, they provide relaying services for all Diameter applications, and therefore MUST advertise the Relay Application Identifier.
由于重定向代理不执行任何应用程序级处理,它们为所有Diameter应用程序提供中继服务,因此必须公布中继应用程序标识符。
A translation agent is a device that provides translation between two protocols (e.g., RADIUS<->Diameter, TACACS+<->Diameter). Translation agents are likely to be used as aggregation servers to communicate with a Diameter infrastructure, while allowing for the embedded systems to be migrated at a slower pace.
翻译代理是在两个协议(例如RADIUS<->Diameter、TACACS+<->Diameter)之间提供翻译的设备。翻译代理可能被用作聚合服务器,与Diameter基础设施进行通信,同时允许以较慢的速度迁移嵌入式系统。
Given that the Diameter protocol introduces the concept of long-lived authorized sessions, translation agents MUST be session stateful and MUST maintain transaction state.
鉴于Diameter协议引入了长寿命授权会话的概念,翻译代理必须是会话状态的,并且必须维护事务状态。
Translation of messages can only occur if the agent recognizes the application of a particular request, and therefore translation agents MUST only advertise their locally supported applications.
只有当代理识别特定请求的应用程序时,才能进行消息翻译,因此翻译代理必须仅公布其本地支持的应用程序。
+------+ ---------> +------+ ---------> +------+ | | RADIUS Request | | Diameter Request | | | NAS | | TLA | | HMS | | | RADIUS Answer | | Diameter Answer | | +------+ <--------- +------+ <--------- +------+ example.net example.net example.com
+------+ ---------> +------+ ---------> +------+ | | RADIUS Request | | Diameter Request | | | NAS | | TLA | | HMS | | | RADIUS Answer | | Diameter Answer | | +------+ <--------- +------+ <--------- +------+ example.net example.net example.com
Figure 4: Translation of RADIUS to Diameter
图4:半径到直径的转换
End-to-end security services include confidentiality and message origin authentication. These services are provided by supporting AVP integrity and confidentiality between two peers, communicating through agents.
端到端安全服务包括机密性和消息源身份验证。这些服务通过支持两个对等方之间的AVP完整性和机密性,并通过代理进行通信来提供。
End-to-end security is provided via the End-to-End security extension, described in [AAACMS]. The circumstances requiring the use of end-to-end security are determined by policy on each of the peers. Security policies, which are not the subject of standardization, may be applied by next hop Diameter peer or by destination realm. For example, where TLS or IPsec transmission-level security is sufficient, there may be no need for end-to-end security.
端到端安全性通过端到端安全扩展提供,如[AAACMS]所述。需要使用端到端安全性的情况由每个对等方的策略决定。安全策略不是标准化的主题,可以由下一跳Diameter对等方或目标领域应用。例如,在TLS或IPsec传输级别安全性足够的情况下,可能不需要端到端安全性。
End-to-end security policies include:
端到端安全策略包括:
- Never use end-to-end security.
- 永远不要使用端到端安全性。
- Use end-to-end security on messages containing sensitive AVPs. Which AVPs are sensitive is determined by service provider policy. AVPs containing keys and passwords should be considered sensitive. Accounting AVPs may be considered sensitive. Any AVP for which the P bit may be set or which may be encrypted may be considered sensitive.
- 对包含敏感AVP的消息使用端到端安全性。哪些AVP是敏感的由服务提供商策略决定。包含密钥和密码的AVP应视为敏感。会计AVP可能被认为是敏感的。可以为其设置P位或可以对其加密的任何AVP可以被认为是敏感的。
- Always use end-to-end security.
- 始终使用端到端安全性。
It is strongly RECOMMENDED that all Diameter implementations support end-to-end security.
强烈建议所有Diameter实现都支持端到端安全性。
As noted in Section 2.2, Diameter requires transmission level security to be used on each connection (TLS or IPsec). Therefore, each connection is authenticated, replay and integrity protected and confidential on a per-packet basis.
如第2.2节所述,Diameter要求在每个连接(TLS或IPsec)上使用传输级安全性。因此,每个连接都是基于每个数据包进行身份验证、重播和完整性保护和保密的。
In addition to authenticating each connection, each connection as well as the entire session MUST also be authorized. Before initiating a connection, a Diameter Peer MUST check that its peers are authorized to act in their roles. For example, a Diameter peer may be authentic, but that does not mean that it is authorized to act as a Diameter Server advertising a set of Diameter applications.
除了验证每个连接之外,还必须对每个连接以及整个会话进行授权。在启动连接之前,Diameter对等方必须检查其对等方是否有权执行其角色。例如,Diameter对等方可能是可信的,但这并不意味着它被授权作为一组Diameter应用程序广告的Diameter服务器。
Prior to bringing up a connection, authorization checks are performed at each connection along the path. Diameter capabilities negotiation (CER/CEA) also MUST be carried out, in order to determine what Diameter applications are supported by each peer. Diameter sessions MUST be routed only through authorized nodes that have advertised support for the Diameter application required by the session.
在建立连接之前,将对路径上的每个连接执行授权检查。还必须进行Diameter能力协商(CER/CEA),以确定每个对等方支持哪些Diameter应用程序。Diameter会话只能通过授权节点进行路由,授权节点已公布对会话所需的Diameter应用程序的支持。
As noted in Section 6.1.8, a relay or proxy agent MUST append a Route-Record AVP to all requests forwarded. The AVP contains the identity of the peer the request was received from.
如第6.1.8节所述,中继或代理必须将路由记录AVP附加到所有转发的请求中。AVP包含从中接收请求的对等方的标识。
The home Diameter server, prior to authorizing a session, MUST check the Route-Record AVPs to make sure that the route traversed by the request is acceptable. For example, administrators within the home realm may not wish to honor requests that have been routed through an untrusted realm. By authorizing a request, the home Diameter server is implicitly indicating its willingness to engage in the business transaction as specified by the contractual relationship between the server and the previous hop. A DIAMETER_AUTHORIZATION_REJECTED error message (see Section 7.1.5) is sent if the route traversed by the request is unacceptable.
home Diameter服务器在授权会话之前,必须检查路由记录AVPs,以确保请求所穿越的路由是可接受的。例如,主域中的管理员可能不希望接受通过不受信任域路由的请求。通过授权请求,home Diameter服务器隐式地表示其愿意参与由服务器和前一跳之间的合同关系指定的业务事务。如果请求通过的路由不可接受,则发送DIAMETER_AUTHORIZATION_REJECTED错误消息(见第7.1.5节)。
A home realm may also wish to check that each accounting request message corresponds to a Diameter response authorizing the session. Accounting requests without corresponding authorization responses SHOULD be subjected to further scrutiny, as should accounting requests indicating a difference between the requested and provided service.
主域还可能希望检查每个记帐请求消息是否对应于授权会话的Diameter响应。没有相应授权响应的会计请求应受到进一步审查,表明请求的服务与提供的服务之间存在差异的会计请求也应受到进一步审查。
Similarly, the local Diameter agent, on receiving a Diameter response authorizing a session, MUST check the Route-Record AVPs to make sure that the route traversed by the response is acceptable. At each step, forwarding of an authorization response is considered evidence of a willingness to take on financial risk relative to the session. A local realm may wish to limit this exposure, for example, by establishing credit limits for intermediate realms and refusing to accept responses which would violate those limits. By issuing an accounting request corresponding to the authorization response, the local realm implicitly indicates its agreement to provide the service indicated in the authorization response. If the service cannot be provided by the local realm, then a DIAMETER_UNABLE_TO_COMPLY error message MUST be sent within the accounting request; a Diameter client receiving an authorization response for a service that it cannot perform MUST NOT substitute an alternate service, and then send accounting requests for the alternate service instead.
类似地,本地Diameter代理在接收到授权会话的Diameter响应时,必须检查路由记录AVPs,以确保响应所穿越的路由是可接受的。在每个步骤中,转发授权响应被视为愿意承担与会话相关的财务风险的证据。本地领域可能希望限制这种风险,例如,为中间领域建立信用限额,并拒绝接受违反这些限额的回复。通过发出与授权响应相对应的记帐请求,本地域隐式表示其同意提供授权响应中指示的服务。如果本地域无法提供服务,则必须在记帐请求中发送DIAMETER\u UNABLE\u TO\u Compliance错误消息;Diameter客户端接收到无法执行的服务的授权响应时,不得替代替代服务,然后发送替代服务的记帐请求。
A summary of the Diameter header format is shown below. The fields are transmitted in network byte order.
直径标题格式的摘要如下所示。字段以网络字节顺序传输。
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | command flags | Command-Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Application-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Hop-by-Hop Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | End-to-End Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVPs ... +-+-+-+-+-+-+-+-+-+-+-+-+-
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | command flags | Command-Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Application-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Hop-by-Hop Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | End-to-End Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVPs ... +-+-+-+-+-+-+-+-+-+-+-+-+-
Version This Version field MUST be set to 1 to indicate Diameter Version 1.
版本此版本字段必须设置为1,以指示直径版本1。
Message Length The Message Length field is three octets and indicates the length of the Diameter message including the header fields.
消息长度消息长度字段为三个八位字节,表示直径消息的长度,包括标题字段。
Command Flags The Command Flags field is eight bits. The following bits are assigned:
命令标志命令标志字段为八位。分配了以下位:
0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ |R P E T r r r r| +-+-+-+-+-+-+-+-+
0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ |R P E T r r r r| +-+-+-+-+-+-+-+-+
R(equest) - If set, the message is a request. If cleared, the message is an answer. P(roxiable) - If set, the message MAY be proxied, relayed or redirected. If cleared, the message MUST be locally processed. E(rror) - If set, the message contains a protocol error, and the message will not conform to the ABNF described for this command. Messages with the 'E'
R(equest)-如果设置,则消息是一个请求。如果清除,则该消息为应答。P(可转发)-如果设置,则消息可以被代理、中继或重定向。如果清除,则必须在本地处理该消息。E(rror)-如果设置,则消息包含协议错误,并且消息将不符合为该命令描述的ABNF。带有“E”的消息
bit set are commonly referred to as error messages. This bit MUST NOT be set in request messages. See Section 7.2. T(Potentially re-transmitted message) - This flag is set after a link failover procedure, to aid the removal of duplicate requests. It is set when resending requests not yet acknowledged, as an indication of a possible duplicate due to a link failure. This bit MUST be cleared when sending a request for the first time, otherwise the sender MUST set this flag. Diameter agents only need to be concerned about the number of requests they send based on a single received request; retransmissions by other entities need not be tracked. Diameter agents that receive a request with the T flag set, MUST keep the T flag set in the forwarded request. This flag MUST NOT be set if an error answer message (e.g., a protocol error) has been received for the earlier message. It can be set only in cases where no answer has been received from the server for a request and the request is sent again. This flag MUST NOT be set in answer messages.
位集通常称为错误消息。不得在请求消息中设置此位。见第7.2节。T(可能重新传输的消息)-此标志在链路故障切换过程后设置,以帮助删除重复请求。当重新发送尚未确认的请求时,会设置该参数,作为由于链路故障可能出现重复的指示。第一次发送请求时必须清除此位,否则发送方必须设置此标志。Diameter代理只需要关心基于单个接收请求发送的请求数量;不需要跟踪其他实体的重传。接收带有T标志集的请求的Diameter代理必须在转发的请求中保留T标志集。如果已收到先前消息的错误应答消息(例如,协议错误),则不得设置此标志。只有在没有从服务器收到请求的应答并且请求再次发送的情况下,才能设置此选项。不得在应答消息中设置此标志。
r(eserved) - these flag bits are reserved for future use, and MUST be set to zero, and ignored by the receiver.
r(保留)-这些标志位保留供将来使用,必须设置为零,并被接收器忽略。
Command-Code The Command-Code field is three octets, and is used in order to communicate the command associated with the message. The 24-bit address space is managed by IANA (see Section 11.2.1).
命令代码命令代码字段为三个八位字节,用于传达与消息相关的命令。24位地址空间由IANA管理(见第11.2.1节)。
Command-Code values 16,777,214 and 16,777,215 (hexadecimal values FFFFFE -FFFFFF) are reserved for experimental use (See Section 11.3).
命令代码值16777214和16777215(十六进制值FFFFF E-FFFFFF)保留供实验使用(见第11.3节)。
Application-ID Application-ID is four octets and is used to identify to which application the message is applicable for. The application can be an authentication application, an accounting application or a vendor specific application. See Section 11.3 for the possible values that the application-id may use.
应用程序ID应用程序ID是四个八位字节,用于标识消息适用于哪个应用程序。该应用程序可以是身份验证应用程序、会计应用程序或特定于供应商的应用程序。有关应用程序id可能使用的值,请参见第11.3节。
The application-id in the header MUST be the same as what is contained in any relevant AVPs contained in the message.
标头中的应用程序id必须与消息中包含的任何相关AVP中包含的应用程序id相同。
Hop-by-Hop Identifier The Hop-by-Hop Identifier is an unsigned 32-bit integer field (in network byte order) and aids in matching requests and replies. The sender MUST ensure that the Hop-by-Hop identifier in a request is unique on a given connection at any given time, and MAY attempt to ensure that the number is unique across reboots. The sender of an Answer message MUST ensure that the Hop-by-Hop Identifier field contains the same value that was found in the corresponding request. The Hop-by-Hop identifier is normally a monotonically increasing number, whose start value was randomly generated. An answer message that is received with an unknown Hop-by-Hop Identifier MUST be discarded.
逐跳标识符逐跳标识符是一个无符号32位整数字段(按网络字节顺序),有助于匹配请求和答复。发送方必须确保请求中的逐跳标识符在任何给定时间在给定连接上都是唯一的,并且可以尝试确保该号码在重新启动时是唯一的。应答消息的发送者必须确保逐跳标识符字段包含在相应请求中找到的相同值。逐跳标识符通常是一个单调递增的数字,其起始值是随机生成的。必须丢弃使用未知逐跳标识符接收的应答消息。
End-to-End Identifier The End-to-End Identifier is an unsigned 32-bit integer field (in network byte order) and is used to detect duplicate messages. Upon reboot implementations MAY set the high order 12 bits to contain the low order 12 bits of current time, and the low order 20 bits to a random value. Senders of request messages MUST insert a unique identifier on each message. The identifier MUST remain locally unique for a period of at least 4 minutes, even across reboots. The originator of an Answer message MUST ensure that the End-to-End Identifier field contains the same value that was found in the corresponding request. The End-to-End Identifier MUST NOT be modified by Diameter agents of any kind. The combination of the Origin-Host (see Section 6.3) and this field is used to detect duplicates. Duplicate requests SHOULD cause the same answer to be transmitted (modulo the hop-by-hop Identifier field and any routing AVPs that may be present), and MUST NOT affect any state that was set when the original request was processed. Duplicate answer messages that are to be locally consumed (see Section 6.2) SHOULD be silently discarded.
端到端标识符端到端标识符是一个无符号32位整数字段(按网络字节顺序),用于检测重复消息。在重新启动时,实现可以将高阶12位设置为包含当前时间的低阶12位,将低阶20位设置为随机值。请求消息的发件人必须在每条消息上插入唯一标识符。标识符必须在至少4分钟内保持本地唯一性,即使在重新启动期间也是如此。应答消息的发起人必须确保端到端标识符字段包含在相应请求中找到的相同值。端到端标识符不得被任何类型的Diameter代理修改。原始主机(见第6.3节)和该字段的组合用于检测重复项。重复请求应导致传输相同的应答(对逐跳标识符字段和可能存在的任何路由AVP进行模化),并且不得影响处理原始请求时设置的任何状态。本地使用的重复应答消息(见第6.2节)应被静默丢弃。
AVPs AVPs are a method of encapsulating information relevant to the Diameter message. See Section 4 for more information on AVPs.
AVPs AVPs是封装与Diameter消息相关的信息的方法。有关AVP的更多信息,请参见第4节。
Each command Request/Answer pair is assigned a command code, and the sub-type (i.e., request or answer) is identified via the 'R' bit in the Command Flags field of the Diameter header.
每个命令请求/应答对分配一个命令代码,子类型(即请求或应答)通过直径标题的命令标志字段中的“R”位进行标识。
Every Diameter message MUST contain a command code in its header's Command-Code field, which is used to determine the action that is to be taken for a particular message. The following Command Codes are defined in the Diameter base protocol:
每个Diameter消息必须在其标题的命令代码字段中包含一个命令代码,该字段用于确定要对特定消息执行的操作。以下命令代码在Diameter base协议中定义:
Command-Name Abbrev. Code Reference -------------------------------------------------------- Abort-Session-Request ASR 274 8.5.1 Abort-Session-Answer ASA 274 8.5.2 Accounting-Request ACR 271 9.7.1 Accounting-Answer ACA 271 9.7.2 Capabilities-Exchange- CER 257 5.3.1 Request Capabilities-Exchange- CEA 257 5.3.2 Answer Device-Watchdog-Request DWR 280 5.5.1 Device-Watchdog-Answer DWA 280 5.5.2 Disconnect-Peer-Request DPR 282 5.4.1 Disconnect-Peer-Answer DPA 282 5.4.2 Re-Auth-Request RAR 258 8.3.1 Re-Auth-Answer RAA 258 8.3.2 Session-Termination- STR 275 8.4.1 Request Session-Termination- STA 275 8.4.2 Answer
Command-Name Abbrev. Code Reference -------------------------------------------------------- Abort-Session-Request ASR 274 8.5.1 Abort-Session-Answer ASA 274 8.5.2 Accounting-Request ACR 271 9.7.1 Accounting-Answer ACA 271 9.7.2 Capabilities-Exchange- CER 257 5.3.1 Request Capabilities-Exchange- CEA 257 5.3.2 Answer Device-Watchdog-Request DWR 280 5.5.1 Device-Watchdog-Answer DWA 280 5.5.2 Disconnect-Peer-Request DPR 282 5.4.1 Disconnect-Peer-Answer DPA 282 5.4.2 Re-Auth-Request RAR 258 8.3.1 Re-Auth-Answer RAA 258 8.3.2 Session-Termination- STR 275 8.4.1 Request Session-Termination- STA 275 8.4.2 Answer
Every Command Code defined MUST include a corresponding ABNF specification, which is used to define the AVPs that MUST or MAY be present. The following format is used in the definition:
定义的每个命令代码必须包含相应的ABNF规范,用于定义必须存在或可能存在的AVP。定义中使用了以下格式:
command-def = command-name "::=" diameter-message
command-def = command-name "::=" diameter-message
command-name = diameter-name
command-name = diameter-name
diameter-name = ALPHA *(ALPHA / DIGIT / "-")
diameter-name = ALPHA *(ALPHA / DIGIT / "-")
diameter-message = header [ *fixed] [ *required] [ *optional] [ *fixed]
diameter-message = header [ *fixed] [ *required] [ *optional] [ *fixed]
header = "<" Diameter-Header:" command-id [r-bit] [p-bit] [e-bit] [application-id]">"
header = "<" Diameter-Header:" command-id [r-bit] [p-bit] [e-bit] [application-id]">"
application-id = 1*DIGIT
application-id = 1*DIGIT
command-id = 1*DIGIT ; The Command Code assigned to the command
command-id = 1*DIGIT ; The Command Code assigned to the command
r-bit = ", REQ" ; If present, the 'R' bit in the Command ; Flags is set, indicating that the message ; is a request, as opposed to an answer.
r-bit = ", REQ" ; If present, the 'R' bit in the Command ; Flags is set, indicating that the message ; is a request, as opposed to an answer.
p-bit = ", PXY" ; If present, the 'P' bit in the Command ; Flags is set, indicating that the message ; is proxiable.
p-bit = ", PXY" ; If present, the 'P' bit in the Command ; Flags is set, indicating that the message ; is proxiable.
e-bit = ", ERR" ; If present, the 'E' bit in the Command ; Flags is set, indicating that the answer ; message contains a Result-Code AVP in ; the "protocol error" class.
e-bit = ", ERR" ; If present, the 'E' bit in the Command ; Flags is set, indicating that the answer ; message contains a Result-Code AVP in ; the "protocol error" class.
fixed = [qual] "<" avp-spec ">" ; Defines the fixed position of an AVP
fixed = [qual] "<" avp-spec ">" ; Defines the fixed position of an AVP
required = [qual] "{" avp-spec "}" ; The AVP MUST be present and can appear ; anywhere in the message.
required = [qual] "{" avp-spec "}" ; The AVP MUST be present and can appear ; anywhere in the message.
optional = [qual] "[" avp-name "]" ; The avp-name in the 'optional' rule cannot ; evaluate to any AVP Name which is included ; in a fixed or required rule. The AVP can ; appear anywhere in the message.
optional = [qual] "[" avp-name "]" ; The avp-name in the 'optional' rule cannot ; evaluate to any AVP Name which is included ; in a fixed or required rule. The AVP can ; appear anywhere in the message.
qual = [min] "*" [max] ; See ABNF conventions, RFC 2234 Section 6.6. ; The absence of any qualifiers depends on whether ; it precedes a fixed, required, or optional ; rule. If a fixed or required rule has no ; qualifier, then exactly one such AVP MUST ; be present. If an optional rule has no ; qualifier, then 0 or 1 such AVP may be ; present. ; ; NOTE: "[" and "]" have a different meaning ; than in ABNF (see the optional rule, above). ; These braces cannot be used to express ; optional fixed rules (such as an optional ; ICV at the end). To do this, the convention ; is '0*1fixed'.
qual = [min] "*" [max] ; See ABNF conventions, RFC 2234 Section 6.6. ; The absence of any qualifiers depends on whether ; it precedes a fixed, required, or optional ; rule. If a fixed or required rule has no ; qualifier, then exactly one such AVP MUST ; be present. If an optional rule has no ; qualifier, then 0 or 1 such AVP may be ; present. ; ; NOTE: "[" and "]" have a different meaning ; than in ABNF (see the optional rule, above). ; These braces cannot be used to express ; optional fixed rules (such as an optional ; ICV at the end). To do this, the convention ; is '0*1fixed'.
min = 1*DIGIT ; The minimum number of times the element may ; be present. The default value is zero.
min = 1*DIGIT ; The minimum number of times the element may ; be present. The default value is zero.
max = 1*DIGIT ; The maximum number of times the element may ; be present. The default value is infinity. A ; value of zero implies the AVP MUST NOT be ; present.
max = 1*DIGIT ; The maximum number of times the element may ; be present. The default value is infinity. A ; value of zero implies the AVP MUST NOT be ; present.
avp-spec = diameter-name ; The avp-spec has to be an AVP Name, defined ; in the base or extended Diameter ; specifications.
avp-spec = diameter-name ; The avp-spec has to be an AVP Name, defined ; in the base or extended Diameter ; specifications.
avp-name = avp-spec / "AVP" ; The string "AVP" stands for *any* arbitrary ; AVP Name, which does not conflict with the ; required or fixed position AVPs defined in ; the command code definition.
avp-name = avp-spec / "AVP" ; The string "AVP" stands for *any* arbitrary ; AVP Name, which does not conflict with the ; required or fixed position AVPs defined in ; the command code definition.
The following is a definition of a fictitious command code:
以下是虚构命令代码的定义:
Example-Request ::= < "Diameter-Header: 9999999, REQ, PXY > { User-Name } * { Origin-Host } * [ AVP
Example-Request ::= < "Diameter-Header: 9999999, REQ, PXY > { User-Name } * { Origin-Host } * [ AVP
Diameter command names typically includes one or more English words followed by the verb Request or Answer. Each English word is delimited by a hyphen. A three-letter acronym for both the request and answer is also normally provided.
Diameter命令名通常包括一个或多个英语单词,后跟动词Request或Answer。每个英语单词用连字符分隔。通常还提供请求和回答的三个字母缩写。
An example is a message set used to terminate a session. The command name is Session-Terminate-Request and Session-Terminate-Answer, while the acronyms are STR and STA, respectively.
例如,用于终止会话的消息集。命令名为Session Terminate Request和Session Terminate Answer,首字母缩写分别为STR和STA。
Both the request and the answer for a given command share the same command code. The request is identified by the R(equest) bit in the Diameter header set to one (1), to ask that a particular action be performed, such as authorizing a user or terminating a session. Once the receiver has completed the request it issues the corresponding answer, which includes a result code that communicates one of the following:
给定命令的请求和应答共享相同的命令代码。请求由设置为一(1)的Diameter头中的R(equest)位标识,以请求执行特定操作,例如授权用户或终止会话。接收器完成请求后,会发出相应的回答,其中包括一个结果代码,用于传达以下信息之一:
- The request was successful
- 请求成功
- The request failed
- 请求失败
- An additional request must be sent to provide information the peer requires prior to returning a successful or failed answer.
- 在返回成功或失败的答案之前,必须发送额外的请求以提供对等方所需的信息。
- The receiver could not process the request, but provides information about a Diameter peer that is able to satisfy the request, known as redirect.
- 接收方无法处理该请求,但提供了有关能够满足该请求的Diameter对等方的信息,称为重定向。
Additional information, encoded within AVPs, MAY also be included in answer messages.
在AVPs中编码的附加信息也可以包括在应答消息中。
Diameter AVPs carry specific authentication, accounting, authorization, routing and security information as well as configuration details for the request and reply.
Diameter AVP带有特定的身份验证、记帐、授权、路由和安全信息以及请求和应答的配置详细信息。
Some AVPs MAY be listed more than once. The effect of such an AVP is specific, and is specified in each case by the AVP description.
某些AVP可能不止一次列出。这种AVP的效果是特定的,并且在每种情况下由AVP描述来指定。
Each AVP of type OctetString MUST be padded to align on a 32-bit boundary, while other AVP types align naturally. A number of zero-valued bytes are added to the end of the AVP Data field till a word boundary is reached. The length of the padding is not reflected in the AVP Length field.
OctetString类型的每个AVP必须填充以在32位边界上对齐,而其他AVP类型则自然对齐。将若干零值字节添加到AVP数据字段的末尾,直到达到字边界。填充的长度不会反映在AVP长度字段中。
The fields in the AVP header MUST be sent in network byte order. The format of the header is:
AVP报头中的字段必须按网络字节顺序发送。标题的格式为:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVP Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V M P r r r r r| AVP Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor-ID (opt) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data ... +-+-+-+-+-+-+-+-+
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVP Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V M P r r r r r| AVP Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor-ID (opt) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data ... +-+-+-+-+-+-+-+-+
AVP Code The AVP Code, combined with the Vendor-Id field, identifies the attribute uniquely. AVP numbers 1 through 255 are reserved for backward compatibility with RADIUS, without setting the Vendor-Id field. AVP numbers 256 and above are used for Diameter, which are allocated by IANA (see Section 11.1).
AVP代码AVP代码与供应商Id字段相结合,唯一标识属性。AVP编号1至255保留为与RADIUS向后兼容,无需设置供应商Id字段。AVP编号256及以上用于IANA分配的直径(见第11.1节)。
AVP Flags The AVP Flags field informs the receiver how each attribute must be handled. The 'r' (reserved) bits are unused and SHOULD be set to 0. Note that subsequent Diameter applications MAY define additional bits within the AVP Header, and an unrecognized bit SHOULD be considered an error. The 'P' bit indicates the need for encryption for end-to-end security.
AVP标志AVP标志字段通知接收者必须如何处理每个属性。“r”(保留)位未使用,应设置为0。请注意,后续的Diameter应用程序可能会在AVP头中定义额外的位,未识别的位应视为错误。“P”位表示需要加密以实现端到端安全性。
The 'M' Bit, known as the Mandatory bit, indicates whether support of the AVP is required. If an AVP with the 'M' bit set is received by a Diameter client, server, proxy, or translation agent and either the AVP or its value is unrecognized, the message MUST be rejected. Diameter Relay and redirect agents MUST NOT reject messages with unrecognized AVPs.
“M”位被称为强制位,表示是否需要AVP支持。如果Diameter客户端、服务器、代理或翻译代理接收到设置为“M”位的AVP,且AVP或其值无法识别,则必须拒绝该消息。Diameter中继和重定向代理不得拒绝具有无法识别的AVP的消息。
The 'M' bit MUST be set according to the rules defined for the AVP containing it. In order to preserve interoperability, a Diameter implementation MUST be able to exclude from a Diameter message any Mandatory AVP which is neither defined in the base Diameter protocol nor in any of the Diameter Application specifications governing the message in which it appears. It MAY do this in one of the following ways:
“M”位必须根据为包含它的AVP定义的规则进行设置。为了保持互操作性,Diameter实现必须能够从Diameter消息中排除任何既没有在基本Diameter协议中定义,也没有在任何Diameter应用程序规范中定义的、管理其出现的消息的强制AVP。它可以通过以下方式之一执行此操作:
1) If a message is rejected because it contains a Mandatory AVP which is neither defined in the base Diameter standard nor in any of the Diameter Application specifications governing the message in which it appears, the implementation may resend the message without the AVP, possibly inserting additional standard AVPs instead.
1) 如果消息被拒绝,因为它包含一个强制性的AVP,该AVP既没有在基本直径标准中定义,也没有在管理其出现的消息的任何直径应用规范中定义,则实现可以在没有AVP的情况下重新发送该消息,可能会插入额外的标准AVP。
2) A configuration option may be provided on a system wide, per peer, or per realm basis that would allow/prevent particular Mandatory AVPs to be sent. Thus an administrator could change the configuration to avoid interoperability problems.
2) 可以在系统范围内、每个对等方或每个域的基础上提供配置选项,以允许/防止发送特定的强制AVP。因此,管理员可以更改配置以避免互操作性问题。
Diameter implementations are required to support all Mandatory AVPs which are allowed by the message's formal syntax and defined either in the base Diameter standard or in one of the Diameter Application specifications governing the message.
Diameter实现需要支持所有必需的AVP,这些AVP是消息的正式语法所允许的,并在基本Diameter标准或管理消息的Diameter应用程序规范之一中定义。
AVPs with the 'M' bit cleared are informational only and a receiver that receives a message with such an AVP that is not supported, or whose value is not supported, MAY simply ignore the AVP.
清除“M”位的AVP仅供参考,接收带有不受支持的AVP或其值不受支持的AVP的消息的接收器可能会忽略AVP。
The 'V' bit, known as the Vendor-Specific bit, indicates whether the optional Vendor-ID field is present in the AVP header. When set the AVP Code belongs to the specific vendor code address space.
“V”位(称为供应商特定位)表示AVP标头中是否存在可选供应商ID字段。设置时,AVP代码属于特定的供应商代码地址空间。
Unless otherwise noted, AVPs will have the following default AVP Flags field settings:
除非另有说明,否则AVP将具有以下默认AVP标志字段设置:
The 'M' bit MUST be set. The 'V' bit MUST NOT be set.
必须设置“M”位。不得设置“V”位。
AVP Length The AVP Length field is three octets, and indicates the number of octets in this AVP including the AVP Code, AVP Length, AVP Flags, Vendor-ID field (if present) and the AVP data. If a message is received with an invalid attribute length, the message SHOULD be rejected.
AVP长度AVP长度字段为三个八位字节,表示此AVP中的八位字节数,包括AVP代码、AVP长度、AVP标志、供应商ID字段(如果存在)和AVP数据。如果收到的消息的属性长度无效,则应拒绝该消息。
The AVP Header contains one optional field. This field is only present if the respective bit-flag is enabled.
AVP标头包含一个可选字段。仅当相应的位标志启用时,此字段才会出现。
Vendor-ID The Vendor-ID field is present if the 'V' bit is set in the AVP Flags field. The optional four-octet Vendor-ID field contains the IANA assigned "SMI Network Management Private Enterprise Codes" [ASSIGNNO] value, encoded in network byte order. Any vendor wishing to implement a vendor-specific Diameter AVP MUST use their own Vendor-ID along with their privately managed AVP address space, guaranteeing that they will not collide with any other vendor's vendor-specific AVP(s), nor with future IETF applications.
供应商ID如果在AVP标志字段中设置了“V”位,则供应商ID字段存在。可选的四个八位字节的供应商ID字段包含IANA分配的“SMI网络管理私有企业代码”[ASSIGNNO]值,按网络字节顺序编码。任何希望实现特定于供应商的Diameter AVP的供应商必须使用其自己的供应商ID及其私人管理的AVP地址空间,以确保它们不会与任何其他供应商的特定于供应商的AVP冲突,也不会与未来的IETF应用相冲突。
A vendor ID value of zero (0) corresponds to the IETF adopted AVP values, as managed by the IANA. Since the absence of the vendor ID field implies that the AVP in question is not vendor specific, implementations MUST NOT use the zero (0) vendor ID.
供应商ID值为零(0)对应于IETF采用的AVP值,由IANA管理。由于缺少供应商ID字段意味着所讨论的AVP不是特定于供应商的,因此实现不能使用零(0)个供应商ID。
The Data field is zero or more octets and contains information specific to the Attribute. The format and length of the Data field is determined by the AVP Code and AVP Length fields. The format of the Data field MUST be one of the following base data types or a data type derived from the base data types. In the event that a new Basic AVP Data Format is needed, a new version of this RFC must be created.
数据字段为零个或多个八位字节,包含特定于属性的信息。数据字段的格式和长度由AVP代码和AVP长度字段决定。数据字段的格式必须是以下基本数据类型之一或从基本数据类型派生的数据类型。如果需要新的基本AVP数据格式,则必须创建此RFC的新版本。
OctetString The data contains arbitrary data of variable length. Unless otherwise noted, the AVP Length field MUST be set to at least 8 (12 if the 'V' bit is enabled). AVP Values of this type that are not a multiple of four-octets in length is followed by the necessary padding so that the next AVP (if any) will start on a 32-bit boundary.
OctetString数据包含长度可变的任意数据。除非另有说明,否则AVP长度字段必须设置为至少8(如果启用了“V”位,则为12)。这种类型的AVP值的长度不是四个八位字节的倍数,随后是必要的填充,以便下一个AVP(如果有)将在32位边界上开始。
Integer32 32 bit signed value, in network byte order. The AVP Length field MUST be set to 12 (16 if the 'V' bit is enabled).
整数32位有符号值,按网络字节顺序。AVP长度字段必须设置为12(如果启用了“V”位,则设置为16)。
Integer64 64 bit signed value, in network byte order. The AVP Length field MUST be set to 16 (20 if the 'V' bit is enabled).
整数64位有符号值,按网络字节顺序。AVP长度字段必须设置为16(如果启用了“V”位,则设置为20)。
Unsigned32 32 bit unsigned value, in network byte order. The AVP Length field MUST be set to 12 (16 if the 'V' bit is enabled).
无符号32位无符号值,按网络字节顺序。AVP长度字段必须设置为12(如果启用了“V”位,则设置为16)。
Unsigned64 64 bit unsigned value, in network byte order. The AVP Length field MUST be set to 16 (20 if the 'V' bit is enabled).
无符号64位无符号值,按网络字节顺序。AVP长度字段必须设置为16(如果启用了“V”位,则设置为20)。
Float32 This represents floating point values of single precision as described by [FLOATPOINT]. The 32-bit value is transmitted in network byte order. The AVP Length field MUST be set to 12 (16 if the 'V' bit is enabled).
Float32表示单精度浮点值,如[FLOATPOINT]所述。32位值以网络字节顺序传输。AVP长度字段必须设置为12(如果启用了“V”位,则设置为16)。
Float64 This represents floating point values of double precision as described by [FLOATPOINT]. The 64-bit value is transmitted in network byte order. The AVP Length field MUST be set to 16 (20 if the 'V' bit is enabled).
Float64表示双精度浮点值,如[FLOATPOINT]所述。64位值以网络字节顺序传输。AVP长度字段必须设置为16(如果启用了“V”位,则设置为20)。
Grouped The Data field is specified as a sequence of AVPs. Each of these AVPs follows - in the order in which they are specified - including their headers and padding. The AVP Length field is set to 8 (12 if the 'V' bit is enabled) plus the total length of all included AVPs, including their headers and padding. Thus the AVP length field of an AVP of type Grouped is always a multiple of 4.
分组数据字段指定为AVP序列。这些AVP中的每一个都按照它们被指定的顺序,包括它们的头和填充。AVP长度字段设置为8(如果启用了“V”位,则为12)加上所有包含的AVP的总长度,包括其标题和填充。因此,分组类型的AVP的AVP长度字段始终是4的倍数。
In addition to using the Basic AVP Data Formats, applications may define data formats derived from the Basic AVP Data Formats. An application that defines new AVP Derived Data Formats MUST include them in a section entitled "AVP Derived Data Formats", using the same format as the definitions below. Each new definition must be either defined or listed with a reference to the RFC that defines the format.
除了使用基本AVP数据格式外,应用程序还可以定义从基本AVP数据格式派生的数据格式。定义新的AVP衍生数据格式的应用程序必须使用与以下定义相同的格式将其包含在标题为“AVP衍生数据格式”的部分中。每个新定义必须定义或列出,并引用定义格式的RFC。
The below AVP Derived Data Formats are commonly used by applications.
应用程序通常使用以下AVP派生的数据格式。
Address The Address format is derived from the OctetString AVP Base Format. It is a discriminated union, representing, for example a 32-bit (IPv4) [IPV4] or 128-bit (IPv6) [IPV6] address, most significant octet first. The first two octets of the Address
地址地址格式是从八进制字符串AVP基格式派生的。它是一个有区别的并集,例如表示32位(IPv4)[IPv4]或128位(IPv6)[IPv6]地址,最重要的八位位组在前。地址的前两个八位字节
AVP represents the AddressType, which contains an Address Family defined in [IANAADFAM]. The AddressType is used to discriminate the content and format of the remaining octets.
AVP表示AddressType,其中包含[IANAADFAM]中定义的地址族。AddressType用于区分剩余八位字节的内容和格式。
Time The Time format is derived from the OctetString AVP Base Format. The string MUST contain four octets, in the same format as the first four bytes are in the NTP timestamp format. The NTP Timestamp format is defined in chapter 3 of [SNTP].
时间时间格式是从八进制字符串AVP基本格式派生的。字符串必须包含四个八位字节,格式与前四个字节的NTP时间戳格式相同。NTP时间戳格式在[SNTP]第3章中定义。
This represents the number of seconds since 0h on 1 January 1900 with respect to the Coordinated Universal Time (UTC).
这表示自1900年1月1日0小时起相对于协调世界时(UTC)的秒数。
On 6h 28m 16s UTC, 7 February 2036 the time value will overflow. SNTP [SNTP] describes a procedure to extend the time to 2104. This procedure MUST be supported by all DIAMETER nodes.
2036年2月7日UTC时间6小时28米16秒,时间值将溢出。SNTP[SNTP]描述了将时间延长到2104的过程。所有直径节点都必须支持此过程。
UTF8String The UTF8String format is derived from the OctetString AVP Base Format. This is a human readable string represented using the ISO/IEC IS 10646-1 character set, encoded as an OctetString using the UTF-8 [UFT8] transformation format described in RFC 2279.
UTF8String UTF8String格式源自八进制字符串AVP基本格式。这是使用ISO/IEC is 10646-1字符集表示的人类可读字符串,使用RFC 2279中描述的UTF-8[UFT8]转换格式编码为八进制字符串。
Since additional code points are added by amendments to the 10646 standard from time to time, implementations MUST be prepared to encounter any code point from 0x00000001 to 0x7fffffff. Byte sequences that do not correspond to the valid encoding of a code point into UTF-8 charset or are outside this range are prohibited.
由于额外的代码点是通过对10646标准的不时修订而添加的,因此实现必须准备好遇到从0x00000001到0x7FFFFF的任何代码点。禁止与UTF-8字符集中的代码点的有效编码不对应或超出此范围的字节序列。
The use of control codes SHOULD be avoided. When it is necessary to represent a new line, the control code sequence CR LF SHOULD be used.
应避免使用控制代码。当需要表示新行时,应使用控制代码序列CR LF。
The use of leading or trailing white space SHOULD be avoided.
应避免使用前导或尾随空格。
For code points not directly supported by user interface hardware or software, an alternative means of entry and display, such as hexadecimal, MAY be provided.
对于用户界面硬件或软件不直接支持的代码点,可提供其他输入和显示方式,如十六进制。
For information encoded in 7-bit US-ASCII, the UTF-8 charset is identical to the US-ASCII charset.
对于以7位US-ASCII编码的信息,UTF-8字符集与US-ASCII字符集相同。
UTF-8 may require multiple bytes to represent a single character / code point; thus the length of an UTF8String in octets may be different from the number of characters encoded.
UTF-8可能需要多个字节来表示单个字符/代码点;因此,以八位字节为单位的UTF8字符串的长度可能与编码的字符数不同。
Note that the AVP Length field of an UTF8String is measured in octets, not characters.
请注意,UTF8String的AVP长度字段是以八位字节(而不是字符)度量的。
DiameterIdentity The DiameterIdentity format is derived from the OctetString AVP Base Format.
直径直径格式从八进制字符串AVP基本格式派生而来。
DiameterIdentity = FQDN
DiameterIdentity = FQDN
DiameterIdentity value is used to uniquely identify a Diameter node for purposes of duplicate connection and routing loop detection.
直径值用于唯一标识直径节点,以便重复连接和路由循环检测。
The contents of the string MUST be the FQDN of the Diameter node. If multiple Diameter nodes run on the same host, each Diameter node MUST be assigned a unique DiameterIdentity. If a Diameter node can be identified by several FQDNs, a single FQDN should be picked at startup, and used as the only DiameterIdentity for that node, whatever the connection it is sent on.
字符串的内容必须是Diameter节点的FQDN。如果多个直径节点在同一主机上运行,则必须为每个直径节点指定唯一的直径。如果一个直径节点可以由多个FQDN标识,则应在启动时选取一个FQDN,并将其用作该节点的唯一直径,无论其在何种连接上发送。
DiameterURI
直径
The DiameterURI MUST follow the Uniform Resource Identifiers (URI) syntax [URI] rules specified below:
DiameterURI必须遵循以下指定的统一资源标识符(URI)语法[URI]规则:
"aaa://" FQDN [ port ] [ transport ] [ protocol ]
"aaa://" FQDN [ port ] [ transport ] [ protocol ]
; No transport security
; 没有交通安全
"aaas://" FQDN [ port ] [ transport ] [ protocol ]
"aaas://" FQDN [ port ] [ transport ] [ protocol ]
; Transport security used
; 使用的运输安全
FQDN = Fully Qualified Host Name
FQDN = Fully Qualified Host Name
port = ":" 1*DIGIT
port = ":" 1*DIGIT
; One of the ports used to listen for ; incoming connections. ; If absent, ; the default Diameter port (3868) is ; assumed.
; One of the ports used to listen for ; incoming connections. ; If absent, ; the default Diameter port (3868) is ; assumed.
transport = ";transport=" transport-protocol
transport = ";transport=" transport-protocol
; One of the transports used to listen ; for incoming connections. If absent, ; the default SCTP [SCTP] protocol is ; assumed. UDP MUST NOT be used when ; the aaa-protocol field is set to ; diameter.
; One of the transports used to listen ; for incoming connections. If absent, ; the default SCTP [SCTP] protocol is ; assumed. UDP MUST NOT be used when ; the aaa-protocol field is set to ; diameter.
transport-protocol = ( "tcp" / "sctp" / "udp" )
transport-protocol = ( "tcp" / "sctp" / "udp" )
protocol = ";protocol=" aaa-protocol
protocol = ";protocol=" aaa-protocol
; If absent, the default AAA protocol ; is diameter.
; 如果没有,默认的AAA协议;是直径。
aaa-protocol = ( "diameter" / "radius" / "tacacs+" )
aaa-protocol = ( "diameter" / "radius" / "tacacs+" )
The following are examples of valid Diameter host identities:
以下是有效的Diameter主机标识的示例:
aaa://host.example.com;transport=tcp aaa://host.example.com:6666;transport=tcp aaa://host.example.com;protocol=diameter aaa://host.example.com:6666;protocol=diameter aaa://host.example.com:6666;transport=tcp;protocol=diameter aaa://host.example.com:1813;transport=udp;protocol=radius
aaa://host.example.com;transport=tcp aaa://host.example.com:6666;transport=tcp aaa://host.example.com;protocol=diameter aaa://host.example.com:6666;protocol=diameter aaa://host.example.com:6666;transport=tcp;protocol=diameter aaa://host.example.com:1813;transport=udp;protocol=radius
Enumerated Enumerated is derived from the Integer32 AVP Base Format. The definition contains a list of valid values and their interpretation and is described in the Diameter application introducing the AVP.
Enumerated Enumerated派生自Integer32 AVP基本格式。定义包含有效值及其解释的列表,并在介绍AVP的Diameter应用程序中进行了描述。
IPFilterRule The IPFilterRule format is derived from the OctetString AVP Base Format. It uses the ASCII charset. Packets may be filtered based on the following information that is associated with it:
IPFilterRule IPFilterRule格式源自八进制字符串AVP基本格式。它使用ASCII字符集。可以基于与分组相关联的以下信息来过滤分组:
Direction (in or out) Source and destination IP address (possibly masked) Protocol Source and destination port (lists or ranges) TCP flags IP fragment flag IP options ICMP types
方向(输入或输出)源和目标IP地址(可能被屏蔽)协议源和目标端口(列表或范围)TCP标志IP片段标志IP选项ICMP类型
Rules for the appropriate direction are evaluated in order, with the first matched rule terminating the evaluation. Each packet is evaluated once. If no rule matches, the packet is dropped if the last rule evaluated was a permit, and passed if the last rule was a deny.
相应方向的规则按顺序求值,第一个匹配的规则终止求值。每个数据包评估一次。如果没有匹配的规则,则如果最后一个评估的规则是许可证,则丢弃数据包;如果最后一个规则是拒绝,则传递数据包。
IPFilterRule filters MUST follow the format:
IPFilterRule筛选器必须遵循以下格式:
action dir proto from src to dst [options]
从src到dst的操作目录协议[选项]
action permit - Allow packets that match the rule. deny - Drop packets that match the rule.
操作允许-允许符合规则的数据包。拒绝-丢弃与规则匹配的数据包。
dir "in" is from the terminal, "out" is to the terminal.
dir“in”来自终端,“out”指向终端。
proto An IP protocol specified by number. The "ip" keyword means any protocol will match.
proto由数字指定的IP协议。“ip”关键字表示任何协议都将匹配。
src and dst <address/mask> [ports]
src and dst <address/mask> [ports]
The <address/mask> may be specified as: ipno An IPv4 or IPv6 number in dotted-quad or canonical IPv6 form. Only this exact IP number will match the rule. ipno/bits An IP number as above with a mask width of the form 1.2.3.4/24. In this case, all IP numbers from 1.2.3.0 to 1.2.3.255 will match. The bit width MUST be valid for the IP version and the IP number MUST NOT have bits set beyond the mask. For a match to occur, the same IP version must be present in the packet that was used in describing the IP address. To test for a particular IP version, the bits part can be set to zero. The keyword "any" is 0.0.0.0/0 or the IPv6 equivalent. The keyword "assigned" is the address or set of addresses assigned to the terminal. For IPv4, a typical first rule is often "deny in ip! assigned"
<address/mask>可以指定为:ipno一个虚线四元组或规范IPv6形式的IPv4或IPv6号码。只有这个确切的IP号码才符合规则。ipno/位如上所述的IP号,掩码宽度为1.2.3.4/24。在这种情况下,从1.2.3.0到1.2.3.255的所有IP号码都将匹配。位宽度必须对IP版本有效,并且IP编号的位设置不得超出掩码。要进行匹配,用于描述IP地址的数据包中必须存在相同的IP版本。要测试特定IP版本,可以将bits部分设置为零。关键字“any”是0.0.0.0/0或IPv6等效值。关键字“assigned”是指分配给终端的地址或地址集。对于IPv4,典型的第一条规则通常是“拒绝ip!分配”
The sense of the match can be inverted by preceding an address with the not modifier (!), causing all other addresses to be matched instead. This does not affect the selection of port numbers.
匹配的意义可以通过在地址前面加not修饰符(!)来颠倒,从而使所有其他地址都匹配。这不会影响端口号的选择。
With the TCP, UDP and SCTP protocols, optional ports may be specified as:
对于TCP、UDP和SCTP协议,可选端口可以指定为:
{port/port-port}[,ports[,...]]
{port/port-port}[,ports[,...]]
The '-' notation specifies a range of ports (including boundaries).
“-”符号指定端口范围(包括边界)。
Fragmented packets that have a non-zero offset (i.e., not the first fragment) will never match a rule that has one or more port specifications. See the frag option for details on matching fragmented packets.
具有非零偏移量(即,不是第一个片段)的分段数据包将永远不会与具有一个或多个端口规范的规则匹配。有关匹配碎片数据包的详细信息,请参阅frag选项。
options: frag Match if the packet is a fragment and this is not the first fragment of the datagram. frag may not be used in conjunction with either tcpflags or TCP/UDP port specifications.
选项:如果数据包是一个片段,而这不是数据报的第一个片段,则frag匹配。frag不能与tcpflags或TCP/UDP端口规范一起使用。
ipoptions spec Match if the IP header contains the comma separated list of options specified in spec. The supported IP options are:
如果IP标头包含规范中指定的以逗号分隔的选项列表,则ipoptions规范匹配。支持的IP选项包括:
ssrr (strict source route), lsrr (loose source route), rr (record packet route) and ts (timestamp). The absence of a particular option may be denoted with a '!'.
ssrr(严格源路由)、lsrr(松散源路由)、rr(记录包路由)和ts(时间戳)。没有特定选项可以用“!”表示。
tcpoptions spec Match if the TCP header contains the comma separated list of options specified in spec. The supported TCP options are:
如果TCP标头包含规范中指定的以逗号分隔的选项列表,则tcpoptions规范匹配。支持的TCP选项包括:
mss (maximum segment size), window (tcp window advertisement), sack (selective ack), ts (rfc1323 timestamp) and cc (rfc1644 t/tcp connection count). The absence of a particular option may be denoted with a '!'.
mss(最大段大小)、窗口(tcp窗口广告)、sack(选择性确认)、ts(rfc1323时间戳)和cc(rfc1644 t/tcp连接计数)。没有特定选项可以用“!”表示。
established TCP packets only. Match packets that have the RST or ACK bits set.
仅已建立TCP数据包。匹配设置了RST或ACK位的数据包。
setup TCP packets only. Match packets that have the SYN bit set but no ACK bit.
仅设置TCP数据包。匹配设置了SYN位但没有ACK位的数据包。
tcpflags spec TCP packets only. Match if the TCP header contains the comma separated list of flags specified in spec. The supported TCP flags are:
tcpflags仅用于规范TCP数据包。如果TCP标头包含规范中指定的以逗号分隔的标志列表,则匹配。支持的TCP标志为:
fin, syn, rst, psh, ack and urg. The absence of a particular flag may be denoted with a '!'. A rule that contains a tcpflags specification can never match a fragmented packet that has a non-zero offset. See the frag option for details on matching fragmented packets.
fin、syn、rst、psh、ack和urg。没有特定标志可用“!”表示。包含tcpflags规范的规则永远无法匹配具有非零偏移量的碎片数据包。有关匹配碎片数据包的详细信息,请参阅frag选项。
icmptypes types ICMP packets only. Match if the ICMP type is in the list types. The list may be specified as any combination of ranges or individual types separated by commas. Both the numeric values and the symbolic values listed below can be used. The supported ICMP types are:
icmptypes仅类型ICMP数据包。如果ICMP类型在列表类型中,则匹配。该列表可以指定为范围的任意组合或以逗号分隔的单个类型。可以使用下面列出的数值和符号值。支持的ICMP类型包括:
echo reply (0), destination unreachable (3), source quench (4), redirect (5), echo request (8), router advertisement (9), router solicitation (10), time-to-live exceeded (11), IP header bad (12), timestamp request (13), timestamp reply (14), information request (15), information reply (16), address mask request (17) and address mask reply (18).
回显回复(0)、目标不可到达(3)、源猝灭(4)、重定向(5)、回显请求(8)、路由器通告(9)、路由器请求(10)、超过生存时间(11)、IP报头错误(12)、时间戳请求(13)、时间戳回复(14)、信息请求(15)、信息回复(16)、地址掩码请求(17)和地址掩码回复(18)。
There is one kind of packet that the access device MUST always discard, that is an IP fragment with a fragment offset of one. This is a valid packet, but it only has one use, to try to circumvent firewalls.
有一种数据包,接入设备必须始终丢弃,即片段偏移量为1的IP片段。这是一个有效的数据包,但它只有一个用途,即试图绕过防火墙。
An access device that is unable to interpret or apply a deny rule MUST terminate the session. An access device that is unable to interpret or apply a permit rule MAY apply a more restrictive rule. An access device MAY apply deny rules of its own before the supplied rules, for example to protect the access device owner's infrastructure.
无法解释或应用拒绝规则的访问设备必须终止会话。无法解释或应用许可证规则的访问设备可以应用更严格的规则。接入设备可在提供的规则之前应用其自身的拒绝规则,例如,以保护接入设备所有者的基础设施。
The rule syntax is a modified subset of ipfw(8) from FreeBSD, and the ipfw.c code may provide a useful base for implementations.
规则语法是FreeBSD中ipfw(8)的一个修改子集,ipfw.c代码可以为实现提供有用的基础。
QoSFilterRule The QosFilterRule format is derived from the OctetString AVP Base Format. It uses the ASCII charset. Packets may be marked or metered based on the following information that is associated with it:
QoSFilterRule QoSFilterRule格式源自八进制字符串AVP基本格式。它使用ASCII字符集。可以基于与数据包相关联的以下信息对数据包进行标记或计量:
Direction (in or out) Source and destination IP address (possibly masked) Protocol Source and destination port (lists or ranges) DSCP values (no mask or range)
方向(输入或输出)源和目标IP地址(可能被屏蔽)协议源和目标端口(列表或范围)DSCP值(无屏蔽或范围)
Rules for the appropriate direction are evaluated in order, with the first matched rule terminating the evaluation. Each packet is evaluated once. If no rule matches, the packet is treated as best effort. An access device that is unable to interpret or apply a QoS rule SHOULD NOT terminate the session.
相应方向的规则按顺序求值,第一个匹配的规则终止求值。每个数据包评估一次。如果没有匹配的规则,则将数据包视为最大努力。无法解释或应用QoS规则的访问设备不应终止会话。
QoSFilterRule filters MUST follow the format:
QoSFilterRule筛选器必须遵循以下格式:
action dir proto from src to dst [options]
从src到dst的操作目录协议[选项]
tag - Mark packet with a specific DSCP [DIFFSERV]. The DSCP option MUST be included. meter - Meter traffic. The metering options MUST be included.
使用特定的DSCP[DIFFSERV]标记数据包。必须包括DSCP选项。米-米交通。必须包括计量选项。
dir The format is as described under IPFilterRule.
dir格式如IPFilterRule中所述。
proto The format is as described under IPFilterRule.
proto格式如IPFilterRule中所述。
src and dst The format is as described under IPFilterRule.
src和dst格式如IPFilterRule中所述。
The Diameter protocol allows AVP values of type 'Grouped.' This implies that the Data field is actually a sequence of AVPs. It is possible to include an AVP with a Grouped type within a Grouped type, that is, to nest them. AVPs within an AVP of type Grouped have the same padding requirements as non-Grouped AVPs, as defined in Section 4.
Diameter协议允许“分组”类型的AVP值。这意味着数据字段实际上是AVP序列。可以在分组类型中包含分组类型的AVP,即嵌套它们。根据第4节的定义,分组类型AVP中的AVP与非分组AVP具有相同的填充要求。
The AVP Code numbering space of all AVPs included in a Grouped AVP is the same as for non-grouped AVPs. Further, if any of the AVPs encapsulated within a Grouped AVP has the 'M' (mandatory) bit set, the Grouped AVP itself MUST also include the 'M' bit set.
分组AVP中包含的所有AVP的AVP代码编号空间与非分组AVP的相同。此外,如果封装在分组AVP中的任何AVP具有“M”(强制)位集,则分组AVP本身也必须包括“M”位集。
Every Grouped AVP defined MUST include a corresponding grammar, using ABNF [ABNF] (with modifications), as defined below.
定义的每个分组AVP必须包括使用ABNF[ABNF](有修改)的相应语法,定义如下。
grouped-avp-def = name "::=" avp
grouped-avp-def = name "::=" avp
name-fmt = ALPHA *(ALPHA / DIGIT / "-")
name-fmt = ALPHA *(ALPHA / DIGIT / "-")
name = name-fmt ; The name has to be the name of an AVP, ; defined in the base or extended Diameter ; specifications.
name = name-fmt ; The name has to be the name of an AVP, ; defined in the base or extended Diameter ; specifications.
avp = header [ *fixed] [ *required] [ *optional] [ *fixed]
avp = header [ *fixed] [ *required] [ *optional] [ *fixed]
header = "<" "AVP-Header:" avpcode [vendor] ">"
header = "<" "AVP-Header:" avpcode [vendor] ">"
avpcode = 1*DIGIT ; The AVP Code assigned to the Grouped AVP
avpcode = 1*DIGIT ; The AVP Code assigned to the Grouped AVP
vendor = 1*DIGIT ; The Vendor-ID assigned to the Grouped AVP. ; If absent, the default value of zero is ; used.
vendor = 1*DIGIT ; The Vendor-ID assigned to the Grouped AVP. ; If absent, the default value of zero is ; used.
The Example-AVP (AVP Code 999999) is of type Grouped and is used to clarify how Grouped AVP values work. The Grouped Data field has the following ABNF grammar:
示例AVP(AVP代码999999)属于分组类型,用于阐明分组AVP值的工作原理。分组数据字段具有以下ABNF语法:
Example-AVP ::= < AVP Header: 999999 > { Origin-Host } 1*{ Session-Id } *[ AVP ]
Example-AVP ::= < AVP Header: 999999 > { Origin-Host } 1*{ Session-Id } *[ AVP ]
An Example-AVP with Grouped Data follows.
下面是分组数据的AVP示例。
The Origin-Host AVP is required (Section 6.3). In this case:
需要原始主机AVP(第6.3节)。在这种情况下:
Origin-Host = "example.com".
Origin Host=“example.com”。
One or more Session-Ids must follow. Here there are two:
必须遵循一个或多个会话ID。这里有两个:
Session-Id = "grump.example.com:33041;23432;893;0AF3B81"
Session-Id = "grump.example.com:33041;23432;893;0AF3B81"
Session-Id = "grump.example.com:33054;23561;2358;0AF3B82"
Session-Id = "grump.example.com:33054;23561;2358;0AF3B82"
optional AVPs included are
包括可选的AVP
Recovery-Policy = <binary> 2163bc1d0ad82371f6bc09484133c3f09ad74a0dd5346d54195a7cf0b35 2cabc881839a4fdcfbc1769e2677a4c1fb499284c5f70b48f58503a45c5 c2d6943f82d5930f2b7c1da640f476f0e9c9572a50db8ea6e51e1c2c7bd f8bb43dc995144b8dbe297ac739493946803e1cee3e15d9b765008a1b2a cf4ac777c80041d72c01e691cf751dbf86e85f509f3988e5875dc905119 26841f00f0e29a6d1ddc1a842289d440268681e052b30fb638045f7779c 1d873c784f054f688f5001559ecff64865ef975f3e60d2fd7966b8c7f92
Recovery-Policy = <binary> 2163bc1d0ad82371f6bc09484133c3f09ad74a0dd5346d54195a7cf0b35 2cabc881839a4fdcfbc1769e2677a4c1fb499284c5f70b48f58503a45c5 c2d6943f82d5930f2b7c1da640f476f0e9c9572a50db8ea6e51e1c2c7bd f8bb43dc995144b8dbe297ac739493946803e1cee3e15d9b765008a1b2a cf4ac777c80041d72c01e691cf751dbf86e85f509f3988e5875dc905119 26841f00f0e29a6d1ddc1a842289d440268681e052b30fb638045f7779c 1d873c784f054f688f5001559ecff64865ef975f3e60d2fd7966b8c7f92
Futuristic-Acct-Record = <binary> fe19da5802acd98b07a5b86cb4d5d03f0314ab9ef1ad0b67111ff3b90a0 57fe29620bf3585fd2dd9fcc38ce62f6cc208c6163c008f4258d1bc88b8 17694a74ccad3ec69269461b14b2e7a4c111fb239e33714da207983f58c 41d018d56fe938f3cbf089aac12a912a2f0d1923a9390e5f789cb2e5067 d3427475e49968f841
Futuristic-Acct-Record = <binary> fe19da5802acd98b07a5b86cb4d5d03f0314ab9ef1ad0b67111ff3b90a0 57fe29620bf3585fd2dd9fcc38ce62f6cc208c6163c008f4258d1bc88b8 17694a74ccad3ec69269461b14b2e7a4c111fb239e33714da207983f58c 41d018d56fe938f3cbf089aac12a912a2f0d1923a9390e5f789cb2e5067 d3427475e49968f841
The data for the optional AVPs is represented in hex since the format of these AVPs is neither known at the time of definition of the Example-AVP group, nor (likely) at the time when the example instance of this AVP is interpreted - except by Diameter implementations which support the same set of AVPs. The encoding example illustrates how padding is used and how length fields are calculated. Also note that AVPs may be present in the Grouped AVP value which the receiver cannot interpret (here, the Recover-Policy and Futuristic-Acct-Record AVPs).
可选AVP的数据以十六进制表示,因为在定义示例AVP组时,这些AVP的格式既不已知,也不(可能)在解释该AVP的示例实例时,这些AVP的格式也不已知-除了通过支持同一组AVP的Diameter实现。编码示例说明了如何使用填充以及如何计算长度字段。还要注意,AVP可能存在于分组的AVP值中,而接收方无法解释该值(此处为恢复策略和未来的Acct记录AVP)。
This AVP would be encoded as follows:
该AVP编码如下:
0 1 2 3 4 5 6 7 +-------+-------+-------+-------+-------+-------+-------+-------+ 0 | Example AVP Header (AVP Code = 999999), Length = 468 | +-------+-------+-------+-------+-------+-------+-------+-------+ 8 | Origin-Host AVP Header (AVP Code = 264), Length = 19 | +-------+-------+-------+-------+-------+-------+-------+-------+ 16 | 'e' | 'x' | 'a' | 'm' | 'p' | 'l' | 'e' | '.' | +-------+-------+-------+-------+-------+-------+-------+-------+ 24 | 'c' | 'o' | 'm' |Padding| Session-Id AVP Header | +-------+-------+-------+-------+-------+-------+-------+-------+ 32 | (AVP Code = 263), Length = 50 | 'g' | 'r' | 'u' | 'm' | +-------+-------+-------+-------+-------+-------+-------+-------+ . . . +-------+-------+-------+-------+-------+-------+-------+-------+ 64 | 'A' | 'F' | '3' | 'B' | '8' | '1' |Padding|Padding| +-------+-------+-------+-------+-------+-------+-------+-------+ 72 | Session-Id AVP Header (AVP Code = 263), Length = 51 | +-------+-------+-------+-------+-------+-------+-------+-------+ 80 | 'g' | 'r' | 'u' | 'm' | 'p' | '.' | 'e' | 'x' | +-------+-------+-------+-------+-------+-------+-------+-------+ . . . +-------+-------+-------+-------+-------+-------+-------+-------+ 104 | '0' | 'A' | 'F' | '3' | 'B' | '8' | '2' |Padding| +-------+-------+-------+-------+-------+-------+-------+-------+ 112 | Recovery-Policy Header (AVP Code = 8341), Length = 223 | +-------+-------+-------+-------+-------+-------+-------+-------+ 120 | 0x21 | 0x63 | 0xbc | 0x1d | 0x0a | 0xd8 | 0x23 | 0x71 | +-------+-------+-------+-------+-------+-------+-------+-------+ . . . +-------+-------+-------+-------+-------+-------+-------+-------+ 320 | 0x2f | 0xd7 | 0x96 | 0x6b | 0x8c | 0x7f | 0x92 |Padding| +-------+-------+-------+-------+-------+-------+-------+-------+ 328 | Futuristic-Acct-Record Header (AVP Code = 15930), Length = 137| +-------+-------+-------+-------+-------+-------+-------+-------+ 336 | 0xfe | 0x19 | 0xda | 0x58 | 0x02 | 0xac | 0xd9 | 0x8b | +-------+-------+-------+-------+-------+-------+-------+-------+ . . . +-------+-------+-------+-------+-------+-------+-------+-------+ 464 | 0x41 |Padding|Padding|Padding| +-------+-------+-------+-------+
0 1 2 3 4 5 6 7 +-------+-------+-------+-------+-------+-------+-------+-------+ 0 | Example AVP Header (AVP Code = 999999), Length = 468 | +-------+-------+-------+-------+-------+-------+-------+-------+ 8 | Origin-Host AVP Header (AVP Code = 264), Length = 19 | +-------+-------+-------+-------+-------+-------+-------+-------+ 16 | 'e' | 'x' | 'a' | 'm' | 'p' | 'l' | 'e' | '.' | +-------+-------+-------+-------+-------+-------+-------+-------+ 24 | 'c' | 'o' | 'm' |Padding| Session-Id AVP Header | +-------+-------+-------+-------+-------+-------+-------+-------+ 32 | (AVP Code = 263), Length = 50 | 'g' | 'r' | 'u' | 'm' | +-------+-------+-------+-------+-------+-------+-------+-------+ . . . +-------+-------+-------+-------+-------+-------+-------+-------+ 64 | 'A' | 'F' | '3' | 'B' | '8' | '1' |Padding|Padding| +-------+-------+-------+-------+-------+-------+-------+-------+ 72 | Session-Id AVP Header (AVP Code = 263), Length = 51 | +-------+-------+-------+-------+-------+-------+-------+-------+ 80 | 'g' | 'r' | 'u' | 'm' | 'p' | '.' | 'e' | 'x' | +-------+-------+-------+-------+-------+-------+-------+-------+ . . . +-------+-------+-------+-------+-------+-------+-------+-------+ 104 | '0' | 'A' | 'F' | '3' | 'B' | '8' | '2' |Padding| +-------+-------+-------+-------+-------+-------+-------+-------+ 112 | Recovery-Policy Header (AVP Code = 8341), Length = 223 | +-------+-------+-------+-------+-------+-------+-------+-------+ 120 | 0x21 | 0x63 | 0xbc | 0x1d | 0x0a | 0xd8 | 0x23 | 0x71 | +-------+-------+-------+-------+-------+-------+-------+-------+ . . . +-------+-------+-------+-------+-------+-------+-------+-------+ 320 | 0x2f | 0xd7 | 0x96 | 0x6b | 0x8c | 0x7f | 0x92 |Padding| +-------+-------+-------+-------+-------+-------+-------+-------+ 328 | Futuristic-Acct-Record Header (AVP Code = 15930), Length = 137| +-------+-------+-------+-------+-------+-------+-------+-------+ 336 | 0xfe | 0x19 | 0xda | 0x58 | 0x02 | 0xac | 0xd9 | 0x8b | +-------+-------+-------+-------+-------+-------+-------+-------+ . . . +-------+-------+-------+-------+-------+-------+-------+-------+ 464 | 0x41 |Padding|Padding|Padding| +-------+-------+-------+-------+
The following table describes the Diameter AVPs defined in the base protocol, their AVP Code values, types, possible flag values and whether the AVP MAY be encrypted. For the originator of a Diameter message, "Encr" (Encryption) means that if a message containing that AVP is to be sent via a Diameter agent (proxy, redirect or relay) then the message MUST NOT be sent unless there is end-to-end security between the originator and the recipient and integrity / confidentiality protection is offered for this AVP OR the originator has locally trusted configuration that indicates that end-to-end security is not needed. Similarly, for the originator of a Diameter message, a "P" in the "MAY" column means that if a message containing that AVP is to be sent via a Diameter agent (proxy, redirect or relay) then the message MUST NOT be sent unless there is end-to-end security between the originator and the recipient or the originator has locally trusted configuration that indicates that end-to-end security is not needed.
下表描述了基本协议中定义的Diameter AVP、其AVP代码值、类型、可能的标志值以及AVP是否可以加密。对于Diameter消息的发起者,“Encr”(加密)表示如果包含该AVP的消息将通过Diameter代理(代理、重定向或中继)发送然后,除非发端人和收件人之间存在端到端安全,并且为该AVP提供了完整性/机密性保护,或者发端人具有表明不需要端到端安全的本地受信任配置,否则不得发送消息。类似地,对于Diameter消息的发起人,“可能”列中的“P”表示如果包含该AVP的消息将通过Diameter代理(代理、重定向或中继)发送然后,除非发端人和收件人之间存在端到端安全性,或者发端人具有本地受信任的配置,表明不需要端到端安全性,否则不得发送邮件。
Due to space constraints, the short form DiamIdent is used to represent DiameterIdentity.
由于空间限制,使用缩写形式的二元齿来表示直径。
+---------------------+ | AVP Flag rules | |----+-----+----+-----|----+ AVP Section | | |SHLD| MUST| | Attribute Name Code Defined Data Type |MUST| MAY | NOT| NOT|Encr| -----------------------------------------|----+-----+----+-----|----| Acct- 85 9.8.2 Unsigned32 | M | P | | V | Y | Interim-Interval | | | | | | Accounting- 483 9.8.7 Enumerated | M | P | | V | Y | Realtime-Required | | | | | | Acct- 50 9.8.5 UTF8String | M | P | | V | Y | Multi-Session-Id | | | | | | Accounting- 485 9.8.3 Unsigned32 | M | P | | V | Y | Record-Number | | | | | | Accounting- 480 9.8.1 Enumerated | M | P | | V | Y | Record-Type | | | | | | Accounting- 44 9.8.4 OctetString| M | P | | V | Y | Session-Id | | | | | | Accounting- 287 9.8.6 Unsigned64 | M | P | | V | Y | Sub-Session-Id | | | | | | Acct- 259 6.9 Unsigned32 | M | P | | V | N | Application-Id | | | | | | Auth- 258 6.8 Unsigned32 | M | P | | V | N | Application-Id | | | | | | Auth-Request- 274 8.7 Enumerated | M | P | | V | N | Type | | | | | | Authorization- 291 8.9 Unsigned32 | M | P | | V | N | Lifetime | | | | | | Auth-Grace- 276 8.10 Unsigned32 | M | P | | V | N | Period | | | | | | Auth-Session- 277 8.11 Enumerated | M | P | | V | N | State | | | | | | Re-Auth-Request- 285 8.12 Enumerated | M | P | | V | N | Type | | | | | | Class 25 8.20 OctetString| M | P | | V | Y | Destination-Host 293 6.5 DiamIdent | M | P | | V | N | Destination- 283 6.6 DiamIdent | M | P | | V | N | Realm | | | | | | Disconnect-Cause 273 5.4.3 Enumerated | M | P | | V | N | E2E-Sequence AVP 300 6.15 Grouped | M | P | | V | Y | Error-Message 281 7.3 UTF8String | | P | | V,M | N | Error-Reporting- 294 7.4 DiamIdent | | P | | V,M | N | Host | | | | | | Event-Timestamp 55 8.21 Time | M | P | | V | N | Experimental- 297 7.6 Grouped | M | P | | V | N | Result | | | | | | -----------------------------------------|----+-----+----+-----|----|
+---------------------+ | AVP Flag rules | |----+-----+----+-----|----+ AVP Section | | |SHLD| MUST| | Attribute Name Code Defined Data Type |MUST| MAY | NOT| NOT|Encr| -----------------------------------------|----+-----+----+-----|----| Acct- 85 9.8.2 Unsigned32 | M | P | | V | Y | Interim-Interval | | | | | | Accounting- 483 9.8.7 Enumerated | M | P | | V | Y | Realtime-Required | | | | | | Acct- 50 9.8.5 UTF8String | M | P | | V | Y | Multi-Session-Id | | | | | | Accounting- 485 9.8.3 Unsigned32 | M | P | | V | Y | Record-Number | | | | | | Accounting- 480 9.8.1 Enumerated | M | P | | V | Y | Record-Type | | | | | | Accounting- 44 9.8.4 OctetString| M | P | | V | Y | Session-Id | | | | | | Accounting- 287 9.8.6 Unsigned64 | M | P | | V | Y | Sub-Session-Id | | | | | | Acct- 259 6.9 Unsigned32 | M | P | | V | N | Application-Id | | | | | | Auth- 258 6.8 Unsigned32 | M | P | | V | N | Application-Id | | | | | | Auth-Request- 274 8.7 Enumerated | M | P | | V | N | Type | | | | | | Authorization- 291 8.9 Unsigned32 | M | P | | V | N | Lifetime | | | | | | Auth-Grace- 276 8.10 Unsigned32 | M | P | | V | N | Period | | | | | | Auth-Session- 277 8.11 Enumerated | M | P | | V | N | State | | | | | | Re-Auth-Request- 285 8.12 Enumerated | M | P | | V | N | Type | | | | | | Class 25 8.20 OctetString| M | P | | V | Y | Destination-Host 293 6.5 DiamIdent | M | P | | V | N | Destination- 283 6.6 DiamIdent | M | P | | V | N | Realm | | | | | | Disconnect-Cause 273 5.4.3 Enumerated | M | P | | V | N | E2E-Sequence AVP 300 6.15 Grouped | M | P | | V | Y | Error-Message 281 7.3 UTF8String | | P | | V,M | N | Error-Reporting- 294 7.4 DiamIdent | | P | | V,M | N | Host | | | | | | Event-Timestamp 55 8.21 Time | M | P | | V | N | Experimental- 297 7.6 Grouped | M | P | | V | N | Result | | | | | | -----------------------------------------|----+-----+----+-----|----|
+---------------------+ | AVP Flag rules | |----+-----+----+-----|----+ AVP Section | | |SHLD| MUST|MAY | Attribute Name Code Defined Data Type |MUST| MAY | NOT| NOT|Encr| -----------------------------------------|----+-----+----+-----|----| Experimental- 298 7.7 Unsigned32 | M | P | | V | N | Result-Code | | | | | | Failed-AVP 279 7.5 Grouped | M | P | | V | N | Firmware- 267 5.3.4 Unsigned32 | | | |P,V,M| N | Revision | | | | | | Host-IP-Address 257 5.3.5 Address | M | P | | V | N | Inband-Security | M | P | | V | N | -Id 299 6.10 Unsigned32 | | | | | | Multi-Round- 272 8.19 Unsigned32 | M | P | | V | Y | Time-Out | | | | | | Origin-Host 264 6.3 DiamIdent | M | P | | V | N | Origin-Realm 296 6.4 DiamIdent | M | P | | V | N | Origin-State-Id 278 8.16 Unsigned32 | M | P | | V | N | Product-Name 269 5.3.7 UTF8String | | | |P,V,M| N | Proxy-Host 280 6.7.3 DiamIdent | M | | | P,V | N | Proxy-Info 284 6.7.2 Grouped | M | | | P,V | N | Proxy-State 33 6.7.4 OctetString| M | | | P,V | N | Redirect-Host 292 6.12 DiamURI | M | P | | V | N | Redirect-Host- 261 6.13 Enumerated | M | P | | V | N | Usage | | | | | | Redirect-Max- 262 6.14 Unsigned32 | M | P | | V | N | Cache-Time | | | | | | Result-Code 268 7.1 Unsigned32 | M | P | | V | N | Route-Record 282 6.7.1 DiamIdent | M | | | P,V | N | Session-Id 263 8.8 UTF8String | M | P | | V | Y | Session-Timeout 27 8.13 Unsigned32 | M | P | | V | N | Session-Binding 270 8.17 Unsigned32 | M | P | | V | Y | Session-Server- 271 8.18 Enumerated | M | P | | V | Y | Failover | | | | | | Supported- 265 5.3.6 Unsigned32 | M | P | | V | N | Vendor-Id | | | | | | Termination- 295 8.15 Enumerated | M | P | | V | N | Cause | | | | | | User-Name 1 8.14 UTF8String | M | P | | V | Y | Vendor-Id 266 5.3.3 Unsigned32 | M | P | | V | N | Vendor-Specific- 260 6.11 Grouped | M | P | | V | N | Application-Id | | | | | | -----------------------------------------|----+-----+----+-----|----|
+---------------------+ | AVP Flag rules | |----+-----+----+-----|----+ AVP Section | | |SHLD| MUST|MAY | Attribute Name Code Defined Data Type |MUST| MAY | NOT| NOT|Encr| -----------------------------------------|----+-----+----+-----|----| Experimental- 298 7.7 Unsigned32 | M | P | | V | N | Result-Code | | | | | | Failed-AVP 279 7.5 Grouped | M | P | | V | N | Firmware- 267 5.3.4 Unsigned32 | | | |P,V,M| N | Revision | | | | | | Host-IP-Address 257 5.3.5 Address | M | P | | V | N | Inband-Security | M | P | | V | N | -Id 299 6.10 Unsigned32 | | | | | | Multi-Round- 272 8.19 Unsigned32 | M | P | | V | Y | Time-Out | | | | | | Origin-Host 264 6.3 DiamIdent | M | P | | V | N | Origin-Realm 296 6.4 DiamIdent | M | P | | V | N | Origin-State-Id 278 8.16 Unsigned32 | M | P | | V | N | Product-Name 269 5.3.7 UTF8String | | | |P,V,M| N | Proxy-Host 280 6.7.3 DiamIdent | M | | | P,V | N | Proxy-Info 284 6.7.2 Grouped | M | | | P,V | N | Proxy-State 33 6.7.4 OctetString| M | | | P,V | N | Redirect-Host 292 6.12 DiamURI | M | P | | V | N | Redirect-Host- 261 6.13 Enumerated | M | P | | V | N | Usage | | | | | | Redirect-Max- 262 6.14 Unsigned32 | M | P | | V | N | Cache-Time | | | | | | Result-Code 268 7.1 Unsigned32 | M | P | | V | N | Route-Record 282 6.7.1 DiamIdent | M | | | P,V | N | Session-Id 263 8.8 UTF8String | M | P | | V | Y | Session-Timeout 27 8.13 Unsigned32 | M | P | | V | N | Session-Binding 270 8.17 Unsigned32 | M | P | | V | Y | Session-Server- 271 8.18 Enumerated | M | P | | V | Y | Failover | | | | | | Supported- 265 5.3.6 Unsigned32 | M | P | | V | N | Vendor-Id | | | | | | Termination- 295 8.15 Enumerated | M | P | | V | N | Cause | | | | | | User-Name 1 8.14 UTF8String | M | P | | V | Y | Vendor-Id 266 5.3.3 Unsigned32 | M | P | | V | N | Vendor-Specific- 260 6.11 Grouped | M | P | | V | N | Application-Id | | | | | | -----------------------------------------|----+-----+----+-----|----|
This section describes how Diameter nodes establish connections and communicate with peers.
本节介绍Diameter节点如何建立连接并与对等节点通信。
Although a Diameter node may have many possible peers that it is able to communicate with, it may not be economical to have an established connection to all of them. At a minimum, a Diameter node SHOULD have an established connection with two peers per realm, known as the primary and secondary peers. Of course, a node MAY have additional connections, if it is deemed necessary. Typically, all messages for a realm are sent to the primary peer, but in the event that failover procedures are invoked, any pending requests are sent to the secondary peer. However, implementations are free to load balance requests between a set of peers.
尽管Diameter节点可能有许多可能的对等节点,可以与之通信,但建立与所有对等节点的连接可能并不经济。至少,Diameter节点应该与每个领域的两个对等点建立连接,称为主对等点和辅助对等点。当然,如果认为有必要,节点可以有额外的连接。通常,域的所有消息都会发送到主对等方,但在调用故障转移过程的情况下,任何挂起的请求都会发送到辅助对等方。但是,实现可以在一组对等方之间自由地负载平衡请求。
Note that a given peer MAY act as a primary for a given realm, while acting as a secondary for another realm.
请注意,给定的对等方可以作为给定领域的主服务器,而作为另一领域的辅助服务器。
When a peer is deemed suspect, which could occur for various reasons, including not receiving a DWA within an allotted timeframe, no new requests should be forwarded to the peer, but failover procedures are invoked. When an active peer is moved to this mode, additional connections SHOULD be established to ensure that the necessary number of active connections exists.
当一个对等方被视为可疑时,可能由于各种原因(包括在分配的时间范围内未接收到DWA),不应向该对等方转发新请求,但会调用故障转移过程。当活动对等方移动到此模式时,应建立额外的连接,以确保存在必要数量的活动连接。
There are two ways that a peer is removed from the suspect peer list:
有两种方法可以从可疑对等方列表中删除对等方:
1. The peer is no longer reachable, causing the transport connection to be shutdown. The peer is moved to the closed state.
1. 对等方不再可访问,导致传输连接关闭。对等方被移动到关闭状态。
2. Three watchdog messages are exchanged with accepted round trip times, and the connection to the peer is considered stabilized.
2. 三条看门狗消息以可接受的往返时间交换,与对等方的连接被认为是稳定的。
In the event the peer being removed is either the primary or secondary, an alternate peer SHOULD replace the deleted peer, and assume the role of either primary or secondary.
如果要删除的对等方是主对等方或次对等方,则应使用备用对等方替换已删除的对等方,并担任主对等方或次对等方的角色。
Allowing for dynamic Diameter agent discovery will make it possible for simpler and more robust deployment of Diameter services. In order to promote interoperable implementations of Diameter peer discovery, the following mechanisms are described. These are based
允许动态Diameter代理发现将使Diameter服务的部署更简单、更健壮。为了促进Diameter对等发现的互操作实现,描述了以下机制。这些都是基于
on existing IETF standards. The first option (manual configuration) MUST be supported by all DIAMETER nodes, while the latter two options (SRVLOC and DNS) MAY be supported.
基于现有的IETF标准。第一个选项(手动配置)必须由所有DIAMETER节点支持,而后两个选项(SRVLOC和DNS)可能受支持。
There are two cases where Diameter peer discovery may be performed. The first is when a Diameter client needs to discover a first-hop Diameter agent. The second case is when a Diameter agent needs to discover another agent - for further handling of a Diameter operation. In both cases, the following 'search order' is recommended:
有两种情况可以执行Diameter对等发现。第一个是Diameter客户端需要发现第一跳Diameter代理时。第二种情况是,Diameter代理需要发现另一个代理,以便进一步处理Diameter操作。在这两种情况下,建议采用以下“搜索顺序”:
1. The Diameter implementation consults its list of static (manually) configured Diameter agent locations. These will be used if they exist and respond.
1. Diameter实现参考其静态(手动)配置的Diameter代理位置列表。如果它们存在并响应,将使用它们。
2. The Diameter implementation uses SLPv2 [SLP] to discover Diameter services. The Diameter service template [TEMPLATE] is included in Appendix A.
2. Diameter实现使用SLPv2[SLP]来发现Diameter服务。直径服务模板[模板]包含在附录A中。
It is recommended that SLPv2 security be deployed (this requires distributing keys to SLPv2 agents). This is discussed further in Appendix A. SLPv2 security SHOULD be used (requiring distribution of keys to SLPv2 agents) in order to ensure that discovered peers are authorized for their roles. SLPv2 is discussed further in Appendix A.
建议部署SLPv2安全性(这需要向SLPv2代理分发密钥)。这将在附录A中进一步讨论。应使用SLPv2安全性(要求向SLPv2代理分发密钥),以确保发现的对等方被授权担任其角色。SLPv2将在附录A中进一步讨论。
3. The Diameter implementation performs a NAPTR query for a server in a particular realm. The Diameter implementation has to know in advance which realm to look for a Diameter agent in. This could be deduced, for example, from the 'realm' in a NAI that a Diameter implementation needed to perform a Diameter operation on.
3. Diameter实现为特定领域中的服务器执行NAPTR查询。Diameter实现必须提前知道在哪个领域中查找Diameter代理。例如,可以从NAI中的“领域”推断出这一点,Diameter实现需要对其执行Diameter操作。
3.1 The services relevant for the task of transport protocol selection are those with NAPTR service fields with values "AAA+D2x", where x is a letter that corresponds to a transport protocol supported by the domain. This specification defines D2T for TCP and D2S for SCTP. We also establish an IANA registry for NAPTR service name to transport protocol mappings.
3.1 与传输协议选择任务相关的服务是那些具有值为“AAA+D2x”的NAPTR服务字段的服务,其中x是对应于域支持的传输协议的字母。本规范定义了用于TCP的D2T和用于SCTP的D2S。我们还为NAPTR服务名称到传输协议映射建立了IANA注册表。
These NAPTR records provide a mapping from a domain, to the SRV record for contacting a server with the specific transport protocol in the NAPTR services field. The resource record will contain an empty regular expression and a replacement value, which is the SRV record for that particular transport protocol. If the server supports multiple transport protocols, there will be multiple NAPTR records, each with a different service value. As per RFC 2915 [NAPTR], the client
这些NAPTR记录提供了从域到SRV记录的映射,用于在NAPTR服务字段中使用特定传输协议联系服务器。资源记录将包含一个空正则表达式和一个替换值,这是该特定传输协议的SRV记录。如果服务器支持多个传输协议,则将有多个NAPTR记录,每个记录具有不同的服务值。根据RFC 2915[NAPTR],客户
discards any records whose services fields are not applicable. For the purposes of this specification, several rules are defined.
丢弃其服务字段不适用的任何记录。在本规范中,定义了若干规则。
3.2 A client MUST discard any service fields that identify a resolution service whose value is not "D2X", for values of X that indicate transport protocols supported by the client. The NAPTR processing as described in RFC 2915 will result in discovery of the most preferred transport protocol of the server that is supported by the client, as well as an SRV record for the server.
3.2 对于表示客户端支持的传输协议的X值,客户端必须放弃标识值不是“D2X”的解析服务的任何服务字段。RFC 2915中描述的NAPTR处理将发现客户端支持的服务器的最首选传输协议,以及服务器的SRV记录。
The domain suffixes in the NAPTR replacement field SHOULD match the domain of the original query.
NAPTR替换字段中的域后缀应与原始查询的域匹配。
4. If no NAPTR records are found, the requester queries for those address records for the destination address, '_diameter._sctp'.realm or '_diameter._tcp'.realm. Address records include A RR's, AAAA RR's or other similar records, chosen according to the requestor's network protocol capabilities. If the DNS server returns no address records, the requestor gives up.
4. 如果未找到NAPTR记录,请求者将查询目标地址“\u diameter.\u sctp.”领域或“\u diameter.\u tcp.”领域的这些地址记录。地址记录包括RR、AAAA RR或其他类似记录,根据请求者的网络协议能力选择。如果DNS服务器没有返回任何地址记录,请求者将放弃。
If the server is using a site certificate, the domain name in the query and the domain name in the replacement field MUST both be valid based on the site certificate handed out by the server in the TLS or IKE exchange. Similarly, the domain name in the SRV query and the domain name in the target in the SRV record MUST both be valid based on the same site certificate. Otherwise, an attacker could modify the DNS records to contain replacement values in a different domain, and the client could not validate that this was the desired behavior, or the result of an attack
如果服务器正在使用站点证书,则根据服务器在TLS或IKE exchange中分发的站点证书,查询中的域名和替换字段中的域名都必须有效。同样,基于相同的站点证书,SRV查询中的域名和SRV记录中目标中的域名必须都有效。否则,攻击者可以修改DNS记录以在不同域中包含替换值,而客户端无法验证这是否是所需行为或攻击的结果
Also, the Diameter Peer MUST check to make sure that the discovered peers are authorized to act in its role. Authentication via IKE or TLS, or validation of DNS RRs via DNSSEC is not sufficient to conclude this. For example, a web server may have obtained a valid TLS certificate, and secured RRs may be included in the DNS, but this does not imply that it is authorized to act as a Diameter Server.
此外,Diameter对等机必须进行检查,以确保发现的对等机被授权执行其角色。通过IKE或TLS进行身份验证,或通过DNSSEC验证DNS RRs不足以得出结论。例如,web服务器可能已获得有效的TLS证书,并且DNS中可能包含安全RRs,但这并不意味着它被授权作为Diameter服务器。
Authorization can be achieved for example, by configuration of a Diameter Server CA. Alternatively this can be achieved by definition of OIDs within TLS or IKE certificates so as to signify Diameter Server authorization.
例如,可以通过配置Diameter服务器CA来实现授权。或者,也可以通过在TLS或IKE证书中定义OID来实现授权,以表示Diameter服务器授权。
A dynamically discovered peer causes an entry in the Peer Table (see Section 2.6) to be created. Note that entries created via DNS MUST expire (or be refreshed) within the DNS TTL. If a peer is discovered
动态发现的对等体导致在对等体表中创建一个条目(参见第2.6节)。请注意,通过DNS创建的条目必须在DNS TTL中过期(或刷新)。如果发现了对等点
outside of the local realm, a routing table entry (see Section 2.7) for the peer's realm is created. The routing table entry's expiration MUST match the peer's expiration value.
在本地领域之外,为对等领域创建路由表条目(参见第2.7节)。路由表项的过期必须与对等方的过期值匹配。
When two Diameter peers establish a transport connection, they MUST exchange the Capabilities Exchange messages, as specified in the peer state machine (see Section 5.6). This message allows the discovery of a peer's identity and its capabilities (protocol version number, supported Diameter applications, security mechanisms, etc.)
当两个Diameter对等体建立传输连接时,它们必须按照对等体状态机中的规定交换功能交换消息(参见第5.6节)。此消息允许发现对等方的身份及其功能(协议版本号、支持的Diameter应用程序、安全机制等)
The receiver only issues commands to its peers that have advertised support for the Diameter application that defines the command. A Diameter node MUST cache the supported applications in order to ensure that unrecognized commands and/or AVPs are not unnecessarily sent to a peer.
接收器仅向已公布支持定义该命令的Diameter应用程序的对等方发出命令。Diameter节点必须缓存支持的应用程序,以确保不会不必要地将无法识别的命令和/或AVP发送到对等方。
A receiver of a Capabilities-Exchange-Req (CER) message that does not have any applications in common with the sender MUST return a Capabilities-Exchange-Answer (CEA) with the Result-Code AVP set to DIAMETER_NO_COMMON_APPLICATION, and SHOULD disconnect the transport layer connection. Note that receiving a CER or CEA from a peer advertising itself as a Relay (see Section 2.4) MUST be interpreted as having common applications with the peer.
功能交换请求(CER)消息的接收者如果与发送者没有任何共同的应用程序,则必须返回一个功能交换应答(CEA),结果代码AVP设置为DIAMETER_NO_common_APPLICATION,并应断开传输层连接。请注意,从对等方接收CER或CEA广告本身作为中继(见第2.4节)必须解释为与对等方有共同的应用。
Similarly, a receiver of a Capabilities-Exchange-Req (CER) message that does not have any security mechanisms in common with the sender MUST return a Capabilities-Exchange-Answer (CEA) with the Result-Code AVP set to DIAMETER_NO_COMMON_SECURITY, and SHOULD disconnect the transport layer connection.
类似地,与发送方没有任何共同安全机制的功能交换请求(CER)消息的接收方必须返回一个功能交换应答(CEA),结果代码AVP设置为DIAMETER_NO_common_security,并应断开传输层连接。
CERs received from unknown peers MAY be silently discarded, or a CEA MAY be issued with the Result-Code AVP set to DIAMETER_UNKNOWN_PEER. In both cases, the transport connection is closed. If the local policy permits receiving CERs from unknown hosts, a successful CEA MAY be returned. If a CER from an unknown peer is answered with a successful CEA, the lifetime of the peer entry is equal to the lifetime of the transport connection. In case of a transport failure, all the pending transactions destined to the unknown peer can be discarded.
从未知对等方接收的CER可能会被默默地丢弃,或者CEA可能会被发出,结果代码AVP设置为DIAMETER_unknown_PEER。在这两种情况下,传输连接都是关闭的。如果本地策略允许从未知主机接收CER,则可能返回成功的CEA。如果来自未知对等方的CER得到了成功CEA的应答,则对等方条目的生存期等于传输连接的生存期。在传输失败的情况下,可以丢弃所有发送到未知对等方的挂起事务。
The CER and CEA messages MUST NOT be proxied, redirected or relayed.
CER和CEA消息不得被代理、重定向或中继。
Since the CER/CEA messages cannot be proxied, it is still possible that an upstream agent receives a message for which it has no available peers to handle the application that corresponds to the Command-Code. In such instances, the 'E' bit is set in the answer
由于CER/CEA消息无法代理,因此上游代理仍有可能接收到一条消息,该消息没有可用的对等方来处理与命令代码对应的应用程序。在这种情况下,答案中设置了“E”位
message (see Section 7.) with the Result-Code AVP set to DIAMETER_UNABLE_TO_DELIVER to inform the downstream to take action (e.g., re-routing request to an alternate peer).
消息(见第7节)的结果代码AVP设置为DIAMETER_UNABLE_to_DELIVER,通知下游采取行动(例如,将请求重新路由到备用对等方)。
With the exception of the Capabilities-Exchange-Request message, a message of type Request that includes the Auth-Application-Id or Acct-Application-Id AVPs, or a message with an application-specific command code, MAY only be forwarded to a host that has explicitly advertised support for the application (or has advertised the Relay Application Identifier).
除功能交换请求消息外,包含Auth应用程序Id或Acct应用程序Id AVPs的Request类型的消息,或带有特定于应用程序的命令代码的消息,只能转发给已明确公布对该应用程序支持的主机(或已公布中继应用程序标识符)。
The Capabilities-Exchange-Request (CER), indicated by the Command-Code set to 257 and the Command Flags' 'R' bit set, is sent to exchange local capabilities. Upon detection of a transport failure, this message MUST NOT be sent to an alternate peer.
由设置为257的命令代码和设置的命令标志“R”位指示的功能交换请求(CER)被发送到Exchange本地功能。在检测到传输故障时,不得将此消息发送给备用对等方。
When Diameter is run over SCTP [SCTP], which allows for connections to span multiple interfaces and multiple IP addresses, the Capabilities-Exchange-Request message MUST contain one Host-IP-Address AVP for each potential IP address that MAY be locally used when transmitting Diameter messages.
当Diameter在SCTP[SCTP]上运行时,允许连接跨越多个接口和多个IP地址,则对于传输Diameter消息时可能在本地使用的每个潜在IP地址,功能交换请求消息必须包含一个主机IP地址AVP。
Message Format
消息格式
<CER> ::= < Diameter Header: 257, REQ > { Origin-Host } { Origin-Realm } 1* { Host-IP-Address } { Vendor-Id } { Product-Name } [ Origin-State-Id ] * [ Supported-Vendor-Id ] * [ Auth-Application-Id ] * [ Inband-Security-Id ] * [ Acct-Application-Id ] * [ Vendor-Specific-Application-Id ] [ Firmware-Revision ] * [ AVP ]
<CER> ::= < Diameter Header: 257, REQ > { Origin-Host } { Origin-Realm } 1* { Host-IP-Address } { Vendor-Id } { Product-Name } [ Origin-State-Id ] * [ Supported-Vendor-Id ] * [ Auth-Application-Id ] * [ Inband-Security-Id ] * [ Acct-Application-Id ] * [ Vendor-Specific-Application-Id ] [ Firmware-Revision ] * [ AVP ]
The Capabilities-Exchange-Answer (CEA), indicated by the Command-Code set to 257 and the Command Flags' 'R' bit cleared, is sent in response to a CER message.
发送功能交换应答(CEA)以响应CER消息,该应答由设置为257的命令代码和清除的命令标志“R”位表示。
When Diameter is run over SCTP [SCTP], which allows connections to span multiple interfaces, hence, multiple IP addresses, the Capabilities-Exchange-Answer message MUST contain one Host-IP-Address AVP for each potential IP address that MAY be locally used when transmitting Diameter messages.
当Diameter在SCTP[SCTP]上运行时,允许连接跨越多个接口,因此,多个IP地址,对于传输Diameter消息时可能在本地使用的每个潜在IP地址,功能交换应答消息必须包含一个主机IP地址AVP。
Message Format
消息格式
<CEA> ::= < Diameter Header: 257 > { Result-Code } { Origin-Host } { Origin-Realm } 1* { Host-IP-Address } { Vendor-Id } { Product-Name } [ Origin-State-Id ] [ Error-Message ] * [ Failed-AVP ] * [ Supported-Vendor-Id ] * [ Auth-Application-Id ] * [ Inband-Security-Id ] * [ Acct-Application-Id ] * [ Vendor-Specific-Application-Id ] [ Firmware-Revision ] * [ AVP ]
<CEA> ::= < Diameter Header: 257 > { Result-Code } { Origin-Host } { Origin-Realm } 1* { Host-IP-Address } { Vendor-Id } { Product-Name } [ Origin-State-Id ] [ Error-Message ] * [ Failed-AVP ] * [ Supported-Vendor-Id ] * [ Auth-Application-Id ] * [ Inband-Security-Id ] * [ Acct-Application-Id ] * [ Vendor-Specific-Application-Id ] [ Firmware-Revision ] * [ AVP ]
The Vendor-Id AVP (AVP Code 266) is of type Unsigned32 and contains the IANA "SMI Network Management Private Enterprise Codes" [ASSIGNNO] value assigned to the vendor of the Diameter application. In combination with the Supported-Vendor-Id AVP (Section 5.3.6), this MAY be used in order to know which vendor specific attributes may be sent to the peer. It is also envisioned that the combination of the Vendor-Id, Product-Name (Section 5.3.7) and the Firmware-Revision (Section 5.3.4) AVPs MAY provide very useful debugging information.
供应商Id AVP(AVP代码266)的类型为Unsigned32,包含分配给Diameter应用程序供应商的IANA“SMI网络管理私有企业代码”[ASSIGNNO]值。与支持的供应商Id AVP(第5.3.6节)结合使用,可了解哪些供应商特定属性可发送给对等方。还可以预见,供应商Id、产品名称(第5.3.7节)和固件版本(第5.3.4节)AVP的组合可能会提供非常有用的调试信息。
A Vendor-Id value of zero in the CER or CEA messages is reserved and indicates that this field is ignored.
CER或CEA消息中的供应商Id值为零,表示此字段被忽略。
The Firmware-Revision AVP (AVP Code 267) is of type Unsigned32 and is used to inform a Diameter peer of the firmware revision of the issuing device.
固件版本AVP(AVP代码267)的类型为Unsigned32,用于向Diameter对等方通知发布设备的固件版本。
For devices that do not have a firmware revision (general purpose computers running Diameter software modules, for instance), the revision of the Diameter software module may be reported instead.
对于没有固件版本的设备(例如,运行Diameter软件模块的通用计算机),可以报告Diameter软件模块的版本。
The Host-IP-Address AVP (AVP Code 257) is of type Address and is used to inform a Diameter peer of the sender's IP address. All source addresses that a Diameter node expects to use with SCTP [SCTP] MUST be advertised in the CER and CEA messages by including a Host-IP-Address AVP for each address. This AVP MUST ONLY be used in the CER and CEA messages.
主机IP地址AVP(AVP代码257)属于Address类型,用于通知Diameter对等方发送方的IP地址。Diameter节点预期与SCTP[SCTP]一起使用的所有源地址必须在CER和CEA消息中公布,包括每个地址的主机IP地址AVP。此AVP只能在CER和CEA消息中使用。
The Supported-Vendor-Id AVP (AVP Code 265) is of type Unsigned32 and contains the IANA "SMI Network Management Private Enterprise Codes" [ASSIGNNO] value assigned to a vendor other than the device vendor. This is used in the CER and CEA messages in order to inform the peer that the sender supports (a subset of) the vendor-specific AVPs defined by the vendor identified in this AVP.
支持的供应商Id AVP(AVP代码265)的类型为Unsigned32,包含分配给设备供应商以外的供应商的IANA“SMI网络管理私有企业代码”[ASSIGNNO]值。这在CER和CEA消息中使用,以便通知对等方发送方支持由该AVP中标识的供应商定义的供应商特定AVP(其子集)。
The Product-Name AVP (AVP Code 269) is of type UTF8String, and contains the vendor assigned name for the product. The Product-Name AVP SHOULD remain constant across firmware revisions for the same product.
产品名称AVP(AVP代码269)为UTF8String类型,包含供应商为产品指定的名称。在同一产品的固件版本中,产品名称AVP应保持不变。
When a Diameter node disconnects one of its transport connections, its peer cannot know the reason for the disconnect, and will most likely assume that a connectivity problem occurred, or that the peer has rebooted. In these cases, the peer may periodically attempt to reconnect, as stated in Section 2.1. In the event that the disconnect was a result of either a shortage of internal resources, or simply that the node in question has no intentions of forwarding any Diameter messages to the peer in the foreseeable future, a periodic connection request would not be welcomed. The Disconnection-Reason AVP contains the reason the Diameter node issued the Disconnect-Peer-Request message.
当Diameter节点断开其一个传输连接时,其对等方无法知道断开的原因,并且极有可能假定发生了连接问题,或者对等方已重新启动。在这些情况下,对等方可能会定期尝试重新连接,如第2.1节所述。如果断开连接是由于内部资源不足,或者仅仅是因为相关节点在可预见的将来无意向对等方转发任何Diameter消息,则不欢迎定期连接请求。断开原因AVP包含Diameter节点发出断开对等请求消息的原因。
The Disconnect-Peer-Request message is used by a Diameter node to inform its peer of its intent to disconnect the transport layer, and that the peer shouldn't reconnect unless it has a valid reason to do so (e.g., message to be forwarded). Upon receipt of the message, the
Diameter节点使用Disconnect Peer Request(断开对等方请求)消息通知其对等方其断开传输层的意图,并且对等方不应重新连接,除非其具有这样做的有效理由(例如,要转发的消息)。收到该消息后
Disconnect-Peer-Answer is returned, which SHOULD contain an error if messages have recently been forwarded, and are likely in flight, which would otherwise cause a race condition.
返回断开对等应答,如果消息最近被转发,并且很可能在传输中,则该应答应包含错误,否则将导致竞争条件。
The receiver of the Disconnect-Peer-Answer initiates the transport disconnect.
断开对等应答的接收器启动传输断开。
The Disconnect-Peer-Request (DPR), indicated by the Command-Code set to 282 and the Command Flags' 'R' bit set, is sent to a peer to inform its intentions to shutdown the transport connection. Upon detection of a transport failure, this message MUST NOT be sent to an alternate peer.
断开对等请求(DPR)由设置为282的命令代码和设置的命令标志“R”位指示,发送给对等方,以通知其关闭传输连接的意图。在检测到传输故障时,不得将此消息发送给备用对等方。
Message Format
消息格式
<DPR> ::= < Diameter Header: 282, REQ > { Origin-Host } { Origin-Realm } { Disconnect-Cause }
<DPR> ::= < Diameter Header: 282, REQ > { Origin-Host } { Origin-Realm } { Disconnect-Cause }
The Disconnect-Peer-Answer (DPA), indicated by the Command-Code set to 282 and the Command Flags' 'R' bit cleared, is sent as a response to the Disconnect-Peer-Request message. Upon receipt of this message, the transport connection is shutdown.
断开对等应答(DPA)由设置为282的命令代码和清除的命令标志“R”位指示,作为对断开对等请求消息的响应发送。收到此消息后,传输连接将关闭。
Message Format
消息格式
<DPA> ::= < Diameter Header: 282 > { Result-Code } { Origin-Host } { Origin-Realm } [ Error-Message ] * [ Failed-AVP ]
<DPA> ::= < Diameter Header: 282 > { Result-Code } { Origin-Host } { Origin-Realm } [ Error-Message ] * [ Failed-AVP ]
The Disconnect-Cause AVP (AVP Code 273) is of type Enumerated. A Diameter node MUST include this AVP in the Disconnect-Peer-Request message to inform the peer of the reason for its intention to shutdown the transport connection. The following values are supported:
断开原因AVP(AVP代码273)属于枚举类型。Diameter节点必须在Disconnect Peer Request(断开对等请求)消息中包含此AVP,以通知对等方其打算关闭传输连接的原因。支持以下值:
REBOOTING 0 A scheduled reboot is imminent.
重新启动0计划的重新启动即将到来。
BUSY 1 The peer's internal resources are constrained, and it has determined that the transport connection needs to be closed.
忙碌1对等方的内部资源受到限制,并且已确定需要关闭传输连接。
DO_NOT_WANT_TO_TALK_TO_YOU 2 The peer has determined that it does not see a need for the transport connection to exist, since it does not expect any messages to be exchanged in the near future.
DO_NOT_WANT_TO_TALK_TO_YOU 2对等方已确定不需要存在传输连接,因为它不希望在不久的将来交换任何消息。
Given the nature of the Diameter protocol, it is recommended that transport failures be detected as soon as possible. Detecting such failures will minimize the occurrence of messages sent to unavailable agents, resulting in unnecessary delays, and will provide better failover performance. The Device-Watchdog-Request and Device-Watchdog-Answer messages, defined in this section, are used to pro-actively detect transport failures.
鉴于Diameter协议的性质,建议尽快检测传输故障。检测此类故障将最大限度地减少发送到不可用代理的消息的发生,从而导致不必要的延迟,并将提供更好的故障切换性能。本节中定义的设备看门狗请求和设备看门狗应答消息用于主动检测传输故障。
The Device-Watchdog-Request (DWR), indicated by the Command-Code set to 280 and the Command Flags' 'R' bit set, is sent to a peer when no traffic has been exchanged between two peers (see Section 5.5.3). Upon detection of a transport failure, this message MUST NOT be sent to an alternate peer.
设备看门狗请求(DWR)由设置为280的命令代码和设置的命令标志“R”位表示,当两个对等方之间没有流量交换时,将发送给对等方(见第5.5.3节)。在检测到传输故障时,不得将此消息发送给备用对等方。
Message Format
消息格式
<DWR> ::= < Diameter Header: 280, REQ > { Origin-Host } { Origin-Realm } [ Origin-State-Id ]
<DWR> ::= < Diameter Header: 280, REQ > { Origin-Host } { Origin-Realm } [ Origin-State-Id ]
The Device-Watchdog-Answer (DWA), indicated by the Command-Code set to 280 and the Command Flags' 'R' bit cleared, is sent as a response to the Device-Watchdog-Request message.
设备看门狗应答(DWA)由设置为280的命令代码和清除的命令标志“R”位指示,作为对设备看门狗请求消息的响应发送。
Message Format
消息格式
<DWA> ::= < Diameter Header: 280 > { Result-Code } { Origin-Host } { Origin-Realm } [ Error-Message ] * [ Failed-AVP ] [ Original-State-Id ]
<DWA> ::= < Diameter Header: 280 > { Result-Code } { Origin-Host } { Origin-Realm } [ Error-Message ] * [ Failed-AVP ] [ Original-State-Id ]
The transport failure algorithm is defined in [AAATRANS]. All Diameter implementations MUST support the algorithm defined in the specification in order to be compliant to the Diameter base protocol.
传输故障算法在[AAATRANS]中定义。所有Diameter实现必须支持规范中定义的算法,以符合Diameter基本协议。
In the event that a transport failure is detected with a peer, it is necessary for all pending request messages to be forwarded to an alternate agent, if possible. This is commonly referred to as failover.
如果对等方检测到传输失败,则有必要将所有挂起的请求消息转发给备用代理(如果可能)。这通常称为故障转移。
In order for a Diameter node to perform failover procedures, it is necessary for the node to maintain a pending message queue for a given peer. When an answer message is received, the corresponding request is removed from the queue. The Hop-by-Hop Identifier field is used to match the answer with the queued request.
为了让Diameter节点执行故障转移过程,该节点必须为给定对等方维护挂起的消息队列。当收到应答消息时,相应的请求将从队列中删除。逐跳标识符字段用于将答案与排队请求相匹配。
When a transport failure is detected, if possible all messages in the queue are sent to an alternate agent with the T flag set. On booting a Diameter client or agent, the T flag is also set on any records still remaining to be transmitted in non-volatile storage. An example of a case where it is not possible to forward the message to an alternate server is when the message has a fixed destination, and the unavailable peer is the message's final destination (see Destination-Host AVP). Such an error requires that the agent return an answer message with the 'E' bit set and the Result-Code AVP set to DIAMETER_UNABLE_TO_DELIVER.
当检测到传输失败时,如果可能,将队列中的所有消息发送到设置了T标志的备用代理。在引导Diameter客户机或代理时,还将在仍要在非易失性存储器中传输的任何记录上设置T标志。无法将消息转发到备用服务器的情况的一个示例是,消息具有固定的目的地,而不可用的对等方是消息的最终目的地(请参阅目的地主机AVP)。此类错误要求代理返回一条应答消息,其中设置了“E”位,结果代码AVP设置为DIAMETER\u UNABLE\u to\u DELIVER。
It is important to note that multiple identical requests or answers MAY be received as a result of a failover. The End-to-End Identifier field in the Diameter header along with the Origin-Host AVP MUST be used to identify duplicate messages.
需要注意的是,故障切换可能会收到多个相同的请求或响应。必须使用Diameter标头中的端到端标识符字段以及原始主机AVP来标识重复消息。
As described in Section 2.1, a connection request should be periodically attempted with the failed peer in order to re-establish the transport connection. Once a connection has been successfully established, messages can once again be forwarded to the peer. This is commonly referred to as failback.
如第2.1节所述,应定期尝试与故障对等方进行连接请求,以便重新建立传输连接。成功建立连接后,可以再次将消息转发给对等方。这通常称为故障回复。
This section contains a finite state machine that MUST be observed by all Diameter implementations. Each Diameter node MUST follow the state machine described below when communicating with each peer. Multiple actions are separated by commas, and may continue on succeeding lines, as space requires. Similarly, state and next state may also span multiple lines, as space requires.
本节包含所有Diameter实现都必须遵守的有限状态机。当与每个对等节点通信时,每个Diameter节点必须遵循下面描述的状态机。多个操作由逗号分隔,并可根据空间要求在后续行上继续。类似地,根据空间要求,状态和下一状态也可能跨越多行。
This state machine is closely coupled with the state machine described in [AAATRANS], which is used to open, close, failover, probe, and reopen transport connections. Note in particular that [AAATRANS] requires the use of watchdog messages to probe connections. For Diameter, DWR and DWA messages are to be used.
此状态机与[AAATRANS]中描述的状态机紧密耦合,用于打开、关闭、故障切换、探测和重新打开传输连接。请特别注意,[AAATRANS]需要使用看门狗消息来探测连接。对于直径,将使用DWR和DWA消息。
I- is used to represent the initiator (connecting) connection, while the R- is used to represent the responder (listening) connection. The lack of a prefix indicates that the event or action is the same regardless of the connection on which the event occurred.
I-用于表示发起方(连接)连接,而R-用于表示响应方(侦听)连接。缺少前缀表示无论事件发生在哪个连接上,事件或操作都是相同的。
The stable states that a state machine may be in are Closed, I-Open and R-Open; all other states are intermediate. Note that I-Open and R-Open are equivalent except for whether the initiator or responder transport connection is used for communication.
状态机可能处于的稳定状态为关闭、I-打开和R-打开;所有其他状态都是中间状态。请注意,I-Open和R-Open是等效的,但启动器或响应程序传输连接是否用于通信除外。
A CER message is always sent on the initiating connection immediately after the connection request is successfully completed. In the case of an election, one of the two connections will shut down. The responder connection will survive if the Origin-Host of the local Diameter entity is higher than that of the peer; the initiator connection will survive if the peer's Origin-Host is higher. All subsequent messages are sent on the surviving connection. Note that the results of an election on one peer are guaranteed to be the inverse of the results on the other.
连接请求成功完成后,CER消息始终会立即在启动连接时发送。在选举的情况下,两个连接中的一个将关闭。如果本地Diameter实体的源主机高于对等主机,则响应方连接将继续存在;如果对等方的源主机更高,则启动器连接将继续存在。所有后续消息都将在尚存的连接上发送。请注意,一方的选举结果保证与另一方的选举结果相反。
For TLS usage, a TLS handshake will begin when both ends are in the open state. If the TLS handshake is successful, all further messages will be sent via TLS. If the handshake fails, both ends move to the closed state.
对于TLS使用,TLS握手将在两端都处于打开状态时开始。如果TLS握手成功,所有进一步的消息将通过TLS发送。如果握手失败,两端都会移动到关闭状态。
The state machine constrains only the behavior of a Diameter implementation as seen by Diameter peers through events on the wire.
状态机仅约束Diameter实现的行为,正如Diameter对等方通过连线上的事件所看到的那样。
Any implementation that produces equivalent results is considered compliant.
任何产生等效结果的实现都被视为符合要求。
state event action next state ----------------------------------------------------------------- Closed Start I-Snd-Conn-Req Wait-Conn-Ack R-Conn-CER R-Accept, R-Open Process-CER, R-Snd-CEA
state event action next state ----------------------------------------------------------------- Closed Start I-Snd-Conn-Req Wait-Conn-Ack R-Conn-CER R-Accept, R-Open Process-CER, R-Snd-CEA
Wait-Conn-Ack I-Rcv-Conn-Ack I-Snd-CER Wait-I-CEA I-Rcv-Conn-Nack Cleanup Closed R-Conn-CER R-Accept, Wait-Conn-Ack/ Process-CER Elect Timeout Error Closed
等待连接确认I-Rcv-Conn-Ack I-Snd-CER等待-I-CEA I-Rcv-Conn-Nack清理关闭R-Conn-CER R-Accept,等待连接确认/进程CER选择超时错误关闭
Wait-I-CEA I-Rcv-CEA Process-CEA I-Open R-Conn-CER R-Accept, Wait-Returns Process-CER, Elect I-Peer-Disc I-Disc Closed I-Rcv-Non-CEA Error Closed Timeout Error Closed
Wait-I-CEA I-Rcv-CEA进程CEA I-Open R-Conn-CER R-Accept,等待返回进程CER,选择I-Peer-Disc I-Disc Closed I-Rcv-Non-CEA错误关闭超时错误关闭
Wait-Conn-Ack/ I-Rcv-Conn-Ack I-Snd-CER,Elect Wait-Returns Elect I-Rcv-Conn-Nack R-Snd-CEA R-Open R-Peer-Disc R-Disc Wait-Conn-Ack R-Conn-CER R-Reject Wait-Conn-Ack/ Elect Timeout Error Closed
Wait Conn Ack/I-Rcv-Conn-Ack I-Snd-CER,Elect Wait返回Elect I-Rcv-Conn-Nack R-Snd-CEA R-Open R-Peer-Disc R-Disc Wait Conn Ack R-Conn-CER R-Reject Wait Conn Ack/Elect超时错误关闭
Wait-Returns Win-Election I-Disc,R-Snd-CEA R-Open I-Peer-Disc I-Disc, R-Open R-Snd-CEA I-Rcv-CEA R-Disc I-Open R-Peer-Disc R-Disc Wait-I-CEA R-Conn-CER R-Reject Wait-Returns Timeout Error Closed
等待返回赢选I-Disc,R-Snd-CEA R-Open I-Peer-Disc I-Disc,R-Open R-Snd-CEA I-Rcv-CEA R-Disc I-Open R-Peer-Disc R-Disc Wait-I-CEA R-Conn-CER R-Reject等待返回超时错误关闭
R-Open Send-Message R-Snd-Message R-Open R-Rcv-Message Process R-Open R-Rcv-DWR Process-DWR, R-Open R-Snd-DWA R-Rcv-DWA Process-DWA R-Open R-Conn-CER R-Reject R-Open Stop R-Snd-DPR Closing R-Rcv-DPR R-Snd-DPA, Closed R-Disc
R-Open发送消息R-Snd-Message R-Open R-Rcv-Message流程R-Open R-Rcv-DWR流程DWR,R-Open R-Snd-DWA R-Rcv-DWA流程DWA R-Open R-Conn-CER R-Reject R-Open停止R-Snd-DPR关闭R-Rcv-DPR,关闭R-Disc
R-Peer-Disc R-Disc Closed R-Rcv-CER R-Snd-CEA R-Open R-Rcv-CEA Process-CEA R-Open
R-Peer-Disc R-Disc闭合R-Rcv-CER R-Snd-CEA R-Open R-Rcv-CEA过程CEA R-Open
I-Open Send-Message I-Snd-Message I-Open I-Rcv-Message Process I-Open I-Rcv-DWR Process-DWR, I-Open I-Snd-DWA I-Rcv-DWA Process-DWA I-Open R-Conn-CER R-Reject I-Open Stop I-Snd-DPR Closing I-Rcv-DPR I-Snd-DPA, Closed I-Disc I-Peer-Disc I-Disc Closed I-Rcv-CER I-Snd-CEA I-Open I-Rcv-CEA Process-CEA I-Open
I-Open发送消息I-Snd-Message I-Open I-Rcv-Message流程I-Open I-Rcv-DWR流程DWR,I-Open I-Snd-DWA I-Rcv-DWA流程DWA I-Open R-Conn-CER R R-Reject I-Open停止I-Snd-DPR关闭I-Rcv-DPR,关闭I-Disc I-Peer-Disc I-Disc I-Disc关闭I-Rcv-CER I-Snd-CEA关闭I-Rcv-CEA流程CEA I-Open
Closing I-Rcv-DPA I-Disc Closed R-Rcv-DPA R-Disc Closed Timeout Error Closed I-Peer-Disc I-Disc Closed R-Peer-Disc R-Disc Closed
关闭I-Rcv-DPA I-Disc关闭R-Rcv-DPA R-Disc关闭超时错误关闭I-Peer-Disc I-Disc关闭R-Peer-Disc R-Disc关闭
When a connection request is received from a Diameter peer, it is not, in the general case, possible to know the identity of that peer until a CER is received from it. This is because host and port determine the identity of a Diameter peer; and the source port of an incoming connection is arbitrary. Upon receipt of CER, the identity of the connecting peer can be uniquely determined from Origin-Host.
当从Diameter对等方接收到连接请求时,在一般情况下,只有在从其接收到CER后才能知道该对等方的身份。这是因为主机和端口决定了直径对等的身份;并且传入连接的源端口是任意的。收到CER后,可以从源主机唯一地确定连接对等方的身份。
For this reason, a Diameter peer must employ logic separate from the state machine to receive connection requests, accept them, and await CER. Once CER arrives on a new connection, the Origin-Host that identifies the peer is used to locate the state machine associated with that peer, and the new connection and CER are passed to the state machine as an R-Conn-CER event.
因此,Diameter对等机必须使用与状态机分离的逻辑来接收连接请求、接受它们并等待CER。一旦CER到达一个新连接,标识对等机的源主机将用于定位与该对等机关联的状态机,并且新连接和CER将作为R-Conn-CER事件传递给状态机。
The logic that handles incoming connections SHOULD close and discard the connection if any message other than CER arrives, or if an implementation-defined timeout occurs prior to receipt of CER.
如果CER以外的任何消息到达,或者如果在收到CER之前发生了实现定义的超时,则处理传入连接的逻辑应该关闭并放弃连接。
Because handling of incoming connections up to and including receipt of CER requires logic, separate from that of any individual state machine associated with a particular peer, it is described separately in this section rather than in the state machine above.
由于处理CER之前(包括接收CER)的传入连接需要与与特定对等方关联的任何单个状态机的逻辑分开的逻辑,因此在本节中单独描述,而不是在上面的状态机中描述。
Transitions and actions in the automaton are caused by events. In this section, we will ignore the -I and -R prefix, since the actual event would be identical, but would occur on one of two possible connections.
自动机中的转换和操作是由事件引起的。在本节中,我们将忽略-I和-R前缀,因为实际事件是相同的,但会发生在两个可能的连接之一上。
Start The Diameter application has signaled that a connection should be initiated with the peer.
启动Diameter应用程序已发出信号,表示应启动与对等方的连接。
R-Conn-CER An acknowledgement is received stating that the transport connection has been established, and the associated CER has arrived.
R-Conn-CER接收到一个确认,说明传输连接已经建立,并且相关的CER已经到达。
Rcv-Conn-Ack A positive acknowledgement is received confirming that the transport connection is established.
Rcv Conn Ack收到确认传输连接已建立的肯定确认。
Rcv-Conn-Nack A negative acknowledgement was received stating that the transport connection was not established.
Rcv Conn Nack收到否定确认,表示未建立传输连接。
Timeout An application-defined timer has expired while waiting for some event.
超时等待某个事件时,应用程序定义的计时器已过期。
Rcv-CER A CER message from the peer was received.
Rcv CER接收到来自对等方的CER消息。
Rcv-CEA A CEA message from the peer was received.
Rcv CEA收到来自对等方的CEA消息。
Rcv-Non-CEA A message other than CEA from the peer was received.
Rcv Non CEA收到来自对等方的CEA以外的消息。
Peer-Disc A disconnection indication from the peer was received.
对等磁盘接收到来自对等磁盘的断开指示。
Rcv-DPR A DPR message from the peer was received.
Rcv DPR接收到来自对等方的DPR消息。
Rcv-DPA A DPA message from the peer was received.
Rcv DPA接收到来自对等方的DPA消息。
Win-Election An election was held, and the local node was the winner.
赢得选举举行了选举,本地节点是赢家。
Send-Message A message is to be sent.
发送消息要发送的消息。
Rcv-Message A message other than CER, CEA, DPR, DPA, DWR or DWA was received.
Rcv消息收到CER、CEA、DPR、DPA、DWR或DWA以外的消息。
Stop The Diameter application has signaled that a connection should be terminated (e.g., on system shutdown).
Stop Diameter应用程序已发出终止连接的信号(例如,在系统关闭时)。
Actions in the automaton are caused by events and typically indicate the transmission of packets and/or an action to be taken on the connection. In this section we will ignore the I- and R-prefix, since the actual action would be identical, but would occur on one of two possible connections.
自动机中的操作由事件引起,通常表示数据包的传输和/或连接上要采取的操作。在本节中,我们将忽略I-和R-前缀,因为实际操作是相同的,但会发生在两个可能的连接之一上。
Snd-Conn-Req A transport connection is initiated with the peer.
Snd Conn Req与对等方启动传输连接。
Accept The incoming connection associated with the R-Conn-CER is accepted as the responder connection.
接受与R-Conn-CER关联的传入连接被接受为响应程序连接。
Reject The incoming connection associated with the R-Conn-CER is disconnected.
拒绝与R-Conn-CER断开关联的传入连接。
Process-CER The CER associated with the R-Conn-CER is processed.
处理CER处理与R-Conn-CER关联的CER。
Snd-CER A CER message is sent to the peer.
Snd CER向对等方发送CER消息。
Snd-CEA A CEA message is sent to the peer.
Snd CEA向对等方发送CEA消息。
Cleanup If necessary, the connection is shutdown, and any local resources are freed.
如有必要,将关闭连接并释放所有本地资源。
Error The transport layer connection is disconnected, either politely or abortively, in response to an error condition. Local resources are freed.
错误传输层连接被断开,无论是礼貌的还是失败的,以响应错误条件。释放本地资源。
Process-CEA A received CEA is processed.
处理CEA处理接收到的CEA。
Snd-DPR A DPR message is sent to the peer.
Snd DPR向对等方发送DPR消息。
Snd-DPA A DPA message is sent to the peer.
Snd DPA向对等方发送DPA消息。
Disc The transport layer connection is disconnected, and local resources are freed.
光盘传输层连接已断开,本地资源已释放。
Elect An election occurs (see Section 5.6.4 for more information).
选举发生时(更多信息见第5.6.4节)。
Snd-Message A message is sent.
Snd消息发送一条消息。
Snd-DWR A DWR message is sent.
Snd DWR发送DWR消息。
Snd-DWA A DWA message is sent.
Snd DWA发送DWA消息。
Process-DWR The DWR message is serviced.
处理DWR将为DWR消息提供服务。
Process-DWA The DWA message is serviced.
处理DWA—DWA消息得到服务。
Process A message is serviced.
处理一条消息。
The election is performed on the responder. The responder compares the Origin-Host received in the CER sent by its peer with its own Origin-Host. If the local Diameter entity's Origin-Host is higher than the peer's, a Win-Election event is issued locally.
对响应者执行选择。响应者将其对等方发送的CER中接收的源主机与其自己的源主机进行比较。如果本地Diameter实体的原始主机高于对等主机,则会在本地发出一个获胜选举事件。
The comparison proceeds by considering the shorter OctetString to be padded with zeros so that it length is the same as the length of the longer, then performing an octet-by-octet unsigned comparison with the first octet being most significant. Any remaining octets are assumed to have value 0x80.
比较过程中,考虑用零填充较短的八位字节字符串,使其长度与较长的八位字节长度相同,然后执行一个八位字节对一个八位字节的无符号比较,第一个八位字节最重要。假定任何剩余的八位字节的值为0x80。
This section describes how Diameter requests and answers are created and processed.
本节介绍如何创建和处理Diameter请求和应答。
A request is sent towards its final destination using a combination of the Destination-Realm and Destination-Host AVPs, in one of these three combinations:
使用目标域和目标主机AVP的组合,以以下三种组合之一,向其最终目标发送请求:
- a request that is not able to be proxied (such as CER) MUST NOT contain either Destination-Realm or Destination-Host AVPs.
- 无法代理的请求(如CER)不得包含目标域或目标主机AVP。
- a request that needs to be sent to a home server serving a specific realm, but not to a specific server (such as the first request of a series of round-trips), MUST contain a Destination-Realm AVP, but MUST NOT contain a Destination-Host AVP.
- 需要发送到服务于特定领域的家庭服务器而不是特定服务器的请求(例如一系列往返的第一个请求)必须包含目标领域AVP,但不得包含目标主机AVP。
- otherwise, a request that needs to be sent to a specific home server among those serving a given realm, MUST contain both the Destination-Realm and Destination-Host AVPs.
- 否则,需要发送到服务于给定领域的特定家庭服务器的请求必须同时包含目标领域和目标主机AVP。
The Destination-Host AVP is used as described above when the destination of the request is fixed, which includes:
当请求的目的地是固定的时,如上所述使用目的地主机AVP,其包括:
- Authentication requests that span multiple round trips
- 跨越多个往返的身份验证请求
- A Diameter message that uses a security mechanism that makes use of a pre-established session key shared between the source and the final destination of the message.
- 使用安全机制的Diameter消息,该安全机制利用消息源和最终目标之间共享的预先建立的会话密钥。
- Server initiated messages that MUST be received by a specific Diameter client (e.g., access device), such as the Abort-Session-Request message, which is used to request that a particular user's session be terminated.
- 必须由特定Diameter客户端(例如,访问设备)接收的服务器启动的消息,如中止会话请求消息,用于请求终止特定用户的会话。
Note that an agent can forward a request to a host described in the Destination-Host AVP only if the host in question is included in its peer table (see Section 2.7). Otherwise, the request is routed based on the Destination-Realm only (see Sections 6.1.6).
请注意,只有在目标主机AVP中描述的主机包含在其对等表中时,代理才能将请求转发给该主机(请参见第2.7节)。否则,请求仅基于目标域进行路由(参见第6.1.6节)。
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.
如果消息是可代理的,则目标域AVP必须存在。可由Diameter代理(代理、重定向或中继)转发的请求消息还必须包含Acct应用程序Id AVP、Auth应用程序Id AVP或特定于供应商的应用程序Id AVP。不能由Diameter代理(代理、重定向或中继)转发的消息不得在其ABNF中包含目标域。目标领域AVP的值可以从用户名AVP或其他特定于应用程序的方法中提取。
When a message is received, the message is processed in the following order:
收到消息后,将按以下顺序处理该消息:
1. If the message is destined for the local host, the procedures listed in Section 6.1.4 are followed.
1. 如果消息的目的地是本地主机,则遵循第6.1.4节中列出的程序。
2. If the message is intended for a Diameter peer with whom the local host is able to directly communicate, the procedures listed in Section 6.1.5 are followed. This is known as Request Forwarding.
2. 如果该消息针对本地主机能够直接通信的Diameter对等机,则应遵循第6.1.5节中列出的程序。这称为请求转发。
3. The procedures listed in Section 6.1.6 are followed, which is known as Request Routing.
3. 遵循第6.1.6节中列出的程序,即请求路由。
4. If none of the above is successful, an answer is returned with the Result-Code set to DIAMETER_UNABLE_TO_DELIVER, with the E-bit set.
4. 如果上述操作均未成功,则返回一个答案,结果代码设置为DIAMETER\u UNABLE\u to\u DELIVER,并设置了E位。
For routing of Diameter messages to work within an administrative domain, all Diameter nodes within the realm MUST be peers.
要在管理域中路由Diameter消息,域中的所有Diameter节点都必须是对等节点。
Note the processing rules contained in this section are intended to be used as general guidelines to Diameter developers. Certain implementations MAY use different methods than the ones described here, and still comply with the protocol specification. See Section 7 for more detail on error handling.
注:本节中包含的处理规则旨在用作开发人员的一般指南。某些实现可能使用与本文描述的不同的方法,并且仍然符合协议规范。有关错误处理的更多详细信息,请参见第7节。
When creating a request, in addition to any other procedures described in the application definition for that specific request, the following procedures MUST be followed:
创建请求时,除了该特定请求的应用程序定义中描述的任何其他过程外,还必须遵循以下过程:
- the Command-Code is set to the appropriate value
- 命令代码设置为适当的值
- the 'R' bit is set
- 设置了“R”位
- the End-to-End Identifier is set to a locally unique value
- 端到端标识符设置为本地唯一值
- the Origin-Host and Origin-Realm AVPs MUST be set to the appropriate values, used to identify the source of the message
- 源主机和源领域AVP必须设置为适当的值,用于标识消息源
- the Destination-Host and Destination-Realm AVPs MUST be set to the appropriate values as described in Section 6.1.
- 目标主机和目标域AVP必须设置为第6.1节所述的适当值。
- an Acct-Application-Id AVP, an Auth-Application-Id or a Vendor-Specific-Application-Id AVP must be included if the request is proxiable.
- 如果请求是可代理的,则必须包括Acct应用程序Id AVP、认证应用程序Id或特定于供应商的应用程序Id AVP。
When sending a request, originated either locally, or as the result of a forwarding or routing operation, the following procedures MUST be followed:
发送本地发出的请求或转发或路由操作产生的请求时,必须遵循以下过程:
- the Hop-by-Hop Identifier should be set to a locally unique value
- 逐跳标识符应设置为本地唯一值
- The message should be saved in the list of pending requests.
- 消息应保存在挂起的请求列表中。
Other actions to perform on the message based on the particular role the agent is playing are described in the following sections.
根据代理所扮演的特定角色对消息执行的其他操作将在以下部分中描述。
A relay or proxy agent MUST check for forwarding loops when receiving requests. A loop is detected if the server finds its own identity in a Route-Record AVP. When such an event occurs, the agent MUST answer with the Result-Code AVP set to DIAMETER_LOOP_DETECTED.
中继或代理在接收请求时必须检查转发循环。如果服务器在路由记录AVP中找到自己的标识,则会检测到循环。当发生此类事件时,代理必须使用设置为DIAMETER_LOOP_DETECTED的结果代码AVP进行应答。
A request is known to be for local consumption when one of the following conditions occur:
当出现以下情况之一时,已知请求是本地消费:
- The Destination-Host AVP contains the local host's identity,
- 目标主机AVP包含本地主机的标识,
- The Destination-Host AVP is not present, the Destination-Realm AVP contains a realm the server is configured to process locally, and the Diameter application is locally supported, or
- 目标主机AVP不存在,目标领域AVP包含服务器配置为在本地处理的领域,并且Diameter应用程序在本地受支持,或者
- Both the Destination-Host and the Destination-Realm are not present.
- 目标主机和目标域都不存在。
When a request is locally processed, the rules in Section 6.2 should be used to generate the corresponding answer.
当本地处理请求时,应使用第6.2节中的规则生成相应的答案。
Request forwarding is done using the Diameter Peer Table. The Diameter peer table contains all of the peers that the local node is able to directly communicate with.
请求转发使用Diameter对等表完成。Diameter对等表包含本地节点能够直接与之通信的所有对等点。
When a request is received, and the host encoded in the Destination-Host AVP is one that is present in the peer table, the message SHOULD be forwarded to the peer.
当接收到请求,并且目标主机AVP中编码的主机是对等表中存在的主机时,应将消息转发给对等机。
Diameter request message routing is done via realms and applications. A Diameter message that may be forwarded by Diameter agents (proxies, redirects or relays) MUST include the target realm in the Destination-Realm AVP and one of the application identification AVPs Auth-Application-Id, Acct-Application-Id or Vendor-Specific-Application-Id. The realm MAY be retrieved from the User-Name AVP, which is in the form of a Network Access Identifier (NAI). The realm portion of the NAI is inserted in the Destination-Realm AVP.
Diameter请求消息路由通过领域和应用程序完成。可由Diameter代理(代理、重定向或中继)转发的Diameter消息必须包括目标域AVP中的目标域以及应用程序标识AVPs Auth application Id、Acct application Id或供应商特定的-application-Id之一。该域可从用户名AVP检索,其形式为网络访问标识符(NAI)。NAI的领域部分插入到目标领域AVP中。
Diameter agents MAY have a list of locally supported realms and applications, and MAY have a list of externally supported realms and applications. When a request is received that includes a realm and/or application that is not locally supported, the message is routed to the peer configured in the Realm Routing Table (see Section 2.7).
Diameter Agent可能具有本地支持的领域和应用程序列表,也可能具有外部支持的领域和应用程序列表。当接收到包含本地不支持的领域和/或应用程序的请求时,消息将路由到领域路由表中配置的对等方(请参阅第2.7节)。
When a redirect agent receives a request whose routing entry is set to REDIRECT, it MUST reply with an answer message with the 'E' bit set, while maintaining the Hop-by-Hop Identifier in the header, and include the Result-Code AVP to DIAMETER_REDIRECT_INDICATION. Each of the servers associated with the routing entry are added in separate Redirect-Host AVP.
当重定向代理接收到路由条目设置为重定向的请求时,它必须使用设置为“E”位的应答消息进行回复,同时在报头中保留逐跳标识符,并包括结果代码AVP to DIAMETER_redirect_指示。与路由条目关联的每个服务器都添加到单独的重定向主机AVP中。
+------------------+ | Diameter | | Redirect Agent | +------------------+ ^ | 2. command + 'E' bit 1. Request | | Result-Code = joe@example.com | | DIAMETER_REDIRECT_INDICATION + | | Redirect-Host AVP(s) | v +-------------+ 3. Request +-------------+ | example.com |------------->| example.net | | Relay | | Diameter | | Agent |<-------------| Server | +-------------+ 4. Answer +-------------+
+------------------+ | Diameter | | Redirect Agent | +------------------+ ^ | 2. command + 'E' bit 1. Request | | Result-Code = joe@example.com | | DIAMETER_REDIRECT_INDICATION + | | Redirect-Host AVP(s) | v +-------------+ 3. Request +-------------+ | example.com |------------->| example.net | | Relay | | Diameter | | Agent |<-------------| Server | +-------------+ 4. Answer +-------------+
Figure 5: Diameter Redirect Agent
图5:直径重定向代理
The receiver of the answer message with the 'E' bit set, and the Result-Code AVP set to DIAMETER_REDIRECT_INDICATION uses the hop-by-hop field in the Diameter header to identify the request in the pending message queue (see Section 5.3) that is to be redirected. If no transport connection exists with the new agent, one is created, and the request is sent directly to it.
设置了“E”位且结果代码AVP设置为DIAMETER_REDIRECT_指示的应答消息接收器使用DIAMETER标头中的逐跳字段来识别待重定向消息队列中的请求(参见第5.3节)。如果不存在与新代理的传输连接,则会创建一个连接,并将请求直接发送给它。
Multiple Redirect-Host AVPs are allowed. The receiver of the answer message with the 'E' bit set selects exactly one of these hosts as the destination of the redirected message.
允许多个重定向主机AVP。设置了“E”位的应答消息的接收者恰好选择其中一个主机作为重定向消息的目的地。
A relay or proxy agent MUST append a Route-Record AVP to all requests forwarded. The AVP contains the identity of the peer the request was received from.
中继或代理必须将路由记录AVP附加到所有转发的请求。AVP包含从中接收请求的对等方的标识。
The Hop-by-Hop identifier in the request is saved, and replaced with a locally unique value. The source of the request is also saved, which includes the IP address, port and protocol.
请求中的逐跳标识符将被保存,并替换为本地唯一的值。还保存了请求的源,其中包括IP地址、端口和协议。
A relay or proxy agent MAY include the Proxy-Info AVP in requests if it requires access to any local state information when the corresponding response is received. Proxy-Info AVP has certain security implications and SHOULD contain an embedded HMAC with a node-local key. Alternatively, it MAY simply use local storage to store state information.
如果中继或代理在接收到相应响应时需要访问任何本地状态信息,则中继或代理可以在请求中包括代理信息AVP。代理信息AVP具有一定的安全含义,应该包含带有节点本地密钥的嵌入式HMAC。或者,它可以简单地使用本地存储来存储状态信息。
The message is then forwarded to the next hop, as identified in the Realm Routing Table.
然后将消息转发到下一个跃点,如领域路由表中所示。
Figure 6 provides an example of message routing using the procedures listed in these sections.
图6提供了使用这些部分中列出的过程进行消息路由的示例。
(Origin-Host=nas.mno.net) (Origin-Host=nas.mno.net) (Origin-Realm=mno.net) (Origin-Realm=mno.net) (Destination-Realm=example.com) (Destination- Realm=example.com) (Route-Record=nas.example.net) +------+ ------> +------+ ------> +------+ | | (Request) | | (Request) | | | NAS +-------------------+ DRL +-------------------+ HMS | | | | | | | +------+ <------ +------+ <------ +------+ example.net (Answer) example.net (Answer) example.com (Origin-Host=hms.example.com) (Origin-Host=hms.example.com) (Origin-Realm=example.com) (Origin-Realm=example.com)
(Origin-Host=nas.mno.net) (Origin-Host=nas.mno.net) (Origin-Realm=mno.net) (Origin-Realm=mno.net) (Destination-Realm=example.com) (Destination- Realm=example.com) (Route-Record=nas.example.net) +------+ ------> +------+ ------> +------+ | | (Request) | | (Request) | | | NAS +-------------------+ DRL +-------------------+ HMS | | | | | | | +------+ <------ +------+ <------ +------+ example.net (Answer) example.net (Answer) example.com (Origin-Host=hms.example.com) (Origin-Host=hms.example.com) (Origin-Realm=example.com) (Origin-Realm=example.com)
Figure 6: Routing of Diameter messages
图6:Diameter消息的路由
When a request is locally processed, the following procedures MUST be applied to create the associated answer, in addition to any additional procedures that MAY be discussed in the Diameter application defining the command:
在本地处理请求时,除了定义命令的Diameter应用程序中可能讨论的任何附加过程外,还必须应用以下过程来创建相关的答案:
- The same Hop-by-Hop identifier in the request is used in the answer.
- 在应答中使用请求中相同的逐跳标识符。
- The local host's identity is encoded in the Origin-Host AVP.
- 本地主机的身份在源主机AVP中编码。
- The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message.
- 应答消息中不得存在目标主机和目标域AVP。
- The Result-Code AVP is added with its value indicating success or failure.
- 结果代码AVP与指示成功或失败的值一起添加。
- If the Session-Id is present in the request, it MUST be included in the answer.
- 如果请求中存在会话Id,则必须将其包含在应答中。
- Any Proxy-Info AVPs in the request MUST be added to the answer message, in the same order they were present in the request.
- 请求中的任何代理信息AVP都必须按请求中的顺序添加到应答消息中。
- The 'P' bit is set to the same value as the one in the request.
- “P”位设置为与请求中的相同值。
- The same End-to-End identifier in the request is used in the answer.
- 在应答中使用请求中相同的端到端标识符。
Note that the error messages (see Section 7.3) are also subjected to the above processing rules.
请注意,错误消息(见第7.3节)也受上述处理规则的约束。
A Diameter client or proxy MUST match the Hop-by-Hop Identifier in an answer received against the list of pending requests. The corresponding message should be removed from the list of pending requests. It SHOULD ignore answers received that do not match a known Hop-by-Hop Identifier.
Diameter客户端或代理必须与收到的应答中的逐跳标识符与挂起的请求列表相匹配。应该从挂起的请求列表中删除相应的消息。它应该忽略接收到的与已知逐跳标识符不匹配的答案。
If the answer is for a request which was proxied or relayed, the agent MUST restore the original value of the Diameter header's Hop-by-Hop Identifier field.
如果答案是针对代理或中继的请求,则代理必须恢复Diameter标头逐跳标识符字段的原始值。
If the last Proxy-Info AVP in the message is targeted to the local Diameter server, the AVP MUST be removed before the answer is forwarded.
如果消息中的最后一个代理信息AVP是针对本地Diameter服务器的,则必须在转发答案之前删除该AVP。
If a relay or proxy agent receives an answer with a Result-Code AVP indicating a failure, it MUST NOT modify the contents of the AVP. Any additional local errors detected SHOULD be logged, but not reflected in the Result-Code AVP. If the agent receives an answer message with a Result-Code AVP indicating success, and it wishes to modify the AVP to indicate an error, it MUST modify the Result-Code AVP to contain the appropriate error in the message destined towards the access device as well as include the Error-Reporting-Host AVP and it MUST issue an STR on behalf of the access device.
如果中继或代理收到一个结果代码为AVP的答案,表示出现故障,则不得修改AVP的内容。应记录检测到的任何其他本地错误,但不反映在结果代码AVP中。如果代理收到一条应答消息,其结果代码AVP表示成功,并且它希望修改AVP以指示错误,它必须修改结果代码AVP,以在发送到接入设备的消息中包含适当的错误,并包括错误报告主机AVP,并且它必须代表接入设备发出STR。
The agent MUST then send the answer to the host that it received the original request from.
然后,代理必须将应答发送给它从中接收原始请求的主机。
The Origin-Host AVP (AVP Code 264) is of type DiameterIdentity, and MUST be present in all Diameter messages. This AVP identifies the endpoint that originated the Diameter message. Relay agents MUST NOT modify this AVP.
源主机AVP(AVP代码264)的类型为DiameterIdentity,并且必须出现在所有Diameter消息中。此AVP标识发起Diameter消息的端点。中继代理不得修改此AVP。
The value of the Origin-Host AVP is guaranteed to be unique within a single host.
原始主机AVP的值保证在单个主机中是唯一的。
Note that the Origin-Host AVP may resolve to more than one address as the Diameter peer may support more than one address.
注意,源主机AVP可以解析为多个地址,因为Diameter对等机可以支持多个地址。
This AVP SHOULD be placed as close to the Diameter header as possible. 6.10
该AVP应尽可能靠近直径集管。6.10
The Origin-Realm AVP (AVP Code 296) is of type DiameterIdentity. This AVP contains the Realm of the originator of any Diameter message and MUST be present in all messages.
起源域AVP(AVP代码296)为直径类型。此AVP包含任何Diameter消息的发起者的域,并且必须出现在所有消息中。
This AVP SHOULD be placed as close to the Diameter header as possible.
该AVP应尽可能靠近直径集管。
The Destination-Host AVP (AVP Code 293) is of type DiameterIdentity. This AVP MUST be present in all unsolicited agent initiated messages, MAY be present in request messages, and MUST NOT be present in Answer messages.
目的主机AVP(AVP代码293)的类型为diameteridenty。此AVP必须出现在所有未经请求的代理启动的消息中,可能出现在请求消息中,并且不得出现在应答消息中。
The absence of the Destination-Host AVP will cause a message to be sent to any Diameter server supporting the application within the realm specified in Destination-Realm AVP.
缺少目标主机AVP将导致向目标领域AVP中指定的领域内支持应用程序的任何Diameter服务器发送消息。
This AVP SHOULD be placed as close to the Diameter header as possible.
该AVP应尽可能靠近直径集管。
The Destination-Realm AVP (AVP Code 283) is of type DiameterIdentity, and contains the realm the message is to be routed to. The Destination-Realm AVP MUST NOT be present in Answer messages. Diameter Clients insert the realm portion of the User-Name AVP. Diameter servers initiating a request message use the value of the Origin-Realm AVP from a previous message received from the intended target host (unless it is known a priori). When present, the Destination-Realm AVP is used to perform message routing decisions.
目标域AVP(AVP代码283)的类型为DiameterIdentity,包含消息要路由到的域。应答消息中不得存在目标域AVP。Diameter客户端插入用户名AVP的领域部分。发起请求消息的Diameter服务器使用从预期目标主机接收的先前消息中的源域AVP值(除非事先已知)。当存在时,目标域AVP用于执行消息路由决策。
Request messages whose ABNF does not list the Destination-Realm AVP as a mandatory AVP are inherently non-routable messages.
ABNF未将目标领域AVP列为强制AVP的请求消息本质上是不可路由的消息。
This AVP SHOULD be placed as close to the Diameter header as possible.
该AVP应尽可能靠近直径集管。
The AVPs defined in this section are Diameter AVPs used for routing purposes. These AVPs change as Diameter messages are processed by agents, and therefore MUST NOT be protected by end-to-end security.
本节中定义的AVP是用于布线目的的直径AVP。这些AVP随着代理处理Diameter消息而变化,因此不能受到端到端安全性的保护。
The Route-Record AVP (AVP Code 282) is of type DiameterIdentity. The identity added in this AVP MUST be the same as the one received in the Origin-Host of the Capabilities Exchange message.
路线记录AVP(AVP代码282)为直径类型。此AVP中添加的标识必须与功能交换消息的源主机中接收的标识相同。
The Proxy-Info AVP (AVP Code 284) is of type Grouped. The Grouped Data field has the following ABNF grammar:
代理信息AVP(AVP代码284)属于分组类型。分组数据字段具有以下ABNF语法:
Proxy-Info ::= < AVP Header: 284 > { Proxy-Host } { Proxy-State } * [ AVP ]
Proxy-Info ::= < AVP Header: 284 > { Proxy-Host } { Proxy-State } * [ AVP ]
The Proxy-Host AVP (AVP Code 280) is of type DiameterIdentity. This AVP contains the identity of the host that added the Proxy-Info AVP.
代理主机AVP(AVP代码280)的类型为diameteridenty。此AVP包含添加代理信息AVP的主机的标识。
The Proxy-State AVP (AVP Code 33) is of type OctetString, and contains state local information, and MUST be treated as opaque data.
代理状态AVP(AVP代码33)为OctetString类型,包含状态本地信息,必须视为不透明数据。
The Auth-Application-Id AVP (AVP Code 258) is of type Unsigned32 and is used in order to advertise support of the Authentication and Authorization portion of an application (see Section 2.4). The Auth-Application-Id MUST also be present in all Authentication and/or Authorization messages that are defined in a separate Diameter specification and have an Application ID assigned.
身份验证应用程序Id AVP(AVP代码258)的类型为Unsigned32,用于公布对应用程序的身份验证和授权部分的支持(参见第2.4节)。身份验证应用程序Id还必须出现在单独Diameter规范中定义的所有身份验证和/或授权消息中,并且已分配应用程序Id。
The Acct-Application-Id AVP (AVP Code 259) is of type Unsigned32 and is used in order to advertise support of the Accounting portion of an application (see Section 2.4). The Acct-Application-Id MUST also be present in all Accounting messages. Exactly one of the Auth-Application-Id and Acct-Application-Id AVPs MAY be present.
账户应用程序Id AVP(AVP代码259)的类型为Unsigned32,用于公布对应用程序会计部分的支持(参见第2.4节)。帐户应用程序Id也必须出现在所有记帐消息中。验证应用程序Id和帐户应用程序Id AVP中可能正好存在一个。
The Inband-Security-Id AVP (AVP Code 299) is of type Unsigned32 and is used in order to advertise support of the Security portion of the application.
带内安全Id AVP(AVP代码299)的类型为Unsigned32,用于公布对应用程序安全部分的支持。
Currently, the following values are supported, but there is ample room to add new security Ids.
目前,支持以下值,但有足够的空间添加新的安全ID。
NO_INBAND_SECURITY 0 This peer does not support TLS. This is the default value, if the AVP is omitted.
否\u带内\u安全0此对等方不支持TLS。如果省略AVP,这是默认值。
TLS 1 This node supports TLS security, as defined by [TLS].
TLS 1此节点支持由[TLS]定义的TLS安全性。
The Vendor-Specific-Application-Id AVP (AVP Code 260) is of type Grouped and is used to advertise support of a vendor-specific Diameter Application. Exactly one of the Auth-Application-Id and Acct-Application-Id AVPs MAY be present.
特定于供应商的应用程序Id AVP(AVP代码260)属于分组类型,用于公布对特定于供应商的应用程序的支持。验证应用程序Id和帐户应用程序Id AVP中可能正好存在一个。
This AVP MUST also be present as the first AVP in all experimental commands defined in the vendor-specific application.
该AVP还必须作为供应商特定应用程序中定义的所有实验命令中的第一个AVP出现。
This AVP SHOULD be placed as close to the Diameter header as possible.
该AVP应尽可能靠近直径集管。
AVP Format
AVP格式
<Vendor-Specific-Application-Id> ::= < AVP Header: 260 > 1* [ Vendor-Id ] 0*1{ Auth-Application-Id } 0*1{ Acct-Application-Id }
<Vendor-Specific-Application-Id> ::= < AVP Header: 260 > 1* [ Vendor-Id ] 0*1{ Auth-Application-Id } 0*1{ Acct-Application-Id }
One or more of instances of this AVP MUST be present if the answer message's 'E' bit is set and the Result-Code AVP is set to DIAMETER_REDIRECT_INDICATION.
如果应答消息的“E”位被设置,且结果代码AVP被设置为直径\重定向\指示,则必须存在该AVP的一个或多个实例。
Upon receiving the above, the receiving Diameter node SHOULD forward the request directly to one of the hosts identified in these AVPs. The server contained in the selected Redirect-Host AVP SHOULD be used for all messages pertaining to this session.
收到上述请求后,接收Diameter节点应将请求直接转发给这些avp中标识的主机之一。所选重定向主机AVP中包含的服务器应用于与此会话相关的所有消息。
The Redirect-Host-Usage AVP (AVP Code 261) is of type Enumerated. This AVP MAY be present in answer messages whose 'E' bit is set and the Result-Code AVP is set to DIAMETER_REDIRECT_INDICATION.
重定向主机使用AVP(AVP代码261)是枚举的类型。该AVP可能出现在设置了“E”位且结果代码AVP设置为DIAMETER_REDIRECT_指示的应答消息中。
When present, this AVP dictates how the routing entry resulting from the Redirect-Host is to be used. The following values are supported:
当存在时,该AVP指示如何使用重定向主机产生的路由条目。支持以下值:
DONT_CACHE 0 The host specified in the Redirect-Host AVP should not be cached. This is the default value.
不缓存0不应缓存重定向主机AVP中指定的主机。这是默认值。
ALL_SESSION 1 All messages within the same session, as defined by the same value of the Session-ID AVP MAY be sent to the host specified in the Redirect-Host AVP.
所有会话1同一会话中的所有消息(由会话ID AVP的相同值定义)都可以发送到重定向主机AVP中指定的主机。
ALL_REALM 2 All messages destined for the realm requested MAY be sent to the host specified in the Redirect-Host AVP.
ALL_REALM 2所有发送到所请求领域的消息都可以发送到重定向主机AVP中指定的主机。
REALM_AND_APPLICATION 3 All messages for the application requested to the realm specified MAY be sent to the host specified in the Redirect-Host AVP.
REALM_和_APPLICATION 3请求到指定领域的应用程序的所有消息都可以发送到重定向主机AVP中指定的主机。
ALL_APPLICATION 4 All messages for the application requested MAY be sent to the host specified in the Redirect-Host AVP.
所有应用程序4请求的应用程序的所有消息都可以发送到重定向主机AVP中指定的主机。
ALL_HOST 5 All messages that would be sent to the host that generated the Redirect-Host MAY be sent to the host specified in the Redirect-Host AVP.
ALL_HOST 5所有发送到生成重定向主机的主机的消息都可以发送到重定向主机AVP中指定的主机。
ALL_USER 6 All messages for the user requested MAY be sent to the host specified in the Redirect-Host AVP.
所有用户6请求的用户的所有消息都可以发送到重定向主机AVP中指定的主机。
The Redirect-Max-Cache-Time AVP (AVP Code 262) is of type Unsigned32. This AVP MUST be present in answer messages whose 'E' bit is set, the Result-Code AVP is set to DIAMETER_REDIRECT_INDICATION and the Redirect-Host-Usage AVP set to a non-zero value.
重定向最大缓存时间AVP(AVP代码262)的类型为Unsigned32。此AVP必须出现在设置了“E”位的应答消息中,结果代码AVP设置为DIAMETER_REDIRECT_指示,重定向主机使用AVP设置为非零值。
This AVP contains the maximum number of seconds the peer and route table entries, created as a result of the Redirect-Host, will be cached. Note that once a host created due to a redirect indication is no longer reachable, any associated peer and routing table entries MUST be deleted.
此AVP包含因重定向主机而创建的对等和路由表项将被缓存的最大秒数。请注意,一旦由于重定向指示而创建的主机不再可访问,则必须删除任何关联的对等和路由表项。
The E2E-Sequence AVP (AVP Code 300) provides anti-replay protection for end to end messages and is of type grouped. It contains a random value (an OctetString with a nonce) and counter (an Integer). For each end-to-end peer with which a node communicates (or remembers communicating) a different nonce value MUST be used and the counter is initiated at zero and increases by one each time this AVP is emitted to that peer. This AVP MUST be included in all messages which use end-to-end protection (e.g., CMS signing or encryption).
E2E序列AVP(AVP代码300)为端到端消息提供防重放保护,属于分组类型。它包含一个随机值(带nonce的八进制字符串)和一个计数器(整数)。对于节点与之通信(或记忆通信)的每个端到端对等方,必须使用不同的nonce值,计数器在0处启动,并且每次向该对等方发送该AVP时,计数器增加1。此AVP必须包含在所有使用端到端保护(例如CMS签名或加密)的消息中。
There are two different types of errors in Diameter; protocol and application errors. A protocol error is one that occurs at the base protocol level, and MAY require per hop attention (e.g., message routing error). Application errors, on the other hand, generally occur due to a problem with a function specified in a Diameter application (e.g., user authentication, Missing AVP).
直径有两种不同类型的误差;协议和应用程序错误。协议错误是在基本协议级别发生的错误,可能需要每跳注意(例如,消息路由错误)。另一方面,应用程序错误通常是由于Diameter应用程序中指定的功能出现问题(例如,用户身份验证、缺少AVP)而导致的。
Result-Code AVP values that are used to report protocol errors MUST only be present in answer messages whose 'E' bit is set. When a request message is received that causes a protocol error, an answer message is returned with the 'E' bit set, and the Result-Code AVP is set to the appropriate protocol error value. As the answer is sent back towards the originator of the request, each proxy or relay agent MAY take action on the message.
用于报告协议错误的结果代码AVP值只能出现在设置了“E”位的应答消息中。当接收到导致协议错误的请求消息时,将返回带有“E”位设置的应答消息,并将结果代码AVP设置为适当的协议错误值。当应答被发送回请求的发起人时,每个代理或中继代理都可以对消息采取操作。
1. Request +---------+ Link Broken +-------------------------->|Diameter |----///----+ | +---------------------| | v +------+--+ | 2. answer + 'E' set | Relay 2 | +--------+ |Diameter |<-+ (Unable to Forward) +---------+ |Diameter| | | | Home | | Relay 1 |--+ +---------+ | Server | +---------+ | 3. Request |Diameter | +--------+ +-------------------->| | ^ | Relay 3 |-----------+ +---------+
1. Request +---------+ Link Broken +-------------------------->|Diameter |----///----+ | +---------------------| | v +------+--+ | 2. answer + 'E' set | Relay 2 | +--------+ |Diameter |<-+ (Unable to Forward) +---------+ |Diameter| | | | Home | | Relay 1 |--+ +---------+ | Server | +---------+ | 3. Request |Diameter | +--------+ +-------------------->| | ^ | Relay 3 |-----------+ +---------+
Figure 7: Example of Protocol Error causing answer message
图7:导致应答消息的协议错误示例
Figure 7 provides an example of a message forwarded upstream by a Diameter relay. When the message is received by Relay 2, and it detects that it cannot forward the request to the home server, an answer message is returned with the 'E' bit set and the Result-Code AVP set to DIAMETER_UNABLE_TO_DELIVER. Given that this error falls
图7提供了Diameter中继向上游转发的消息示例。当中继2接收到消息,并且它检测到无法将请求转发到家庭服务器时,将返回一条应答消息,其中设置了“E”位,结果代码AVP设置为DIAMETER\u UNABLE\u to\u DELIVER。考虑到这个错误
within the protocol error category, Relay 1 would take special action, and given the error, attempt to route the message through its alternate Relay 3.
在协议错误类别中,中继器1将采取特殊措施,并在出现错误的情况下,尝试通过其备用中继器3路由消息。
+---------+ 1. Request +---------+ 2. Request +---------+ | Access |------------>|Diameter |------------>|Diameter | | | | | | Home | | Device |<------------| Relay |<------------| Server | +---------+ 4. Answer +---------+ 3. Answer +---------+ (Missing AVP) (Missing AVP)
+---------+ 1. Request +---------+ 2. Request +---------+ | Access |------------>|Diameter |------------>|Diameter | | | | | | Home | | Device |<------------| Relay |<------------| Server | +---------+ 4. Answer +---------+ 3. Answer +---------+ (Missing AVP) (Missing AVP)
Figure 8: Example of Application Error Answer message
图8:应用程序错误应答消息示例
Figure 8 provides an example of a Diameter message that caused an application error. When application errors occur, the Diameter entity reporting the error clears the 'R' bit in the Command Flags, and adds the Result-Code AVP with the proper value. Application errors do not require any proxy or relay agent involvement, and therefore the message would be forwarded back to the originator of the request.
图8提供了导致应用程序错误的Diameter消息的示例。发生应用程序错误时,报告错误的Diameter实体将清除命令标志中的“R”位,并使用正确的值添加结果代码AVP。应用程序错误不需要任何代理或中继代理参与,因此消息将转发回请求的发起人。
There are certain Result-Code AVP application errors that require additional AVPs to be present in the answer. In these cases, the Diameter node that sets the Result-Code AVP to indicate the error MUST add the AVPs. Examples are:
存在某些结果代码AVP应用程序错误,需要在答案中显示其他AVP。在这些情况下,设置结果代码AVP以指示错误的直径节点必须添加AVP。例如:
- An unrecognized AVP is received with the 'M' bit (Mandatory bit) set, causes an answer to be sent with the Result-Code AVP set to DIAMETER_AVP_UNSUPPORTED, and the Failed-AVP AVP containing the offending AVP.
- 接收到未识别的AVP时设置了“M”位(强制位),导致发送应答,结果代码AVP设置为DIAMETER_AVP_UNSUPPORTED,失败的AVP AVP包含有问题的AVP。
- An AVP that is received with an unrecognized value causes an answer to be returned with the Result-Code AVP set to DIAMETER_INVALID_AVP_VALUE, with the Failed-AVP AVP containing the AVP causing the error.
- 使用无法识别的值接收的AVP会导致返回答案,结果代码AVP设置为DIAMETER_INVALID_AVP_value,失败的AVP AVP包含导致错误的AVP。
- A command is received with an AVP that is omitted, yet is mandatory according to the command's ABNF. The receiver issues an answer with the Result-Code set to DIAMETER_MISSING_AVP, and creates an AVP with the AVP Code and other fields set as expected in the missing AVP. The created AVP is then added to the Failed-AVP AVP.
- 接收命令时,AVP被省略,但根据命令的ABNF,AVP是必需的。接收器发出一个答案,结果代码设置为DIAMETER_MISSING_AVP,并创建一个AVP,其中AVP代码和其他字段设置为MISSING AVP中的预期值。然后将创建的AVP添加到失败的AVP AVP中。
The Result-Code AVP describes the error that the Diameter node encountered in its processing. In case there are multiple errors, the Diameter node MUST report only the first error it encountered
结果代码AVP描述了Diameter节点在处理过程中遇到的错误。如果存在多个错误,直径节点必须仅报告遇到的第一个错误
(detected possibly in some implementation dependent order). The specific errors that can be described by this AVP are described in the following section.
(可能以某种依赖于实现的顺序检测到)。本AVP可以描述的具体错误在下一节中描述。
The Result-Code AVP (AVP Code 268) is of type Unsigned32 and indicates whether a particular request was completed successfully or whether an error occurred. All Diameter answer messages defined in IETF applications MUST include one Result-Code AVP. A non-successful Result-Code AVP (one containing a non 2xxx value other than DIAMETER_REDIRECT_INDICATION) MUST include the Error-Reporting-Host AVP if the host setting the Result-Code AVP is different from the identity encoded in the Origin-Host AVP.
结果代码AVP(AVP代码268)的类型为Unsigned32,指示特定请求是否成功完成或是否发生错误。IETF应用程序中定义的所有Diameter应答消息必须包含一个结果代码AVP。如果设置结果代码AVP的主机与源主机AVP中编码的标识不同,则非成功的结果代码AVP(包含除直径\重定向\指示以外的非2xxx值)必须包括错误报告主机AVP。
The Result-Code data field contains an IANA-managed 32-bit address space representing errors (see Section 11.4). Diameter provides the following classes of errors, all identified by the thousands digit in the decimal notation:
结果代码数据字段包含表示错误的IANA管理的32位地址空间(见第11.4节)。Diameter提供以下类别的错误,所有错误均以十进制表示法中的千位数字表示:
- 1xxx (Informational) - 2xxx (Success) - 3xxx (Protocol Errors) - 4xxx (Transient Failures) - 5xxx (Permanent Failure)
- 1xx(信息)-2xxx(成功)-3xxx(协议错误)-4xxx(瞬时故障)-5xxx(永久故障)
A non-recognized class (one whose first digit is not defined in this section) MUST be handled as a permanent failure.
未识别的类别(其第一个数字未在本节中定义)必须作为永久性故障处理。
Errors that fall within this category are used to inform the requester that a request could not be satisfied, and additional action is required on its part before access is granted.
属于此类的错误用于通知请求者无法满足请求,并且在授予访问权限之前,请求者需要采取额外的措施。
DIAMETER_MULTI_ROUND_AUTH 1001 This informational error is returned by a Diameter server to inform the access device that the authentication mechanism being used requires multiple round trips, and a subsequent request needs to be issued in order for access to be granted.
DIAMETER\u MULTI\u ROUND\u AUTH 1001此信息错误由DIAMETER服务器返回,以通知接入设备所使用的认证机制需要多次往返,并且需要发出后续请求才能授予接入。
Errors that fall within the Success category are used to inform a peer that a request has been successfully completed.
属于成功类别的错误用于通知对等方请求已成功完成。
DIAMETER_SUCCESS 2001 The Request was successfully completed.
DIAMETER_SUCCESS 2001请求已成功完成。
DIAMETER_LIMITED_SUCCESS 2002 When returned, the request was successfully completed, but additional processing is required by the application in order to provide service to the user.
DIAMETER_LIMITED_SUCCESS 2002返回时,请求已成功完成,但应用程序需要进行额外处理才能向用户提供服务。
Errors that fall within the Protocol Error category SHOULD be treated on a per-hop basis, and Diameter proxies MAY attempt to correct the error, if it is possible. Note that these and only these errors MUST only be used in answer messages whose 'E' bit is set.
属于协议错误类别的错误应按每跳处理,如果可能,Diameter代理可能会尝试更正错误。请注意,这些错误和仅这些错误只能在设置了“E”位的应答消息中使用。
DIAMETER_COMMAND_UNSUPPORTED 3001 The Request contained a Command-Code that the receiver did not recognize or support. This MUST be used when a Diameter node receives an experimental command that it does not understand.
DIAMETER_COMMAND_UNSUPPORTED 3001请求包含一个接收器无法识别或支持的命令代码。当直径节点接收到它无法理解的实验命令时,必须使用此选项。
DIAMETER_UNABLE_TO_DELIVER 3002 This error is given when Diameter can not deliver the message to the destination, either because no host within the realm supporting the required application was available to process the request, or because Destination-Host AVP was given without the associated Destination-Realm AVP.
DIAMETER\u UNABLE\u TO\u DELIVER 3002当DIAMETER无法将消息传递到目标时,会出现此错误,这可能是因为域内没有支持所需应用程序的主机可用于处理请求,或者是因为提供的目标主机AVP没有关联的目标域AVP。
DIAMETER_REALM_NOT_SERVED 3003 The intended realm of the request is not recognized.
DIAMETER\u REALM\u NOT\u服务3003请求的预期领域无法识别。
DIAMETER_TOO_BUSY 3004 When returned, a Diameter node SHOULD attempt to send the message to an alternate peer. This error MUST only be used when a specific server is requested, and it cannot provide the requested service.
DIAMETER\u TOO\u BUSY 3004返回时,DIAMETER节点应尝试将消息发送到备用对等方。此错误只能在请求特定服务器时使用,并且该服务器无法提供请求的服务。
DIAMETER_LOOP_DETECTED 3005 An agent detected a loop while trying to get the message to the intended recipient. The message MAY be sent to an alternate peer, if one is available, but the peer reporting the error has identified a configuration problem.
DIAMETER_LOOP_检测到3005代理在尝试将邮件发送给目标收件人时检测到循环。消息可以发送到备用对等方(如果有),但报告错误的对等方已识别出配置问题。
DIAMETER_REDIRECT_INDICATION 3006 A redirect agent has determined that the request could not be satisfied locally and the initiator of the request should direct the request directly to the server, whose contact information has been added to the response. When set, the Redirect-Host AVP MUST be present.
DIAMETER_REDIRECT_指示3006重定向代理已确定无法在本地满足请求,请求的发起人应将请求直接指向服务器,服务器的联系信息已添加到响应中。设置时,重定向主机AVP必须存在。
DIAMETER_APPLICATION_UNSUPPORTED 3007 A request was sent for an application that is not supported.
DIAMETER_APPLICATION_UNSUPPORTED 3007针对不受支持的应用程序发送了请求。
DIAMETER_INVALID_HDR_BITS 3008 A request was received whose bits in the Diameter header were either set to an invalid combination, or to a value that is inconsistent with the command code's definition.
DIAMETER\u INVALID\u HDR\u BITS 3008接收到一个请求,其DIAMETER头中的位被设置为无效组合或与命令代码定义不一致的值。
DIAMETER_INVALID_AVP_BITS 3009 A request was received that included an AVP whose flag bits are set to an unrecognized value, or that is inconsistent with the AVP's definition.
DIAMETER_INVALID_AVP_BITS 3009接收到一个请求,该请求包括一个AVP,其标志位被设置为无法识别的值,或者与AVP的定义不一致。
DIAMETER_UNKNOWN_PEER 3010 A CER was received from an unknown peer.
直径\u未知\u对等3010从未知对等接收到CER。
Errors that fall within the transient failures category are used to inform a peer that the request could not be satisfied at the time it was received, but MAY be able to satisfy the request in the future.
属于瞬态故障类别的错误用于通知对等方在收到请求时无法满足请求,但将来可能能够满足请求。
DIAMETER_AUTHENTICATION_REJECTED 4001 The authentication process for the user failed, most likely due to an invalid password used by the user. Further attempts MUST only be tried after prompting the user for a new password.
DIAMETER_AUTHENTICATION_拒绝4001用户的身份验证过程失败,很可能是由于用户使用的密码无效。只有在提示用户输入新密码后,才能尝试进一步尝试。
DIAMETER_OUT_OF_SPACE 4002 A Diameter node received the accounting request but was unable to commit it to stable storage due to a temporary lack of space.
DIAMETER_OUT_OF_SPACE 4002一个DIAMETER节点收到了记帐请求,但由于临时空间不足,无法将其提交到稳定存储。
ELECTION_LOST 4003 The peer has determined that it has lost the election process and has therefore disconnected the transport connection.
ELECTION_LOST 4003对等方已确定其已丢失选举过程,因此已断开传输连接。
Errors that fall within the permanent failures category are used to inform the peer that the request failed, and should not be attempted again.
属于永久故障类别的错误用于通知对等方请求失败,不应再次尝试。
DIAMETER_AVP_UNSUPPORTED 5001 The peer received a message that contained an AVP that is not recognized or supported and was marked with the Mandatory bit. A Diameter message with this error MUST contain one or more Failed-AVP AVP containing the AVPs that caused the failure.
DIAMETER_AVP_UNSUPPORTED 5001对等方收到一条消息,其中包含一个不可识别或不受支持的AVP,并用强制位标记。带有此错误的Diameter消息必须包含一个或多个失败的AVP AVP,其中包含导致故障的AVP。
DIAMETER_UNKNOWN_SESSION_ID 5002 The request contained an unknown Session-Id.
DIAMETER\u UNKNOWN\u SESSION\u ID 5002请求包含未知SESSION-ID。
DIAMETER_AUTHORIZATION_REJECTED 5003 A request was received for which the user could not be authorized. This error could occur if the service requested is not permitted to the user.
DIAMETER\u AUTHORIZATION\u拒绝5003收到一个无法授权用户的请求。如果用户不允许请求的服务,则可能发生此错误。
DIAMETER_INVALID_AVP_VALUE 5004 The request contained an AVP with an invalid value in its data portion. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP.
DIAMETER_INVALID_AVP_值5004请求包含的AVP在其数据部分中具有无效值。指示此错误的Diameter消息必须包括故障AVP AVP中的违规AVP。
DIAMETER_MISSING_AVP 5005 The request did not contain an AVP that is required by the Command Code definition. If this value is sent in the Result-Code AVP, a Failed-AVP AVP SHOULD be included in the message. The Failed-AVP AVP MUST contain an example of the missing AVP complete with the Vendor-Id if applicable. The value field of the missing AVP should be of correct minimum length and contain zeroes.
DIAMETER_MISSING_AVP 5005请求不包含命令代码定义所需的AVP。如果在结果代码AVP中发送此值,则消息中应包含失败的AVP AVP。失败的AVP AVP必须包含缺失的AVP示例,并附上供应商Id(如适用)。缺失AVP的值字段应具有正确的最小长度并包含零。
DIAMETER_RESOURCES_EXCEEDED 5006 A request was received that cannot be authorized because the user has already expended allowed resources. An example of this error condition is a user that is restricted to one dial-up PPP port, attempts to establish a second PPP connection.
DIAMETER_RESOURCES_超过5006收到一个无法授权的请求,因为用户已消耗了允许的资源。此错误情况的一个示例是,用户被限制为一个拨号PPP端口,试图建立第二个PPP连接。
DIAMETER_CONTRADICTING_AVPS 5007 The Home Diameter server has detected AVPs in the request that contradicted each other, and is not willing to provide service to the user. One or more Failed-AVP AVPs MUST be present, containing the AVPs that contradicted each other.
DIAMETER_constanding_AVPS 5007家庭DIAMETER服务器在请求中检测到相互矛盾的avp,并且不愿意向用户提供服务。必须存在一个或多个失败的AVP AVP,其中包含相互矛盾的AVP。
DIAMETER_AVP_NOT_ALLOWED 5008 A message was received with an AVP that MUST NOT be present. The Failed-AVP AVP MUST be included and contain a copy of the offending AVP.
DIAMETER_AVP_NOT_ALLOWED 5008接收到一条消息,其中AVP必须不存在。必须包括失败的AVP AVP,并包含有问题的AVP的副本。
DIAMETER_AVP_OCCURS_TOO_MANY_TIMES 5009 A message was received that included an AVP that appeared more often than permitted in the message definition. The Failed-AVP AVP MUST be included and contain a copy of the first instance of the offending AVP that exceeded the maximum number of occurrences
DIAMETER_AVP_出现次数过多5009收到一条消息,其中包含一个AVP,该AVP出现的频率超出了消息定义中允许的频率。必须包括失败的AVP AVP,并包含超过最大出现次数的违规AVP的第一个实例的副本
DIAMETER_NO_COMMON_APPLICATION 5010 This error is returned when a CER message is received, and there are no common applications supported between the peers.
DIAMETER_NO_COMMON_APPLICATION 5010收到CER消息时返回此错误,并且对等方之间不支持任何公共应用程序。
DIAMETER_UNSUPPORTED_VERSION 5011 This error is returned when a request was received, whose version number is unsupported.
DIAMETER_UNSUPPORTED_VERSION 5011收到不支持其版本号的请求时返回此错误。
DIAMETER_UNABLE_TO_COMPLY 5012 This error is returned when a request is rejected for unspecified reasons.
DIAMETER_UNABLE_TO_Compliance 5012当请求因未指明的原因被拒绝时,将返回此错误。
DIAMETER_INVALID_BIT_IN_HEADER 5013 This error is returned when an unrecognized bit in the Diameter header is set to one (1).
直径\u头5013中的无效\u位\u当直径头中的未识别位设置为一(1)时,返回此错误。
DIAMETER_INVALID_AVP_LENGTH 5014 The request contained an AVP with an invalid length. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP.
DIAMETER_INVALID_AVP_LENGTH 5014请求包含长度无效的AVP。指示此错误的Diameter消息必须包括故障AVP AVP中的违规AVP。
DIAMETER_INVALID_MESSAGE_LENGTH 5015 This error is returned when a request is received with an invalid message length.
DIAMETER_INVALID_MESSAGE_LENGTH 5015当接收到消息长度无效的请求时,将返回此错误。
DIAMETER_INVALID_AVP_BIT_COMBO 5016 The request contained an AVP with which is not allowed to have the given value in the AVP Flags field. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP.
DIAMETER_INVALID_AVP_BIT_COMBO 5016请求包含一个AVP,该AVP不允许在AVP标志字段中具有给定值。指示此错误的Diameter消息必须包括故障AVP AVP中的违规AVP。
DIAMETER_NO_COMMON_SECURITY 5017 This error is returned when a CER message is received, and there are no common security mechanisms supported between the peers. A Capabilities-Exchange-Answer (CEA) MUST be returned with the Result-Code AVP set to DIAMETER_NO_COMMON_SECURITY.
DIAMETER_NO_COMMON_SECURITY 5017收到CER消息时返回此错误,并且对等方之间不支持公共安全机制。返回功能交换应答(CEA)时,必须将结果代码AVP设置为DIAMETER\u NO\u COMMON\u SECURITY。
The 'E' (Error Bit) in the Diameter header is set when the request caused a protocol-related error (see Section 7.1.3). A message with the 'E' bit MUST NOT be sent as a response to an answer message. Note that a message with the 'E' bit set is still subjected to the processing rules defined in Section 6.2. When set, the answer message will not conform to the ABNF specification for the command, and will instead conform to the following ABNF:
当请求导致协议相关错误时(见第7.1.3节),设置Diameter头中的“E”(错误位)。带有“E”位的消息不得作为应答消息的响应发送。请注意,设置了“E”位的消息仍需遵守第6.2节中定义的处理规则。设置后,应答消息将不符合命令的ABNF规范,而是符合以下ABNF:
Message Format
消息格式
<answer-message> ::= < Diameter Header: code, ERR [PXY] > 0*1< Session-Id > { Origin-Host } { Origin-Realm } { Result-Code } [ Origin-State-Id ] [ Error-Reporting-Host ] [ Proxy-Info ] * [ AVP ]
<answer-message> ::= < Diameter Header: code, ERR [PXY] > 0*1< Session-Id > { Origin-Host } { Origin-Realm } { Result-Code } [ Origin-State-Id ] [ Error-Reporting-Host ] [ Proxy-Info ] * [ AVP ]
Note that the code used in the header is the same than the one found in the request message, but with the 'R' bit cleared and the 'E' bit set. The 'P' bit in the header is set to the same value as the one found in the request message.
请注意,标头中使用的代码与请求消息中的代码相同,但清除了“R”位并设置了“E”位。标头中的“P”位设置为与请求消息中的相同值。
The Error-Message AVP (AVP Code 281) is of type UTF8String. It MAY accompany a Result-Code AVP as a human readable error message. The Error-Message AVP is not intended to be useful in real-time, and SHOULD NOT be expected to be parsed by network entities.
错误消息AVP(AVP代码281)的类型为UTF8String。它可以作为人类可读的错误消息伴随结果代码AVP。错误消息AVP并不打算在实时中有用,并且不应被网络实体解析。
The Error-Reporting-Host AVP (AVP Code 294) is of type DiameterIdentity. This AVP contains the identity of the Diameter host that sent the Result-Code AVP to a value other than 2001 (Success), only if the host setting the Result-Code is different from the one encoded in the Origin-Host AVP. This AVP is intended to be used for troubleshooting purposes, and MUST be set when the Result-Code AVP indicates a failure.
错误报告主机AVP(AVP代码294)的类型为DiameterIdentity。仅当设置结果代码的主机与源主机AVP中编码的主机不同时,此AVP包含将结果代码AVP发送到除2001(成功)之外的值的Diameter主机的标识。此AVP旨在用于故障排除,并且必须在结果代码AVP指示故障时设置。
The Failed-AVP AVP (AVP Code 279) is of type Grouped and provides debugging information in cases where a request is rejected or not fully processed due to erroneous information in a specific AVP. The value of the Result-Code AVP will provide information on the reason for the Failed-AVP AVP.
失败的AVP AVP(AVP代码279)属于分组类型,并且在由于特定AVP中的错误信息导致请求被拒绝或未完全处理的情况下提供调试信息。结果代码AVP的值将提供有关AVP AVP失败原因的信息。
The possible reasons for this AVP are the presence of an improperly constructed AVP, an unsupported or unrecognized AVP, an invalid AVP value, the omission of a required AVP, the presence of an explicitly excluded AVP (see tables in Section 10), or the presence of two or more occurrences of an AVP which is restricted to 0, 1, or 0-1 occurrences.
该AVP的可能原因是存在构造不当的AVP、不受支持或无法识别的AVP、无效的AVP值、遗漏所需的AVP、存在明确排除的AVP(见第10节中的表),或存在两次或两次以上的AVP,且仅限于0、1或0-1次。
A Diameter message MAY contain one Failed-AVP AVP, containing the entire AVP that could not be processed successfully. If the failure reason is omission of a required AVP, an AVP with the missing AVP code, the missing vendor id, and a zero filled payload of the minimum required length for the omitted AVP will be added.
Diameter消息可能包含一个失败的AVP AVP,其中包含无法成功处理的整个AVP。如果故障原因是遗漏了所需的AVP,则将添加一个带有遗漏的AVP代码的AVP、遗漏的供应商id以及遗漏的AVP所需最小长度的零填充有效载荷。
AVP Format
AVP格式
<Failed-AVP> ::= < AVP Header: 279 > 1* {AVP}
<Failed-AVP> ::= < AVP Header: 279 > 1* {AVP}
The Experimental-Result AVP (AVP Code 297) is of type Grouped, and indicates whether a particular vendor-specific request was completed successfully or whether an error occurred. Its Data field has the following ABNF grammar:
实验结果AVP(AVP代码297)属于分组类型,指示特定供应商的请求是否成功完成或是否发生错误。其数据字段具有以下ABNF语法:
AVP Format
AVP格式
Experimental-Result ::= < AVP Header: 297 > { Vendor-Id } { Experimental-Result-Code }
Experimental-Result ::= < AVP Header: 297 > { Vendor-Id } { Experimental-Result-Code }
The Vendor-Id AVP (see Section 5.3.3) in this grouped AVP identifies the vendor responsible for the assignment of the result code which follows. All Diameter answer messages defined in vendor-specific applications MUST include either one Result-Code AVP or one Experimental-Result AVP.
本分组AVP中的供应商Id AVP(见第5.3.3节)标识了负责分配以下结果代码的供应商。供应商特定应用程序中定义的所有Diameter应答消息必须包含一个结果代码AVP或一个实验结果AVP。
The Experimental-Result-Code AVP (AVP Code 298) is of type Unsigned32 and contains a vendor-assigned value representing the result of processing the request.
实验结果代码AVP(AVP代码298)的类型为Unsigned32,包含供应商分配的值,表示处理请求的结果。
It is recommended that vendor-specific result codes follow the same conventions given for the Result-Code AVP regarding the different types of result codes and the handling of errors (for non 2xxx values).
对于不同类型的结果代码和错误处理(对于非2xxx值),建议供应商特定的结果代码遵循为结果代码AVP提供的相同约定。
Diameter can provide two different types of services to applications. The first involves authentication and authorization, and can optionally make use of accounting. The second only makes use of accounting.
Diameter可以为应用程序提供两种不同类型的服务。第一种涉及身份验证和授权,并且可以选择使用记帐。第二种方法只使用会计。
When a service makes use of the authentication and/or authorization portion of an application, and a user requests access to the network, the Diameter client issues an auth request to its local server. The auth request is defined in a service specific Diameter application (e.g., NASREQ). The request contains a Session-Id AVP, which is used in subsequent messages (e.g., subsequent authorization, accounting, etc) relating to the user's session. The Session-Id AVP is a means for the client and servers to correlate a Diameter message with a user session.
当服务使用应用程序的身份验证和/或授权部分,并且用户请求访问网络时,Diameter客户端向其本地服务器发出身份验证请求。认证请求在特定于服务的Diameter应用程序(例如NASREQ)中定义。该请求包含会话Id AVP,该会话Id AVP用于与用户会话相关的后续消息(例如,后续授权、记帐等)。会话Id AVP是客户端和服务器将Diameter消息与用户会话关联的一种方法。
When a Diameter server authorizes a user to use network resources for a finite amount of time, and it is willing to extend the authorization via a future request, it MUST add the Authorization-Lifetime AVP to the answer message. The Authorization-Lifetime AVP defines the maximum number of seconds a user MAY make use of the resources before another authorization request is expected by the server. The Auth-Grace-Period AVP contains the number of seconds following the expiration of the Authorization-Lifetime, after which the server will release all state information related to the user's session. Note that if payment for services is expected by the serving realm from the user's home realm, the Authorization-Lifetime AVP, combined with the Auth-Grace-Period AVP, implies the maximum length of the session the home realm is willing to be fiscally responsible for. Services provided past the expiration of the Authorization-Lifetime and Auth-Grace-Period AVPs are the responsibility of the access device. Of course, the actual cost of services rendered is clearly outside the scope of the protocol.
当Diameter服务器授权用户在有限的时间内使用网络资源,并且它愿意通过未来的请求扩展授权时,它必须将授权生存期AVP添加到应答消息中。授权生存期AVP定义了在服务器预期另一个授权请求之前,用户可以使用资源的最大秒数。授权宽限期AVP包含授权生存期到期后的秒数,在此秒数之后,服务器将释放与用户会话相关的所有状态信息。请注意,如果服务领域期望从用户的主领域支付服务费用,则授权生存期AVP与身份验证宽限期AVP相结合,意味着主领域愿意承担财政责任的会话的最大长度。在授权生命周期和授权宽限期AVP到期后提供的服务由接入设备负责。当然,提供服务的实际成本显然超出了协议的范围。
An access device that does not expect to send a re-authorization or a session termination request to the server MAY include the Auth-Session-State AVP with the value set to NO_STATE_MAINTAINED as a hint to the server. If the server accepts the hint, it agrees that since no session termination message will be received once service to the user is terminated, it cannot maintain state for the session. If the answer message from the server contains a different value in the Auth-Session-State AVP (or the default value if the AVP is absent), the access device MUST follow the server's directives. Note that the value NO_STATE_MAINTAINED MUST NOT be set in subsequent re-authorization requests and answers.
不希望向服务器发送重新授权或会话终止请求的接入设备可以包括Auth会话状态AVP,其值设置为NO_State_,作为对服务器的提示。如果服务器接受该提示,则它同意,因为一旦终止对用户的服务,就不会收到会话终止消息,所以它无法维护会话的状态。如果来自服务器的应答消息在身份验证会话状态AVP中包含不同的值(如果没有AVP,则为默认值),则访问设备必须遵循服务器的指令。请注意,在随后的重新授权请求和应答中,不得设置NO_STATE_mainted值。
The base protocol does not include any authorization request messages, since these are largely application-specific and are defined in a Diameter application document. However, the base protocol does define a set of messages that is used to terminate user sessions. These are used to allow servers that maintain state information to free resources.
基本协议不包括任何授权请求消息,因为这些消息主要是特定于应用程序的,并且在Diameter应用程序文档中定义。但是,基本协议确实定义了一组用于终止用户会话的消息。这些用于允许维护状态信息的服务器释放资源。
When a service only makes use of the Accounting portion of the Diameter protocol, even in combination with an application, the Session-Id is still used to identify user sessions. However, the session termination messages are not used, since a session is signaled as being terminated by issuing an accounting stop message.
当服务仅使用Diameter协议的记帐部分时,即使与应用程序结合使用,会话Id仍用于标识用户会话。但是,不使用会话终止消息,因为通过发出记帐停止消息,会话被通知为正在终止。
This section contains a set of finite state machines, representing the life cycle of Diameter sessions, and which MUST be observed by all Diameter implementations that make use of the authentication and/or authorization portion of a Diameter application. The term Service-Specific below refers to a message defined in a Diameter application (e.g., Mobile IPv4, NASREQ).
本节包含一组有限状态机,表示Diameter会话的生命周期,所有使用Diameter应用程序的身份验证和/或授权部分的Diameter实现都必须遵守这些状态机。以下特定于服务的术语是指在Diameter应用程序(例如,移动IPv4、NASREQ)中定义的消息。
There are four different authorization session state machines supported in the Diameter base protocol. The first two describe a session in which the server is maintaining session state, indicated by the value of the Auth-Session-State AVP (or its absence). One describes the session from a client perspective, the other from a server perspective. The second two state machines are used when the server does not maintain session state. Here again, one describes the session from a client perspective, the other from a server perspective.
Diameter基本协议支持四种不同的授权会话状态机。前两个描述服务器正在维护会话状态的会话,由Auth session state AVP的值(或其不存在)表示。一个从客户机角度描述会话,另一个从服务器角度描述会话。当服务器不维护会话状态时,使用第二个两个状态机。这里,一个从客户机角度描述会话,另一个从服务器角度描述会话。
When a session is moved to the Idle state, any resources that were allocated for the particular session must be released. Any event not listed in the state machines MUST be considered as an error condition, and an answer, if applicable, MUST be returned to the originator of the message.
当会话移动到空闲状态时,必须释放为特定会话分配的所有资源。任何未在状态机中列出的事件都必须视为错误情况,并且如果适用,必须将答案返回给消息的发起人。
In the state table, the event 'Failure to send X' means that the Diameter agent is unable to send command X to the desired destination. This could be due to the peer being down, or due to the peer sending back a transient failure or temporary protocol error notification DIAMETER_TOO_BUSY or DIAMETER_LOOP_DETECTED in the Result-Code AVP of the corresponding Answer command. The event 'X successfully sent' is the complement of 'Failure to send X'.
在状态表中,“发送X失败”事件表示Diameter代理无法将命令X发送到所需的目标。这可能是由于对等机停机,或由于对等机发回瞬态故障或临时协议错误通知DIAMETER\u TOO\u BUSY或DIAMETER\u LOOP\u(在相应应答命令的结果代码AVP中检测到)。事件“X成功发送”是“X发送失败”的补充。
The following state machine is observed by a client when state is maintained on the server:
在服务器上维护状态时,客户端会观察到以下状态机:
CLIENT, STATEFUL State Event Action New State ------------------------------------------------------------- Idle Client or Device Requests Send Pending access service specific auth req
CLIENT, STATEFUL State Event Action New State ------------------------------------------------------------- Idle Client or Device Requests Send Pending access service specific auth req
Idle ASR Received Send ASA Idle for unknown session with Result-Code = UNKNOWN_ SESSION_ID
Idle ASR接收发送ASA Idle用于未知会话,结果代码=未知会话ID
Pending Successful Service-specific Grant Open authorization answer Access received with default Auth-Session-State value
使用默认身份验证会话状态值接收到挂起的特定于服务的授权打开授权应答访问
Pending Successful Service-specific Sent STR Discon authorization answer received but service not provided
已收到挂起的特定于服务的已发送STR Discon授权应答,但未提供服务
Pending Error processing successful Sent STR Discon Service-specific authorization answer
处理成功发送的STR Discon服务特定授权应答的挂起错误
Pending Failed Service-specific Cleanup Idle authorization answer received
接收到挂起的失败服务特定清理空闲授权应答
Open User or client device Send Open requests access to service service specific auth req
开放用户或客户端设备发送开放请求访问特定于服务的身份验证请求
Open Successful Service-specific Provide Open authorization answer received Service
打开成功的特定服务提供打开的授权应答接收服务
Open Failed Service-specific Discon. Idle authorization answer user/device received.
打开失败的服务特定Discon。接收到空闲授权应答用户/设备。
Open Session-Timeout Expires on Send STR Discon Access Device
发送STR Discon访问设备上的打开会话超时过期
Open ASR Received, Send ASA Discon client will comply with with request to end the session Result-Code = SUCCESS, Send STR.
打开ASR接收,发送ASA Discon客户端将按照请求结束会话结果代码=成功,发送STR。
Open ASR Received, Send ASA Open client will not comply with with request to end the session Result-Code != SUCCESS
Open ASR已收到,发送ASA Open client将不符合结束会话结果代码的请求!=成功
Open Authorization-Lifetime + Send STR Discon Auth-Grace-Period expires on access device
在访问设备上打开授权生存期+发送STR Discon Auth宽限期到期
Discon ASR Received Send ASA Discon
Discon ASR接收发送ASA Discon
Discon STA Received Discon. Idle user/device
Discon STA收到Discon。空闲用户/设备
The following state machine is observed by a server when it is maintaining state for the session:
服务器在维护会话状态时会观察到以下状态机:
SERVER, STATEFUL State Event Action New State ------------------------------------------------------------- Idle Service-specific authorization Send Open request received, and successful user is authorized serv. specific answer
SERVER, STATEFUL State Event Action New State ------------------------------------------------------------- Idle Service-specific authorization Send Open request received, and successful user is authorized serv. specific answer
Idle Service-specific authorization Send Idle request received, and failed serv. user is not authorized specific answer
收到空闲服务特定授权发送空闲请求,但服务失败。用户未被授权回答特定问题
Open Service-specific authorization Send Open request received, and user successful is authorized serv. specific answer
打开服务特定授权发送收到的打开请求,成功的用户被授权服务。具体答案
Open Service-specific authorization Send Idle request received, and user failed serv. is not authorized specific answer, Cleanup
收到打开服务特定授权发送空闲请求,用户服务失败。未授权具体回答,请清理
Open Home server wants to Send ASR Discon terminate the service
Open Home server希望发送ASR Discon以终止服务
Open Authorization-Lifetime (and Cleanup Idle Auth-Grace-Period) expires on home server.
家庭服务器上的打开授权生存期(以及清理空闲身份验证宽限期)过期。
Open Session-Timeout expires on Cleanup Idle home server
清理空闲主服务器时打开会话超时过期
Discon Failure to send ASR Wait, Discon resend ASR
Discon发送ASR等待失败,Discon重新发送ASR
Discon ASR successfully sent and Cleanup Idle ASA Received with Result-Code
Discon ASR已成功发送并接收到清理空闲ASA,结果代码为
Not ASA Received None No Change. Discon
没有ASA收到任何变化。Discon
Any STR Received Send STA, Idle Cleanup.
接收到的任何STR发送STA,空闲清理。
The following state machine is observed by a client when state is not maintained on the server:
当服务器上未维护状态时,客户端会观察到以下状态机:
CLIENT, STATELESS State Event Action New State ------------------------------------------------------------- Idle Client or Device Requests Send Pending access service specific auth req
CLIENT, STATELESS State Event Action New State ------------------------------------------------------------- Idle Client or Device Requests Send Pending access service specific auth req
Pending Successful Service-specific Grant Open authorization answer Access received with Auth-Session-State set to NO_STATE_MAINTAINED
等待成功的特定于服务的授权打开授权应答访问,已接收到授权会话状态设置为NO_State_的访问
Pending Failed Service-specific Cleanup Idle authorization answer received
接收到挂起的失败服务特定清理空闲授权应答
Open Session-Timeout Expires on Discon. Idle Access Device user/device
Discon上的打开会话超时过期。空闲访问设备用户/设备
Open Service to user is terminated Discon. Idle user/device
向用户开放的服务在Discon中终止。空闲用户/设备
The following state machine is observed by a server when it is not maintaining state for the session:
当服务器未维护会话状态时,会观察到以下状态机:
SERVER, STATELESS State Event Action New State ------------------------------------------------------------- Idle Service-specific authorization Send serv. Idle request received, and specific successfully processed answer
SERVER, STATELESS State Event Action New State ------------------------------------------------------------- Idle Service-specific authorization Send serv. Idle request received, and specific successfully processed answer
The following state machines MUST be supported for applications that have an accounting portion or that require only accounting services. The first state machine is to be observed by clients.
具有记帐部分或仅需要记帐服务的应用程序必须支持以下状态机。客户端将观察第一个状态机。
See Section 9.7 for Accounting Command Codes and Section 9.8 for Accounting AVPs.
会计命令代码见第9.7节,会计AVP见第9.8节。
The server side in the accounting state machine depends in some cases on the particular application. The Diameter base protocol defines a default state machine that MUST be followed by all applications that have not specified other state machines. This is the second state machine in this section described below.
记帐状态机中的服务器端在某些情况下取决于特定的应用程序。Diameter base协议定义了默认状态机,所有未指定其他状态机的应用程序都必须遵循该默认状态机。这是本节中的第二个状态机,如下所述。
The default server side state machine requires the reception of accounting records in any order and at any time, and does not place any standards requirement on the processing of these records. Implementations of Diameter MAY perform checking, ordering, correlation, fraud detection, and other tasks based on these records. Both base Diameter AVPs as well as application specific AVPs MAY be inspected as a part of these tasks. The tasks can happen either immediately after record reception or in a post-processing phase. However, as these tasks are typically application or even policy dependent, they are not standardized by the Diameter specifications. Applications MAY define requirements on when to accept accounting records based on the used value of Accounting-Realtime-Required AVP, credit limits checks, and so on.
默认服务器端状态机要求在任何时间以任何顺序接收会计记录,并且不对这些记录的处理提出任何标准要求。Diameter的实现可以基于这些记录执行检查、排序、关联、欺诈检测和其他任务。作为这些任务的一部分,可以检查基础直径AVP和应用特定AVP。这些任务可以在收到记录后立即执行,也可以在后处理阶段执行。但是,由于这些任务通常依赖于应用程序,甚至依赖于策略,因此它们没有通过直径规范进行标准化。应用程序可以根据会计实时所需AVP、信用限额检查等的使用值定义何时接受会计记录的要求。
However, the Diameter base protocol defines one optional server side state machine that MAY be followed by applications that require keeping track of the session state at the accounting server. Note that such tracking is incompatible with the ability to sustain long duration connectivity problems. Therefore, the use of this state machine is recommended only in applications where the value of the Accounting-Realtime-Required AVP is DELIVER_AND_GRANT, and hence accounting connectivity problems are required to cause the serviced user to be disconnected. Otherwise, records produced by the client
但是,Diameter基本协议定义了一个可选的服务器端状态机,应用程序可能会跟踪记帐服务器上的会话状态。请注意,这种跟踪与维持长时间连接问题的能力不兼容。因此,建议仅在会计实时所需AVP的值为DELIVER_和_GRANT的应用程序中使用此状态机,因此需要会计连接问题来导致服务用户断开连接。否则,由客户生成的记录
may be lost by the server which no longer accepts them after the connectivity is re-established. This state machine is the third state machine in this section. The state machine is supervised by a supervision session timer Ts, which the value should be reasonably higher than the Acct_Interim_Interval value. Ts MAY be set to two times the value of the Acct_Interim_Interval so as to avoid the accounting session in the Diameter server to change to Idle state in case of short transient network failure.
重新建立连接后,不再接受这些数据的服务器可能会丢失这些数据。此状态机是本节中的第三个状态机。状态机由一个监控会话计时器Ts进行监控,该计时器的值应合理地高于Acct_中间间隔值。Ts可以设置为Acct_中间_间隔值的两倍,以避免Diameter服务器中的记帐会话在短暂网络故障时变为空闲状态。
Any event not listed in the state machines MUST be considered as an error condition, and a corresponding answer, if applicable, MUST be returned to the originator of the message.
任何未在状态机中列出的事件都必须视为错误情况,如果适用,必须将相应的答案返回给消息的发起人。
In the state table, the event 'Failure to send' means that the Diameter client is unable to communicate with the desired destination. This could be due to the peer being down, or due to the peer sending back a transient failure or temporary protocol error notification DIAMETER_OUT_OF_SPACE, DIAMETER_TOO_BUSY, or DIAMETER_LOOP_DETECTED in the Result-Code AVP of the Accounting Answer command.
在状态表中,“发送失败”事件表示Diameter客户端无法与所需目标通信。这可能是由于对等机停机,或者是由于对等机发回暂时故障或临时协议错误通知DIAMETER_OUT_OF_SPACE,DIAMETER_TOO_BUSY,或者在Accounting Answer命令的结果代码AVP中检测到DIAMETER_LOOP_。
The event 'Failed answer' means that the Diameter client received a non-transient failure notification in the Accounting Answer command.
事件“Failed answer”表示Diameter客户端在Accounting answer命令中收到非暂时性故障通知。
Note that the action 'Disconnect user/dev' MUST have an effect also to the authorization session state table, e.g., cause the STR message to be sent, if the given application has both authentication/authorization and accounting portions.
请注意,如果给定应用程序同时具有身份验证/授权和记帐部分,则操作“Disconnect user/dev”也必须对授权会话状态表产生影响,例如,导致发送STR消息。
The states PendingS, PendingI, PendingL, PendingE and PendingB stand for pending states to wait for an answer to an accounting request related to a Start, Interim, Stop, Event or buffered record, respectively.
状态PendingS、PendingI、PendingL、PendingE和PendingB分别代表等待与开始、中间、停止、事件或缓冲记录相关的记帐请求的响应的挂起状态。
CLIENT, ACCOUNTING State Event Action New State ------------------------------------------------------------- Idle Client or device requests Send PendingS access accounting start req.
CLIENT, ACCOUNTING State Event Action New State ------------------------------------------------------------- Idle Client or device requests Send PendingS access accounting start req.
Idle Client or device requests Send PendingE a one-time service accounting event req
空闲客户端或设备请求向PendingE发送一个一次性服务记帐事件请求
Idle Records in storage Send PendingB record
存储器中的空闲记录发送挂起B记录
PendingS Successful accounting Open start answer received
已收到待决事项成功会计开放式开始回答
PendingS Failure to send and buffer Store Open space available and realtime Start not equal to DELIVER_AND_GRANT Record
挂起发送和缓冲区存储可用开放空间失败,实时启动不等于交付和授予记录
PendingS Failure to send and no buffer Open space available and realtime equal to GRANT_AND_LOSE
PendingS无法发送且没有可用的缓冲区开放空间,实时性等于GRANT_和_LOSE
PendingS Failure to send and no buffer Disconnect Idle space available and realtime user/dev not equal to GRANT_AND_LOSE
挂起发送失败且无缓冲区断开可用空闲空间的连接,实时用户/dev不等于GRANT_和_LOSE
PendingS Failed accounting start answer Open received and realtime equal to GRANT_AND_LOSE
PendingS Failed accounting start Response Open已收到且实时等于GRANT_和_LOSE
PendingS Failed accounting start answer Disconnect Idle received and realtime not user/dev equal to GRANT_AND_LOSE
挂起失败记帐开始应答断开收到的空闲和实时用户/开发不等于授予和丢失
PendingS User service terminated Store PendingS stop record
挂起用户服务终止存储挂起停止记录
Open Interim interval elapses Send PendingI accounting interim record Open User service terminated Send PendingL accounting stop req.
打开临时间隔已过发送挂起记帐临时记录打开用户服务已终止发送挂起记帐停止请求。
PendingI Successful accounting interim Open answer received
收到PendingI成功的会计期中公开回答
PendingI Failure to send and (buffer Store Open space available or old record interim can be overwritten) and record realtime not equal to DELIVER_AND_GRANT
PendingI未能发送和(缓冲区存储开放空间可用或旧记录临时可能被覆盖)和记录实时性不等于交付和授予
PendingI Failure to send and no buffer Open space available and realtime equal to GRANT_AND_LOSE
PendingI发送失败且没有可用的缓冲区开放空间,实时性等于GRANT_和_LOSE
PendingI Failure to send and no buffer Disconnect Idle space available and realtime user/dev not equal to GRANT_AND_LOSE
PendingI发送失败且无缓冲区断开可用空闲空间的连接,且实时用户/dev不等于GRANT_和_LOSE
PendingI Failed accounting interim Open answer received and realtime equal to GRANT_AND_LOSE
收到PendingI失败的会计期中公开回答,实时等于GRANT_和_LOSE
PendingI Failed accounting interim Disconnect Idle answer received and realtime user/dev not equal to GRANT_AND_LOSE
PendingI失败,收到空闲应答,实时用户/dev不等于GRANT_和_LOSE
PendingI User service terminated Store PendingI stop record PendingE Successful accounting Idle event answer received
PendingI用户服务已终止存储PendingI停止记录PendingE已收到成功的记帐空闲事件应答
PendingE Failure to send and buffer Store Idle space available event record
PendingE发送和缓冲区存储可用空闲空间失败事件记录
PendingE Failure to send and no buffer Idle space available
PendingE发送失败,没有可用的缓冲区空闲空间
PendingE Failed accounting event answer Idle received
收到PendingE失败的记帐事件应答空闲
PendingB Successful accounting answer Delete Idle received record
PendingB成功的会计应答删除空闲接收记录
PendingB Failure to send Idle
PendingB发送空闲数据失败
PendingB Failed accounting answer Delete Idle received record
PendingB会计应答失败删除空闲接收记录
PendingL Successful accounting Idle stop answer received
收到PendingL成功记帐空闲停止应答
PendingL Failure to send and buffer Store Idle space available stop record
PendingL发送和缓冲区存储空闲空间可用停止记录失败
PendingL Failure to send and no buffer Idle space available
PendingL发送失败,没有可用的缓冲区空闲空间
PendingL Failed accounting stop answer Idle received
收到PendingL失败的记帐停止应答空闲
SERVER, STATELESS ACCOUNTING State Event Action New State -------------------------------------------------------------
SERVER, STATELESS ACCOUNTING State Event Action New State -------------------------------------------------------------
Idle Accounting start request Send Idle received, and successfully accounting processed. start answer
空闲记帐启动请求发送空闲已收到,并已成功处理记帐。开始回答
Idle Accounting event request Send Idle received, and successfully accounting processed. event answer
Idle Accounting事件请求发送Idle已收到,并已成功处理记帐。事件回答
Idle Interim record received, Send Idle and successfully processed. accounting interim answer
接收空闲临时记录,发送空闲记录并成功处理。会计中期答复
Idle Accounting stop request Send Idle received, and successfully accounting processed stop answer
空闲记帐停止请求发送空闲收到,并成功记帐处理停止应答
Idle Accounting request received, Send Idle no space left to store accounting records answer, Result-Code = OUT_OF_ SPACE
收到空闲会计请求,发送空闲无空间存储会计记录应答,结果代码=空间不足
SERVER, STATEFUL ACCOUNTING State Event Action New State -------------------------------------------------------------
SERVER, STATEFUL ACCOUNTING State Event Action New State -------------------------------------------------------------
Idle Accounting start request Send Open received, and successfully accounting processed. start answer, Start Ts
空闲记帐启动请求发送打开已收到,并已成功处理记帐。开始回答,开始测试
Idle Accounting event request Send Idle received, and successfully accounting processed. event answer
Idle Accounting事件请求发送Idle已收到,并已成功处理记帐。事件回答
Idle Accounting request received, Send Idle no space left to store accounting records answer, Result-Code = OUT_OF_ SPACE
收到空闲会计请求,发送空闲无空间存储会计记录应答,结果代码=空间不足
Open Interim record received, Send Open and successfully processed. accounting interim answer, Restart Ts
打开收到的临时记录,发送打开并成功处理。会计临时回答,重新启动Ts
Open Accounting stop request Send Idle received, and successfully accounting processed stop answer, Stop Ts
打开会计停止请求发送空闲接收,并成功处理会计停止应答,停止Ts
Open Accounting request received, Send Idle no space left to store accounting records answer, Result-Code = OUT_OF_ SPACE, Stop Ts
收到打开会计请求,发送空闲无空间存储会计记录应答,结果代码=空间不足,停止Ts
Open Session supervision timer Ts Stop Ts Idle expired
打开会话监视计时器Ts停止Ts空闲已过期
A Diameter server may initiate a re-authentication and/or re-authorization service for a particular session by issuing a Re-Auth-Request (RAR).
Diameter服务器可以通过发出重新身份验证请求(RAR)为特定会话启动重新身份验证和/或重新授权服务。
For example, for pre-paid services, the Diameter server that originally authorized a session may need some confirmation that the user is still using the services.
例如,对于预付费服务,最初授权会话的Diameter服务器可能需要确认用户仍在使用服务。
An access device that receives a RAR message with Session-Id equal to a currently active session MUST initiate a re-auth towards the user, if the service supports this particular feature. Each Diameter application MUST state whether service-initiated re-auth is supported, since some applications do not allow access devices to prompt the user for re-auth.
如果服务支持此特定功能,则接收会话Id等于当前活动会话的RAR消息的访问设备必须向用户发起重新身份验证。每个Diameter应用程序必须说明是否支持服务启动的重新身份验证,因为某些应用程序不允许访问设备提示用户重新身份验证。
The Re-Auth-Request (RAR), indicated by the Command-Code set to 258 and the message flags' 'R' bit set, may be sent by any server to the access device that is providing session service, to request that the user be re-authenticated and/or re-authorized.
由设置为258的命令代码和消息标志“R”位集指示的重新身份验证请求(RAR)可由任何服务器发送到提供会话服务的接入设备,以请求对用户进行重新身份验证和/或重新授权。
Message Format
消息格式
<RAR> ::= < Diameter Header: 258, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } { Re-Auth-Request-Type } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]
<RAR> ::= < Diameter Header: 258, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } { Re-Auth-Request-Type } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]
The Re-Auth-Answer (RAA), indicated by the Command-Code set to 258 and the message flags' 'R' bit clear, is sent in response to the RAR. The Result-Code AVP MUST be present, and indicates the disposition of the request.
重新验证应答(RAA)由设置为258的命令代码和消息标志“R”位清除指示,发送该应答以响应RAR。结果代码AVP必须存在,并指示请求的处理。
A successful RAA message MUST be followed by an application-specific authentication and/or authorization message.
成功的RAA消息后面必须有特定于应用程序的身份验证和/或授权消息。
Message Format
消息格式
<RAA> ::= < Diameter Header: 258, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Host-Cache-Time ] * [ Proxy-Info ] * [ AVP ]
<RAA> ::= < Diameter Header: 258, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Host-Cache-Time ] * [ Proxy-Info ] * [ AVP ]
It is necessary for a Diameter server that authorized a session, for which it is maintaining state, to be notified when that session is no longer active, both for tracking purposes as well as to allow stateful agents to release any resources that they may have provided for the user's session. For sessions whose state is not being maintained, this section is not used.
授权会话的Diameter服务器需要在该会话不再处于活动状态时得到通知,以便进行跟踪,并允许有状态代理释放其为用户会话提供的任何资源。对于未维护其状态的会话,不使用此部分。
When a user session that required Diameter authorization terminates, the access device that provided the service MUST issue a Session-Termination-Request (STR) message to the Diameter server that authorized the service, to notify it that the session is no longer active. An STR MUST be issued when a user session terminates for any reason, including user logoff, expiration of Session-Timeout, administrative action, termination upon receipt of an Abort-Session-Request (see below), orderly shutdown of the access device, etc.
当需要Diameter授权的用户会话终止时,提供服务的访问设备必须向授权该服务的Diameter服务器发出会话终止请求(STR)消息,通知其会话不再处于活动状态。当用户会话因任何原因终止时,必须发出STR,包括用户注销、会话超时过期、管理操作、在收到中止会话请求时终止(见下文)、有序关闭访问设备等。
The access device also MUST issue an STR for a session that was authorized but never actually started. This could occur, for example, due to a sudden resource shortage in the access device, or because the access device is unwilling to provide the type of service requested in the authorization, or because the access device does not support a mandatory AVP returned in the authorization, etc.
访问设备还必须为已授权但从未实际启动的会话发出STR。这可能发生,例如,由于接入设备中的突然资源短缺,或者因为接入设备不愿意提供授权中请求的服务类型,或者因为接入设备不支持授权中返回的强制AVP,等等。
It is also possible that a session that was authorized is never actually started due to action of a proxy. For example, a proxy may modify an authorization answer, converting the result from success to failure, prior to forwarding the message to the access device. If the answer did not contain an Auth-Session-State AVP with the value
也有可能由于代理的操作,已授权的会话从未实际启动。例如,代理可以在将消息转发到接入设备之前修改授权应答,将结果从成功转换为失败。如果答案不包含具有以下值的身份验证会话状态AVP
NO_STATE_MAINTAINED, a proxy that causes an authorized session not to be started MUST issue an STR to the Diameter server that authorized the session, since the access device has no way of knowing that the session had been authorized.
无状态维护,导致授权会话未启动的代理必须向授权会话的Diameter服务器发出STR,因为访问设备无法知道会话已被授权。
A Diameter server that receives an STR message MUST clean up resources (e.g., session state) associated with the Session-Id specified in the STR, and return a Session-Termination-Answer.
接收STR消息的Diameter服务器必须清理与STR中指定的会话Id关联的资源(例如,会话状态),并返回会话终止应答。
A Diameter server also MUST clean up resources when the Session-Timeout expires, or when the Authorization-Lifetime and the Auth-Grace-Period AVPs expires without receipt of a re-authorization request, regardless of whether an STR for that session is received. The access device is not expected to provide service beyond the expiration of these timers; thus, expiration of either of these timers implies that the access device may have unexpectedly shut down.
Diameter服务器还必须在会话超时或授权生存期和授权宽限期AVPs到期而未收到重新授权请求时清理资源,无论是否收到该会话的STR。接入设备预计不会在这些定时器到期后提供服务;因此,这些定时器中的任何一个的到期意味着接入设备可能已经意外地关闭。
The Session-Termination-Request (STR), indicated by the Command-Code set to 275 and the Command Flags' 'R' bit set, is sent by the access device to inform the Diameter Server that an authenticated and/or authorized session is being terminated.
会话终止请求(STR)由设置为275的命令代码和设置的命令标志“R”位表示,由访问设备发送,以通知Diameter服务器正在终止经过身份验证和/或授权的会话。
Message Format
消息格式
<STR> ::= < Diameter Header: 275, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Auth-Application-Id } { Termination-Cause } [ User-Name ] [ Destination-Host ] * [ Class ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]
<STR> ::= < Diameter Header: 275, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Auth-Application-Id } { Termination-Cause } [ User-Name ] [ Destination-Host ] * [ Class ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]
The Session-Termination-Answer (STA), indicated by the Command-Code set to 275 and the message flags' 'R' bit clear, is sent by the Diameter Server to acknowledge the notification that the session has been terminated. The Result-Code AVP MUST be present, and MAY contain an indication that an error occurred while servicing the STR.
Diameter服务器发送会话终止应答(STA),由设置为275的命令代码和消息标志“R”位清除指示,以确认会话已终止的通知。结果代码AVP必须存在,并且可能包含维修STR时发生错误的指示。
Upon sending or receipt of the STA, the Diameter Server MUST release all resources for the session indicated by the Session-Id AVP. Any intermediate server in the Proxy-Chain MAY also release any resources, if necessary.
发送或接收STA后,Diameter服务器必须释放会话Id AVP指示的会话的所有资源。如有必要,代理链中的任何中间服务器也可以释放任何资源。
Message Format
消息格式
<STA> ::= < Diameter Header: 275, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] * [ Class ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] [ Origin-State-Id ] * [ Redirect-Host ] [ Redirect-Host-Usage ] ^ [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ]
<STA> ::= < Diameter Header: 275, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] * [ Class ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] [ Origin-State-Id ] * [ Redirect-Host ] [ Redirect-Host-Usage ] ^ [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ]
A Diameter server may request that the access device stop providing service for a particular session by issuing an Abort-Session-Request (ASR).
Diameter服务器可以通过发出中止会话请求(ASR)来请求接入设备停止为特定会话提供服务。
For example, the Diameter server that originally authorized the session may be required to cause that session to be stopped for credit or other reasons that were not anticipated when the session was first authorized. On the other hand, an operator may maintain a management server for the purpose of issuing ASRs to administratively remove users from the network.
例如,最初授权该会话的Diameter服务器可能需要导致该会话停止,原因是首次授权该会话时未预料到的信用或其他原因。另一方面,运营商可以维护管理服务器,以便发布asr以管理方式将用户从网络中移除。
An access device that receives an ASR with Session-ID equal to a currently active session MAY stop the session. Whether the access
接收会话ID等于当前活动会话的ASR的接入设备可以停止会话。是否访问
device stops the session or not is implementation- and/or configuration-dependent. For example, an access device may honor ASRs from certain agents only. In any case, the access device MUST respond with an Abort-Session-Answer, including a Result-Code AVP to indicate what action it took.
设备是否停止会话取决于实现和/或配置。例如,接入设备可能只接受来自某些代理的ASR。在任何情况下,接入设备都必须响应中止会话应答,包括结果代码AVP,以指示其采取的操作。
Note that if the access device does stop the session upon receipt of an ASR, it issues an STR to the authorizing server (which may or may not be the agent issuing the ASR) just as it would if the session were terminated for any other reason.
请注意,如果访问设备在收到ASR后停止会话,它会向授权服务器(可能是也可能不是发出ASR的代理)发出STR,就像会话因任何其他原因终止一样。
The Abort-Session-Request (ASR), indicated by the Command-Code set to 274 and the message flags' 'R' bit set, may be sent by any server to the access device that is providing session service, to request that the session identified by the Session-Id be stopped.
由设置为274的命令代码和消息标志“R”位集指示的中止会话请求(ASR)可由任何服务器发送到提供会话服务的访问设备,以请求停止会话Id标识的会话。
Message Format
消息格式
<ASR> ::= < Diameter Header: 274, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]
<ASR> ::= < Diameter Header: 274, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]
The Abort-Session-Answer (ASA), indicated by the Command-Code set to 274 and the message flags' 'R' bit clear, is sent in response to the ASR. The Result-Code AVP MUST be present, and indicates the disposition of the request.
中止会话应答(ASA)由设置为274的命令代码和消息标志“R”位清除指示,发送该应答以响应ASR。结果代码AVP必须存在,并指示请求的处理。
If the session identified by Session-Id in the ASR was successfully terminated, Result-Code is set to DIAMETER_SUCCESS. If the session is not currently active, Result-Code is set to DIAMETER_UNKNOWN_SESSION_ID. If the access device does not stop the session for any other reason, Result-Code is set to DIAMETER_UNABLE_TO_COMPLY.
如果ASR中由会话Id标识的会话已成功终止,则结果代码将设置为DIAMETER\u SUCCESS。如果会话当前未处于活动状态,则结果代码将设置为DIAMETER\u UNKNOWN\u session\u ID。如果访问设备未因任何其他原因停止会话,则结果代码将设置为DIAMETER\u UNABLE\u to\u Compliance。
Message Format
消息格式
<ASA> ::= < Diameter Header: 274, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ]
<ASA> ::= < Diameter Header: 274, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ]
Origin-State-Id is used to allow rapid detection of terminated sessions for which no STR would have been issued, due to unanticipated shutdown of an access device.
原始状态Id用于快速检测由于访问设备意外关闭而不会发出STR的终止会话。
By including Origin-State-Id in CER/CEA messages, an access device allows a next-hop server to determine immediately upon connection whether the device has lost its sessions since the last connection.
通过在CER/CEA消息中包括原始状态Id,接入设备允许下一跳服务器在连接后立即确定设备自上次连接以来是否丢失了会话。
By including Origin-State-Id in request messages, an access device also allows a server with which it communicates via proxy to make such a determination. However, a server that is not directly connected with the access device will not discover that the access device has been restarted unless and until it receives a new request from the access device. Thus, use of this mechanism across proxies is opportunistic rather than reliable, but useful nonetheless.
通过在请求消息中包括原始状态Id,访问设备还允许其通过代理与之通信的服务器进行这样的确定。但是,未直接连接到访问设备的服务器不会发现访问设备已重新启动,除非并直到它从访问设备接收到新请求。因此,在代理中使用这种机制是机会主义的,而不是可靠的,但仍然有用。
When a Diameter server receives an Origin-State-Id that is greater than the Origin-State-Id previously received from the same issuer, it may assume that the issuer has lost state since the previous message and that all sessions that were active under the lower Origin-State-Id have been terminated. The Diameter server MAY clean up all session state associated with such lost sessions, and MAY also issues STRs for all such lost sessions that were authorized on upstream servers, to allow session state to be cleaned up globally.
当Diameter服务器接收到的原始状态Id大于先前从同一发卡机构接收到的原始状态Id时,它可能会假定发卡机构自上一条消息以来已丢失状态,并且在较低原始状态Id下处于活动状态的所有会话都已终止。Diameter服务器可以清理与此类丢失会话相关联的所有会话状态,并且还可以为在上游服务器上授权的所有此类丢失会话颁发str,以允许全局清理会话状态。
The Auth-Request-Type AVP (AVP Code 274) is of type Enumerated and is included in application-specific auth requests to inform the peers whether a user is to be authenticated only, authorized only or both. Note any value other than both MAY cause RADIUS interoperability issues. The following values are defined:
身份验证请求类型AVP(AVP代码274)是枚举的类型,并且包括在特定于应用程序的身份验证请求中,以通知对等方是否仅对用户进行身份验证、仅授权或两者兼有。注:除两者之外的任何值都可能导致RADIUS互操作性问题。定义了以下值:
AUTHENTICATE_ONLY 1 The request being sent is for authentication only, and MUST contain the relevant application specific authentication AVPs that are needed by the Diameter server to authenticate the user.
仅验证\u 1发送的请求仅用于验证,并且必须包含Diameter服务器验证用户所需的相关特定于应用程序的验证AVP。
AUTHORIZE_ONLY 2 The request being sent is for authorization only, and MUST contain the application specific authorization AVPs that are necessary to identify the service being requested/offered.
仅授权2发送的请求仅用于授权,并且必须包含识别所请求/提供的服务所需的特定于应用程序的授权AVP。
AUTHORIZE_AUTHENTICATE 3 The request contains a request for both authentication and authorization. The request MUST include both the relevant application specific authentication information, and authorization information necessary to identify the service being requested/offered.
AUTHORIZE\u AUTHENTICATE 3该请求包含对身份验证和授权的请求。请求必须包括相关的特定于应用程序的身份验证信息和识别所请求/提供的服务所需的授权信息。
The Session-Id AVP (AVP Code 263) is of type UTF8String and is used to identify a specific session (see Section 8). All messages pertaining to a specific session MUST include only one Session-Id AVP and the same value MUST be used throughout the life of a session. When present, the Session-Id SHOULD appear immediately following the Diameter Header (see Section 3).
会话Id AVP(AVP代码263)为UTF8String类型,用于识别特定会话(参见第8节)。与特定会话相关的所有消息必须仅包含一个会话Id AVP,并且在会话的整个生命周期中必须使用相同的值。出现时,会话Id应紧跟在直径标题之后(见第3节)。
The Session-Id MUST be globally and eternally unique, as it is meant to uniquely identify a user session without reference to any other information, and may be needed to correlate historical authentication information with accounting information. The Session-Id includes a mandatory portion and an implementation-defined portion; a recommended format for the implementation-defined portion is outlined below.
会话Id必须是全局且永久唯一的,因为它意味着在不参考任何其他信息的情况下唯一地标识用户会话,并且可能需要将历史身份验证信息与记帐信息关联起来。会话Id包括强制部分和实现定义部分;下面概述了实施定义部分的推荐格式。
The Session-Id MUST begin with the sender's identity encoded in the DiameterIdentity type (see Section 4.4). The remainder of the Session-Id is delimited by a ";" character, and MAY be any sequence that the client can guarantee to be eternally unique; however, the following format is recommended, (square brackets [] indicate an optional element):
会话Id必须以直径类型编码的发送者身份开始(见第4.4节)。会话Id的其余部分由“;”字符分隔,可以是客户端可以保证永远唯一的任何序列;但是,建议使用以下格式(方括号[]表示可选元素):
<DiameterIdentity>;<high 32 bits>;<low 32 bits>[;<optional value>]
<DiameterIdentity>;<high 32 bits>;<low 32 bits>[;<optional value>]
<high 32 bits> and <low 32 bits> are decimal representations of the high and low 32 bits of a monotonically increasing 64-bit value. The 64-bit value is rendered in two part to simplify formatting by 32-bit processors. At startup, the high 32 bits of the 64-bit value MAY be initialized to the time, and the low 32 bits MAY be initialized to zero. This will for practical purposes eliminate the possibility of overlapping Session-Ids after a reboot, assuming the reboot process takes longer than a second. Alternatively, an implementation MAY keep track of the increasing value in non-volatile memory.
<高32位>和<低32位>是单调递增64位值的高32位和低32位的十进制表示。64位值分两部分呈现,以简化32位处理器的格式设置。在启动时,64位值的高32位可初始化为时间,低32位可初始化为零。这将为实际目的消除重新启动后会话ID重叠的可能性,前提是重新启动过程耗时超过一秒钟。或者,实现可以跟踪非易失性存储器中的增加值。
<optional value> is implementation specific but may include a modem's device Id, a layer 2 address, timestamp, etc.
<optional value>是特定于实现的,但可能包括调制解调器的设备Id、第2层地址、时间戳等。
Example, in which there is no optional value: accesspoint7.acme.com;1876543210;523
示例,其中没有可选值:accesspoint7.acme.com;1876543210;523
Example, in which there is an optional value: accesspoint7.acme.com;1876543210;523;mobile@200.1.1.88
Example, in which there is an optional value: accesspoint7.acme.com;1876543210;523;mobile@200.1.1.88
The Session-Id is created by the Diameter application initiating the session, which in most cases is done by the client. Note that a Session-Id MAY be used for both the authorization and accounting commands of a given application.
会话Id由启动会话的Diameter应用程序创建,在大多数情况下,会话Id由客户端完成。请注意,会话Id可用于给定应用程序的授权和记帐命令。
The Authorization-Lifetime AVP (AVP Code 291) is of type Unsigned32 and contains the maximum number of seconds of service to be provided to the user before the user is to be re-authenticated and/or re-authorized. Great care should be taken when the Authorization-Lifetime value is determined, since a low, non-zero, value could create significant Diameter traffic, which could congest both the network and the agents.
授权生存期AVP(AVP代码291)的类型为Unsigned32,并且包含在对用户进行重新认证和/或重新授权之前向用户提供服务的最大秒数。在确定授权生存期值时,应特别小心,因为较低的非零值可能会产生较大的直径流量,这可能导致网络和代理拥塞。
A value of zero (0) means that immediate re-auth is necessary by the access device. This is typically used in cases where multiple authentication methods are used, and a successful auth response with this AVP set to zero is used to signal that the next authentication method is to be immediately initiated. The absence of this AVP, or a value of all ones (meaning all bits in the 32 bit field are set to one) means no re-auth is expected.
值为零(0)表示访问设备需要立即重新身份验证。这通常用于使用多个身份验证方法的情况,并且使用此AVP设置为零的成功身份验证响应来表示将立即启动下一个身份验证方法。如果没有此AVP,或值为all one(意味着32位字段中的所有位都设置为1),则表示不需要重新验证。
If both this AVP and the Session-Timeout AVP are present in a message, the value of the latter MUST NOT be smaller than the Authorization-Lifetime AVP.
如果消息中同时存在此AVP和会话超时AVP,则后者的值不得小于授权生存期AVP。
An Authorization-Lifetime AVP MAY be present in re-authorization messages, and contains the number of seconds the user is authorized to receive service from the time the re-auth answer message is received by the access device.
授权生存期AVP可以存在于重新授权消息中,并且包含从接入设备接收到重新授权应答消息时起用户被授权接收服务的秒数。
This AVP MAY be provided by the client as a hint of the maximum lifetime that it is willing to accept. However, the server MAY return a value that is equal to, or smaller, than the one provided by the client.
该AVP可由客户提供,作为其愿意接受的最长生存期的提示。但是,服务器返回的值可能等于或小于客户端提供的值。
The Auth-Grace-Period AVP (AVP Code 276) is of type Unsigned32 and contains the number of seconds the Diameter server will wait following the expiration of the Authorization-Lifetime AVP before cleaning up resources for the session.
身份验证宽限期AVP(AVP代码276)的类型为Unsigned32,包含Diameter服务器在授权生存期AVP过期后,在清理会话资源之前将等待的秒数。
The Auth-Session-State AVP (AVP Code 277) is of type Enumerated and specifies whether state is maintained for a particular session. The client MAY include this AVP in requests as a hint to the server, but the value in the server's answer message is binding. The following values are supported:
身份验证会话状态AVP(AVP代码277)属于枚举类型,并指定是否为特定会话维护状态。客户端可以在请求中包含此AVP作为对服务器的提示,但服务器应答消息中的值是绑定的。支持以下值:
STATE_MAINTAINED 0 This value is used to specify that session state is being maintained, and the access device MUST issue a session termination message when service to the user is terminated. This is the default value.
STATE_mainted 0此值用于指定正在维护会话状态,并且当终止对用户的服务时,访问设备必须发出会话终止消息。这是默认值。
NO_STATE_MAINTAINED 1 This value is used to specify that no session termination messages will be sent by the access device upon expiration of the Authorization-Lifetime.
NO_STATE_mainted 1此值用于指定在授权生存期到期时,访问设备不会发送任何会话终止消息。
The Re-Auth-Request-Type AVP (AVP Code 285) is of type Enumerated and is included in application-specific auth answers to inform the client of the action expected upon expiration of the Authorization-Lifetime. If the answer message contains an Authorization-Lifetime AVP with a positive value, the Re-Auth-Request-Type AVP MUST be present in an answer message. The following values are defined:
重新身份验证请求类型AVP(AVP代码285)属于枚举类型,并包含在特定于应用程序的身份验证应答中,以在授权生命周期到期时通知客户端预期的操作。如果应答消息包含具有正值的授权生存期AVP,则应答消息中必须存在重新验证请求类型AVP。定义了以下值:
AUTHORIZE_ONLY 0 An authorization only re-auth is expected upon expiration of the Authorization-Lifetime. This is the default value if the AVP is not present in answer messages that include the Authorization-Lifetime.
仅授权\u 0在授权生存期到期时,需要仅授权重新授权。如果AVP未出现在包含授权生存期的应答消息中,则这是默认值。
AUTHORIZE_AUTHENTICATE 1 An authentication and authorization re-auth is expected upon expiration of the Authorization-Lifetime.
AUTHORIZE\u AUTHENTICATE 1授权生命周期到期时,需要进行身份验证和授权重新验证。
The Session-Timeout AVP (AVP Code 27) [RADIUS] is of type Unsigned32 and contains the maximum number of seconds of service to be provided to the user before termination of the session. When both the Session-Timeout and the Authorization-Lifetime AVPs are present in an answer message, the former MUST be equal to or greater than the value of the latter.
会话超时AVP(AVP代码27)[RADIUS]类型为Unsigned32,包含在会话终止前向用户提供服务的最大秒数。当应答消息中同时存在会话超时和授权生存期AVP时,前者必须等于或大于后者的值。
A session that terminates on an access device due to the expiration of the Session-Timeout MUST cause an STR to be issued, unless both the access device and the home server had previously agreed that no session termination messages would be sent (see Section 8.9).
由于会话超时过期而在访问设备上终止的会话必须导致发出STR,除非访问设备和家庭服务器之前都同意不发送会话终止消息(参见第8.9节)。
A Session-Timeout AVP MAY be present in a re-authorization answer message, and contains the remaining number of seconds from the beginning of the re-auth.
会话超时AVP可能出现在重新授权应答消息中,并包含从重新授权开始的剩余秒数。
A value of zero, or the absence of this AVP, means that this session has an unlimited number of seconds before termination.
值为零或没有此AVP表示此会话在终止前有无限秒数。
This AVP MAY be provided by the client as a hint of the maximum timeout that it is willing to accept. However, the server MAY return a value that is equal to, or smaller, than the one provided by the client.
该AVP可由客户端提供,作为其愿意接受的最大超时的提示。但是,服务器返回的值可能等于或小于客户端提供的值。
The User-Name AVP (AVP Code 1) [RADIUS] is of type UTF8String, which contains the User-Name, in a format consistent with the NAI specification [NAI].
用户名AVP(AVP代码1)[RADIUS]为UTF8String类型,其中包含用户名,格式与NAI规范[NAI]一致。
The Termination-Cause AVP (AVP Code 295) is of type Enumerated, and is used to indicate the reason why a session was terminated on the access device. The following values are defined:
终止原因AVP(AVP代码295)是枚举的类型,用于指示会话在接入设备上终止的原因。定义了以下值:
DIAMETER_LOGOUT 1 The user initiated a disconnect
直径\u注销1用户启动了断开连接
DIAMETER_SERVICE_NOT_PROVIDED 2 This value is used when the user disconnected prior to the receipt of the authorization answer message.
DIAMETER_SERVICE_NOT_PROVIDED 2当用户在收到授权应答消息之前断开连接时,使用此值。
DIAMETER_BAD_ANSWER 3 This value indicates that the authorization answer received by the access device was not processed successfully.
DIAMETER_BAD_ANSWER 3此值表示访问设备接收到的授权应答未成功处理。
DIAMETER_ADMINISTRATIVE 4 The user was not granted access, or was disconnected, due to administrative reasons, such as the receipt of a Abort-Session-Request message.
DIAMETER_Administration 4由于管理原因(如收到中止会话请求消息),用户未被授予访问权限或被断开连接。
DIAMETER_LINK_BROKEN 5 The communication to the user was abruptly disconnected.
DIAMETER_LINK_中断5与用户的通信突然中断。
DIAMETER_AUTH_EXPIRED 6 The user's access was terminated since its authorized session time has expired.
DIAMETER_AUTH_已过期6用户的访问已终止,因为其授权会话时间已过期。
DIAMETER_USER_MOVED 7 The user is receiving services from another access device.
DIAMETER_USER_MOVED 7用户正在从另一个访问设备接收服务。
DIAMETER_SESSION_TIMEOUT 8 The user's session has timed out, and service has been terminated.
DIAMETER_SESSION_TIMEOUT 8用户会话已超时,服务已终止。
The Origin-State-Id AVP (AVP Code 278), of type Unsigned32, is a monotonically increasing value that is advanced whenever a Diameter entity restarts with loss of previous state, for example upon reboot. Origin-State-Id MAY be included in any Diameter message, including CER.
类型为Unsigned32的原始状态Id AVP(AVP代码278)是一个单调递增的值,每当Diameter实体在失去先前状态的情况下重新启动时(例如在重新启动时),该值都会提前。原始状态Id可以包含在任何Diameter消息中,包括CER。
A Diameter entity issuing this AVP MUST create a higher value for this AVP each time its state is reset. A Diameter entity MAY set Origin-State-Id to the time of startup, or it MAY use an incrementing counter retained in non-volatile memory across restarts.
每次重置此AVP的状态时,发出此AVP的Diameter实体必须为此AVP创建更高的值。Diameter实体可以将原始状态Id设置为启动时间,也可以在重启期间使用非易失性内存中保留的递增计数器。
The Origin-State-Id, if present, MUST reflect the state of the entity indicated by Origin-Host. If a proxy modifies Origin-Host, it MUST either remove Origin-State-Id or modify it appropriately as well.
原始状态Id(如果存在)必须反映原始主机指示的实体状态。如果代理修改源主机,则必须删除源状态Id或对其进行适当修改。
Typically, Origin-State-Id is used by an access device that always starts up with no active sessions; that is, any session active prior to restart will have been lost. By including Origin-State-Id in a message, it allows other Diameter entities to infer that sessions associated with a lower Origin-State-Id are no longer active. If an access device does not intend for such inferences to be made, it MUST either not include Origin-State-Id in any message, or set its value to 0.
通常,原始状态Id由总是在没有活动会话的情况下启动的接入设备使用;也就是说,重新启动之前的任何活动会话都将丢失。通过在消息中包含原始状态Id,它允许其他Diameter实体推断与较低原始状态Id关联的会话不再处于活动状态。如果访问设备不打算进行此类推断,则它必须在任何消息中不包含原始状态Id,或将其值设置为0。
The Session-Binding AVP (AVP Code 270) is of type Unsigned32, and MAY be present in application-specific authorization answer messages. If present, this AVP MAY inform the Diameter client that all future application-specific re-auth messages for this session MUST be sent to the same authorization server. This AVP MAY also specify that a Session-Termination-Request message for this session MUST be sent to the same authorizing server.
会话绑定AVP(AVP代码270)的类型为Unsigned32,并且可以存在于特定于应用的授权应答消息中。如果存在,此AVP可能会通知Diameter客户端,此会话的所有未来特定于应用程序的重新验证消息必须发送到同一授权服务器。此AVP还可以指定此会话的会话终止请求消息必须发送到同一授权服务器。
This field is a bit mask, and the following bits have been defined:
该字段是位掩码,定义了以下位:
RE_AUTH 1 When set, future re-auth messages for this session MUST NOT include the Destination-Host AVP. When cleared, the default value, the Destination-Host AVP MUST be present in all re-auth messages for this session.
重新身份验证1设置后,此会话的未来重新身份验证消息不得包括目标主机AVP。清除此选项时,默认值“目标主机AVP”必须出现在此会话的所有重新身份验证消息中。
STR 2 When set, the STR message for this session MUST NOT include the Destination-Host AVP. When cleared, the default value, the Destination-Host AVP MUST be present in the STR message for this session.
STR 2设置后,此会话的STR消息不得包含目标主机AVP。清除时,默认值为目标主机AVP必须出现在该会话的STR消息中。
ACCOUNTING 4 When set, all accounting messages for this session MUST NOT include the Destination-Host AVP. When cleared, the default value, the Destination-Host AVP, if known, MUST be present in all accounting messages for this session.
记帐4设置后,此会话的所有记帐消息不得包括目标主机AVP。清除此选项后,默认值目标主机AVP(如果已知)必须出现在此会话的所有记帐消息中。
The Session-Server-Failover AVP (AVP Code 271) is of type Enumerated, and MAY be present in application-specific authorization answer messages that either do not include the Session-Binding AVP or include the Session-Binding AVP with any of the bits set to a zero value. If present, this AVP MAY inform the Diameter client that if a
会话服务器故障转移AVP(AVP代码271)是枚举的类型,并且可以存在于不包括会话绑定AVP或包括会话绑定AVP且任何比特设置为零值的应用特定授权应答消息中。如果存在,该AVP可能会通知Diameter客户
re-auth or STR message fails due to a delivery problem, the Diameter client SHOULD issue a subsequent message without the Destination-Host AVP. When absent, the default value is REFUSE_SERVICE.
由于传递问题,重新验证或STR消息失败,Diameter客户端应在没有目标主机AVP的情况下发出后续消息。不存在时,默认值为拒绝服务。
The following values are supported:
支持以下值:
REFUSE_SERVICE 0 If either the re-auth or the STR message delivery fails, terminate service with the user, and do not attempt any subsequent attempts.
如果重新身份验证或STR消息传递失败,请拒绝服务0,终止与用户的服务,不要尝试任何后续尝试。
TRY_AGAIN 1 If either the re-auth or the STR message delivery fails, resend the failed message without the Destination-Host AVP present.
重试1如果重新验证或STR消息传递失败,请在目标主机AVP不存在的情况下重新发送失败的消息。
ALLOW_SERVICE 2 If re-auth message delivery fails, assume that re-authorization succeeded. If STR message delivery fails, terminate the session.
ALLOW_SERVICE 2如果重新授权消息传递失败,则假定重新授权成功。如果STR消息传递失败,请终止会话。
TRY_AGAIN_ALLOW_SERVICE 3 If either the re-auth or the STR message delivery fails, resend the failed message without the Destination-Host AVP present. If the second delivery fails for re-auth, assume re-authorization succeeded. If the second delivery fails for STR, terminate the session.
重试\u允许\u服务3如果重新身份验证或STR消息传递失败,请在目标主机AVP不存在的情况下重新发送失败的消息。如果重新授权的第二次传递失败,则假定重新授权成功。如果STR的第二次传递失败,请终止会话。
The Multi-Round-Time-Out AVP (AVP Code 272) is of type Unsigned32, and SHOULD be present in application-specific authorization answer messages whose Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH. This AVP contains the maximum number of seconds that the access device MUST provide the user in responding to an authentication request.
多轮超时AVP(AVP代码272)的类型为Unsigned32,应出现在结果代码AVP设置为DIAMETER\u Multi\u Round\u AUTH的特定于应用程序的授权应答消息中。此AVP包含接入设备在响应身份验证请求时必须向用户提供的最大秒数。
The Class AVP (AVP Code 25) is of type OctetString and is used to by Diameter servers to return state information to the access device. When one or more Class AVPs are present in application-specific authorization answer messages, they MUST be present in subsequent re-authorization, session termination and accounting messages. Class AVPs found in a re-authorization answer message override the ones found in any previous authorization answer message. Diameter server implementations SHOULD NOT return Class AVPs that require more than 4096 bytes of storage on the Diameter client. A Diameter client that receives Class AVPs whose size exceeds local available storage MUST terminate the session.
AVP类(AVP代码25)为OctetString类型,由Diameter服务器用于向访问设备返回状态信息。当一个或多个类AVP出现在特定于应用程序的授权应答消息中时,它们必须出现在随后的重新授权、会话终止和记帐消息中。在重新授权应答消息中找到的类AVP覆盖在任何以前的授权应答消息中找到的类AVP。Diameter服务器实现不应返回在Diameter客户端上需要4096字节以上存储的类AVP。接收大小超过本地可用存储的AVP类的Diameter客户端必须终止会话。
The Event-Timestamp (AVP Code 55) is of type Time, and MAY be included in an Accounting-Request and Accounting-Answer messages to record the time that the reported event occurred, in seconds since January 1, 1900 00:00 UTC.
事件时间戳(AVP代码55)为时间类型,可包含在记帐请求和记帐应答消息中,以记录报告事件发生的时间,以秒为单位,从1900年1月1日00:00 UTC开始。
This accounting protocol is based on a server directed model with capabilities for real-time delivery of accounting information. Several fault resilience methods [ACCMGMT] have been built in to the protocol in order minimize loss of accounting data in various fault situations and under different assumptions about the capabilities of the used devices.
此记帐协议基于服务器导向模型,具有实时传递记帐信息的功能。协议中内置了几种故障恢复方法[ACCMGMT],以便在各种故障情况下以及在对所用设备的能力的不同假设下最大限度地减少会计数据的损失。
The server directed model means that the device generating the accounting data gets information from either the authorization server (if contacted) or the accounting server regarding the way accounting data shall be forwarded. This information includes accounting record timeliness requirements.
服务器导向模型意味着生成会计数据的设备从授权服务器(如果联系)或会计服务器获取有关会计数据转发方式的信息。该信息包括会计记录及时性要求。
As discussed in [ACCMGMT], real-time transfer of accounting records is a requirement, such as the need to perform credit limit checks and fraud detection. Note that batch accounting is not a requirement, and is therefore not supported by Diameter. Should batched accounting be required in the future, a new Diameter application will need to be created, or it could be handled using another protocol. Note, however, that even if at the Diameter layer accounting requests are processed one by one, transport protocols used under Diameter typically batch several requests in the same packet under heavy traffic conditions. This may be sufficient for many applications.
如[ACCMGMT]中所述,会计记录的实时传输是一项要求,例如需要执行信用额度检查和欺诈检测。请注意,批量核算不是一项要求,因此直径不支持批量核算。如果将来需要成批记帐,则需要创建新的Diameter应用程序,或者可以使用其他协议处理。然而,请注意,即使在Diameter层逐个处理记帐请求,在Diameter下使用的传输协议通常在高流量条件下在同一数据包中批处理多个请求。这对于许多应用来说已经足够了。
The authorization server (chain) directs the selection of proper transfer strategy, based on its knowledge of the user and relationships of roaming partnerships. The server (or agents) uses the Acct-Interim-Interval and Accounting-Realtime-Required AVPs to control the operation of the Diameter peer operating as a client. The Acct-Interim-Interval AVP, when present, instructs the Diameter node acting as a client to produce accounting records continuously even during a session. Accounting-Realtime-Required AVP is used to control the behavior of the client when the transfer of accounting records from the Diameter client is delayed or unsuccessful.
授权服务器(链)根据其对用户和漫游伙伴关系的了解,指导选择适当的传输策略。服务器(或代理)使用Acct中间间隔和会计实时所需的AVP来控制作为客户端运行的Diameter对等机的操作。Acct中间间隔AVP(如果存在)指示充当客户端的Diameter节点连续生成会计记录,即使在会话期间也是如此。Accounting Realtime Required AVP用于在Diameter客户端的会计记录传输延迟或不成功时控制客户端的行为。
The Diameter accounting server MAY override the interim interval or the realtime requirements by including the Acct-Interim-Interval or Accounting-Realtime-Required AVP in the Accounting-Answer message. When one of these AVPs is present, the latest value received SHOULD be used in further accounting activities for the same session.
Diameter accounting server可以通过在accounting应答消息中包含Acct Missional interval或accounting realtime Required AVP来覆盖临时间隔或实时要求。当其中一个AVP存在时,收到的最新值应用于同一会话的进一步记帐活动。
A Diameter node that receives a successful authentication and/or authorization messages from the Home AAA server MUST collect accounting information for the session. The Accounting-Request message is used to transmit the accounting information to the Home AAA server, which MUST reply with the Accounting-Answer message to confirm reception. The Accounting-Answer message includes the Result-Code AVP, which MAY indicate that an error was present in the accounting message. A rejected Accounting-Request message MAY cause the user's session to be terminated, depending on the value of the Accounting-Realtime-Required AVP received earlier for the session in question.
从家庭AAA服务器接收成功身份验证和/或授权消息的Diameter节点必须收集会话的记帐信息。记帐请求消息用于将记帐信息传输到家庭AAA服务器,家庭AAA服务器必须使用记帐应答消息进行应答以确认接收。记帐应答消息包括结果代码AVP,这可能表明记帐消息中存在错误。被拒绝的记帐请求消息可能会导致用户的会话终止,具体取决于先前收到的有关会话所需的记帐实时AVP的值。
Each Diameter Accounting protocol message MAY be compressed, in order to reduce network bandwidth usage. If IPsec and IKE are used to secure the Diameter session, then IP compression [IPComp] MAY be used and IKE [IKE] MAY be used to negotiate the compression parameters. If TLS is used to secure the Diameter session, then TLS compression [TLS] MAY be used.
每个Diameter记帐协议消息可以被压缩,以减少网络带宽的使用。如果IPsec和IKE用于保护Diameter会话,则可以使用IP压缩[IPComp],并且可以使用IKE[IKE]协商压缩参数。如果使用TLS保护Diameter会话,则可以使用TLS压缩[TLS]。
Each Diameter application (e.g., NASREQ, MobileIP), MUST define their Service-Specific AVPs that MUST be present in the Accounting-Request message in a section entitled "Accounting AVPs". The application MUST assume that the AVPs described in this document will be present in all Accounting messages, so only their respective service-specific AVPs need to be defined in this section.
每个Diameter应用程序(如NASREQ、MobileIP)必须定义其特定于服务的AVP,这些AVP必须出现在题为“记帐AVP”的部分中的记帐请求消息中。应用程序必须假设本文档中描述的AVP将出现在所有记帐消息中,因此本节只需定义其各自的特定于服务的AVP。
Diameter Base protocol mechanisms are used to overcome small message loss and network faults of temporary nature.
Diameter基本协议机制用于克服小消息丢失和临时性网络故障。
Diameter peers acting as clients MUST implement the use of failover to guard against server failures and certain network failures. Diameter peers acting as agents or related off-line processing systems MUST detect duplicate accounting records caused by the sending of same record to several servers and duplication of messages
充当客户机的Diameter对等机必须实现故障切换,以防止服务器故障和某些网络故障。充当代理或相关离线处理系统的Diameter对等方必须检测到由于向多个服务器发送相同记录和重复消息而导致的重复记帐记录
in transit. This detection MUST be based on the inspection of the Session-Id and Accounting-Record-Number AVP pairs. Appendix C discusses duplicate detection needs and implementation issues.
在途中。此检测必须基于对会话Id和记帐记录编号AVP对的检查。附录C讨论了重复检测需求和实施问题。
Diameter clients MAY have non-volatile memory for the safe storage of accounting records over reboots or extended network failures, network partitions, and server failures. If such memory is available, the client SHOULD store new accounting records there as soon as the records are created and until a positive acknowledgement of their reception from the Diameter Server has been received. Upon a reboot, the client MUST starting sending the records in the non-volatile memory to the accounting server with appropriate modifications in termination cause, session length, and other relevant information in the records.
Diameter客户端可能具有非易失性内存,用于在重新启动或扩展网络故障、网络分区和服务器故障时安全存储记帐记录。如果此类内存可用,则客户机应在创建记录后立即将新的会计记录存储在那里,直到收到Diameter服务器对其接收的肯定确认。重新启动后,客户端必须开始将非易失性内存中的记录发送到记帐服务器,并对终止原因、会话长度和记录中的其他相关信息进行适当修改。
A further application of this protocol may include AVPs to control how many accounting records may at most be stored in the Diameter client without committing them to the non-volatile memory or transferring them to the Diameter server.
该协议的进一步应用可包括avp,以控制在Diameter客户端中最多可存储多少个记帐记录,而无需将其提交到非易失性存储器或将其传输到Diameter服务器。
The client SHOULD NOT remove the accounting data from any of its memory areas before the correct Accounting-Answer has been received. The client MAY remove oldest, undelivered or yet unacknowledged accounting data if it runs out of resources such as memory. It is an implementation dependent matter for the client to accept new sessions under this condition.
在收到正确的记帐应答之前,客户端不应从其任何内存区域中删除记帐数据。如果资源(如内存)不足,客户端可能会删除最旧、未送达或尚未确认的记帐数据。在这种情况下,客户端接受新会话取决于实现。
In all accounting records, the Session-Id AVP MUST be present; the User-Name AVP MUST be present if it is available to the Diameter client. If strong authentication across agents is required, end-to-end security may be used for authentication purposes.
在所有会计记录中,会话Id AVP必须存在;如果Diameter客户端可用,则必须提供用户名AVP。如果需要跨代理进行强身份验证,则端到端安全性可用于身份验证目的。
Different types of accounting records are sent depending on the actual type of accounted service and the authorization server's directions for interim accounting. If the accounted service is a one-time event, meaning that the start and stop of the event are simultaneous, then the Accounting-Record-Type AVP MUST be present and set to the value EVENT_RECORD.
根据记帐服务的实际类型和授权服务器的临时记帐指示,将发送不同类型的记帐记录。如果记帐服务是一次性事件,这意味着事件的开始和停止是同时发生的,则必须存在记帐记录类型AVP,并将其设置为值event_Record。
If the accounted service is of a measurable length, then the AVP MUST use the values START_RECORD, STOP_RECORD, and possibly, INTERIM_RECORD. If the authorization server has not directed interim accounting to be enabled for the session, two accounting records MUST be generated for each service of type session. When the initial
如果记账服务具有可测量的长度,则AVP必须使用值START_RECORD、STOP_RECORD,以及可能的中间_RECORD。如果授权服务器未指示为会话启用临时记帐,则必须为会话类型的每个服务生成两条记帐记录。当首字母
Accounting-Request for a given session is sent, the Accounting-Record-Type AVP MUST be set to the value START_RECORD. When the last Accounting-Request is sent, the value MUST be STOP_RECORD.
发送给定会话的记帐请求时,必须将记帐记录类型AVP设置为值START_Record。发送最后一个记帐请求时,该值必须为STOP_记录。
If the authorization server has directed interim accounting to be enabled, the Diameter client MUST produce additional records between the START_RECORD and STOP_RECORD, marked INTERIM_RECORD. The production of these records is directed by Acct-Interim-Interval as well as any re-authentication or re-authorization of the session. The Diameter client MUST overwrite any previous interim accounting records that are locally stored for delivery, if a new record is being generated for the same session. This ensures that only one pending interim record can exist on an access device for any given session.
如果授权服务器已指示启用临时记帐,则Diameter客户端必须在START_记录和STOP_记录之间生成附加记录,并标记为“临时_记录”。这些记录的生成由Acct临时间隔以及会话的任何重新身份验证或重新授权来指导。如果正在为同一会话生成新记录,Diameter客户端必须覆盖本地存储以供传递的任何以前的临时会计记录。这可确保任何给定会话的访问设备上只能存在一条挂起的临时记录。
A particular value of Accounting-Sub-Session-Id MUST appear only in one sequence of accounting records from a DIAMETER client, except for the purposes of retransmission. The one sequence that is sent MUST be either one record with Accounting-Record-Type AVP set to the value EVENT_RECORD, or several records starting with one having the value START_RECORD, followed by zero or more INTERIM_RECORD and a single STOP_RECORD. A particular Diameter application specification MUST define the type of sequences that MUST be used.
记帐子会话Id的特定值只能出现在DIAMETER客户端的一个记帐记录序列中,但用于重新传输的情况除外。发送的一个序列必须是一个会计记录类型AVP设置为值事件记录的记录,或多个记录,从一个具有值开始记录开始,然后是零个或多个临时记录和一个停止记录。特定直径应用规范必须定义必须使用的序列类型。
The Diameter protocol's Session-Id AVP, which is globally unique (see Section 8.8), is used during the authorization phase to identify a particular session. Services that do not require any authorization still use the Session-Id AVP to identify sessions. Accounting messages MAY use a different Session-Id from that sent in authorization messages. Specific applications MAY require different a Session-ID for accounting messages.
Diameter协议的会话Id AVP全局唯一(见第8.8节),在授权阶段用于识别特定会话。不需要任何授权的服务仍然使用会话Id AVP来标识会话。记帐消息可能使用与授权消息中发送的会话Id不同的会话Id。特定的应用程序可能需要不同的会话ID用于记帐消息。
However, there are certain applications that require multiple accounting sub-sessions. Such applications would send messages with a constant Session-Id AVP, but a different Accounting-Sub-Session-Id AVP. In these cases, correlation is performed using the Session-Id. It is important to note that receiving a STOP_RECORD with no Accounting-Sub-Session-Id AVP when sub-sessions were originally used in the START_RECORD messages implies that all sub-sessions are terminated.
但是,某些应用程序需要多个记帐子会话。此类应用程序将发送具有固定会话Id AVP的消息,但具有不同的记帐子会话Id AVP。在这些情况下,使用Session-Id执行关联。需要注意的是,当最初在START_记录消息中使用子会话时,接收到没有记帐子会话Id AVP的STOP_记录意味着所有子会话都被终止。
Furthermore, there are certain applications where a user receives service from different access devices (e.g., Mobile IPv4), each with their own unique Session-Id. In such cases, the Acct-Multi-Session-Id AVP is used for correlation. During authorization, a server that
此外,在某些应用中,用户从不同的接入设备(例如,移动IPv4)接收服务,每个接入设备都有自己的唯一会话Id。在这种情况下,Acct多会话Id AVP用于关联。在授权过程中,服务器
determines that a request is for an existing session SHOULD include the Acct-Multi-Session-Id AVP, which the access device MUST include in all subsequent accounting messages.
确定针对现有会话的请求应包括Acct Multi session Id AVP,接入设备必须在所有后续记帐消息中包括该AVP。
The Acct-Multi-Session-Id AVP MAY include the value of the original Session-Id. It's contents are implementation specific, but MUST be globally unique across other Acct-Multi-Session-Id, and MUST NOT change during the life of a session.
Acct多会话Id AVP可能包括原始会话Id的值。其内容是特定于实现的,但在其他Acct多会话Id中必须是全局唯一的,并且在会话生命周期内不得更改。
A Diameter application document MUST define the exact concept of a session that is being accounted, and MAY define the concept of a multi-session. For instance, the NASREQ DIAMETER application treats a single PPP connection to a Network Access Server as one session, and a set of Multilink PPP sessions as one multi-session.
Diameter应用程序文档必须定义正在记帐的会话的确切概念,并且可以定义多会话的概念。例如,NASREQ DIAMETER应用程序将到网络访问服务器的单个PPP连接视为一个会话,将一组多链路PPP会话视为一个多会话。
This section defines Command-Code values that MUST be supported by all Diameter implementations that provide Accounting services.
本节定义了提供记帐服务的所有Diameter实现必须支持的命令代码值。
The Accounting-Request (ACR) command, indicated by the Command-Code field set to 271 and the Command Flags' 'R' bit set, is sent by a Diameter node, acting as a client, in order to exchange accounting information with a peer.
记帐请求(ACR)命令由设置为271的命令代码字段和命令标志“R”位集指示,由充当客户端的Diameter节点发送,以便与对等方交换记帐信息。
One of Acct-Application-Id and Vendor-Specific-Application-Id AVPs MUST be present. If the Vendor-Specific-Application-Id grouped AVP is present, it must have an Acct-Application-Id inside.
必须存在账户应用程序Id和供应商特定应用程序Id AVP之一。如果存在供应商特定的应用程序Id分组AVP,则其中必须包含一个Acct应用程序Id。
The AVP listed below SHOULD include service specific accounting AVPs, as described in Section 9.3.
如第9.3节所述,下列AVP应包括特定于服务的会计AVP。
Message Format
消息格式
<ACR> ::= < Diameter Header: 271, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Acct-Application-Id ] [ Vendor-Specific-Application-Id ] [ User-Name ] [ Accounting-Sub-Session-Id ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ Acct-Interim-Interval ] [ Accounting-Realtime-Required ] [ Origin-State-Id ] [ Event-Timestamp ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]
<ACR> ::= < Diameter Header: 271, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Acct-Application-Id ] [ Vendor-Specific-Application-Id ] [ User-Name ] [ Accounting-Sub-Session-Id ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ Acct-Interim-Interval ] [ Accounting-Realtime-Required ] [ Origin-State-Id ] [ Event-Timestamp ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]
The Accounting-Answer (ACA) command, indicated by the Command-Code field set to 271 and the Command Flags' 'R' bit cleared, is used to acknowledge an Accounting-Request command. The Accounting-Answer command contains the same Session-Id and includes the usage AVPs only if CMS is in use when sending this command. Note that the inclusion of the usage AVPs when CMS is not being used leads to unnecessarily large answer messages, and can not be used as a server's proof of the receipt of these AVPs in an end-to-end fashion. If the Accounting-Request was protected by end-to-end security, then the corresponding ACA message MUST be protected by end-to-end security.
记帐应答(ACA)命令由设置为271的命令代码字段和清除的命令标志“R”位指示,用于确认记帐请求命令。Accounting Answer命令包含相同的会话Id,并且仅当发送此命令时CMS正在使用时,才包含用法AVP。请注意,在不使用CMS时包含使用AVP会导致不必要的大量应答消息,并且不能用作服务器端到端方式接收这些AVP的证明。如果记帐请求受端到端安全保护,则相应的ACA消息必须受端到端安全保护。
Only the target Diameter Server, known as the home Diameter Server, SHOULD respond with the Accounting-Answer command.
只有目标Diameter服务器(称为home Diameter服务器)应使用记帐应答命令进行响应。
One of Acct-Application-Id and Vendor-Specific-Application-Id AVPs MUST be present. If the Vendor-Specific-Application-Id grouped AVP is present, it must have an Acct-Application-Id inside.
必须存在账户应用程序Id和供应商特定应用程序Id AVP之一。如果存在供应商特定的应用程序Id分组AVP,则其中必须包含一个Acct应用程序Id。
The AVP listed below SHOULD include service specific accounting AVPs, as described in Section 9.3.
如第9.3节所述,下列AVP应包括特定于服务的会计AVP。
Message Format
消息格式
<ACA> ::= < Diameter Header: 271, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Acct-Application-Id ] [ Vendor-Specific-Application-Id ] [ User-Name ] [ Accounting-Sub-Session-Id ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ Error-Reporting-Host ] [ Acct-Interim-Interval ] [ Accounting-Realtime-Required ] [ Origin-State-Id ] [ Event-Timestamp ] * [ Proxy-Info ] * [ AVP ]
<ACA> ::= < Diameter Header: 271, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Acct-Application-Id ] [ Vendor-Specific-Application-Id ] [ User-Name ] [ Accounting-Sub-Session-Id ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ Error-Reporting-Host ] [ Acct-Interim-Interval ] [ Accounting-Realtime-Required ] [ Origin-State-Id ] [ Event-Timestamp ] * [ Proxy-Info ] * [ AVP ]
This section contains AVPs that describe accounting usage information related to a specific session.
本节包含描述与特定会话相关的记帐使用信息的AVP。
The Accounting-Record-Type AVP (AVP Code 480) is of type Enumerated and contains the type of accounting record being sent. The following values are currently defined for the Accounting-Record-Type AVP:
会计记录类型AVP(AVP代码480)为枚举类型,包含正在发送的会计记录类型。当前为会计记录类型AVP定义了以下值:
EVENT_RECORD 1 An Accounting Event Record is used to indicate that a one-time event has occurred (meaning that the start and end of the event are simultaneous). This record contains all information relevant to the service, and is the only record of the service.
事件记录1会计事件记录用于指示一次性事件已经发生(意味着事件的开始和结束是同时发生的)。此记录包含与服务相关的所有信息,是服务的唯一记录。
START_RECORD 2 An Accounting Start, Interim, and Stop Records are used to indicate that a service of a measurable length has been given. An Accounting Start Record is used to initiate an accounting session, and contains accounting information that is relevant to the initiation of the session.
开始记录2会计开始、中期和停止记录用于表明已提供了可测量长度的服务。记帐开始记录用于启动记帐会话,并包含与会话启动相关的记帐信息。
INTERIM_RECORD 3 An Interim Accounting Record contains cumulative accounting information for an existing accounting session. Interim Accounting Records SHOULD be sent every time a re-authentication or re-authorization occurs. Further, additional interim record triggers MAY be defined by application-specific Diameter applications. The selection of whether to use INTERIM_RECORD records is done by the Acct-Interim-Interval AVP.
临时会计记录3临时会计记录包含现有会计会话的累积会计信息。每次重新认证或重新授权时,应发送临时会计记录。此外,附加的临时记录触发器可由特定于应用程序的Diameter应用程序定义。是否使用临时记录的选择由Acct临时间隔AVP完成。
STOP_RECORD 4 An Accounting Stop Record is sent to terminate an accounting session and contains cumulative accounting information relevant to the existing session.
停止记录4发送会计停止记录以终止会计会话,并包含与现有会话相关的累积会计信息。
The Acct-Interim-Interval AVP (AVP Code 85) is of type Unsigned32 and is sent from the Diameter home authorization server to the Diameter client. The client uses information in this AVP to decide how and when to produce accounting records. With different values in this AVP, service sessions can result in one, two, or two+N accounting records, based on the needs of the home-organization. The following accounting record production behavior is directed by the inclusion of this AVP:
Acct中间间隔AVP(AVP代码85)的类型为Unsigned32,从Diameter home授权服务器发送到Diameter客户端。客户使用本AVP中的信息来决定如何以及何时生成会计记录。使用此AVP中的不同值,服务会话可以根据主组织的需要生成一个、两个或两个+N会计记录。以下会计记录制作行为受本AVP的指导:
1. The omission of the Acct-Interim-Interval AVP or its inclusion with Value field set to 0 means that EVENT_RECORD, START_RECORD, and STOP_RECORD are produced, as appropriate for the service.
1. 省略Acct中间间隔AVP或将其包含在值字段设置为0的情况下,意味着根据服务的需要生成事件记录、开始记录和停止记录。
2. The inclusion of the AVP with Value field set to a non-zero value means that INTERIM_RECORD records MUST be produced between the START_RECORD and STOP_RECORD records. The Value field of this AVP is the nominal interval between these records in seconds. The Diameter node that originates the accounting information, known as the client, MUST produce the first INTERIM_RECORD record roughly at the time when this nominal interval has elapsed from the START_RECORD, the next one again as the interval has elapsed once more, and so on until the session ends and a STOP_RECORD record is produced.
2. 将AVP的值字段设置为非零值意味着必须在开始记录和停止记录之间生成临时记录。此AVP的值字段是这些记录之间的标称间隔(以秒为单位)。发起记帐信息的Diameter节点(称为客户机)必须大致在从开始记录开始经过此标称间隔时生成第一个临时记录,然后在间隔再次经过时生成下一个临时记录,依此类推,直到会话结束并生成停止记录。
The client MUST ensure that the interim record production times are randomized so that large accounting message storms are not created either among records or around a common service start time.
客户必须确保临时记录的生成时间是随机的,以便在记录之间或在公共服务开始时间附近不会创建大型记帐消息风暴。
The Accounting-Record-Number AVP (AVP Code 485) is of type Unsigned32 and identifies this record within one session. As Session-Id AVPs are globally unique, the combination of Session-Id and Accounting-Record-Number AVPs is also globally unique, and can be used in matching accounting records with confirmations. An easy way to produce unique numbers is to set the value to 0 for records of type EVENT_RECORD and START_RECORD, and set the value to 1 for the first INTERIM_RECORD, 2 for the second, and so on until the value for STOP_RECORD is one more than for the last INTERIM_RECORD.
会计记录编号AVP(AVP代码485)的类型为Unsigned32,并在一个会话中标识该记录。由于会话Id AVP是全局唯一的,会话Id和会计记录编号AVP的组合也是全局唯一的,并且可以用于将会计记录与确认进行匹配。生成唯一数字的一种简单方法是,对于类型为EVENT_RECORD和START_RECORD的记录,将值设置为0,对于第一个临时_记录,将值设置为1,对于第二个临时_记录,将值设置为2,依此类推,直到STOP_RECORD的值比最后一个临时_记录的值大一个。
The Acct-Session-Id AVP (AVP Code 44) is of type OctetString is only used when RADIUS/Diameter translation occurs. This AVP contains the contents of the RADIUS Acct-Session-Id attribute.
Acct会话Id AVP(AVP代码44)为OctetString类型,仅在发生半径/直径转换时使用。此AVP包含RADIUS Acct会话Id属性的内容。
The Acct-Multi-Session-Id AVP (AVP Code 50) is of type UTF8String, following the format specified in Section 8.8. The Acct-Multi-Session-Id AVP is used to link together multiple related accounting sessions, where each session would have a unique Session-Id, but the same Acct-Multi-Session-Id AVP. This AVP MAY be returned by the Diameter server in an authorization answer, and MUST be used in all accounting messages for the given session.
Acct多会话Id AVP(AVP代码50)为UTF8String类型,采用第8.8节规定的格式。Acct多会话Id AVP用于链接多个相关的记帐会话,其中每个会话都有一个唯一的会话Id,但Acct多会话Id AVP相同。此AVP可由Diameter服务器在授权应答中返回,并且必须在给定会话的所有记帐消息中使用。
The Accounting-Sub-Session-Id AVP (AVP Code 287) is of type Unsigned64 and contains the accounting sub-session identifier. The combination of the Session-Id and this AVP MUST be unique per sub-session, and the value of this AVP MUST be monotonically increased by one for all new sub-sessions. The absence of this AVP implies no sub-sessions are in use, with the exception of an Accounting-Request whose Accounting-Record-Type is set to STOP_RECORD. A STOP_RECORD message with no Accounting-Sub-Session-Id AVP present will signal the termination of all sub-sessions for a given Session-Id.
记帐子会话Id AVP(AVP代码287)的类型为Unsigned64,并且包含记帐子会话标识符。会话Id和该AVP的组合在每个子会话中必须是唯一的,并且对于所有新的子会话,该AVP的值必须单调地增加1。没有此AVP意味着没有子会话在使用,会计记录类型设置为STOP_Record的会计请求除外。不存在记帐子会话Id AVP的STOP_RECORD消息将发出给定会话Id的所有子会话终止的信号。
The Accounting-Realtime-Required AVP (AVP Code 483) is of type Enumerated and is sent from the Diameter home authorization server to the Diameter client or in the Accounting-Answer from the accounting server. The client uses information in this AVP to decide what to do if the sending of accounting records to the accounting server has been temporarily prevented due to, for instance, a network problem.
会计实时所需的AVP(AVP代码483)属于枚举类型,从Diameter home授权服务器发送到Diameter客户端,或在会计服务器的会计应答中发送。客户机使用此AVP中的信息来决定如果由于例如网络问题而暂时阻止向会计服务器发送会计记录,该怎么办。
DELIVER_AND_GRANT 1 The AVP with Value field set to DELIVER_AND_GRANT means that the service MUST only be granted as long as there is a connection to an accounting server. Note that the set of alternative accounting servers are treated as one server in this sense. Having to move the accounting record stream to a backup server is not a reason to discontinue the service to the user.
DELIVER_AND_GRANT 1值字段设置为DELIVER_AND_GRANT的AVP意味着只有在连接到记帐服务器的情况下才能授予服务。请注意,从这个意义上讲,备用记帐服务器集被视为一台服务器。必须将记帐记录流移动到备份服务器并不是停止向用户提供服务的理由。
GRANT_AND_STORE 2 The AVP with Value field set to GRANT_AND_STORE means that service SHOULD be granted if there is a connection, or as long as records can still be stored as described in Section 9.4.
GRANT_和_STORE 2值字段设置为GRANT_和_STORE的AVP意味着,如果存在连接,或者只要记录仍然可以按照第9.4节所述存储,就应该授予服务。
This is the default behavior if the AVP isn't included in the reply from the authorization server.
如果来自授权服务器的回复中未包含AVP,则这是默认行为。
GRANT_AND_LOSE 3 The AVP with Value field set to GRANT_AND_LOSE means that service SHOULD be granted even if the records can not be delivered or stored.
GRANT_和_LOSE 3值字段设置为GRANT_和_LOSE的AVP意味着即使无法传递或存储记录,也应授予服务。
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.
下表显示了本文档中定义的AVP,并指定了它们可能存在或不存在的Diameter消息。请注意,此表中未显示只能出现在分组AVP中的AVP。
The table uses the following symbols:
该表使用以下符号:
0 The AVP MUST NOT be present in the message. 0+ Zero or more instances of the AVP MAY be present in the message. 0-1 Zero or one instance of the AVP MAY be present in the message. It is considered an error if there are more than one instance of the AVP. 1 One instance of the AVP MUST be present in the message. 1+ At least one instance of the AVP MUST be present in the message.
0消息中不得出现AVP。消息中可能存在0+零个或多个AVP实例。0-1消息中可能存在零个或一个AVP实例。如果AVP有多个实例,则视为错误。1消息中必须有一个AVP实例。1+消息中必须至少存在一个AVP实例。
The table in this section is limited to the non-accounting Command Codes defined in this specification.
本节中的表格仅限于本规范中定义的非会计命令代码。
+-----------------------------------------------+ | Command-Code | +---+---+---+---+---+---+---+---+---+---+---+---+ Attribute Name |CER|CEA|DPR|DPA|DWR|DWA|RAR|RAA|ASR|ASA|STR|STA| --------------------+---+---+---+---+---+---+---+---+---+---+---+---+ Acct-Interim- |0 |0 |0 |0 |0 |0 |0-1|0 |0 |0 |0 |0 | Interval | | | | | | | | | | | | | Accounting-Realtime-|0 |0 |0 |0 |0 |0 |0-1|0 |0 |0 |0 |0 | Required | | | | | | | | | | | | | Acct-Application-Id |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Auth-Application-Id |0+ |0+ |0 |0 |0 |0 |1 |0 |1 |0 |1 |0 | Auth-Grace-Period |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Auth-Request-Type |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Auth-Session-State |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Authorization- |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Lifetime | | | | | | | | | | | | | Class |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0+ |0+ | Destination-Host |0 |0 |0 |0 |0 |0 |1 |0 |1 |0 |0-1|0 | Destination-Realm |0 |0 |0 |0 |0 |0 |1 |0 |1 |0 |1 |0 | Disconnect-Cause |0 |0 |1 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Error-Message |0 |0-1|0 |0-1|0 |0-1|0 |0-1|0 |0-1|0 |0-1| Error-Reporting-Host|0 |0 |0 |0 |0 |0 |0 |0-1|0 |0-1|0 |0-1| Failed-AVP |0 |0+ |0 |0+ |0 |0+ |0 |0+ |0 |0+ |0 |0+ | Firmware-Revision |0-1|0-1|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Host-IP-Address |1+ |1+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Inband-Security-Id |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Multi-Round-Time-Out|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Origin-Host |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 | Origin-Realm |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 | 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| Product-Name |1 |1 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Proxy-Info |0 |0 |0 |0 |0 |0 |0+ |0+ |0+ |0+ |0+ |0+ | Redirect-Host |0 |0 |0 |0 |0 |0 |0 |0+ |0 |0+ |0 |0+ | Redirect-Host-Usage |0 |0 |0 |0 |0 |0 |0 |0-1|0 |0-1|0 |0-1| Redirect-Max-Cache- |0 |0 |0 |0 |0 |0 |0 |0-1|0 |0-1|0 |0-1| Time | | | | | | | | | | | | | Result-Code |0 |1 |0 |1 |0 |1 |0 |1 |0 |0 |0 |1 | Re-Auth-Request-Type|0 |0 |0 |0 |0 |0 |1 |0 |0 |0 |0 |0 | Route-Record |0 |0 |0 |0 |0 |0 |0+ |0 |0+ |0 |0+ |0 | Session-Binding |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Session-Id |0 |0 |0 |0 |0 |0 |1 |1 |1 |1 |1 |1 | Session-Server- |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Failover | | | | | | | | | | | | | Session-Timeout |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Supported-Vendor-Id |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Termination-Cause |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |1 |0 | User-Name |0 |0 |0 |0 |0 |0 |0-1|0-1|0-1|0-1|0-1|0-1| Vendor-Id |1 |1 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |
+-----------------------------------------------+ | Command-Code | +---+---+---+---+---+---+---+---+---+---+---+---+ Attribute Name |CER|CEA|DPR|DPA|DWR|DWA|RAR|RAA|ASR|ASA|STR|STA| --------------------+---+---+---+---+---+---+---+---+---+---+---+---+ Acct-Interim- |0 |0 |0 |0 |0 |0 |0-1|0 |0 |0 |0 |0 | Interval | | | | | | | | | | | | | Accounting-Realtime-|0 |0 |0 |0 |0 |0 |0-1|0 |0 |0 |0 |0 | Required | | | | | | | | | | | | | Acct-Application-Id |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Auth-Application-Id |0+ |0+ |0 |0 |0 |0 |1 |0 |1 |0 |1 |0 | Auth-Grace-Period |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Auth-Request-Type |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Auth-Session-State |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Authorization- |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Lifetime | | | | | | | | | | | | | Class |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0+ |0+ | Destination-Host |0 |0 |0 |0 |0 |0 |1 |0 |1 |0 |0-1|0 | Destination-Realm |0 |0 |0 |0 |0 |0 |1 |0 |1 |0 |1 |0 | Disconnect-Cause |0 |0 |1 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Error-Message |0 |0-1|0 |0-1|0 |0-1|0 |0-1|0 |0-1|0 |0-1| Error-Reporting-Host|0 |0 |0 |0 |0 |0 |0 |0-1|0 |0-1|0 |0-1| Failed-AVP |0 |0+ |0 |0+ |0 |0+ |0 |0+ |0 |0+ |0 |0+ | Firmware-Revision |0-1|0-1|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Host-IP-Address |1+ |1+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Inband-Security-Id |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Multi-Round-Time-Out|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Origin-Host |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 | Origin-Realm |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 |1 | 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| Product-Name |1 |1 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Proxy-Info |0 |0 |0 |0 |0 |0 |0+ |0+ |0+ |0+ |0+ |0+ | Redirect-Host |0 |0 |0 |0 |0 |0 |0 |0+ |0 |0+ |0 |0+ | Redirect-Host-Usage |0 |0 |0 |0 |0 |0 |0 |0-1|0 |0-1|0 |0-1| Redirect-Max-Cache- |0 |0 |0 |0 |0 |0 |0 |0-1|0 |0-1|0 |0-1| Time | | | | | | | | | | | | | Result-Code |0 |1 |0 |1 |0 |1 |0 |1 |0 |0 |0 |1 | Re-Auth-Request-Type|0 |0 |0 |0 |0 |0 |1 |0 |0 |0 |0 |0 | Route-Record |0 |0 |0 |0 |0 |0 |0+ |0 |0+ |0 |0+ |0 | Session-Binding |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Session-Id |0 |0 |0 |0 |0 |0 |1 |1 |1 |1 |1 |1 | Session-Server- |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Failover | | | | | | | | | | | | | Session-Timeout |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Supported-Vendor-Id |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Termination-Cause |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |1 |0 | User-Name |0 |0 |0 |0 |0 |0 |0-1|0-1|0-1|0-1|0-1|0-1| Vendor-Id |1 |1 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |
Vendor-Specific- |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Application-Id | | | | | | | | | | | | | --------------------+---+---+---+---+---+---+---+---+---+---+---+---+
Vendor-Specific- |0+ |0+ |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 | Application-Id | | | | | | | | | | | | | --------------------+---+---+---+---+---+---+---+---+---+---+---+---+
The table in this section is used to represent which AVPs defined in this document are to be present in the Accounting messages. These AVP occurrence requirements are guidelines, which may be expanded, and/or overridden by application-specific requirements in the Diameter applications documents.
本节中的表格用于表示本文档中定义的哪些AVP将出现在记帐消息中。这些AVP发生要求是指南,可由Diameter应用文件中的应用特定要求扩展和/或覆盖。
+-----------+ | Command | | Code | +-----+-----+ Attribute Name | ACR | ACA | ------------------------------+-----+-----+ Acct-Interim-Interval | 0-1 | 0-1 | Acct-Multi-Session-Id | 0-1 | 0-1 | Accounting-Record-Number | 1 | 1 | Accounting-Record-Type | 1 | 1 | Acct-Session-Id | 0-1 | 0-1 | Accounting-Sub-Session-Id | 0-1 | 0-1 | Accounting-Realtime-Required | 0-1 | 0-1 | Acct-Application-Id | 0-1 | 0-1 | Auth-Application-Id | 0 | 0 | Class | 0+ | 0+ | Destination-Host | 0-1 | 0 | Destination-Realm | 1 | 0 | Error-Reporting-Host | 0 | 0+ | Event-Timestamp | 0-1 | 0-1 | Origin-Host | 1 | 1 | Origin-Realm | 1 | 1 | Proxy-Info | 0+ | 0+ | Route-Record | 0+ | 0+ | Result-Code | 0 | 1 | Session-Id | 1 | 1 | Termination-Cause | 0-1 | 0-1 | User-Name | 0-1 | 0-1 | Vendor-Specific-Application-Id| 0-1 | 0-1 | ------------------------------+-----+-----+
+-----------+ | Command | | Code | +-----+-----+ Attribute Name | ACR | ACA | ------------------------------+-----+-----+ Acct-Interim-Interval | 0-1 | 0-1 | Acct-Multi-Session-Id | 0-1 | 0-1 | Accounting-Record-Number | 1 | 1 | Accounting-Record-Type | 1 | 1 | Acct-Session-Id | 0-1 | 0-1 | Accounting-Sub-Session-Id | 0-1 | 0-1 | Accounting-Realtime-Required | 0-1 | 0-1 | Acct-Application-Id | 0-1 | 0-1 | Auth-Application-Id | 0 | 0 | Class | 0+ | 0+ | Destination-Host | 0-1 | 0 | Destination-Realm | 1 | 0 | Error-Reporting-Host | 0 | 0+ | Event-Timestamp | 0-1 | 0-1 | Origin-Host | 1 | 1 | Origin-Realm | 1 | 1 | Proxy-Info | 0+ | 0+ | Route-Record | 0+ | 0+ | Result-Code | 0 | 1 | Session-Id | 1 | 1 | Termination-Cause | 0-1 | 0-1 | User-Name | 0-1 | 0-1 | Vendor-Specific-Application-Id| 0-1 | 0-1 | ------------------------------+-----+-----+
This section provides guidance to the Internet Assigned Numbers Authority (IANA) regarding registration of values related to the Diameter protocol, in accordance with BCP 26 [IANA]. The following policies are used here with the meanings defined in BCP 26: "Private Use", "First Come First Served", "Expert Review", "Specification Required", "IETF Consensus", "Standards Action".
本节根据BCP 26[IANA],为互联网分配号码管理局(IANA)提供有关Diameter协议相关值注册的指南。此处使用以下政策,其含义见BCP 26:“私人使用”、“先到先得”、“专家评审”、“所需规范”、“IETF共识”、“标准行动”。
This section explains the criteria to be used by the IANA for assignment of numbers within namespaces defined within this document.
本节解释IANA在本文档中定义的名称空间内分配数字时使用的标准。
Diameter is not intended as a general purpose protocol, and allocations SHOULD NOT be made for purposes unrelated to authentication, authorization or accounting.
Diameter不是一个通用协议,分配不应用于与身份验证、授权或记帐无关的目的。
For registration requests where a Designated Expert should be consulted, the responsible IESG area director should appoint the Designated Expert. For Designated Expert with Specification Required, the request is posted to the AAA WG mailing list (or, if it has been disbanded, a successor designated by the Area Director) for comment and review, and MUST include a pointer to a public specification. Before a period of 30 days has passed, the Designated Expert will either approve or deny the registration request and publish a notice of the decision to the AAA WG mailing list or its successor. A denial notice must be justified by an explanation and, in the cases where it is possible, concrete suggestions on how the request can be modified so as to become acceptable.
对于需要咨询指定专家的注册请求,IESG区域负责人应任命指定专家。对于需要规范的指定专家,请求将被发布到AAA工作组邮件列表(或者,如果已经解散,则由区域总监指定的继任者)以供评论和审查,并且必须包含指向公共规范的指针。在30天内,指定专家将批准或拒绝注册请求,并向AAA WG邮件列表或其继任者发布决定通知。拒绝通知必须有理由作出解释,并在可能的情况下,就如何修改请求以使其成为可接受的请求提出具体建议。
As defined in Section 4, the AVP header contains three fields that requires IANA namespace management; the AVP Code, Vendor-ID and Flags field.
如第4节所定义,AVP头包含三个需要IANA名称空间管理的字段;AVP代码、供应商ID和标志字段。
The AVP Code namespace is used to identify attributes. There are multiple namespaces. Vendors can have their own AVP Codes namespace which will be identified by their Vendor-ID (also known as Enterprise-Number) and they control the assignments of their vendor-specific AVP codes within their own namespace. The absence of a Vendor-ID or a Vendor-ID value of zero (0) identifies the IETF IANA controlled AVP Codes namespace. The AVP Codes and sometimes also possible values in an AVP are controlled and maintained by IANA.
AVP代码命名空间用于标识属性。有多个名称空间。供应商可以拥有自己的AVP代码名称空间,该名称空间将由其供应商ID(也称为企业编号)标识,并且他们可以在自己的名称空间内控制其供应商特定AVP代码的分配。如果没有供应商ID或供应商ID值为零(0),则表示IETF IANA控制的AVP代码命名空间。AVP代码和AVP中有时可能的值由IANA控制和维护。
AVP Code 0 is not used. AVP Codes 1-255 are managed separately as RADIUS Attribute Types [RADTYPE]. This document defines the AVP Codes 257-274, 276-285, 287, 291-300, 480, 483 and 485-486. See Section 4.5 for the assignment of the namespace in this specification.
未使用AVP代码0。AVP代码1-255作为半径属性类型[RADTYPE]单独管理。本文件定义了AVP代码257-274、276-285、287、291-300、480、483和485-486。有关本规范中名称空间的分配,请参见第4.5节。
AVPs may be allocated following Designated Expert with Specification Required [IANA]. Release of blocks of AVPs (more than 3 at a time for a given purpose) should require IETF Consensus.
AVP可在指定专家的指导下分配,并提供所需的规范[IANA]。AVP块的发布(对于给定目的,一次超过3个)应要求IETF协商一致。
Note that Diameter defines a mechanism for Vendor-Specific AVPs, where the Vendor-Id field in the AVP header is set to a non-zero value. Vendor-Specific AVPs codes are for Private Use and should be encouraged instead of allocation of global attribute types, for functions specific only to one vendor's implementation of Diameter, where no interoperability is deemed useful. Where a Vendor-Specific AVP is implemented by more than one vendor, allocation of global AVPs should be encouraged instead.
请注意,Diameter为供应商特定的AVP定义了一种机制,其中AVP头中的供应商Id字段设置为非零值。特定于供应商的AVPs代码仅供私人使用,对于仅针对一家供应商实施的Diameter的功能,应鼓励使用,而不是分配全局属性类型,在这种情况下,互操作性被视为无效。如果供应商特定的AVP由多个供应商实施,则应鼓励分配全球AVP。
There are 8 bits in the AVP Flags field of the AVP header, defined in Section 4. This document assigns bit 0 ('V'endor Specific), bit 1 ('M'andatory) and bit 2 ('P'rotected). The remaining bits should only be assigned via a Standards Action [IANA].
第4节中定义的AVP报头的AVP标志字段中有8位。本文件分配了第0位(“V’endor专用)、第1位(“M’andatory”)和第2位(“P’protected)。剩余位只能通过标准操作[IANA]分配。
As defined in Section 3, the Diameter header contains two fields that require IANA namespace management; Command Code and Command Flags.
如第3节所定义,Diameter头包含两个需要IANA名称空间管理的字段;命令代码和命令标志。
The Command Code namespace is used to identify Diameter commands. The values 0-255 are reserved for RADIUS backward compatibility, and are defined as "RADIUS Packet Type Codes" in [RADTYPE]. Values 256- 16,777,213 are for permanent, standard commands, allocated by IETF Consensus [IANA]. This document defines the Command Codes 257, 258, 271, 274-275, 280 and 282. See Section 3.1 for the assignment of the namespace in this specification.
命令代码命名空间用于标识Diameter命令。值0-255保留用于RADIUS向后兼容性,并在[RADTYPE]中定义为“RADIUS数据包类型代码”。值256-16777213用于IETF Consensus[IANA]分配的永久性标准命令。本文档定义了命令代码257、258、271、274-275、280和282。有关本规范中名称空间的分配,请参见第3.1节。
The values 16,777,214 and 16,777,215 (hexadecimal values 0xfffffe - 0xffffff) are reserved for experimental commands. As these codes are only for experimental and testing purposes, no guarantee is made for interoperability between Diameter peers using experimental commands, as outlined in [IANA-EXP].
值16777214和16777215(十六进制值0xfffffe-0xffffff)保留用于实验命令。由于这些代码仅用于实验和测试目的,因此无法保证使用实验命令的Diameter对等机之间的互操作性,如[IANA-EXP]中所述。
There are eight bits in the Command Flags field of the Diameter header. This document assigns bit 0 ('R'equest), bit 1 ('P'roxy), bit 2 ('E'rror) and bit 3 ('T'). Bits 4 through 7 MUST only be assigned via a Standards Action [IANA].
直径标头的命令标志字段中有八位。本文件分配了位0('R'equest)、位1('P'roxy)、位2('E'error)和位3('T')。位4到7只能通过标准操作[IANA]分配。
As defined in Section 2.4, the Application Identifier is used to identify a specific Diameter Application. There are standards-track application ids and vendor specific application ids.
如第2.4节所述,应用标识符用于识别特定直径的应用。有标准跟踪应用程序ID和特定于供应商的应用程序ID。
IANA [IANA] has assigned the range 0x00000001 to 0x00ffffff for standards-track applications; and 0x01000000 - 0xfffffffe for vendor specific applications, on a first-come, first-served basis. The following values are allocated.
IANA[IANA]已为标准轨道应用分配范围0x00000001至0x00ffffff;和0x01000000-0xFFFFFE,用于供应商特定的应用,先到先得。将分配以下值。
Diameter Common Messages 0 NASREQ 1 [NASREQ] Mobile-IP 2 [DIAMMIP] Diameter Base Accounting 3 Relay 0xffffffff
Diameter公用消息0 NASREQ 1[NASREQ]移动IP 2[DIAMMIP]Diameter基本计费3中继0xFFFFFF
Assignment of standards-track application IDs are by Designated Expert with Specification Required [IANA].
标准轨道应用ID的分配由指定专家根据所需规范[IANA]进行。
Both Application-Id and Acct-Application-Id AVPs use the same Application Identifier space.
应用程序Id和Acct应用程序Id AVP使用相同的应用程序标识符空间。
Vendor-Specific Application Identifiers, are for Private Use. Vendor-Specific Application Identifiers are assigned on a First Come, First Served basis by IANA.
特定于供应商的应用程序标识符,仅供私人使用。IANA按照先到先得的原则分配特定于供应商的应用程序标识符。
Certain AVPs in Diameter define a list of values with various meanings. For attributes other than those specified in this section, adding additional values to the list can be done on a First Come, First Served basis by IANA.
直径中的某些AVP定义了具有各种含义的值列表。对于本节规定以外的属性,IANA可以先到先得的方式向列表中添加附加值。
As defined in Section 7.1, the Result-Code AVP (AVP Code 268) defines the values 1001, 2001-2002, 3001-3010, 4001-4002 and 5001-5017.
如第7.1节所述,结果代码AVP(AVP代码268)定义了1001、2001-2002、3001-3010、4001-4002和5001-5017的值。
All remaining values are available for assignment via IETF Consensus [IANA].
所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 9.8.1, the Accounting-Record-Type AVP (AVP Code 480) defines the values 1-4. All remaining values are available for assignment via IETF Consensus [IANA].
如第9.8.1节所述,会计记录类型AVP(AVP代码480)定义了值1-4。所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 8.15, the Termination-Cause AVP (AVP Code 295) defines the values 1-8. All remaining values are available for assignment via IETF Consensus [IANA].
如第8.15节所述,终止原因AVP(AVP代码295)定义了值1-8。所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 6.13, the Redirect-Host-Usage AVP (AVP Code 261) defines the values 0-5. All remaining values are available for assignment via IETF Consensus [IANA].
如第6.13节所述,重定向主机使用AVP(AVP代码261)定义了值0-5。所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 8.18, the Session-Server-Failover AVP (AVP Code 271) defines the values 0-3. All remaining values are available for assignment via IETF Consensus [IANA].
如第8.18节所述,会话服务器故障切换AVP(AVP代码271)定义了值0-3。所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 8.17, the Session-Binding AVP (AVP Code 270) defines the bits 1-4. All remaining bits are available for assignment via IETF Consensus [IANA].
如第8.17节所定义,会话绑定AVP(AVP代码270)定义位1-4。所有剩余位可通过IETF共识[IANA]分配。
As defined in Section 5.4.3, the Disconnect-Cause AVP (AVP Code 273) defines the values 0-2. All remaining values are available for assignment via IETF Consensus [IANA].
如第5.4.3节所述,断开原因AVP(AVP代码273)定义了值0-2。所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 8.7, the Auth-Request-Type AVP (AVP Code 274) defines the values 1-3. All remaining values are available for assignment via IETF Consensus [IANA].
如第8.7节所定义,身份验证请求类型AVP(AVP代码274)定义了值1-3。所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 8.11, the Auth-Session-State AVP (AVP Code 277) defines the values 0-1. All remaining values are available for assignment via IETF Consensus [IANA].
如第8.11节所定义,身份验证会话状态AVP(AVP代码277)定义了值0-1。所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 8.12, the Re-Auth-Request-Type AVP (AVP Code 285) defines the values 0-1. All remaining values are available for assignment via IETF Consensus [IANA].
如第8.12节所述,重新认证请求类型AVP(AVP代码285)定义了值0-1。所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 9.8.7, the Accounting-Realtime-Required AVP (AVP Code 483) defines the values 1-3. All remaining values are available for assignment via IETF Consensus [IANA].
如第9.8.7节所述,会计实时要求AVP(AVP代码483)定义了值1-3。所有剩余值可通过IETF共识[IANA]分配。
As defined in Section 6.10, the Inband-Security-Id AVP (AVP Code 299) defines the values 0-1. All remaining values are available for assignment via IETF Consensus [IANA].
如第6.10节所述,带内安全Id AVP(AVP代码299)定义了值0-1。所有剩余值可通过IETF共识[IANA]分配。
The IANA has assigned TCP and SCTP port number 3868 to Diameter.
IANA已将TCP和SCTP端口号3868分配给Diameter。
The registration in the RFC MUST include the following information:
RFC中的注册必须包括以下信息:
Service Field: The service field being registered. An example for a new fictitious transport protocol called NCTP might be "AAA+D2N".
服务字段:正在注册的服务字段。一个新的虚拟传输协议NCTP的例子可能是“AAA+D2N”。
Protocol: The specific transport protocol associated with that service field. This MUST include the name and acronym for the protocol, along with reference to a document that describes the transport protocol. For example - "New Connectionless Transport Protocol (NCTP), RFC 5766".
协议:与该服务字段关联的特定传输协议。这必须包括协议的名称和首字母缩略词,以及对描述传输协议的文档的引用。例如,“新的无连接传输协议(NCTP),RFC 5766”。
Name and Contact Information: The name, address, email address and telephone number for the person performing the registration.
姓名和联系信息:执行注册的人员的姓名、地址、电子邮件地址和电话号码。
The following values have been placed into the registry:
已将以下值放入注册表:
Services Field Protocol AAA+D2T TCP AAA+D2S SCTP
服务字段协议AAA+D2T TCP AAA+D2S SCTP
This section contains the configurable parameters that are found throughout this document:
本节包含可在本文档中找到的可配置参数:
Diameter Peer A Diameter entity MAY communicate with peers that are statically configured. A statically configured Diameter peer would require that either the IP address or the fully qualified domain name (FQDN) be supplied, which would then be used to resolve through DNS.
Diameter对等体Diameter实体可以与静态配置的对等体通信。静态配置的Diameter对等方需要提供IP地址或完全限定的域名(FQDN),然后使用该域名通过DNS进行解析。
Realm Routing Table A Diameter proxy server routes messages based on the realm portion of a Network Access Identifier (NAI). The server MUST have a table of Realm Names, and the address of the peer to which the message must be forwarded to. The routing table MAY also include a "default route", which is typically used for all messages that cannot be locally processed.
领域路由表Diameter代理服务器根据网络访问标识符(NAI)的领域部分路由消息。服务器必须有一个域名表,以及消息必须转发到的对等方的地址。路由表还可以包括“默认路由”,该路由通常用于无法在本地处理的所有消息。
Tc timer The Tc timer controls the frequency that transport connection attempts are done to a peer with whom no active transport connection exists. The recommended value is 30 seconds.
Tc定时器Tc定时器控制对不存在活动传输连接的对等方进行传输连接尝试的频率。建议值为30秒。
The Diameter base protocol assumes that messages are secured by using either IPSec or TLS. This security mechanism is acceptable in environments where there is no untrusted third party agent. In other situations, end-to-end security is needed.
Diameter基本协议假定消息通过使用IPSec或TLS进行保护。这种安全机制在没有不受信任的第三方代理的环境中是可以接受的。在其他情况下,需要端到端的安全性。
Diameter clients, such as Network Access Servers (NASes) and Mobility Agents MUST support IP Security [SECARCH] and MAY support TLS [TLS]. Diameter servers MUST support TLS and IPsec. Diameter implementations MUST use transmission-level security of some kind (IPsec or TLS) on each connection.
Diameter客户端,如网络访问服务器(NASE)和移动代理必须支持IP安全[SECARCH],并且可能支持TLS[TLS]。Diameter服务器必须支持TLS和IPsec。Diameter实现必须在每个连接上使用某种传输级安全性(IPsec或TLS)。
If a Diameter connection is not protected by IPsec, then the CER/CEA exchange MUST include an Inband-Security-ID AVP with a value of TLS. For TLS usage, a TLS handshake will begin when both ends are in the open state, after completion of the CER/CEA exchange. If the TLS handshake is successful, all further messages will be sent via TLS. If the handshake fails, both ends move to the closed state.
如果Diameter连接不受IPsec保护,则CER/CEA交换必须包括带内安全ID AVP,其值为TLS。对于TLS使用,在CER/CEA交换完成后,当两端都处于打开状态时,TLS握手将开始。如果TLS握手成功,所有进一步的消息将通过TLS发送。如果握手失败,两端都会移动到关闭状态。
It is suggested that IPsec be used primarily at the edges for intra-domain exchanges. For NAS devices without certificate support, pre-shared keys can be used between the NAS and a local AAA proxy.
建议IPsec主要用于域内交换的边缘。对于不支持证书的NAS设备,可以在NAS和本地AAA代理之间使用预共享密钥。
For protection of inter-domain exchanges, TLS is recommended. See Sections 13.1 and 13.2 for more details on IPsec and TLS usage.
为保护域间交换,建议使用TLS。有关IPsec和TLS使用的更多详细信息,请参见第13.1节和第13.2节。
All Diameter implementations MUST support IPsec ESP [IPsec] in transport mode with non-null encryption and authentication algorithms to provide per-packet authentication, integrity protection and confidentiality, and MUST support the replay protection mechanisms of IPsec.
所有Diameter实施必须支持传输模式下的IPsec ESP[IPsec],并使用非空加密和身份验证算法来提供每包身份验证、完整性保护和机密性,并且必须支持IPsec的重播保护机制。
Diameter implementations MUST support IKE for peer authentication, negotiation of security associations, and key management, using the IPsec DOI [IPSECDOI]. Diameter implementations MUST support peer authentication using a pre-shared key, and MAY support certificate-based peer authentication using digital signatures. Peer authentication using the public key encryption methods outlined in IKE's Sections 5.2 and 5.3 [IKE] SHOULD NOT be used.
Diameter实现必须使用IPsec-DOI[IPSECDOI]支持IKE进行对等身份验证、安全关联协商和密钥管理。Diameter实现必须支持使用预共享密钥的对等身份验证,并且可能支持使用数字签名的基于证书的对等身份验证。不应使用IKE第5.2节和第5.3节[IKE]中概述的使用公钥加密方法的对等身份验证。
Conformant implementations MUST support both IKE Main Mode and Aggressive Mode. When pre-shared keys are used for authentication, IKE Aggressive Mode SHOULD be used, and IKE Main Mode SHOULD NOT be used. When digital signatures are used for authentication, either IKE Main Mode or IKE Aggressive Mode MAY be used.
一致性实现必须同时支持IKE主模式和主动模式。当使用预共享密钥进行身份验证时,应使用IKE主动模式,而不应使用IKE主模式。当数字签名用于身份验证时,可以使用IKE主模式或IKE攻击模式。
When digital signatures are used to achieve authentication, an IKE negotiator SHOULD use IKE Certificate Request Payload(s) to specify the certificate authority (or authorities) that are trusted in accordance with its local policy. IKE negotiators SHOULD use pertinent certificate revocation checks before accepting a PKI certificate for use in IKE's authentication procedures.
当使用数字签名实现身份验证时,IKE谈判者应使用IKE证书请求有效载荷来指定根据其本地策略受信任的证书颁发机构。IKE谈判者在接受用于IKE认证过程的PKI证书之前,应使用相关的证书撤销检查。
The Phase 2 Quick Mode exchanges used to negotiate protection for Diameter connections MUST explicitly carry the Identity Payload fields (IDci and IDcr). The DOI provides for several types of identification data. However, when used in conformant implementations, each ID Payload MUST carry a single IP address and a single non-zero port number, and MUST NOT use the IP Subnet or IP Address Range formats. This allows the Phase 2 security association to correspond to specific TCP and SCTP connections.
用于协商直径连接保护的第2阶段快速模式交换必须明确携带标识有效载荷字段(IDci和IDcr)。内政部提供了几种类型的识别数据。但是,在一致性实现中使用时,每个ID有效负载必须携带一个IP地址和一个非零端口号,并且不得使用IP子网或IP地址范围格式。这允许阶段2安全关联对应于特定的TCP和SCTP连接。
Since IPsec acceleration hardware may only be able to handle a limited number of active IKE Phase 2 SAs, Phase 2 delete messages may be sent for idle SAs, as a means of keeping the number of active Phase 2 SAs to a minimum. The receipt of an IKE Phase 2 delete message SHOULD NOT be interpreted as a reason for tearing down a Diameter connection. Rather, it is preferable to leave the connection up, and if additional traffic is sent on it, to bring up another IKE Phase 2 SA to protect it. This avoids the potential for continually bringing connections up and down.
由于IPsec加速硬件可能只能处理有限数量的活动IKE阶段2 SA,因此可以为空闲SA发送阶段2删除消息,以将活动阶段2 SA的数量保持在最小。收到IKE第2阶段删除消息不应被解释为断开Diameter连接的原因。相反,最好保持连接处于打开状态,如果在连接上发送了额外的通信量,则启动另一个IKE阶段2 SA以保护它。这样就避免了不断地使连接上下移动的可能性。
A Diameter node that initiates a connection to another Diameter node acts as a TLS client according to [TLS], and a Diameter node that accepts a connection acts as a TLS server. Diameter nodes implementing TLS for security MUST mutually authenticate as part of TLS session establishment. In order to ensure mutual authentication, the Diameter node acting as TLS server must request a certificate from the Diameter node acting as TLS client, and the Diameter node acting as TLS client MUST be prepared to supply a certificate on request.
根据[TLS],发起到另一个Diameter节点的连接的Diameter节点充当TLS客户端,而接受连接的Diameter节点充当TLS服务器。作为TLS会话建立的一部分,实现TLS安全性的Diameter节点必须相互验证。为了确保相互身份验证,充当TLS服务器的Diameter节点必须从充当TLS客户端的Diameter节点请求证书,并且充当TLS客户端的Diameter节点必须准备好根据请求提供证书。
Diameter nodes MUST be able to negotiate the following TLS cipher suites:
Diameter节点必须能够协商以下TLS密码套件:
TLS_RSA_WITH_RC4_128_MD5 TLS_RSA_WITH_RC4_128_SHA TLS_RSA_WITH_3DES_EDE_CBC_SHA
TLS_RSA_与RC4_128_MD5 TLS_RSA_与RC4_128_SHA TLS_RSA_与CBC_SHA
Diameter nodes SHOULD be able to negotiate the following TLS cipher suite:
Diameter节点应能够协商以下TLS密码套件:
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_与_AES_128_CBC_SHA
Diameter nodes MAY negotiate other TLS cipher suites.
Diameter节点可以协商其他TLS密码套件。
As with any peer-to-peer protocol, proper configuration of the trust model within a Diameter peer is essential to security. When certificates are used, it is necessary to configure the root certificate authorities trusted by the Diameter peer. These root CAs are likely to be unique to Diameter usage and distinct from the root CAs that might be trusted for other purposes such as Web browsing. In general, it is expected that those root CAs will be configured so as to reflect the business relationships between the organization hosting the Diameter peer and other organizations. As a result, a Diameter peer will typically not be configured to allow connectivity with any arbitrary peer. When certificate authentication Diameter peers may not be known beforehand, and therefore peer discovery may be required.
与任何对等协议一样,在Diameter对等内正确配置信任模型对安全性至关重要。使用证书时,需要配置Diameter对等方信任的根证书颁发机构。这些根CA可能是Diameter使用的唯一根CA,并且不同于可用于其他目的(如Web浏览)的根CA。一般来说,预期这些根CA将被配置为反映承载Diameter对等体的组织与其他组织之间的业务关系。因此,Diameter对等机通常不会配置为允许与任何任意对等机进行连接。当证书认证时,可能事先不知道对等点,因此可能需要对等点发现。
Note that IPsec is considerably less flexible than TLS when it comes to configuring root CAs. Since use of Port identifiers is prohibited within IKE Phase 1, within IPsec it is not possible to uniquely configure trusted root CAs for each application individually; the same policy must be used for all applications. This implies, for example, that a root CA trusted for use with Diameter must also be
请注意,在配置根CA时,IPsec的灵活性远远低于TLS。由于在IKE阶段1中禁止使用端口标识符,因此在IPsec中,不可能为每个应用程序单独配置受信任的根CA;所有应用程序都必须使用相同的策略。这意味着,例如,受信任用于直径的根CA也必须是
trusted to protect SNMP. These restrictions can be awkward at best. Since TLS supports application-level granularity in certificate policy, TLS SHOULD be used to protect Diameter connections between administrative domains. IPsec is most appropriate for intra-domain usage when pre-shared keys are used as a security mechanism.
受信任以保护SNMP。这些限制充其量也会很尴尬。由于TLS在证书策略中支持应用程序级粒度,因此应使用TLS保护管理域之间的Diameter连接。当预共享密钥用作安全机制时,IPsec最适合域内使用。
When pre-shared key authentication is used with IPsec to protect Diameter, unique pre-shared keys are configured with Diameter peers, who are identified by their IP address (Main Mode), or possibly their FQDN (Aggressive Mode). As a result, it is necessary for the set of Diameter peers to be known beforehand. Therefore, peer discovery is typically not necessary.
当IPsec使用预共享密钥身份验证来保护Diameter时,将使用Diameter对等方配置唯一的预共享密钥,这些对等方由其IP地址(主模式)或FQDN(攻击模式)标识。因此,必须事先知道直径对等点集。因此,通常不需要对等发现。
The following is intended to provide some guidance on the issue.
以下内容旨在就这一问题提供一些指导。
It is recommended that a Diameter peer implement the same security mechanism (IPsec or TLS) across all its peer-to-peer connections. Inconsistent use of security mechanisms can result in redundant security mechanisms being used (e.g., TLS over IPsec) or worse, potential security vulnerabilities. When IPsec is used with Diameter, a typical security policy for outbound traffic is "Initiate IPsec, from me to any, destination port Diameter"; for inbound traffic, the policy would be "Require IPsec, from any to me, destination port Diameter".
建议Diameter对等机在其所有对等连接上实现相同的安全机制(IPsec或TLS)。不一致地使用安全机制可能导致使用冗余安全机制(例如,IPsec上的TLS)或更糟糕的潜在安全漏洞。当IPsec与Diameter一起使用时,出站流量的典型安全策略是“启动IPsec,从me到任意目标端口Diameter”;对于入站流量,策略将是“需要IPsec,从任意到我,目标端口直径”。
This policy causes IPsec to be used whenever a Diameter peer initiates a connection to another Diameter peer, and to be required whenever an inbound Diameter connection occurs. This policy is attractive, since it does not require policy to be set for each peer or dynamically modified each time a new Diameter connection is created; an IPsec SA is automatically created based on a simple static policy. Since IPsec extensions are typically not available to the sockets API on most platforms, and IPsec policy functionality is implementation dependent, use of a simple static policy is the often the simplest route to IPsec-enabling a Diameter implementation.
此策略导致每当Diameter对等机启动到另一个Diameter对等机的连接时使用IPsec,并且每当发生入站Diameter连接时都需要IPsec。此策略很有吸引力,因为它不需要为每个对等方设置策略,也不需要在每次创建新的Diameter连接时动态修改策略;IPsec SA是基于简单的静态策略自动创建的。由于IPsec扩展通常不适用于大多数平台上的sockets API,并且IPsec策略功能依赖于实现,因此使用简单的静态策略通常是实现Diameter实现的IPsec最简单的途径。
One implication of the recommended policy is that if a node is using both TLS and IPsec, there is not a convenient way in which to use either TLS or IPsec, but not both, without reserving an additional port for TLS usage. Since Diameter uses the same port for TLS and non-TLS usage, where the recommended IPsec policy is put in place, a TLS-protected connection will match the IPsec policy, and both IPsec and TLS will be used to protect the Diameter connection. To avoid this, it would be necessary to plumb peer-specific policies either statically or dynamically.
建议策略的一个含义是,如果节点同时使用TLS和IPsec,则在不为TLS使用保留额外端口的情况下,没有一种方便的方法可以使用TLS或IPsec,但不能同时使用两者。由于Diameter对TLS和非TLS使用相同的端口,因此在推荐的IPsec策略到位的情况下,受TLS保护的连接将与IPsec策略匹配,并且IPsec和TLS都将用于保护Diameter连接。为了避免这种情况,有必要静态或动态地研究特定于对等方的策略。
If IPsec is used to secure Diameter peer-to-peer connections, IPsec policy SHOULD be set so as to require IPsec protection for inbound connections, and to initiate IPsec protection for outbound connections. This can be accomplished via use of inbound and outbound filter policy.
如果IPsec用于保护Diameter对等连接,则应设置IPsec策略,以便对入站连接要求IPsec保护,并对出站连接启动IPsec保护。这可以通过使用入站和出站筛选器策略来实现。
[AAATRANS] Aboba, B. and J. Wood, "Authentication, Authorization and Accounting (AAA) Transport Profile", RFC 3539, June 2003.
[AAATRANS]Aboba,B.和J.Wood,“认证、授权和会计(AAA)运输概况”,RFC 3539,2003年6月。
[ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.
[ABNF]Crocker,D.和P.Overell,“语法规范的扩充BNF:ABNF”,RFC 2234,1997年11月。
[ASSIGNNO] Reynolds, J., "Assigned Numbers: RFC 1700 is Replaced by an On-line Database", RFC 3232, January 2002.
[ASSIGNNO]Reynolds,J.,“分配的号码:RFC 1700被在线数据库取代”,RFC 3232,2002年1月。
[DIFFSERV] Nichols, K., Blake, S., Baker, F. and D. Black, "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers", RFC 2474, December 1998.
[DIFFSERV]Nichols,K.,Blake,S.,Baker,F.和D.Black,“IPv4和IPv6报头中区分服务字段(DS字段)的定义”,RFC 24741998年12月。
[DIFFSERVAF] Heinanen, J., Baker, F., Weiss, W. and J. Wroclawski, "Assured Forwarding PHB Group", RFC 2597, June 1999.
[DIFFSERVAF]Heinanen,J.,Baker,F.,Weiss,W.和J.Wroclawski,“保证转发PHB集团”,RFC 25971999年6月。
[DIFFSERVEF] Davie, B., Charny, A., Bennet, J., Benson, K., Le Boudec, J., Courtney, W., Davari, S., Firoiu, V. and D. Stiliadis, "An Expedited Forwarding PHB", RFC 3246, March 2002.
[DIFFSERVEF]Davie,B.,Charny,A.,Bennet,J.,Benson,K.,Le Boudec,J.,Courtney,W.,Davari,S.,Firoiu,V.和D.Stiliadis,“快速转发PHB”,RFC 32462002年3月。
[DNSSRV] Gulbrandsen, A., Vixie, P. and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, February 2000.
[DNSSRV]Gulbrandsen,A.,Vixie,P.和L.Esibov,“用于指定服务位置(DNS SRV)的DNS RR”,RFC 2782,2000年2月。
[EAP] Blunk, L. and J. Vollbrecht, "PPP Extensible Authentication Protocol (EAP)", RFC 2284, March 1998.
[EAP]Blunk,L.和J.Vollbrecht,“PPP可扩展认证协议(EAP)”,RFC 2284,1998年3月。
[FLOATPOINT] Institute of Electrical and Electronics Engineers, "IEEE Standard for Binary Floating-Point Arithmetic", ANSI/IEEE Standard 754-1985, August 1985.
[浮点]电气和电子工程师协会,“二进制浮点运算的IEEE标准”,ANSI/IEEE标准754-1985,1985年8月。
[IANA] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
[IANA]Narten,T.和H.Alvestrand,“在RFCs中编写IANA注意事项部分的指南”,BCP 26,RFC 2434,1998年10月。
[IANAADFAM] IANA; "Address Family Numbers", http://www.iana.org/assignments/address-family-numbers
[IANAADFAM] IANA; "Address Family Numbers", http://www.iana.org/assignments/address-family-numbers
[IANAWEB] IANA, "Number assignment", http://www.iana.org
[IANAWEB] IANA, "Number assignment", http://www.iana.org
[IKE] Harkins, D. and D. Carrel, "The Internet Key Exchange (IKE)", RFC 2409, November 1998.
[IKE]Harkins,D.和D.Carrel,“互联网密钥交换(IKE)”,RFC 2409,1998年11月。
[IPComp] Shacham, A., Monsour, R., Pereira, R. and M. Thomas, "IP Payload Compression Protocol (IPComp)", RFC 3173, September 2001.
[IPComp]Shacham,A.,Monsour,R.,Pereira,R.和M.Thomas,“IP有效载荷压缩协议(IPComp)”,RFC 31732001年9月。
[IPSECDOI] Piper, D., "The Internet IP Security Domain of Interpretation for ISAKMP", RFC 2407, November 1998.
[IPSECDOI]Piper,D.,“ISAKMP解释的互联网IP安全域”,RFC 2407,1998年11月。
[IPV4] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981.
[IPV4]Postel,J.,“互联网协议”,STD 5,RFC 7911981年9月。
[IPV6] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 2373, July 1998.
[IPV6]Hinden,R.和S.Deering,“IP版本6寻址体系结构”,RFC 23731998年7月。
[KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[关键词]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
[NAI] Aboba, B. and M. Beadles, "The Network Access Identifier", RFC 2486, January 1999.
[NAI]Aboba,B.和M.Beadles,“网络接入标识符”,RFC 2486,1999年1月。
[NAPTR] Mealling, M. and R. Daniel, "The naming authority pointer (NAPTR) DNS resource record," RFC 2915, September 2000.
[NAPTR]Mealling,M.和R.Daniel,“命名机构指针(NAPTR)DNS资源记录”,RFC 2915,2000年9月。
[RADTYPE] IANA, "RADIUS Types", http://www.iana.org/assignments/radius-types
[RADTYPE] IANA, "RADIUS Types", http://www.iana.org/assignments/radius-types
[SCTP] Stewart, R., Xie, Q., Morneault, K., Sharp, C., Schwarzbauer, H., Taylor, T., Rytina, I., Kalla, M., Zhang, L. and V. Paxson, "Stream Control Transmission Protocol", RFC 2960, October 2000.
[SCTP]Stewart,R.,Xie,Q.,Morneault,K.,Sharp,C.,Schwarzbauer,H.,Taylor,T.,Rytina,I.,Kalla,M.,Zhang,L.和V.Paxson,“流控制传输协议”,RFC 29602000年10月。
[SLP] Veizades, J., Guttman, E., Perkins, C. and M. Day, "Service Location Protocol, Version 2", RFC 2165, June 1999.
[SLP]Veizades,J.,Guttman,E.,Perkins,C.和M.Day,“服务位置协议,版本2”,RFC 21651999年6月。
[SNTP] Mills, D., "Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI", RFC 2030, October 1996.
[SNTP]Mills,D.,“IPv4、IPv6和OSI的简单网络时间协议(SNTP)第4版”,RFC 2030,1996年10月。
[TCP] Postel, J. "Transmission Control Protocol", STD 7, RFC 793, January 1981.
[TCP]Postel,J.“传输控制协议”,标准7,RFC 793,1981年1月。
[TEMPLATE] Guttman, E., Perkins, C. and J. Kempf, "Service Templates and Service: Schemes", RFC 2609, June 1999.
[模板]Guttman,E.,Perkins,C.和J.Kempf,“服务模板和服务:方案”,RFC 26091999年6月。
[TLS] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC 2246, January 1999.
[TLS]Dierks,T.和C.Allen,“TLS协议版本1.0”,RFC 2246,1999年1月。
[TLSSCTP] Jungmaier, A., Rescorla, E. and M. Tuexen, "Transport Layer Security over Stream Control Transmission Protocol", RFC 3436, December 2002.
[TLSSCTP]Jungmaier,A.,Rescorla,E.和M.Tuexen,“流控制传输协议上的传输层安全”,RFC 3436,2002年12月。
[URI] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.
[URI]Berners Lee,T.,Fielding,R.和L.Masinter,“统一资源标识符(URI):通用语法”,RFC 2396,1998年8月。
[UTF8] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2279, January 1998.
[UTF8]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,RFC 2279,1998年1月。
[AAACMS] P. Calhoun, W. Bulley, S. Farrell, "Diameter CMS Security Application", Work in Progress.
[AAACMS]P.Calhoun,W.Bulley,S.Farrell,“直径CMS安全应用”,正在进行中的工作。
[AAAREQ] Aboba, B., Calhoun, P., Glass, S., Hiller, T., McCann, P., Shiino, H., Zorn, G., Dommety, G., Perkins, C., Patil, B., Mitton, D., Manning, S., Beadles, M., Walsh, P., Chen, X., Sivalingham, S., Hameed, A., Munson, M., Jacobs, S., Lim, B., Hirschman, B., Hsu, R., Xu, Y., Campbell, E., Baba, S. and E. Jaques, "Criteria for Evaluating AAA Protocols for Network Access", RFC 2989, November 2000.
[AAAREQ]Aboba,B.,Calhoun,P.,Glass,S.,Hiller,T.,McCann,P.,Shiino,H.,Zorn,G.,Dommety,G.,Perkins,C.,Patil,B.,Mitton,D.,Manning,S.,Beadles,M.,Walsh,P.,Chen,X.,Sivalingham,S.,Hameed,A.,Munson,M.,Jacobs,S.,Lim,B.,Hirschman,B.,Hsu,R.,Xu,Y.,Campbell,E.,Baba,S.和E.Jaques,“评估网络接入AAA协议的标准”,RFC 2989,2000年11月。
[ACCMGMT] Aboba, B., Arkko, J. and D. Harrington. "Introduction to Accounting Management", RFC 2975, October 2000.
[ACCMGMT]Aboba,B.,Arkko,J.和D.Harrington。《会计管理导论》,RFC 2975,2000年10月。
[CDMA2000] Hiller, T., Walsh, P., Chen, X., Munson, M., Dommety, G., Sivalingham, S., Lim, B., McCann, P., Shiino, H., Hirschman, B., Manning, S., Hsu, R., Koo, H., Lipford, M., Calhoun, P., Lo, C., Jaques, E., Campbell, E., Xu, Y., Baba, S., Ayaki, T., Seki, T. and A. Hameed, "CDMA2000 Wireless Data Requirements for AAA", RFC 3141, June 2001.
[CDMA2000]Hiller,T.,Walsh,P.,Chen,X.,Munson,M.,Dommety,G.,Sivalingham,S.,Lim,B.,McCann,P.,Shiino,H.,Hirschman,B.,Manning,S.,Hsu,R.,Koo,H.,Lipford,M.,Calhoun,P.,Lo,C.,Jaques,E.,Campbell,E.,Xu,Y.,Baba,S.,Ayaki,T.,Seki,T.和A.Hameed,“AAA的CDMA2000无线数据要求”,RFC 31412001年6月。
[DIAMMIP] P. Calhoun, C. Perkins, "Diameter Mobile IP Application", Work in Progress.
[DIAMMIP]P.Calhoun,C.Perkins,“Diameter移动IP应用程序”,正在进行中。
[DYNAUTH] Chiba, M., Dommety, G., Eklund, M., Mitton, D. and B. Aboba, "Dynamic Authorization Extensions to Remote Authentication Dial In User Service (RADIUS)", RFC 3576, July 2003.
[DYNAUTH]Chiba,M.,Dommety,G.,Eklund,M.,Mitton,D.和B.Aboba,“远程认证拨号用户服务(RADIUS)的动态授权扩展”,RFC 35762003年7月。
[IANA-EXP] T. Narten, "Assigning Experimental and Testing Numbers Considered Useful", Work in Progress.
[IANA-EXP]T.Narten,“分配被认为有用的实验和测试数字”,正在进行中。
[MIPV4] Perkins, C., "IP Mobility Support for IPv4", RFC 3344, August 2002.
[MIPV4]Perkins,C.,“IPv4的IP移动支持”,RFC 3344,2002年8月。
[MIPREQ] Glass, S., Hiller, T., Jacobs, S. and C. Perkins, "Mobile IP Authentication, Authorization, and Accounting Requirements", RFC 2977, October 2000.
[MIPREQ]Glass,S.,Hiller,T.,Jacobs,S.和C.Perkins,“移动IP认证、授权和记帐要求”,RFC 29772000年10月。
[NASNG] Mitton, D. and M. Beadles, "Network Access Server Requirements Next Generation (NASREQNG) NAS Model", RFC 2881, July 2000.
[NASNG]Mitton,D.和M.Beadles,“网络访问服务器要求下一代(NASREQNG)NAS模型”,RFC 28812000年7月。
[NASREQ] P. Calhoun, W. Bulley, A. Rubens, J. Haag, "Diameter NASREQ Application", Work in Progress.
[NASREQ]P.Calhoun,W.Bulley,A.Rubens,J.Haag,“直径NASREQ应用”,正在进行的工作。
[NASCRIT] Beadles, M. and D. Mitton, "Criteria for Evaluating Network Access Server Protocols", RFC 3169, September 2001.
[NASCRIT]Beadles,M.和D.Mitton,“评估网络访问服务器协议的标准”,RFC 3169,2001年9月。
[PPP] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51, RFC 1661, July 1994.
[PPP]辛普森,W.“点对点协议(PPP)”,STD 51,RFC 1661994年7月。
[PROXYCHAIN] Aboba, B. and J. Vollbrecht, "Proxy Chaining and Policy Implementation in Roaming", RFC 2607, June 1999.
[PROXYCHAIN]Aboba,B.和J.Vollbrecht,“漫游中的代理链接和策略实施”,RFC 2607,1999年6月。
[RADACCT] Rigney, C., "RADIUS Accounting", RFC 2866, June 2000.
[RADACCT]Rigney,C.,“半径会计”,RFC 28662000年6月。
[RADEXT] Rigney, C., Willats, W. and P. Calhoun, "RADIUS Extensions", RFC 2869, June 2000.
[RADEXT]Rigney,C.,Willats,W.和P.Calhoun,“半径延伸”,RFC 2869,2000年6月。
[RADIUS] Rigney, C., Willens, S., Rubens, A. and W. Simpson, "Remote Authentication Dial In User Service (RADIUS)", RFC 2865, June 2000.
[RADIUS]Rigney,C.,Willens,S.,Rubens,A.和W.Simpson,“远程认证拨入用户服务(RADIUS)”,RFC 28652000年6月。
[ROAMREV] Aboba, B., Lu, J., Alsop, J., Ding, J. and W. Wang, "Review of Roaming Implementations", RFC 2194, September 1997.
[ROAMREV]Aboba,B.,Lu,J.,Alsop,J.,Ding,J.和W.Wang,“漫游实施回顾”,RFC 2194,1997年9月。
[ROAMCRIT] Aboba, B. and G. Zorn, "Criteria for Evaluating Roaming Protocols", RFC 2477, January 1999.
[ROAMCRIT]Aboba,B.和G.Zorn,“评估漫游协议的标准”,RFC 2477,1999年1月。
[SECARCH] Kent, S. and R. Atkinson, "Security Architecture for the Internet Protocol", RFC 2401, November 1998.
[SECARCH]Kent,S.和R.Atkinson,“互联网协议的安全架构”,RFC 2401,1998年11月。
[TACACS] Finseth, C., "An Access Control Protocol, Sometimes Called TACACS", RFC 1492, July 1993.
[TACACS]Finseth,C.,“访问控制协议,有时称为TACACS”,RFC 1492,1993年7月。
The authors would like to thank Nenad Trifunovic, Tony Johansson and Pankaj Patel for their participation in the pre-IETF Document Reading Party. Allison Mankin, Jonathan Wood and Bernard Aboba provided invaluable assistance in working out transport issues, and similarly with Steven Bellovin in the security area.
作者要感谢内纳德·特里富诺维奇、托尼·约翰逊和潘卡吉·帕特尔参加IETF前文件阅读聚会。Allison Mankin、Jonathan Wood和Bernard Aboba在解决交通问题方面提供了宝贵的帮助,在安全领域也与Steven Bellovin提供了同样的帮助。
Paul Funk and David Mitton were instrumental in getting the Peer State Machine correct, and our deep thanks go to them for their time.
保罗·芬克(Paul Funk)和大卫·米顿(David Mitton)在纠正对等状态机方面发挥了重要作用,我们深切感谢他们花了这么多时间。
Text in this document was also provided by Paul Funk, Mark Eklund, Mark Jones and Dave Spence. Jacques Caron provided many great comments as a result of a thorough review of the spec.
本文件中的文本也由Paul Funk、Mark Eklund、Mark Jones和Dave Spence提供。雅克·卡隆(Jacques Caron)对规范进行了彻底的审查,提出了许多很好的意见。
The authors would also like to acknowledge the following people for their contribution in the development of the Diameter protocol:
作者还想感谢以下人员在Diameter协议制定过程中的贡献:
Allan C. Rubens, Haseeb Akhtar, William Bulley, Stephen Farrell, David Frascone, Daniel C. Fox, Lol Grant, Ignacio Goyret, Nancy Greene, Peter Heitman, Fredrik Johansson, Mark Jones, Martin Julien, Bob Kopacz, Paul Krumviede, Fergal Ladley, Ryan Moats, Victor Muslin, Kenneth Peirce, John Schnizlein, Sumit Vakil, John R. Vollbrecht and Jeff Weisberg.
艾伦·C·鲁本斯、哈塞布·阿赫塔、威廉·布里、斯蒂芬·法雷尔、大卫·弗雷斯科、丹尼尔·C·福克斯、洛尔·格兰特、伊格纳西奥·戈雷特、南希·格林、彼得·海特曼、弗雷德里克·约翰森、马克·琼斯、马丁·朱利安、鲍勃·科帕茨、保罗·克鲁姆维德、费格尔·拉德利、瑞安·莫茨、维克多·穆斯林、肯尼斯·皮尔斯、约翰·施尼兹林、苏米特·瓦基尔、,约翰·R·沃尔布雷希特和杰夫·韦斯伯格。
Finally, Pat Calhoun would like to thank Sun Microsystems since most of the effort put into this document was done while he was in their employ.
最后,Pat Calhoun要感谢Sun Microsystems,因为在本文档中投入的大部分精力都是在他任职期间完成的。
The following service template describes the attributes used by Diameter servers to advertise themselves. This simplifies the process of selecting an appropriate server to communicate with. A Diameter client can request specific Diameter servers based on characteristics of the Diameter service desired (for example, an AAA server to use for accounting.)
以下服务模板描述Diameter服务器用于公布其自身的属性。这简化了选择与之通信的适当服务器的过程。Diameter客户端可以根据所需Diameter服务的特征请求特定的Diameter服务器(例如,用于记帐的AAA服务器)
Name of submitter: "Erik Guttman" <Erik.Guttman@sun.com> Language of service template: en
Name of submitter: "Erik Guttman" <Erik.Guttman@sun.com> Language of service template: en
Security Considerations: Diameter clients and servers use various cryptographic mechanisms to protect communication integrity, confidentiality as well as perform end-point authentication. It would thus be difficult if not impossible for an attacker to advertise itself using SLPv2 and pose as a legitimate Diameter peer without proper preconfigured secrets or cryptographic keys. Still, as Diameter services are vital for network operation it is important to use SLPv2 authentication to prevent an attacker from modifying or eliminating service advertisements for legitimate Diameter servers.
安全注意事项:Diameter客户端和服务器使用各种加密机制来保护通信完整性、机密性以及执行端点身份验证。因此,如果没有适当的预配置秘密或加密密钥,攻击者很难(如果不是不可能的话)使用SLPv2宣传自己,并伪装成合法的Diameter对等方。尽管如此,由于Diameter服务对于网络操作至关重要,因此使用SLPv2身份验证来防止攻击者修改或消除合法Diameter服务器的服务广告非常重要。
Template text: -------------------------template begins here----------------------- template-type=service:diameter
Template text: -------------------------template begins here----------------------- template-type=service:diameter
template-version=0.0
模板版本=0.0
template-description= The Diameter protocol is defined by RFC 3588.
模板说明=Diameter协议由RFC 3588定义。
template-url-syntax= url-path= ; The Diameter URL format is described in Section 2.9. ; Example: 'aaa://aaa.example.com:1812;transport=tcp supported-auth-applications= string L M # This attribute lists the Diameter applications supported by the # AAA implementation. The applications currently defined are: # Application Name Defined by # ---------------- ----------------------------------- # NASREQ Diameter Network Access Server Application # MobileIP Diameter Mobile IP Application # # Notes: # . Diameter implementations support one or more applications. # . Additional applications may be defined in the future. # An updated service template will be created at that time.
template-url-syntax= url-path= ; The Diameter URL format is described in Section 2.9. ; Example: 'aaa://aaa.example.com:1812;transport=tcp supported-auth-applications= string L M # This attribute lists the Diameter applications supported by the # AAA implementation. The applications currently defined are: # Application Name Defined by # ---------------- ----------------------------------- # NASREQ Diameter Network Access Server Application # MobileIP Diameter Mobile IP Application # # Notes: # . Diameter implementations support one or more applications. # . Additional applications may be defined in the future. # An updated service template will be created at that time.
# NASREQ,MobileIP
#NASREQ,MobileIP
supported-acct-applications= string L M # This attribute lists the Diameter applications supported by the # AAA implementation. The applications currently defined are: # Application Name Defined by # ---------------- ----------------------------------- # NASREQ Diameter Network Access Server Application # MobileIP Diameter Mobile IP Application # # Notes: # . Diameter implementations support one or more applications. # . Additional applications may be defined in the future. # An updated service template will be created at that time. # NASREQ,MobileIP
supported-acct-applications= string L M # This attribute lists the Diameter applications supported by the # AAA implementation. The applications currently defined are: # Application Name Defined by # ---------------- ----------------------------------- # NASREQ Diameter Network Access Server Application # MobileIP Diameter Mobile IP Application # # Notes: # . Diameter implementations support one or more applications. # . Additional applications may be defined in the future. # An updated service template will be created at that time. # NASREQ,MobileIP
supported-transports= string L M SCTP # This attribute lists the supported transports that the Diameter # implementation accepts. Note that a compliant Diameter # implementation MUST support SCTP, though it MAY support other # transports, too. SCTP,TCP
supported transports=string L M SCTP#此属性列出Diameter#实现接受的受支持传输。请注意,兼容的Diameter实现必须支持SCTP,尽管它也可能支持其他传输。SCTP,TCP
-------------------------template ends here-----------------------
-------------------------template ends here-----------------------
As an example, consider a client that wishes to resolve aaa:ex.com. The client performs a NAPTR query for that domain, and the following NAPTR records are returned:
作为一个例子,考虑一个希望解析AAA:EX.NET的客户端。客户端对该域执行NAPTR查询,并返回以下NAPTR记录:
;; order pref flags service regexp replacement IN NAPTR 50 50 "s" "AAA+D2S" "" _diameter._sctp.example.com IN NAPTR 100 50 "s" "AAA+D2T" "" _aaa._tcp.example.com
;; order pref标记NAPTR 50 50“s”“AAA+D2S”“中的服务regexp替换。\u diameter.\u sctp.example.com在NAPTR 100 50“s”“AAA+D2T”“中。\u AAA.\u tcp.example.com
This indicates that the server supports SCTP, and TCP, in that order. If the client supports over SCTP, SCTP will be used, targeted to a host determined by an SRV lookup of _diameter._sctp.ex.com. That lookup would return:
这表示服务器支持SCTP和TCP的顺序。如果客户端支持over SCTP,则将使用SCTP,目标主机由SRV查找_diameter._SCTP.ex.com确定。该查找将返回:
;; Priority Weight Port Target IN SRV 0 1 5060 server1.example.com IN SRV 0 2 5060 server2.example.com
;; SRV 0 2 5060 server2.example.com中SRV 0 1 5060 server1.example.com中的优先级权重端口目标
As described in Section 9.4, accounting record duplicate detection is based on session identifiers. Duplicates can appear for various reasons:
如第9.4节所述,会计记录重复检测基于会话标识符。出现重复项的原因有多种:
- Failover to an alternate server. Where close to real-time performance is required, failover thresholds need to be kept low and this may lead to an increased likelihood of duplicates. Failover can occur at the client or within Diameter agents.
- 故障转移到备用服务器。在需要接近实时性能的情况下,需要将故障切换阈值保持在较低的水平,这可能会增加重复的可能性。故障转移可以发生在客户端或Diameter代理内。
- Failure of a client or agent after sending of a record from non-volatile memory, but prior to receipt of an application layer ACK and deletion of the record. record to be sent. This will result in retransmission of the record soon after the client or agent has rebooted.
- 在从非易失性存储器发送记录之后,但在接收到应用层ACK和删除记录之前,客户端或代理出现故障。要发送的记录。这将导致在客户端或代理重新启动后不久重新传输记录。
- Duplicates received from RADIUS gateways. Since the retransmission behavior of RADIUS is not defined within [RFC2865], the likelihood of duplication will vary according to the implementation.
- 从RADIUS网关接收的副本。由于[RFC2865]中未定义RADIUS的重传行为,因此复制的可能性将根据实现情况而变化。
- Implementation problems and misconfiguration.
- 实现问题和错误配置。
The T flag is used as an indication of an application layer retransmission event, e.g., due to failover to an alternate server. It is defined only for request messages sent by Diameter clients or agents. For instance, after a reboot, a client may not know whether it has already tried to send the accounting records in its non-volatile memory before the reboot occurred. Diameter servers MAY use the T flag as an aid when processing requests and detecting duplicate messages. However, servers that do this MUST ensure that duplicates are found even when the first transmitted request arrives at the server after the retransmitted request. It can be used only in cases where no answer has been received from the Server for a request and the request is sent again, (e.g., due to a failover to an alternate peer, due to a recovered primary peer or due to a client re-sending a stored record from non-volatile memory such as after reboot of a client or agent).
T标志用于指示应用层重新传输事件,例如,由于故障切换到备用服务器而导致的事件。它仅为Diameter客户端或代理发送的请求消息定义。例如,重新启动后,客户机可能不知道在重新启动之前是否已尝试在其非易失性内存中发送记帐记录。Diameter服务器在处理请求和检测重复消息时可以使用T标志作为辅助。但是,执行此操作的服务器必须确保即使在重新传输请求之后第一个传输的请求到达服务器时也能找到重复的请求。只有在服务器未收到请求的应答且请求再次发送的情况下(例如,由于故障切换到备用对等方、由于恢复的主对等方或由于客户端从非易失性内存重新发送存储记录,例如在客户端或代理重新启动后),才可以使用此功能。
In some cases the Diameter accounting server can delay the duplicate detection and accounting record processing until a post-processing phase takes place. At that time records are likely to be sorted according to the included User-Name and duplicate elimination is easy in this case. In other situations it may be necessary to perform real-time duplicate detection, such as when credit limits are imposed or real-time fraud detection is desired.
在某些情况下,Diameter accounting server可以将重复检测和记帐记录处理延迟到后处理阶段。此时,可能会根据包含的用户名对记录进行排序,在这种情况下很容易消除重复。在其他情况下,可能需要执行实时重复检测,例如当施加信用限额或需要实时欺诈检测时。
In general, only generation of duplicates due to failover or re-sending of records in non-volatile storage can be reliably detected by Diameter clients or agents. In such cases the Diameter client or agents can mark the message as possible duplicate by setting the T flag. Since the Diameter server is responsible for duplicate detection, it can choose to make use of the T flag or not, in order to optimize duplicate detection. Since the T flag does not affect interoperability, and may not be needed by some servers, generation of the T flag is REQUIRED for Diameter clients and agents, but MAY be implemented by Diameter servers.
通常,Diameter客户端或代理只能可靠地检测到由于故障转移或重新发送非易失性存储中的记录而生成的副本。在这种情况下,Diameter客户端或代理可以通过设置T标志将消息标记为可能的重复。由于Diameter服务器负责重复检测,因此它可以选择是否使用T标志,以优化重复检测。由于T标志不影响互操作性,并且某些服务器可能不需要,因此Diameter客户端和代理需要生成T标志,但可以由Diameter服务器实现。
As an example, it can be usually be assumed that duplicates appear within a time window of longest recorded network partition or device fault, perhaps a day. So only records within this time window need to be looked at in the backward direction. Secondly, hashing techniques or other schemes, such as the use of the T flag in the received messages, may be used to eliminate the need to do a full search even in this set except for rare cases.
例如,通常可以假设在记录的最长网络分区或设备故障的时间窗口内(可能是一天)出现重复项。因此,只有在这个时间窗口内的记录需要反向查看。第二,可以使用散列技术或其他方案,例如在接收到的消息中使用T标志,以消除即使在该集合中进行完全搜索的需要,除了少数情况。
The following is an example of how the T flag may be used by the server to detect duplicate requests.
以下是服务器如何使用T标志来检测重复请求的示例。
A Diameter server MAY check the T flag of the received message to determine if the record is a possible duplicate. If the T flag is set in the request message, the server searches for a duplicate within a configurable duplication time window backward and forward. This limits database searching to those records where the T flag is set. In a well run network, network partitions and device faults will presumably be rare events, so this approach represents a substantial optimization of the duplicate detection process. During failover, it is possible for the original record to be received after the T flag marked record, due to differences in network delays experienced along the path by the original and duplicate transmissions. The likelihood of this occurring increases as the failover interval is decreased. In order to be able to detect out of order duplicates, the Diameter server should use backward and forward time windows when performing duplicate checking for the T flag marked request. For example, in order to allow time for the original record to exit the network and be recorded by the accounting server, the Diameter server can delay processing records with the T flag set until a time period TIME_WAIT + RECORD_PROCESSING_TIME has elapsed after the closing of the original transport connection. After this time period has expired, then it may check the T flag marked records against the database with relative assurance that the original records, if sent, have been received and recorded.
Diameter服务器可以检查所接收消息的T标志,以确定记录是否可能重复。如果在请求消息中设置了T标志,服务器将在可配置的复制时间窗口内前后搜索复制。这将数据库搜索限制为设置了T标志的记录。在运行良好的网络中,网络分区和设备故障可能很少发生,因此这种方法代表了对重复检测过程的实质性优化。在故障切换期间,由于原始传输和重复传输在路径上经历的网络延迟不同,原始记录有可能在标记有T标志的记录之后接收。随着故障切换间隔的缩短,发生这种情况的可能性增加。为了能够检测出顺序错误的重复项,Diameter服务器在对标记为T标志的请求执行重复检查时应使用向后和向前时间窗口。例如,为了让原始记录有时间退出网络并由记帐服务器记录,Diameter服务器可以延迟处理设置了T标志的记录,直到原始传输连接关闭后经过一个时间段time_WAIT+record_processing_time。在该时间段结束后,它可以根据数据库检查标记有T标志的记录,并相对保证原始记录(如果发送)已被接收和记录。
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.
IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何努力来确定任何此类权利。有关IETF在标准跟踪和标准相关文件中权利的程序信息,请参见BCP-11。可从IETF秘书处获得可供发布的权利声明副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果。
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.
IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涉及实施本标准所需技术的专有权利。请将信息发送给IETF执行董事。
Authors' Addresses
作者地址
Pat R. Calhoun Airespace, Inc. 110 Nortech Parkway San Jose, California, 95134 USA
Pat R.Calhoun Airespace,Inc.美国加利福尼亚州圣何塞诺特公园路110号,邮编95134
Phone: +1 408-635-2023 Fax: +1 408-635-2020 EMail: pcalhoun@airespace.com
Phone: +1 408-635-2023 Fax: +1 408-635-2020 EMail: pcalhoun@airespace.com
John Loughney Nokia Research Center Itamerenkatu 11-13 00180 Helsinki Finland
芬兰赫尔辛基诺基亚研究中心11-13 00180
Phone: +358 50 483 6242 EMail: john.Loughney@nokia.com
Phone: +358 50 483 6242 EMail: john.Loughney@nokia.com
Jari Arkko Ericsson 02420 Jorvas Finland
雅丽阿尔科爱立信02420 Jorvas芬兰
Phone: +358 40 5079256 EMail: Jari.Arkko@ericsson.com
Phone: +358 40 5079256 EMail: Jari.Arkko@ericsson.com
Erik Guttman Sun Microsystems, Inc. Eichhoelzelstr. 7 74915 Waibstadt Germany
埃里克·古特曼太阳微系统公司。74915德国威伯斯塔特
Phone: +49 7263 911 701 EMail: erik.guttman@sun.com
Phone: +49 7263 911 701 EMail: erik.guttman@sun.com
Glen Zorn Cisco Systems, Inc. 500 108th Avenue N.E., Suite 500 Bellevue, WA 98004 USA
格伦佐恩思科系统有限公司,地址:美国华盛顿州贝尔维尤第108大道500号,邮编:98004
Phone: +1 425 438 8218
电话:+14254388218
Full Copyright Statement
完整版权声明
Copyright (C) The Internet Society (2003). All Rights Reserved.
版权所有(C)互联网协会(2003年)。版权所有。
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。
Acknowledgement
确认
Funding for the RFC Editor function is currently provided by the Internet Society.
RFC编辑功能的资金目前由互联网协会提供。