The Role of NSSF in 5G Network Slicing
Network slicing allows a single physical 5G infrastructure to support multiple logical networks, each tailored for a specific service type -- enhanced mobile broadband, ultra-reliable low-latency, massive IoT, or enterprise verticals. But slicing only works if the network can correctly select which slice a UE should connect to and route it to the right AMF and network resources. This is the job of the Network Slice Selection Function (NSSF).
The NSSF is defined in 3GPP TS 23.501 Section 6.2.16 and its service interface is specified in TS 29.531. It performs two critical functions: determining the Allowed NSSAI for a UE based on subscription, policy, and network availability, and triggering AMF reallocation when the initial AMF cannot serve the required slices.
NSSF Interaction Table
The NSSF interacts with several NFs during slice selection. The table below documents every interaction.
| Interaction | Interface | Direction | Purpose | Message/Service |
|---|---|---|---|---|
| AMF -> NSSF | N22 (Nnssf) | Request | Slice selection during registration | Nnssf_NSSelection_Get |
| NSSF -> NRF | Nnrf | Request | Discover AMF set for target S-NSSAIs | Nnrf_NFDiscovery |
| NSSF -> NSSF (inter-PLMN) | N31 | Request | Roaming slice mapping | NSSAI mapping request |
| NSSF -> UDM | Nudm | Request | Subscription NSSAI verification (optional) | Nudm_SDM_Get |
| AMF -> NSSF | N22 | Notify | NSSAI availability update | Nnssf_NSSAIAvailability |
| NSSF -> AMF | N22 | Response | Allowed NSSAI + target AMF set | NSSelection response |
Understanding NSSAI Types
One of the most confusing aspects of 5G slicing is the multiple NSSAI variants. The table below clarifies each type, its source, and its role in slice selection.
| NSSAI Type | Definition | Set By | Stored At | Used During |
|---|---|---|---|---|
| Configured NSSAI | S-NSSAIs provisioned in the UE by the operator | Operator via OTA/USIM | UE (USIM or ME) | UE includes in Registration Request |
| Requested NSSAI | S-NSSAIs the UE asks for in Registration Request | UE | N1 NAS message | Registration procedure |
| Subscribed S-NSSAI | S-NSSAIs the subscriber is entitled to use | Operator | UDM/UDR | AMF/NSSF check during selection |
| Allowed NSSAI | S-NSSAIs the network permits for this registration area | AMF (via NSSF) | UE (after registration) | PDU session establishment |
| Rejected S-NSSAI | S-NSSAIs requested but not permitted | AMF (via NSSF) | Registration Accept message | UE knows which slices unavailable |
| Pending NSSAI | S-NSSAIs that require AMF reallocation to serve | NSSF | AMF during registration | Triggers AMF change |
| Default S-NSSAI | S-NSSAIs marked as default in subscription | Operator | UDM | Used when UE requests no specific NSSAI |
| Mapping of S-NSSAI | Home NSSAI to Visited NSSAI mapping for roaming | NSSF (HPLMN/VPLMN) | NSSF | Roaming slice selection |
Slice Selection Decision Flow
The following step-by-step procedure covers the NSSF-involved slice selection during UE registration per TS 23.502 Section 4.2.2.2.3.
Step 1 -- UE sends Registration Request:The UE includes Requested NSSAI containing one or more S-NSSAI values. Each S-NSSAI has an SST (Slice/Service Type, 1 byte) and optionally an SD (Slice Differentiator, 3 bytes). For example: {SST=1, SD=0x000001} for eMBB with a specific tenant differentiator.
Step 2 -- Initial AMF receives request:The gNB selects an initial AMF based on NSSAI information in the RRC setup (if available) or uses a default AMF. This initial AMF may not serve all requested slices.
Step 3 -- AMF queries NSSF:The AMF invokes Nnssf_NSSelection_Get with:
- Requested NSSAI from the UE
- Subscribed S-NSSAI from UDM
- TAI (Tracking Area Identity) of the serving cell
- PLMN ID (for roaming scenarios)
- Slice info for Registration Type (initial vs mobility)
The NSSF performs the following checks:
- Validates Requested NSSAI against Subscribed S-NSSAI (subscription check)
- Checks NSSAI availability in the current TAI (network availability)
- Determines which S-NSSAIs the current AMF can serve
- Identifies S-NSSAIs requiring a different AMF set
The response contains:
- Allowed NSSAI: S-NSSAIs the UE may use
- Rejected S-NSSAI list with cause values (e.g., not subscribed, not available in TA)
- Target AMF Set / AMF candidate list (if AMF reallocation needed)
- Mapping of S-NSSAI (for roaming)
If the NSSF indicates the current AMF cannot serve all Allowed NSSAIs, the AMF initiates reallocation to a target AMF in the correct AMF set. This involves N14 (AMF-to-AMF) context transfer.
AMF Reallocation Procedure
AMF reallocation occurs when the initial AMF (selected by gNB based on limited information) cannot serve all the slices the UE needs. This is defined in TS 23.502 Section 4.2.2.2.3.
| Step | Action | NFs Involved |
|---|---|---|
| 1 | gNB selects initial AMF (may be default) | gNB |
| 2 | Initial AMF receives Registration Request | AMF-1 |
| 3 | AMF-1 queries NSSF with Requested NSSAI | AMF-1, NSSF |
| 4 | NSSF determines AMF-1 cannot serve SST=2 (URLLC) | NSSF |
| 5 | NSSF returns target AMF set for SST=1+SST=2 | NSSF |
| 6 | AMF-1 queries NRF for AMF in target set | AMF-1, NRF |
| 7 | AMF-1 redirects UE context to AMF-2 via N14 | AMF-1, AMF-2 |
| 8 | AMF-2 completes registration with full Allowed NSSAI | AMF-2 |
| 9 | gNB updates N2 association to AMF-2 | gNB, AMF-2 |
Worked Example -- Enterprise Slice Selection
Scenario: A manufacturing company (ACME Corp) has a private enterprise slice on Operator X's 5G SA network. The slice is identified as S-NSSAI = {SST=1, SD=0x00ACME} (SD = 0x00AC4E in hex). UE Configuration:- Configured NSSAI in USIM: [{SST=1}, {SST=1, SD=0x00AC4E}]
- The first S-NSSAI is for general consumer eMBB
- The second is the ACME enterprise slice
- UE sends Requested NSSAI = [{SST=1}, {SST=1, SD=0x00AC4E}]
- gNB selects AMF-1 (default AMF set)
- AMF-1 retrieves Subscribed S-NSSAI from UDM: [{SST=1}, {SST=1, SD=0x00AC4E}] -- both subscribed
- AMF-1 queries NSSF:
- Requested: [{SST=1}, {SST=1, SD=0x00AC4E}]
- TAI: 0x0001 (factory area)
- Current AMF set: Set-A (consumer)
- NSSF checks:
- SST=1: available in TAI 0x0001, AMF-1 can serve -> Allowed
- SST=1, SD=0x00AC4E: available in TAI 0x0001, but requires AMF-Set-B (enterprise)
- NSSF response:
- Allowed NSSAI: [{SST=1}, {SST=1, SD=0x00AC4E}]
- Target AMF set: AMF-Set-B (can serve both consumer and enterprise)
- AMF-1 queries NRF for AMF in Set-B serving TAI 0x0001
- NRF returns AMF-2 (enterprise-capable AMF)
- AMF-1 redirects to AMF-2 via N14
- AMF-2 completes registration, UE receives Allowed NSSAI with both slices
- UE requests PDU session: DNN = "acme-factory", S-NSSAI = {SST=1, SD=0x00AC4E}
- AMF-2 selects SMF serving the enterprise slice
- SMF selects UPF-Edge at factory site
- Traffic is isolated in the enterprise slice end-to-end
Worked Example -- Roaming Slice Mapping
Scenario: A subscriber from Operator A (home) roams to Operator B (visited). The home network slice SST=1, SD=0x000001 does not exist in the visited network. The NSSF must map it.- UE sends Requested NSSAI = [{SST=1, SD=0x000001}] to visited AMF
- Visited AMF queries visited NSSF
- Visited NSSF checks inter-PLMN agreement:
- Home S-NSSAI {SST=1, SD=0x000001} maps to Visited S-NSSAI {SST=1, SD=0x000099}
- NSSF returns:
- Allowed NSSAI: [{SST=1, SD=0x000099}] (visited network S-NSSAI)
- Mapping: Home {SST=1, SD=0x000001} <-> Visited {SST=1, SD=0x000099}
- The UE uses the visited S-NSSAI for PDU sessions in the roamed network
- When the UE returns home, it reverts to the home S-NSSAI
This mapping is configured in the NSSF based on bilateral roaming agreements. 3GPP TS 23.501 Section 5.15.5.2 defines the NSSAI mapping procedures.
NSSF Configuration and Deployment Considerations
| Parameter | Description | Example Value |
|---|---|---|
| Supported S-NSSAIs per TAI | Which slices are available in which areas | SST=1 in all TAIs; SST=2 only in urban TAIs |
| AMF Set to S-NSSAI mapping | Which AMF sets serve which slices | AMF-Set-A: SST=1; AMF-Set-B: SST=1+enterprise SD |
| NSSAI availability | Dynamic updates when slices are activated/deactivated | NSSF notifies AMFs via Nnssf_NSSAIAvailability |
| Inter-PLMN mapping | Home-to-visited S-NSSAI mapping tables | Per roaming partner configuration |
| Default S-NSSAI policy | What to do when UE sends no Requested NSSAI | Assign default SST=1 from subscription |
| Maximum slices per UE | Limit on simultaneous Allowed S-NSSAIs | Typically 8 (3GPP max defined in UE capability) |
Summary
The NSSF is the decision engine that makes network slicing operational. It evaluates UE requests against subscription data, network availability, and AMF capabilities to determine which slices a UE can access. When the initial AMF cannot serve all needed slices, the NSSF triggers reallocation to the correct AMF set. For enterprise deployments, the NSSF is the gatekeeping function that ensures tenant isolation from the moment of registration.
Key Takeaway: Without the NSSF, network slicing is just a concept. The NSSF translates slice requests into concrete network resource assignments by determining Allowed NSSAI, triggering AMF reallocation, and handling roaming slice mapping. Every operator deploying network slicing must carefully configure NSSF policies, AMF set mappings, and per-TAI slice availability.