Introduction To The Diameter Protocol
Introduction To The Diameter Protocol
Introduction To The Diameter Protocol
Outline
Architecture
Base protocol
Cryptographic Message Syntax (CMS)
Mobile IP
Network access service (NAS)
Extensible authentication protocol (EAP)
Security Mechanism
Connection layer
Maintains the Diameter connection status machine between two peers,
providing a transmission channel for the data from upper layers.
Transaction layer
Deals with the transaction part of a Diameter message, including
maintenance of the message cache queue, the relationship between a
request message and a response message, and maintenance and
management of the hop-by-hop transaction identifier.
Session layer
Builds and maintains session status machines of authentication,
authorization, and accounting.
Application layer
Defines the structure and parameters of the Diameter message based
on a session status machine, thus satisfying the service requirements.
Failure recovery
The Diameter protocol provides a universal failure recovery method,
which supports failure confirmation at the application layer, defines the
algorithms about failure recovery, and the corresponding status
machines.
TLS
Provides a universal TLS mechanism. The Diameter requires that
IPSEC is compulsory and TLS is optional.
Supports proxies
RADIUS does not support proxies explicitly, such as a proxy server, a relay
server, and a redirecting server. Whereas the Diameter protocol support the
proxies mentioned above.
Supports transition
Since Diameter and RADIUS do not share any data protocol units, both
protocols can be used in the same network as long as one of them supports
the gateways of both RADIUS and Diameter.
Architecture
Client
Server
Relay
Architecture
Proxy
Redirect server
Translation server
Architecture
Architecture
Message Format
MessageHeaderFormat
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..
01234567
+-+-+-+-+-+-+-+-+
|R P E T r r r r|
+-+-+-+-+-+-+-+-+
R(equest): if it is set, this message is a request; if it is cleared, this
message is a response.
P(roxiable): if it is set, this message can be sent by proxy, relay, or the
redirect server; if it is cleared, this message must be processed locally.
E(rror): it indicates that the message contains a protocol error and cannot
exist in a request.
This flag avoids repeated requests after changeover. It needs to be set only
when no response is received and a request needs to be retransmited. It can
be set only in a request. When retransmitting a received message that
contains Tbit, the diameter agent must keep Tbit.
The space address of 24bit command code is managed by IANA in a universal way.
The command codes 16,777,214 and 16,777,215 are used for test.
Application-ID
It indicates the application that a message belongs to. IANA must assign an ID for
each application. Support for basic protocols is compulsory, so they do not need
application IDs. In the process of capability negotiation, the Diameter node notifies
the peer of the applications that it supports. All the diameter messages must contain
the application ID.
AVP Code
VM Prrrrr
Vendor-ID (opt)
Data..
AVP Length
AVP Length
Three bytes. Indicates AVP code, AVP flag bit, vendor ID and AVP-DATA. If
the length is not correct, the message will be refused.
Capability exchange
Capabilities-Exchange-Request (CER)
Capabilities-Exchange-Answer (CEA)
In this case, the peer might judge that the connection is interrupted
or its peer is restarted. Therefore, it tries to reconnect periodically.
This action is controlled by the TC timer. Normally it is
recommended to set to 30 seconds.
Finding out errors quickly can prevent the messages from being sent to
invalid agents, thus reducing unnecessary delays and providing better
failover performance.
When finding that the transmission to a peer failed, the system must send
the request messages to be processed to an agent.
The Diameter node must maintain the message waiting queue of the
specified peer.
The diameter node need to reconnect the failure peers periodically in order
to reestablish the connection. When the transmission resumes normal, the
messages can be resent to the peer. This is called failback.
Outline
HSS
C
Gr
Gc
gsmSCF
GMSC
MSC / VLR
SGSN
GGSN
Sh
PS Domain
Cx
IM-SSF
CSCF
SIP Application
Server
OSASCS
-
CS Domain
Si
IM CN subsystem
Abbreviation
Code
User-Authorization-Request
UAR
300
User-Authorization-Answer
UAA
300
Server-Assignment-Request
SAR
301
Server-Assignment-Answer
SAA
301
Location-Info-Request
LIR
302
Location-Info-Answer
LIA
302
Multimedia-Auth-Request
MAR
303
Multimedia-Auth-Answer
MAA
303
Registration-Termination-Request
RTR
304
Registration-Termination-Answer
RTA
304
Push-Profile-Request
PPR
305
Push-Profile-Answer
PPA
305
After the S-CSCF authenticates the user, it sends SAR to HSS for
the user archive.
HSS
Registration
Registration
UAR
UAA
Registration
MAR
MAA
401
Registration
401
401 Unauthorized
Registration
UAR
UAA
Registration
SAR
200
200
200OK
SAA
Abbreviation
Code
User-Data-Request
UDR
306
User-Data-Answer
UDA
306
Profile-Update-Request
PUR
307
Profile-Update-Answer
PUA
307
Subscribe-Notifications-Request
SNR
308
Subscribe-Notifications-Answer
SNA
308
Push-Notification-Request
PNR
309
Push-Notification-Answer
PNA
309