Policy and Charging Control uses Diameter across three interfaces. Gx (TS 29.212) runs between the PCEF and PCRF, using CCR/CCA to install PCC rules. Gy (TS 32.299, RFC 4006) runs to the online charging system, granting and reauthorizing quota. Rf carries offline charging to the CDF via Accounting-Request/Answer.
The PCC architecture
The 3GPP Policy and Charging Control architecture decides, in real time, what quality of service a data flow gets and how it is charged. The PCRF (Policy and Charging Rules Function) is the decision point: it holds the operator's rules and, per session, tells the enforcement point what to do. The PCEF (Policy and Charging Enforcement Function), which lives in the PGW, enforces those decisions on the bearer — gating flows, setting QoS and metering usage. Online charging is done by the OCS (Online Charging System) and offline charging by the OFCS (Offline Charging System / CDF). Diameter is the protocol that ties these together.
| Node | Role | Diameter interface |
|---|---|---|
| PCRF | Policy decision — chooses PCC rules per session | Gx (to PCEF), Sy (to OCS), Sd (to TDF) |
| PCEF (PGW) | Enforcement — gating, QoS, usage metering | Gx (to PCRF), Gy (to OCS), Rf (to OFCS) |
| OCS | Online charging — real-time balance and quota | Gy / Ro (Credit-Control) |
| OFCS / CDF | Offline charging — CDR generation | Rf (Accounting) |
| TDF | Traffic detection (application awareness) | Sd (to PCRF) |
Gx: installing PCC rules
Gx runs between the PCEF and the PCRF using the Diameter Credit-Control command pair (CCR/CCA, command 272) with Application-Id 16777238 (0x01000016). When a bearer is established the PCEF sends a CCR-Initial describing the session (subscriber, IP-CAN type, access details); the PCRF answers with a CCA carrying one or more Charging-Rule-Install AVPs — each a PCC rule that binds a service data flow to a QoS-Class-Identifier (QCI), a gating status and a charging key. During the session the PCRF can push new decisions unsolicited with an RAR (Re-Auth-Request), and the PCEF reports events with CCR-Update. This is how, for example, a video flow is throttled once a fair-use threshold is reached.
PCEF → PCRF CCR-Initial { Subscription-Id, IP-CAN-Type,
Framed-IP-Address, RAT-Type }
PCRF → PCEF CCA { Charging-Rule-Install {
Charging-Rule-Definition {
Rating-Group, QoS-Information{ QCI, ARP },
Flow-Information, Flow-Status } } }
PCRF → PCEF RAR { Charging-Rule-Install (new rule mid-session) }Gy: online charging and quota
Gy (with its IMS twin Ro) connects the PCEF to the Online Charging System for real-time, prepaid-style charging, using the Diameter Credit-Control Application (RFC 4006, Application-Id 4) with 3GPP extensions in TS 32.299. Charging is done per rating group over the lifecycle of a session. A CCR-Initial requests an initial quota; the OCS grants a Granted-Service-Unit (a volume or time allowance). As the subscriber consumes it, the PCEF sends CCR-Update to report used units and request more, and the OCS reauthorizes or denies. A CCR-Terminate returns the unused balance at the end. If the OCS refuses further quota, the PCEF applies the configured action — redirect to a top-up page, or block.
| Type | Value | Meaning |
|---|---|---|
| INITIAL_REQUEST | 1 | Session start — request first quota |
| UPDATE_REQUEST | 2 | Report used units, request more quota / reauthorize |
| TERMINATION_REQUEST | 3 | Session end — return unused units |
| EVENT_REQUEST | 4 | One-shot charging for a single chargeable event |
Rf: offline charging
Offline charging does not touch a live balance; it produces Charging Data Records for post-processing and billing. The charging trigger function in the PCEF (or another network element) acts as a Charging Trigger Function and sends Diameter Accounting-Request messages (ACR, command 271) over the Rf interface to the Charging Data Function, which builds CDRs. ACR-Start, ACR-Interim and ACR-Stop bracket a session and periodically report accumulated usage; the CDF answers each with an ACA. TS 32.299 defines the 3GPP-specific accounting AVPs (Service-Information and its sub-groups) that carry the detail a CDR needs.
QoS, QCI and the Sy/Sd interfaces
The policy a PCRF installs is expressed largely through QoS. Each PCC rule references a QoS-Class-Identifier (QCI) — a standardized label (for example QCI 1 for conversational voice, QCI 9 for best-effort data) that maps to a packet-delay budget, loss rate and priority — plus an Allocation and Retention Priority (ARP). Two further Diameter interfaces extend the model: Sy lets the PCRF query and subscribe to spending limits at the OCS, so policy can react to a subscriber's balance, and Sd lets the PCRF drive a Traffic Detection Function for application-aware policy. Together they let charging state and application awareness feed policy decisions in real time.
Frequently asked
What is the difference between Gx, Gy and Rf?
Gx carries policy between the PCEF and PCRF, installing PCC rules with CCR/CCA. Gy carries online (real-time) charging between the PCEF and the OCS, granting and reauthorizing quota. Rf carries offline charging to the CDF using Accounting-Request/Answer to build CDRs. All three are Diameter interfaces.
What are the PCRF and PCEF?
The PCRF (Policy and Charging Rules Function) is the decision point that holds operator policy and, per session, tells the enforcement point what QoS and charging to apply. The PCEF (Policy and Charging Enforcement Function), inside the PGW, enforces those decisions — gating flows, setting QoS and metering usage — and speaks Gx to the PCRF.
How does online charging grant quota over Gy?
Using the Diameter Credit-Control Application (RFC 4006). A CCR-Initial requests quota; the OCS returns a Granted-Service-Unit. As usage is consumed the PCEF sends CCR-Update to report used units and request more, and the OCS reauthorizes or denies. A CCR-Terminate returns the unused balance at session end.
What is a PCC rule?
A Policy and Charging Control rule, installed by the PCRF over Gx in a Charging-Rule-Install AVP, binds a service data flow to a QoS-Class-Identifier (QCI), a gating status (allow/block) and a charging key (rating group). It is how the network applies per-flow QoS and charging, for example throttling video after a fair-use threshold.
What is a QCI?
A QoS-Class-Identifier is a standardized label carried in a PCC rule that maps a bearer to a defined packet-delay budget, packet-loss rate and priority — for example QCI 1 for conversational voice or QCI 9 for best-effort data. Together with the ARP it tells the PGW how to treat the flow.
What Diameter command do Gx and Gy share?
Both use the Credit-Control command pair CCR/CCA (command code 272). Gx uses it with Application-Id 16777238 to install PCC rules; Gy uses it with the Credit-Control Application-Id 4 (RFC 4006) plus 3GPP extensions to manage quota. The CC-Request-Type AVP distinguishes initial, update, terminate and event requests.
Source specifications
The published standards this page is grounded in. Opens in a new tab.