5G Core Deregistration and SM Context Release Explained: UDM and SMF Interactions
Understanding 5G Deregistration and Session Management Context Release
As 5G networks are progressing, having effective user deregistration and session release methods is key to keeping the system running smoothly and making the most of resources. Once a User Equipment (UE) registers and sets up its data session, deregistration makes sure that all the relevant session contexts are cleaned up from the network when the UE disconnects or moves out of range.
The image above shows this process, highlighting the roles of the AMF (Access and Mobility Management Function), UDM (Unified Data Management), and SMF (Session Management Function) within the 5G Core (5GC).
This represents the final stage of the 5G registration lifecycle, ensuring that all user contexts and session data are effectively released.
Overview of Deregistration in 5G Core
The Deregistration Procedure in the 5G Core serves various functions:
It clears the UE’s registration context from the AMF and UDM.
It releases the PDU Session context that the SMF is maintaining.
It ensures that no outdated contexts are left hanging, which could waste network resources.
It keeps all network functions (NFs) synchronized.
This deregistration is network-triggered, usually happening when:
A UE asks to deregister.
The AMF notices a timeout or a network change.
There's a handover or reallocation of network functions.
Entities Involved
Entity Full Name Function gNB Next Generation Node B Provides the radio link between UE and the 5G Core AMF Access and Mobility Management Function Manages registration, mobility, and connection states SMF Session Management Function Handles PDU session setup and release UDM Unified Data Management Keeps subscriber data and registration status5GC5G Core Network Encompasses all service-based functions for 5G operations
Step-by-Step Explanation of the Deregistration Process
After the UE has finished its session or the network decides it needs to be deregistered, the AMF kicks off communication with the UDM and SMF to clean up all session and context info.
Step 21: Nudm extunderscore SubscriberDataManagement extunderscore Get Request
Message Direction: New AMF → UDM
Purpose: To get the UE context that's stored in the UDM related to SMF data.
The AMF sends a GET request over the Nudm ext underscore Subscriber Data Management interface, asking for the UE context in SMF data. This way, before deregistration, the AMF knows about:
The PDU sessions linked to the UE.
SMF endpoints and interworking info with EPC (if necessary).
Request details include:
Requested Data Type: UE context in SMF data
Identifiers: SUPI (Subscription Permanent Identifier) or GPSI
This ensures that the AMF gathers all the session info it needs before moving forward with the release.
Step 22: Nudm extunderscore SubscriberDataManagement extunderscore Get Response
Message Direction: UDM → AMF
The UDM replies with the UE context in SMF data, which includes:
PDU Session Information: Active data sessions for the user.
FQDNs for EPC Interworking: Fully Qualified Domain Names if EPC (4G) interworking is needed.
This gives the AMF the necessary mapping to clean up correctly.
Step 23: Nudm ext underscore UE Context Management ext underscore Deregistration ext underscore Notify
Message Direction: AMF → UDM
After getting the SMF data, the AMF informs the UDM that the UE is being deregistered. The Nudm ext underscore UE Context Management ext underscore Deregistration ext underscore Notify message’s role is to:
Keep AMF and UDM in sync regarding the deregistration.
Contents include:
SUPI: Identifying the UE being deregistered.
Reason for Deregistration: This could be due to an explicit call, a network-triggered event, or mobility demands.
This way, UDM no longer ties this UE to the AMF instance.
Step 24: Nsmf ext underscore PDU Session ext underscore Release SM Context
Message Direction: AMF → SMF
Once the UDM has been notified, the AMF releases the Session Management Context through the Nsmf ext underscore PDU Session ext underscore Release SM Context interface.
Parameters:
SUPI: Unique subscriber ID.
PDU Session ID: Identifies which session is being closed.
Then the SMF:
Frees all resources related to the session.
Instructs the UPF (User Plane Function) to eliminate data forwarding rules.
Confirms that the PDU session has been successfully removed.
This guarantees that no data plane resources are still active for a deregistered UE.
Key Interfaces Used
Interface Function Entities Involved Nudm ext underscore Subscriber Data Management Retrieve UE’s session and subscriber data AMF ↔ UDMNudm ext underscore UE Context Management Notify deregistration to UDMAMF ↔ UDMNsmf ext underscore PDU Session Release PDU session contexts AMF ↔ SMF
These are all service-based interfaces (SBI) defined by 3GPP TS 29.503, implemented using RESTful APIs for flexible and scalable network communication.
Why Deregistration Is Critical in 5G Networks
Deregistration isn’t just about ending a session — it’s a network housekeeping procedure that keeps 5G systems efficient and scalable.
Key benefits include:
Resource Optimization: Frees up AMF, SMF, and UPF resources tied to the UE.
Data Integrity: Makes sure UDM has accurate subscriber status.
Seamless Mobility: Prepares the network for any future re-registration or handover needs.
Security Compliance: Clears up old security contexts to prevent any unauthorized access.
Without proper deregistration, you could run into session leaks or locked resources, which would slow things down and increase latency in high-demand networks.
Example JSON for Deregistration Notify
According to 3GPP TS 29.503, the Nudm ext underscore UE Context Management extunderscore Deregistration ext underscore Notify message usually uses a RESTful PUT with a JSON payload:
{ "supi": "208930000000001", "deregReason": "UE-initiated deregistration", "amfInstanceId": "amf1-instance-01"}
This standardization allows for smooth communication between different vendor network components.
Deregistration and Interworking with EPC
In networks that support 5G-4G interworking, deregistration messages also carry EPC interworking parameters, like FQDNs and inter-system release coordination. This ensures compatibility and smooth transitions between 5G NR and LTE networks.
Practical Use Case Example
Imagine someone finishes their data session and turns off their device.
The AMF notices the deregistration.
It fetches the session context from UDM.
Then, it notifies the UDM and tells the SMF to release all PDU sessions.
The SMF clears UPF data paths and sends back a confirmation.
The network resources are freed, ready for the next UE.
This automation supports scalable user management in busy 5G environments.
Conclusion
The 5G Deregistration and SM Context Release process ensures that user contexts and sessions are properly terminated when a UE disconnects or moves away from the network. Through standardized Nudm and Nsmf interfaces, this procedure ensures synchronization among the AMF, UDM, and SMF, preventing data mismatches and resource waste.