Skip to content

SBI & N4 Interface Reference

A lookup reference for the two control protocols an integrator works with most in the 5GC: the Service-Based Interface (SBI) between control-plane NFs, and PFCP over N4 between the SMF and the UPF. For the architectural context, see Service-Based Architecture & Reference Points.

SpecBodyScope
TS 23.5013GPPSystem architecture - SBA, NFs, and reference points.
TS 23.5023GPPProcedures and call flows (the order of service invocations).
TS 29.5003GPPSBI technical realization - HTTP/2, error model, versioning.
TS 29.5013GPPSBI design principles and OpenAPI conventions.
TS 29.5103GPPNRF services (Nnrf_NFManagement, Nnrf_NFDiscovery).
TS 29.502 / 29.518 / …3GPPPer-NF service APIs (SMF PDU session, AMF communication, etc.).
TS 29.2443GPPPFCP - the N4 protocol between control plane (SMF) and user plane (UPF).

3GPP publishes machine-readable OpenAPI 3 definitions for each SBI service, which is what TOSSI uses to drive contract testing and mock NFs.


Part 1 - The Service-Based Interface (SBI)

Section titled “Part 1 - The Service-Based Interface (SBI)”
PropertyValue
Application protocolHTTP/2 (RFC 7540), per TS 29.500
SecurityTLS 1.2/1.3 for SBI; mutual TLS and OAuth2 access tokens for NF authorization
SerializationJSON (and multipart for binary, e.g. NAS/N2 payloads)
API descriptionOpenAPI 3.0 YAML, published per service by 3GPP
StyleRESTful resources + custom operations

SBI resources follow a consistent pattern:

{apiRoot}/{apiName}/{apiVersion}/{apiSpecificResourceUriPart}
example:
https://nrf.5gc.local/nnrf-nfm/v1/nf-instances/{nfInstanceId}
  • apiName is the service name, conventionally n{nf}-{service} (e.g. nnrf-nfm, nsmf-pdusession, namf-comm).
  • apiVersion (v1, v2, …) lets producers and consumers negotiate compatibility.

TS 29.501 defines three interaction styles:

  • Request–response - a consumer calls a producer and gets a synchronous reply (e.g. NF discovery).
  • Subscribe–notify - a consumer subscribes to a resource; the producer POSTs notifications to a callback URI (e.g. NF status change).
  • Resource CRUD - standard create/read/update/delete on a resource.

The NRF (TS 29.510) is the service most worth knowing by heart, because every interop test starts here.

An NF registers (or updates) its profile by PUT-ing to the NF management service:

PUT /nnrf-nfm/v1/nf-instances/{nfInstanceId} HTTP/2
Content-Type: application/json
{
"nfInstanceId": "f1c2...",
"nfType": "SMF",
"nfStatus": "REGISTERED",
"fqdn": "smf.5gc.local",
"sNssais": [{ "sst": 1, "sd": "010203" }],
"nfServices": [
{ "serviceInstanceId": "smf-pdusession-1",
"serviceName": "nsmf-pdusession",
"versions": [{ "apiVersionInUri": "v1" }],
"scheme": "https" }
]
}
Service nameProducerUsed for
nnrf-nfmNRFNF registration, heartbeat, status subscribe/notify.
nnrf-nfdiscNRFNF discovery (find a producer by type + slice).
namf-commAMFN1/N2 message transfer, UE context management.
nsmf-pdusessionSMFCreate/update/release PDU session SM contexts.
nausf-authAUSFUE authentication (5G-AKA / EAP-AKA’).
nudm-sdm / nudm-ueauUDMSubscriber data management; auth vector generation.
nudr-drUDRStructured data repository access.
npcf-smpolicycontrolPCFSession-management policy for the SMF.

SBI security is the largest classical-crypto surface in the core:

  • In place: TLS for confidentiality/integrity, mutual TLS for NF identity, OAuth2 for service authorization.
  • Migration target: SBI TLS key exchange moves to hybrid / post-quantum (ML-KEM) and certificate signatures to ML-DSA. NFs adopt PQC either through a post-quantum cryptography library linked into the NF runtime, or via a PQC-enabled TLS provider for OpenSSL-based NFs. See the Post-Quantum Security pillar for the sequencing and the GSMA PQ.05 alignment.

N4 is the Control/User Plane Separation (CUPS) interface: the SMF programs forwarding, QoS, and usage rules into the UPF. Unlike the SBI, N4 does not use HTTP - it uses PFCP, a purpose-built binary protocol (TS 29.244).

PropertyValue
ProtocolPFCP (Packet Forwarding Control Protocol), TS 29.244
TransportUDP, port 8805
EncodingBinary TLV (type-length-value) Information Elements
SecurityIPsec/IKEv2 recommended for N4 transport protection
MessageDirectionPurpose
PFCP Association SetupSMF ↔ UPFEstablish the SMF–UPF association before any session work.
PFCP Session EstablishmentSMF → UPFCreate a session and install its forwarding/QoS rules.
PFCP Session ModificationSMF → UPFUpdate rules (e.g. on handover, QoS change).
PFCP Session DeletionSMF → UPFTear down the session.
PFCP Session ReportUPF → SMFReport usage, events, or buffered-packet notifications.
PFCP HeartbeatSMF ↔ UPFLiveness and restart detection.

A PFCP session is a set of rules the SMF installs into the UPF. These are the IEs an integrator must reason about when matching an SMF to a UPF:

RuleNameRole
PDRPacket Detection RuleMatches packets (by interface, TEID, IP filters) and points to the other rules.
FARForwarding Action RuleWhat to do with matched packets: forward, drop, buffer, duplicate; sets outer header (GTP-U).
QERQoS Enforcement RuleRate limiting and QoS marking (per QFI / flow).
URRUsage Reporting RuleVolume/time thresholds that trigger Session Reports (charging, quota).
BARBuffering Action RuleControls buffering of downlink packets while the UE is idle.
SMF ──PFCP/N4 (UDP 8805)──► UPF
Session Establishment
├─ PDR (match: N3 TEID / N6 IP)
├─ FAR (action: forward, GTP-U encap)
├─ QER (QoS: rate, QFI marking)
└─ URR (report: volume threshold)

N4 is control only. The packets it governs flow on:

  • N3 - GTP-U (TS 29.281) over UDP, gNB ↔ UPF. The FAR’s outer-header-creation IE builds these GTP-U headers.
  • N6 - plain IP, UPF ↔ data network.

Both are forwarding paths the eBPF & Dataplane pillar can accelerate with XDP, expressing PDR/FAR logic as eBPF maps for a programmable user plane.

N4 protection uses IPsec/IKEv2. The PQC migration target is hybrid/post-quantum key exchange in IKEv2 (via a PQC-enabled IPsec/IKEv2 daemon, RFC 9370 multiple key exchanges) so the N4 association survives “harvest-now-decrypt-later” - see the Post-Quantum Security pillar.


You need to…UseWhere
Find which NF provides a servicennrf-nfdisc (GET nf-instances)NRF, TS 29.510
Register an NFnnrf-nfm (PUT nf-instances)NRF, TS 29.510
Create a PDU session contextnsmf-pdusessionSMF, TS 29.502
Program the UPFPFCP Session EstablishmentN4, TS 29.244
Carry user packets from RANGTP-U on N3TS 29.281
Secure SBITLS + OAuth2 (→ PQC)TS 29.500, PQC
Secure N4/N3IPsec/IKEv2 (→ PQC)PQC