{{indexmenu_n>1}} ====== Scheme of work ====== {{ :dpi:pcrf_proxy:pcrf_proxy.png?nolink&700 |}} PCRF Proxy is located on the Gx interface between PCEF and PCRF and participates in the exchange of Diameter messages related to obtaining and updating subscriber service policies. PCRF Proxy can work in different modes: * Gx Proxy – PCRF Proxy works as a full-fledged Diameter node on the Gx interface. In this mode, PCEF and PCRF communicate via PCRF Proxy, which receives and processes all Diameter messages between them. If necessary, PCRF Proxy may analyze and modify transmitted policies. * PCRF Proxy operates at the network layer (L3) and does not act as a separate Diameter node. For PCEF and PCRF, the connection looks direct, and PCRF Proxy only intercepts traffic passing between them, analyzes Diameter messages and, if necessary, modifies the transmitted policies. * In the absence of an external PCRF, the solution performs its basic functions independently. In this case, the PCEF establishes a Gx connection directly with PCRF Proxy, which processes requests and returns locally configured policies without forwarding them to an external PCRF. ===== Getting Policies ===== When registering a subscriber session, the PCEF identifies the subscriber and requests a set of service rules over the Gx interface. If an external PCRF is used, the request passes through PCRF Proxy, which can leave policies unchanged or replace them depending on the configured logic. If there is no external PCRF, PCRF Proxy independently generates and returns a set of rules.\\ For subscribers entering pre-configured geographic areas, PCRF Proxy can replace standard policies with special rules. For example, instead of the usual profile, a mode with access only to resources from the white list can be applied. Standard policies continue to apply for subscribers outside such areas. ===== Updating the rules when changing location ===== When a subscriber changes location, PCEF receives updated location information and transmits it to PCRF Proxy. The system compares the new parameters with the configured geographical zones and determines whether the border of the zone has been crossed.\\ If a subscriber has entered or left the area, PCRF Proxy will initiate an update of the policies applied to him to match the current location. ===== Massive policy updates ===== When changing the configuration of zones (for example, turning them on, off or changing the composition), updating the rules for already connected subscribers can be done in two ways: * ** Using session cache.** PCRF Proxy stores active subscriber sessions and initiates Re-Auth-Request (RAR) for all affected subscribers when the configuration changes. After that, the new policies apply to their traffic. * **No session storage.** In this case, the mechanism of periodic reauthorization (Revalidation Timeout) is used. The PCEF re-requests policies at predetermined intervals, and the PCRF Proxy re-determines the subscriber’s location at each request and returns the current set of rules. By doing so, changing geographic areas or moving a subscriber automatically results in the application of policies without the need to interrupt an existing session.