# 陳毅 - 讀書會 - 21/09/15 :::info - [x] 閱讀 Netmanias-22-LTE Policy and Charging Control (PCC) ::: ## Introduction 當使用者使用 LTE 服務,不同服務的 APN 所關聯的 EPS Session 會被建立 (或是修改)。 同時,網路會決定網路資源的分配策略以及當 EPS Session 建立或是修改時,這些服務該如何收費。接著,這個策略會在 Session 啟用時被套用,這個過程稱為 Policy and Charging Control (PCC),他主要會被 PCRF 以及 PCEF 關注。 當 EPS Session 被建立 (或是修改),PCRF 會根據電信商的策略 (e.g. QoS policy, gate status, charging methods, etc.) 決定套用到每個 SDF 上的 PCC Rule。 PCEF (P-GW) 偵測 SDF 並為其套用指定的 PCC Rule。此外,它還綁定了 SDF QoS 以及 Bearer QoS,並套用 Bearer 到 EPS Bearer 上。這些設定會套用在 EPS Entities 上 (UE, eNB, S-GW, P-GW, and MME)。 ## PCC Rules PCRF 決定每一個 SDF 的 PCC Rule 並且通過 Gx Interface 轉發到 PCEF (P-GW)。P-GW 會接著將轉發的 PCC Rule 套用到每一個 SDF 上。套用後,當 IP 封包抵達,它會偵測 SDF 所屬的類別並為其套用 PCC Rule,3GPP TS 29.212 定義了 PCC Rules,內容如下: - Purpose - Detect a packet belonging to a SDF - Identify the service the SDF contributes to - Provide applicable charging parameter for the SDF - Provide policy control for the SDF - Apply to - Different SDFs PCEF classifies IP packets by matching them against the packet filter (SDF templates), and the matching PCC rules are applied to the packet. - Type - Dynamic PCC rules are dynamically provisioned by PCRF to P-GW when an EPS session is established or modified. - Pre-defined PCC rules are preconfigured in P-GW, and thus can be activated or deactivated by PCRF. - Elements consists of a policy rule name, service ID, SDF template, gate status, QoS parameters, charging parameters etc., and varies depending on the operator’s policy. ### Pre-defined PCC Rule ![](https://i.imgur.com/svn6l9Z.png) 看到上圖可得知 Pre-defined rule 已經預先放置在 P-GW 中 (停用狀態)。當 PCRF 決定使用它,只要告訴 P-GW 其 Rule name 即可啟用該 Rule。 ### Dynamic PCC Rule Dynamic PCC rules are used whenever there is an event. ![](https://i.imgur.com/nGB3FJT.png) ![](https://i.imgur.com/5xiO20Z.png) ![](https://i.imgur.com/MqHpWv8.png) 每當 EPS Session 建立或是修改,PCRF 會自動決定要套用哪一個 PCC Rule (包含 rule name 以及 plicy parameters),當 P-GW 通過 Gx 收到訊息,P-GW 會強制將收到的參數套用到 Bearer QoS 參數上。 ## PCC Procedures 本節專注在理解使用者為了存取 IMS (發起通話)所做的 EPS session establishment/modifiaction procedure 時 PCC 是如何工作的。 為了在 LTE 網路中發起通話,必須事先 attach 到 LTE 並完成 IMS 註冊。 當使用於 Voice service 的 EPS Session 透過 LTE attach 被建立,用於 attch 到 IMS 網路的 default bearer 也會被建立。在這個過程中,適用於 Service signaling 的 PCC Rule 會被應用到該 Bearer 上。透過這個 Bearer,SIP Signaling message 會被送達、User 與 IMS 網路兩端的 IMS authentication/registration 會被執行。 等到發起通話時,IMS 網路會偵測到它並通知 PCRF,此時,PCC Rule **Voice-U** 會被 PCRF 轉發到 P-GW 上以建立 Dedicated bearer。 ### Voice Session Establishment: Default Bearer Establishment and IMS Registration ![](https://i.imgur.com/BmcbOBS.png) #### 1. [UE -> MME] PDN Connectivity Request - The message is included in an Attach Request message, an EMM message, and then sent to MME. - The Protocol Configuration Options (PCO) field in this ESM message is used to ask for Proxy Call Session Control Function (P-CSCF) address. #### 2. [MME -> S-GW -> P-GW] Request for Voice Session Creation - MME obtains an APN and subscription QoS profile from the subscription profile received from HSS during “Location Update”. - From APN, MME recognizes it has to create a default bearer for voice service and allocates an ID for the default bearer (for SIP signaling). - The subscription profile contains QoS parameters (QCI = 5, ARP = 6, APN-AMBR = 100 Kbps), which are to be applied to the default bearer. - MME prepares a Create Session Request message containing default bearer ID, APN, PCO and Subscribed QoS Profile, and forwards it to P-GW. At this time, PCO field received from UE is transparently delivered to P-GW. #### 3. [P-GW] UE IP and P-CSCF Address Allocation P-GW 為 IMS APN 分配了 UE IP,並選擇 P-CSCF 的地址 (IMS Control node)。 #### 4. [P-GW -> PCRF] Notification of EPS Session Establishment P-GW forwards the user’s subscription QoS profile to PCRF by sending a Credit-Control-Request (CCR)message, asking for authorization. #### 5. - 6. [PCRF, SPR] User Profile Acquisition PCRF may obtain the user’s subscription profile from SPR, and use it to determine a PCC policy for voice service. #### 7. [PCRF] Policy Decision ![](https://i.imgur.com/1GiRhQp.png) #### 8. [P-GW <- PCRF] PCC Rule Provision PCRF forwards the PCC rule (“Voice-C”) to P-GW over the Gx interface. #### 9. [P-GW] Policy Enforcement ![](https://i.imgur.com/lkikgPj.png) #### 10. [MME <- S-GW <- P-GW] Response for Voice Session Creation As a response to the request made in Step 2), P-GW sends a Create Session Response message to MME. This message contains approved QoS profiles and UL policy parameters to be forwarded to UE (e.g. APN-AMBR (UL), TFT (UL)). #### 11. [UE <- MME] Request for Default Bearer Context Activation MME requests UE for activation of the default bearer context by sending an Activate Default EPS Bearer Context Request message. This ESM message, containing APN, UE IP, P-CSCF address, and policy parameters sent by P-GW, is embedded in an EMM message, Attach Accept message. #### 12. [UE] Policy Enforcement: Default Bearer Context Activation ![](https://i.imgur.com/hDRsqpX.png) #### 13. [UE -> MME] Notification of Default Bearer Context Activation UE notifies MME that the default bearer context required for delivering of SIP signaling messages has been activated, by sending an Activate Default EPS Bearer Context Accept message. ### Voice Session Modification: Dedicated Bearer Establishment 當 LTE attachment 以及 IMS Registration 完成後,UE 已經準備好開始語言通話。然而,Voice packets 有即時傳送的需求,為 SIP signaling 所建立的 Default bearer 無法滿足該需求。因此,LTE 網路會通過 Voice session modification Procedure 為每一個 Voice call 創建 Dedicated bearer。 ![](https://i.imgur.com/oZX3mAi.png) #### 1. [UE -> P-CSCF] Voice Call Generation An originating UE requests for a voice call by sending an Invite message to the IMS network. #### 2. [PCRF <- P-CSCF] Service Information Delivery Upon receiving the SIP message, the IMS network (P-CSCF) knows a voice call has been requested. So, it sends an **AAR (AA-Request)** message to PCRF, forwarding service information. The **AAR** message contains media information such as maximum/minimum bandwidth, IP flow identifier, Codec, etc. #### 3. [PCRF] Policy Decision ![](https://i.imgur.com/lbSyqgO.png) #### 4. [P-GW <- PCRF] PCC Rule Provision PCRF 通過 Gx Interface 傳送 PCC Rule ("Voice-U") 給 P-GW。 #### 5. [P-GW] Policy Enforcement ![](https://i.imgur.com/a7ObWE9.png) #### 6. - 7. [MME <- S-GW <- P-GW] Request for Dedicated Bearer Creation ![](https://i.imgur.com/NtrOc4J.png) #### 8. [UE <- MME] Request for Activation of Dedicated Bearer Context MME requests for activation of the dedicated bearer context by sending UE an **Activate Dedicated EPS Bearer Context Request** message. In this message, policy parameters sent by P-GW are contained. #### 9. MME requests for activation of the dedicated bearer context by sending UE an Activate Dedicated EPS Bearer Context Request message. In this message, policy parameters sent by P-GW are contained. ![](https://i.imgur.com/IKQrjnH.png) #### 10. [UE -> MME] Notification of Dedicated Bearer Context Activation UE 發送 **Activate Dedicated EPS Bearer Context Accept** message 通知 MME: Dedicated bearer 已經激活。 #### 11. - 12. [MME -> S-GW -> P-GW] Notification of Dedicated Bearer Creation MME notifies P-GW that the dedicated bearer has been created. #### 13. [P-GW -> PCRF] Notification of Applied PCC Rule P-GW notifies PCRF that the PCC rule has been enforced. --- After the dedicated bearer is established, when the Originating UE receives a **200 OK** message upon completion of SIP signaling through the default bearer, voice packets (RTR packets) are delivered through the dedicated bearer. ## How Policy Control Affects the Way IP Packet Flows are Handled - Internet traffic (i.e. web flow) is delivered to/from the Internet PDN through the default bearer created for Internet service. - In case of voice traffic, SIP signaling flow is delivered to/from IMS PDN (P-CSCF) through the default bearer created for voice service while voice media flow is delivered to/from a callee through the dedicated bearer created for voice service. ![](https://i.imgur.com/cS6Xikj.png) 下圖顯示 policy control 應用到 IP Packet flows 的範例,圖中的 policy parameters 列在圖 2 中,P-GW 偵測上下行的 SDFs 並執行 policy control 在每一個 SDF 中的 IP Packets 上。 ![](https://i.imgur.com/38nxKMr.png) ## EPS Entity Information ### Internet Service ![](https://i.imgur.com/moygE6X.png) ### Voice Service ![](https://i.imgur.com/1BaAYE9.png) Once the voice call is ended, P-CSCF notifies PCRF. Then PCRF initiates an EPS session modification procedure, having the dedicated bearer terminated, and dedicated bearer contexts deleted at UE, eNB, S-GW and P-GW. However, the default bearer for SIP signaling remains active even after the voice call ended unless UE is detached from the LTE network.