upper protocol ——DIAMETER

Diameter (protocol)

Diameter is a computer networking protocol for AAA (authentication, authorization and accounting). It is a successor to RADIUS .

Content

 

Upgrade from RADIUS

The name is a pun on the RADIUS protocol, which is the predecessor (a diameter is twice the radius). Diameter is not directly backwards compatible , but provides an upgrade path for RADIUS. The main differences are as follows:

  • Reliable transport protocols (TCP or SCTP , not UDP )
  • Network or transport layer security (IPsec or TLS )
  • Transition support for RADIUS , although Diameter is not fully compatible with RADIUS
  • Larger address space for attribute-value pairs (AVPs) and identifiers (32 bits instead of 8 bits)
  • Client-server protocol, with exception of supporting some server-initiated messages as well
  • Both stateful and stateless models can be used
  • Dynamic discovery of peers (using DNS SRV and NAPTR )
  • Capability negotiation
  • Supports application layer acknowledgements, defines failover methods and state machines (RFC 3539 )
  • Error notification
  • Better roaming support
  • More easily extended; new commands and attributes can be defined
  • Aligned on 32-bit boundaries
  • Basic support for user-sessions and accounting

Protocol description

The Diameter base protocol is defined by RFC 3588 , and defines the minimum requirements for an AAA protocol. Diameter Applications can extend the base protocol, by adding new commands and/or attributes. Diameter security is provided by IPSEC or TLS , both well-regarded protocols. The IANA has assigned TCP and SCTP port number 3868 to Diameter.

Packet format

DIAMETER packet format.png

Commands

Each command is assigned a command code, which is used for both Requests and Answers.

Command-Name  ↓ Abbr.  ↓ Code  ↓
AA-RequestAAR265
AA-AnswerAAA265
Diameter-EAP-RequestDER268
Diameter-EAP-AnswerDEA268
Abort-Session-RequestASR274
Abort-Session-AnswerASA274
Accounting-RequestACR271
Accounting-AnswerACA271
Credit-Control-Request CCR272
Credit-Control-Answer CCA272
Capabilities-Exchange-RequestCER257
Capabilities-Exchange-AnswerCEA257
Device-Watchdog-RequestDWR280
Device-Watchdog-AnswerDWA280
Disconnect-Peer-RequestDPR282
Disconnect-Peer-AnswerDPA282
Re-Auth-RequestRAR258
Re-Auth-AnswerRAA258
Session-Termination-RequestSTR275
Session-Termination-AnswerSTA275
User-Authorization-RequestUAR300
User-Authorization-AnswerUAA300
Server-Assignment-RequestSAR301
Server-Assignment-AnswerSAA301
Location-Info-RequestLIR302
Location-Info-AnswerLIA302
Multimedia-Auth-RequestMAR303
Multimedia-Auth-AnswerMAA303
Registration-Termination-RequestRTR304
Registration-Termination-AnswerRTA304
Push-Profile-RequestPPR305
Push-Profile-AnswerPPA305
User-Data-RequestUDR306
User-Data-AnswerUDA306
Profile-Update-RequestPUR307
Profile-Update-AnswerPUA307
Subscribe-Notifications-RequestSNR308
Subscribe-Notifications-AnswerSNA308
Push-Notification-RequestPNR309
Push-Notification-AnswerPNA309
Bootstrapping-Info-RequestBIR310
Bootstrapping-Info-AnswerBIA310
Message-Process-RequestMPR311
Message-Process-AnswerMPA311l;l;

Attribute-Value Pairs (AVP)

DIAMETER AVP Layout.png

For simplicity, 'V' Bit Means Vendor Specific ; 'M' Bit means Mandatory ; 'P' Bit means Protected .

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.

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.

The 'P' bit indicates the need for encryption for end-to-end security.

Attribute-NameCodeData Type
Acct-Interim-Interval85Unsigned32
Accounting-Realtime-Required483Enumerated
Acct-Multi-Session-Id50UTF8String
Accounting-Record-Number485Unsigned32
Accounting-Record-Type480Enumerated
Accounting-Session-Id44OctetString
Accounting-Sub-Session-Id287Unsigned64
Acct-Application-Id259Unsigned32
Auth-Application-Id258Unsigned32
Auth-Request-Type274Enumerated
Authorization-Lifetime291Unsigned32
Auth-Grace-Period276Unsigned32
Auth-Session-State277Enumerated
Re-Auth-Request-Type285Enumerated
Class25OctetString
Destination-Host293DiamIdent
Destination-Realm283DiamIdent
Disconnect-Cause273Enumerated
E2E-Sequence300Grouped
Error-Message281UTF8String
Error-Reporting-Host294DiamIdent
Event-Timestamp55Time
Experimental-Result297Grouped
Experimental-Result-Code298Unsigned32
Failed-AVP279Grouped
Firmware-Revision267Unsigned32
Host-IP-Address257Address
Inband-Security-Id299Unsigned32
Multi-Round-Time-Out272Unsigned32
Origin-Host264DiamIdent
Origin-Realm296DiamIdent
Origin-State-Id278Unsigned32
Product-Name269UTF8String
Proxy-Host280DiamIdent
Proxy-Info284Grouped
Proxy-State33OctetString
Redirect-Host292DiamURI
Redirect-Host-Usage261Enumerated
Redirect-Max-Cache-Time262Unsigned32
Result-Code268Unsigned32
Route-Record282DiamIdent
Session-Id263UTF8String
Session-Timeout27Unsigned32
Session-Binding270Unsigned32
Session-Server-Failover271Enumerated
Supported-Vendor-Id265Unsigned32
Termination-Cause295Enumerated
User-Name1UTF8String
Vendor-Id266Unsigned32
Vendor-Specific-Application-Id260Grouped

State machines

Message flows

The communication between two diameter peers starts the establishment of a transport connection (TCP or SCTP). The initiator then sends a capabilities-Exchange-Request (CER) to the other peer, which responds with a Capabilities-Exchange-Answer (CEA). After that, TLS may be negotiated. (not shown in diagram)

The connection is then ready for exchanging application messages.

If no messages have been exchanged for some time either side may send a Device-Watchdog-Request (DWR) and the other peer must respond with Device-Watchdog-Answer.

Either side may terminate the communication by sending a Disconnect-Peer-Request (DPR) which the other peer must respond to with Disconnect-Peer-Answer. After that the transport connection can be disconnected.

Applications

A Diameter Application is not a software application , but a protocol based on the Diameter base protocol (defined in RFC 3588 ). Each application is defined by an application identifier and can add new command codes and/or new mandatory AVPs. Adding a new optional AVP does not require a new application.

Examples of Diameter applications :

Both the HSS and the SLF communicate using the Diameter protocol.

(Generic Bootstrapping Architecture): Bootstrapping Server Function

History

The Diameter protocol was initially developed by Pat R. Calhoun, Glen Zorn and Ping Pan in 1998 to provide a Authentication, Authorization, and Accounting (AAA) framework that could overcome the limitations of RADIUS. RADIUS had issues with reliability, scalability, security and flexibility. RADIUS cannot effectively deal well with remote access, IP mobility and policy control. The Diameter protocol defines a policy protocol used by clients to perform Policy, AAA and Resource Control. This allows a single server to handle policies for many services.[ 1]

Like RADIUS, Diameter provides AAA functionality, but in addition it is made more reliable by using TCP and SCTP instead of UDP . The Diameter protocol further enhanced by the development of the 3rd Generation Partnership Project (3GPP) IP Multimedia Subsystem (IMS). The Cx, Dh, Dx, Rf, Ro, and Sh interfaces are supported by Diameter applications.[ 2] Through the use of extensions, the protocol was designed to be extensible to support Proxies, Brokers, Strong Security, Mobile-IP, Network Access Servers (NASREQ), Accounting and Resource Management.

RFCs

The Diameter protocol is currently defined in the following IETF RFCs: Obsolete RFCs are indicated with strikethrough text.

#TitleDate publishedRelated articleObsoleted byNotes
RFC 3588 Diameter Base Protocol.September 2003.Diameter   
RFC 3589 Diameter Command Codes for Third Generation Partnership Project (3GPP) Release 5.September 2003.   
RFC 4004 Diameter Mobile IPv4 Application.August 2005.   
RFC 4005 Diameter Network Access Server ApplicationAugust 2005.   
RFC 4006 Diameter Credit-Control Application.August 2005.Diameter Credit-Control Application   
RFC 4072 Diameter Extensible Authentication Protocol (EAP) Application.August 2005.   
RFC 4740 Diameter Session Initiation Protocol (SIP) Application. M.November 2006.   
RFC 5224 Diameter Policy Processing Application.March 2008.   
RFC 5431 Diameter ITU-T Rw Policy Enforcement Interface Application.March 2009.   
RFC 5447 Diameter Mobile IPv6: Support for Network Access Server to Diameter Server Interaction.February 2009.   
RFC 5516 Diameter Command Code Registration for the Third Generation Partnership Project (3GPP) Evolved Packet System (EPS).April 2009.   

See also

References

External links

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值