Npcf Policy Control Configuration
Overview
Npcf_SMPolicyControl is the HTTP/2-based interface between SMC and the Policy Control Function (PCF) in 5G Core networks, defined in 3GPP TS 29.512. Through Npcf, the PCF controls PCC (Policy and Charging Control) rules for user sessions.
SMC implements the session management function role and communicates with an external PCF via the Npcf interface.
References:
- 3GPP TS 23.503 - Policy and charging control framework for the 5G System
- 3GPP TS 29.512 - 5G System; Session Management Policy Control Service
- PCC Rules - PCC rule configuration
Critical Limitation
Caution
CRITICAL LIMITATION: SMC's Npcf implementation supports predefined PCC rules only. The PCF can only reference rules by pccRuleId that already exist in SMC configuration. SMC cannot create or install new rules dynamically from Npcf SmPolicyDecision messages. All rules must be pre-configured in the SMC helm chart before they can be activated via Npcf.
This limitation means:
- PCF cannot define new rules with flow descriptions
- PCF cannot modify rule parameters (precedence, rating group, etc.)
- PCF can only activate, deactivate, or associate charging/traffic control decisions with existing rules
Basic Configuration
Enable Npcf and configure the PCF endpoint:
Configuration parameters:
When enabled is true, SMC sends HTTP POST requests to the PCF during session establishment, updates, and termination.
Npcf Operations
SMC implements three Npcf operations:
Create (POST /sm-policies)
Sent when a user session is established (for example, GTP Create Session Request or PFCP Session Establishment).
HTTP Method: POST
Path: /sm-policies
Direction: SMC → PCF
Body: SmPolicyContextData containing:
- User identity (SUPI, GPSI)
- Session parameters (DNN, PDU session type, IP address)
- Network context (PLMN, location, RAT type)
Response: SmPolicyDecision containing:
- PCC rule references (pccRules)
- Charging decisions (chgDecs)
- Traffic control decisions (traffContDecs)
Example request:
Example response:
Update (POST /sm-policies/{smPolicyId}/update)
Sent when session parameters change.
HTTP Method: POST
Path: /sm-policies/{smPolicyId}/update
Direction: SMC → PCF
Body: SmPolicyUpdateContextData with changed parameters
Response: SmPolicyDecision with updated policies
Triggers for updates:
- Location change
- RAT type change
- Network slice change
- QoS modifications
Delete (POST /sm-policies/{smPolicyId}/delete)
Sent when a user session terminates.
HTTP Method: POST
Path: /sm-policies/{smPolicyId}/delete
Direction: SMC → PCF
Body: SmPolicyDeleteData with termination information
Response: Empty (204 No Content)
PCC Rule Activation
The PCF activates pre-configured PCC rules by sending SmPolicyDecision with pccRules references.
Rule Reference Format
The rule "premium-video" must exist in SMC configuration:
Activation process:
- PCF sends
pccRuleId"premium-video" in SmPolicyDecision - SMC looks up "premium-video" in local configuration
- If found, SMC activates the rule using flow descriptions from configuration
- If not found, rule activation fails
Important
The pccRuleId in SmPolicyDecision must exactly match the rule name in SMC configuration. Names are case-sensitive.
Charging and Traffic Control Decisions
The PCF can associate charging decisions (chgDecs) and traffic control decisions (traffContDecs) with PCC rules:
refChgData- References charging decision by IDrefTcData- References traffic control decision by ID
These decisions override or supplement parameters from the rule configuration.
Example: Rule configured for offline charging, PCF overrides to online:
Session Context Mapping
SMC maps EPC/GTP session attributes to 5G Npcf format:
Unsupported Features
The following Npcf features are not supported:
- QoS Policy - qosDecs, qosChars
- Usage Monitoring - umDecs, qosMonDecs
- Session Rules - sessRules
- Dynamic Rule Definition - Cannot create rules from PCF
- Application Detection Reporting - No application detection feedback to PCF
Example Configurations
Basic Npcf with Pre-configured Rules
Multiple Rules for Different Service Tiers
The PCF activates the appropriate rule based on subscriber profile.
With Longer Timeout
Troubleshooting
PCF Not Reachable
Symptom: Sessions fail with Npcf connection errors.
Possible causes:
- Incorrect PCF URI
- Network connectivity issues
- PCF service not running
Solution:
Verify PCF URI is correct:
yamlTest connectivity from SMC pod:
bashCheck PCF service status
Review SMC logs for HTTP error codes
Rule Not Found Errors
Symptom: PCF sends rule references but SMC reports rule not found.
Cause: The pccRuleId from PCF does not match any rule in SMC configuration.
Solution:
Verify rule exists in SMC configuration:
yamlCheck SMC logs for the exact rule name in the error
Verify case-sensitivity - "Premium-Video" ≠ "premium-video"
Coordinate rule names between SMC configuration and PCF database
Tip
Use lowercase names with hyphens for consistency: "premium-video", "basic-data"
PCF Timeouts
Symptom: Sessions fail with timeout errors.
Cause: PCF takes longer than configured timeout to respond.
Solution:
Increase timeout:
yamlCheck PCF performance and load
Review PCF logs for slow database queries or external calls
Consider caching policies in PCF if possible
Rule Activation Fails
Symptom: PCF sends rule reference but rule is not applied to traffic.
Possible causes:
- Rule exists but has invalid flow descriptions
- Rule precedence conflict
- Rule parameters conflict with session type
Solution:
Verify rule configuration syntax:
yamlCheck rule precedence for conflicts (see PCC Rules)
Test with a simple catch-all rule first:
yamlReview SMC logs for rule activation errors
Cannot Define Dynamic Rules
Symptom: Need to create rules dynamically from PCF but SMC rejects them.
Cause: This is a known limitation - SMC does not support dynamic rule creation via Npcf.
Solution:
Pre-configure all rules needed by the PCF in SMC:
The PCF then activates the appropriate pre-configured rule by pccRuleId.
Caution
If you need truly dynamic rules per subscriber (for example, different flow descriptions), Npcf cannot support this. Consider using Gx instead, which supports inline rule definitions.