The policy decisions are configured in three different locations, as indicated in the configuration file.
The files itself are yaml
files, but follow the specification of the Npcf_SMPolicyControl
API (3GPP TS 29.512)
Each directory can contain several files and they will each be interpreted as the type indicated by the directory. It is also possible to configure multiple rules of the same type in the same file. All the rules do not need to have their ID set, as the ID is the name of the rule.
At least one policy decision and a corresponding PCC rule is mandatory.
TRAFFIC_RULES_DIRECTORY
This directory contains the traffic rules. It must be structured as the TrafficControlData
data type.
Example:
edge-ulcl-scenario:
routeToLocs:
- dnai: access
- dnai: edge
PCC_RULES_DIRECTORY
This directory contains the PCC rules. It must be structured as the PccRule
data type. As seen in the example, when you want to influence traffic decisions, the ID in the refTcData
must refer to the one from the TRAFFIC_RULES_DIRECTORY.
Example:
edge-ulcl-rule:
flowInfos:
- flowDescription: permit out ip from 8.8.8.8 to assigned
precedence: 9
refTcData:
- edge-ulcl-scenario
POLICY_DECISIONS_DIRECTORY
In this directory you can define which PCC rule applies to which PDU session. There are currently four selection criteria:
- SUPI (only IMSI)
- DNN
- SLICE
- DEFAULT
It is recommended that either SUPI or DNN or SLICE is configured. However, when multiple values are present, the order of preference is as follows: SUPI, DNN, SLICE. Therefore, when a SUPI is given, the DNN and SLICE are ignored.
When neither of the values are set, the rule is considered a default rule. This means that this rule will always match in case no other rule has been found for a specific PDU session.
The syntax of the file is as follows:
rule-name: # only for you, it is not used by the PCF
supi_imsi: <imsi>
dnn: <dnn>
slice:
sst: <sst>
sd: "sd"
pcc_rules:
- edge-ulcl-rule
- <rule2>
- ...
The rules in PCC rules must be created in the PCC_RULES_DIRECTORY first.
Update of rules
In its current version, the PCF does not support life updates of the PCC rules. Thus, the rules need to be changed in the file system and the PCF restarted.
The files are read upon startup of the PCF. Check the logs to spot any faulty configuration such as when a PCC rule is referred in a policy decision, but does not exist.