The Diameter protocol was proposed by the Authentication, Authorization and Accounting (AAA) workgroup of Internet Engineering Task Force (IETF) as the next-generation IP-based AAA protocol. The Diameter protocol is evolved from the Remote Authentication Dial In User Service (RADIUS) protocol.
As 3rd Generation (3G) networks are evolving to all-IP networks, IP-capable network entities are used on core networks, IP-based technologies are used on access networks, and mobile terminals can be activated as IP clients. Therefore, Diameter, as a new AAA protocol, is introduced to the 3rd Generation Partnership Project (3GPP).
Diameter has the following functions:
Diameter has the following advantages compared with RADIUS:
A Diameter packet consists of the basic protocol information and application information. Figure 1 shows the format of a Diameter packet where Application-ID and AVPs are application information and other fields are basic protocol information.
The fields are described as follows:
Command Flags: 1 byte. This field indicates the message type.
The following bits are assigned:
Application-ID: 4 bytes. This field is used to identify the application to which a message applies. For example, the application can be an authentication application. The Application-ID field in the header must be the same as that contained in any relevant attribute-value pairs (AVPs) contained in the message.
For example, the Application IDs defined in Diameter are as follows:
A Diameter message consists of a Diameter header and AVPs. Each AVP contains an AVP header and data. Figure 2 shows the AVP header format. The fields in the AVP header are sent in network byte order.
The fields are described as follows:
VMPrrrrr: 1 byte. The VMPrrrrr field indicates the AVP flags and instructs the receiver how to handle each attribute.
The Data field is zero or more bytes 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 data types, as shown in Table 1.
Data Type |
Description |
---|---|
OctetString |
The data contains arbitrary data of variable length. Unless otherwise noted, the AVP Length field must be set to at least 8 bits (12 bits if the "V" bit is enabled). AVP values of this type that are not a multiple of four-bytes in length are followed by the necessary padding so that the next AVP (if any) will start on a 32-bit boundary. |
Integer32 |
32 bit signed value, transmitted in network byte order. The AVP Length field must be set to 12 bits (16 bits if the "V" bit is enabled). |
Integer64 |
64 bit signed value, transmitted in network byte order. The AVP Length field must be set to 16 bits (20 bits if the "V" bit is enabled). |
Unsigned32 |
32 bit unsigned value, transmitted in network byte order. The AVP Length field must be set to 12 bits (16 bits if the "V" bit is enabled). |
Unsigned64 |
64 bit unsigned value, transmitted in network byte order. The AVP Length field must be set to 16 bits (20 bits if the "V" bit is enabled). |
Float32 |
32 bit floating point value of single precision, transmitted in network byte order. The AVP Length field must be set to 12 bits (16 bits if the "V" bit is enabled). |
Float64 |
64 bit floating point value of double precision, transmitted in network byte order. The AVP Length field must be set to 16 bits (20 bits if the "V" bit is enabled). |
Grouped |
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 bits (12 bits if the "V" bit is enabled) plus the total length of all included AVPs, including their headers and padding. Therefore, the AVP Length field of a Grouped AVP is always a multiple of 4 bytes. |
Address |
A string of numbers. The Address format is derived from the OctetString AVP Base Format. The first two bytes of the Address AVP represent the AddressType. The other bytes represent the address. The AddressType is used to discriminate the content and format of the remaining bytes. For example, the AddressType in the Address AVP can represent a 32-bit (IPv4) or 128-bit (IPv6) address. The Address AVP corresponds to the IPAddress defined in the online charging protocol (OCP). |
Time |
A string of numbers. The Time format is derived from the OctetString AVP Base Format. The string must contain four bytes, in the same format as the first four bytes in the Network Time Protocol (NTP) timestamp format. This represents the number of seconds since 00:00:00 on January 1, 1900 with respect to the Coordinated Universal Time (UTC). On 06:28:16 UTC, February 7, 2036, the time value will overflow. |
UTF8String |
An OctetString using the UTF-8 transformation format. |
DiameterIdentity |
The DiameterIdentity value is used to uniquely identify a Diameter node for duplicate connection and routing loop detection. DiameterIdentity is the same as the fully qualified domain name (FQDN) of the Diameter Credit-Control (DCC) node. |
Enumerated |
An enumerated type. The definition contains a list of valid values and their interpretation and is described in the Diameter application introducing the AVP. |
A Gx interface is an application type of Diameter, which is used to implement policy control. Figure 3 shows the position of a Gx interface in the 3GPP architecture.
The PCRF formulates PCC rules based on the session information, user subscription information, and carrier policy information obtained from the AF and provides the PCC rules for the PCEF, the gateway on a packet switched network (PSN).
The PCEF is used to detect service data flows, obtains the service-based control and accounting policy from the PCRF, and implements the policy.
A Gx interface allows the communication between the PCEF and PCRF. In the 3GPP architecture, the NetEngine 8000 F implements functions of PCEF function entities and communicate with the PCRF through 3GPP-defined Diameter Gx interfaces.
Gx interface messages include CCR/CCA and RAR/RAA messages. Table 2 describes each type of Gx interface messages.
Name |
Direction |
Description |
---|---|---|
CCR (Gx Message) |
PCEF -> PCRF |
When the PCEF communicates with the PCRF, the following CCR messages are used: CCR Initial request, CCR Update request, and CCR Termination request. The PCEF uses CCR messages to report user online and offline information and the remaining traffic or service time. |
CCA (Gx Message) |
PCRF -> PCEF |
An answer to a CCR message. After the PCRF receives a CCR message carrying information about implementing or releasing a policy from the PCEF, the PCRF replies to the PCEF with a CCA message. CCA messages are used to respond to the user online and offline reports. |
RAR (Gx Message) |
PCRF -> PCEF |
The PCRF sends an RAR message to the PCEF to modify, add, or delete a value-added service policy of user services. |
RAA (Gx Message) |
PCEF -> PCRF |
After the PCEF implements the new policy carried in an RAR message sent by the PCRF, the PCEF sends an RAA message to the PCRF to report the policy update. |
The following describes message exchanges between the NetEngine 8000 F as the PCEF and the PCRF. Figure 4 shows a typical networking.
For details about Gx interfaces, see Gx Interface Protocol.
Diameter can be used in dual-device hot backup scenarios. As shown in Figure 5, if the master and slave PCEFs are connected to the same PCRF in the dual-device hot backup scenario and the master PCEF becomes faulty, services are automatically switched to the slave PCEF, ensuring Gx interaction between the PCEF and PCRF.
Figure 6 shows the interaction process in the Diameter dual-device hot backup scenario.