NSSF — Network Slice Selection Function in 5G NR
Selects slices — computes the Allowed NSSAI, maps to Network Slice Instances, and returns the target AMF Set for slice-driven AMF selection.
The AMF anchors the UE, but it does not decide the slicing picture alone. When the requested slices, the subscription, the tracking area and the access type do not line up trivially, the AMF hands the problem to a dedicated brain: the NSSF. Give it a Requested NSSAI and some context, and it hands back the Allowed NSSAI, the roaming mapping to home slices, the set of AMFs that can actually serve those slices, and the network slice instance to use. This page is grounded in TS 23.501 (system architecture) and TS 23.502 (procedures).
Introduction
The NSSF (Network Slice Selection Function) is the 5G core control-plane function that owns the logic of which network slices a UE may use and who should serve them. It is invoked during the registration procedure (TS 23.502): after the AMF has the UE's Requested NSSAI and has fetched the Subscribed S-NSSAIs from the UDM, it may call the NSSF to turn that request-plus-context into a concrete grant.
Slicing is a defining feature of 5G, and slice selection is not a decision any single AMF can always make locally: an AMF instance serves only a subset of the operator's slices, a slice may exist in some Tracking Areas and not others, and when the UE roams the visited and home networks name their slices with different identifiers. The NSSF centralises the map of slice-to-area-to-AMF so every AMF does not have to carry it.
It matters because a wrong slice decision cascades: the UE lands on an AMF that cannot serve its slices, a requested slice is silently refused, or a roaming UE cannot correlate visited and home slices. Understanding what the NSSF takes in, what it returns, and how it drives AMF re-routing is what makes registration-time slicing behaviour predictable.
On this page
Why the NSSF is needed
In plain words: think of an airline alliance's central booking desk. Each airline (an AMF) flies only some routes (slices), only from certain airports (Tracking Areas), and partner airlines label the same seat class differently (roaming S-NSSAIs). Rather than make every gate agent memorise the whole network, one central desk (the NSSF) takes "here's who the passenger is and where they are", and hands back "here's what they're allowed to fly and which airline should carry them".
Concretely, three problems force slice selection out of the local AMF and into a shared authority. First, partial coverage per AMF: an AMF serves only a set of slices, so a UE that requests a slice the serving AMF cannot support has to be steered to one that can. Second, per-TA availability: a slice may be offered in some Tracking Areas and not others, so "allowed" is a function of where the UE is, not just who it is. Third, roaming translation: visited and home PLMNs use their own S-NSSAI values, so someone must produce a consistent mapping. The NSSF concentrates exactly this logic.
A control-plane NF that, given a UE's Requested NSSAI, its Subscribed S-NSSAIs, the current TA and access type, computes the Allowed NSSAI, the mapping to home S-NSSAIs, the target AMF Set / candidate AMF list, and the NSI ID to use.
An AMF serves only some slices, slices exist only in some TAs, and roaming needs slice-identifier translation. Concentrating this in one authority means the AMF asks a question instead of maintaining the whole slicing topology itself.
The AMF calls the NSSF's Nnssf_NSSelection service during registration. The NSSF returns the allowed slices plus steering information, and if the current AMF cannot serve them it drives AMF re-routing to one that can.
What the NSSF Is For
The NSSF (Network Slice Selection Function) is the 5GC control-plane function that owns network-slice selection logic. It exists because slice selection is not a purely local decision the serving AMF can always make: an AMF only serves a set of slices, slice availability varies per Tracking Area, and — when roaming — the visited and home networks name their slices differently. Centralising that logic in one function keeps every AMF from having to hold the operator's entire slice-to-area-to-AMF map.
One line to remember: the AMF makes the simple slice decisions itself and consults the NSSF for the hard ones — cross-TA availability, target AMF selection, NSI selection, and roaming slice mapping.
Keep the terminology from the slicing model straight, because the NSSF speaks it fluently. A slice is identified by an S-NSSAI = SST (Slice/Service Type, 8 bits) + optional SD (Slice Differentiator, 24 bits). The SST field is one octet (values 0–255); values 1–5 are standardised for interworking (1 = eMBB, 2 = URLLC, 3 = MIoT, 4 = V2X, 5 = HMTC per TS 23.501), while the rest are operator-specific. The optional SD is three octets (24 bits) that differentiate multiple slices sharing the same SST (e.g. two enterprise eMBB tenants). A set of S-NSSAIs is an NSSAI, and an Allowed/Requested/Configured NSSAI may contain at most 8 S-NSSAIs. The UE requests slices (Requested NSSAI, built from its Configured NSSAI), the subscription entitles slices (Subscribed S-NSSAIs), and the network grants slices (Allowed NSSAI, with refusals in the Rejected NSSAI). The NSSF's job is to turn the first three, plus context, into the last two — and to say which functions should serve them.
A control-plane NF that, given a UE's Requested NSSAI, its Subscribed S-NSSAIs, the current TA and access type, computes the Allowed NSSAI, the mapping to home S-NSSAIs, the target AMF Set / candidate AMF list, and the NSI ID to use.
An AMF serves only some slices, slices exist only in some TAs, and roaming needs slice-identifier translation. Concentrating this in one authority means the AMF asks a question instead of maintaining the whole slicing topology itself.
The AMF calls the NSSF's Nnssf_NSSelection service during registration. The NSSF returns the allowed slices plus steering information, and if the current AMF cannot serve them it drives AMF re-routing to one that can.
Inputs and Outputs of Slice Selection
The cleanest way to understand the NSSF is as a pure function: a defined set of inputs in, a defined set of outputs out. The AMF gathers the inputs, calls Nnssf_NSSelection, and applies the outputs.
| Direction | Item | Meaning |
|---|---|---|
| Input | Requested NSSAI | The slices the UE asked for in its Registration Request (drawn from its Configured/Allowed NSSAI); up to 8 S-NSSAIs. |
| Input | Subscribed S-NSSAIs | The slices the subscriber is entitled to, fetched by the AMF from the UDM; one or more may be a Default S-NSSAI. |
| Input | TAI / Tracking Area | Where the UE is — because slice availability is defined per TA. |
| Input | Access type | 3GPP vs non-3GPP access; the Allowed NSSAI is scoped per access type. |
| Input | PLMN / mapping info | Serving PLMN and, when roaming, the mapping of requested S-NSSAIs to home S-NSSAIs. |
| Output | Allowed NSSAI | The slices granted for this registration and access type — what the UE may open PDU sessions on. |
| Output | Rejected NSSAI | Requested slices refused, each with a cause (not available in TA, not available in the PLMN, etc.). |
| Output | Mapping to home S-NSSAIs | For roaming: the correspondence between visited (serving) S-NSSAIs and home S-NSSAIs. |
| Output | Target AMF Set / candidate AMF list | Which AMF(s) can serve the resulting Allowed NSSAI — used to drive re-routing. |
| Output | NSI ID(s) | The Network Slice Instance to use for a given S-NSSAI, and (optionally) NRF discovery information for that NSI. |
The Rejected NSSAI is not a single flag — each rejected S-NSSAI carries a rejection cause so the UE knows whether to retry. Two causes matter most: "S-NSSAI not available in the current PLMN" (the slice is refused network-wide, so the UE stops requesting it in this PLMN) and "S-NSSAI not available in the current registration area" (the slice exists elsewhere in the PLMN, so the UE may request it again after moving). This is the per-TA availability knowledge in action.
Mental model: inputs describe the UE and where it is (requested, subscribed, TA, access, PLMN); outputs describe what it gets and who serves it (allowed/rejected slices, home mapping, target AMFs, NSI). The NSSF never touches user data — it is a decision service that the AMF invokes and then enacts.
Note the division of labour with the AMF. The AMF always computes the Allowed NSSAI that it returns to the UE in the Registration Accept; it may do so locally when it has enough information (its own configuration covers the requested slices in this TA), and it invokes the NSSF when it does not — for example when a requested slice is unknown to it, when it cannot serve all requested slices, or when roaming requires slice mapping. So the NSSF is the authority the AMF defers to, not a mandatory hop on every registration.
NSSAI Types Recap
The NSSF manipulates several flavours of NSSAI, each set by a different node at a different moment. This recap keeps them straight — it is the same taxonomy used on the network-slicing page.
| NSSAI type | Who sets it | Role at slice selection |
|---|---|---|
Configured NSSAI | Serving PLMN (provisioned to UE), or default | What the UE draws on to build its request; a Default Configured NSSAI applies to any PLMN with no specific config. |
Requested NSSAI | UE | Primary NSSF input — the slices the UE wants, sent in the Registration Request. |
Subscribed S-NSSAIs | UDM (subscription) | NSSF input — the entitlement the granted set must stay within; may flag a Default S-NSSAI. |
Allowed NSSAI | AMF (with NSSF) | Primary NSSF output — the granted slices for this registration/access type, returned in the Registration Accept. |
Rejected NSSAI | AMF/NSSF | NSSF output — requested slices refused, each carrying a rejection cause. |
Pending NSSAI | AMF | Slices whose NSSAA (slice-specific authentication) has not yet completed — not usable until it succeeds. |
Default S-NSSAI | Subscription (UDM) | Fallback the NSSF/AMF use when the UE sends no Requested NSSAI, or none of the requested slices are permitted, so the UE always lands on something usable. |
Scoping matters: the Allowed NSSAI is scoped per access type (3GPP and non-3GPP each get their own) and is meaningful only within the registration area the network builds from TAs that support those slices. The NSSF's per-TA availability knowledge is exactly what makes that registration area coherent.
How the AMF Calls the NSSF: Nnssf_NSSelection
The NSSF is an SBA producer: it exposes its capabilities as services on the service bus, and the AMF is the consumer. The service-based interface is Nnssf, and it offers two services. The one that runs during registration is NSSelection.
During a UE registration, once the serving AMF has the Requested NSSAI from the Registration Request and the Subscribed S-NSSAIs from the UDM, it invokes Nnssf_NSSelection_Get, passing the requested slices, the subscribed slices, the TAI, the access type and (when roaming) mapping information. The NSSF evaluates slice availability for that TA, intersects request with subscription and with what the network offers, and returns the Allowed NSSAI, any Rejected NSSAI with causes, the target AMF Set (or a candidate AMF list, possibly obtained via the NRF), the mapping to home S-NSSAIs if applicable, and the NSI ID(s). The AMF then puts the Allowed NSSAI into the Registration Accept and uses the rest of the answer to steer subsequent function selection.
AMF gathers the Requested NSSAI and Subscribed S-NSSAIs, calls Nnssf_NSSelection_Get, and receives the Allowed NSSAI plus the target AMF Set, NSI ID and (roaming) home mapping; it then returns the Allowed NSSAI to the UE.Two services on Nnssf: Nnssf_NSSelection answers "given this request and context, what is allowed and who should serve it?"; Nnssf_NSSAIAvailability is how the NSSF learns, per TA, which slices each AMF can support in the first place (next section).
NSSAI Availability per Tracking Area
The NSSF can only answer availability questions if it first knows the answer. That knowledge comes from the second Nnssf service, NSSAIAvailability. Each AMF tells the NSSF which S-NSSAIs it supports in which TAs, and the NSSF maintains the network-wide picture of slice-to-TA-to-AMF support.
Concretely, an AMF uses Nnssf_NSSAIAvailability_Update to register the S-NSSAIs it can serve per TA; the NSSF may in turn use Nnssf_NSSAIAvailability_Notify to tell an AMF when the availability of a slice in a TA changes (for example when the operator restricts a slice in an area). This is what lets the NSSF, at NSSelection time, decide that a requested slice is simply not offered where the UE currently is and put it in the Rejected NSSAI with the "not available in the current registration area" cause — and it is what lets the AMF build a registration area out of TAs that consistently support the Allowed NSSAI.
Two directions, one map: NSSAIAvailability flows availability facts up from each AMF to the NSSF (and change notifications back down); NSSelection then uses that map to answer per-UE requests. Availability is a property of the (S-NSSAI, TA, AMF) triple, not of a slice alone.
Per-TA availability also connects to the RAN: a gNB advertises which slices it supports per TA/cell, and the core assigns UEs only to slices the cell can actually serve. The NSSF's TA-level view and the RAN's cell-level support have to agree for a UE to actually use a slice where it stands. If the UE moves into an area where an allowed slice is not supported, that slice can migrate into the Rejected NSSAI and its PDU sessions are released or relocated.
Driving AMF Re-routing and NRF Discovery
Choosing slices is only half the NSSF's contribution; the other half is making sure the UE ends up on an AMF that can serve those slices, and that each slice's sessions are handled by the right function instances.
AMF re-routing. The RAN selects an initial AMF for a registering UE — often a default AMF, because at that instant the gNB only has limited slice assistance information. If that initial AMF cannot serve the UE's Requested NSSAI, it calls Nnssf_NSSelection_Get, and the NSSF returns a target AMF Set (and, if needed via the NRF, a candidate list of AMF instances in that set). The registration is then redirected — either directly (the initial AMF forwards the UE context to a target AMF over the service-based interface) or via the RAN (the initial AMF returns a Reroute NAS message and the gNB re-sends the initial NAS message to an AMF in the target set). Only after this does the UE settle on an AMF supporting its Allowed NSSAI.
AMF re-routing. When the initial AMF cannot serve the Requested NSSAI, the NSSF returns a target AMF Set and the registration is re-routed to an AMF that supports the UE's slices.Relation to the NRF. The NSSF decides which slice and which NSI; the NRF finds the function instances that belong to it. Once slices are settled, the AMF and SMF discover slice-correct peers — an SMF for a given S-NSSAI, then a UPF — by querying the NRF with the S-NSSAI (and, when applicable, the NSI ID) as discovery parameters. In some deployments the NSSF returns NRF information for the selected NSI so the AMF queries the correct NRF for that slice instance. The clean split is worth memorising: NSSF selects the slice/NSI; NRF discovers the NFs within it.
NSSF vs NRF, side by side: ask the NSSF "which slices, which NSI, which AMF set?"; ask the NRF "which SMF/UPF instance serves this S-NSSAI/NSI?". They are complementary registries — one for slices, one for function instances.
Roaming: vNSSF and hNSSF
Slice identifiers are PLMN-specific, so roaming needs translation, and the NSSF is where that translation is coordinated. In a visited network (VPLMN) the UE works with visited-PLMN S-NSSAI values, while its subscription and (for home-routed traffic) its slices live in the home network (HPLMN) under home S-NSSAI values.
Two NSSF instances cooperate. The visited NSSF (vNSSF) serves the visited AMF; when it needs the home network's view — for instance to validate requested slices against the subscription's home S-NSSAIs or to obtain the correct mapping — it consults the home NSSF (hNSSF) over the inter-PLMN path. Together they produce a consistent Allowed NSSAI in visited-PLMN values plus the mapping to home S-NSSAIs. The UE stores this mapping (its Configured, Requested and Allowed NSSAI each carry a mapping from serving-PLMN S-NSSAI to home S-NSSAI), so both operators use their own S-NSSAI values underneath while the UE experiences the "same" slice.
Who maps what: the vNSSF decides what the visited network offers and in which visited S-NSSAIs; the hNSSF supplies the home-network truth (subscription and home S-NSSAI values). The output the UE keeps is a visited Allowed NSSAI plus a mapping back to home S-NSSAIs — for home-routed sessions the home slice's treatment applies, while for local breakout the visited slice serves it.
LTE ↔ NR: LTE/EPC has no NSSF and no S-NSSAI — 4G had no native network slicing. The closest predecessors were DECOR and eDECOR (Dedicated Core Networks), which steered a UE to a dedicated MME/core using a coarse UE Usage Type from the HSS, with the RAN redirecting the NAS message much like today's AMF re-routing. 5G replaces that coarse, core-selection-only mechanism with fine-grained, per-flow slicing: the S-NSSAI (SST+SD) identifies a slice, the NSSF owns selection and per-TA availability, and slices reach down to the RAN and the QoS model — none of which existed in LTE.
Summary
The NSSF is the 5GC's slice-selection authority. Read it as a pure function the AMF calls during registration: in go the Requested NSSAI, the Subscribed S-NSSAIs, the TAI and access type (plus roaming mapping); out come the Allowed NSSAI, the Rejected NSSAI with per-slice causes, the target AMF Set, the NSI ID, and — when roaming — the mapping to home S-NSSAIs.
Two things make that function possible. First, the Nnssf_NSSAIAvailability service builds the (S-NSSAI, TA, AMF) map that Nnssf_NSSelection later queries, which is why availability is always tracked per Tracking Area. Second, a clean division of labour: the NSSF chooses the slice and NSI and the serving AMF set, then drives re-routing to that set, while the NRF discovers the actual SMF/UPF instances within the chosen slice.
When a slice behaves unexpectedly, walk the chain: is it subscribed (UDM)? available in this TA (NSSAIAvailability map)? served by the current AMF (else re-routing)? and, if roaming, correctly mapped between vNSSF and hNSSF? Locating which of those failed usually tells you why the slice ended up in the Rejected or Pending NSSAI.
Q. What does the AMF send to the NSSF, and what does it get back?
A. Over Nnssf_NSSelection_Get the AMF sends the Requested NSSAI, the Subscribed S-NSSAIs, the TAI and access type (plus roaming mapping when applicable). It gets back the Allowed NSSAI, any Rejected NSSAI with causes, the target AMF Set / candidate AMF list, the mapping to home S-NSSAIs, and the NSI ID(s).
Q. What are the two services on the Nnssf interface, and how do they differ?
A. Nnssf_NSSelection performs per-UE slice selection during registration (request + context in, allowed slices + steering out). Nnssf_NSSAIAvailability is how each AMF registers, per TA, which S-NSSAIs it can serve, and how the NSSF notifies changes — it builds the map that NSSelection later queries.
Q. Why is slice availability tracked per Tracking Area?
A. Because a slice may exist in some TAs and not others. The NSSF holds the (S-NSSAI, TA, AMF) availability map so it can grant a slice only where it is actually offered; a requested slice not available in the UE's registration area goes into the Rejected NSSAI with that cause, and the AMF builds the registration area from TAs that consistently support the Allowed NSSAI.
Q. How does the NSSF drive AMF re-routing?
A. If the initial (often default) AMF the RAN picked cannot serve the Requested NSSAI, it calls the NSSF, which returns a target AMF Set (candidate instances via the NRF if needed). The registration is then redirected to an AMF in that set — directly over the SBI, or via the RAN using a Reroute NAS message.
Q. What is the division of labour between the NSSF and the NRF?
A. The NSSF selects the slice and the NSI, and the target AMF Set. The NRF then discovers the actual NF instances — e.g. an SMF or UPF for a given S-NSSAI/NSI. NSSF chooses the slice; NRF finds the functions within it.
Q. How does the NSSF handle roaming slice identifiers?
A. The visited NSSF (vNSSF) and home NSSF (hNSSF) cooperate to produce an Allowed NSSAI in visited-PLMN S-NSSAI values plus a mapping to home S-NSSAIs. The UE keeps that mapping in its Configured/Requested/Allowed NSSAI, so each operator uses its own S-NSSAI values while the UE sees a consistent slice.
⚠ Common pitfalls / gotchas
- Assuming the NSSF is on every registration. It is not — the
AMFresolves slices locally when its own config covers the requested slices in the current TA, and only consults the NSSF for the hard cases. A missingNnssfcall in a trace is often normal, not a fault. - Confusing "not available in the PLMN" with "not available in the registration area". The two
Rejected NSSAIcauses drive completely different UE behaviour — one stops the UE requesting the slice in this PLMN, the other lets it retry after moving. Reading the cause wrong leads to chasing the wrong problem. - Forgetting the RAN must also support the slice. The NSSF tracks slice availability per TA, but a cell within that TA still advertises its own supported slices. An
Allowed NSSAIthe core granted can still be unusable if the serving cell does not support it. - Treating the NSSF and NRF as interchangeable. NSSF selects the slice/NSI and AMF set; NRF discovers NF instances. Querying the wrong one for the wrong question is a common design mistake.
- Ignoring the
Pending NSSAI. A slice requiring NSSAA is not usable until slice-specific authentication completes, even though it was requested and is subscribed — it sits inPending, notAllowed.
Where the NSSF connects
The NSSF decides which slices a UE may use and who serves them; the broader slicing model shows how those slices are built and steered, the registration procedure is where its outputs reach the UE, and the NRF is how the chosen slice's functions are found.