You are on page 1of 14

Tng quan v Gx

1. Tng quan protocol


1.1.nh ngha DCC Protocol
Diameter Credit Control (DCC) protocol l 1 giao thc ng dng pht trin t
Diameter protocol. DCC protocol l 1 gii php tng th iu khin tnh ton chi
ph v tn dng thi gian thc.
1.2.nh dng ca giao thc DCC
1.2.1. nh dng header
Hnh bn di m t nh dng ca message header :

Cc trng c m t hnh trn :
- Version : Phin bn ca diameter . di l 1 byte
- Message Length : di ca bn tin . di ca Message Length l 3 byte
- Command Flags : ch ra kiu message ( Vi cc c R, P, E, T). di 1 byte
- Command Code : Ch ra m lnh lin quan n bn tin . di ca Command Code
l 3 byte
- Application Id : Application Id ca message . Vi Gx l 16777238. di l 4 byte
- Hop-by-Hop Identifier : dng match gia resquest v response. di l 4 byte
- End-to-End Identifier : Pht hin cc bn tin lp li . di 4 byte
1.2.2. Danh sch cc bn tin
Cc bn tin h tr trong Gx :
Command-Name Abbreviation Code Section
Credit-Control-Request CCR 272
Credit-Control-Answer CCA 272
Capabilities-Exchange-Request CER 257
Capabilities-Exchange-Answer CEA 257
Re-Auth-Request RAR 258
Re-Auth-Answer RAA 258



1.2.3. Format ca AVP Header
Avp Header c m t theo hnh di

Cc trng m t trn hnh trn bao gm :
- AVP Code : M ca AVP
- VMPrrrrr : Flag ca AVP ( V, M, P) . di 1 byte
- AVP Length : Th hin di ca AVP . di 3 byte
- Vender id : di 4 byte
2. Cc nh ngha trong Gx
2.1.Tng quan
im tham chiu Gx nm gia PCRF v PCEF . Gx dng khai bo v xa b cc PCC
Rule t PCRF ti PCEF v cc s kin truyn dn t PCEF ti PCRF. Gx dng iu
khin chnh sch v iu khin tnh cc hoc c hai bng cch s dng cc AVP lin
quan.
2.2.M hnh Gx
Hnh di m t kin trc PCRF.

2.3.PCC Rule
2.3.1. nh ngha PCC Rule
Mc ch ca PCC Rule :
- Pht hin 1 gi tin thuc vo 1 service data flow
- Xc nh cc dch v m service data flow xy dng
- Cung cp cc tham s charging
- Cung cp cc tham s iu khin
PCEF s la chn PCC Rule cho mi gi tin nhn c bng cch nh gi gi tin da vo
service data flow filter v u tin ca cc PCC Rule
C 2 kiu PCC Rule :
- Dynamic PCC Rule . Dynamic PCC c khai bo bi PCRF ti PCEF qua giao din
Gx. Dynamic PCC Rule c th ci t, thay i hoc xa b bt c lc no
- Predefined PCC Rule c nh ngha sn trong PCEF. Predefined PCC Rule c th
c active hoc deactive thng qua Gx. C th active hoc deactive 1 nhm
Predefine PCC Rule
Mt PCC Rule bao gm :
- Tn PCC Rule : nh ngha tn ca PCC Rule
- Service Identify : Xc nh service hoc service component
- Service data flow filter :
- Precedence
- QoS
- Charging Key
- Monitoring key
2.3.2. Cc thao tc vi PCC Rule
Vi Dynamic PCC Rule :
- Installation : Khai bo 1 PCC Rule .
- Modification : Thay i 1 PCC Rule
- Removal : Xa 1 PCC Rule
Vi Predefined PCC Rule :
- Activation : Cho php 1 PCC Rule active
- Deactivation : Khng cho php 1 PCC Rule active
2.4.Functional elements
2.4.1. PCRF
PCRF a ra cc quyt nh iu khin . Cc quyt nh ny c a ra da vo 1
trong cc yu t sau :
- Thng tin cha trong PCEF thng qua Gx
- Thng tin cha trong SPR thng qua Sp
- Thng tin c nh ngha sn trong PCRF
2.4.2. PCEF
PCEF thc thi cc chnh sch nhn c t PCRF

3. nh ngha Interface
3.1.Message Definition
3.1.1. CCR
Lnh CCR, vi command-code =272 , v bit R set, c gi t PCEF ti PCRF,
request PCC rule .CCR cng c th dng gi request xung PCRF kt thc IP-
CAN hoc session.
Format ca CCR :
<CC-Request> ::= < Diameter Header: 272, REQ, PXY >
< Session-Id >
{ Auth-Application-Id }
{ Origin-Host }
{ Origin-Realm }
{ Destination-Realm }
{ CC-Request-Type }
{ CC-Request-Number }
[ Destination-Host ]
[ Origin-State-Id ]
*[ Subscription-Id ]
*[ Supported-Features ]
[ Network-Request-Support ]
*[ Packet-Filter-Information ]
[ Packet-Filter-Operation ]
[ Bearer-Identifier ]
[ Bearer-Operation ]
[ Framed-IP-Address ]
[ Framed-IPv6-Prefix ]
[ IP-CAN-Type ]
[ 3GPP-RAT-Type ]
[ RAT-Type ]
[ Termination-Cause ]
[ User-Equipment-Info ]
[ QoS-Information ]
[ QoS-Negotiation ]
[ QoS-Upgrade ]
[ Default-EPS-Bearer-QoS ]
0*2[ AN-GW-Address ]
[ 3GPP-SGSN-MCC-MNC ]
[ 3GPP-SGSN-Address ]
[ 3GPP-SGSN-IPv6-Address ]
[ RAI ]
[ 3GPP-User-Location-Info]
[ 3GPP-MS-TimeZone ]
[ Called-Station-Id ]
[ PDN-Connection-ID ]
[ Bearer-Usage ]
[ Online ]
[ Offline ]
*[ TFT-Packet-Filter-Information ]
*[ Charging-Rule-Report]
*[ Event-Trigger]
[ Event-Report-Indication]
[ Access-Network-Charging-Address ]
*[ Access-Network-Charging-Identifier-Gx ]
*[ CoA-Information ]
*[ Usage-Monitoring-Information ]
*[ Proxy-Info ]
*[ Route-Record ]
*[ AVP ]
2.1.2. CCA
Lnh CCA vi Command-Code = 272, c gi t PCRF ti PCEF cung cp PCC
rule v event-trigger cho session . Format ca CCR :
<CC-Answer> ::= < Diameter Header: 272, PXY >
< Session-Id >
{ Auth-Application-Id }
{ Origin-Host }
{ Origin-Realm }
[ Result-Code ]
[ Experimental-Result ]
{ CC-Request-Type }
{ CC-Request-Number }
*[ Supported-Features ]
[ Bearer-Control-Mode ]
*[ Event-Trigger ]
[ Event-Report-Indication ]
[ Origin-State-Id ]
*[ Redirect-Host ]
[ Redirect-Host-Usage ]
[ Redirect-Max-Cache-Time ]
*[ Charging-Rule-Remove ]
*[ Charging-Rule-Install ]
[ Charging-Information ]
[ Online ]
[ Offline ]
*[ QoS-Information ]
[ Revalidation-Time ]
[ Default-EPS-Bearer-QoS ]
[ Bearer-Usage ]
*[ Usage-Monitoring-Information ]
*[ CSG-Information-Reporting ]
[ User-CSG-Information ]
[ Error-Message ]
[ Error-Reporting-Host ]
*[ Failed-AVP ]
*[ Proxy-Info ]
*[ Route-Record ]
*[ AVP ]
2.1.3. Re-Auth-Request (RAR)
Lnh RAR, vi command code l 258, v R bit set, c gi t PCRF ti PCEF, cung
cp PCC rule s dng cch PUSH. N dng cung cp PCC rule, event-trigger v event
report. Format ca RAR :
<RA-Request> ::= < Diameter Header: 258, REQ, PXY >
< Session-Id >
{ Auth-Application-Id }
{ Origin-Host }
{ Origin-Realm }
{ Destination-Realm }
{ Destination-Host }
{ Re-Auth-Request-Type }
[ Session-Release-Cause ]
[ Origin-State-Id ]
*[ Event-Trigger ]
[ Event-Report-Indication ]
*[ Charging-Rule-Remove ]
*[ Charging-Rule-Install ]
[ Default-EPS-Bearer-QoS ]
*[ QoS-Information ]
[ Revalidation-Time ]
*[ Usage-Monitoring-Information ]
*[ Proxy-Info ]
*[ Route-Record ]
*[ AVP]
2.1.4. Re-Auth-Answer (RAA)
Lnh RAA, command code = 258, gi t PCEF ti PCRF tr li cho lnh RAR.
<RA-Answer> ::= < Diameter Header: 258, PXY >
< Session-Id >
{ Origin-Host }
{ Origin-Realm }
[ Result-Code ]
[ Experimental-Result ]
[ Origin-State-Id ]
[ IP-CAN-Type ]
[ RAT-Type ]
0*2[ AN-GW-Address ]
[ 3GPP-SGSN-MCC-MNC ]
[ 3GPP-SGSN-Address ]
[ 3GPP-SGSN-IPv6-Address ]
[ RAI ]
[ 3GPP-User-Location-Info ]
[ 3GPP-MS-TimeZone ]
*[ Charging-Rule-Report]
[ Error-Message ]


[ Error-Reporting-Host ]
*[ Failed-AVP ]
*[ Proxy-Info ]
*[ AVP ]



3.2.nh ngha AVP
AVP dng nh 1 n v ca Diameter message body. 1 AVP bao gm header, data. 1
AVP group c th xem l 1 tp hp cc AVP .
3.2.1. Session-id AVP ( code : 263, type : UTF8String)
Dng nh ngha 1 session id , l duy nht trong l process
Format :
<DiameterIdentity>;<high 32 bits>;<low 32 bits>[;<optional value>]
- <DiameterIdentity>: = Origin-Host AVP
- <high 32 bits>: thi gian hin ti ca h thng
- <low 32 bits>: bin m
3.2.2. Origin-host AVP (code : 264, type : DiameterIdentity)
3.2.3. Origin-realm AVP (code : 296, type : DiameterIdentity)
3.2.4. Destination -host AVP(code : 293, type : DiameterIdentity)
3.2.5. Destination realm AVP( code : 283, type : DiameterIdentity)
3.2.6. Auth-Application-Id AVP( code : 258, type : Unsigned32)
Ch ra ID duy nht re-authentication hoc re-authorization.Vi Gx, Auth-
Application-Id =16777238;
3.2.7. CC-Request-Type AVP( code: 416,type : Enumerated)
Ch ra l do gi bn tin CCR. Trng AVP ny bt buc phi c trong CCR message
- 1 : INITIAL_REQUEST -Khi to session
- 2 : UPDATE_REQUEST Cp nht session
- 3 : TERMINATION_REQUEST Hy session
3.2.8. CC-Request-Number AVP ( code : 415, type : Unsigned32)
Ch ra identity ca 1 request trong 1 session
3.2.9. Origin-state-id (code : 278, type : Unsign32)
Ch ra origin status ID gi bi DCC client ti server. Gi tr ca AVP ny tng dn.
3.2.10. Subscription-Id AVP ( code : 443, type : Grouped)
Ch ra thng tin ca ngi dng cui . Format ca AVP ny :
*Subscription-Id ::= <AVP Header: 443>
{Subscription-Id-Type}
{Subscription-Id-Data}
3.2.11. Subscription-Id-Type (code : 450, type : Enumerated)
Ch ra kiu ca id ngi dng cui :
- 0: END_USER_E164
- 1: END_USER_IMSI
- 2: END_USER_SIP_URI
- 3: END_USER_NAI
- 4: END_USER_PRIVATE
3.2.12. Subscription-Id-Data AVP (code : 444, type : UTF8String)
Ch ra s ca ngi dng
3.2.13. Bearer-Usage AVP (code : 1000, type : Enumerated)
Ch ra cch bearer c s dng , c nh ngha nh sau :
- GENERAL (0) : khng bearer c th no c s dng
- IMS_SIGNALLING (1) : Ch ra bearer c s dng cho tn hiu IMS.
3.2.14. Charging-Rule-Install AVP ( code : 1001, type : grouped)
Dng active , install hoc modifier PCC rule quy nh t PCRF ti PCEF
install 1 PCC rule mi hoc thay i 1 PCC rule, s dng Charging-Rule-
Definition AVP.
active 1 PCC rule c nh ngha sn trn PCEF, s dng Charging-Rule-Name
AVP. active 1 group, s dng The Charging-Rule-Base-Name AVP.
AVP format :
Charging-Rule-Install ::= < AVP Header: 1001 >
*[ Charging-Rule-Definition ]
*[ Charging-Rule-Name ]
*[ Charging-Rule-Base-Name ]
[ Bearer-Identifier ]
[ Rule-Activation-Time ]
[ Rule-Deactivation-Time ]
[ Resource-Allocation-Notification ]
[ Charging-Correlation-Indicator ]
*[ AVP ]

3.2.15. Charging-Rule-Remove AVP ( code : 1002, type : Grouped)
Dng deactive hoc remove PCC Rule t 1 IP CAN session
AVP format :
Charging-Rule-Remove ::= < AVP Header: 1002 >
*[ Charging-Rule-Name ]
*[ Charging-Rule-Base-Name ]
*[ AVP ]

3.2.16. Charging-Rule-Definition AVP ( code 1003, type : Grouped)
Dng nh ngha 1 PCC rule cho 1 service flow t PCRF ti PCEF. Charging-
Rule-Name AVP l duy nht xc nh 1 PCC rule v dng tham chiu t PCRF ti
PCEF.
Format :
Charging-Rule-Definition ::= < AVP Header: 1003 >
{ Charging-Rule-Name }
[ Service-Identifier ]
[ Rating-Group ]
*[ Flow-Information ]
[ Flow-Status ]
[ QoS-Information ]
[ Reporting-Level ]
[ Online ]
[ Offline ]
[ Metering-Method ]
[ Precedence ]
[ AF-Charging-Identifier ]
*[ Flows ]
[ Monitoring-Key]
[ AF-Signalling-Protocol ]
*[ AVP ]


3.2.17. Charging-Rule-Base-Name AVP ( code : 1004, type : UTF8String)
Ch ra tn ca group PCC rule c nh ngha sn trn PCEF
3.2.18. Charging-Rule-Name AVP ( code : 1005, type OctetString)
nh ngha tn ca PCC rule
3.2.19. Event-Trigger AVP (code : 1006, type: Enumerated)
Khi gi t PCRF ti PCEF, event-trigger ch ra 1 event s gy ra 1 re-request. Khi
gi t PCEF ti PCRF, n ch ra s kin tng ng xy ra ti gateway. ( tr trng
hp NO_EVENT_TRIGGERS )
Cc event c nh ngha sn :
- SGSN_CHANGE (0)
- QOS_CHANGE (1)
- RAT_CHANGE (2)
- TFT_CHANGE (3)
- PLMN_CHANGE (4)
- LOSS_OF_BEARER (5)
- RECOVERY_OF_BEARER (6)
- IP-CAN_CHANGE (7)
- QOS_CHANGE_EXCEEDING_AUTHORIZATION (11)
- RAI_CHANGE (12)
- USER_LOCATION_CHANGE (13)
- NO_EVENT_TRIGGERS (14)
- OUT_OF_CREDIT (15)
- REALLOCATION_OF_CREDIT (16)
- REVALIDATION_TIMEOUT (17)
- UE_IP_ADDRESS_ALLOCATE (18)
- UE_IP_ADDRESS_RELEASE (19)
- DEFAULT_EPS_BEARER_QOS_CHANGE (20)
- AN_GW_CHANGE (21)
- SUCCESSFUL_RESOURCE_ALLOCATION (22)
- RESOURCE_MODIFICATION_REQUEST (23)
- PGW_TRACE_CONTROL (24)
- UE_TIME_ZONE_CHANGE (25)
- TAI_CHANGE (26)
- ECGI_CHANGE (27)
- CHARGING_CORRELATION_EXCHANGE (28)
- APN-AMBR_MODIFICATION_FAILURE (29)
- USER_CSG_INFORMATION_CHANGE (30)
- USAGE_REPORT (33)
- DEFAULT-EPS-BEARER-QOS_MODIFICATION_FAILURE (34)
- USER_CSG_HYBRID_SUBSCRIBED_INFORMATION_CHANGE (35)
- USER_CSG_ HYBRID_UNSUBSCRIBED_INFORMATION_CHANGE (36)

3.2.20. Metering-Method AVP (code : 1007, type : Enumerated)
nh ngha tham s no c tnh ton :
- DURATION (0)
- VOLUME (1)
- DURATION_VOLUME (2)
3.2.21. Offline AVP ( code : 1008, type : Enumerated )
Ch ra liu Offline Charging Interface t PCEF lin kt vi PCC Rule c c
enabled :
- DISABLE_OFFLINE (0)
- ENABLE_OFFLINE (1)

3.2.22. Online AVP (code : 1009, type: Enumerated)
Tng t Offline AVP
3.2.23. Precedence AVP ( code 1010, type : Unsigned32)
Trong Charging Rule Definition AVP , Precedence AVP xc nh xem PCC rule no
c p dng .
3.2.24. QoS-Information AVP ( code : 1016, type : Grouped)
nh ngha thng tin v QoS , c request bi UE, IPCAN bearer, PCC rule, QCI
hay APN . Khi AVP ny c gi t PCRF ti PCEF, n ch ra QoS c s dng
cho :
- IP CAN bearer
- 1 service flow ( khi cha trong PCC rule)
- 1 QCI,
- 1 APN
QoS-Information ::= < AVP Header: 1016 >
[ QoS-Class-Identifier ]
[ Max-Requested-Bandwidth-UL ]
[ Max-Requested-Bandwidth-DL ]
[ Guaranteed-Bitrate-UL ]
[ Guaranteed-Bitrate-DL ]
[ Bearer-Identifier ]
[ Allocation-Retention-Priority ]
[ APN-Aggregate-Max-Bitrate-UL ]
[ APN-Aggregate-Max-Bitrate-DL ]
* [ AVP ]

3.2.25. QoS-Class-Identifier AVP ( code : 1028, type : Enumerated)
Xc nh tp hp cc tham s QoS c th nh ngha cc authorized QoS. Cc gi
tr c nh ngha t QCI 1 ti 9
3.2.26. Charging-Rule-Report AVP (code : 1018, type : Grouped)
Dng report status ca PCC rules. Charging-Rule-Name AVP tham chiu ti PCC
rule m thnh cng trong install, modified hoc removed.
AVP format :
Charging-Rule-Report ::= < AVP Header: 1018 >
*[ Charging-Rule-Name ]
*[ Charging-Rule-Base-Name ]
[ Bearer-Identifier ]
[ PCC-Rule-Status ]
[ Rule-Failure-Code ]
[ Final-Unit-Indication ]
*[ AVP ]

3.2.27. PCC-Rule-Status AVP (code :1019, type : Enumerated)
M t status ca 1 hoc 1 nhm PCC Rules :
- ACTIVE (0)
- INACTIVE (1)
- TEMPORARILY INACTIVE (2)
3.2.28. Bearer-Identifier AVP ( code : 1020, type : OctetString)
Ch ra nh danh ca Bearer
3.2.29. Bearer-Operation AVP (code : 1021, type : Enumerated )
Ch ra Bearer event m gy ra request cho PCC rule :
- TERMINATION (0)
- ESTABLISHMENT (1)
- MODIFICATION (2)

3.2.30. Access-Network-Charging-Identifier-Gx AVP ( code : 1022, type : Grouped)
Cha charging Identifier trong Access-Network-Charging-Identifier-Value AVP v
cc PCC Rule lin quan trong Charging-Rule-Name AVP. AVP format :
Access-Network-Charging-Identifier-Gx ::= < AVP Header: 1022 >
{ Access-Network-Charging-Identifier-Value}
*[ Charging-Rule-Base-Name ]
*[ Charging-Rule-Name ]

3.2.31. Bearer-Control-Mode AVP ( code 1023, type Enumerated)
Gi t PCRF ti PCEF v xc nh bearer control mode c la chn .
- UE_ONLY (0)
- UE_NW (2)
3.2.32. IP-CAN-Type AVP ( code 1023, type Enumerated)
Ch ra kiu ca Connectivity Access Network m user s dng .
- 3GPP-GPRS (0)
- DOCSIS (1)
- xDSL (2)
- WiMAX (3)
- 3GPP2 (4)
- 3GPP-EPS (5)
- Non-3GPP-EPS (6)
3.2.33. QoS-Upgrade AVP ( code : 1030, type : Enumerated)
Gi tr ca AVP ch ra liu SGSN c h tr GGSN upgrade QoS. Nu SGSN khng
h tr QoS-Upgrade, PCRF khng nn cung cp bitrate ln hn bitrate cho IP-CAN .
Nu khng c AVP ny, gi tr mc nh l QoS_UPGRADE_NOT_SUPPORTED.
Cc gi tr c nh ngha :
- QoS_UPGRADE_NOT_SUPPORTED (0)
- QoS_UPGRADE_SUPPORTED (1)
3.2.34. RAT-Type AVP ( code : 1032, type : Enumerated )
S dng ch ra cng ngh m UE s dng :
- WLAN (0)
- UTRAN (1000)
- GERAN (1001)
- GAN (1002)
- HSPA_EVOLUTION (1003)
- EUTRAN (1004)
- CDMA2000_1X (2000)
- HRPD (2001)
- UMB (2002)
- EHRPD (2003)
3.2.35. Monitoring-Key AVP (code : 1066, type : OctetString)
Dng nh 1 nh danh cho mt usage monitoring control instance.
3.2.36. Usage-Monitoring-Information AVP ( code : 1067, type : Grouped)
Cha thng tin v usage monitoring control.
Granted-Service-Unit AVP c dng trong PCRF cung cp ngng ti PCEF.
The Used-Service-Unit AVP cung cp lng s dng ti PCRF
Usage-Monitoring-Level AVP xc nh phm vi ca monitoring control instance
Usage-Monitoring-Support xc nh nu 1 monitoring control instance c disabled
The Usage-Monitoring-Report xc nh nu lng dng tch ly c bo co
Format :
Usage-Monitoring-Information::= < AVP Header: 1067 >
[ Monitoring-Key ]
[ Granted-Service-Unit ]
[ Used-Service-Unit ]
[ Usage-Monitoring-Level ]
[ Usage-Monitoring-Report ]
[ Usage-Monitoring-Support ]
*[ AVP ]

3.2.37. Usage-Monitoring-Level AVP ( code 1068, type : Enumerated)
Dng xc nh usage monitoring instance p dng cho c session hay cho 1 hoc
nhiu PCC Rule
Nu khng c cung cp th gi tr mc nh l PCC_RULE_LEVEL (1). Cc gi tr
c cung cp :
- SESSION_LEVEL (0)
- PCC_RULE_LEVEL (1)

3.2.38. 3GPP-RAT-Type
Ch ra cng ngh m UE ang s dng
3.2.39. 3GPP-SGSN-Address
Ch ra a ch IP4 ca SGSN
3.2.40. 3GPP-SGSN-IPv6-Address
Ch ra a ch IPv6 ca SGSN
3.2.41. 3GPP-SGSN-MCC-MNC
Ch ra Mobile country code v Mobile network code
3.2.42. 3GPP-User-Location-Info
Ch ra thng tin v tr hin ti ca UE.
Gm c Service Area Identity (SAI ) hoc Cell Global Identity (CGI)

You might also like