Registration Procedure:
When a device initially turns on, it needs to register to a network to access 5G services. To do so it has to go through a step of procedures which we call as Call flow
.
Registration can be of following types:
- Initial Registration: In this the UE turns on and steps into registering itself to a network.
- Periodic Registration: It make sure that the device didn't run out of battery during registering procedure.
- Mobility Registration: It monitors the mobility of a UE from one network to another.
Emergency Registration: It is used in the period of emergency.
Registration Call Flow:
Lets understand step by step:
1.) In first step, UE sends registration request to RAN(gNodeb) and RAN forwards this request to AMF.
- If the device is fresh/not registered already then the RAN forward the request to New AMF, otherwise
- If device is already registered to RAN then it forwards the requests to Old AMF.
2.) Then in second step, if the device is already registered with RAN, the New AMF requests the old AMF for transfer of UE related information to it i.e UEContextTransfer
.
3.) In the third step, authentication/security checkup takes place between the serviecs and the UE.
4.) In the fourth step, the New AMF responds that I have received the UEContext from old AMF and now there is no need of old AMF. So, now old AMF can retire from its post.
5.) Now in the fifth step, AMF registers itself to UDM (saying that I the new AMF) --> talks to UDM for getting necessay subscription informaton and also subscribe for any further updates in future coz AMF is a access and mobility management function so it needs to know about the subscription status to the device. Also the new AMF is taking over, the old AMF has to retire. So, UDM notifies the old AMF that it needs to de register now. So old AMF will unsubscribe to any subscription data from UDM.
6.) Now in the sixth step, the new AMF will talk to PCF for fetching necessary policies information related to AMF corresponding to the device.
7.) Now in step seven, if there is already an existing PDU session, then AMF speaks to SMF to continue the PDU session --> using UpdateSMContext message. If there is miss match in PDU session state --> the older PDU session got terminated using ReleaseSMContext message and a new PDU session will be generated.
8.) In this step, AMF notifies the UE that your registration has been accepted. And an Registration complete message will be sent to AMF by UE.
9.) In this step, the AMF can contact PCF for device specific policies. For ex --> device might have to decide for a specific application that whether it has to create new PUD session for that service or not.
De-registration Procedure:
When a device no longer want to access 5G services or want to disconnect from a network i.e when the device being turned off.
De-registration Call Flow
Lets understand the deregistration flow step by step:
1.) Firstly, the UE sends de-registration request to AMF.
2.) AMF forwards this request this request to other services like:
- AMF request SMF for Releasing UE Context associated with ongoing PDU session. Now SMF sends further request to UPF to release any user plane resources and UPF responds to the request to release UE Context. SMF forwards the confirmation back to the AMF saying that user plane context has now been released.
- Now SMF also notifies to PCF that it no longer require any policy requests related to the current PDU session.
- SMF also unsubscribes with UDM that I no longer need any updates.
- SMF de-register with UDM.
3.) Now AMF notifies PCF that it didn't require any policies related to access management.
4.) Now AMF notifies PCF that it didn't require any device specific policies.
5.) Now AMF confirms to the device that de-registration is accepted.
6.) Also at last SMF releases RAN information about that device.