Skip to content
5G/6G AcademyEst. 2009
All Articles
5G Architecture 15 min readMar 22, 2026Updated Nov 9, 2026

5G Service-Based Architecture (SBA): SBI, NRF and SCP

By Gaganpreet Walia

CEO, TELCOMA Global · 21+ years in telecom

5G service-based architecture (SBA) is how the control-plane functions of the 5G core talk to each other. Each network function (NF) offers its capabilities as services, exposed as HTTP/2 APIs on a service-based interface (SBI), and any authorized function can find them through the NRF and call them, either directly or through a Service Communication Proxy (SCP). TS 23.501 defines the architecture; TS 29.500 and TS 29.501 define how the APIs work on the wire.

5G service-based architecture (SBA): NFs expose Namf, Nsmf and other services on the SBI, with the NRF, SCP, SEPP to N32 and the CBCF on N50
5G service-based architecture (SBA): NFs expose Namf, Nsmf and other services on the SBI, with the NRF, SCP, SEPP to N32 and the CBCF on N50

This page is about how the functions talk. For what each network function does and the full list of N-numbered interfaces, see 5G core network explained.

From point-to-point to service-based

In the 4G EPC, every pair of nodes that needed to talk had its own interface and often its own protocol: S1-MME between eNB and MME, S11 between MME and SGW, S6a to the HSS and Gx to the PCRF over Diameter. Adding a feature often meant changing several interfaces at once.

In the 5GC, a control-plane NF is a producer of services that any authorized consumer can call. The AMF doesn't have "an interface to the AUSF"; it calls the AUSF's Nausf_UEAuthentication service. TS 23.501 clause 7.1.2 allows two patterns: request-response, and subscribe-notify, where the consumer gives a callback URI and the producer posts events to it.

EPC (point-to-point)5GC (service-based)
Interface modelDedicated reference points (S1-MME, S11, S6a, Gx)One SBI per NF, exposing named services
ProtocolGTPv2-C, Diameter, S1APHTTP/2 with JSON bodies
Finding a peerStatic configuration or DNSRegistration in and discovery from the NRF
Interaction patternsRequest and answer per interfaceRequest-response and subscribe-notify
Routing and load balancingDiameter Routing AgentConsumer-side selection, or an SCP
VersioningProtocol version per interfaceMajor version in the URI (v1, v2); optional features negotiated per API
Transport securityNDS/IP (IPsec)TLS, plus OAuth 2.0 access tokens from the NRF
Interface definitionsMessage and AVP tables in each specOpenAPI 3.0.0 files published by 3GPP

The user plane kept its model. N3 and N9 are still GTP-U tunnels, and N4 between SMF and UPF is PFCP, not HTTP.

The first module of every 5G & 6G course, free.

A free account opens the first module of all 14 certification courses — its video lessons and a hands-on lab — no card. Lifetime Prime Membership opens the rest of every course, the certification exams and a verifiable certificate, for one payment.

  • The first module of every course
  • Video lessons and a lab
  • No card needed
  • TELCOMA since 2009

The SBI stack: HTTP/2, JSON and OpenAPI

TS 29.500 clause 5 fixes the stack: HTTP/2 over TCP, JSON (RFC 8259) as the body format, and OpenAPI as the interface definition language. Every NF must support TLS, and TLS must be used inside a PLMN unless the network is protected by other means, which is the operator's call. When binary data has to travel with the JSON, such as a NAS message or an NGAP container, the NF sends a multipart message. That's why an N1N2MessageTransfer in a capture shows a JSON part and a binary part.

TS 29.501 sets the design rules. Every API has a URI of the form {apiRoot}/<apiName>/<apiVersion>/<resource>, for example {apiRoot}/nsmf-pdusession/v1/sm-contexts. Versions follow MAJOR.MINOR.PATCH, and only the major version appears in the URI. Optional features don't change the version in the URI: consumer and producer exchange a supportedFeatures bitmask when a resource is created (TS 29.500 clause 6.6.2), so a newer SMF and an older AMF settle on what both understand.

3GPP publishes every API as an OpenAPI YAML file in its Forge repository (forge.3gpp.org/rep/all/5G_APIs), taken from the annexes of the TS 29.5xx specs. If you build or test an NF, those files are the contract.

Not every operation is a plain create, read, update or delete. Where an action doesn't fit an HTTP verb, 3GPP defines a custom operation: a POST to a sub-resource. Updating an SM context is a POST to .../sm-contexts/{smContextRef}/modify, not a PATCH, and updating or deleting an SM policy is a POST to .../sm-policies/{smPolicyId}/update or .../delete.

How services are named

Service names follow one pattern: N, then the NF name, an underscore and the service. Namf_Communication is the AMF's communication service; Nsmf_PDUSession is the SMF's PDU session service. Operations add a third part: Namf_Communication_N1N2MessageTransfer, Nsmf_PDUSession_CreateSMContext, Nudm_SDM_Get. TS 23.501 clause 7.2 lists the services of each NF, and TS 23.502 clause 5.2 defines the operations.

On the wire the API name is lowercase and sometimes shortened: Namf_Communication becomes namf-comm, Nnrf_NFManagement nnrf-nfm, Nnrf_NFDiscovery nnrf-disc, Nausf_UEAuthentication nausf-auth. When you filter a capture or grep a log, search for the API name.

NFServiceStage 3 specExample operationsHTTP
NRFNnrf_NFManagementTS 29.510NFRegister, NFUpdate (also the heartbeat), NFDeregister, NFStatusSubscribePUT, PATCH, DELETE, POST
NRFNnrf_NFDiscoveryTS 29.510NFDiscoverGET
NRFNnrf_AccessTokenTS 29.510Get (OAuth 2.0 access token request)POST
AMFNamf_CommunicationTS 29.518N1N2MessageTransfer, UEContextTransfer, NonUeN2MessageTransferPOST
SMFNsmf_PDUSessionTS 29.502CreateSMContext, UpdateSMContext, ReleaseSMContextPOST (update and release are custom operations)
UDMNudm_SDMTS 29.503Get, SubscribeGET, POST
UDMNudm_UECMTS 29.503Registration, UpdatePUT, PATCH
AUSFNausf_UEAuthenticationTS 29.509Authenticate (5G-AKA, EAP-AKA')POST, then PUT for the 5G-AKA confirmation
PCFNpcf_SMPolicyControlTS 29.512Create, Get, Update, DeletePOST, GET (update and delete are custom operations)
NSSFNnssf_NSSelectionTS 29.531GetGET
NEFNnef_EventExposureTS 29.591Subscribe, NotifyPOST
BSFNbsf_ManagementTS 29.521Register, Discovery, Update, DeregisterPOST, GET, PATCH, DELETE
CHFNchf_SpendingLimitControlTS 29.594Subscribe, NotifyPOST
NWDAFNnwdaf_AnalyticsInfoTS 29.520RequestGET

NRF: registration, heartbeat and discovery

The NRF (NF Repository Function) is the registry every other function depends on. The life of an NF instance in it, from TS 29.510, goes like this.

  1. Register. When an SMF instance starts, it sends PUT {apiRoot}/nnrf-nfm/v1/nf-instances/{nfInstanceId} with its NFProfile: NF type, the S-NSSAIs and DNNs it serves, FQDN or IP addresses, priority, capacity, load and the services it offers. The nfInstanceId is a UUID version 4 that the NF picks itself.
  2. Heartbeat. The NRF answers 201 Created and returns a heartbeat timer. The interval is deployment-specific; TS 29.510 doesn't set a default. The NF then sends an NFUpdate (a PATCH) every interval. If the heartbeats stop, the NRF marks the instance SUSPENDED, stops returning it in discovery results and notifies any NF that subscribed to its status.
  3. Discover. An AMF that needs an SMF sends GET {apiRoot}/nnrf-disc/v1/nf-instances?target-nf-type=SMF&requester-nf-type=AMF&dnn=internet&snssais=.... The target and requester NF types are mandatory. Slices go in snssais, a JSON array, and filters such as preferred-locality are optional.
  4. Cache. The NRF returns a SearchResult holding the matching NFProfiles and a validityPeriod in seconds, during which the consumer may reuse the result instead of asking again.
  5. Select and call. The consumer picks an instance from the profiles and calls its Nsmf_PDUSession service.

Say the search returns three SMFs:

smf-a.region1.example.net  priority 1  capacity 100  load 40
smf-b.region1.example.net  priority 1  capacity 100  load 70
smf-c.region2.example.net  priority 2  capacity 100  load 10

Priority and capacity work like the priority and weight of a DNS SRV record (RFC 2782), as TS 29.510 requires. A lower priority value wins, so smf-a and smf-b are used first, with requests spread between them in proportion to capacity. smf-c is the fallback even though it's the least loaded. Load, a percentage, is a further input the consumer can use.

The NRF has two more jobs. It's the OAuth 2.0 authorization server for the SBI, through Nnrf_AccessToken (see security below). And NRFs talk to each other: across operators on N27, so a visited network can discover functions in the home network.

SCP: the Service Communication Proxy

The SCP (Service Communication Proxy) arrived in Release 16. It's defined in TS 23.501 clause 6.2.19 as a function that can provide indirect communication, delegated discovery, routing to the destination NF or to a next-hop SCP, and communication security, load balancing, monitoring and overload control. The spec leaves how it load-balances, monitors and controls overload to the implementation. An SCP can also resolve which UDM, UDR, AUSF, PCF or CHF group serves a subscriber, by asking the UDR.

It can be deployed centrally or in a distributed way, more than one SCP can sit in a path, and SCPs can serve a whole PLMN, a set of slices or a single slice. A PLMN can use direct communication, indirect communication or both, and an NF doesn't have to send everything through an SCP (TS 23.501 clause 7.1.1).

Communication models A, B, C and D

TS 23.501 Annex E (informative) names four models. Direct and indirect communication are defined in clause 7.1.1, and discovery and selection in clause 6.3.1.

SCP communication models A to D: direct or through the Service Communication Proxy, and who discovers and selects the producer NF in each
SCP communication models A to D: direct or through the Service Communication Proxy, and who discovers and selects the producer NF in each
ModelPathWho discovers the producerWho selects it
ADirectNobody: the consumer is configured with producer profiles, no NRFConsumer
BDirectConsumer, by querying the NRFConsumer
CIndirect, via SCPConsumer, by querying the NRFConsumer picks an NF set or instance; the SCP routes the request (and may ask the NRF for selection data)
DIndirect, via SCP, delegated discoverySCP, using discovery parameters the consumer puts in the requestSCP

Model A is often described as "direct with NRF discovery", but that's Model B. Model A uses no NRF and no SCP at all.

The models show up as headers (TS 29.500 clause 6.10). In Model C, the consumer sends the request to the SCP with a 3gpp-Sbi-Target-apiRoot header naming the producer it chose; the SCP uses it, unless it reselects, and strips it before forwarding. In Model D, the consumer sends 3gpp-Sbi-Discovery-* headers carrying the same parameters it would have sent to the NRF. The SCP discovers, selects and forwards, then tells the consumer which instance it used in a 3gpp-Sbi-Producer-Id header on the response. If a producer returns a binding indication, the consumer copies it into later requests (3gpp-Sbi-Routing-Binding) so the SCP can keep that subscriber on the same instance or set.

The trade-off is simple to state. An SCP adds a hop and one more component you must run in high availability. In return, consumers stop implementing discovery, selection and retry each in their own way, and you get one place to watch and police SBI traffic.

SCP and service mesh

An SCP can be built as a service mesh. TS 23.501 Annex G (informative) gives two deployment examples: one where the SCP is a service mesh, with SCP endpoints co-located with each NF as service agents (what Kubernetes users would call sidecars), and one where the SCP runs as its own deployment units. 3GPP specifies what the SCP does on the SBI, the headers, routing and error rules, not how you build it.

Security on the SBI

TLS. All NFs must support TLS, and it must be used inside a PLMN unless the network is secured by other means (TS 29.500 clause 6.7.2, pointing to TS 33.501 clause 13.1). So TLS is mandatory to support, but an operator can run some internal hops without it. OAuth 2.0. The NRF is the authorization server. A consumer asks it for an access token using the client credentials grant, and the token's scope is the service name, such as nsmf-pdusession, optionally narrowed to particular resources and operations. The producer checks the token, its expiry and its scope before serving the request. Every NF must support this, and whether it's used is set by configuration (TS 29.500 clause 6.7.3, TS 33.501 clause 13.4.1). Between operators, SBI traffic must go through a SEPP (TS 29.500 clause 6.7.1).

SEPP and N32: SBA between operators

When a visited AMF needs the home UDM, the request doesn't go there directly. Each operator has a SEPP (Security Edge Protection Proxy) at its edge, and the two SEPPs talk on N32. TS 29.573 splits N32 in two.

  • N32-c is the control side: the initial handshake, where the SEPPs negotiate the security mechanism, TLS or PRINS (PRotocol for N32 INterconnect Security), and exchange parameters if PRINS is chosen.
  • N32-f is the forwarding side. It carries the actual HTTP/2 requests and responses between consumers and producers in the two networks. With PRINS, each message is protected at the application layer, so IPX providers in between can only see or change what the operators allow.

Typical faults on this hop are a failed N32-c handshake, a certificate mismatch, or a SEPP rejecting a message its policy doesn't allow. SEPP and N32 covers what to check when roaming breaks.

BSF: finding the right PCF

A network runs many PCF instances, and one is picked when a PDU session is set up. An application function that later wants to change QoS for that session, classically the P-CSCF asking for a voice call's QoS flow, usually knows only the UE's IP address. It needs to find the PCF holding that session.

That's the BSF (Binding Support Function), defined in TS 23.503 clause 6.1.1.2.2. When a PCF takes a PDU session, it registers a binding in the BSF: the user identity, DNN, UE IP or MAC address, S-NSSAI and the PCF's address, plus its instance or set ID if available. It updates the binding when the session's address changes and removes it when the session ends. An NEF or AF then queries the BSF with whatever subset it knows, typically the UE address and DNN, and gets back the PCF to call.

On the wire it's the Nbsf_Management API (TS 29.521): a POST to {apiRoot}/nbsf-management/v1/pcfBindings to register, and a GET on the same collection with query parameters such as ipv4Addr, ipv6Prefix, dnn and snssai to discover. NFs find the BSF through the NRF or by local configuration. In 4G, the Diameter Routing Agent did this job for the PCRF.

When a binding is missing or stale, the session itself is fine but the AF's lookup comes back empty, and its QoS request never reaches a PCF. On a VoNR complaint where the PDU session is up but the voice QoS flow never appears, the BSF lookup is worth checking.

Where the CBCF sits in the SBA picture

People look for an SBA diagram showing the CBCF because most diagrams leave it out. The CBCF (Cell Broadcast Centre Function) is the 5G core's cell broadcast centre. It takes public warning messages from the alerting authority (the cell broadcast entity), works out which cells should carry them, and gets them broadcast (TS 23.041 clause 5A).

In the service-based picture it's unusual: a consumer only. TS 23.041 clause 3.4 notes that the CBCF provides no services, so there is no "Ncbcf" on the bus. Draw it attached to the AMF's Namf interface. In the reference-point picture the link is N50, which TS 23.501 clause 4.2.7 lists as the reference point between the AMF and the CBCF, carried by service-based calls (TS 23.041 clause 9A).

The CBCF uses four Namf_Communication operations:

  • NonUeN2MessageTransfer to send a Write-Replace Warning Request or a Stop Warning Request to the AMF. The AMF uses the list of tracking areas in the request to pick gNBs and relays the message over N2; the gNBs broadcast it in system information (SIB6 and SIB7 for ETWS, SIB8 for CMAS).
  • NonUeN2InfoSubscribe, NonUeN2InfoUnSubscribe and NonUeN2InfoNotify to receive what NG-RAN reports back: warning indications, and restart or failure indications.

If an operator's existing CBC only speaks the 4G SBc interface, a PWS-IWF sits between it and the AMF and translates N50 to SBc (TS 23.041 Annex B).

Finding which NF an error came from

An SBI failure rarely happens where it's logged. The AMF logs an error on Nsmf_PDUSession_CreateSMContext, but the request may have died at an SCP, at a SEPP, at the SMF, or in something the SMF called. TS 29.500 gives you the means to tell them apart.

  1. Read the Server header. Whoever generates an error response should include a Server header with its NF type and identity: the FQDN for an SCP or SEPP, the NF instance ID for an NF (TS 29.500 clause 6.10.8.2). Server: SCP-scp1.operator.com means the SCP produced the error; Server: SMF-<instance ID> means the SMF did.
  2. Look for a Via header. An SCP or SEPP that relays an error it didn't generate adds a Via header with its own identity (clause 6.10.8.3). A Via with no Server means the error came from further down the path and the originator didn't identify itself.
  3. Read the cause. The ProblemDetails body carries a cause, and the common ones in TS 29.500 table 5.2.7.2-1 point at a layer:

- 504 TARGET_NF_NOT_REACHABLE from an SCP: neither the target nor any alternative it could reselect was reachable.

- 504 TIMED_OUT_REQUEST: the request ran out of time.

- 503 NF_CONGESTION or 429 NF_CONGESTION_RISK: the producer is in, or close to, overload control.

- 500 NF_FAILOVER or NF_SERVICE_FAILOVER: the NF or service is unavailable, and the consumer or SCP may reselect straight away.

- 500 SYSTEM_FAILURE or UNSPECIFIED_NF_FAILURE: something failed inside the producer.

- 400 MANDATORY_IE_MISSING or INVALID_API: a malformed request or an unsupported API, often a version or interop gap between two vendors.

Each API spec adds its own application causes on top of these.

  1. In Model D, find out who the SCP picked. The consumer never chose the producer, so the 3gpp-Sbi-Producer-Id header on the response is the record of which instance served it.
  2. Turn the instance ID into a box. Look the NF instance ID up in the NRF (the NFProfileRetrieval and NFListRetrieval operations, or your NRF's console) to see what the NF is, where it runs, and whether its status is REGISTERED or SUSPENDED.

Two quick readings. A 504 TARGET_NF_NOT_REACHABLE with Server: SCP-... on CreateSMContext means the SMF never saw the request; if the NRF still shows the SMFs REGISTERED, they're heartbeating to the NRF but the SCP can't reach them, so look at the path between SCP and SMFs. A 500 SYSTEM_FAILURE with Server: SMF-... means the SMF took the request and failed inside, so follow its own outbound calls: N7 to the PCF, N10 to the UDM and N4 to the UPF.

In a capture, the :path pseudo-header tells you the API (/nsmf-pdusession/v1/...) even when you don't know the operation name. SBI traffic is usually TLS-protected, so you'll need the session keys; analyzing 5G PCAPs in Wireshark covers that.

See the service mesh, and break it

The SBA architecture explorer lays out the

network functions and the interfaces between them, which is easier to hold onto

than a list of NF names.

Then break the core — take a function out

and watch which procedures stop working. Knowing what depends on the UDM is

different from being told, and the dependency chain is the part interviews ask

about.

The Core & E2E specialist track

covers the SBA in the detail an architecture diagram cannot.

Go Deeper

5G Core & E2E Specialist — take the SBA apart function by function, then remove one and watch what stops.

Not sure where to start? See the Core Engineer route

Get the next 5G deep-dive in your inbox

One worked failure every other Tuesday, with the trace or lab to try it on. No spam, no marketing — just engineering. Unsubscribe in one click.

5G SBAservice based architectureSBINRFSCPservice communication proxySEPPBSFCBCFHTTP/2