Skip to content

PCF / SM Policy Association / PCC Rule — How Policy Reaches the UE, gNB and UPF

Difficulty: Advanced (deep dive) / Estimated study time: 40 min / Prerequisites: GFBR / MFBR / AMBR / ARP, PFCP and PDR / FAR / QER / URR, Policy / Main actors: PCF, SMF / Main interfaces: N7 (Npcf_SMPolicyControl), N1, N2, N4

Learning objectives

After reading this chapter, you will be able to:

  • Explain that an SM Policy Association is a per-PDU-Session relationship between the SMF and the PCF, established with Npcf_SMPolicyControl_Create
  • List the inputs to PCF decisions (input from the SMF / Policy Data in the UDR / AF requests, etc.)
  • Explain the components of a PCC Rule (SDF template, precedence, QoS parameters, charging, gate status)
  • Explain with a diagram that the PCF does not configure the UE, gNB or UPF directly, and that the SMF translates PCC Rules into QoS Rules (N1) / QoS Flow Level QoS Parameters (N2) / PDR, QER, URR (N4)
  • Explain the flow from PCF-initiated SM Policy Association Modification to Network requested PDU Session Modification
  • Isolate "the policy does not arrive", "the PCF is correct but the UPF is wrong" and "only the RAN is wrong" by looking across interfaces

Prerequisites

The focus of this chapter (Level ∞ Deep Dive)

Policy covered the big picture "the PCF creates PCC Rules and distributes them to the SMF over N7", and N7 covered its nature as an SBI. This chapter digs into how the contents of a PCC Rule are decomposed and translated in the SMF into separate configurations for the UE, gNB and UPF, and how to correlate those mappings in a trace. The HTTP/2 and JSON details of N7 are covered in the next chapter, N7 SBI analysis, and AF-initiated requests in AF / N5.


Why — the one who decides the QoS "values" is not the one who executes them

Up to the previous chapter, we looked at QoS values such as 5QI, GFBR, MFBR, Session-AMBR and ARP. So for a given flow of a given subscriber, who decides those values, and who configures them in each node?

  • Deciding the values requires looking at the subscription (UDR), the destination (DNN / S-NSSAI), application requirements (AF) and operator policy as a whole. This is more consistent when concentrated in a dedicated policy NF rather than in individual nodes → the PCF.
  • On the other hand, the UE, gNB and UPF are each configured with a different protocol (NAS / NGAP / PFCP) and a different information format. The one that can talk to all three is the SMF, which manages the PDU Session.

5GC therefore uses a division of labor in which the PCF decides (Policy Decision) and the SMF translates and deploys it (control of policy enforcement) (TS 23.503 §4.2 / §6.2.1, to be confirmed).

Analogy: The PCF is "the pricing and service planning department at head office", and the SMF is "the on-site construction manager". The planning department writes a policy document (PCC Rule) saying "this customer's video is capped at 10 Mbps", but it does no wiring. The construction manager reads the policy document and rewrites it into a manual for the handset (QoS Rule), an instruction sheet for the base station (QoS Profile) and settings for the switch (PDR / QER), and hands each one out.


What — SM Policy Association

Types of Policy Association held by the PCF

The PCF holds a Policy Association per peer NF. This chapter deals with the SM Policy Association.

Policy Association Peer Service Unit Main contents Procedures
AM Policy Association AMF Npcf_AMPolicyControl (N15) UE Service Area Restriction, RFSP, UE-AMBR, etc. TS 23.502 §4.16.1–§4.16.3
SM Policy Association SMF Npcf_SMPolicyControl (N7) PDU Session PCC Rules, Session Rules, Policy Control Request Triggers TS 23.502 §4.16.4–§4.16.6
UE Policy Association AMF (transparently delivered to the UE) Npcf_UEPolicyControl UE URSP, etc. TS 23.502 §4.16.11 onward (to be confirmed)

One SM Policy Association is created per PDU Session; it is born with PDU Session establishment and ends with its release (TS 23.502 §4.16.4 / §4.16.6).

Lifecycle of an SM Policy Association

Operation Direction Trigger Specification
Npcf_SMPolicyControl_Create SMF → PCF PDU Session establishment TS 23.502 §4.16.4 / §5.2.5.4.2 (sub-clauses to be confirmed), TS 29.512 §4.2.2 (to be confirmed)
Npcf_SMPolicyControl_Update SMF → PCF A Policy Control Request Trigger condition is met (UE IP address allocation, location / RAT change, etc.), UE-requested QoS change TS 23.502 §4.16.5.1, TS 29.512 §4.2.4 (to be confirmed)
Npcf_SMPolicyControl_UpdateNotify PCF → SMF A policy change on the PCF side (AF request, change of Policy Data in the UDR, etc.) TS 23.502 §4.16.5.2, TS 29.512 §4.2.3 (to be confirmed)
Npcf_SMPolicyControl_Delete SMF → PCF PDU Session release TS 23.502 §4.16.6, TS 29.512 §4.2.5 (to be confirmed)

PCC is conditional

The SMF creates an SM Policy Association with the PCF when dynamic PCC is used (TS 23.502 §4.3.2.2.1 step 7; step numbers to be confirmed). In deployments without a PCF, QoS is determined by the SMF's local configuration (local policy; how it is configured is implementation dependent). Which one is used is operator-configuration and implementation dependent.


What — what does the PCF base its policy on?

The inputs the PCF can use for PCC decisions are listed in TS 23.503 §6.2.1.2 (Input for PCC decisions, to be confirmed). The representative ones are organized below by where they come from.

flowchart LR
    SMF["SMF
Npcf_SMPolicyControl_Create / Update"] -->|"SUPI, DNN, S-NSSAI,
RAT/Access Type, ULI,
UE IP, subscribed Session-AMBR,
subscribed default QoS"| PCF["PCF
Policy Decision"] UDR["UDR
Policy Data"] -->|"N36 / Nudr
SM Policy Data,
Usage Monitoring Data"| PCF AF["AF
(direct or via NEF)"] -->|"N5 / Npcf_PolicyAuthorization
media and application info"| PCF CHF["CHF"] -->|"N28 Spending Limit
(policy counter status)"| PCF OP["Operator policy
(PCF local configuration)"] --> PCF PCF -->|"SmPolicyDecision
PCC Rule / Session Rule / PCRT"| SMF
Source Representative information Path / specification
SMF SUPI, PDU Session ID, PDU Session Type, DNN, S-NSSAI, Access Type, RAT Type, User Location Information, UE IP address, subscribed Session-AMBR / subscribed default QoS (values the SMF obtained from the UDM) N7 Create / Update (TS 23.502 §4.16.4 / §4.16.5.1)
UDR SM Policy Data (allowed services per DNN / S-NSSAI, subscriber categories, etc.), Usage Monitoring Data N36 (Nudr_DM_Query / Subscribe; TS 23.502 §4.16.4, §5.2.12; sub-clauses to be confirmed)
AF Target flows (IP 5-tuple or application ID), media type, requested bandwidth N5 (Npcf_PolicyAuthorization). External AFs via the NEF (AF / N5, NEF / N33)
CHF Policy counter status (e.g., the consumption stage of a monthly allowance) N28 (Spending Limit Control; TS 23.502 §4.16.4 / §4.16.8, to be confirmed)
Operator policy Rules per tariff plan, time-of-day rules, etc. PCF local configuration (implementation dependent)

The important point here is that the subscriber's "subscribed" Session-AMBR / default QoS are passed UDM → SMF → PCF, and the PCF returns them to the SMF as "authorized" values (TS 23.503 §6.4, to be confirmed). In deployments with a PCF, what the SMF ultimately uses are the values the PCF authorized.


What — the PCF's output: SmPolicyDecision

On N7, the PCF's decision is passed to the SMF in a data structure called SmPolicyDecision (TS 29.512 §5.6.2.4, to be confirmed). Its contents fall broadly into three kinds.

Kind Unit Contents Specification
Session Rule PDU Session Authorized Session-AMBR, authorized default QoS (5QI / ARP of the default QoS Flow) TS 23.503 §6.4 (to be confirmed)
PCC Rule Service Data Flow (SDF) Which traffic is handled with which QoS, charging and gate TS 23.503 §6.3
Policy Control Request Trigger (PCRT) PDU Session Conditions meaning "report to the PCF when this event occurs" (location change, RAT change, UE IP allocation, etc.) TS 23.503 §6.1.3.5 (to be confirmed)

Structure of a PCC Rule (TS 23.503 §6.3.1)

The table in TS 23.503 §6.3.1 (PCC rule information, to be confirmed) is summarized below by purpose.

PCC Rule
├─ Rule identifier                 ← unique within the PDU Session
├─ Service data flow detection     ← which traffic
│   ├─ Precedence                  ← evaluation order when rules overlap
│   └─ SDF template                ← one of the following
│       ├─ List of SDF filters      ← set of packet filters (IP 5-tuple, etc.)
│       └─ Application identifier  ← detect by application ID
├─ Policy control                  ← how to handle it
│   ├─ Gate status                 ← pass / block
│   ├─ 5QI / ARP                   ← QoS class and priority / pre-emption
│   ├─ UL / DL Maximum bitrate     ← per-SDF cap
│   ├─ UL / DL Guaranteed bitrate  ← for GBR
│   └─ QoS Notification Control, etc.
├─ Charging                        ← how to charge
│   ├─ Charging key (Rating Group)
│   ├─ Service identifier
│   ├─ Charging method / Measurement method
│   └─ ...
├─ Usage monitoring control        ← usage monitoring
└─ Traffic steering related (AF influence, etc.)
Group Representative parameters Where it ultimately takes effect
SDF detection SDF template, Precedence UE (packet filters of QoS Rules), UPF (SDF Filter of PDRs)
QoS 5QI, ARP, MBR / GBR gNB (QoS Flow Level QoS Parameters), UE (QoS Flow Description), UPF (QER)
Gate Gate status UPF (Gate Status of the QER)
Charging Charging key (Rating Group), etc. UPF (measured by URR) → SMF → CHF

Two kinds: Dynamic / Predefined (TS 23.503 §6.3.1, to be confirmed)

  • Dynamic PCC Rule: the PCF generates the full contents and sends them to the SMF.
  • Predefined PCC Rule: the contents are preconfigured, and the PCF only instructs activation / deactivation by name (Rule identifier). The SMF may pass the name to the UPF with the PFCP Activate Predefined Rules IE (TS 29.244 §7.5.2.2, to be confirmed); in that configuration a predefined rule with the same name is also needed on the UPF side. With Predefined rules, only the Rule ID flows on N7, so symptoms such as "the contents cannot be seen even by looking at N7" or "the rule does not take effect because of a missing configuration in the SMF / UPF" can occur. How Predefined rules are named and configured, and whether their contents live in the SMF or the UPF, is implementation dependent. Note: rules applied only from the SMF's local configuration without a PCF (sometimes called "static") are outside the classification of TS 23.503 §6.3.1; their naming and configuration are implementation dependent.

How — establishing the SM Policy Association

Call Flow (inside PDU Session Establishment)

In TS 23.502 §4.3.2.2.1, the SMF establishes the SM Policy Association after PCF selection (steps 7a / 7b), and supplements the information with an SMF-initiated Modification after UE IP address allocation (step 9). Step numbers differ by release in both cases (to be confirmed). Simplified together with the contents of §4.16.4, it looks like this.

sequenceDiagram
    participant UE
    participant AMF
    participant SMF
    participant PCF
    participant UDR
    participant UPF
    UE->>AMF: PDU Session Establishment Request (N1)
    AMF->>SMF: Nsmf_PDUSession_CreateSMContext
    Note over SMF: Get SM subscription data from UDM
(subscribed Session-AMBR / default QoS) Note over SMF: PCF Selection (NRF Discovery, etc.) SMF->>PCF: Npcf_SMPolicyControl_Create
(SUPI, DNN, S-NSSAI, RAT, ULI, subscribed QoS, etc.) PCF->>UDR: Nudr_DM_Query (SM Policy Data) UDR-->>PCF: Policy Data PCF->>UDR: Nudr_DM_Subscribe (subscribe to change notifications) Note over PCF: Policy Decision PCF-->>SMF: 201 Created + SmPolicyDecision
(Session Rule, PCC Rule, PCRT) Note over SMF: UPF Selection and UE IP allocation SMF->>PCF: Npcf_SMPolicyControl_Update
(PCRT condition met, e.g. UE IP allocated) PCF-->>SMF: Updated policy (if any) Note over SMF: QoS Flow binding and QFI allocation
(translate PCC Rules) SMF->>UPF: PFCP Session Establishment
(PDR / FAR / QER / URR) SMF->>AMF: Namf_Communication_N1N2MessageTransfer
(N1: QoS Rules etc. / N2: QoS Flow info)

Signal Flow

# Message Segment Meaning Specification
1 PCF Selection SMF (⇔ NRF) Select a PCF by DNN / S-NSSAI, etc. The SMF may also receive a PCF ID from the AMF TS 23.501 §6.3.7.1
2 Npcf_SMPolicyControl_Create SMF → PCF Request to establish the SM Policy Association TS 23.502 §4.16.4
3 Nudr_DM_Query / Subscribe PCF → UDR Retrieve Policy Data and subscribe to change notifications (if the PCF does not already hold it) TS 23.502 §4.16.4
4 Create Response (SmPolicyDecision) PCF → SMF Return Session Rules / PCC Rules / PCRTs TS 23.502 §4.16.4, TS 29.512 §4.2.2 (to be confirmed)
5 Npcf_SMPolicyControl_Update SMF → PCF Report that a PCRT condition is met (e.g., UE IP allocation) TS 23.502 §4.16.5.1
6 PFCP Session Establishment SMF → UPF Translate PCC Rules into PDR / QER / URR / FAR and configure them TS 29.244 §7.5.2
7 N1N2MessageTransfer → NGAP / NAS SMF → AMF → gNB / UE QoS Flow information (N2) and QoS Rules (N1) PDU Session Establishment deep dive

If a BSF is deployed, the PCF registers binding information for the SM Policy Association in the BSF (Nbsf_Management_Register; TS 23.502 §5.2.13.2.2. The trigger for registration (when the UE IP / MAC is determined; §4.16.4 / §4.16.5.1) is to be confirmed). This is the mechanism by which an AF finds "the PCF serving this UE's session"; details are covered in BSF / PCF Binding.

The SMF's behavior when Create fails is implementation dependent

When PCF selection fails or Create returns an error response, whether the SMF rejects the PDU Session or continues with local policy depends on operator configuration and implementation. The symptom "the PCF was down but the session was still established (yet the QoS is not as expected)" can sometimes be explained by this fallback.


How — the most important diagram: the PCF does not configure directly; the SMF translates

The PCF does not send PFCP to the UPF, does not send NGAP to the gNB, and does not send 5GSM messages to the UE. The PCF's output is only the SmPolicyDecision on N7; translating it into each node's language is the SMF's job.

flowchart TD
    PCF["PCF
SmPolicyDecision
PCC Rule + Session Rule"] -->|"N7
Npcf_SMPolicyControl"| SMF["SMF = translator
QoS Flow binding
QFI allocation"] SMF -->|"N4 PFCP
PDR / QER / URR / FAR"| UPF["UPF
detection, gate, rate, metering"] SMF -->|"Namf_Communication_N1N2MessageTransfer
N1 SM container + N2 SM information"| AMF["AMF
relay only"] AMF -->|"NAS 5GSM
QoS Rules / QoS Flow Descriptions / Session-AMBR"| UE["UE
UL packet → QFI"] AMF -->|"NGAP
QFI + QoS Flow Level QoS Parameters"| GNB["gNB
QoS Flow → DRB"]
PCF ──X──► UPF     does not speak PFCP (the controlling side of N4 is the SMF)
PCF ──X──► gNB     does not speak NGAP (the N2 peer is the AMF)
PCF ──X──► UE      does not send SM QoS Rules (the N1 SM peer is the SMF)

Even the PCF's only path to deliver something to the UE goes via the AMF

The PCF delivers UE Policy (URSP, etc.) to the UE, but this too is transparent NAS delivery via the AMF (TS 23.502 §4.2.4.3, to be confirmed). It is separate from SM QoS Rules, and the PCF never touches the radio or the user plane directly.

What is the SMF doing — QoS Flow binding and translation

TS 23.501 §5.7.1.5 (QoS Flow mapping, to be confirmed) organizes the SMF's role as follows.

  1. QoS Flow binding: decide, for each PCC Rule, whether to put it into an existing QoS Flow or create a new QoS Flow. The binding parameters used are 5QI and ARP (plus QNC, Priority Level, Averaging Window and MDBV if set) (TS 23.503 §6.1.3.2.4, to be confirmed). PCC Rules with the same binding parameters are grouped into the same QoS Flow.
  2. QFI allocation: the SMF allocates a QFI per QoS Flow.
  3. Translation: decompose the QoS Flow / PCC Rule information into the form each of the UE, gNB and UPF needs.
Element of the PCC Rule / Session Rule N1 → UE (TS 24.501) N2 → gNB (TS 38.413) N4 → UPF (TS 29.244)
SDF template (UL part) Packet filters of the QoS Rule — (no packet filters are passed to the gNB) SDF Filter of the UL PDR
SDF template (DL part) DL packet filters may be included in a QoS Rule but are not used for the UE's UL classification (whether to include them is the SMF's decision; TS 23.501 §5.7.6.1, to be confirmed) — SDF Filter of the DL PDR
Precedence QoS Rule precedence — PDR Precedence
QFI (allocated by the SMF) QFI of the QoS Rule QFI QFI of the QER (DL marking)
5QI / ARP QoS Flow Description (5QI; ARP is not sent to the UE) QoS Flow Level QoS Parameters (5QI, ARP) — (the UPF does not handle 5QI directly; expressed via QFI)
GBR / MBR (per SDF; for a GBR Flow) QoS Flow Description (per-Flow GFBR / MFBR) GBR QoS Flow Information (per-Flow GFBR / MFBR) GBR / MBR of the QER
Per-SDF MBR — — MBR of the QER (linked to the SDF PDR)
Gate status — — Gate Status of the QER
Charging key, etc. — — URR (measurement results go SMF → CHF)
Session Rule: Session-AMBR Session-AMBR IE PDU Session Aggregate Maximum Bit Rate Session-level QER (MBR)

(N1: TS 24.501 §9.11.4.12 QoS flow descriptions / §9.11.4.13 QoS rules / §9.11.4.14 Session-AMBR; N2: TS 38.413 §9.3.1.12 QoS Flow Level QoS Parameters; N4: TS 29.244 §7.5.2.2 / §7.5.2.5. All clause numbers to be confirmed.)

PCC Rules and per-node settings are not one-to-one

  • Several PCC Rules can be grouped into one QoS Flow (when the binding parameters are the same).
  • One PCC Rule often produces two PDRs, one for UL and one for DL.
  • The gNB does not know about SDFs. All the gNB knows is "the QoS Flow with QFI = x has this 5QI / ARP / bit rate".
  • The mapping between PCC Rule IDs and PFCP PDR IDs / QER IDs is managed inside the SMF, and PCC Rule IDs generally do not appear on N4 (the numbering scheme is implementation dependent). For Predefined PCC Rules, however, the SMF may pass the name to the UPF with the PFCP Activate Predefined Rules IE (TS 29.244 §7.5.2.2, to be confirmed).
  • The per-QoS-Flow GFBR / MFBR are derived by the SMF from the GBR / MBR of the PCC Rules bound to the same Flow (TS 23.501 §5.7.1.5 / TS 23.503 §6.1.3.2.4, to be confirmed).

Analogy: Even for the same policy "video capped at 10 Mbps", the manual for the handset says "attach this number tag (QFI) to packets for this destination", the instruction sheet for the base station says "parcels with tag x get this priority", and the settings for the switch say "throttle packets matching this condition to 10 Mbps and count the volume" — each recipient gets only the words it understands.


How — policy changes even after the session is established

PCF-initiated SM Policy Association Modification (TS 23.502 §4.16.5.2)

The PCF can change the policy of an established SM Policy Association. Representative triggers are as follows (TS 23.502 §4.16.5.2, to be confirmed).

Trigger Example
Request from an AF Npcf_PolicyAuthorization_Create / Update (VoNR voice media, bandwidth request from a video application, etc.)
Change of Policy Data in the UDR Nudr_DM_Notify due to a tariff plan change
Change of a CHF policy counter The stage of the monthly allowance changed (Spending Limit)
PCF internal decision Time-of-day rules, etc. (implementation dependent)

Network requested PDU Session Modification (TS 23.502 §4.3.3.2)

On receiving an UpdateNotify from the PCF, the SMF initiates a PDU Session Modification as needed. In TS 23.502 §4.3.3.2, the PCF-initiated case is positioned as step 1b (step numbers to be confirmed).

sequenceDiagram
    participant UE
    participant gNB
    participant AMF
    participant SMF
    participant PCF
    participant UPF
    Note over PCF: Trigger: AF request / Policy Data change, etc.
    PCF->>SMF: Npcf_SMPolicyControl_UpdateNotify
(add / modify / remove PCC Rules) SMF-->>PCF: 204 No Content, etc. Note over SMF: Re-evaluate QoS Flow binding
add to existing Flow or create new Flow SMF->>AMF: Namf_Communication_N1N2MessageTransfer
(N1: PDU Session Modification Command
N2: PDU Session Resource Modify Request Transfer) AMF->>gNB: NGAP PDU Session Resource Modify Request gNB->>UE: RRC Reconfiguration (NAS: Modification Command) gNB-->>AMF: PDU Session Resource Modify Response AMF->>SMF: Nsmf_PDUSession_UpdateSMContext (N2 SM info) SMF->>UPF: PFCP Session Modification
(Create/Update PDR, QER, URR) UPF-->>SMF: PFCP Session Modification Response UE->>AMF: PDU Session Modification Complete (N1) AMF->>SMF: Nsmf_PDUSession_UpdateSMContext (N1 SM info) Note over SMF: Update the UPF again if needed and
report the result to the PCF (Npcf_SMPolicyControl_Update)
  • If the UE is in CM-IDLE, a Network Triggered Service Request (Paging) is needed before N1/N2 can be delivered (TS 23.502 §4.2.3.3; the conditions within §4.3.3.2 are to be confirmed).
  • The diagram is a representative example following the basic flow of TS 23.502 §4.3.3.2 (N4 is updated after the N2 response is received; step numbers to be confirmed). Some implementations pre-configure N4 first (implementation dependent). See PDU Session Modification / Release for the full picture.
  • When the change is completed in the UPF alone (pattern A below), the SMF may not send N1 / N2 at all. How far it goes depends on the change and on the SMF implementation.
  • The NAS side of PDU Session Modification is TS 24.501 §6.3.2 (Network-requested PDU session modification, to be confirmed), and the NGAP side is TS 38.413 §8.2.3 (PDU Session Resource Modify).

SMF-initiated and PCRTs

The opposite direction, SMF-initiated SM Policy Association Modification (TS 23.502 §4.16.5.1), is used when a Policy Control Request Trigger condition specified in advance by the PCF is met — for example "report when the RAT Type changes" or "report when a UE IP is allocated". On receiving the report, the PCF can review the policy and return new PCC Rules in the response.


How — practical example: bandwidth control for video only

Consider the requirement "limit only the traffic of a particular video streaming service to a DL maximum of 10 Mbps". Note that the scope the SMF updates changes depending on how the PCC Rule is built.

Pattern A: put it into the existing Non-GBR QoS Flow and throttle per SDF

PCC Rule "video-limit"
├─ Precedence: 100 (takes priority over the default rule)
├─ SDF template: DL  from 203.0.113.0/24 port 443 to UE   ← fictitious example
│                UL  from UE to 203.0.113.0/24 port 443
├─ 5QI / ARP: same values as the default QoS Flow (Non-GBR)
└─ DL Maximum bitrate: 10 Mbps
  • Because the binding parameters (5QI / ARP) are the same as those of the default QoS Flow, no new QoS Flow is created, and the rule is grouped under the existing QFI (TS 23.503 §6.1.3.2.4, to be confirmed).
  • The SMF adds to the UPF a PDR with an SDF Filter (Precedence 100) and a QER with DL MBR = 10 Mbps.
  • Because the gNB's QoS Flow parameters do not change, nothing may flow on N2. Whether to add a QoS Rule for the UE (whether the UL classification needs to change) is the SMF's decision (implementation dependent / to be confirmed).

Per-SDF MBR for Non-GBR traffic

The UL / DL Maximum bitrate of a PCC Rule is a value authorized for the SDF (TS 23.503 §6.3.1, to be confirmed). Enforcing it with a UPF QER (an MBR linked to the PDR) is the common implementation, but the clause of TS 23.501 that specifies enforcement of a per-SDF MBR for Non-GBR is to be confirmed.

Pattern B: create a dedicated GBR QoS Flow

When a dedicated QoS Flow with GBR is created in response to an AF request (e.g., guaranteeing live-streaming quality), the binding parameters (5QI / ARP) differ, so a new QFI is allocated and all of N4, N2 and N1 are updated.

flowchart LR
    A["PCC Rule added"] --> B{"binding parameters
(5QI, ARP, etc.) same as
an existing Flow?"} B -- "Yes (pattern A)" --> C["Bind to existing QFI
mainly only N4 updated
(N1 at SMF discretion)"] B -- "No (pattern B)" --> D["Allocate new QFI
update N4 + N2 + N1
(PDU Session Modification)"]

In real commercial networks, video may be identified not only by IP 5-tuple but also by Application identifier (application detection in the UPF; PFDs may be provided via the NEF; TS 23.502 §4.18, to be confirmed), and the detection accuracy and method are implementation dependent.


How — when an AF is involved (outline)

When the application side requests QoS, the AF sends a request to the PCF, and the PCF converts it into PCC Rules.

AF ──N5: Npcf_PolicyAuthorization_Create──► PCF
                                             │ (approve / modify / reject against subscriber and operator policy)
                                             ▼
                          Npcf_SMPolicyControl_UpdateNotify
                                             ▼
                                            SMF ──► N4 / N2 / N1

Packet Analysis (Wireshark)

Policy problems cannot be solved by looking at a single interface. Traverse N7 → N4 → N2 → N1 → N3 for the same PDU Session.

Display filters

Filter Purpose
http2 All of N7 (SBI). Keys are needed if TLS is used
http2.headers.path contains "npcf-smpolicycontrol" Narrow down to N7 operations (field name to be confirmed per version)
json JSON bodies such as SmPolicyDecision
pfcp N4 (Create / Update PDR, QER, URR)
ngap N2 (PDU Session Resource Setup / Modify)
nas-5gs N1 (PDU Session Establishment Accept / Modification Command; decryption settings are needed if NAS is ciphered)
gtp N3 (QFI in the PDU Session Container)

TLS support is mandatory for the SBI, but whether it is applied within a PLMN is up to the operator (TS 33.501 §13.1, to be confirmed). Labs such as Open5GS / free5GC are sometimes configured with cleartext HTTP/2 (configuration dependent). How to read HTTP/2 / JSON in detail is covered in the next chapter, N7 SBI analysis.

Decode example (conceptual)

The following is a conceptual representation following the OpenAPI definitions of TS 29.512; attribute names are to be confirmed and values are fictitious (capture needed).

POST /npcf-smpolicycontrol/v1/sm-policies  →  201 Created
SmPolicyDecision
├─ sessRules
│   └─ "sess-1"
│       ├─ authSessAmbr: { uplink: "100 Mbps", downlink: "200 Mbps" }
│       └─ authDefQos:   { 5qi: <Non-GBR value>, arp: { ... } }
├─ pccRules
│   └─ "video-limit"
│       ├─ pccRuleId:  "video-limit"
│       ├─ precedence: 100
│       ├─ flowInfos:
│       │   └─ flowDescription: "permit out 6 from 203.0.113.0/24 443 to assigned"
│       │      flowDirection:   BIDIRECTIONAL
│       └─ refQosData: [ "qos-video" ]
├─ qosDecs
│   └─ "qos-video"
│       ├─ 5qi:    <same value as the default QoS Flow>
│       └─ maxbrDl: "10 Mbps"
└─ policyCtrlReqTriggers: [ ... ]
  • flowDescription reuses the IPFilterRule format of RFC 6733 (TS 29.512 refers to the Flow-Description AVP of TS 29.214 §5.4.2, to be confirmed).
  • A PCC Rule does not hold QoS values directly; it references qosDecs via refQosData. In a trace, follow the reference to its target.

The corresponding N4 side (conceptual, capture needed):

PFCP Session Modification Request
├─ Create PDR
│   ├─ PDR ID: 10
│   ├─ Precedence: 100
│   ├─ PDI: Source Interface = Core, UE IP Address, SDF Filter (203.0.113.0/24 443)
│   ├─ FAR ID: 2
│   └─ QER ID: 10, 1           ← QER for the SDF and QER for Session-AMBR
└─ Create QER
    ├─ QER ID: 10
    ├─ Gate Status: UL OPEN / DL OPEN
    ├─ MBR: DL 10 Mbps
    └─ QFI: (same as the default QoS Flow)

Order of checks

flowchart LR
    A["① N7
Create / UpdateNotify
PCC Rule and qosDecs"] --> B["② N4
PDR SDF Filter and Precedence
QER MBR, Gate, QFI"] B --> C["③ N2
QFI and
QoS Flow Level QoS Parameters"] C --> D["④ N1
QoS Rules and
QoS Flow Descriptions"] D --> E["⑤ N3
QFI in GTP-U"]

Build a comparison table

Item N7 (PCF → SMF) N4 (SMF → UPF) N2 (SMF → gNB) N1 (SMF → UE)
Target flow flowDescription: 203.0.113.0/24 443 SDF Filter: same (none) QoS Rule packet filter (UL)
Priority precedence: 100 PDR Precedence: 100 (none) QoS Rule precedence
QFI (the PCF does not know it) QER QFI: 1 (fictitious example) QFI: 1 QoS Rule QFI: 1
Bandwidth maxbrDl: 10 Mbps QER MBR DL: 10 Mbps (no per-Flow MBR for Non-GBR) (same)

Note that the PCF does not know the QFI (the SMF allocates it). The primary key to correlate N7 and N4 is the SDF (packet filters). Because the SMF may convert precedence values (e.g., the N1 QoS rule precedence is one octet; the conversion is implementation dependent), compare precedence by relative order rather than by exact value.


Trouble Shooting

① The policy does not arrive (the QoS is not as expected)

Before looking at the UPF, check from upstream in order.

① Did PCF selection succeed? (NRF Discovery, the SMF's PCF configuration)
② Did Npcf_SMPolicyControl_Create return 201 Created? (not 4xx / 5xx?)
③ Does the SmPolicyDecision contain the expected PCC Rules / Session Rules?
④ If a PCC Rule is Predefined (Rule ID only), is a rule with the same name configured in the SMF (and also in the UPF when Activate Predefined Rules is used)?
⑤ Did the SMF accept the PCC Rule? (SMF logs, failure reports in Update)
⑥ Was it deployed correctly to N4 / N2 / N1?

② The PCF is correct but the UPF is wrong

Line up the SmPolicyDecision on N7 and the Create / Update QER and PDR on N4, keyed by SDF, comparing precedence by relative order. If they differ, the cause is either the SMF's translation (binding, unit conversion, rule merging) or the UPF not accepting the request (PFCP Cause).

③ The UPF is correct but only the RAN is wrong

Check the QoS Flow Setup Request List / QoS Flow Add or Modify Request List in the N2 PDU Session Resource Setup / Modify Request Transfer, and within it the QFI and QoS Flow Level QoS Parameters (TS 38.413 §9.3.4.1 / §9.3.4.3, to be confirmed). Because N2 carries no SDF information, "the UPF treats each SDF differently but the gNB sees one QoS Flow" is normal for pattern A binding.

Symptom Likely cause Check point Log Packet Resolution
The PDU Session is established but PCC Rules have no effect at all After PCF selection failed, the SMF continued with local policy (implementation dependent) Presence of Create and its response code SMF log http2 Check NRF / PCF configuration and whether the PCF is running
Create returns 4xx / 5xx No Policy Data for the subscriber in the UDR, missing mandatory attributes, etc. cause in ProblemDetails PCF log http2 / json Provision Policy Data, check what the SMF sends (N7 SBI analysis)
The PCC Rule ID arrives but has no effect Predefined PCC Rule not configured in the SMF / UPF Whether the SmPolicyDecision contains only IDs, Activate Predefined Rules on N4 SMF / UPF log json / pfcp Add the rule definition on the SMF / UPF side
The PCF's MBR and the UPF's QER differ SMF translation / unit conversion, merging of multiple rules N7 qosDecs vs. N4 Create QER SMF log json / pfcp Check the SMF's PCC→PFCP conversion settings and version
Only a specific application does not get the expected QoS Precedence collision, wrong SDF template N7 precedence vs. N4 PDR Precedence (relative order) / SDF Filter SMF / UPF log pfcp Fix the precedence / filters of the PCC Rule
The UPF is correct but radio quality does not change No QoS Flow change on N2, or the gNB rejected it QFI and Failed lists in Modify Request / Response gNB / AMF log ngap Check the binding policy (is a new Flow needed?) and whether the gNB can admit it
Only UL does not go into the expected QoS Flow The QoS Rule did not reach the UE / wrong packet filter QoS rules in the Modification Command UE / SMF log nas-5gs Check the SMF's QoS Rule generation
Nothing changes after an AF request No UpdateNotify sent, or the PCF cannot be found via the BSF N5 response, presence of N7 UpdateNotify PCF log http2 Check the AF / N5 and BSF paths

Boundary between 3GPP specifications and vendor implementations

Defined by 3GPP Decided by the vendor / operator
SM Policy Association procedures (Create / Update / UpdateNotify / Delete) The PCF's policy DB schema, rule description language, GUI
Information elements of PCC Rules / Session Rules / PCRTs How tariff plans are designed into PCC Rules, Rule ID naming
Principles of QoS Flow binding (binding parameters) The SMF's PCC Rule cache, Pod / DB configuration
Formats of N1 QoS Rules / N2 QoS Flow Level QoS Parameters / N4 PDR, QER, URR How PCC Rule IDs map to PDR / QER IDs, numbering scheme
The concepts of Dynamic / Predefined PCC Rules, PFCP Activate Predefined Rules How Predefined rules are configured and where they live (SMF / UPF), local policy when no PCF is used, fallback behavior when the PCF is unreachable
The N7 Npcf_SMPolicyControl API (TS 29.512) CLIs such as show policy session, tracing features

"Which Pod / DB in the SMF caches the policy received from the PCF" is outside the scope of 3GPP.


Comparison with EPC (4G)

Item 4G EPC 5GC
Policy decision PCRF PCF
Policy recipient PCEF (inside the PGW) SMF (translation) + UPF (enforcement)
Interface Gx (Diameter, TS 29.212) N7 (SBI, TS 29.512)
Establishment CCR-Initial / CCA Npcf_SMPolicyControl_Create
Network-side change RAR / RAA (PCRF → PCEF) Npcf_SMPolicyControl_UpdateNotify
Report from the recipient CCR-Update / CCA (Event Trigger) Npcf_SMPolicyControl_Update (PCRT)
Termination CCR-Termination / CCA Npcf_SMPolicyControl_Delete
PCC Rule → entity Bearer binding (EPS Bearer; TFT to the UE) QoS Flow binding (QFI; QoS Rules to the UE)
AF interworking Rx (Diameter) N5 (Npcf_PolicyAuthorization)
Framework specification TS 23.203 TS 23.503

The concept of a PCC Rule is inherited from TS 23.203 §6.3 (to be confirmed). However, thinking of it as a simple one-to-one substitution PCRF = PCF, PGW = SMF leads to misunderstanding. In 4G, the PCEF inside the PGW handled everything from "receive" to "enforce"; in 5G, the structure is split so that the SMF translates and the UPF, gNB and UE each enforce. Gx bearer binding is TS 23.203 §6.1.1.4 (to be confirmed).


3GPP Specification

Specification Clause Contents
TS 23.503 §4.2 / §6.2.1 Policy framework architecture / PCF functionality (to be confirmed)
TS 23.503 §6.2.1.2 Input for PCC decisions (to be confirmed)
TS 23.503 §6.3 / §6.3.1 Structure of PCC Rules, Dynamic / Predefined (sub-clauses to be confirmed)
TS 23.503 §6.4 PDU Session related policy (Session Rule, to be confirmed)
TS 23.503 §6.1.3.2.4 / §6.1.3.5 QoS Flow binding / Policy Control Request Triggers (to be confirmed)
TS 23.502 §4.16.4 SM Policy Association Establishment
TS 23.502 §4.16.5.1 / §4.16.5.2 SMF-initiated / PCF-initiated SM Policy Association Modification (sub-clauses to be confirmed)
TS 23.502 §4.16.6 SM Policy Association Termination
TS 23.502 §4.3.2.2.1 UE-requested PDU Session Establishment (where PCF interaction happens; step numbers to be confirmed)
TS 23.502 §4.3.3.2 UE or network requested PDU Session Modification
TS 23.502 §5.2.5.4 Npcf_SMPolicyControl service (sub-clauses to be confirmed)
TS 23.501 §5.7.1.5 QoS Flow mapping (binding by the SMF and generation of QoS Rules / QoS Profile / SDF information; to be confirmed)
TS 23.501 §6.3.7.1 PCF discovery and selection
TS 29.512 §4.2.2–§4.2.5 / §5.6.2 Npcf_SMPolicyControl operations / data model (to be confirmed)
TS 29.513 §7 QoS parameter mapping for PCC (to be confirmed)
TS 24.501 §6.3.2 / §9.11.4.12–§9.11.4.14 Network-requested PDU session modification / QoS flow descriptions, QoS rules, Session-AMBR (to be confirmed)
TS 38.413 §8.2.3 / §9.3.1.12 / §9.3.4.1 / §9.3.4.3 PDU Session Resource Modify / QoS Flow Level QoS Parameters / Setup and Modify Request Transfer (to be confirmed)
TS 29.244 §7.5.2.2 / §7.5.2.5 / §7.5.4 Create PDR / Create QER / Session Modification Request (to be confirmed)
TS 23.203 §6.1.1.4 / §6.3 EPC bearer binding / PCC Rules (for comparison, to be confirmed)
TS 29.212 §4 Gx (for comparison, to be confirmed)

Summary

  • An SM Policy Association is the per-PDU-Session relationship between the SMF and the PCF. Established with Create, modified with Update (SMF-initiated) / UpdateNotify (PCF-initiated), and ended with Delete
  • The PCF decides based on input from the SMF (DNN, S-NSSAI, RAT, location, subscribed QoS), Policy Data in the UDR, AF requests and CHF status
  • Its output is Session Rules (Session-AMBR, default QoS), PCC Rules (SDF template, precedence, QoS, gate, charging) and PCRTs
  • The PCF does not configure the UE, gNB or UPF directly. The SMF performs QoS Flow binding and QFI allocation and translates into QoS Rules (N1) / QoS Flow Level QoS Parameters (N2) / PDR, QER, URR (N4)
  • The gNB does not know about SDFs. Correlate N7 and N4 by SDF (precedence by relative order), and N4 with N2 / N1 by QFI
  • Policy changes after establishment go PCF-initiated Modification (§4.16.5.2) → Network requested PDU Session Modification (§4.3.3.2). Depending on the binding, only N4, or N4 + N2 + N1, are updated

Comprehension check

Q1. The PCF notified the SMF of a new QoS policy. Which is the most appropriate basic path for reflecting this policy in the UPF? A. The PCF sends a PFCP Session Modification Request directly to the UPF / B. The PCF sends an NGAP QoS Update to the UPF via the AMF / C. The SMF, having received the policy decision from the PCF, converts it into the necessary PDRs/QERs etc. and applies them to the UPF using N4 PFCP / D. The PCF notifies the UPF of the policy by rewriting the QFI of N3 GTP-U packets

Answer: C. The controlling side of N4 (PFCP) is the SMF; the PCF does not speak PFCP (A is wrong). NGAP is the AMF⇔gNB protocol and does not reach the UPF (B is wrong). The QFI on N3 is user-plane marking, not a means of notifying policy (D is wrong). The SMF, having received the PCF's UpdateNotify, translates it into PDRs / QERs etc. and applies them to the UPF with PFCP Session Modification (TS 23.502 §4.16.5.2 / §4.3.3.2).

Q2. Looking at the SmPolicyDecision on N7, you cannot find a QFI in the PCC Rule. Is it a configuration omission?

It is not an omission. The SMF allocates QFIs; the PCF only gives QoS parameters such as 5QI / ARP in the PCC Rule. The SMF looks at the binding parameters (5QI, ARP, etc.), decides whether to group the rule into an existing QoS Flow or create a new one, and assigns a QFI (TS 23.501 §5.7.1.5 / TS 23.503 §6.1.3.2.4, to be confirmed). When correlating N7 and N4, use the SDF (packet filters) as the key rather than the QFI, and compare precedence by relative order.

Q3. You added a PCC Rule with DL MBR 10 Mbps for video traffic. It is reflected in the UPF's QER, but no PDU Session Resource Modify flows on NGAP. Is this abnormal?

Not necessarily. If the PCC Rule's 5QI / ARP are the same as those of the existing default QoS Flow, the SMF binds it to the existing QoS Flow and enforces the per-SDF MBR with a QER in the UPF. Since the gNB's QoS Flow parameters do not change, an N2 update may be unnecessary — the gNB does not know about SDFs and only handles QoS per QFI. If the PCC Rule required a new GBR Flow, N2 / N1 would also be updated.

Q4. The SmPolicyDecision contains only the ID of a PCC Rule, with no SDF template or QoS. What might be going on, and where do you check?

It may be a Predefined PCC Rule. Its contents are preconfigured in the SMF, and the PCF only instructs activation by Rule ID (TS 23.503 §6.3.1, to be confirmed). In this case, the place to check is not the PCF but the SMF's rule definitions (and also the UPF's rule definitions in configurations where the name is passed to the UPF with PFCP Activate Predefined Rules). If the SMF / UPF has no rule with that name, or its contents differ from what is expected, the policy has no effect even though N7 is normal.

Q5. What is the 5GC operation equivalent to the RAR (Re-Auth-Request) of 4G Gx, and what happens after it?

It is Npcf_SMPolicyControl_UpdateNotify (PCF → SMF). The SMF re-binds the new PCC Rules to QoS Flows and, as needed, initiates a Network requested PDU Session Modification (TS 23.502 §4.3.3.2), applying it with PFCP Session Modification (N4), PDU Session Resource Modify (N2) and PDU Session Modification Command (N1).


Next Step