Skip to content

CM-IDLE / CM-CONNECTED and Service Request — Keeping Registration State and CM State Apart

Difficulty: Advanced (deep dive) / Estimated study time: 35 min / Prerequisites: Tracking Area / TAI / Registration Area, Service Request / Main actors: UE, gNB, AMF, SMF, UPF / Main interfaces: N1, N2, N3, N4

Learning objectives

After reading this chapter, you will be able to:

  • Explain, using the four combinations, that the RM state (registration state) and the CM state (connection state) are two independent axes
  • Distinguish what is released on the transition to CM-IDLE (the UE-associated logical NG-connection, the N3 User Plane connection, the UE Context in the gNB) from what is kept (the AMF UE Context, the registration, the PDU Session, the PFCP Session in the UPF)
  • Trace what each NGAP, Nsmf and PFCP message changes during AN Release (TS 23.502 §4.2.6)
  • Explain how Paging → Service Request reactivates the User Plane, and that it is normal for the gNB-side N3 TEID and the NGAP IDs to change across it
  • Explain what it means that a UE in RRC_INACTIVE is CM-CONNECTED from the core's point of view, and how this differs from CM-IDLE
  • Avoid confusing "the subscriber shows up in the CLI" with "the UE is CM-CONNECTED," and list which state to check where

Prerequisites

The focus of this chapter (Level ∞ Deep Dive)

In Level 3, Service Request and Paging covered the flow of "waking up a CM-IDLE UE and re-establishing the connection." This chapter digs into the state model that this flow is built on. Do not mix Registration State with CM State, some things survive CM-IDLE, and some values change when things are re-established — we check these three points at the IE, SBI and PFCP level.


Why — why keep "registration" and "connection" as separate states?

If a UE stayed registered with the 5GC and also kept N2 and N3 up permanently, the following problems would arise:

  • The UE would keep its radio connection (RRC) alive and drain its battery
  • The gNB would keep holding UE Contexts and radio resources that are not being used
  • The AMF and the gNB would have to maintain a huge number of UE-associated N2 connections for UEs that are not communicating

On the other hand, if the registration itself were deleted every time communication paused, every resumption would require authentication, security setup, Registration and PDU Session Establishment all over again, with enormous signaling and latency.

5GS therefore manages "is the UE registered with the network?" (Registration Management, RM) and "does the UE currently have a signaling connection?" (Connection Management, CM) as independent states (TS 23.501 §5.3.2 / §5.3.3). While there is no traffic, only CM drops to IDLE; registration, security and PDU Sessions are kept. On resumption, only the parts that were cut (N2, N3 and radio) are re-established by a Service Request.

Analogy: RM is "your membership," and CM is "whether you are currently sitting at the counter." When you leave the counter (CM-IDLE), your membership card (5G-GUTI) and the documents you handed in (UE Context, PDU Session) stay on file. When you have business again, you return to the counter and show your card (Service Request), and the procedure resumes right away without resubmitting all the documents. Cancelling your membership (Deregistration) is a different matter.


What — RM state and CM state

The two states are independent

Axis States Meaning Specification
RM (Registration Management) RM-DEREGISTERED / RM-REGISTERED Whether the UE is registered with 5GS TS 23.501 §5.3.2.2
CM (Connection Management) CM-IDLE / CM-CONNECTED Whether a NAS signalling connection over N1 exists between the UE and the AMF TS 23.501 §5.3.3.2

The NAS signalling connection consists of two segments: the AN signalling connection between the UE and the AN (the RRC connection for 3GPP access) and the N2 connection for that UE between the AN and the AMF (TS 23.501 §5.3.3.1). The CM state tells whether this "control path dedicated to the UE" exists.

On the NAS side (TS 24.501), the same concepts are expressed with the terms 5GMM-REGISTERED / 5GMM-DEREGISTERED (5GMM sublayer states) and 5GMM-IDLE mode / 5GMM-CONNECTED mode. The definitions in TS 24.501 §3.1 state explicitly that 5GMM-IDLE mode corresponds to the CM-IDLE state of TS 23.501 (to be confirmed). When a trace or a log says "5GMM-IDLE," read it as CM-IDLE. Note, however, that the 5GMM sublayer states include intermediate states such as 5GMM-REGISTERED-INITIATED (during Initial Registration), 5GMM-SERVICE-REQUEST-INITIATED and 5GMM-DEREGISTERED-INITIATED, so they do not map one-to-one onto the RM state (TS 24.501 §5.1.3.2.1, to be confirmed). For example, during Initial Registration (before the Registration Accept), the UE's 5GMM sublayer state is 5GMM-REGISTERED-INITIATED (how logs display it is implementation dependent).

The four combinations

flowchart TD
    subgraph REG["RM-REGISTERED"]
        A["CM-CONNECTED
communicating or signaling"] B["CM-IDLE
idle. Paging target"] end subgraph DEREG["RM-DEREGISTERED"] C["CM-CONNECTED
Initial Registration in progress
right after Reject or Deregistration"] D["CM-IDLE
power off or not registered"] end A -- "AN Release" --> B B -- "Service Request / Registration" --> A D -- "Registration Request sent" --> C C -- "Registration Accept" --> A
RM state CM state Typical situation
REGISTERED CONNECTED Communicating, or right after Registration or a Service Request
REGISTERED IDLE Idle (the most common state). Target of Paging and Periodic Registration
DEREGISTERED CONNECTED Initial Registration in progress (before Registration Accept), or right after a Registration Reject or Deregistration while the NAS connection has not yet been released
DEREGISTERED IDLE Power off, not registered, after Deregistration has completed

"DEREGISTERED but CONNECTED" looks odd at first, but in Initial Registration the UE enters CM-CONNECTED when the Registration Request (an initial NAS message) is sent and enters RM-REGISTERED with the Registration Accept, so this combination always occurs in between (TS 23.501 §5.3.2.2 / §5.3.3.2.2). It is a good illustration that the two axes are independent.

Independent per access

The RM state and CM state are managed per access type (3GPP / non-3GPP). A UE can be CM-IDLE over 3GPP access and CM-CONNECTED over non-3GPP access at the same time (CM: TS 23.501 §5.3.3.2.1; RM: TS 23.501 §5.3.2.4, the latter to be confirmed). This chapter assumes 3GPP access.

UE and AMF behavior per CM state

CM-IDLE CM-CONNECTED
NAS signalling connection between UE and AMF None Exists
AN signalling connection (RRC) / N2 connection / N3 connection None (TS 23.501 §5.3.3.2.2) N2 exists. N3 may exist per PDU Session
When the UE wants to send UL Sends a Service Request Can send immediately (PDU Sessions without N3 are activated by a Service Request)
When the network wants to deliver DL Paging is needed (except when unreachable, e.g. MICO mode) Can deliver directly over N2
UE location known to the AMF Registration Area (TAI List) granularity (previous chapter) Serving NG-RAN node (cell and TAI are reported over N2)
Trigger of the CM transition Sending/receiving an initial NAS message (Registration Request / Service Request / Deregistration Request) → CONNECTED Release of the AN signalling connection (UE side), completion of AN Release (AMF side) → IDLE

On the AMF side, the UE becomes CM-CONNECTED on receipt of an initial N2 message such as the Initial UE Message, and becomes CM-IDLE when the logical NGAP signalling connection and the N3 user plane connection are released on completion of the AN Release procedure (TS 23.501 §5.3.3.2.2 / §5.3.3.2.3).

CM-CONNECTED ≠ every PDU Session has a live N3

Even in CM-CONNECTED, only some PDU Sessions may have an inactive User Plane. Examples are PDU Sessions that the UE did not ask to activate in its Service Request, and PDU Sessions whose User Plane the SMF selectively deactivated (CN-initiated selective deactivation of UP connection, TS 23.502 §4.3.7, to be confirmed) (for the concept of selective activation and deactivation, see TS 23.501 §5.6.8, to be confirmed). The CM state is the state of the control path; it has to be looked at separately from the User Plane state of each PDU Session.


What — what is released and what is kept in CM-IDLE

This is the most important table in the chapter.

Item Held by In CM-IDLE Basis / notes
RRC connection (AN signalling connection) UE / gNB Released TS 23.501 §5.3.3.2.2
UE Context in the gNB (AS security, radio configuration, QoS Flow mapping, etc.) gNB Released UE Context Release (TS 38.413 §8.3.3)
UE-associated logical NG-connection (the AMF UE NGAP ID / RAN UE NGAP ID pair) gNB / AMF Released TS 23.502 §4.2.6, TS 38.413 §8.3.3
N3 User Plane connection (the GTP-U tunnel between gNB and UPF) gNB / UPF / SMF Released (deactivated) The AN Tunnel Info (gNB-side F-TEID) is removed from the UPF (TS 23.502 §4.2.6)
RM state (registration), 5G-GUTI, Registration Area UE / AMF Kept CM and RM are independent
AMF UE Context (SUPI, 5G NAS security context, UE Radio Capability, Allowed NSSAI, mapping of PDU Session IDs to SMFs, etc.) AMF Kept It is removed by other triggers such as Deregistration or implicit de-registration
PDU Session (PDU Session ID, UE IP address, QoS Flows, SM Context) UE / SMF Kept Only the User Plane becomes inactive; the PDU Session is not released
PFCP Session in the UPF (PDRs, FARs, QERs, etc.) UPF Kept (contents change) The PSA UPF's DL FAR is updated from "forward to gNB" to "buffer / notify SMF" (see below). In configurations with an inserted I-UPF, the I-UPF's N4 Session may be released (TS 23.502 §4.2.6, to be confirmed)
UPF-side N3 F-TEID (UL destination) UPF / SMF May be kept Whether it is reused or reallocated at Service Request is up to the SMF / UPF (to be confirmed)
           CM-CONNECTED                          CM-IDLE
 UE ──RRC── gNB ──N2(UE-assoc)── AMF     UE        gNB        AMF [UE Context ○]
             │                    │                            │
             └──N3 GTP-U──► UPF   │                 UPF [PFCP Session ○]
                           (DL FAR: forward)            (DL FAR: buffer / notify)
 SMF [SM Context ○]                       SMF [SM Context ○]  upCnxState = DEACTIVATED

CM-IDLE ≠ PDU Session Release ≠ UE Context deletion

The transition to CM-IDLE is the release of Access Network resources. Deleting a PDU Session requires a different procedure, PDU Session Release (TS 23.502 §4.3.4), and deleting the registration requires Deregistration (TS 23.502 §4.2.2.3). Put the other way around, it is normal for a CM-IDLE UE to "still have a PDU Session" and "still have a UE Context in the AMF."

What remains in the AMF UE Context

AMF UE Context (kept while CM-IDLE)
├─ SUPI / 5G-GUTI (→ 5G-S-TMSI is used for Paging)
├─ 5G NAS security context (KAMF, NAS COUNTs, etc.)
├─ Registration Area (TAI List), last known TAI / cell
├─ UE Radio Capability (if stored, can be handed to the gNB next time)
├─ Allowed NSSAI, Mobility Restriction, etc.
├─ Mapping PDU Session ID ⇔ SMF (SM Context)
└─ Assistance information for Paging (may be received from the gNB in UE Context Release Complete)
  • Because the 5G NAS security context is kept, a Service Request can normally be integrity-protected without re-authentication. The AS key for the gNB (KgNB) is derived anew from KAMF and the UL NAS COUNT of the Service Request and handed to the gNB in the Security Key IE of the Initial Context Setup Request (derivation function: TS 33.501 Annex A.9; key handling on the CM-IDLE → CM-CONNECTED transition: under TS 33.501 §6.8.1; both to be confirmed). Note that AS security is not "kept"; it is rebuilt every time.
  • If the AMF stores the UE Radio Capability, it can hand it to the gNB in the Initial Context Setup Request, so the gNB does not have to query the UE for its capabilities again (TS 23.501 §5.4.4.1, to be confirmed).
  • The gNB can include Information on Recommended Cells and RAN Nodes for Paging in UE Context Release Complete, and the AMF can use it to optimize the next Paging (TS 23.502 §4.2.6, TS 38.413 §9.2.2.6, to be confirmed). How it is used depends on the AMF implementation.

How — AN Release (CM-CONNECTED → CM-IDLE)

AN Release is the procedure that releases the logical NG-AP signalling connection between the UE and the AMF, the associated N3 User Plane connections, and the (R)AN RRC signalling and resources (TS 23.502 §4.2.6). It can be (R)AN-initiated (e.g. user inactivity, O&M, radio link failure) or AMF-initiated (e.g. there is no reason to keep the NAS signalling connection after a procedure completes).

Call Flow (gNB-initiated, user inactivity example)

sequenceDiagram
    participant UE
    participant gNB
    participant AMF
    participant SMF
    participant UPF
    Note over UE,gNB: No data for a while (decision is gNB implementation dependent)
    gNB->>AMF: NGAP UE Context Release Request
(Cause, PDU Session Resource List) AMF->>gNB: NGAP UE Context Release Command
(UE NGAP IDs, Cause) gNB->>UE: RRC Release gNB->>AMF: NGAP UE Context Release Complete
(User Location Information, Recommended Cells for Paging, etc.) Note over gNB,AMF: UE-associated logical NG-connection released
AMF UE NGAP ID / RAN UE NGAP ID become invalid AMF->>SMF: Nsmf_PDUSession_UpdateSMContext
(upCnxState = DEACTIVATED) SMF->>UPF: PFCP Session Modification Request
(remove AN Tunnel Info, DL FAR to buffer / notify) UPF-->>SMF: PFCP Session Modification Response SMF-->>AMF: UpdateSMContext Response Note over AMF: UE is CM-IDLE (still RM-REGISTERED)
Step Message Interface What changes Specification
1 UE Context Release Request N2 The gNB requests release. Cause (e.g. user inactivity in the Radio Network group, to be confirmed) and the list of PDU Sessions with an active N3 TS 38.413 §8.3.2
2 UE Context Release Command N2 The AMF orders the release TS 38.413 §8.3.3
3 RRC Release Uu Releases the UE's RRC connection → the UE goes to CM-IDLE (5GMM-IDLE) TS 38.331 (out of scope)
4 UE Context Release Complete N2 Release of the gNB's UE Context and the NGAP IDs is complete. May return location information and recommended information for Paging TS 38.413 §8.3.3
5 Nsmf_PDUSession_UpdateSMContext N11 Notifies the SMF, per PDU Session, of User Plane deactivation (upCnxState = DEACTIVATED) TS 23.502 §4.2.6, TS 29.502 §5.2.2.3.2 (to be confirmed)
6 PFCP Session Modification N4 Removes the AN Tunnel Info (gNB-side F-TEID) from the UPF and switches DL to buffer / notify TS 23.502 §4.2.6, TS 29.244 §7.5.4

When the AMF initiates, step 1 is absent and the AMF starts with the UE Context Release Command. A typical case is the AMF releasing the NAS signalling connection after Registration completes when there is no Follow-on request (TS 24.501 §5.3.1.3, TS 23.502 §4.2.2.2.2; exact location to be confirmed). When to release is a local decision of the AMF.

The Cause in UE Context Release Request and the inactivity timer

"After how many seconds without data to release" (the so-called inactivity timer) is a gNB-side setting / implementation matter whose value 3GPP does not define. Too short and the IDLE ⇔ CONNECTED round trips (a storm of Service Requests) increase; too long and the UE's battery and the gNB's resources are consumed.

What happens in the UPF — switching the DL FAR

When a DL packet reaches the UPF during CM-IDLE, the UPF does not know the gNB's F-TEID. So in the N4 update of AN Release, the SMF switches the DL FAR as follows (Apply Action: TS 29.244 §8.2.26, to be confirmed).

CM-CONNECTED (User Plane active) CM-IDLE (User Plane inactive)
Apply Action of the DL FAR FORW (forward) BUFF (buffer) + NOCP (notify the CP function)
Destination (Outer Header Creation) The gNB's N3 F-TEID None (the gNB's F-TEID has been removed)
When a DL packet arrives Sent to the gNB over GTP-U Buffered, and the SMF is notified with a PFCP Session Report Request (Report Type = DLDR)

The SMF decides whether buffering is done in the UPF or in the SMF (TS 23.501 §5.8.3, to be confirmed). When the SMF buffers, the UPF forwards DL packets to the SMF over N4.


How — Paging → Service Request (CM-IDLE → CM-CONNECTED)

The main way back from CM-IDLE to CM-CONNECTED is the Service Request (TS 23.502 §4.2.3). There are two triggers.

Trigger Cause Paging Example NAS Service type Specification
UE-triggered UL data / UL signalling arises None signalling / data TS 23.502 §4.2.3.2
Network-triggered DL data / network-originated signalling arrives Comes first mobile terminated services TS 23.502 §4.2.3.3 (after Paging, the same steps as the UE-triggered case in §4.2.3.2)

The Service type values (signalling / data / mobile terminated services / emergency services / emergency services fallback / high priority access / elevated signalling, etc.) are defined in TS 24.501 §9.11.3.50 (values have been added across Releases, to be confirmed).

First half of Network-triggered — up to Paging

sequenceDiagram
    participant UE
    participant gNB
    participant AMF
    participant SMF
    participant UPF
    Note over UPF: DL packet arrives. DL FAR is BUFF + NOCP
    UPF->>SMF: PFCP Session Report Request
(Report Type = DLDR, PDR ID) SMF-->>UPF: PFCP Session Report Response SMF->>AMF: Namf_Communication_N1N2MessageTransfer
(PDU Session ID, N2 SM information) AMF-->>SMF: 202 Accepted
(ATTEMPTING_TO_REACH_UE) AMF->>gNB: NGAP Paging
(UE Paging Identity = 5G-S-TMSI, TAI List for Paging) gNB->>UE: RRC Paging Note over UE: From here the flow is the same as a UE-triggered Service Request
Service type = mobile terminated services
  • When the AMF receives the N1N2MessageTransfer from the SMF and the UE is CM-IDLE, the AMF pages it and first replies that it is "attempting to reach the UE" (TS 23.502 §4.2.3.3, TS 29.518 §5.2.2.3.1; details of the response to be confirmed). If the UE is CM-CONNECTED, no Paging is needed and the AMF goes straight to N2 PDU Session Resource Setup.
  • If the UE does not respond, the AMF notifies the SMF of the N1N2 transfer failure, and the SMF can instruct the UPF how to handle the buffered data (TS 23.502 §4.2.3.3, to be confirmed).
  • A UE in MICO mode is considered unreachable while CM-IDLE (except during an Active Time, if one has been granted) and is not paged (TS 23.501 §5.4.1.3, to be confirmed). It is not true that "a CM-IDLE UE can always be paged."
  • For how the Paging destination (TAI List for Paging) is derived from the Registration Area, see the previous chapter.

UE-triggered Service Request and User Plane activation

sequenceDiagram
    participant UE
    participant gNB
    participant AMF
    participant SMF
    participant UPF
    UE->>gNB: RRC Setup + Service Request (NAS)
    gNB->>AMF: NGAP Initial UE Message
(new RAN UE NGAP ID, 5G-S-TMSI, NAS-PDU) Note over AMF: Identify the existing UE Context by 5G-S-TMSI
Allocate a new AMF UE NGAP ID
Verify NAS integrity (re-authenticate only if needed) AMF->>SMF: Nsmf_PDUSession_UpdateSMContext
(upCnxState = ACTIVATING) SMF-->>AMF: Response (N2 SM information
UPF-side N3 F-TEID, QoS Flows, etc.) AMF->>gNB: NGAP Initial Context Setup Request
(Security Key, PDU Session Resource Setup List, NAS: Service Accept) gNB->>UE: RRC Security Mode Command (AS security)
RRC Reconfiguration (DRB) Note over UE,UPF: UL can now flow gNB → UPF gNB->>AMF: NGAP Initial Context Setup Response
(gNB-side N3 F-TEID = new TEID) AMF->>SMF: Nsmf_PDUSession_UpdateSMContext
(N2 SM information) SMF->>UPF: PFCP Session Modification Request
(DL FAR = FORW, new gNB F-TEID) UPF-->>SMF: PFCP Session Modification Response SMF-->>AMF: Response (upCnxState = ACTIVATED) Note over UE,UPF: DL flows too. Buffered DL data is sent out
Stage Main messages Points to check Specification
NAS acceptance Service Request (UE → AMF) ngKSI, Service type, 5G-S-TMSI (cleartext IEs). PDU Sessions to activate are indicated in the Uplink data status IE, and the UE-side PDU Session state in the PDU session status IE TS 24.501 §8.2.16, §4.4.6 (to be confirmed)
N2 establishment Initial UE Message (gNB → AMF) New RAN UE NGAP ID, 5G-S-TMSI, User Location Information TS 38.413 §8.6.1
SM activation UpdateSMContext (AMF → SMF) upCnxState = ACTIVATING. The SMF returns N2 SM information (UPF-side N3 F-TEID, etc.) TS 23.502 §4.2.3.2, TS 29.502 §5.2.2.3.2 (to be confirmed)
RAN configuration Initial Context Setup Request / Response Request: Security Key, PDU Session Resource Setup Request List, NAS (Service Accept). Response: gNB-side N3 F-TEID TS 38.413 §8.3.1
UP update UpdateSMContext → PFCP Session Modification Set the DL FAR to FORW and put the new gNB F-TEID in Outer Header Creation TS 23.502 §4.2.3.2, TS 29.244 §7.5.4

Which PDU Sessions does a Service Request wake up?

The information called "List Of PDU Sessions To Be Activated" in TS 23.502 is carried in NAS (TS 24.501) as the Uplink data status IE (§9.11.3.57, to be confirmed). In 5GS, not all PDU Sessions are necessarily activated together; the targets are the PDU Sessions on which the UE wants to send UL and the PDU Sessions for which DL is waiting in the network. In addition, if the UE's and the network's view diverge in the PDU session status IE (§9.11.3.44, to be confirmed), the network may release that PDU Session locally (TS 24.501 §5.6.1.4, to be confirmed). These are non-cleartext IEs, so when a security context exists they are carried ciphered inside the NAS message container.

Where the Service Accept travels

The Service Accept (NAS) typically arrives as a NAS-PDU inside the AMF → gNB N2 request (the Initial Context Setup Request in the figure above) (TS 23.502 §4.2.3.2). It may include PDU session status, PDU session reactivation result, etc. (TS 24.501 §8.2.17 Service accept). The detailed conditions for sending a Service Accept are described differently across Releases and are to be confirmed.

Service Request is also used in CM-CONNECTED

The Service Request is not exclusive to CM-IDLE. It is also sent when a CM-CONNECTED UE wants to activate a PDU Session whose User Plane is inactive (TS 23.502 §4.2.3.2). In that case the gNB already has a UE Context, so the NAS is carried in Uplink NAS Transport (TS 38.413 §8.6.3), and the AMF sets up N3 with PDU Session Resource Setup (TS 38.413 §8.2.1) rather than Initial Context Setup. Assuming "Service Request = return from IDLE" leads to misreading traces.


How — values that change and values that do not across a Service Request

Value Before AN Release After Service Request Changes?
SUPI A A Does not change
5G-GUTI / 5G-S-TMSI A UE-triggered: up to the AMF (often not reallocated; implementation dependent) / response to Paging: B After a Service Request in response to Paging, the AMF sends a new 5G-GUTI (TS 33.501 §6.12.3; delivered e.g. by UE Configuration Update, TS 24.501 §5.4.4, to be confirmed). It may also be reallocated at other times at the AMF's discretion
PDU Session ID / UE IP address / DNN / S-NSSAI A A Does not change
SMF SM Context (smContextRef) A A Does not change
RAN UE NGAP ID / AMF UE NGAP ID X1 / Y1 X2 / Y2 May change (a new UE-associated logical NG-connection is created)
gNB-side N3 F-TEID (DL destination) 192.0.2.10 / 0x0000aa01 192.0.2.10 / 0x0000bb07 May change (the gNB allocates it anew; the IP also changes if the UE comes back via another gNB)
UPF-side N3 F-TEID (UL destination) 198.51.100.20 / 0x00000101 Same, or a new value Up to the SMF / UPF (to be confirmed)
AS security key (KgNB) K1 K2 Changes (re-derived from the UL NAS COUNT)

(The addresses are documentation example addresses, and the TEIDs are fictitious values.)

gNB DL F-TEID:  0x0000aa01 ──(removed by AN Release)──► none ──(Service Request)──► 0x0000bb07

A change of TEID or NGAP ID is not an anomaly

AN Release removes the gNB's UE Context and N3 tunnel, so it is normal for the gNB-side TEID of the N3 tunnel rebuilt by the Service Request to differ from the previous one. What is abnormal is the UPF's DL FAR still pointing at the old TEID. Likewise, because the NGAP IDs may change, when tracing the same UE you must correlate on SUPI (AMF / SMF logs), PDU Session ID and the SMF's smContextRef, not on NGAP IDs. The 5G-S-TMSI also changes across the 5G-GUTI reallocation after a response to Paging (TS 33.501 §6.12.3), so do not use it as the only key (see SUPI / SUCI / 5G-GUTI).


Relationship with RRC_INACTIVE — "the radio is resting but the UE is CM-CONNECTED"

NR RRC has three states: RRC_IDLE / RRC_INACTIVE / RRC_CONNECTED. A UE in RRC_INACTIVE remains CM-CONNECTED from the core's (AMF's) point of view (TS 23.501 §5.3.3.2.5).

Item CM-IDLE (RRC_IDLE) CM-CONNECTED with RRC_INACTIVE CM-CONNECTED (RRC_CONNECTED)
N2 UE-associated connection None Kept Exists
N3 tunnel None (inactive) Kept (the gNB can receive DL) Exists
UE Context in the gNB None Held by the gNB (the UE resumes with its I-RNTI) Exists
When DL arrives CN Paging (AMF → Registration Area) RAN Paging (gNB → RAN Notification Area) Delivered directly
Resumption procedure Service Request (NAS) RRC Resume (no NAS needed. Via another gNB, the context is fetched over Xn and a Path Switch is done if needed) —
  • The AMF gives NG-RAN RRC Inactive Assistance Information as input for deciding whether to use RRC_INACTIVE, and can, if needed, ask NG-RAN to report the UE's RRC state transitions with RRC Inactive Transition Report (TS 38.413 §8.3.5) (TS 23.501 §5.3.3.2.5, to be confirmed). Unless it asks for the report, the AMF does not distinguish whether the UE is RRC_INACTIVE or RRC_CONNECTED.
  • What happens when the UE does not respond to RAN Paging depends on the case. If there is a pending NAS PDU to deliver, NG-RAN initiates AN Release and moves the CM state in the AMF back to CM-IDLE. If only User Plane data is pending, NG-RAN decides by local configuration whether to keep N2 or initiate AN Release (TS 23.501 §5.3.3.2.5, to be confirmed).
  • When the UE resumes RRC at a different gNB, the N2 Path Switch Request (TS 38.413 §8.4.4, to be confirmed) switches the DL N3 destination to the new gNB.

See RRC Resume / Small Data for details. The point to take away here is that "the radio is resting" is not the same as "CM-IDLE."


Packet Analysis (Wireshark)

Display filters

Filter Use
ngap All of NGAP (UE Context Release / Paging / Initial UE Message / Initial Context Setup)
nas-5gs 5G NAS (Service Request / Service Accept / Service Reject)
nas-5gs.mm.message_type == 0x4c Service request (message type 0x4c. 0x4d = Service reject, 0x4e = Service accept. Field name to be confirmed per Wireshark version)
pfcp.msg_type == 56 PFCP Session Report Request (DLDR notification)
pfcp.msg_type == 52 PFCP Session Modification Request (the N4 update in AN Release / Service Request)
gtp.teid == 0x0000bb07 Follow a specific N3 tunnel
gtp.message == 26 GTP-U Error Indication (e.g. packets addressed to an old TEID. TS 29.281 §7.3.1)

The numeric NGAP procedureCode values may be displayed differently depending on the dissector and version, so this page does not assert them. Checking the message names in the GUI protocol tree is the reliable approach. SBI (Nsmf / Namf) is often TLS-encrypted and its content is not visible without a key log; in that case, check the upCnxState transitions in the SMF / AMF logs.

Decode example (conceptual)

The following is a conceptual representation of the display structure; the values use the test PLMN (001-01) and fictitious values (capture required).

NGAP UEContextReleaseCommand
 ├─ UE-NGAP-IDs
 │   └─ uE-NGAP-ID-pair: AMF-UE-NGAP-ID = 7, RAN-UE-NGAP-ID = 1001
 └─ Cause: radioNetwork = user-inactivity

PFCP Session Modification Request (after AN Release)
 └─ Update FAR (FAR ID = 2, DL)
     ├─ Apply Action: BUFF, NOCP
     └─ (forwarding to the gNB via Forwarding Parameters is no longer used; IE-level handling is implementation dependent, to be confirmed)

NGAP InitialUEMessage (at Service Request)
 ├─ RAN-UE-NGAP-ID: 1042            ← different from the previous 1001
 ├─ NAS-PDU
 │   └─ Service request
 │       ├─ Service type: data
 │       ├─ 5GS mobile identity: 5G-S-TMSI
 │       └─ NAS message container (after deciphering: Uplink data status / PDU session status)
 ├─ UserLocationInformation (NR CGI / TAI)
 └─ FiveG-S-TMSI

NGAP InitialContextSetupResponse
 └─ PDUSessionResourceSetupListCxtRes
     └─ PDU Session ID = 1
         └─ PDUSessionResourceSetupResponseTransfer (N2 SM information; the AMF forwards it to the SMF transparently)
             └─ DL QoS Flow per TNL Information > UP Transport Layer Information
                 └─ 192.0.2.10 / TEID 0x0000bb07   ← new gNB F-TEID

Order of checks

flowchart LR
    A["① AN Release
UE Context Release
Request / Command / Complete"] --> B["② N4
DL FAR to BUFF/NOCP"] B --> C["③ DL arrives
Session Report DLDR
→ NGAP Paging"] C --> D["④ Service Request
Initial UE Message
find context by 5G-S-TMSI"] D --> E["⑤ Initial Context Setup
gNB F-TEID in Response"] E --> F["⑥ N4
DL FAR now FORW +
new F-TEID?"] F --> G["⑦ GTP-U
DL flowing on new TEID?"]

In the UE-triggered case, ③ is absent and the flow starts at ④.


Trouble Shooting

Symptom Likely cause What to check Logs Packet Resolution
Incoming traffic does not reach a CM-IDLE UE, and no Paging is sent The UPF does not notify DL (DL FAR not set to BUFF/NOCP), or the SMF → AMF N1N2MessageTransfer fails PFCP Modification at AN Release, presence of a Session Report SMF / UPF logs pfcp Check the N4 update at AN Release and SBI reachability from SMF to AMF
Paging is sent but no Service Request comes back The UE is out of coverage or outside the Registration Area, wrong Paging scope, MICO mode TAI List for Paging versus the TA the UE is actually in AMF / gNB logs ngap Cross-check the TA configuration with the comparison table in Tracking Area
A Service Reject (5GMM cause #9 / #10) is returned The UE Context in the AMF is gone (implicit de-registration, context purge, AMF failure, etc.) The 5GMM cause in the Reject, whether the AMF has a UE Context AMF logs nas-5gs With #9 / #10 the UE performs a new Registration (TS 24.501 §5.6.1.5, to be confirmed). Check that the Registration succeeds as a normal recovery
Service Accept and Initial Context Setup Response succeeded but DL does not flow The PFCP Modification that pushes the gNB F-TEID to the UPF was not done or failed; the DL FAR is still BUFF Compare the F-TEID in Initial Context Setup Response with Outer Header Creation in PFCP SMF / UPF logs ngap / pfcp Control Plane Success ≠ User Plane Success. Check the N4 update
UL flows but only DL does not Same as above. UL can flow from the Initial Context Setup onward, so a missing DL-side update stands out Same as above SMF / UPF logs pfcp / gtp Check the destination TEID of the DL FAR
The gNB returns GTP-U Error Indication The UPF is sending DL to an old, already released gNB TEID (missing or late N4 update at AN Release) The TEID in the Error Indication and the F-TEIDs before and after AN Release gNB / UPF logs gtp.message == 26 Check the PFCP Modification at AN Release. UPF / SMF handling after receiving an Error Indication is partly implementation dependent (to be confirmed)
Only some PDU Sessions cannot communicate Not included in Uplink data status and therefore not activated, selective deactivation, local release due to a PDU session status mismatch Uplink data status / PDU session status in the Service Request, reactivation result in the Service Accept AMF / SMF logs nas-5gs (deciphering needed) Cross-check the PDU Session state between the UE and the network
Many IDLE ⇔ CONNECTED round trips, lots of signaling The gNB inactivity timer is too short, the UE sends many keepalives Cause and frequency of UE Context Release Request gNB statistics ngap Revisit the inactivity timer (implementation dependent), consider using RRC_INACTIVE
Messages of the same UE cannot be followed in a trace The RAN / AMF UE NGAP IDs change with every Service Request. After a response to Paging, the 5G-GUTI (5G-S-TMSI) also changes SUPI, PDU Session ID, smContextRef AMF / SMF logs ngap / nas-5gs Correlate on SUPI and PDU Session ID, not on NGAP IDs or the 5G-S-TMSI alone

"Visible in show subscriber" does not mean "CONNECTED"

Even if a UE appears in an operational CLI (e.g. a show subscriber-style command), that only shows that the AMF or SMF has a context for it; it does not mean the UE is CM-CONNECTED. A CM-IDLE UE also still has an AMF UE Context and PDU Sessions. CLI command names and displayed items are vendor implementation dependent, but the states to check can be organized with the specification's concepts.

What you want to know Which state it belongs to Example
Is the UE registered? RM state in the AMF RM-REGISTERED / RM-DEREGISTERED
Is there a signaling connection? CM state in the AMF (per access) CM-IDLE / CM-CONNECTED
Does the gNB have a UE Context? gNB / presence of NGAP IDs Whether an AMF UE NGAP ID exists
Is there a PDU Session? SM Context in the SMF PDU Session ID, UE IP
Is the User Plane active? upCnxState in the SMF, DL FAR in the UPF ACTIVATED / DEACTIVATED, FORW / BUFF
Last known location AMF Last TAI / NR CGI

When "the subscriber is visible but incoming traffic does not arrive," check the states separately, at least in the order RM state → CM state → upCnxState → DL FAR in the UPF.


Boundary between 3GPP specifications and vendor implementations

Defined by 3GPP Decided by vendor / operations
RM state / CM state and their transition conditions (TS 23.501 §5.3.2 / §5.3.3) CLI names such as show subscriber and their displayed items, internal UE Context IDs
The AN Release / Service Request / Paging procedures (TS 23.502 §4.2.6 / §4.2.3) The value of the gNB inactivity timer, whether to use RRC_INACTIVE
NGAP messages and IEs of UE Context Release / Initial Context Setup / Paging Paging strategy (how the scope widens, number of retransmissions)
NAS Service Request / Accept / Reject and 5GMM causes How long the AMF keeps idle UE Contexts (purge policy), the database and redundancy that hold contexts
upCnxState values, PFCP Apply Action (BUFF / NOCP / FORW) UPF / SMF buffer size and retention time, how TEIDs are allocated

Comparison with EPC (4G)

Item 4G EPC 5GC
Registration state EMM-REGISTERED / EMM-DEREGISTERED RM-REGISTERED / RM-DEREGISTERED (5GMM- in NAS)
Connection state ECM-IDLE / ECM-CONNECTED (TS 23.401 §4.6.3, to be confirmed) CM-IDLE / CM-CONNECTED
Transition to IDLE S1 Release (TS 23.401 §5.3.5) AN Release (TS 23.502 §4.2.6)
DL buffering and notification The S-GW buffers and sends a Downlink Data Notification to the MME The UPF (or SMF) buffers, and the AMF is notified via the SMF
Bearers / sessions woken up on return In principle S1-U is re-established for all EPS bearers (TS 23.401 §5.3.4.1, to be confirmed) Selectively per PDU Session (Uplink data status, etc.)
A state where the radio rests but the core stays connected (LTE Suspend/Resume exists as a CIoT optimization, to be confirmed) RRC_INACTIVE (remains CM-CONNECTED)

The ideas are almost the same; the major differences in the 5GC are selective User Plane activation per PDU Session and RRC_INACTIVE.


3GPP Specification

Specification Clause Content
TS 23.501 §5.3.2 / §5.3.2.2 / §5.3.2.4 Registration Management, RM state, registration over both 3GPP and non-3GPP access (§5.3.2.4 to be confirmed)
TS 23.501 §5.3.3.1 / §5.3.3.2 Connection Management, CM state (§5.3.3.2.1 general / §5.3.3.2.2 CM-IDLE / §5.3.3.2.3 CM-CONNECTED; sub-clauses to be confirmed)
TS 23.501 §5.3.3.2.5 CM-CONNECTED with RRC Inactive (to be confirmed)
TS 23.501 §5.4.1.3 / §5.4.4.1 MICO mode / handling of UE Radio Capability (to be confirmed)
TS 23.501 §5.6.8 Selective activation and deactivation of UP connection of existing PDU Session (to be confirmed)
TS 23.501 §5.8.3 Buffering in the UPF / SMF (to be confirmed)
TS 23.502 §4.2.3.2 / §4.2.3.3 UE Triggered / Network Triggered Service Request
TS 23.502 §4.2.6 AN Release
TS 23.502 §4.3.7 CN-initiated selective deactivation of UP connection (to be confirmed)
TS 24.501 §3.1 / §5.1.3.2.1 Definitions of 5GMM-IDLE mode / 5GMM-CONNECTED mode, 5GMM sublayer states (to be confirmed)
TS 24.501 §5.3.1.3 / §5.4.4 Release of the NAS signalling connection / Generic UE configuration update (to be confirmed)
TS 24.501 §5.6.1 Service request procedure (§5.6.1.4 accepted / §5.6.1.5 not accepted; to be confirmed)
TS 24.501 §8.2.16 / §8.2.17 / §8.2.18 Service request / Service accept / Service reject
TS 24.501 §9.11.3.44 / §9.11.3.50 / §9.11.3.57 PDU session status / Service type / Uplink data status (to be confirmed)
TS 38.413 §8.3.1 / §8.3.2 / §8.3.3 / §8.3.5 Initial Context Setup / UE Context Release Request / UE Context Release / RRC Inactive Transition Report
TS 38.413 §8.2.1 / §8.5.1 / §8.6.1 / §8.6.3 / §8.4.4 PDU Session Resource Setup / Paging / Initial UE Message / Uplink NAS Transport / Path Switch Request (includes to be confirmed)
TS 29.502 §5.2.2.3 / §5.2.2.3.2 Nsmf_PDUSession_UpdateSMContext, activation and deactivation of the User Plane (upCnxState; to be confirmed)
TS 29.518 §5.2.2.3.1 Namf_Communication_N1N2MessageTransfer (to be confirmed)
TS 29.244 §7.5.4 / §7.5.8 / §8.2.26 PFCP Session Modification / Session Report / Apply Action (includes to be confirmed)
TS 29.281 §7.3.1 GTP-U Error Indication (to be confirmed)
TS 33.501 §6.8.1 / §6.12.3 / Annex A.9 Key handling on CM state transitions / 5G-GUTI reallocation / derivation of KgNB (to be confirmed)
TS 23.401 §4.6.3 / §5.3.4.1 / §5.3.5 ECM state / Service Request / S1 Release (for EPC comparison; to be confirmed)

Summary

  • The RM state (registration) and the CM state (connection) are independent. RM-REGISTERED + CM-IDLE is the most common state, and RM-DEREGISTERED + CM-CONNECTED always appears during Initial Registration
  • What is released in CM-IDLE is on the Access Network side (RRC, the gNB's UE Context, the UE-associated logical NG-connection, the N3 User Plane connection)
  • What is kept is on the core side (the AMF UE Context, the registration, the 5G NAS security context, the PDU Session, the PFCP Session in the PSA UPF). The UPF's DL FAR is switched to buffer / notify
  • The way back is the Service Request. Network-triggered starts with Paging, then follows the same steps as UE-triggered and activates the User Plane per PDU Session
  • It is normal for the gNB-side N3 TEID, the NGAP IDs and KgNB to change across a Service Request. After a response to Paging, the 5G-GUTI (5G-S-TMSI) is also reallocated. What is abnormal is the UPF still pointing at the old TEID
  • RRC_INACTIVE is CM-CONNECTED. N2 / N3 are kept, and DL reaches the UE through RAN Paging
  • In operations, look at RM state → CM state → upCnxState → DL FAR separately. "The subscriber is visible" is not evidence of CONNECTED

Comprehension check

Q1. A UE is registered with the 5GC and has a PDU Session. It then moved to CM-IDLE through AN Release. Which statement is most appropriate? A. The AMF's UE Context and the PDU Session are always deleted when the UE becomes CM-IDLE / B. The PDU Session remains, but the UE-associated N2 connection and RAN-side N3 resources may be released / C. The N2 connection is kept, but only the SMF's PDU Session Context is deleted / D. In CM-IDLE, the N3 GTP-U tunnel between the UPF and the gNB must always be kept

Answer: B. AN Release releases the UE-associated logical NG-connection and the associated N3 User Plane connections (TS 23.502 §4.2.6). The AMF UE Context and the PDU Session remain (A is wrong). There is no N2 connection in CM-IDLE (C is wrong, TS 23.501 §5.3.3.2.2). There is no N3 in CM-IDLE either, and the UPF's DL FAR is switched to buffer / notify (D is wrong).

Q2. Across a Service Request, the gNB-side N3 TEID in the Initial Context Setup Response differed from the previous one. Should this be judged a fault?

No. AN Release releases the gNB's UE Context and N3 tunnel, so it is normal for the gNB to allocate a new TEID at the Service Request. What should be checked is whether that new TEID was reflected in the UPF's DL FAR (Outer Header Creation) by the PFCP Session Modification. If not, DL does not flow, or the gNB may return GTP-U Error Indication.

Q3. A UE entered RRC_INACTIVE. What is its CM state as seen by the AMF, and what happens when DL data arrives?

From the AMF's point of view it remains CM-CONNECTED (TS 23.501 §5.3.3.2.5). The N2 UE-associated connection and the N3 tunnel are kept, so the UPF sends DL straight to the gNB, and the gNB performs RAN Paging within the RAN Notification Area. No CN Paging by the AMF and no NAS Service Request are needed; the UE comes back with RRC Resume. If RAN Paging fails and a NAS PDU is pending, NG-RAN moves the state in the AMF back to CM-IDLE with AN Release; if only User Plane data is pending, whether to keep N2 depends on NG-RAN local configuration (to be confirmed).

Q4. During Initial Registration, before the Registration Accept is sent, what is the combination of the UE's RM state and CM state?

RM-DEREGISTERED and CM-CONNECTED. The UE enters CM-CONNECTED when the Registration Request (an initial NAS message) is sent / received, but enters RM-REGISTERED only from the Registration Accept onward. It is a typical example showing that RM and CM are independent axes.

Q5. A subscriber is displayed in the operational CLI, but incoming traffic does not reach that UE. What do you check, and in what order?

The subscriber is displayed because the AMF / SMF has a context for it; that is not evidence of CM-CONNECTED. Check the states separately in the order ① RM state (is it REGISTERED?) → ② CM state (if IDLE, is Paging being sent, is it not MICO?) → ③ upCnxState in the SMF (DEACTIVATED / ACTIVATED) → ④ DL FAR in the UPF (if BUFF+NOCP, is it notifying the SMF; if FORW, is the destination TEID correct?). CLI names and displays are vendor implementation dependent.


Next Step