HOME

TheInfoList



OR:

Diameter is an authentication, authorization, and accounting protocol for computer networks. It evolved from the earlier
RADIUS In classical geometry, a radius ( : radii) of a circle or sphere is any of the line segments from its center to its perimeter, and in more modern usage, it is also their length. The name comes from the latin ''radius'', meaning ray but also the ...
protocol. It belongs to the
application layer An application layer is an abstraction layer that specifies the shared communications protocols and Interface (computing), interface methods used by Host (network), hosts in a communications network. An ''application layer'' abstraction is speci ...
protocols in the
internet protocol suite The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suit ...
. ''Diameter Applications'' extend the base protocol by adding new commands and/or attributes, such as those for use with the
Extensible Authentication Protocol Extensible Authentication Protocol (EAP) is an authentication framework frequently used in network and internet connections. It is defined in , which made obsolete, and is updated by . EAP is an authentication framework for providing the transport ...
(EAP).


Comparison with RADIUS

The name is a play on words, derived from the
RADIUS In classical geometry, a radius ( : radii) of a circle or sphere is any of the line segments from its center to its perimeter, and in more modern usage, it is also their length. The name comes from the latin ''radius'', meaning ray but also the ...
protocol, which is the predecessor (a diameter is twice the radius). Diameter is not directly backward compatible but provides an upgrade path for RADIUS. The main features provided by Diameter but lacking in RADIUS are: * Support for
SCTP The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the p ...
* Capability negotiation *
Application layer An application layer is an abstraction layer that specifies the shared communications protocols and Interface (computing), interface methods used by Host (network), hosts in a communications network. An ''application layer'' abstraction is speci ...
acknowledgements; Diameter defines
failover Failover is switching to a redundant or standby computer server, system, hardware component or network upon the failure or abnormal termination of the previously active application, server, system, hardware component, or network in a computer net ...
methods and state machines (RFC 3539) * Extensibility; new commands can be defined * Aligned on 32  bit boundaries Also: Like RADIUS, it is intended to work in both local and roaming AAA situations. It uses TCP or SCTP, unlike RADIUS which uses UDP. Unlike RADIUS it includes no encryption but can be protected by transport-level security (IPSEC or TLS). The base size of the AV identifier is 32  bit unlike RADIUS which uses 8  bit as the base AV identifier size. Like RADIUS, it supports stateless as well as stateful modes. Like RADIUS, it supports application-layer acknowledgment and defines failover. Diameter is used for many different interfaces defined by the 3GPP standards, with each interface typically defining new commands and attributes.


Applications

A ''Diameter Application'' is not a
software application Software is a set of computer programs and associated documentation and data. This is in contrast to hardware, from which the system is built and which actually performs the work. At the lowest programming level, executable code consists ...
but is a
protocol Protocol may refer to: Sociology and politics * Protocol (politics), a formal agreement between nation states * Protocol (diplomacy), the etiquette of diplomacy and affairs of state * Etiquette, a code of personal behavior Science and technolog ...
based on the Diameter base protocol defined in RFC 6733 and RFC 7075 (Obsoletes: RFC 3588). Each application is defined by an application identifier and can add new command codes and/or new mandatory AVPs ( Attribute-Value Pair). Adding a new optional AVP does not require a new application. Examples of Diameter applications: * Diameter Mobile IPv4 Application (MobileIP, RFC 4004) * Diameter Network Access Server Application (NASREQ, RFC 7155)(Obsoletes: RFC 4005) * Diameter Extensible Authentication Protocol Application (RFC 4072) * Diameter Credit-Control Application (DCCA, RFC 8506])(Obsoletes: RFC 4006) * Diameter Session Initiation Protocol Application (RFC 4740) * Various applications in the 3GPP
IP Multimedia Subsystem The IP Multimedia Subsystem or IP Multimedia Core Network Subsystem (IMS) is a standardised architectural framework for delivering IP multimedia services. Historically, mobile phones have provided voice call services over a circuit-switched-styl ...
:: Both the HSS and the SLF communicate using the Diameter protocol. (Generic Bootstrapping Architecture):
Bootstrapping Server Function A Bootstrapping Server Function (BSF) is an intermediary element in Cellular networks which provides application-independent functions for mutual authentication of user equipment and servers unknown to each other and for 'bootstrapping' the excha ...


History

The Diameter protocol was initially developed by Pat R. Calhoun, Glen Zorn, and Ping Pan in 1998 to provide a framework for authentication, authorization, and accounting (
AAA AAA, Triple A, or Triple-A is a three-letter initialism or abbreviation which may refer to: Airports * Anaa Airport in French Polynesia (IATA airport code AAA) * Logan County Airport (Illinois) (FAA airport code AAA) Arts, entertainment, and me ...
) that could overcome the limitations of RADIUS. RADIUS had issues with reliability, scalability, security, and flexibility. RADIUS cannot deal effectively 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. Like RADIUS, Diameter provides AAA functionality, but uses TCP and
SCTP The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the p ...
instead of UDP, therefore delegating detection and handling of communication problems to those protocols. The Diameter protocol is enhanced further by the development of the 3rd Generation Partnership Project (3GPP)
IP Multimedia Subsystem The IP Multimedia Subsystem or IP Multimedia Core Network Subsystem (IMS) is a standardised architectural framework for delivering IP multimedia services. Historically, mobile phones have provided voice call services over a circuit-switched-styl ...
(IMS). The S6a, S6b, Gx, Gy, Sy, Rx, Cx, Dh, Dx, Rf, Ro, Sh and Zh interfaces are supported by Diameter applications. 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.


Protocol description

The Diameter base protocol is defined by RFC 6733 (Obsoletes: RFC 3588 and RFC 5719) and defines the minimum requirements for an
AAA protocol AAA refers to Authentication (to identify), Authorization (to give permission) and Accounting (to log an audit trail). It is a framework used to control and track access within a computer network. Common network protocols providing this functio ...
. ''Diameter Applications'' can extend the base protocol by adding new commands, attributes, or both. Diameter security is provided by
IPsec In computing, Internet Protocol Security (IPsec) is a secure network protocol suite that authenticates and encrypts packets of data to provide secure encrypted communication between two computers over an Internet Protocol network. It is used in ...
or TLS. The IANA has assigned TCP and
SCTP The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the p ...
port number 3868 to Diameter, as stated in section 11.4 of RFC 6733.


Packet format

The packet consists of a Diameter header and a variable number of Attribute–Value Pairs, or AVPs, for encapsulating information relevant to the Diameter message.


Version

This field indicates the version of the Diameter Base Protocol. As of 2014, the only value supported is 1.


Message length

The Message Length field indicates the length of the Diameter message in bytes, including the header fields and the padded AVPs.


Command flags

The "R" (Request) bit – If set, the message is a request. If cleared, the message is an answer. The "P" (Proxiable) bit – If set, the message MAY be proxied, relayed or redirected. If cleared, the message MUST be locally processed. The "E" (Error) bit – If set, the message contains a protocol error, and the message will not conform to the CCF described for this command. Messages with the "E" bit set are commonly referred to as error messages. This bit MUST NOT be set in request messages. The "T" (Potentially re-transmitted message) bit – 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.


Commands

Each command Request/Answer pair is assigned a command code. Whether it is the request or answer is identified via the ’R’ bit in the Command Flags field of the header. The values 0-255 are reserved for RADIUS backward compatibility. The values 256-16777213 are for permanent, standard commands allocated by
IANA The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, autonomous system number allocation, root zone management in the Domain Name System (DNS), media types, and other Interne ...
. The values 16777214 and 16777215 (hex 0xFFFFFE and 0xFFFFFF) are reserved for experimental and testing purposes. A Command Code is used to determine the action that is to be taken for a particular message. Some common Diameter commands defined in the protocol (base and applications) are:


Application-ID

Application-ID is used to identify for which Diameter application the message is applicable. The application can be an authentication application, an accounting application, or a vendor-specific application. Diameter agents conforming to a certain Diameter extension publicize its support by including a specific value of in the Auth-Application-Id Attribute of the Capabilities-Exchange-Request (CER) and Capabilities-Exchange-Answer (CEA) command. The value of the Application-ID field in the header is the same as any relevant Application-Id AVPs contained in the message. For instance, the value of the Application-ID and of the Auth-Application-Id Attribute in the Credit-Control-Request (CCR) and Credit-Control-Answer (CCA) Command for the Diameter Credit-Control Application is 4.


Hop-by-Hop Identifier

The Hop-by-Hop Identifier is an unsigned 32-bit integer field (in network byte order) that is used to match the requests with their answers as the same value in the request is used in the response. The Diameter protocol requires that relaying and proxying 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. Received answers that do not match a known Hop-by-Hop Identifier are ignored by the Diameter agent. In case of redirecting agents, the Hop-by-Hop Identifier is maintained in the header as the Diameter agent responds with an answer message.


End-to-End Identifier

The End-to-End Identifier is an unsigned 32-bit integer field (in network byte order) that is used to detect duplicate messages along with the combination of the Origin-Host AVP. When creating a request, the End-to-End Identifier is set to a locally unique value. The End-to-End Identifier is not modified by Diameter agents of any kind, and the same value in the corresponding request is used in the answer.


Attribute–Value Pairs (AVP)

For simplicity, AVP Flag "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.


State machines

The RFC 3588 defines a core state machine for maintaining connections between peers and processing messages. This is part of the basic protocol functionality and all stacks should support it and as such abstract from the connectivity related operations. File:RFC3588_peer_state_machine_1.png, Peer State Machine Part 1 File:RFC3588_peer_state_machine_2.png, Peer State Machine Part 2 Additionally, application specific state machines can be introduced either later or at a higher abstraction layer. The RFC 3588 defines an authorization and an accounting state machine. File:RFC3588_auth_state_machine_client.png, Diameter Authorization State Machines (Client) File:RFC3588_auth_state_machine_server.png, Diameter Authorization State Machines (Server) File:RFC3588_acct_state_machine_client.png, Diameter Accounting State Machines (Client) File:RFC3588_acct_state_machine_server.png, Diameter Accounting State Machines (Server)


Message flows

The communication between two diameter peers starts with the establishment of a transport connection ( TCP or
SCTP The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the p ...
). The initiator then sends a Capabilities-Exchange-Request (CER) to the other peer, which responds with a Capabilities-Exchange-Answer (CEA). For RFC3588 compliant peers TLS (Transport Layer Security) may optionally be negotiated. For RFC6733 compliant peers TLS negotiation may optionally happen before the CER/CEA. 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.


RFCs

The Diameter protocol is currently defined in the following
IETF The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and a ...
RFCs: Obsolete RFCs are indicated with
strikethrough Strikethrough is a typographical presentation of words with a horizontal line through their center, resulting in . Contrary to censored or sanitized (redacted) texts, the words remain readable. This presentation signifies one of two meanings. In ...
text.


See also

*
List of authentication protocols A ''list'' is any set of items in a row. List or lists may also refer to: People * List (surname) Organizations * List College, an undergraduate division of the Jewish Theological Seminary of America * SC Germania List, German rugby unio ...
*
Host Identity Protocol The Host Identity Protocol (HIP) is a host identification technology for use on Internet Protocol (IP) networks, such as the Internet. The Internet has two main name spaces, IP addresses and the Domain Name System. HIP separates the end-point ide ...
(HIP)


References


External links


Introduction to Diameter - Get the next generation AAA protocol



Diameter: next generation’s AAA protocol
Paper about Diameter by Håkan Ventura
Reference page listing vendors of Diameter Gateways, Diameter Signaling Controllers and Diameter Stacks
{{Authority control Internet Standards Application layer protocols Computer access control protocols Authentication protocols