內容
- PCC規則定義
- PCC規則運行
- PCC規則模板
PCC規則定義
**參考文檔: **3gpp ts 23.203-be0 條款6.3
策略與計費控制規則(PCC Rule),即一系列相關信息與一系列相關操作的集合,通常包含3大類信息:
- 服務數據流檢查信息
- 策略控制信息
- 計費相關信息
其中:服務數據流指,利用PCC規則中的業務數據流模板進行檢測的分組數據;
PCC規則可以分為兩類:
- 動態PCC規則
- 靜態預定義PCC規則
動態PCC規則通過PCRF的Gx下發給PCEF執行,PCRF可以建立、修改、刪除這類規則;預定義PCC規則由PCEF預配,PCRF只能引用這類規則;
PCC規則如下表所示:
注意: 同一個P-CAN會話中PCC規則ID標識符是唯一的;如果動態PCC規則與預定義PCC規則相同,則后者將被前者覆蓋(替換);
PCC業務數據流模板(PCC Service Data Flow Template)可能包含任何數目的業務數據流過濾器(Service Data Flow Filter);
PCC優先順序(PCC Precedence)定義了在PCEF中進行服務數據流檢測時,同一個IP-CAN會話中已激活的PCC規則的執行先后順序;
特別聲明: 其余指標說明請參考相關文檔[SR_68-2010_策略和計費控制(PCC)系統技術研究]
PCC規則運行
PCC規則運行主要指:
- 動態PCC規則的創建、激活、修改、去激活、刪除等過程
- 預定義PCC規則的引用過程
激活
- 激活動態PCC規則,通過Gx接口向PCEF提供PCC規則信息;
- 激活預定義的PCC規則,通過Gx接口向PCEF提供關聯的PCC規則標識符;
- 激活PCRF不知道的預定義PCC規則,PCEF根據運營商策略進行;
激活的PCC規則
- 使用業務數據流模板(PCC Service Data Flow Template)檢查業務數據流(Service Data Flow)
- 使用業務數據流模板將下行分組數據映射到承載綁定(Binder)的IP-CAN承載
- 使用業務數據流模板檢查承載綁定的IP-CAN上的上行分組
- 記錄業務數據流的使用數據
- 調用與PCC規則相關的策略(如果有)
注意:
- 預定義的PCC規則至少在一個接入點范圍內是已知的
- 多個IP-CAN會話中,能夠為多個IP-CAN承載激活相同的預定義PCC規則
- 包含有下行服務數據流過濾器的預定義的PCC規則,只能在每一個IP-CAN會話中激活一次
- 只包含有上行服務數據流過濾器的預定義PCC規則,能夠在同一個IP-CAN會話的多個IP-CAN承載建立時激活;去激活該類PCC規則時,將從每一個IP-CAN承載中刪除該PCC規則
- PCRF可以在任何時候修改一個激活的、動態PCC規則
- PCRF可以在任何時候通過Gx接口去激活PCEF中活動的PCC規則;並在IP-CAN承載終止時,該承載上的所有活動的PCC規則,都應該不去激活,而不用PCRF顯示執行
PCC規則模板
<?xml version='1.0' encoding='UTF-8' ?>
<PolicyDef xmlns='http://www.yota.ru/shemes/rules' version='1'>
<Policy Name="online_charging">
<Default>
<AddToCCA>
<Online Value="ENABLE_ONLINE" />
<Offline Value="DISABLE_OFFLINE" />
</AddToCCA>
<AddToRAR>
<Online Value="ENABLE_ONLINE" />
<Offline Value="DISABLE_OFFLINE" />
</AddToRAR>
</Default>
</Policy>
<Policy Name="failover">
<Default>
<AddToCCA_I>
<CC-Session-Failover Value="FAILOVER_SUPPORTED" />
</AddToCCA_I>
</Default>
</Policy>
<!-- this is policy for users w/o any policy " -->
<Policy Name="Default">
<CiscoSCE PackageInstall="0" Real_Time_Monitor="1"/>
<Default>
<QoSes>
<QoS-Information>
<APN-Aggregate-Max-Bitrate-DL Value="2048000"/>
<APN-Aggregate-Max-Bitrate-UL Value="2048000"/>
</QoS-Information>
<Default-EPS-Bearer-QoS>
<QoS-Class-Identifier Value="QCI_6"/>
<Allocation-Retention-Priority>
<Priority-Level Value="1"/>
<Pre-emption-Capability Value="PRE_EMPTION_CAPABILITY_ENABLED"/>
<Pre-emption-Vulnerability Value="PRE_EMPTION_VULNERABILITY_DISABLED"/>
</Allocation-Retention-Priority>
</Default-EPS-Bearer-QoS>
</QoSes>
</Default>
</Policy>
<Policy Name="Limited">
<CiscoSCE PackageInstall="1" Real_Time_Monitor="1"/>
<Default>
<QoSes>
<QoS-Information>
<APN-Aggregate-Max-Bitrate-DL Value="64000"/>
<APN-Aggregate-Max-Bitrate-UL Value="64000"/>
</QoS-Information>
<Default-EPS-Bearer-QoS>
<QoS-Class-Identifier Value="QCI_6"/>
<Allocation-Retention-Priority>
<Priority-Level Value="1"/>
<Pre-emption-Capability Value="PRE_EMPTION_CAPABILITY_ENABLED"/>
<Pre-emption-Vulnerability Value="PRE_EMPTION_VULNERABILITY_DISABLED"/>
</Allocation-Retention-Priority>
</Default-EPS-Bearer-QoS>
</QoSes>
</Default>
</Policy>
<Policy Name="Turbo">
<CiscoSCE PackageInstall="2" Real_Time_Monitor="1"/>
<Default>
<QoSes>
<QoS-Information>
<APN-Aggregate-Max-Bitrate-UL Value="10240000"/>
<APN-Aggregate-Max-Bitrate-DL Value="10240000"/>
</QoS-Information>
<Default-EPS-Bearer-QoS>
<QoS-Class-Identifier Value="QCI_6"/>
<Allocation-Retention-Priority>
<Priority-Level Value="1"/>
<Pre-emption-Capability Value="PRE_EMPTION_CAPABILITY_ENABLED"/>
<Pre-emption-Vulnerability Value="PRE_EMPTION_VULNERABILITY_DISABLED"/>
</Allocation-Retention-Priority>
</Default-EPS-Bearer-QoS>
</QoSes>
<Rules>
<Charging-Rule-Base-Name Value="Turbo"/>
<Charging-Rule-Name Value="Turbo_1"/>
<Charging-Rule-Name Value="Turbo_2"/>
</Rules>
</Default>
</Policy>
<Policy Name="VideoTurbo">
<Default>
<Rules>
<Charging-Rule-Definition>
<Charging-Rule-Name Value="video_turbo"/>
<Service-Identifier Value="5"/>
<Rating-Group Value="8"/>
<Flow-Description Value="permit in ip from any to 10.2.44.215"/>
<Flow-Description Value="permit out ip from 10.2.44.215 to any"/>
<Flow-Status Value="ENABLED"/>
<QoS-Information>
<QoS-Class-Identifier Value="QCI_7"/>
<Max-Requested-Bandwidth-UL Value="8192000"/>
<Max-Requested-Bandwidth-DL Value="8192000"/>
<Guaranteed-Bitrate-UL Value="8192000"/>
<Guaranteed-Bitrate-DL Value="8192000"/>
<Allocation-Retention-Priority>
<Priority-Level Value="1"/>
<Pre-emption-Capability Value="PRE_EMPTION_CAPABILITY_DISABLED"/>
<Pre-emption-Vulnerability Value="PRE_EMPTION_VULNERABILITY_ENABLED"/>
</Allocation-Retention-Priority>
</QoS-Information>
<Precedence Value="1"/>
</Charging-Rule-Definition>
</Rules>
</Default>
</Policy>
<Policy Name="Default_IOT">
<CiscoSCE PackageInstall="3" Real_Time_Monitor="1"/>
<Default>
<QoSes>
<QoS-Information>
<APN-Aggregate-Max-Bitrate-UL Value="2048000"/>
<APN-Aggregate-Max-Bitrate-DL Value="2048000"/>
</QoS-Information>
<Default-EPS-Bearer-QoS>
<QoS-Class-Identifier Value="QCI_6"/>
<Allocation-Retention-Priority>
<Priority-Level Value="1"/>
<Pre-emption-Capability Value="PRE_EMPTION_CAPABILITY_ENABLED"/>
<Pre-emption-Vulnerability Value="PRE_EMPTION_VULNERABILITY_DISABLED"/>
</Allocation-Retention-Priority>
</Default-EPS-Bearer-QoS>
</QoSes>
<Rules>
<Charging-Rule-Definition>
<Charging-Rule-Name Value="iot"/>
<Service-Identifier Value="211"/>
<Rating-Group Value="211"/>
<Flow-Description Value="permit in ip from any to any"/>
<Flow-Description Value="permit out ip from any to any"/>
<Reporting-Level Value="SERVICE_IDENTIFIER_LEVEL"/>
<Metering-Method Value="VOLUME"/>
<Online Value="ENABLE_ONLINE"/>
<Offline Value="DISABLE_OFFLINE"/>
<Flow-Status Value="ENABLED"/>
<QoS-Information>
<QoS-Class-Identifier Value="QCI_6"/>
<Max-Requested-Bandwidth-UL Value="2048000"/>
<Max-Requested-Bandwidth-DL Value="2048000"/>
<Guaranteed-Bitrate-UL Value="2048000"/>
<Guaranteed-Bitrate-DL Value="2048000"/>
<Allocation-Retention-Priority>
<Priority-Level Value="6"/>
<Pre-emption-Capability Value="PRE_EMPTION_CAPABILITY_DISABLED"/>
<Pre-emption-Vulnerability Value="PRE_EMPTION_VULNERABILITY_DISABLED"/>
</Allocation-Retention-Priority>
</QoS-Information>
<Precedence Value="0"/>
</Charging-Rule-Definition>
</Rules>
</Default>
</Policy>
<HuaweiAccums>
<!-- This is special accum used only for per location usage monitoring -->
<Accum Name="CONGESTION">
<Monitoring-Key Name="congestion" Direction="Downlink" Delta="1000000" Monitor-Level="SESSION" />
</Accum>
</HuaweiAccums>
<DefaultAccums>
<!-- please don't delete this accum. It used for perfomance tests -->
<Accum Name="perf_accum_test">
<Monitoring-Key Name="test_mkey" Direction="Downlink" Delta="1000000"/>
</Accum>
<Accum Name="perf_accum_D">
<Monitoring-Key Name="test_mkey" Direction="Uplink" Delta="500000"/>
</Accum>
<Accum Name="perf_accum_M">
<Monitoring-Key Name="test_mkey2" Direction="Both" Delta="100000"/>
</Accum>
<Accum Name="general">
<Monitoring-Key Name="up_mkey" Direction="Uplink" Delta="1000000"/>
<Monitoring-Key Name="down_mkey" Direction="Downlink" Delta="1000000"/>
</Accum>
<Accum Name="general_up">
<Monitoring-Key Name="general_mkey" Direction="Uplink" Delta="1000000"/>
</Accum>
<!-- please don't delete this accum. It used in FreePCRF image -->
<Accum Name="general_down">
<Monitoring-Key Name="general_mkey" Direction="Downlink" Delta="1000000"/>
</Accum>
</DefaultAccums>
<ProceraAccums>
<Accum Name="perf_accum_test">
<Monitoring-Key Name="test_mkey" Direction="Downlink" Delta="1000000"/>
</Accum>
</ProceraAccums>
</PolicyDef>
注: 規則模板的說明請參考freePCRF手冊文檔:《Telexir PCRF 3.5.2 Policy Library.pdf》