SBI Communication Models A–D / SCP — Discovery and Routing Are Different Jobs¶
Learning objectives¶
After reading this chapter, you will be able to:
- Explain the work of calling an NF over the SBI as three separate jobs: Discovery (finding candidates) / Selection (choosing one) / Routing (the path for delivery)
- Explain the four Communication Models (A / B / C / D) along two axes: "Direct / Indirect" and "who performs Discovery" (TS 23.501 Annex E)
- Tell Model C from Model D by combining HTTP/2 headers (
3gpp-sbi-target-apiroot,3gpp-sbi-discovery-*,3gpp-sbi-producer-id) with the communication paths toward the NRF - Follow, header by header, the call flow for creating the SMF → PCF SM Policy Association with Model D
- Determine whether a failure via the SCP is "an error returned by the SCP" or "an error returned by the producer"
Prerequisites¶
- SCP — overview of Models A–D (this chapter digs deeper)
- NRF — NF Profiles and Nnrf_NFDiscovery
- NF Set / Binding Indication / PCF Redundancy — NF Sets,
3gpp-Sbi-Routing-Binding - N7 SBI Analysis — how to read HTTP/2 and ProblemDetails
- Supplementary: PCF / N7 / 5GC Overview and SBA / HTTP API Dictionary / Protocol Dictionary
The focus of this chapter (Level ∞ Deep Dive)
The SCP page introduces Models A–D along two axes: "path (Direct / Indirect)" × "who performs discovery." This chapter digs into how to determine the model from packets and how the appearance of failures changes once an SCP is inserted, at the level of HTTP/2 headers and call flows.
Why — why separate "Discovery" from "Routing"?¶
When the SMF wants to create an SM Policy Association toward a PCF, at least the following decisions are needed.
[Discovery] "Which PCFs can provide Npcf_SMPolicyControl?" → candidate list
↓
[Selection] "This time, let's use PCF-B" → one chosen
↓
[Routing] "SMF → PCF-B directly? Or via an SCP?" → delivery path
In the early SBA (Rel-15), the basic form was that the consumer (SMF) itself queried the NRF (Discovery), chose by itself (Selection) and sent the request directly (Routing). Rel-16 introduced the SCP (Service Communication Proxy), adding Indirect Communication, in which routing is left to the SCP, and Delegated Discovery, in which Discovery / Selection are also left to the SCP (TS 23.501 §6.2.19 / Annex E).
As a result, the mere fact that "the request goes via an SCP" no longer tells you who searched for candidates and who decided the destination. To isolate in troubleshooting whether "the SCP is at fault, the NRF profile is wrong, the SMF configuration is wrong, or the PCF rejected," you need to look at these three jobs separately.
Analogy: Think of asking an outside expert for help. Model A is "calling the number written in your business-card file directly," Model B is "looking it up in the phone directory (NRF) and calling directly," Model C is "deciding on the person using the directory, then asking the switchboard (SCP) to 'connect me to Mr. X'," and Model D is "just telling the switchboard 'connect me to an expert who meets these conditions' and leaving both the search and the choice to the operator." Even when going via the switchboard (C and D), whether you or the operator chose the person changes where to look when trouble occurs.
What — the four Communication Models¶
Big picture (TS 23.501 Annex E)¶
The informative Annex E "Communication models for NF/NF services interaction" of TS 23.501 organizes interactions between NFs / NF services into four models (the comparison table is Table E.1-1; table number to be confirmed). Direct / Indirect Communication themselves are specified in TS 23.501 §6.3.1.0 and §7.1.1 (to be confirmed).
| Model | Path | Who performs Discovery | Who performs Selection | SCP |
|---|---|---|---|---|
| A | Direct | None (destination known from local configuration) | Consumer (from configuration) | None |
| B | Direct | Consumer queries the NRF | Consumer | None |
| C | Indirect | Consumer queries the NRF | Consumer selects an NF instance or an NF set. If a set is chosen, the SCP selects the instance | Yes (routing; instance selection depending on conditions) |
| D | Indirect | Delegated to the SCP (Delegated Discovery) | SCP | Yes (Discovery + Selection + Routing) |
flowchart LR
subgraph DIRECT["Direct Communication"]
A["Model A
Local configuration
No NRF"]
B["Model B
Consumer performs
NRF Discovery"]
end
subgraph INDIRECT["Indirect Communication (via SCP)"]
C["Model C
Consumer performs NRF Discovery
SCP does routing"]
D["Model D
Discovery and Selection
delegated to SCP"]
end
A -->|"add Discovery"| B
B -->|"move routing to SCP"| C
C -->|"move Discovery to SCP too"| D
\"In Model C the SCP selects nothing\" is wrong
In Model C, if the consumer only selects an NF Set (or NF Service Set), then the SCP selects the instance within the set (TS 23.501 Annex E, to be confirmed). Also, even in Model C, the SCP may interact with the NRF to obtain selection parameters (load, locality, etc.) (same Annex, to be confirmed). Still, the party performing Discovery in Model C is the consumer, and this is what the SCP page means by "in Model C the SCP does not perform Discovery." Discovery (searching for candidates) and Selection (picking one within a set) are different jobs.
Model A — Direct, no NRF¶
- The SMF has the FQDN / IP of PCF-A in its local configuration. Neither the NRF nor an SCP appears.
- This form is common in small deployments and labs. The alternative destination for when PCF-A fails must also be configured.
Model B — Direct, consumer performs NRF Discovery¶
SMF ── Nnrf_NFDiscovery ──► NRF
SMF ◄─ NF Profile candidates ── NRF
SMF ── SBI Request ───────────────► PCF-B
- The SMF obtains candidates with
GET /nnrf-disc/v1/nf-instances?target-nf-type=PCF...(TS 29.510, clause number to be confirmed), chooses by itself and sends directly. - This is the basic form of Rel-15.
Model C — Indirect, consumer performs NRF Discovery, SCP does routing¶
SMF ── Nnrf_NFDiscovery ──► NRF
SMF ◄─ NF Profile candidates ── NRF
SMF ── SBI Request ──► SCP ──► PCF-B
(destination specified)
- The SMF performs Discovery and Selection by itself and sends the request to the SCP with the chosen destination stated explicitly in the request.
- The
3gpp-Sbi-Target-apiRootheader is used to state the destination (see below).
Model D — Indirect, Delegated Discovery¶
SMF ── SBI Request ───────► SCP ── Nnrf_NFDiscovery ──► NRF
+ discovery conditions ◄── NF Profile candidates ──
SCP selects PCF-B
SCP ── SBI Request ───────► PCF-B
- The SMF does not consult the NRF. It sends the request to the SCP carrying discovery conditions meaning "deliver this to a producer that meets these conditions" in
3gpp-Sbi-Discovery-*headers (TS 29.500 §6.10.3, to be confirmed). - The SCP performs Discovery and Selection and forwards the request to the chosen producer.
Even in Model D, the SCP does not necessarily query the NRF every time
The SCP may cache earlier discovery results (within the validity period returned by the NRF), or may be able to select using configuration or other information. The mere absence of SCP→NRF traffic in a trace does not prove an abnormality. Whether caching is used, and its period and refresh method, are implementation dependent.
Functions of the SCP (TS 23.501 §6.2.19)¶
The functional definition of the SCP is in TS 23.501 §6.2.19. The main items are as follows (the list is a summary; completeness and wording of the original are to be confirmed).
| Function | Description |
|---|---|
| Indirect Communication | Relays SBI messages between consumer and producer |
| Delegated Discovery | Performs Discovery at the NRF on behalf of the consumer and selects the producer (Model D) |
| Message forwarding and routing | Forwards to the destination NF / NF service, or to a next-hop SCP (SCPs can be chained) |
| Communication security | E.g., processing related to authorizing the consumer to access the producer's API (details in TS 33.501 §13, to be confirmed) |
| Load balancing, monitoring, overload control | Listed as functions (completeness and wording to be confirmed) |
| Group ID resolution | Resolves the Group ID of UDM / UDR / AUSF / PCF / CHF etc. from a UE identifier (SUPI, etc.) by querying the UDR (optional, to be confirmed) |
- The SCP itself does not provide NF services the way the PCF or UDM does. It is an element that mediates communication toward other NFs' services.
- Discovery and selection of the SCP itself (which SCP a consumer uses) is covered in TS 23.501 §6.3.16 (to be confirmed); methods based on local configuration or on the NRF exist.
Analogy: The SCP is a "switchboard plus dispatch center." It not only connects calls (Routing) but, if asked, also searches for a person who meets the conditions (Discovery) and assigns one (Selection) — but it does not cook the meal itself (decide the policy).
How — telling Model C from Model D in HTTP/2¶
Before and after the SCP are separate HTTP/2 connections¶
SMF ══ TLS/HTTP2 connection ① ══ SCP ══ TLS/HTTP2 connection ② ══ PCF
:authority = SCP :authority = PCF-B
Because the SCP relays at the HTTP application layer, SMF→SCP and SCP→PCF are separate TCP / TLS / HTTP/2 connections. Looking only at the packets of connection ① does not tell you whether connection ② succeeded.
A Model C request (the consumer has already chosen PCF-B)¶
:method: POST
:scheme: https
:authority: scp.5gc.example
:path: /npcf-smpolicycontrol/v1/sm-policies
3gpp-sbi-target-apiroot: https://pcf-b.5gc.example
content-type: application/json
:authorityis the destination of this hop (the SCP).3gpp-sbi-target-apirootis the apiRoot of the final destination (format{scheme}://{authority}[/{apiPrefix}]; apiPrefix is optional. The definition of apiRoot is in TS 29.501 §4.4.1, to be confirmed). The header is defined in TS 29.500 §5.2.3.2 (sub-clause to be confirmed), and how to address a request toward the SCP is in TS 29.500 §6.10.2 (to be confirmed).- The SCP rebuilds the request URI using the apiRoot in this header and forwards the request to PCF-B (details of removing / rewriting headers are in TS 29.500 §6.10.2, to be confirmed).
- Some deployments add an apiPrefix to the SCP-side URI (e.g.,
/scp-prefix/npcf-smpolicycontrol/...; whether to add one depends on the deployment).
A Model D request (Discovery delegated to the SCP)¶
:method: POST
:scheme: https
:authority: scp.5gc.example
:path: /npcf-smpolicycontrol/v1/sm-policies
3gpp-sbi-discovery-target-nf-type: PCF
3gpp-sbi-discovery-requester-nf-type: SMF
3gpp-sbi-discovery-service-names: npcf-smpolicycontrol
3gpp-sbi-discovery-snssais: [{"sst":1,"sd":"010203"}]
3gpp-sbi-discovery-dnn: internet
content-type: application/json
- The first clue is that there is no
3gpp-sbi-target-apiroot. The consumer does not yet know the destination. - Headers of the form
3gpp-Sbi-Discovery-<parameter name>correspond to the search conditions (query parameters) of Nnrf_NFDiscovery (the header definition is in the clause for discovery headers within TS 29.500 §5.2.3.2; it is said to be §5.2.3.2.7, but the sub-clause is to be confirmed. The meaning of each parameter is in TS 29.510). - In Nnrf_NFDiscovery,
target-nf-typeandrequester-nf-typeare mandatory query parameters (TS 29.510, clause number to be confirmed). For which3gpp-Sbi-Discovery-*headers a consumer must always include in Delegated Discovery, and where the SCP obtains the requester's NF type, refer to TS 29.500 §6.10.3 (to be confirmed). - The encoding of values (how arrays and JSON objects are written) is to be confirmed. The example above is a conceptual representation for explanation, not a complete request that can be sent as is.
HTTP/2 header names are lowercase
Specifications write mixed-case names such as 3gpp-Sbi-Target-apiRoot, but in HTTP/2 field names must be sent in lowercase (RFC 9113 §8.2 / §8.2.1). When searching in Wireshark, look for lowercase forms such as 3gpp-sbi-target-apiroot.
A clue on the response side — 3gpp-Sbi-Producer-Id¶
In Model D, the SMF does not know "which PCF was chosen." Therefore the response reaches the SMF carrying 3gpp-sbi-producer-id, which indicates the chosen producer (the NF Instance ID; may include an NF Service Instance ID, etc.). Whether the producer itself or the SCP adds it, and under which conditions, refer to TS 29.500 §5.2.3.2 / §6.10.3 (both, including sub-clauses, to be confirmed).
:status: 201
location: https://pcf-b.5gc.example/npcf-smpolicycontrol/v1/sm-policies/abc123
3gpp-sbi-producer-id: nfinst=54804518-4191-46b3-955c-ac631f953ed8
content-type: application/json
(Values are fictitious examples. The header value format is to be confirmed.)
locationcontains the apiRoot of PCF-B, so from then on the SMF can treat this resource as one on PCF-B.- For subsequent Update / Delete, the SMF sends to the SCP with
3gpp-sbi-target-apiroot(derived from Location) (TS 29.500 §6.10, to be confirmed). It may also add3gpp-sbi-discovery-*or3gpp-sbi-routing-bindingin preparation for reselection. In other words, even when operating with Model D, the second and later requests can look the same as Model C (TS 29.500 §6.10, to be confirmed). - If the PCF returns a Binding Indication (
3gpp-sbi-binding), the SMF adds3gpp-sbi-routing-bindingto subsequent requests so that, when PCF-B is unavailable, the SCP can reselect an alternative PCF in the same NF Set (details in NF Set / Binding Indication / PCF Redundancy).
Quick reference for the determination¶
| What is visible | Model C first request | Model D first request | Notes |
|---|---|---|---|
Consumer → NRF Nnrf_NFDiscovery |
Present (may be absent right before when cached) | Absent | Check in the consumer-side trace |
:authority |
SCP | SCP | Same in both; cannot be used to distinguish |
3gpp-sbi-target-apiroot |
Present | Absent | The most important clue (for the method that replaces the apiRoot under https. Whether other addressing methods exist: TS 29.500 §6.10.2, to be confirmed) |
3gpp-sbi-discovery-* |
May be absent / may be added for reselection | Present (conditions for delegation) | Not decisive on its own |
| SCP → NRF Discovery | Basically absent (obtaining selection parameters is possible) | Present (may be absent when cached) | Check in the SCP-side trace / logs |
3gpp-sbi-producer-id in the response |
May be present | Present as the basic case | Detailed conditions to be confirmed |
Do not determine the model from a single header
Even in Model C, the consumer may add 3gpp-sbi-discovery-* in preparation for reselection by the SCP (TS 29.500 §6.10, to be confirmed). Conversely, even when operating with Model D, requests after resource creation carry 3gpp-sbi-target-apiroot. Determine the model by combining whether it is "the first request that creates the resource" with whether consumer→NRF traffic exists.
Call Flow — creating the SMF → PCF SM Policy Association with Model D¶
During PDU Session Establishment, the SMF establishes an SM Policy Association (TS 23.502 §4.16.4; Npcf_SMPolicyControl_Create is TS 29.512 §4.2.2; both to be confirmed). The flow when this Create is done with Model D is as follows.
sequenceDiagram
participant SMF
participant SCP
participant NRF
participant PCF as PCF-B
SMF->>SCP: (1) POST /npcf-smpolicycontrol/v1/sm-policies
authority=SCP, discovery-target-nf-type=PCF
discovery-service-names, snssais, dnn
alt SCP has no valid cache
SCP->>NRF: (2) GET /nnrf-disc/v1/nf-instances
target-nf-type=PCF and others
NRF-->>SCP: (3) 200 OK SearchResult
nfInstances = PCF-A, PCF-B
end
SCP->>SCP: (4) Select PCF-B
considering Priority, Capacity, Load etc.
SCP->>PCF: (5) POST /npcf-smpolicycontrol/v1/sm-policies
authority=PCF-B
PCF-->>SCP: (6) 201 Created
Location, SmPolicyDecision
SCP-->>SMF: (7) 201 Created
3gpp-sbi-producer-id=PCF-B
Note over SCP,SMF: Who adds producer-id and when is to be confirmed
Note over SMF: SM Policy Association established
from then on, use the apiRoot of Location
as target-apiroot
SMF->>SCP: (8) POST .../sm-policies/abc123/update
target-apiroot=PCF-B, routing-binding
SCP->>PCF: (9) POST .../sm-policies/abc123/update
Signal Flow table¶
| # | Segment | Message | Headers / IEs to look at | Check points |
|---|---|---|---|---|
| 1 | SMF → SCP | POST /npcf-smpolicycontrol/v1/sm-policies (SmPolicyContextData) |
:authority, 3gpp-sbi-discovery-*, body supi / pduSessionId / dnn / sliceInfo |
Are the discovery conditions as intended? Is target-apiroot absent? |
| 2 | SCP → NRF | GET /nnrf-disc/v1/nf-instances (Nnrf_NFDiscovery_Request) |
query: target-nf-type, requester-nf-type, service-names, snssais, dnn |
Are the conditions of ① carried over correctly? |
| 3 | NRF → SCP | 200 OK (SearchResult) | nfStatus, nfServices, sNssais, priority, capacity, load in nfInstances[] |
Is the target PCF among the candidates? Is the array non-empty? |
| 4 | Inside the SCP | Producer selection | — | The selection algorithm is implementation dependent (using priority / capacity etc. from the NF Profile is common) |
| 5 | SCP → PCF | POST /npcf-smpolicycontrol/v1/sm-policies |
:authority = PCF-B |
Can the TLS / HTTP/2 of connection ② be established? |
| 6 | PCF → SCP | 201 Created (SmPolicyDecision) | location, (optionally) 3gpp-sbi-binding |
Did the PCF create the resource? |
| 7 | SCP → SMF | 201 Created | 3gpp-sbi-producer-id (who adds it is to be confirmed), location |
Did the SMF retain the producer and the Location? |
| 8–9 | SMF → SCP → PCF | Update / Delete | 3gpp-sbi-target-apiroot, 3gpp-sbi-routing-binding |
Do subsequent requests reach the same PCF (or the same NF Set)? |
The correspondence to follow is a single line: the SMF's discovery conditions → the NF Profiles returned by the NRF → the PCF chosen by the SCP → the PCF's response → the association (Location) retained by the SMF.
Failures via the SCP — did the SCP return it, or the producer?¶
Once an SCP is inserted, the error the SMF receives has two possible origins.
flowchart TD
E["SMF receives an error response"] --> S{"What does the Server header say?"}
S -- "A value indicating the SCP" --> SCPERR["Error generated by the SCP
Discovery failure / destination unreachable /
timeout / overload etc."]
S -- "A value indicating the PCF" --> PCFERR["Error generated by the producer
The SCP only relayed it"]
S -- "Absent / cannot tell" --> T["Decide using ProblemDetails cause
and the SCP-PCF segment trace"]
SCPERR --> N1["Investigate SCP-NRF / SCP-PCF segments"]
PCFERR --> N2["Investigate PCF logs and request contents"]
| Clue | Error generated by the SCP | Error generated by the producer (PCF) | Specification |
|---|---|---|---|
server header |
A value indicating the SCP (e.g., the form SCP-<SCP FQDN>) |
A value indicating the NF type and NF Instance ID (e.g., the form PCF-<NF Instance ID>) |
TS 29.500 §5.2.2 (format and whether mandatory to be confirmed) |
via header |
May be added by the relaying SCP | Same (record of the relay path) | TS 29.500 §5.2.2 (to be confirmed) |
ProblemDetails cause |
Forwarding-related causes (e.g., TARGET_NF_NOT_REACHABLE, HTTP 504) |
API-specific application errors (causes for Npcf_SMPolicyControl are in TS 29.512 §5.7; examples to be confirmed) | Common causes in TS 29.500 §5.2.7.2 (to be confirmed) |
| Trace of the SCP → PCF segment | The request was never sent, or there was no response | The request arrived and the PCF returned an error | — |
3gpp-sbi-producer-id |
Conditions for adding it to be confirmed | May be present | TS 29.500 §6.10.3 (to be confirmed) |
Do not decide from headers alone; confirm with traces at two points
Whether server / via headers are added may differ between implementations (to be confirmed). The reliable method is to correlate the same transaction on both the SMF⇔SCP and SCP⇔PCF segments. Because the SBI is normally encrypted with TLS, use decrypted traces (key logs) or the logs of the SMF / SCP / PCF.
Analogy: Whether a delivery failure notice was "issued by the distribution center (SCP)" or "the recipient (PCF) refused delivery" changes whom you call next. Look at both the issuer field of the notice (the server header) and the delivery record (the trace of the SCP⇔PCF segment) before deciding.
Packet Analysis (Wireshark)¶
Display filters¶
| Filter | Purpose |
|---|---|
http2 |
All SBI traffic (assumes TLS has been decrypted) |
http2.headers.path contains "npcf-smpolicycontrol" |
Narrow to Npcf_SMPolicyControl (N7) |
http2.headers.path contains "nnrf-disc" |
Nnrf_NFDiscovery (consumer→NRF or SCP→NRF) |
http2.header.name == "3gpp-sbi-target-apiroot" |
Indirect requests with a specified destination (Model C type) |
http2.header.name contains "3gpp-sbi-discovery" |
Requests with discovery conditions (Model D type, or for reselection) |
http2.header.name == "3gpp-sbi-producer-id" |
Responses indicating the chosen / processing producer (who adds it is to be confirmed) |
http2.headers.status >= 400 / http2.headers.status matches "^[45]" |
Error responses (use the latter in versions where the field is a string type) |
Field names (http2.headers.path etc.) may differ between Wireshark versions and are to be confirmed. Right-clicking a header in the GUI and choosing "Apply as Filter" is the reliable approach.
Decode example (conceptual)¶
The following is a conceptual representation of the display structure, with fictitious values (capture required).
HyperText Transfer Protocol 2
└─ Stream: HEADERS, Stream ID: 1, Length ...
├─ Header: :method: POST
├─ Header: :scheme: https
├─ Header: :authority: scp.5gc.example
├─ Header: :path: /npcf-smpolicycontrol/v1/sm-policies
├─ Header: 3gpp-sbi-discovery-target-nf-type: PCF
├─ Header: 3gpp-sbi-discovery-requester-nf-type: SMF
├─ Header: 3gpp-sbi-discovery-service-names: npcf-smpolicycontrol
└─ Header: content-type: application/json
HyperText Transfer Protocol 2
└─ Stream: HEADERS, Stream ID: 1, Length ...
├─ Header: :status: 504
├─ Header: server: SCP-scp.5gc.example
└─ Header: content-type: application/problem+json
└─ Stream: DATA
└─ JSON: {"status":504, "cause":"TARGET_NF_NOT_REACHABLE", ...}
The Content-Type of ProblemDetails is application/problem+json (RFC 9457, formerly RFC 7807; TS 29.500 §5.2.7, to be confirmed).
Order of checks¶
flowchart LR
A["① SMF-SCP
authority, path
target-apiroot or
discovery-*"] --> B["② SCP-NRF
Discovery
query and SearchResult"]
B --> C["③ SCP-PCF
connection and request
authority=PCF"]
C --> D["④ PCF response
201 / 4xx / 5xx
Location"]
D --> E["⑤ SCP-SMF
producer-id
server header"]
SMF → SCP: HTTP/2 connection OK
≠
SCP → PCF: HTTP/2 connection OK
≠
PCF: SM Policy Association created OK
Trouble Shooting¶
| Symptom | Likely cause | Check points | Logs | Packet | Resolution |
|---|---|---|---|---|---|
| SMF→SCP connects, but no SM Policy Association is created | Failure in some segment | ①–⑤ in "Order of checks" above | SMF / SCP / PCF | http2 |
Identify the failing segment first, then move on to the cause |
| The SCP returns an error (indicating no candidate found in Discovery) | Inconsistent PCF profile in the NRF (S-NSSAI / DNN mismatch, nfStatus not REGISTERED, npcf-smpolicycontrol missing from nfServices) |
Put the discovery conditions of ① side by side with the SearchResult of ③ | SCP / NRF | nnrf-disc |
Fix the PCF's NF Profile or the SMF's discovery conditions. Cause value to be confirmed |
504 (cause: TARGET_NF_NOT_REACHABLE, server is the SCP) |
SCP→PCF routing, TLS, or the PCF is down | TCP / TLS handshake of SCP→PCF | SCP | SCP⇔PCF segment | Check routing, certificates, and PCF state |
4xx (server is the PCF) |
The PCF rejected the request (unknown subscriber, invalid parameters, etc.) | ProblemDetails cause, request body |
PCF | npcf-smpolicycontrol |
Look at the SMF's request contents and the PCF configuration, not the SCP |
| In Model C, requests are sent to an old PCF | The SMF's discovery cache is stale; target-apiroot points to a stopped PCF |
Validity period of the consumer-side cache, status notifications from the NRF | SMF | Value of target-apiroot |
Implementation dependent. Check cache refresh and NF Status Notify subscription |
| Only Update / Delete fail (404 etc.) | Subsequent requests reached a PCF different from the one at creation (target-apiroot / routing-binding missing) |
Match between the initial location and subsequent target-apiroot |
SMF / SCP | routing-binding |
Review the design in NF Set / Binding |
| 401 / 403 | Problems with access tokens (OAuth 2.0) or authorization | Token acquisition path (consumer itself or SCP) and scope | SMF / SCP / NRF | authorization header |
Check TS 33.501 §13.4.1 (to be confirmed) and the configuration |
| SM Policy Associations are created twice | The SMF or SCP mechanically resent a POST | Multiple 201s for the same PDU Session | SMF / SCP / PCF | POSTs with the same supi + pduSessionId |
Review Retry / Reselection conditions (implementation dependent) |
Resending a POST is not \"idempotent\"
If a POST that creates a resource is resent after a timeout, the earlier request may in fact have been processed, and the resource can be created twice (POST is not an idempotent method; RFC 9110 §9.2.2). The conditions for SCP Retry / Reselection (on which errors, how many times, toward which other producer) are implementation dependent. Design them after checking each API's specification and the product's behavior.
Common misconceptions¶
| Misconception | Correct understanding |
|---|---|
| Going via an SCP means Model D | Model C also goes via an SCP. The difference is who performed Discovery / Selection |
| In Model C the SCP selects nothing | When only an NF Set is specified, the SCP selects the instance within the set (TS 23.501 Annex E, to be confirmed) |
| In Model D the SCP queries the NRF every time | May be skipped due to caching etc. (implementation dependent) |
| If the SMF→SCP connection succeeds, the request has also reached the PCF | Before and after the SCP are separate HTTP/2 connections |
| A 5xx received by the SMF means the PCF failed | It may be an error generated by the SCP. Check the server header and the SCP⇔PCF segment |
If 3gpp-sbi-discovery-* is present, it is always Model D |
Model C may also add them for reselection |
| The SCP is the service mesh for the SBI itself | The SCP is a 3GPP functional definition. A service mesh (sidecar proxies, etc.) is just one means of implementation |
| With an SCP, the NRF is not needed | Even in Model D the SCP uses the NRF. The NRF remains as the registration / discovery repository |
Boundary between 3GPP specifications and vendor implementations¶
| Defined by 3GPP | Decided by the vendor / operator |
|---|---|
| The organization of Communication Models A–D (TS 23.501 Annex E) | Which model to adopt for which NF pair |
| SCP functions (TS 23.501 §6.2.19) | The SCP product's routing policy, how rules are written, priority / weight settings |
| The Nnrf_NFDiscovery API and search conditions (TS 29.510) | Validity period and refresh method of discovery caches in the NRF / SCP / consumer |
The meaning of the 3gpp-Sbi-* custom headers (TS 29.500 §5.2.3.2) |
Whether the SCP is implemented with a service mesh (sidecars / ingress gateways, etc.) or a dedicated proxy |
| Procedures of Indirect Communication / Delegated Discovery (TS 29.500 §6.10) | Retry counts, timeout values, and trigger conditions for reselection |
| ProblemDetails and common causes (TS 29.500 §5.2.7) | Formats of logs, CLI, metrics, and traces (distributed tracing) |
| The framework of reselection with NF Sets / Binding | SCP redundancy, Pod placement, and multi-hop SCP configuration |
Service mesh and the SCP
In 5GC deployments on Kubernetes, some products realize the routing function of the SCP with service-mesh proxies. However, the 3GPP SCP differs in role from a generic L7 proxy in that it understands 3gpp-Sbi-* headers and performs Discovery / Selection in cooperation with the NRF. How much is left to the generic mesh and how much is handled by 3GPP-specific logic is implementation dependent (TS 23.501 has an informative Annex covering SCP deployment examples; it is thought to be Annex G "SCP Deployment Examples," but this is to be confirmed).
Comparison with EPC (4G)¶
Diameter-based interfaces in the EPC also had agents that relay messages (Relay / Proxy / Redirect Agents, RFC 6733 §2.8) and the DRA (Diameter Routing Agent) for PCRF selection (TS 29.213 §7, to be confirmed). The idea is similar, but they are not the same thing.
| Item | 4G EPC (Diameter) | 5GC (SBI) |
|---|---|---|
| Relaying element | Diameter Agent / DRA | SCP |
| Specifying the destination | Destination-Realm / Destination-Host AVPs | :authority + 3gpp-Sbi-Target-apiRoot |
| "Pass only the conditions and let it choose" | Operation that specifies only Destination-Realm and leaves host selection to the agent (by analogy) | Delegated Discovery (3gpp-Sbi-Discovery-*) |
| Discovery repository | Mainly static configuration / DNS | NRF (NF Profiles) |
| Remembering the server in charge of a session | DRA binding (PCRF selection) | BSF / Binding Indication / NF Set |
The right and left columns are correspondences by analogy, not correspondences defined by the specifications.
3GPP Specification¶
| Specification | Clause | Content |
|---|---|---|
| TS 23.501 | Annex E (Table E.1-1) | Organization of Communication Models A–D (informative; table number to be confirmed) |
| TS 23.501 | §6.2.19 | Functional definition of the SCP |
| TS 23.501 | §6.3.1.0 / §7.1.1 | Discovery of NFs / NF services and Direct / Indirect Communication (to be confirmed) |
| TS 23.501 | §6.3.16 | Discovery / selection of the SCP (to be confirmed) |
| TS 23.501 | §6.2.6 | Functional definition of the NRF |
| TS 23.502 | §4.16.4 | SM Policy Association Establishment (to be confirmed) |
| TS 23.502 | §4.17 | NF service framework procedures (Discovery, etc.; sub-clauses to be confirmed) |
| TS 29.500 | §5.2.2 | Standard HTTP headers (server, via, etc.; to be confirmed) |
| TS 29.500 | §5.2.3.2 | 3GPP-specific custom headers (3gpp-Sbi-Target-apiRoot, 3gpp-Sbi-Discovery-*, 3gpp-Sbi-Routing-Binding, 3gpp-Sbi-Producer-Id, etc.; sub-clauses to be confirmed) |
| TS 29.500 | §5.2.7 | Error handling (ProblemDetails, common causes; sub-clauses to be confirmed) |
| TS 29.500 | §6.10 | Indirect Communication (§6.10.2 addressing toward the SCP, §6.10.3 Delegated Discovery; sub-clauses to be confirmed) |
| TS 29.501 | §4.4.1 | Structure of resource URIs including apiRoot (to be confirmed) |
| TS 29.510 | — | Nnrf_NFManagement / Nnrf_NFDiscovery (clause numbers to be confirmed) |
| TS 29.571 | §5.2.4.1 | ProblemDetails data type (to be confirmed) |
| TS 29.512 | §4.2.2 / §5.7 | Npcf_SMPolicyControl_Create / application errors (to be confirmed) |
| TS 33.501 | §13.4.1 | SBI authorization (OAuth 2.0, including handling in Indirect Communication; to be confirmed) |
| RFC 9113 | §8.2 / §8.2.1 | HTTP/2 field names are lowercase (names containing uppercase are malformed) |
| RFC 9110 | §9.2.2 | Idempotent methods (POST is not idempotent) |
| RFC 9457 | — | Problem Details for HTTP APIs (replaces RFC 7807) |
Summary¶
- The work of calling an NF over the SBI splits into three jobs: Discovery / Selection / Routing
- Model A: Direct, no NRF / B: Direct, consumer performs NRF Discovery / C: via SCP, consumer performs NRF Discovery / D: via SCP, Discovery and Selection delegated to the SCP
- Even in Model C, when only an NF Set is specified, the SCP selects the instance. Discovery and Selection are different things
- If the first request has
3gpp-sbi-target-apiroot, the consumer decided the destination (C type); if it lacks it and has3gpp-sbi-discovery-*, discovery was delegated (D type). However, do not decide from a single header; also check whether consumer→NRF traffic exists - In Model D, the chosen producer is identified by
3gpp-sbi-producer-idin the response (who adds it is to be confirmed), and afterwards requests are sent with a target-apiroot derived from Location - Before and after the SCP are separate HTTP/2 connections. Use the
serverheader, the cause, and the trace of the SCP⇔PCF segment to separate SCP-originated errors from producer-originated ones - The SCP's routing policy, caching, retries, and service-mesh implementation are vendor implementation dependent
Comprehension check¶
Q1. An SMF→SCP request has :authority: scp.5gc.example, 3gpp-sbi-discovery-target-nf-type: PCF, and 3gpp-sbi-discovery-service-names: npcf-smpolicycontrol, and no 3gpp-sbi-target-apiroot. The SMF did not perform NRF Discovery. Which model is most appropriate? A. Model A / B. Model B / C. Model C / D. Model D
Answer: D. The request goes via the SCP (Indirect), and the consumer (SMF) does not query the NRF but passes discovery conditions to the SCP in headers. This is Delegated Discovery = Model D (TS 23.501 Annex E, TS 29.500 §6.10.3, to be confirmed). A / B are Direct Communication without an SCP, and C is the form in which the consumer itself performs Discovery at the NRF and specifies the destination.
Q2. In another trace, right after the SMF→NRF Nnrf_NFDiscovery, the SMF→SCP POST carried 3gpp-sbi-target-apiroot: https://pcf-b.5gc.example. It also carried 3gpp-sbi-discovery-*. Can this be called Model D?
No. The consumer performed Discovery at the NRF and specified the destination (PCF-B), so it is natural to consider it Model C. 3gpp-sbi-discovery-* may be added even in Model C so that the SCP can reselect when PCF-B is unavailable (TS 29.500 §6.10, to be confirmed). It is important not to decide from the presence or absence of a single header.
Q3. The SMF received :status: 504, server: SCP-scp.5gc.example, and the ProblemDetails cause TARGET_NF_NOT_REACHABLE. Where do you look first?
From the server header and the cause, judge that this is likely an error generated by the SCP, and investigate the SCP⇔PCF segment (TCP / TLS connection, PCF operational state, the destination the SCP chose). Before the PCF's application logs, confirm whether the request reached the PCF at all. The format and conditions of the server header are in TS 29.500 §5.2.2 (to be confirmed) and may differ between implementations, so the final confirmation is made with traces at two points.
Q4. In Model C, the SMF sent a request to the SCP specifying the PCF NF Set rather than a specific PCF instance. Who chooses the PCF instance? And does this mean \"the SCP performed Discovery\"?
The SCP chooses the instance (TS 23.501 Annex E, to be confirmed). However, the consumer searched for candidates at the NRF (performed Discovery), so this remains Model C. Selection (choosing one within a set) and Discovery (searching for candidates) are different jobs; summarize it as "in Model C the SCP does not perform Discovery, but it may perform Selection."
Next Step¶
- SCP basics and where Models A–D fit → SCP
- Basics of NF Profiles and Discovery → NRF
- NF Set / Binding, which supports reselection via the SCP → NF Set / Binding Indication / PCF Redundancy / BSF / PCF Binding / BSF
- How to read HTTP/2 and ProblemDetails on N7 → N7 SBI Analysis / N7 / PCF
- SBI relaying between PLMNs (in contrast to the SCP) → SEPP / N32
- Look up SBI APIs and protocols → HTTP API Dictionary / Protocol Dictionary / Spec Dictionary
- How to capture traces and read specifications → Packet Analysis Tips / Spec Reading Tips