For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

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:

yaml

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:

json

Example response:

json

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

json

The rule "premium-video" must exist in SMC configuration:

yaml

Activation process:

  1. PCF sends pccRuleId "premium-video" in SmPolicyDecision
  2. SMC looks up "premium-video" in local configuration
  3. If found, SMC activates the rule using flow descriptions from configuration
  4. 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 ID
  • refTcData - 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:

yaml
json

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

yaml

Multiple Rules for Different Service Tiers

yaml

The PCF activates the appropriate rule based on subscriber profile.

With Longer Timeout

yaml

Troubleshooting

PCF Not Reachable

Symptom: Sessions fail with Npcf connection errors.

Possible causes:

  • Incorrect PCF URI
  • Network connectivity issues
  • PCF service not running

Solution:

  1. Verify PCF URI is correct:

    yaml
  2. Test connectivity from SMC pod:

    bash
  3. Check PCF service status

  4. 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:

  1. Verify rule exists in SMC configuration:

    yaml
  2. Check SMC logs for the exact rule name in the error

  3. Verify case-sensitivity - "Premium-Video" ≠ "premium-video"

  4. 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:

  1. Increase timeout:

    yaml
  2. Check PCF performance and load

  3. Review PCF logs for slow database queries or external calls

  4. 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:

  1. Verify rule configuration syntax:

    yaml
  2. Check rule precedence for conflicts (see PCC Rules)

  3. Test with a simple catch-all rule first:

    yaml
  4. Review 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:

yaml

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.