In the 5G (NR) protocol stack, RRC (Radio Resource Control) is Layer 3, specifically responsible for the control and management of radio resource connections between the UE (UE) and gNB (gNB), including: establishing and managing connections, broadcasting system information, and processing mobility radio bearer configuration. 5G terminal RRC connections have three states: RRC_IDLE, RRC_CONNECTED, and RRC_INACTIVE; "RRC_INACTIVE" was introduced to improve battery efficiency and speed up reconnection.
I. RRC Connection Establishment Process: As shown in Figure (1), after power-on, the terminal (UE) initiates the establishment of an RRC connection with the gNB; subsequently, the gNB sends an initial NAS message to the AMF via the N2 interface, containing the RAN UE NGAP ID, UE context registration request, location information, 5G S-TMSI, and the reason for RRC establishment.
![]()
![]()
Figure 1. RRC establishment process of 5G terminal (UE)
II. Initial NAS message + UE context reacquisition These parameters are the identity provided for the terminal (UE) to help the AMF obtain the UE context from the old serving AMF or by re-executing the entire process (only when the serving AMF cannot find traces of the old AMF); the whole process is completed through the N14 interface, and the specific process (message) is as follows:
![]()
Figure 2. Initial NAS message and UE context of 5G terminal (UE)
[8] Release the previous registration request context
[3] gNB sends the initial NAS message through the new RRC connection
[23] Decode the security-protected NAS message
[3][9] Process the NGAP initial UE NAS message
[4] Process the initial UE message from NGAP
[9] Mobility management message
[16] Store the registration type in the parameters
[1] Create the registration request process
[9] Encode the initial NAS information message
[7] Process the NAS encoded message and send it to the NGAP task
[23] Decode the plain text NAS message
[8] Check if there are old parameters (e.g. UE context (GUTI, IMSI, gNB ID, etc.)
[3] Update AMF UE context with new gNB UE NGAP ID. Assuming the new AMF cannot find any old AMF traces in the network, it will be unable to close the NR call process. At this time, the AMF will begin identity, authentication, and security procedures for the UE in order to add a more explicit identity to the UE.