BSF / PCF Binding — Finding "the PCF of this Session" Among Multiple PCFs¶
Learning objectives¶
After reading this chapter, you will be able to:
- Explain that the BSF is not "an NF that decides policy" but an NF that helps consumers reach a PCF that has already been selected
- Explain the difference between the NRF (discovering candidate PCFs that are available) and the BSF (discovering the PCF that serves this PDU Session)
- Explain the information contained in a PcfBinding (UE IP / IPv6 prefix, DNN, S-NSSAI, SUPI / GPSI, PCF FQDN / IP endpoint / Instance ID / Set ID, Binding Level)
- Explain the Nbsf_Management Register / Deregister / Discovery / Update / Subscribe operations and how they look on HTTP
- Understand the difference between 200 OK and 204 No Content in Discovery, and isolate BSF-related failures in a trace
Prerequisites¶
- PCF / SM Policy Association / PCC Rule — the SM Policy Association between the SMF and the PCF
- AF / N5 / Application Session — Npcf_PolicyAuthorization, with which the AF requests QoS etc. from the PCF
- NEF / N33 / Event Exposure — how the NEF bridges external AF requests into the 5GC
- Supplementary: BSF / PCF / NRF / N5 / Policy
The focus of this chapter (Level ∞ Deep Dive)
The BSF page introduces the BSF as "a ledger that manages the mapping between a session and its serving PCF." This chapter digs into what is written in the ledger, who writes it and when, who looks it up and how, and what it looks like in a trace when the lookup fails, at the TS 29.521 API level.
Why — why do we need a mechanism to find "the PCF of this Session"?¶
In commercial networks, PCFs are normally deployed in multiples for redundancy and load balancing. At PDU Session establishment, the SMF selects one PCF using the NRF or other means and creates an SM Policy Association (PCF Discovery and Selection is TS 23.501 §6.3.7.1, to be confirmed; the related clause on the TS 23.503 side is also to be confirmed).
The problem comes later. When the application side (AF) or the NEF requests "raise the QoS of the traffic for UE IP 10.1.1.10," the request is meaningless unless it reaches the PCF that holds the SM Policy Association of that PDU Session.
SMF ──── N7 ──── PCF-B ← holds the SM Policy Association of this Session
│
PDU Session
UE IP = 10.1.1.10
External AF ─N33→ NEF ─→ PCF-A ? ← if it reaches another PCF, that PCF does not know the Session
└─→ PCF-B ✓ ← if it reaches the right PCF, the PCC Rules can be updated
The AF / NEF does not know which PCF the SMF selected. Asking the NRF returns "PCFs available as candidates," not "the PCF serving this Session." So an NF is needed that holds, and makes searchable, the mapping between a PDU Session (UE address etc.) and its serving PCF. That is the BSF (Binding Support Function) (TS 23.503 §6.1.1.2).
Analogy: The NRF is "the hospital's directory of doctors": it tells you which doctors work in which department, but not "who is Mr. A's attending physician." The BSF is "the reception desk's patient-record ledger," which records the attending physician (PCF) for each patient (PDU Session). An outside inquiry (AF request) must be routed by looking up the patient-record ledger, not the directory; otherwise it reaches a doctor who knows nothing about the case.
The BSF does not decide policy
It is the PCF that decides QoS and charging policy, and the SMF that applies it to the PDU Session / UPF. The BSF only helps consumers reach the PCF that has already been selected; it neither reselects the PCF nor takes part in the content of the policy.
What — where the BSF and PCF Binding fit¶
Roles of the NRF / BSF / PCF¶
| NF | Question it answers | Main information | Specification |
|---|---|---|---|
| NRF | Which candidate PCFs are available? (also used to discover the BSF itself) | NF Profile (NF Type, Service, Endpoint, PcfInfo / BsfInfo etc.) | TS 29.510 §5.3.2.2 (NFDiscover, to be confirmed) |
| BSF | Which PCF is currently serving this UE / PDU Session? | Mapping of UE address, DNN, S-NSSAI etc. ⇔ selected PCF (PcfBinding) | TS 23.503 §6.1.1.2 / TS 29.521 |
| PCF | Which policy applies to this traffic? | PCC Rules, QoS policy etc. | TS 23.503 §6.2.1 / TS 29.512 §4.2 / TS 29.514 §4.2 (all to be confirmed) |
Distinguish the SMF's \"initial PCF selection\" from the AF/NEF's \"discovery of the serving PCF\"
When the SMF selects a PCF at PDU Session establishment, that is PCF Discovery and Selection (using the NRF or local configuration; TS 23.501 §6.3.7.1, to be confirmed; the related clause on the TS 23.503 side is also to be confirmed). When the AF / NEF looks for the serving PCF of an already existing Session, that is where the BSF comes in. Both "find a PCF," but they answer different questions.
The NRF and the BSF are not alternatives; they are often used in two stages.
flowchart LR
NEF["NEF / AF"] -- "① Nnrf_NFDiscovery
target-nf-type=BSF" --> NRF["NRF"]
NRF -- "Candidate BSFs
(BsfInfo: IPv4 ranges / DNN etc.)" --> NEF
NEF -- "② Nbsf_Management_Discovery
UE IP / DNN / S-NSSAI" --> BSF["BSF"]
BSF -- "PcfBinding
(PCF FQDN / Endpoint / Instance ID / Set ID)" --> NEF
NEF -- "③ Npcf_PolicyAuthorization" --> PCF["PCF-B
(serving PCF)"]
The BSF can register with the NRF as NF Type BSF and advertise, in the BsfInfo of its NF Profile, the UE IPv4 address ranges, IPv6 prefix ranges, DNNs, IP domains etc. that it serves (TS 29.510; the clause defining BsfInfo is to be confirmed). In networks with multiple BSFs, a consumer first asks the NRF for "the BSF serving this UE address" and then queries that BSF for the binding. Some deployments do not use the NRF and fix the BSF by local configuration (implementation/deployment dependent).
Deployment options for the BSF¶
TS 23.503 §6.1.1.2 allows the BSF to be deployed as a standalone NF or co-located with other NFs (PCF, UDR, NRF, SMF etc.) (the exact list and sub-clause numbering are to be confirmed). Note that TS 23.501 §6.2 (functional descriptions of Network Functions) has no dedicated clause for the BSF; the role of the BSF is described in TS 23.503 (see the note in the NF Dictionary).
In addition, the BSF may exhibit the following "routing-oriented" behaviors.
| Behavior | Description | Basis / dependency |
|---|---|---|
| Binding resolution in indirect communication via the SCP | The NEF / AF sends a request to the SCP without knowing the PCF; the SCP performs Discovery towards the BSF and forwards the request to the serving PCF (delegated discovery) | TS 23.501 §6.3.1.0 / §7.1.1, TS 23.503 §6.1.1.2 (sub-clause numbering to be confirmed for all). See SBI Communication Model |
| Diameter proxy / redirect agent | The BSF relays or redirects requests from an AF that uses Rx (Diameter), such as a P-CSCF, to the serving PCF. This is why a PcfBinding can contain the PCF's Diameter Host / Realm | TS 23.503 §6.1.1.2 (sub-clause numbering to be confirmed) |
| BSF functionality integrated into SCP / routing products | Product configurations in which the BSF functionality is built into an SCP or DRA-type product, so that it looks as if "the BSF acts as the SCP" | Implementation/deployment dependent (may differ from how the BSF appears as an independent NF in the specifications) |
\"No BSF pod is visible\" does not mean a specification violation
The BSF can be implemented as an independent NF, co-located with other NFs, or as a function of an SCP / DRA-type product. The mere fact that no dedicated BSF pod / VM can be found in a commercial network does not imply a specification violation or a missing function. First check, via the NRF registrations and configuration, "which NF provides Nbsf_Management."
PcfBinding — what is written in the ledger¶
The binding information held by the BSF is represented by the PcfBinding data type of TS 29.521 (TS 29.521 §5.6.2.2; clause number to be confirmed). The representative attributes, grouped by role:
| Category | Attribute (conceptual name) | Meaning |
|---|---|---|
| UE address (search key) | ipv4Addr / ipv6Prefix / macAddr48 |
The UE's IPv4 address, IPv6 prefix, or the MAC address of an Ethernet PDU Session. At least one is required (details of the condition to be confirmed) |
ipDomain |
Identifier distinguishing IPv4 address spaces; used to resolve overlapping private IPv4 addresses | |
addIpv6Prefixes / addMacAddrs |
Additional IPv6 prefixes / MAC addresses (added in later Releases; to be confirmed) | |
| Session attributes | dnn |
DNN (mandatory) |
snssai |
S-NSSAI (mandatory) | |
| User identifiers | supi / gpsi |
SUPI / GPSI (optional) |
| Destination of the serving PCF | pcfFqdn / pcfIpEndPoints |
FQDN or IP endpoints (address, port) of the serving PCF. It must be reachable via one of them (condition to be confirmed) |
pcfDiamHost / pcfDiamRealm |
PCF Host / Realm for Rx (Diameter) | |
| Identity of the serving PCF | pcfId |
The PCF's NF Instance ID |
pcfSetId |
The PCF's NF Set ID | |
bindLevel |
Binding Level. NF_INSTANCE (bound to this instance) / NF_SET (any PCF in the set can handle it) |
|
recoveryTime |
Restart time of the PCF; a clue for the consumer to detect that "the registering PCF has restarted" (to be confirmed) | |
| Other | suppFeat |
Supported Features (negotiation of optional features such as Update) |
This is an excerpt of the main attributes, not an exhaustive list. Check the mandatory / optional / conditional classification of each attribute and the attributes added per Release in the relevant version of TS 29.521.
The UE IP alone is not necessarily unique
Private IPv4 addresses can overlap across different DNNs / S-NSSAIs / IP domains. Discovery narrows down the result by combining the UE address with DNN, S-NSSAI, IP domain etc.
A PDU Session binding and a UE binding are different things
The subject of this chapter is the PCF binding for a PDU Session (resource pcfBindings). From Release 17 onward, the binding of the PCF for the UE, which handles AM / UE policy (resource pcfUeBindings, keyed by SUPI etc.), can also be handled by Nbsf_Management (Release and clause numbers to be confirmed). Even in implementations where the same PCF serves both, the lookup target and the resource are different, so do not confuse them.
How — registering, discovering and using the binding¶
Nbsf_Management service operations¶
| Operation | Consumer → BSF | Main use | Stage 2 | Stage 3 |
|---|---|---|---|---|
| Register | PCF → BSF | Register a new binding | TS 23.502 §5.2.13.2.2 | TS 29.521 §4.2.2 |
| Deregister | PCF → BSF | Delete a binding | TS 23.502 §5.2.13.2.3 | TS 29.521 §4.2.3 |
| Discovery | NEF / AF / SCP etc. → BSF | Search for the binding (serving PCF) matching the conditions | TS 23.502 §5.2.13.2.4 | TS 29.521 §4.2.4 |
| Update | PCF → BSF | Modify an existing binding (UE address added, PCF switched etc.) | TS 23.502 §5.2.13.2.5 | TS 29.521 §4.2.5 |
| Subscribe / Unsubscribe / Notify | Consumer ⇔ BSF | Subscription to and notification of binding registration/deletion events | TS 23.502 §5.2.13.2.6 onward (to be confirmed) | TS 29.521 §4.2.6–§4.2.8 (to be confirmed) |
Update was added in Rel-16 and Subscribe / Notify in Rel-17; their use involves Supported Features negotiation (Releases and feature names to be confirmed).
How it looks on HTTP (PDU Session binding)¶
Let {apiRoot}/nbsf-management/v1 be the root of the API (TS 29.521 §5.1 / §5.3; clause numbers to be confirmed).
| Operation | Method | Resource | Main responses |
|---|---|---|---|
| Register | POST |
/pcfBindings |
201 Created + Location: .../pcfBindings/{bindingId} + PcfBinding |
| Discovery | GET |
/pcfBindings?ipv4Addr=...&dnn=...&snssai=... |
200 OK + PcfBinding / 204 No Content / 400 (MULTIPLE_BINDING_INFO_FOUND etc.) |
| Update | PATCH |
/pcfBindings/{bindingId} |
200 OK + updated PcfBinding (body type PcfBindingPatch; to be confirmed) |
| Deregister | DELETE |
/pcfBindings/{bindingId} |
204 No Content |
The PCF remembers the bindingId (Location header) returned by Register and uses it for Update / Deregister. Discovery is a query on the collection rather than on an individual resource, so the consumer can search without knowing the bindingId.
A 204 in Discovery is neither an \"error\" nor a \"404\"
TS 29.521 §4.2.4.2 specifies that when no binding matches the Discovery conditions, the response is 204 No Content (sub-clause numbering to be confirmed). This does not mean "the BSF has failed" or "the PCF does not exist"; it is a normal search result meaning "no binding registered with these conditions exists (in this BSF)." On the other hand, if the query conditions are insufficient, or if multiple bindings match so that no unique result can be determined, the response is 400 Bad Request (cause e.g. MULTIPLE_BINDING_INFO_FOUND). Also distinguish these from 404 Not Found, returned when Update / Deregister targets a bindingId that does not exist (clauses defining each cause to be confirmed).
Register that collides with an existing binding
TS 29.521 specifies that the BSF returns 403 Forbidden (cause: EXISTING_BINDING_INFO_FOUND) when an existing binding is found at Register. However, the key for that check may not be a UE address collision but the combination of SUPI, DNN and S-NSSAI, related to the Rel-17 feature "select the same PCF for the same UE ID, DNN and S-NSSAI combination" (the PcfBinding attribute paraCom and the Supported Feature SamePcf) (applicable feature, Release and clause numbers to be confirmed in TS 29.521 §4.2.2 / §5.7.3). Whether the BSF replaces or rejects a Register that arrives while a binding with the same UE address already exists is also treated as to be confirmed in this chapter.
Call Flow — register → discover → apply policy¶
The following is the conceptual order for the case where, after the PDU Session is established and PCF-B is selected, an external AF requests QoS via the NEF. The actual timing and additional messages differ by scenario and Release.
sequenceDiagram
participant SMF
participant PCFB as PCF-B
participant BSF
participant NRF
participant NEF
participant AF
participant UPF
SMF->>PCFB: Npcf_SMPolicyControl_Create
(SUPI, DNN, S-NSSAI, UE IPv4)
PCFB-->>SMF: 201 Created (SM Policy Decision)
PCFB->>BSF: Nbsf_Management_Register
POST /pcfBindings (PcfBinding)
BSF-->>PCFB: 201 Created
Location: .../pcfBindings/{bindingId}
Note over SMF,UPF: Some time later, a QoS request from the application side
AF->>NEF: N33 AF Session with QoS request
(UE IPv4, requested QoS)
NEF->>NRF: Nnrf_NFDiscovery (target-nf-type=BSF)
NRF-->>NEF: Candidate BSFs (NF Profile / BsfInfo)
NEF->>BSF: Nbsf_Management_Discovery
GET /pcfBindings?ipv4Addr=...&dnn=...&snssai=...
BSF-->>NEF: 200 OK (PcfBinding: PCF-B FQDN / Endpoint)
NEF->>PCFB: Npcf_PolicyAuthorization_Create
PCFB-->>NEF: 201 Created
PCFB->>SMF: Npcf_SMPolicyControl_UpdateNotify
(PCC Rule update)
SMF->>UPF: PFCP Session Modification Request
UPF-->>SMF: PFCP Session Modification Response
Note over PCFB,BSF: At PDU Session Release
PCFB->>BSF: Nbsf_Management_Deregister
DELETE /pcfBindings/{bindingId}
BSF-->>PCFB: 204 No Content
The key point of the figure is that the PCF registers the binding and the NEF / AF (or the SCP) looks it up. The SMF does not register with the BSF. A trusted AF can find the serving PCF without going through the NEF and send the request directly over N5 (N5). It can find it by Discovery towards the BSF, via the SCP, through the BSF acting as Diameter proxy / redirect for an AF using Rx, or by local configuration; which one is used is deployment dependent. For details of the request flow via the NEF, see NEF / N33.
When does the PCF register, update and delete?¶
Summarizing the approach of TS 23.503 §6.1.1.2 (sub-clause numbering to be confirmed):
| Timing | PCF action | Operation |
|---|---|---|
| At SM Policy Association establishment, the UE's IPv4 address / IPv6 prefix (MAC for Ethernet) is known | Register the binding | Register |
| The UE address is allocated, added or changed later (e.g. IPv4 allocated later, a prefix added by IPv6 multi-homing) | Update the binding (whether delete + re-register is used as a substitute when Update is not supported is to be confirmed) | Update / Deregister + Register |
| The SM Policy Association is terminated (PDU Session Release etc.) | Delete the binding | Deregister |
Whether the BSF is used depends on the network configuration
In networks with only one PCF, or where the AF / NEF can reliably determine the serving PCF by other means (local configuration etc.), the BSF may not be deployed at all. "Under which conditions the PCF registers with the BSF" depends on operator configuration in addition to the conditions in the specifications (implementation/configuration dependent).
Signal Flow¶
| # | Message | Segment | Meaning | Specification |
|---|---|---|---|---|
| 1 | Npcf_SMPolicyControl_Create | SMF → PCF | Establish the SM Policy Association | TS 23.502 §4.16.4 / TS 29.512 §4.2.2 (to be confirmed) |
| 2 | Nbsf_Management_Register (POST) | PCF → BSF | Register the binding. 201 + Location |
TS 23.502 §5.2.13.2.2 / TS 29.521 §4.2.2 |
| 3 | Nnrf_NFDiscovery | NEF → NRF | Discover the BSF (omitted with local configuration) | TS 29.510 §5.3.2.2 (to be confirmed) |
| 4 | Nbsf_Management_Discovery (GET) | NEF / AF → BSF | Look up the serving PCF. 200 / 204 / 400 |
TS 23.502 §5.2.13.2.4 / TS 29.521 §4.2.4 |
| 5 | Npcf_PolicyAuthorization_Create | NEF / AF → PCF | Create the AF session (QoS request) | TS 29.514 §4.2.2 / TS 23.502 §4.15.6.6 (to be confirmed) |
| 6 | Npcf_SMPolicyControl_UpdateNotify | PCF → SMF | Notify the SMF of the PCC Rule update | TS 29.512 §4.2.3 / TS 23.502 §4.16.5.2 (to be confirmed) |
| 7 | PFCP Session Modification | SMF → UPF | Apply QoS / gating to the UPF | TS 29.244 §7.5.4 / §7.5.5 (to be confirmed) |
| 8 | Nbsf_Management_Deregister (DELETE) | PCF → BSF | Delete the binding. 204 |
TS 23.502 §5.2.13.2.3 / TS 29.521 §4.2.3 |
Packet Analysis (Wireshark)¶
Display Filter¶
| Filter | Use |
|---|---|
http2 |
All SBI traffic. Decryption keys are required when TLS is used |
http2.headers.path contains "nbsf-management" |
Narrow down to Nbsf_Management requests |
http2.headers.path contains "pcfBindings" |
Narrow down to PDU Session binding resources |
http2.headers.status == "204" |
Filter by response code (204 etc.) |
http2.headers.path contains "npcf-policyauthorization" |
The NEF / AF → PCF request after Discovery |
http2.headers.path contains "nnrf-disc" |
Discovery towards the NRF (discovering the BSF) |
json |
JSON bodies (PcfBinding / ProblemDetails) |
The names and types of HTTP/2 header fields (http2.headers.path / http2.headers.status etc.) vary between Wireshark versions, so they are not stated definitively here (to be confirmed). SBI is normally protected by TLS, so seeing the contents requires decryption using a TLS key log or NF-side traces / logs (Packet Analysis Tips).
Decode example (conceptual representation)¶
The following is a conceptual representation of the display structure; all values are fictitious (capture required).
[PCF-B → BSF] HEADERS
:method: POST
:path: /nbsf-management/v1/pcfBindings
content-type: application/json
[PCF-B → BSF] DATA (JSON: PcfBinding)
{
"supi": "imsi-001010000000001",
"ipv4Addr": "10.1.1.10",
"dnn": "internet",
"snssai": { "sst": 1, "sd": "010203" },
"pcfFqdn": "pcf-b.example.invalid",
"pcfIpEndPoints": [ { "ipv4Address": "192.0.2.20", "port": 443 } ],
"pcfId": "6f1c2c1e-....",
"pcfSetId": "set1.pcfset.5gc.mnc001.mcc001",
"bindLevel": "NF_SET"
}
[BSF → PCF-B] HEADERS
:status: 201
location: https://bsf.example.invalid/nbsf-management/v1/pcfBindings/abc123
[NEF → BSF] HEADERS
:method: GET
:path: /nbsf-management/v1/pcfBindings?ipv4Addr=10.1.1.10&dnn=internet&snssai=...
[BSF → NEF] HEADERS
:status: 200 ← match found. PcfBinding in DATA
(or :status: 204 ← no match. No DATA)
(or :status: 400 ← ProblemDetails in DATA, cause = MULTIPLE_BINDING_INFO_FOUND)
Object-type query parameters such as snssai appear in :path as encoded JSON. The encoded display is hard to read, so decode the values and compare them side by side with the expected DNN / S-NSSAI.
Order of inspection¶
flowchart TD
A["① SMF → PCF
Npcf_SMPolicyControl_Create
which PCF was selected"] --> B["② PCF → BSF
POST /pcfBindings
registered content (UE IP / DNN / S-NSSAI)"]
B --> C["③ BSF → PCF
201 Created / Location / bindingId"]
C --> D["④ NEF・AF → BSF
GET /pcfBindings
query conditions"]
D --> E["⑤ BSF → NEF・AF
200 + PcfBinding / 204 / 4xx"]
E --> F["⑥ NEF・AF → PCF
Npcf_PolicyAuthorization
does the destination match the PCF in ①"]
F --> G["⑦ PCF → SMF → UPF
UpdateNotify / PFCP Modification"]
The trick is to cross-check whether the PCF selected by the SMF in ①, the PCF returned by the BSF in ⑤, and the PCF the request actually reached in ⑥ are the same. On HTTP/2, look at :method, :path, :status, the stream ID, the JSON body, and the cause of ProblemDetails (for how to read ProblemDetails, see N7 SBI Analysis).
Trouble Shooting¶
| Symptom | Likely cause | What to check | Logs | Packet | Resolution |
|---|---|---|---|---|---|
| A. The AF's QoS request is not reflected in the existing Session | The request reached a PCF not serving the Session / the PCF accepted it but it was not applied to the SMF/UPF | Whether the PCF selected by the SMF (①), the PCF in the BSF response (⑤) and the destination PCF of the request (⑥) match. The subsequent UpdateNotify and PFCP | NEF / PCF / SMF logs | http2 (npcf-smpolicycontrol / nbsf-management / npcf-policyauthorization), pfcp |
Fix the point of mismatch (binding registration, Discovery conditions, the NEF's choice of destination) and follow the application path to the end |
| B. The PDU Session succeeded but Discovery returns 204 | Binding not registered (PCF's BSF usage setting, registration failure) / mismatch in query conditions (DNN, S-NSSAI, IP domain, IPv6 prefix length) / UE address allocation or change not yet reflected / the BSF registered with differs from the BSF queried | Whether the POST in ② was sent and answered with 201. The difference between registered content and query conditions. Whether the BSF obtained from the NRF is the same |
PCF / BSF / NEF logs | http2.headers.path contains "pcfBindings" |
Do not conclude "there is no PCF." Eliminate registration, conditions and BSF selection one by one |
C. Multiple bindings found for the same UE IP (400 MULTIPLE_BINDING_INFO_FOUND) |
Private IPv4 overlap across DNNs / slices / stale bindings not deleted (PCF failure, Deregister failure at Release) | Whether the Discovery conditions include DNN, S-NSSAI and IP domain. The list of bindings with the same address in the BSF (judge staleness via recoveryTime etc.) |
BSF logs, the BSF's binding list (CLI is implementation dependent) | json (ProblemDetails.cause) |
Supply sufficient query conditions. Design IP domains. Clean up stale bindings (automatic or manual is implementation dependent) |
| D. Requests still go to the old PCF after a PCF switchover | The new PCF has not Updated the binding / bindLevel remains NF_INSTANCE / caching on the NEF, AF or SCP side / inconsistency in Binding Indication or NF Set design |
The binding's pcfId, pcfSetId, bindLevel, recoveryTime. Responses to requests sent to the old PCF (timeouts, errors) |
PCF / BSF / NEF / SCP logs | http2 (presence of PATCH /pcfBindings) |
Review the binding update triggers and the NF Set redundancy design (NF Set / Binding Indication). Cache handling is implementation dependent |
Register to the BSF itself fails (403 etc.) |
An existing binding was detected (EXISTING_BINDING_INFO_FOUND; the check key may relate to the SUPI, DNN and S-NSSAI combination [paraCom], to be confirmed) / authorization (OAuth2 token) problem |
ProblemDetails in the response. The PCF that registered the existing binding | PCF / BSF logs | json |
Check the cause in the response and the content of the existing binding, and delete stale bindings. Details of the rejection condition are to be confirmed |
| The NEF cannot find the BSF | BSF not registered with the NRF / BsfInfo address ranges or DNNs do not cover the UE address | The NRF Discovery response (empty or not) | NEF / NRF logs | http2.headers.path contains "nnrf-disc" |
Fix the BSF's NF Profile (BsfInfo) or check the local configuration |
The BSF does not complete HA automatically
As in case D, whether the right PCF can still be reached after a PCF switchover depends not only on the BSF but on the combination of the PCF NF Set configuration, the Binding Level, the binding update triggers, and the consumer's reselection and caching. The BSF is merely a ledger recording "the current owner"; unless you design who rewrites the ledger and when, it will keep pointing to the old owner.
Boundary between 3GPP specifications and vendor implementations¶
| Defined by 3GPP | Decided by vendors / operations |
|---|---|
| The role of the BSF and the approach in which the PCF registers, updates and deletes bindings (TS 23.503 §6.1.1.2) | Whether the BSF is an independent NF or co-located with a PCF / NRF / SCP / DRA product |
| The Nbsf_Management API (resources, methods, response codes, causes) | The binding database product, pod structure, replica synchronization method, internal caches |
| The PcfBinding attributes (UE address, DNN, S-NSSAI, PCF destination, Instance ID / Set ID, Binding Level) | CLI to view the binding list, log format, dashboards |
The meaning of 200 / 204 / 400 in Discovery |
Automatic cleanup of stale bindings, monitoring design (the extent to which the specifications govern the details of behavior on collision is to be confirmed) |
| Discovering the BSF via BsfInfo (TS 29.510 §5.3.2.2 and related, to be confirmed) | Whether the NRF is used or the BSF is fixed by local configuration |
For BSF-related failures, separate "whether the binding was registered and looked up as specified (3GPP signaling)" from "data synchronization or caching problems inside the BSF product (implementation)." The former can be verified with traces; the latter belongs to product logs and vendor support.
Comparison with EPC (4G)¶
| Item | 4G EPC | 5GC |
|---|---|---|
| Policy decision point | PCRF | PCF |
| Mechanism to steer the same session to the same decision point | PCRF binding by the DRA (Diameter Routing Agent) (Gx / Rx to the same PCRF). PCRF addressing in TS 29.213 §7 and related / TS 23.203 §7.6 (both to be confirmed) | PCF binding by the BSF (Nbsf_Management) |
| Method | Diameter routing (proxy / redirect) | An SBI lookup API (the consumer learns the serving PCF and sends directly). Configurations where the BSF acts as a Diameter proxy / redirect agent are also possible (TS 23.503 §6.1.1.2 / TS 29.513, sub-clause numbering to be confirmed) |
| Binding keys | UE IP address, APN, user identifiers etc. | UE IP / IPv6 prefix / MAC, DNN, S-NSSAI, IP domain etc. |
| IF on the AF side | Rx (Diameter) | N5 (Npcf_PolicyAuthorization), or via the NEF (N33) |
The 4G DRA was a routing element that "relays messages while steering them to the same PCRF," whereas the 5G BSF is basically organized as a lookup service that "tells you the serving PCF." However, combined with indirect communication via the SCP or with Diameter proxy behavior, it can look similar to a DRA.
3GPP Specification¶
| Specification | Clause | Content |
|---|---|---|
| TS 23.503 | §6.1.1.2 | Binding AF requests to the serving PCF; role and deployment options of the BSF (sub-clause numbering of §6.1.1.2.1 / §6.1.1.2.2 to be confirmed) |
| TS 23.501 | §6.3.7.1 | PCF Discovery and Selection (initial PCF selection by the SMF etc.; to be confirmed. The related clause on the TS 23.503 side is also to be confirmed) |
| TS 23.501 | §6.3.1.0 / §7.1.1 | NF / NF service discovery and indirect communication via the SCP (to be confirmed) |
| TS 23.502 | §5.2.13.2.2–§5.2.13.2.5 | Nbsf_Management_Register / Deregister / Discovery / Update |
| TS 23.502 | §5.2.13.2.6 onward | Nbsf_Management_Subscribe / Unsubscribe / Notify (to be confirmed) |
| TS 23.502 | §4.16.4 / §4.16.5.2 / §4.15.6.6 | SM Policy Association Establishment / PCF-initiated Modification / AF session with required QoS (to be confirmed) |
| TS 29.521 | §4.2.2 / §4.2.3 / §4.2.4 / §4.2.5 | Register (POST) / Deregister (DELETE) / Discovery (GET; 200 and 204 in §4.2.4.2, sub-clause numbering to be confirmed) / Update (PATCH) |
| TS 29.521 | §4.2.6–§4.2.8 | Subscribe / Unsubscribe / Notify (to be confirmed) |
| TS 29.521 | §5.6.2.2 | PcfBinding data type (to be confirmed) |
| TS 29.510 | §5.3.2.2 | Nnrf_NFDiscovery (NFDiscover). BsfInfo in the NF Profile (including its defining clause, to be confirmed) |
| TS 29.512 / TS 29.514 | §4.2.2 / §4.2.3, §4.2.2 | Npcf_SMPolicyControl (N7) Create / UpdateNotify, Npcf_PolicyAuthorization (N5) Create (to be confirmed) |
| TS 29.244 | §7.5.4 / §7.5.5 | PFCP Session Modification Request / Response (to be confirmed) |
| TS 29.513 | — | Policy and Charging signalling flows. Binding procedures using the BSF, Diameter proxy / redirect flows (binding-related clauses to be confirmed) |
| TS 29.213 / TS 23.203 | §7 and related / §7.6 | PCRF addressing (DRA) in EPC / PCRF discovery and selection (for comparison; to be confirmed) |
Summary¶
- The BSF holds the mapping (PcfBinding) between a PDU Session (UE address, DNN, S-NSSAI etc.) and its serving PCF and makes it searchable. It does not decide policy
- The NRF answers "candidate PCFs (or BSFs) that are available"; the BSF answers "the PCF currently serving this Session." They are often used in two stages
- The PCF registers, updates and deletes bindings; the NEF / AF / SCP looks them up. Nbsf_Management offers Register / Deregister / Discovery / Update (+ Subscribe / Notify from Rel-17)
- A Discovery
204 No Contentis a normal response meaning "no matching binding."400 MULTIPLE_BINDING_INFO_FOUNDindicates the conditions are ambiguous and no unique binding can be determined - A PcfBinding carries the PCF's destination (FQDN / endpoint) and identity (Instance ID / Set ID / Binding Level), which affect reachability when PCFs are made redundant
- In failure analysis, cross-check in the trace whether the PCF selected by the SMF = the PCF returned by the BSF = the PCF the request reached
Comprehension check¶
Q1. To process a QoS request for UE IP 10.1.1.10, the NEF performed Discovery towards the BSF and got 204 No Content. The SM Policy Association between the SMF and the PCF is already established. Which explanation is most appropriate? A. 204 indicates a BSF failure, so the UPF should be restarted / B. If the SM Policy Association exists, the binding registration to the BSF has always succeeded too / C. No matching binding may have been found; check the registration status from the PCF to the BSF and query conditions such as UE IP, DNN and S-NSSAI / D. 204 indicates that the QoS request was successfully applied to the UPF
Answer: C. TS 29.521 §4.2.4.2 returns 204 No Content when no binding matches the Discovery conditions. It means neither a BSF failure (A) nor completed QoS application (D). Also, establishment of the SM Policy Association and Register to the BSF are separate messages, so success of the former does not guarantee success of the latter (B). Check whether the PCF's POST /pcfBindings and its 201 exist, the difference between registered content and query conditions, and whether the BSF registered with is the same as the BSF queried.
Q2. Explain what is wrong with the claim: \"The PCF is registered with the NRF, so the NEF can learn the serving PCF by asking the NRF.\"
What the NRF returns is candidate PCFs that are available matching conditions such as NF Type, service and slice. Which PCF holds the SM Policy Association of a specific PDU Session is the result of the SMF's selection, and the NRF does not know it. The BSF holds that mapping. The NRF can, however, be used to "find the BSF" (BSF discovery via BsfInfo).
Q3. Discovery with only the UE IPv4 address specified returned 400 Bad Request (cause: MULTIPLE_BINDING_INFO_FOUND). What are the possible causes and the remedies?
Multiple bindings match the same IPv4 address. Possible causes are private IPv4 overlap across different DNNs / S-NSSAIs / IP domains, and stale bindings remaining because of a PCF failure or a Deregister failure at Release. Remedies are to narrow the result uniquely by adding DNN, S-NSSAI, IP domain etc. to Discovery, to review the IP domain design, and to clean up stale bindings (the cleanup mechanism is implementation dependent).
Q4. After PCF-B in a PCF Set failed and was switched over to PCF-C, the NEF keeps sending requests to PCF-B. Which attributes of the binding do you check?
Check pcfId (NF Instance ID), pcfSetId (NF Set ID), bindLevel (NF_INSTANCE or NF_SET), recoveryTime, and the destination pcfFqdn / pcfIpEndPoints. If the Binding Level remains NF_INSTANCE and the new PCF has not Updated it, the BSF keeps returning the old PCF. With NF_SET, the consumer has room to reselect another PCF in the set. Also check caching on the NEF / SCP side (implementation dependent) and the NF Set / Binding Indication design. The BSF alone does not complete HA.
Next Step¶
- The relation between PCF redundancy and Binding Level / Binding Indication → NF Set / Binding Indication / PCF Redundancy
- Indirect communication in which the SCP uses the BSF to forward to the serving PCF → SBI Communication Model A–D / SCP
- NFs that look up the BSF → NEF / N33 / Event Exposure / AF / N5 / Application Session
- Related NFs / interfaces → BSF / PCF / NRF / SCP / N5 / Policy