Escolar Documentos
Profissional Documentos
Cultura Documentos
Diameter Protocol
Issue 1.0
www.huawei.com
HUAWEI Confidential
Reference
OCP interface specification of the
HUAWEI Confidential
Objective
After the presentation, you will understand the following:
Important concepts and message structure of the
Diameter protocol
Main processes of Diameter message interaction in the
OCS system
HUAWEI Confidential
Contents
Chapter 1 Protocol Overview
Chapter 2 Message Structure
Chapter 3 Common Command
Examples
Chapter 4 Basic Processes
Chapter 5 Code Stream Parsing
HUAWEI Confidential
Protocol Overview
The Diameter protocol is developed as an improvement or a replacement of
the Radius protocol. The purpose is to support the IP-based authentication,
authorization, and accounting (AAA) protocol.
- Authentication: The authentication network system validates the user
identity when a user uses the resources of the network system.
- Accounting: The accounting network system collects and records the
information about the resource usage. The purpose is to collect the fee for
using the resources from users or to audit data.
- Authorization: The authorization network system authorizes users to use
resources in certain ways.
The authentication, authorization, and accounting network systems work
together to record the network resource usage of specified users. The AAA
ensures the lawful rights and interests of users and the secure and reliable
running of the network systems.
The Diameter protocol processes the convergent charging of prepaid and
postpaid subscribers, that is, the convergent charging of real-time charging and
CDR charging.
HUAWEI TECHNOLOGIES CO., LTD.
HUAWEI Confidential
Protocol Overview
Compared with the Radius protocol, the Diameter protocol
has the following advantages:
Having excellent failure processing mechanism and
supporting failover and failback
Having excellent mechanism for processing packet loss
by confirming every message
Ensuring the completeness and confidentiality of data
Supporting end-to-end security, TLS, and IPSec
Having the capability of capability negotiation
HUAWEI TECHNOLOGIES CO., LTD.
HUAWEI Confidential
Protocol Overview
Diameter basic protocol and application protocol
The Diameter basic protocol provides a frame that is secure, reliable,
and easy to extend for various authentication, authorization, and
accounting services. To implement certain access or application
services, only the following information about the DCC protocol needs to
be defined:
- Application ID of the application protocol
- Network entities that are involved in communications
- Contents of the messages that are sent between functional entities
communicating with each other
- Protocol process
The Diameter Credit Control Application that is extended based on the
Diameter basic protocol defines the charging mechanism for prepaid
subscribers and uses credit control to implement the charging based on
sessions and transactions. Therefore, the requirement for charging
prepaid subscribers is met.
HUAWEI TECHNOLOGIES CO., LTD.
HUAWEI Confidential
Contents
Chapter 1 Protocol Overview
Chapter 2 Message Structure
Chapter 3 Common Command
Examples
Chapter 4 Basic Processes
Chapter 5 Code Stream Parsing
HUAWEI Confidential
Contents
Chapter 2 Message Structure
2.1 Message Head
2.2 Message Body
HUAWEI Confidential
Message
Head
Version: Set to 1.
Message Length: Set to the length of a message including the message head.
R: Set to 1 for a request message; set to 0 for a response message.
P: Whether a message can be forwarded. In the case of the command word CER, DPR or DWR,
the message cannot be forwarded.
E: Set to 0 if a message is a response message and the message shows certain error
information.
T: Whether a message is a resent message.
Command-Code: Message command word. The command word of a response message is the
same as the command word of a request message. The basic command words in the Diameter
protocol are CER\CEA(257), DWR\DWA(280), and DPR\DPA(282). The command word in the
Diameter application protocol is CCR\CCA 272 .
Application-ID: Application ID related to a message. For example, the Application-IDs defined in
the Diameter basic protocol are Diameter Common Messages(0), NASREQ(1), Mobile-IP(2),
Diameter Base Accounting(3), and Relay (0xffffffff).
Hop-by-Hop, End-to-End: See the description in the message route section in this presentation.
HUAWEI TECHNOLOGIES CO., LTD.
HUAWEI Confidential
Message
Body
AVP is used as the unit of the Diameter message body. Each AVP takes a
specific value of a message parameter.
AVP Code: Code of an AVP. For example, the value of the AVP Code field of
Original-Host AVP is 264.
V: Whether the AVP head contains the Vendor-ID field.
M: Whether an AVP is a mandatory AVP. For a special Diameter command,
certain AVPs are mandatory. For example, the Original-Host AVP and OriginalRealm AVP are mandatory for any Diameter message.
P: Whether the data of an AVP is encrypted.
AVP Length: Length of the data of an AVP. The length of the AVP data must be
an integer multiple of four. If the length is not an integer multiple of four, fill \0.
Vendor-ID: Vendor ID of the device that generates the AVP. The vendor ID
assigned by IANA for Huawei is 2011.
Data: Specific data that is recorded. The type of the data is determined by AVP
Code.
HUAWEI TECHNOLOGIES CO., LTD.
HUAWEI Confidential
Contents
Chapter 1 Protocol Overview
Chapter 2 Message Structure
Chapter 3 Common Command
Examples
Chapter 4 Basic Processes
Chapter 5 Code Stream Parsing
HUAWEI Confidential
Contents
Chapter 3 Common Command
Examples
3.1 CER and CEA
3.2 DWR and DWA
3.3 CCR and CCA
HUAWEI Confidential
The Capabilities-Exchange-Request (CER), indicated by the CommandCode set to 257 and the Command Flags R bit set, is sent to
exchange local capabilities. On detection of a transport failure,
this message must not be sent to an alternate peer.
HUAWEI TECHNOLOGIES CO., LTD.
HUAWEI Confidential
HUAWEI Confidential
Device-Watchdog-Request
<DWR> ::= < Diameter Header:
280, REQ >
{ Origin-Host }
{ Origin-Realm }
[ Origin-State-Id ]
HUAWEI Confidential
Device-Watchdog-Answer
<DWA> ::= < Diameter Header: 280 >
{ Result-Code }
{ Origin-Host }
{ Origin-Realm }
[ Error-Message ]
* [ Failed-AVP ]
[ Original-State-Id ]
HUAWEI Confidential
HUAWEI Confidential
HUAWEI Confidential
Contents
Chapter 1 Protocol Overview
Chapter 2 Message Structure
Chapter 3 Common Command
Examples
Chapter 4 Basic Processes
Chapter 5 Code Stream Parsing
HUAWEI Confidential
Contents
Chapter 4 Basic Processes
4.1 Voice Process
4.2 Data Service Process
HUAWEI Confidential
HUAWEI Confidential
1. The SCP receives the IDP message. The SCP determines whether to charge in real
time and whether to send the ATI message to the HLR to obtain the location information
about the called party, such as Free Roaming to Same City and Cell Preference. The SCP
translates the short number and determines whether the call is an inter-network call or an
intra-network call.
2. The SCP sends the corresponding information and result to the CBP through
CCR{Initial,RSU(CC-time),Service-ID,IMSI,ETB,Subscription-Id,Location} for
authentication and charging.
3. According to the information sent by the SCP, the OCS performs account
authentication, rating, reverse calculation, and reservation. In addition, the OCS sends the
available duration to the SCP through CCA{Initial,RC=Success,GSU(300S)}.
4. The SCP sends the AC message to the MSC/SSP. The MSC/SSP monitors the call.
5. The SCP receives the ACR sent by MSC/SSP, and then sends
CCR{Update,USU(300S)} to the OCS for reporting the used time.
6. The OCS performs the tasks of reverse calculation and reservation based on the
reported CCR sent and sends the available duration to the SCP through
CCA{Update,RC=Success,GSU(300 seconds)}.
7. When the call ends, the SCP receives the ACR sent by the MSC/SSP, and then sends
CCR{Final,USU()} to the OCS for reporting the used time.
8. The OCS deducts the fee according to the reported CCR and returns the CCA
(Final,RC=Success) to the SCP.
HUAWEI TECHNOLOGIES CO., LTD.
HUAWEI Confidential
HUAWEI Confidential
1. The service engine sends the AuthPrice service authentication request to the
ISMP.
2. The ISMP authenticates the service.
3. The ISMP sends the CCR message (CCR = Event-Request; RA = DirectDebiting) to the OCS.
4. The OCS receives the CCR request and performs the rating and fee
deduction.
5. The OCS returns the CCA message to the ISMP.
6. The ISMP sends the AuthPriceRsp to the service engine according to the CCA
message returned by the OCS.
7. The service engine delivers the service. If the delivery is successful, the
process ends. Otherwise, the service engine delivers the AuthPirceCnfm to the
ISMP.
8. The ISMP delivers the CCR refund request (CCR = Event-Request; RA =
Refund) to the OCS.
9. The OCS receives the refund request and performs rating and refund.
10. The OCS returns the refund response message to the ISMP.
11. The ISMP sends the AuthPriceCnfm to the OCS.
HUAWEI Confidential
Contents
Chapter 1 Protocol Overview
Chapter 2 Message Structure
Chapter 3 Common Command
Examples
Chapter 4 Basic Processes
Chapter 5 Code Stream Parsing
HUAWEI Confidential
Contents
Chapter 5 Code Stream Parsing
5.1 CCR Code Stream Parsing
5.2 CCA Code Stream Parsing
HUAWEI Confidential
HUAWEI Confidential
HUAWEI Confidential
HUAWEI Confidential
avp code
avp flag
avp length
Vendor-id
data
->'05312856000'
[00 00 01 BC]
[40]
[00 00 13]->19
null
[30 35 33 31 32 38 35 36 30 30 30]
HUAWEI Confidential
1xxx (Informational)
2xxx (Success)
3xxx (Protocol Errors)
4xxx (Transient Failures
5xxx (Permanent Failure)
DIAMETER_SUCCESS
2001
HUAWEI Confidential
Questions
HUAWEI Confidential
Thank you!
www.huawei.com
HUAWEI Confidential