Skip to main content

← Overview

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
ParameterTypeRequiredDefaultEnv VarDescription
sbi_schemestringNo"http"SBI_SCHEMEHTTP scheme for the SBI listening socket (http or https)
sbi_addrstringNo"127.0.0.14"SBI_ADDRIP address the SBI HTTP server binds to. Also advertised to the NRF as the NSSF's SBI IP
sbi_portintegerNo7777SBI_PORTTCP port the SBI HTTP server listens on. Also advertised to the NRF
nrf_uristringNo"http://127.0.0.1:7777"NRF_URIBase URI of the NRF, used for NF registration and heartbeat
mccstringNo"999"MCCMobile Country Code of the serving PLMN. Advertised to the NRF and used as the home-PLMN key for Allowed NSSAI lookup
mncstringNo"70"MNCMobile Network Code of the serving PLMN. Advertised to the NRF and used as the home-PLMN key for Allowed NSSAI lookup
prometheus_metrics_portintegerNo9568PROMETHEUS_PORTTCP port the Prometheus metrics endpoint listens on
heartbeat_intervalinteger (ms)No10000HEARTBEAT_INTERVALInterval in milliseconds between NRF heartbeat requests

Note: the compiled default for nrf_uri in the runtime config is http://127.0.0.1:7777, while the internal accessor default is http://127.0.0.10:7777. When runtime.exs is applied the effective default is http://127.0.0.1:7777. Set NRF_URI explicitly 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.

ParameterTypeRequiredDefaultDescription
dynamic_nrf_discoveryBooleanNofalseWhen 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_availabilityBooleanNofalseAvailability 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_attemptsIntegerNo3Maximum delivery attempts per availability-change notification before it is dropped and the failure is logged
nssf_notification_backoff_msList of integersNo[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​

ParameterTypeRequiredDefaultEnv VarDescription
formatformatter tupleNo{OmniLogger.JsonFormatter, :format}-Structured JSON log formatter for the default logger
metadataatom / listNo: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.

ParameterTypeRequiredDefaultEnv VarDescription
nsi_listlist of mapsNosingle eMBB entry (below)-Full set of NSI entries loaded at startup
s_nssai.sstintegerYes1-Slice/Service Type of the slice
s_nssai.sdstringNo"0x000001"-Slice Differentiator. When omitted, the entry matches any SD for that SST
nrf_uristringYes"http://127.0.0.10:7777"-Base URI of the NRF serving this slice, returned to the AMF as nsiInformation.nrfId
nsi_idstringNo"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.

ParameterTypeRequiredDefaultEnv VarDescription
allowed_nssaimapNo{"999-70" => [...]}-PLMN-keyed allowed-NSSAI table
map keystring "mcc-mnc"Yes"999-70"-PLMN identifier the allowed set applies to
sstintegerYes1-SST of an allowed S-NSSAI
sdstringNo"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.

ParameterTypeRequiredDefaultEnv VarDescription
amf_set_mappingmapNo{"1-0x000001" => ["1"]}-S-NSSAI-keyed target-AMF-set table
map keystring "sst" or "sst-sd"Yes"1-0x000001"-S-NSSAI key the mapping applies to
valuelist of stringsYes["1"]-Target AMF set identifiers for the slice

Key matching for amf_set_mapping and configured_nssai is exact, unlike nsi_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.

ParameterTypeRequiredDefaultEnv VarDescription
configured_nssaimapNo%{} (empty)-S-NSSAI-keyed configured-NSSAI table
map keystring "sst" or "sst-sd"No(none)-S-NSSAI key the configured mapping applies to (exact match, see note above)
valueobjectNo(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:

KeyRequired for the slice to work?What it controls in the response
nsi_listYesWhether 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_nssaiYes, per serving PLMNWhether 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_mappingOptionalAdds targetAmfSet so the AMF can reroute when it cannot serve the slice itself. Omit for single-AMF-set deployments
configured_nssaiOptional (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:

ListenerDefaultEnv VarDescription
Management / OAM APITCP 8443 (HTTPS)-REST API for status, slice inspection, statistics, and runtime OAM actions
Prometheus metricsTCP 9568PROMETHEUS_PORTPrometheus 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​

MethodPathDescription
GET/status/apiAPI service liveness
GET/status/nrfNRF registration status
GET/status/nfNSSF NF status
GET/slice_configCurrent slice configuration snapshot
GET/api/slicesConfigured S-NSSAIs with NSI mappings, target AMF sets, allowed NSSAI per PLMN, and AMF-set mapping
GET/api/nssai_availabilityPer-AMF NSSAI availability currently stored
GET/api/statisticsNSSF operational statistics
GET/oam/configEffective 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:

FieldMeaning
total_slicesNumber of NSI entries currently loaded (nsi_list size)
total_allowed_nssai_plmnsNumber of PLMNs with an allowed_nssai entry
total_amf_set_mappingsNumber of S-NSSAI keys in amf_set_mapping
nssai_availability_countNumber of AMFs that have reported per-TAI availability
nssai_availability_subscription_countNumber of active availability-change subscriptions

Runtime Slice Management​

MethodPathDescription
POST/oam/sliceAdd 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​

MethodPathDescription
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/reregisterForce NRF re-registration
POST/oam/log_levelChange 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.