Skip to main content

OmniBSF Operations Guide

Table of Contents

  1. Component Overview
  2. 3GPP Role and Spec References
  3. SBI Endpoints
  4. Configuration Reference
  5. Key Procedures
  6. Observability
  7. Known Limitations
  8. Troubleshooting

Component Overview

OmniBSF implements the Binding Support Function (BSF) network function defined in 3GPP TS 29.521. The BSF maintains a registry of PCF bindings, mapping each UE IP address (IPv4 or IPv6 prefix) to the PCF instance responsible for its PDU session policy. This allows NF consumers (SMF, AF, NEF) to discover the correct PCF for a given session without querying the NRF.

Internal Data Store

Bindings are held in four ETS tables at runtime. All data is in-memory and does not survive a process restart.

ETS TableTypeKeyValue
bsf_bindings:setbinding_id (string)full binding map
bsf_ipv4_index:setIPv4 address (string)binding_id
bsf_ipv6_index:setIPv6 prefix (string)binding_id
bsf_supi_index:setSUPI (string)binding_id

3GPP Role and Spec References

ItemReference
BSF NF definition3GPP TS 23.501 Section 6.2.15
Nbsf_Management service3GPP TS 29.521
PCF binding registration procedure3GPP TS 29.521 Section 4.2.2
PCF binding discovery procedure3GPP TS 29.521 Section 4.2.3
PCF binding deregistration procedure3GPP TS 29.521 Section 4.2.4
SBI common framework3GPP TS 29.500
NF registration with NRF3GPP TS 29.510
PcfBinding data model3GPP TS 29.521 Section 6.1

The BSF is a mandatory network function when the PCF supports multiple instances. Its primary role is session binding: ensuring that all policy decisions for a PDU session are handled by the same PCF instance.


SBI Endpoints

Base path: /nbsf-management/v1

MethodPathDescriptionSuccessError
POST/pcfBindingsRegister a PCF binding. Creates a new binding or upserts based on UE IP address. Returns a Location header with the binding ID.201 Created400 Bad Request (missing snssai, dnn, or PCF address)
GET/pcfBindingsDiscover a PCF binding. Accepts query parameters to look up the binding. Returns the PcfBinding object or 204 if not found.200 OK or 204 No Content400 Bad Request
DELETE/pcfBindings/{bindingId}Deregister a PCF binding by its ID.204 No Content404 Not Found

GET Query Parameters

ParameterTypeLookup PriorityDescription
ipv4Addrstring1 (highest)UE IPv4 address (exact match)
ipv6Prefixstring2UE IPv6 prefix (exact match)
dnnstring3 (table scan)Data Network Name, used with snssai
snssaistring (JSON-encoded)3 (table scan)S-NSSAI with sst and optional sd fields

Lookup priority follows TS 29.521 and the open5gs bsf-sm.c reference implementation: ipv4Addr is checked first, then ipv6Prefix, then the DNN+S-NSSAI combination (which requires a full table scan).

POST Request Body — Required Fields

FieldTypeDescription
snssaiobjectS-NSSAI (sst integer + optional sd string). Mandatory.
dnnstringData Network Name. Mandatory.
pcfFqdnstringPCF FQDN. Mandatory if pcfIpEndPoints is absent.
pcfIpEndPointsarrayPCF IP endpoint list. Mandatory if pcfFqdn is absent.
ipv4AddrstringUE IPv4 address. Optional but required for IPv4 lookup.
ipv6PrefixstringUE IPv6 prefix. Optional but required for IPv6 lookup.
supistringSubscriber Permanent Identifier. Optional.
gpsistringGeneric Public Subscription Identifier. Optional.
ipv4FrameRouteListarrayIPv4 framed routes. Optional.
ipv6FrameRouteListarrayIPv6 framed routes. Optional.
suppFeatstring (hex)Supported features bitmap. Negotiated via bitwise AND.

Configuration Reference

All parameters are set via the application environment (typically config/runtime.exs).

config :omnibsf,
sbi_scheme: "http",
sbi_addr: "127.0.0.15",
sbi_port: 7777,
nrf_uri: "http://127.0.0.10:7777",
mcc: "999",
mnc: "70",
heartbeat_interval: 10_000

Parameter Table

ParameterDefaultTypeDescription
sbi_scheme"http"stringTransport scheme for the SBI listener. Set to "https" when TLS termination is handled by OmniBSF directly.
sbi_addr"127.0.0.15"stringIP address the SBI HTTP server binds to.
sbi_port7777integerTCP port the SBI HTTP server listens on.
nrf_uri"http://127.0.0.10:7777"stringBase URI of the NRF used for NF registration and heartbeat.
mcc"999"stringMobile Country Code. Used in the NF profile submitted to the NRF during registration.
mnc"70"stringMobile Network Code. Used in the NF profile submitted to the NRF during registration.
heartbeat_interval10_000integer (ms)Interval between NRF heartbeat (NFUpdate) requests. A value of 10_000 (10 s) is suitable for most deployments; reduce if NRF TTLs are shorter.

Key Procedures

PCF Binding Registration (POST)

PCF Binding Discovery (GET)

PCF Binding Deregistration (DELETE)

NRF Registration and Heartbeat

OmniBSF registers as a BSF NF profile with the NRF on startup using the Omni5gEx shared library. It sends periodic NFUpdate heartbeat requests at the configured heartbeat_interval. If NRF registration is lost (e.g., NRF restart), OmniBSF will attempt re-registration automatically.


Observability

Telemetry Events

EventMeasurementsTagsDescription
[:omnibsf, :pcf_binding, :register]countdnnFired on every successful binding registration
[:omnibsf, :pcf_binding, :discover]countresult (found/not_found)Fired on every discover request
[:omnibsf, :pcf_binding, :deregister]countbinding_idFired on every successful deregistration
[:omnibsf, :binding, :register]countAggregate registration counter
[:omnibsf, :binding, :discover]countresultAggregate discovery counter
[:omnibsf, :binding, :deregister]countAggregate deregistration counter
[:omnibsf, :bindings, :active]countGauge: current active binding count
[:omni5g, :nrf, :registration]statusnf_typeNRF registration status (1=registered, 0=not)

Prometheus Metrics

BSF Metrics

MetricTypeTagsDescription
omni_bsf.pcf_binding.register.countcounterdnnPCF binding registrations
omni_bsf.pcf_binding.discover.countcounterresultPCF binding discoveries
omni_bsf.pcf_binding.deregister.countcounterbinding_idPCF binding deregistrations
omni_bsf.binding_registers.totalcounter--Aggregate registration counter
omni_bsf.binding_discovers.totalcounterresultAggregate discovery counter
omni_bsf.binding_deregisters.totalcounter--Aggregate deregistration counter
omni_bsf.active_bindings.countgauge--Current active binding count
omni_bsf.nrf.registration.statusgaugenf_typeNRF registration status (1=registered, 0=not)

BEAM VM Metrics

MetricTypeDescription
beam.memory.totalgaugeTotal BEAM memory in bytes
beam.memory.processesgaugeMemory used by Erlang processes
beam.memory.processes_usedgaugeMemory actually used by processes
beam.memory.systemgaugeSystem memory
beam.memory.atomgaugeTotal atom memory
beam.memory.atom_usedgaugeUsed atom memory
beam.memory.binarygaugeBinary memory
beam.memory.codegaugeCode memory
beam.memory.etsgaugeETS table memory
beam.processes.countgaugeNumber of Erlang processes
beam.ports.countgaugeNumber of Erlang ports
beam.atom.countgaugeNumber of atoms
beam.vm.uptimegaugeVM uptime in seconds

Log Patterns

LevelPatternMeaning
infoPCF binding registered: id=&lt;N> ipv4=<addr> ...Successful registration
infoPCF binding deregistered: id=&lt;N>Successful deregistration
debugPCF binding discovered: id=&lt;N>Successful discovery
debugPCF binding not found for query: ...Discovery miss
warningPCF binding not found for deregister: id=&lt;N>DELETE for unknown ID

Known Limitations

IDSeverityDescription
BSF-M1MediumPATCH /nbsf-management/v1/pcfBindings/{bindingId} is not implemented. PCF binding updates require a full DELETE followed by a new POST. Per TS 29.521 the PATCH method is optional when the BindingUpdate supported feature is not negotiated, but clients that negotiate feature 0x01 may expect PATCH support.
BSF-M2MediumThe PcfBinding object returned in POST 201 and GET 200 responses does not include the bindingId field. Consumers must extract the binding ID from the Location header of the POST response.
BSF-M3MediumThe GET discovery endpoint returns a single PcfBinding object rather than the PcfBindingList array defined in TS 29.521. Consumers that expect the collection form will receive an unexpected response type.
BSF-M4MediumThe SUPI index uses an ETS :set table, meaning only one binding per SUPI is maintained. If a subscriber has multiple simultaneous PDU sessions across different DNNs, only the most recently registered binding is indexed by SUPI. IPv4/IPv6 indexes are unaffected.
BSF-L1LowmacAddr48 query parameter is not supported. MAC-address-based lookup (used for 5G-LAN and some fixed-access scenarios) always returns 204.
BSF-L2LowQuery parameters pcfSetId, pcfRegionId, and bindLevel are accepted but ignored. No filtering by PCF set or region is applied.
BSF-L3LowBinding IDs are sequential integers (1, 2, 3, ...) rather than UUIDs or opaque strings. This leaks the total number of bindings created since startup to any consumer that inspects Location headers.
BSF-L5LowBindings have no TTL or expiry mechanism. A binding created for a PDU session that terminates without sending a DELETE will remain in memory indefinitely. Operator intervention (process restart) is required to purge stale bindings.

Troubleshooting

204 returned when a binding is expected

  1. Verify the query parameter matches exactly what was registered. IPv4 and IPv6 lookups are exact-string matches — formatting differences (e.g., leading zeros, prefix length notation) will cause a miss.
  2. Check logs for PCF binding not found for query: to see what was searched.
  3. Confirm the SMF successfully completed the POST registration (look for PCF binding registered: in logs).
  4. Note that DNN+S-NSSAI lookup performs a full table scan; if sst does not match exactly (integer vs string type mismatch in the original POST), the scan will not find the record.

404 on DELETE

The binding ID in the request path does not match any active binding. Either the binding was already deregistered, or OmniBSF restarted (all bindings are lost on restart because storage is in-memory only). Check logs for PCF binding not found for deregister:.

400 on POST

The request body is missing one or more mandatory fields. The detail field in the ProblemDetails response body will identify the specific missing field: "No S-NSSAI", "No DNN", or "No PCF address information".

High memory use / stale bindings accumulating

OmniBSF has no binding TTL (BSF-L5). If PDU sessions terminate without sending DELETE requests, bindings accumulate indefinitely. Monitor the omni_bsf.active_bindings.count metric. A controlled restart clears all bindings; re-registration by active SMF instances will repopulate the store.

NRF registration failing

Check the omni_bsf.nrf.registration.status metric and logs for NRF-related errors. Verify:

  • nrf_uri points to a reachable NRF instance.
  • The mcc and mnc values match the PLMN configured in the NRF.
  • Network connectivity between OmniBSF's sbi_addr and the NRF is working.

Supported features negotiation

OmniBSF advertises and negotiates only feature bit 0x01 (BindingUpdate). Clients that send suppFeat values with higher bits set will have those bits cleared in the response. This is expected behaviour per TS 29.521 Section 6.1.6.