If you liked it, or content was helpful to you please add "+1" to article you used or share it on facebook or so.
Make it easier to find for others who could need those information, allow them find these articles on the spot. But.. it's your call.
Recommendations until now


Jan 18, 2012

Gx interface - sitting between PCRF and PCEF

After you are familiar with OFCS (Offline Charging System) and OCS (Online Charging System) time has come to be more up to date with interfaces that are being used to exchange signaling data. At first I will talk about Gx interface which is responsible for Offline Charging, but not only.
The Gx reference point is located between the Policy Control and Charging Rules Function (PCRF) and the Policy and Charging Enforcement Function (PCEF). The Gx reference point is used for provisioning and removal of Policy and Charging Control (PCC) rules from the PCRF to the PCEF and the transmission of traffic plane events from the PCEF to the PCRF. The Gx reference point can be used for charging control, policy control or both by applying AVPs relevant to the application.
As you probably know, it's always good to start from big picture. Here we go.
Fig. 1. Gx reference point at the Policy and Charging Control (PCC) architecture

So at first, few information about..

PCC (Policy and Charging Control)


Oh, and please note that by IP CAN bearer I mean: IP transmission path of defined capacity, delay and bit error rate, etc. For more details please see 3GPP TS 21.905.
An IP-CAN session incorporates one or more IP-CAN bearers. Support for multiple IP-CAN bearers per IP-CAN session is IP-CAN specific. An IP-CAN session exists as long as the related UE IPv4 address and/or IPv6 prefix are assigned and announced to the IP network.
It will be needed for text presented below.

Policy and Charging Control Rule Definition
The purpose of the PCC rule is to:
  • Detect a packet belonging to a service data flow
    • The service data flow filters within the PCC rule are used for selection of downlink IP CAN bearers
    • Service data flow filters within the PCC rule are used for the enforcement that uplink IP flows are transported in the correct IP CAN bearer
  • Identify the service data flow contributes to
  • Provide applicable charging parameters for a service data flow
  • Provide policy control for a service data flow
The PCEF (Policy and Charging Enforcement Function) shall select a PCC rule for each received packet by evaluating received packets against service data flow filters of PCC rules in the order of the precedence of the PCC rules. When a packet matches a service data flow filter, the packet matching process for that packet is completed, and PCC rule for that filter shall be applied.
There are two different types of PCC (Policy and Charging Control):
  • Dynamic PCC rules. Are dynamically provisioned by the PCRF to the PCEF via the Gx interface. These PCC rules may be either predefined or dynamically generated in the PCRF. Dynamic PCC rules can be Installed, Modified and Removed any time.
  • Predefined PCC rules. Preconfigured in the PCEF. Predefined PCC rules can be Activated or Deactivated by the PCRF at any time. Predefined PCC rules within the PCEF may be grouped allowing  the PCRF to dynamically activate set of PCC rules over the Gx interface.
PCC rules consist of:
  • rule name - shall be used to reference a PCC rule in communication between PCEF and the PCRF
  • service identifier - shall be used to identify the service or service component the service data flow relates to
  • service data flow filter(s) - shall be used to select the traffic for which the rule applies. It shall be possible to define wildcarded service data flow filters, both for dynamic and predefined PCC rules
  • precedence
  • gate status - indicates whether the service data flow, detected by the service data flow filter may pass (state open) or shall be discarded (state closed) in uplink and/or in downlin direction
  • QoS parameters - includes QoS Class Identifier (QCI), that means authorized QoS class for the service data flow, also the Allocation and Retention Priority (ARP) and authorized bitrates for uplink and downlik
  • charging key (i.e. rating group) - define whether online and offline charging interfaces are used, what is to be metered in offline, on what level the PCEF shall report the usage related to the rule, etc.
  • other charging parameters
  • monitoring key - identifies a monitoring control instance that shall be used for usage monitoring control of the service data flows controlled by the predefined PCC rule or dynamic PCC rule
As I secretly mentioned earlier, we are able to make
Operations on Policy and Charging Control (PCC) rules
For dynamic PCC rules:
  • Installation: to provision a PCC rules that has not been already provisioned
  • Modification: to modify a PCC rule already installed
  • Removal: to remove a PCC rule already installed
For predefined PCC:
  • Activation: to allow the PCC rule being active
  • Deactivation: to disallow the PCC rule


Functional elements

PCRF
The PCRF (Policy Control and Charging Rules Function) is a functional element that encompasses policy control decision and flow based charging control functionalities. The PCRF provides network control regarding the service data flow detection, gating, QoS and flow based charging (except credit management) towards the PCEF. The PCRF reveives session and media related information from the Application Function (AF) and informs AF of traffic plane events.
The PCRF Shall provision PCC rules to the PCEF via the Gx interface.
The PCRF PCC rule decisions may be based on one or more of the following:
  • Information obtained from the Application Function (AF) via Rx interface, e.g. session, media and subscriber related information
  • Information obtained from the PCEF via the Gx interface, e.g. IP CAN bearer attributes, request type and subscriber related information
  • Information obtained fromthe SPR via the Sp interface, e.g. subscriber and service related data
  • Information obtained from the BBERF via the Gxx interface
  • Own PCRF pre-configured information
If the information from the PCEF (Policy and Charging Enforcement Function) contains traffic mapping information not matching any service data flow filter known to the PCRF, and PCRF allows the UE to request enhanced QoS fo services not known to the PCRF. The PCRF shall add this traffic mapping information as service data flow filters to the corresponding authorized PCC rule. The PCRF may wildcard missing filter parameters.
PCRF shall report events to the AF via Rx interface.
The PCRF shall inform the PCEF through the use of PCC rules on the treatment of each service data flow that is under PCC control, in accordance with the PCRF policy decisions. PCRF shall be able to select the bearer control mode that will apply for the IP CAN session and provide it to the PCEF via the Gx interface.


Upon subscription to loss of AF (Application Function) signalling bearer notifications by the AF, the PCRF shall request the PCEF to notify the PCRF of the los of resources associated to the PCC rules corresponding with AF Signaling IP Flows, it this has not been requestet previously.


PCEF
The PCEF (Policy and Charging Enforcement Function) is the functional element that encompasses policy enforcement and follow based charging functionalities. This functional entity is located at the Gateway (PGW). It provides control over the user plane traffic handling at the Gateway and its QoS, and provides service data dlow detection and counting as well as online and offline charging interactions.
For a service data flow that is under policy control the PCEF shall allow the service data flow to pass through the Gateway if and only if the corresponding gate is open.
For a service data flow that is under charging control the PCEF shall allow the service data flow to pass through the Gateway if and only if there is a corresponding a active PCC rule and, for online charging, the OCS has authorized the applicable credit with that Charging Key (Rule Base). The PCEF may let a service data flow pass through the Gateway during the course of the credit re-authorization procedure.

If requested by the PCRF, the PCEF shall report to the PCRF when the status of the related service data flow changes. This procedure can be used to monitor an IP CAN bearer dedicated tfor AF signalling traffic.


Procedures over Gx interface

Request and Provisioning for PCC rules
For detailed information about what fields are set, and so on please see the TS 29.212 paragraph 4.5.1.

The PCRF shall indicate via Gx interface PCC rules to be applied at the PCEF. This may be using one of the following procedures:
  • PULL procedure (Provisioning solicited by PCEF): In response to a request for PCC rules being made by the PCEF, the PCRF shall provision PCC rules in the CCA (Credit Control Answer)
Fig. 2. PCC "PULL" procedure sequence flow
1. When an event-trigger event occurs, the PCEF sends a Credit Control Request (CCR-I in our case, because it's "Initial_Request") message that carries an event-trigger parameter to the PCRF, requesting to deliver PCC rules
2. The PCRF judges whether to update the PCC rules (namely, old PCC rules) according to the event-trigger, and returns a Credit Control Answer (CCA-I) message to the PCEF. If the PCC rules need update, the retuned CCA-U  (CCR-U and CCA-U stand Credit Control Request/Answer Update_Request) message carries the updated PCC rules (namely, new PCC rules), and the PCRF stores both the old PCC rules and the new PCC rules.
3. After receiving the CCA message, the PCEF executes the PCC rules. If the returned CCA message carries the new PCC rules, the PCEF executes the new PCC rules; if the returned CCA message carries no new PCC rules, the PCEF executes the old PCC rules. When the PCEF executes the PCC rules unsuccessfully, the PCEF sends a new CCR message.
  • PUSH procedure (Unsolicited provisioning): The PCRF may decide to provision PCC rules without obtaining a request from the PCEF, e.g. in response to information provided to the PCRF via the Rx interface, or in response to an internal trigger within the PCRF. To provision PCC rules without a request from the PCEF, the PCRF shall include these PCC rules in an RAR (Re-Auth-Request) message. No CCR/CCA (Credit Control Request/Credit Control Answer) messages are triggered by this RA-Request.
Fig. 3. PCC "PUSH" procedure sequence flow
1. When an event-trigger event occurs, the PCRF updates the PCC rules, and sends a Re-Auth Request (RAR) message to the PCEF. The RAR message carries new PCC rules, and the PCRF does not store the old PCC rules.
2. The PCEF executes the new PCC rules delivered through the RAR message. After completion of the execution, the PCEF sends a Re-Auth Answer (RAA) message to the PCRF. 


For each request from the PCEF or upon the unsolicited provision the PCRF shall provision zero or more PCC rules. The PCRF may perform an operation on a single PCC rule by one of the following means:
  • To activate or deactivate a PCC rule that is predefined at the PCEF, the PCRF shall provision a reference to this PCC rule within a Charging-Rule-Name AVP and indicate the required action by choosing either the Charging-Rule-Install AVP or the Charging-Rule-Remove AVP.
  • To install or modify a PCRF-provisioned PCC rule, the PCRF shall provision a corresponding Charging-Rule-Definition AVP within a Charging-Rule-Install AVP.
  • To remove a PCC rule which has previously been provisioned by the PCRF, the PCRF shall provision the name of this PCC rule as value of a Charging-Rule-Name AVP within a Charging-Rule-Remove AVP.
  • If, for certain accesses, the PCRF performs the bearer binding, the PCRF may move previously installed or activated PCC rules from one IP CAN bearer to another IP CAN bearer. See annex A in TS 29.212 for further details.

13 comments:

  1. Hi, what is the difference between a Gx session and an IP-CAN session? thank you!

    ReplyDelete
  2. Very interesting and very clear.
    In the overview scheme, to complete, you could add Sy interface between OCS and PCRF.

    ReplyDelete
  3. How the modification of a PCC rule works, say you want to add a new TFT to an already installed PCC Rule, what should be done over Gx? Should the PCRF re-provisioned the complete list of TFTs for example?

    ReplyDelete
  4. what exactly PCC rule is? is it like restricting certain URL???

    ReplyDelete
  5. Anonymous, restrict certain URL by reading http host header it is too easy.

    PCC rules it is more flexible and convinient solution.
    Using PCC rules you can apply some actions to specified "service" or to all subscriber`s traffic.
    What is service? it depends on you eqipment and vendors.
    e.g. On PCEF each service has number. Pcrf knows this numbers and can use them. You can manually assign Service-Identifier 7777 is smtp protocol, then PCC rule given below can enable blocking all smtp for a subscriber on PCEF.

    Charging-Rule-Definition
    {
    Charging-Rule-Name block_smtp
    Flow-Status 3
    Service-Identifier 7777
    }

    Of course you can define url and block by host header, but it it not good practice. DPI engine is the key. DPI engin classify traffic and makes correlation btw Service-Identifier and type of traffic. So you can prohibit or decrease speed for facebook.com, fb.com and other aliases.

    ReplyDelete
    Replies
    1. Thanks Nikita for your time and effort to go through comments and post the above here.
      Really appreciate,
      Bart

      Delete
  6. hi
    what should PCEF reply if PCRF sending Charging-rule-remove to PCEF.
    what could be reason if GGSN is terminating the session immediately receiving CCA with remove charging-rule

    ReplyDelete
  7. Hi Bart, your post is really helpful to our engineering job. I would bother you to dig in 3gpp and make the complete list of function and feature of PCRF, PCEF. I am confused by suppliers providing the list of function whether some claim as basic function/feature while some claim advance.

    Thank you

    ReplyDelete
  8. Thank you very much for detailed explanation of Gx interface. I would like to get more knowledge about interface between PCRF and OCS. Is there any interface between these two components?
    Could please explain above mechanism with nice and simplistic example like Subscriber having 1GB Data Plan for 1MBPS for 30days. What will happen next when data event comes from netwrk to PCEF?

    ReplyDelete
    Replies
    1. There is an interface between PCRF and OCS, which is called the Sy interface. The Sy interface enables the PCRF to request credit authorization from the OCS for a service data flow, and to report the usage of the service data flow to the OCS⁵. The Sy interface uses the Diameter Credit Control Application (DCCA) protocol to exchange messages between the PCRF and the OCS.

      Let me give you an example of how the Sy interface works with a subscriber having 1GB data plan for 1Mbps for 30 days. Suppose the subscriber wants to access a video streaming service on their device.

      - First, the PCEF detects the service data flow and sends a Credit Control Request (CCR) message to the PCRF over the Gx interface, requesting policy and charging rules for the service data flow.
      - The PCRF checks the subscriber's profile and determines that the service data flow belongs to a video streaming service that requires credit authorization from the OCS. The PCRF then sends a CCR message to the OCS over the Sy interface, requesting credit authorization for the service data flow.
      - The OCS checks the subscriber's account balance and verifies that the subscriber has enough credit to access the video streaming service. The OCS then sends a Credit Control Answer (CCA) message to the PCRF over the Sy interface, granting credit authorization for the service data flow and specifying a credit limit.
      - The PCRF receives the CCA message from the OCS and sends a CCA message to the PCEF over the Gx interface, providing policy and charging rules for the service data flow, such as QoS parameters, gating status, and rating group.
      - The PCEF receives the CCA message from the PCRF and applies the policy and charging rules to the service data flow, allowing the subscriber to access the video streaming service.
      - As the subscriber consumes the service data flow, the PCEF reports the usage of the service data flow to the PCRF over the Gx interface using CCR/CCA messages. The PCRF forwards the usage information to the OCS over the Sy interface using CCR/CCA messages. The OCS deducts the usage from the subscriber's account balance and updates the credit limit accordingly.
      - If the subscriber reaches or exceeds the credit limit, or if their data plan expires, or if they terminate their session, then either of these events will trigger a termination request from either of these components: PCEF, PCRF or OCS. This will result in sending CCR/CCA messages over both Gx and Sy interfaces to end the session and release any reserved resources.

      Delete
  9. Thanks for giving the details of Gx interface.

    I want understand what is Rating-Group? How many Rating-Group possible? session can have multiple Rating-Groups ?

    ReplyDelete
  10. PCRF is not sending the RAR message for all In-roamers, what could be the issue ?

    ReplyDelete