OmniNSSF Configuration Reference
Operator configuration is read from the application environment key :omnissf. Runtime configuration is supplied via config/runtime.exs, which maps OS environment variables to configuration keys at startup. The slice topology (NSI list, allowed NSSAI, AMF-set mapping, configured NSSAI) is supplied through structural application configuration (see Slice Topology Configuration) and adjusted at runtime through the OAM API.
Runtime Configuration (config/runtime.exs)
config :omnissf,
sbi_scheme: System.get_env("SBI_SCHEME", "http"),
sbi_addr: System.get_env("SBI_ADDR", "127.0.0.14"),
sbi_port: String.to_integer(System.get_env("SBI_PORT", "7777")),
nrf_uri: System.get_env("NRF_URI", "http://127.0.0.1:7777"),
mcc: System.get_env("MCC", "999"),
mnc: System.get_env("MNC", "70"),
prometheus_metrics_port: String.to_integer(System.get_env("PROMETHEUS_PORT", "9568")),
heartbeat_interval: String.to_integer(System.get_env("HEARTBEAT_INTERVAL", "10000"))
config :logger, :default_formatter,
format: {OmniLogger.JsonFormatter, :format},
metadata: :all
| Parameter | Type | Required | Default | Env Var | Description |
|---|---|---|---|---|---|
sbi_scheme | string | No | "http" | SBI_SCHEME | HTTP scheme for the SBI listening socket (http or https) |
sbi_addr | string | No | "127.0.0.14" | SBI_ADDR | IP address the SBI HTTP server binds to. Also advertised to the NRF as the NSSF's SBI IP |
sbi_port | integer | No | 7777 | SBI_PORT | TCP port the SBI HTTP server listens on. Also advertised to the NRF |
nrf_uri | string | No | "http://127.0.0.1:7777" | NRF_URI | Base URI of the NRF, used for NF registration and heartbeat |
mcc | string | No | "999" | MCC | Mobile Country Code of the serving PLMN. Advertised to the NRF and used as the home-PLMN key for Allowed NSSAI lookup |
mnc | string | No | "70" | MNC | Mobile Network Code of the serving PLMN. Advertised to the NRF and used as the home-PLMN key for Allowed NSSAI lookup |
prometheus_metrics_port | integer | No | 9568 | PROMETHEUS_PORT | TCP port the Prometheus metrics endpoint listens on |
heartbeat_interval | integer (ms) | No | 10000 | HEARTBEAT_INTERVAL | Interval in milliseconds between NRF heartbeat requests |
Note: the compiled default for
nrf_uriin the runtime config ishttp://127.0.0.1:7777, while the internal accessor default ishttp://127.0.0.10:7777. Whenruntime.exsis applied the effective default ishttp://127.0.0.1:7777. SetNRF_URIexplicitly to avoid ambiguity.
Behaviour and Notification Settings
The following :omnissf application-configuration keys tune slice-selection and notification behaviour. None have a runtime.exs environment variable, so they are set through application configuration rather than an OS environment variable.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
dynamic_nrf_discovery | Boolean | No | false | When true, the NSSF discovers the slice-serving NRF at runtime from the root NRF via Nnrf_NFDiscovery instead of using only the static nsi_list. On each slice-selection request it queries the root NRF for the requested S-NSSAI and falls back to the configured nsi_list NRF when discovery is disabled, unreachable, or returns nothing |
strict_availability | Boolean | No | false | Availability enforcement mode. When false (permissive), a TAI with no explicit availability record still yields the configured allowed NSSAI. When true (fail-closed), such a TAI is denied and the allowed NSSAI is returned empty |
nssf_notification_max_attempts | Integer | No | 3 | Maximum delivery attempts per availability-change notification before it is dropped and the failure is logged |
nssf_notification_backoff_ms | List of integers | No | [200, 1000] | Per-retry backoff schedule in milliseconds for availability-change notifications. The first value is applied before the second attempt, the second before the third, and the last value is reused for any further attempts |
Logger
| Parameter | Type | Required | Default | Env Var | Description |
|---|---|---|---|---|---|
format | formatter tuple | No | {OmniLogger.JsonFormatter, :format} | - | Structured JSON log formatter for the default logger |
metadata | atom / list | No | :all | - | Log metadata included in each entry (:all emits every metadata field) |
The active log level can be changed at runtime without a restart through the OAM API (PATCH /oam/config/{id} with log_level, or POST /oam/log_level). Valid levels are emergency, alert, critical, error, warning, warn, notice, info, and debug.
Slice Topology Configuration
The slice topology is loaded into the SliceConfig store at startup from the following :omnissf application-configuration keys. Each has a built-in default that models a single eMBB slice (SST 1, SD 0x000001). These keys are structural (maps and lists) and are set through application configuration rather than a single environment variable; they can also be changed at runtime through the OAM API (see Runtime Slice Management).
config :omnissf,
nsi_list: [
%{s_nssai: %{sst: 1, sd: "0x000001"}, nrf_uri: "http://127.0.0.10:7777", nsi_id: "1"}
],
allowed_nssai: %{
"999-70" => [%{sst: 1, sd: "0x000001"}]
},
amf_set_mapping: %{
"1-0x000001" => ["1"]
},
configured_nssai: %{}
nsi_list - Network Slice Instance entries
Each entry binds an S-NSSAI to the NRF that serves slice-specific NF discovery for that slice. The NSSF matches the requested S-NSSAI against this list; a match yields the NSI information returned to the AMF, and no match yields 403.
| Parameter | Type | Required | Default | Env Var | Description |
|---|---|---|---|---|---|
nsi_list | list of maps | No | single eMBB entry (below) | - | Full set of NSI entries loaded at startup |
s_nssai.sst | integer | Yes | 1 | - | Slice/Service Type of the slice |
s_nssai.sd | string | No | "0x000001" | - | Slice Differentiator. When omitted, the entry matches any SD for that SST |
nrf_uri | string | Yes | "http://127.0.0.10:7777" | - | Base URI of the NRF serving this slice, returned to the AMF as nsiInformation.nrfId |
nsi_id | string | No | "1" | - | Network Slice Instance identifier, returned as nsiInformation.nsiId. Omitted from the response when not set |
SD matching is wildcard-aware: a nil SD on either the configured entry or the request matches any SD, and non-nil SDs are compared case-insensitively.
allowed_nssai - Allowed NSSAI per PLMN
Maps a PLMN key "mcc-mnc" to the list of S-NSSAIs allowed for UEs of that PLMN. When a query's PLMN has no entry, the NSSF falls back to the home PLMN (mcc-mnc from the runtime config). The resulting list is returned as allowedNssaiList (access type 3GPP_ACCESS) and, when a TAI is supplied, is filtered to the S-NSSAIs reported available at that TAI.
| Parameter | Type | Required | Default | Env Var | Description |
|---|---|---|---|---|---|
allowed_nssai | map | No | {"999-70" => [...]} | - | PLMN-keyed allowed-NSSAI table |
| map key | string "mcc-mnc" | Yes | "999-70" | - | PLMN identifier the allowed set applies to |
sst | integer | Yes | 1 | - | SST of an allowed S-NSSAI |
sd | string | No | "0x000001" | - | SD of an allowed S-NSSAI |
amf_set_mapping - Target AMF set per S-NSSAI
Maps an S-NSSAI key to the AMF set(s) able to serve that slice. When present, the first AMF set is returned as targetAmfSet, telling the AMF to reroute if it cannot serve the slice itself.
| Parameter | Type | Required | Default | Env Var | Description |
|---|---|---|---|---|---|
amf_set_mapping | map | No | {"1-0x000001" => ["1"]} | - | S-NSSAI-keyed target-AMF-set table |
| map key | string "sst" or "sst-sd" | Yes | "1-0x000001" | - | S-NSSAI key the mapping applies to |
| value | list of strings | Yes | ["1"] | - | Target AMF set identifiers for the slice |
Key matching for
amf_set_mappingandconfigured_nssaiis exact, unlikensi_list. The lookup key is built from the S-NSSAI in the query:"sst"when the requested S-NSSAI has no SD,"sst-sd"when it does. A query that carries an SD only matches a"sst-sd"key; a bare"sst"key will not match it, and vice-versa. There is no SD wildcarding here. If you serve a slice with an SD, use the"sst-sd"form (e.g."1-0x000001"); if the requested S-NSSAI has no SD, use the bare"sst"form (e.g."1").
configured_nssai - Configured NSSAI mapping (roaming)
Maps an S-NSSAI key to a Configured NSSAI value returned to the AMF for roaming/mapping scenarios. Empty by default; when set, the value is returned verbatim as configuredNssai. This is used to give a roaming UE the mapping between an S-NSSAI of the serving (visited) PLMN and the corresponding S-NSSAI of its home PLMN, so the UE can present a home-PLMN S-NSSAI when it later moves. The NSSF does not interpret the value - it passes through whatever object you configure - so it must be shaped exactly as the AMF expects per TS 29.531.
| Parameter | Type | Required | Default | Env Var | Description |
|---|---|---|---|---|---|
configured_nssai | map | No | %{} (empty) | - | S-NSSAI-keyed configured-NSSAI table |
| map key | string "sst" or "sst-sd" | No | (none) | - | S-NSSAI key the configured mapping applies to (exact match, see note above) |
| value | object | No | (none) | - | Configured NSSAI value returned verbatim as configuredNssai |
Example - return a home-PLMN S-NSSAI mapping for the visited-PLMN slice 1-0x000001:
config :omnissf,
configured_nssai: %{
"1-0x000001" => %{"sst" => 1, "sd" => "0x0000ff"}
}
Leave configured_nssai empty (%{}) for non-roaming deployments; the response then omits configuredNssai entirely.
Defining a slice end-to-end
A single slice is not described by one config key - the four keys above are independent tables, and a slice-selection response is assembled from whichever of them contain a matching entry. To make a new slice fully usable you normally populate two, and optionally all four:
| Key | Required for the slice to work? | What it controls in the response |
|---|---|---|
nsi_list | Yes | Whether the S-NSSAI resolves at all. A request with no matching NSI entry is rejected with 403 SNSSAI_NOT_FOUND. Supplies nsiInformation (target NRF + optional NSI ID) |
allowed_nssai | Yes, per serving PLMN | Whether the UE is told it may use the slice. Without a matching PLMN entry (and no home-PLMN fallback) the response omits allowedNssaiList, so the AMF has no Allowed NSSAI to give the UE |
amf_set_mapping | Optional | Adds targetAmfSet so the AMF can reroute when it cannot serve the slice itself. Omit for single-AMF-set deployments |
configured_nssai | Optional (roaming only) | Adds configuredNssai for visited-to-home S-NSSAI mapping |
Worked example - add slice SST 2 (URLLC), SD 0x000010, served by NRF http://10.0.0.20:7777, allowed for home PLMN 999-70, reroutable to AMF set 2:
config :omnissf,
nsi_list: [
%{s_nssai: %{sst: 2, sd: "0x000010"}, nrf_uri: "http://10.0.0.20:7777", nsi_id: "2"}
],
allowed_nssai: %{
"999-70" => [%{sst: 2, sd: "0x000010"}]
},
amf_set_mapping: %{
"2-0x000010" => ["2"]
}
Remember the SD-matching asymmetry: nsi_list and allowed_nssai compare SDs case-insensitively with nil acting as a wildcard, whereas amf_set_mapping and configured_nssai are keyed by an exact "sst-sd" string. Keep the SD form consistent (for example always "0x000010") across all four keys so the keys line up.
The same slice can also be added at runtime with POST /oam/slice (which writes nsi_list only); allowed-NSSAI, AMF-set, and configured-NSSAI tables are configuration-only and are not editable through the OAM API. Runtime NSI additions revert on restart.
Management and Metrics Ports
The following operator-facing listeners are started alongside the SBI endpoint:
| Listener | Default | Env Var | Description |
|---|---|---|---|
| Management / OAM API | TCP 8443 (HTTPS) | - | REST API for status, slice inspection, statistics, and runtime OAM actions |
| Prometheus metrics | TCP 9568 | PROMETHEUS_PORT | Prometheus scrape endpoint exposing NSSF and BEAM metrics |
Management / OAM API
A REST management/OAM API is served over HTTPS on port 8443 (bind 0.0.0.0). It provides read-only status and statistics plus runtime OAM controls. All responses are JSON, wrapped in a standard success / error envelope. Paths below are relative to the API base.
Status and Inspection
| Method | Path | Description |
|---|---|---|
| GET | /status/api | API service liveness |
| GET | /status/nrf | NRF registration status |
| GET | /status/nf | NSSF NF status |
| GET | /slice_config | Current slice configuration snapshot |
| GET | /api/slices | Configured S-NSSAIs with NSI mappings, target AMF sets, allowed NSSAI per PLMN, and AMF-set mapping |
| GET | /api/nssai_availability | Per-AMF NSSAI availability currently stored |
| GET | /api/statistics | NSSF operational statistics |
| GET | /oam/config | Effective runtime configuration (SBI address/port, NRF URI, MCC/MNC, NF capacity/priority, log level) |
GET /api/statistics returns a counts snapshot useful for a quick health/capacity check without scraping Prometheus:
| Field | Meaning |
|---|---|
total_slices | Number of NSI entries currently loaded (nsi_list size) |
total_allowed_nssai_plmns | Number of PLMNs with an allowed_nssai entry |
total_amf_set_mappings | Number of S-NSSAI keys in amf_set_mapping |
nssai_availability_count | Number of AMFs that have reported per-TAI availability |
nssai_availability_subscription_count | Number of active availability-change subscriptions |
Runtime Slice Management
| Method | Path | Description |
|---|---|---|
| POST | /oam/slice | Add or update an NSI mapping. Body: sst (required), nrf_uri (required), optional sd, nsi_id |
| DELETE | /oam/slice/{id} | Remove an NSI mapping. id is the S-NSSAI key "sst" or "sst-sd". Returns 404 if no matching NSI exists |
| DELETE | /oam/nssai_availability/{id} | Invalidate stored NSSAI availability for an AMF (id = nfId) |
Runtime slice changes apply immediately to subsequent slice-selection queries but are not persisted; they revert to the configured topology on restart.
Runtime Configuration Controls
| Method | Path | Description |
|---|---|---|
| PATCH | /oam/config/{id} | Update runtime config. Allowed keys: nrf_uri, nf_capacity, nf_priority, log_level. Invalid keys/values return 400 |
| POST | /oam/nrf/reregister | Force NRF re-registration |
| POST | /oam/log_level | Change log level. Body: level (one of emergency, alert, critical, error, warning, warn, notice, info, debug) |
For PATCH /oam/config/{id}, nf_capacity and nf_priority must be integers and log_level must be a valid level string; otherwise the request returns 400.