Skip to content

N7 — SMF ⇔ PCF (Npcf_SMPolicyControl Reference Point)

Difficulty: Intermediate / Estimated study time: 20 min / Connection point: SMF ⇔ PCF / Protocol: HTTP/2 + JSON (SBI) / Related interfaces: N15, N5, N4

Learning objectives

After reading this page, you will be able to:

  • Explain that N7 is an SBI (Service Based Interface) and is fundamentally different in protocol/transport from N2 (NGAP/SCTP) and N4 (PFCP/UDP).
  • Explain that the substance of N7 is the service Npcf_SMPolicyControl (TS 29.512) provided by the PCF.
  • Explain the flow whereby the SMF establishes an SM Policy Association and obtains PCC rules.
  • Explain that "the reference point N7" and "the service Npcf_SMPolicyControl" are two views of the same thing.
  • Explain how it corresponds to 4G (EPC) Gx (PCEF/PGW ⇔ PCRF, Diameter).

Prerequisites

It will go more smoothly if you understand the following first.

Why — why it is needed

When the SMF assembles a PDU session, it must decide "at what QoS to flow this communication," "how to charge for it," and "whether to let this flow through or block it (gating)." But if the SMF decided all this arbitrarily, it would have to fix the SMF every time the operator's service rules (gold members get bandwidth priority, video is flat-rate, etc.) change.

Therefore, a path to inquire of the PCF, the arbiter of operator policy — "how should this subscriber, this session be treated?" — is needed. This is N7. Over N7, the SMF asks the PCF about the policy, and the PCF returns PCC rules (instruction sheets) it has judged from subscriber data (originating in the UDR) and operator rules. Without N7 (or without PCF coordination), the SMF could handle sessions only with static defaults, and fine-grained, per-subscriber, per-app dynamic PCC would be impossible.

An analogy: N7 is a hotline by which a field worker (SMF) asks the rules department (PCF) for a decision. The field does not decide the rules arbitrarily; over this dedicated line it inquires, "what QoS/charging for this customer?" and sets up the line according to the rules department's answer (the PCC rules).

Overview

N7 is the reference point connecting SMF ⇔ PCF. However, that N7 is an SBI (Service Based Interface) is a decisive difference from N2 (NGAP/SCTP) and N4 (PFCP/UDP). SBI is a mechanism by which NFs invoke each other's services via Web APIs (HTTP), using HTTP/2 + JSON (RESTful) over TLS as the common transport.

The substance of N7 is the service Npcf_SMPolicyControl (TS 29.512) provided by the PCF. The SMF invokes this service to establish an SM Policy Association (the binding of the SM policy) and obtain the authorized PCC rules (QoS, charging, gating).

The reference point N7 and the service Npcf_SMPolicyControl are two views of the same thing

In 3GPP architecture diagrams, N7 (SMF⇔PCF) is shown as a reference point, but in the SBA (service-ization) this is implemented in substance as the PCF's service Npcf_SMPolicyControl. In other words, "N7" and "Npcf_SMPolicyControl" are the same SMF⇔PCF coordination viewed from the reference-point perspective / the service perspective. Take it that both point to the same thing, only the name (viewpoint) differs.

Basic Concept — a beginner-friendly explanation

Let us liken N7 to an inquiry between a field worker and the rules department.

When your smartphone tries to start data communication, the SMF, the session handler, goes to work. The SMF does not decide by itself "at what quality (QoS) and what charging should I pass this customer?"; it inquires of the PCF, the rules department (establishing an SM Policy Association). The PCF compares the member roster (subscriber data) against the company's rules and returns PCC rules (instruction sheets). The SMF sets the UPF (the pipe) exactly per these instruction sheets: "flow at this quality."

This inquiry to the PCF is not a dedicated phone line (a dedicated protocol like N2 or N4) but rather the image of throwing a request via an in-house web system (HTTP) and getting an answer back. This is SBI (Service Based Interface) = the mechanism by which NFs converse via Web APIs (HTTP/2). Both requests and responses are exchanged in a human-readable format called JSON.

In this Web API, the operation target (resources such as PCC rules) is given an "address (URI)," and you throw HTTP operations such as POST at it to create/update/delete. This convention is called RESTful.

Protocol / Transport

Item Content
Protocol HTTP/2 + JSON (RESTful) — the common stack of SBI (Service Based Interface)
Service Npcf_SMPolicyControl (provided by the PCF) — TS 29.512
SBI framework TS 29.500 / TS 29.501 series (SBI common rules and OpenAPI definitions)
Lower Transport TCP, protected by TLS (confidentiality, integrity, authentication) — TS 33.501
Port The SBI listening port is implementation-dependent (resolved via the endpoint registered in the NRF). No specific number is asserted
Characteristics Not a dedicated L4 protocol but Web-technology-based. Operated by HTTP methods (POST/PUT/DELETE) + resource URIs. RESTful

Web-technology-based, not a dedicated L4 like N2/N4

N2 has NGAP over SCTP:38412, and N4 has PFCP over UDP, dedicated lower-layer protocols, but none of these apply to N7 at all. Because N7 is SBI, like the other SBIs (N8/N10/N11/N15, etc.) it uses HTTP/2 over TLS as the common foundation. Therefore, you must not repurpose SCTP-specific filters or port numbers for analyzing N7.

Architecture

This shows N7 connecting the SMF and the PCF, the SMF controlling the UPF over N4, and the context in which the PCF also coordinates with other NFs and the AF over N15/N5.

flowchart LR
  SMF["SMF"]
  PCF["PCF"]
  UPF["UPF (forwarding)"]
  AMF["AMF"]
  AF["AF (app)"]
  UDR[("UDR (policy data)")]

  SMF == "N7 (Npcf_SMPolicyControl / HTTP2)" ==> PCF
  AMF -- "N15 (Npcf_AMPolicyControl)" --> PCF
  AF -- "N5 (Npcf_PolicyAuthorization)" --> PCF
  PCF -- "Nudr (policy retrieval)" --> UDR
  SMF == "N4 (PFCP)" ==> UPF

  classDef ctrl fill:#efe,stroke:#3a3,stroke-width:2px;
  class SMF,PCF ctrl;

How to read the diagram: N7 on the thick line (==>) is the SMF⇔PCF policy inquiry (SBI/HTTP2). The PCF also coordinates, over the likewise-SBI N15, with the AMF, and over N5 with the AF, and retrieves subscriber policy from the UDR over Nudr. The SMF reflects the PCC rules obtained from the PCF to the UPF over N4 (PFCP) (the thick line on the right). Note the division of roles: N7 is "the inquiry to decide," and N4 is "the reflection of the decided result."

Procedures that use it

N7 is used when, within the lifecycle of a PDU Session, the SMF inquires of the PCF about policy.

  • SM Policy Association Establishment: at PDU Session establishment, the SMF inquires of the PCF and obtains PCC rules (authorized QoS, charging). Based on the obtained PCC rules, the SMF sets the UPF's forwarding rules and QoS Flow (QFI/5QI) over N4 (PFCP).
  • SM Policy Association Modification: when the policy changes mid-session (an SMF-originated update, or a notification from the PCF), the PCC rules are updated.
  • SM Policy Association Termination: at session release, the SM Policy Association is terminated.

This PCF coordination is optional/conditional and is done in a dynamic-PCC configuration. In a configuration that does not coordinate with the PCF (static PCC), the session continues with the SMF's default QoS (configuration-dependent).

The detailed procedure flow (message sequence, conditions, IEs, etc.) is consolidated in the description of "SM Policy Association (PCF coordination)" in PDU Session. Please refer there for the procedure details.

Main Messages

Because N7 is SBI, its messages take the form of HTTP method + resource operation (RESTful operations rather than a procedureCode like NGAP). The representative service operations are as follows.

Service operation HTTP operation (conceptual example) Purpose
Npcf_SMPolicyControl_Create POST (resource creation) SM Policy Association establishment, obtaining PCC rules
Npcf_SMPolicyControl_Update POST (invoking an update operation) SMF-originated policy update request
Npcf_SMPolicyControl_UpdateNotify POST (PCF→SMF notification callback) Notification of PCC rule changes from the PCF to the SMF
Npcf_SMPolicyControl_Delete DELETE (resource deletion) SM Policy Association release

The HTTP-operation mapping is a conceptual organization: the "HTTP operation" in the table above is a mapping for understanding; the exact method, resource URI, and invocation direction of each operation follow the OpenAPI definitions of TS 29.512. The strict method assignment is to be confirmed. For details of each message, see the Message dictionary.

Packet Analysis (Wireshark)

Because N7 is SBI, it is observed in a capture as HTTP/2 (L4-dedicated protocols such as NGAP/SCTP do not appear).

Purpose Display Filter
Extract HTTP/2 messages http2
Narrow by the header path (conceptual) http2.headers.path (:path contains npcf-smpolicycontrol)
View the JSON body json (after decryption)

Decode highlights:

  • N7 is encrypted with TLS. To see the contents (the HTTP/2 headers and JSON body), a decryption key (a TLS session key, etc.) is needed. Without the key, it is visible only as the encrypted payload of tls.
  • If you can decrypt, you can identify the operation from the HTTP/2 headers (:method = POST, etc.; the resource path with :path containing .../npcf-smpolicycontrol/...).
  • The body is JSON (PCC rules, QoS information, charging information, etc.), packed in a human-readable structure.
  • Unlike N2's NGAP (binary, over SCTP), the key to observing N7 is that it is Web-like (HTTP/JSON). Do not use SCTP-specific filters (sctp.port, etc.).

Comparison with EPC

  • In 4G: the SM policy and charging rules were decided by the PCRF (Policy and Charging Rules Function), which coordinated with the PCEF side (the PGW) over the Gx interface (Diameter-based) (TS 29.212). The PCC framework (QoS, charging, and gating control by PCC rules) exists from 4G.
  • In 5G: the PCF took over the PCRF's role, and the Gx equivalent was turned into an SBI as N7 (Npcf_SMPolicyControl). The philosophy of the PCC framework continues, while it was replaced from Diameter with HTTP/2 + JSON (SBI) (TS 29.512).
4G (EPC) 5G (5GC)
Gx (PCEF/PGW ⇔ PCRF) N7 (SMF ⇔ PCF)
Diameter (over a dedicated L4) SBI: HTTP/2 + JSON over TLS
TS 29.212 (Gx) TS 29.512 (Npcf_SMPolicyControl)
PCEF (built into the PGW) SMF (inquires PCC rules of the PCF, reflects them to the UPF)

The PCC framework itself (the control philosophy by PCC rules) continues from 4G. The main change in 5G is that the Diameter-based dedicated IF was turned into an SBI (HTTP/2+JSON).

3GPP Specification

  • 3GPP TS 29.512 — The Npcf_SMPolicyControl service (SM Policy = PCC rules, N7). Individual clause numbers are to be confirmed
  • 3GPP TS 29.500 / TS 29.501 — SBI framework (technical rules / design principles and OpenAPI). Individual clause numbers are to be confirmed
  • 3GPP TS 23.503 — Policy and charging control framework (PCC framework, the policy model of PCC rules)
  • 3GPP TS 23.501 §4 — System architecture and reference points (definition of N7)
  • 3GPP TS 33.501 — SBI security (TLS, etc.). Individual clause numbers are to be confirmed

Note (to be confirmed): That the substance of N7 is Npcf_SMPolicyControl (TS 29.512), that the SBI common framework is the TS 29.500/29.501 series, and that the reference point N7 and the Npcf service are two views of the same coordination are general organizations of the 3GPP architecture. Because the detailed clause numbers and exact resource URIs of each service operation differ by release, they are individually to be confirmed.

Summary

  • N7 is the reference point connecting SMF ⇔ PCF, but that it is an SBI (Service Based Interface) is fundamentally different from N2 (NGAP/SCTP) and N4 (PFCP/UDP).
  • Its protocol is HTTP/2 + JSON (RESTful) over TLS, and its substance is the PCF's service Npcf_SMPolicyControl (TS 29.512).
  • The SMF establishes an SM Policy Association, obtains PCC rules (QoS, charging, gating), and reflects them to the UPF over N4 (PFCP).
  • The reference point N7 = the service Npcf_SMPolicyControl are two views of the same SMF⇔PCF coordination (the same duality as calling AMF⇔SMF "N11 equivalent (Namf/Nsmf)" on this site → SMF).
  • It corresponds to 4G's Gx (PGW/PCEF ⇔ PCRF, Diameter, TS 29.212), and in 5G it was turned into an SBI (TS 29.512).

Next Step

  • PCF — the counterpart of N7. The policy hub for PCC rules/URSP, etc.
  • SMF — the NF that uses N7 to obtain PCC rules and reflects them to the UPF over N4
  • PDU Session — the procedure of SM Policy Association establishment (details)
  • Interface dictionary — to check reference points such as N15 (AMF⇔PCF) and N3/N4/N6
  • Message dictionary / Protocol dictionary — to check terminology and the SBI protocol