PDU Session Establishment¶
Learning objectives¶
After reading this page, you will be able to:
- Explain what a PDU Session is (a logical user-plane pipe that goes through the UPF and out to the DN (Data Network)).
- Explain the Why (even after registration and authentication are done, why can't data flow until a PDU Session is set up?).
- Explain, in order, the major steps of UE-requested PDU Session Establishment (request → SMF selection → subscriber data/policy → UPF configuration over N4 → Accept + N2 resource setup → user-plane connectivity).
- Explain the roles of SMF / UPF / N4(PFCP) / N3(GTP-U) respectively.
- Explain CUPS (the separation of the control-plane SMF and the forwarding-plane UPF) with a diagram.
- Understand the basics of QoS Flow (QFI, 5QI, QoS Flow ↔ DRB mapping).
- Explain the roles of DNN / S-NSSAI / PDU Session Type / SSC mode.
- List the focal points for analyzing SM NAS / N4(PFCP) / N3(GTP-U) / NGAP packets in Wireshark.
Prerequisites¶
It will go more smoothly if you first understand the following. If you haven't yet, start from the curriculum.
- Completion of Registration (the UE is registered, i.e., 5GMM-REGISTERED) → Initial Registration
- Completion of Authentication (primary authentication and NAS security established) → Authentication
- NAS / N1 (the layer that carries control messages between UE and AMF; SM NAS also passes through here) → N1
- The role of the AMF and the idea of SBA / NF → AMF / NF Dictionary
What you'll learn in this chapter¶
This chapter focuses narrowly on UE-requested PDU Session Establishment (TS 23.502 §4.3.2.2). It is the procedure by which a UE that has finished registration and authentication sets up the "pipe (PDU Session)" needed to actually carry data.
- Network-requested PDU Session Modification / Release is out of scope for this chapter (see Next Step).
- Secondary Authentication (per-PDU-session authentication with an external DN-AAA, TS 33.501 §11) is covered only at an overview level; the details are out of scope.
- Handover and user-plane re-establishment via Service Request (CM-IDLE→CM-CONNECTED) are also out of scope.
Why — why a PDU Session is needed¶
Let's start with the Why (why it's needed). Even after a UE has completed Registration and Authentication, that alone means not a single byte of user data flows. What registration and authentication established is "a check-in to the network, identity verification, and keys for control" — not the path (the pipe) that carries data itself.
To do data communication, you need to set up one logical pipe that goes from the UE, through the UPF (User Plane Function), and out to the DN (Data Network, e.g., the internet or a corporate network). This is the PDU Session.
Analogy: the water supply in a house
- Registration = the contract for electricity and water (you are registered as a resident of this house)
- Authentication = identity verification (confirming you are the contract holder in person)
- PDU Session = actually running the pipes through which water flows
Even after the contract (registration) and identity verification (authentication) are done, unless you run the pipes (the PDU Session) and connect the waterway all the way to the tap, no water (data) comes out. PDU Session Establishment is the procedure for "running these pipes." The DNN corresponds to "which water source (which network) to connect to," and the QoS Flow corresponds to "how to allocate water pressure and priority."
Overview¶
In PDU Session Establishment, roughly the following flow takes place.
A registered UE requests session establishment from the SMF (Session Management Function) via the AMF → the SMF fetches subscriber data from the UDM and (optionally) policy (QoS) from the PCF → it configures packet forwarding rules on the UPF over N4 (PFCP) → it returns a PDU Session Establishment Accept to the UE via the AMF, and at the same time sets up user-plane resources on the gNB over N2. Finally, the gNB's tunnel information (TEID) is applied to the UPF, and the N3 (GTP-U) user plane becomes connective.
flowchart LR
UE([UE]) -->|"1.Establishment Request (N1/SM NAS)"| AMF[AMF]
AMF -->|"2.Nsmf_PDUSession (N11-equivalent)"| SMF[SMF]
SMF -->|"3.subscriber/policy"| POL{UDM / PCF}
SMF -->|"4.N4 (PFCP)"| UPF[UPF]
SMF -->|"5.Accept + N2 info"| AMF
AMF -->|"6.N2 Resource Setup"| gNB["(R)AN / gNB"]
gNB -.->|"7.N3 (GTP-U) connectivity"| UPF
UPF -->|"N6"| DN[(Data Network)]
What matters here is CUPS (Control and User Plane Separation). The SMF is the "brain (control)" and the UPF is the "pipe (forwarding)", separated from each other, and the SMF instructs the UPF over N4 (PFCP) on "how to forward."
Basic Concept — a beginner-friendly explanation¶
To understand PDU Sessions, there are a few keywords to nail down.
1. PDU Session and PDU Session ID¶
- PDU Session — the logical connection (pipe) that carries user data between the UE and the DN. A single UE can hold multiple PDU Sessions at the same time (e.g., one for the internet and one for a corporate network).
- PDU Session ID — the number that distinguishes those multiple sessions. It is assigned by the UE and included in the establishment request.
2. DNN (which network to connect to)¶
- DNN (Data Network Name) — the name of the destination data network. It corresponds to the 4G APN (Access Point Name). Things like "internet," "IMS (voice)," and "corporate network" are specified by the DNN.
3. S-NSSAI (which slice to use)¶
- S-NSSAI (Single Network Slice Selection Assistance Information) — an identifier indicating the network slice to use. A slice is a logical partition of the same physical network by purpose (e.g., mobile broadband / IoT / ultra-low-latency). For a PDU Session, the combination of (DNN, S-NSSAI) determines which network and which slice to use.
4. PDU Session Type (what kind of pipe it carries)¶
| PDU Session Type | What it carries |
|---|---|
| IPv4 | IPv4 packets |
| IPv6 | IPv6 packets |
| IPv4v6 | Both IPv4 and IPv6 |
| Ethernet | Ethernet frames (an L2 connection without IP) |
| Unstructured | Data with no defined structure (some IoT, etc.) |
(Basis: around TS 23.501 §5.6.1. The completeness of the enumerated values is to be confirmed.)
5. SSC mode (session continuity)¶
- SSC mode (Session and Service Continuity mode) — the policy for whether to keep or change the IP address (anchor UPF) upon movement. There are SSC mode 1 (keep the anchor), modes 2/3 (involving re-establishment), and so on (around TS 23.501 §5.6.9; details to be confirmed).
6. QoS Flow (the unit of quality)¶
- QoS Flow — a grouping of traffic to which the same quality (QoS) is applied within a PDU Session. In 5G, this QoS Flow is the finest granularity of QoS.
- QFI (QoS Flow Identifier) — the number that identifies a QoS Flow.
- 5QI (5G QoS Identifier) — a standardized number representing quality characteristics such as latency, packet loss rate, and priority (corresponding to the 4G QCI).
- QoS Flow ↔ DRB mapping — over the radio segment, a QoS Flow is mapped to a DRB (Data Radio Bearer) (handled by the gNB). Multiple QoS Flows can also be carried on a single DRB.
The biggest difference from EPS bearers
In 4G (EPC), the unit of QoS was the EPS bearer itself, and a tunnel was set up per bearer. In 5G, the large pipe called the PDU Session carries a quality unit called the QoS Flow inside it, and this is mapped to a DRB on the radio side. "Separating the session (pipe) from the QoS (quality)" is the design philosophy of 5G (see Comparison with EPC).
Architecture¶
Here are the elements involved in PDU Session Establishment and the interfaces that connect them. The star of this chapter is the point that the control plane (SMF) and the user plane (UPF) are separated (CUPS).
flowchart LR
subgraph CP["Control Plane"]
AMF[AMF]
SMF[SMF]
PCF[PCF]
UDM[UDM]
end
subgraph UP["User Plane"]
UPF[UPF]
end
UE([UE]) -- "N1 (SM NAS)" --> AMF
UE -. "Uu (RRC)" .- RAN["(R)AN / gNB"]
RAN -- "N2 (NGAP)" --> AMF
AMF -- "N11-equivalent (Namf/Nsmf, SBI)" --> SMF
SMF -- "N7 (Npcf)" --> PCF
SMF -- "N10 (Nudm)" --> UDM
SMF -- "N4 (PFCP)" --> UPF
RAN == "N3 (GTP-U)" ==> UPF
UPF == "N6" ==> DN[(Data Network)]
The roles of each element are as follows.
- UE — the terminal that requests the PDU Session. It generates the SM NAS (PDU Session Establishment Request) and uses the assigned UE IP.
- (R)AN / gNB — radio access. It relays the SM NAS and, over N2, sets up the user-plane resources (DRB, N3 tunnel). It handles the QoS Flow ↔ DRB mapping.
- AMF — the NAS point of contact. It does not interpret the contents of the SM NAS; it relays them to the SMF (terminating N1/N2 and bridging Namf/Nsmf).
- SMF (Session Management Function) — the command center for session management. It handles UE IP assignment, UPF selection, UPF control over N4, and QoS decisions.
- UPF (User Plane Function) — the forwarding substance of the user plane. It terminates N3 (gNB side) and N6 (DN side), and forwards packets, applies QoS, and measures charging exactly as instructed by the SMF (N4).
- PCF (Policy Control Function, conditional) — provides QoS/charging policy (PCC rules) (N7).
- UDM — the source of session-management subscription data (allowed DNN/S-NSSAI, etc.) (N10).
For details on the interfaces, see the Interface Dictionary.
Network Function¶
| NF | Role in this procedure | Information held/obtained | Main APIs/IFs used in this procedure | Impact on failure |
|---|---|---|---|---|
| AMF | Relays the SM NAS to the SMF. SMF selection. Terminates N1/N2 | UE context, (DNN, S-NSSAI), selected SMF | Namf (provided) / Nsmf_PDUSession (consumed), N1/N2 | The SM NAS doesn't reach the SMF, so establishment is impossible |
| SMF (→NF Dictionary) | The main actor of session establishment. UE IP assignment, UPF selection, N4 control, QoS decisions | PDU Session ID, UE IP, QoS Flow (QFI/5QI), UPF info | Nsmf_PDUSession (provided), N4 (PFCP), Nudm/Npcf (consumed) | The PDU Session can't be set up, so data communication is impossible |
| UPF (→NF Dictionary) | The substance of user-plane forwarding. Terminates N3/N6, applies rules, measures charging | Forwarding rules such as PDR/FAR/QER, TEID, UE IP | Controlled by the SMF over N4 (PFCP) | User data doesn't flow (there is no pipe) |
| PCF (conditional. →NF Dictionary) | Provides SM-related policy (PCC rules, QoS) | PCC rules, authorized QoS | Npcf_SMPolicyControl (N7) | Policy is not applied (in some cases it can continue with default QoS = configuration-dependent) |
| UDM | Provides session-management subscription data | Allowed DNN/S-NSSAI, default QoS, static UE IP, etc. | Nudm_SDM_Get (N10) | Subscription data can't be obtained, so establishment fails |
Interface / Protocol¶
Here are the interfaces and protocols used in this procedure.
| Interface | Segment | Protocol | Transport | Use in this procedure |
|---|---|---|---|---|
| N1 | UE⇔AMF | NAS (5GSM / SM NAS) | (tunneled over NGAP/N2) | SM messages such as PDU Session Establishment Request/Accept |
| N2 | gNB⇔AMF | NGAP | SCTP (port 38412) | PDU Session Resource Setup (DRB/N3 tunnel setup) |
| N11-equivalent (Namf/Nsmf) | AMF⇔SMF | SBI (HTTP/2, TLS, JSON) | TCP/TLS | Nsmf_PDUSession (CreateSMContext/UpdateSMContext), Namf_Communication_N1N2MessageTransfer. →Interface Dictionary |
| N4 | SMF⇔UPF | PFCP | UDP | Setting forwarding rules on the UPF (PDR/FAR/QER). →Interface Dictionary / Protocol Dictionary |
| N3 | gNB⇔UPF | GTP-U | UDP | User-plane packet forwarding (tunnel). →Interface Dictionary / Protocol Dictionary |
| N6 | UPF⇔DN | (IP, etc.) | — | Connection to the DN (internet, etc.). →Interface Dictionary |
| N7 | SMF⇔PCF | SBI (HTTP/2, TLS, JSON) | TCP/TLS | Fetching SM policy (PCC rules) (conditional) |
| N10 | SMF⇔UDM | SBI (HTTP/2, TLS, JSON) | TCP/TLS | Fetching session-management subscription data |
For details on the protocols, see the Protocol Dictionary, and for the interface list, see the Interface Dictionary. For related individual pages, see SMF / UPF, N3 / N4.
Procedure — Call Flow¶
This is the heart of this page. The main steps, compliant with 3GPP TS 23.502 §4.3.2.2.1 (UE-requested PDU Session Establishment), are shown as a Mermaid sequenceDiagram.
Precondition: registration, authentication, and NAS security are already established
The UE is already 5GMM-REGISTERED (Registration), and NAS security is also established (Authentication). The SM NAS is carried over this protected NAS. It is also assumed that N2 between the gNB and the AMF is already NG-Setup.
sequenceDiagram
autonumber
participant UE
participant RAN as (R)AN / gNB
participant AMF
participant SMF
participant UDM
participant PCF
participant UPF
UE->>AMF: PDU Session Establishment Request
(SM NAS: PDU Session ID, DNN, S-NSSAI, PDU Session Type)
Note right of UE: SM message nested in NAS
TS 24.501 §6.4.1
Note right of AMF: The AMF doesn't interpret the SM NAS; it does SMF selection
AMF->>SMF: Nsmf_PDUSession_CreateSMContext
(SUPI, PDU Session ID, DNN, S-NSSAI, SM NAS)
Note right of AMF: TS 23.502 §4.3.2.2.1
SMF->>UDM: Nudm_SDM_Get (fetch Session Management subscription data)
UDM-->>SMF: allowed DNN/S-NSSAI, default QoS, etc.
SMF-->>AMF: Nsmf_PDUSession_CreateSMContext Response
opt SM Policy Association (PCF interaction, optional/conditional)
SMF->>PCF: Npcf_SMPolicyControl_Create
PCF-->>SMF: PCC rules / authorized QoS
end
Note over SMF: UE IP address assignment / UPF selection
SMF->>UPF: N4 Session Establishment Request (PFCP)
(PDR/FAR/QER, instruction to assign UPF-side N3 TEID)
UPF-->>SMF: N4 Session Establishment Response
(UPF-side N3 TEID / UPF IP)
Note right of UPF: TS 29.244 (PFCP)
SMF->>AMF: Namf_Communication_N1N2MessageTransfer
(N1: PDU Session Establishment Accept + N2 SM info)
Note right of SMF: N2 SM info carries QoS Flow (QFI/5QI) and UPF-side N3 info
AMF->>RAN: N2 PDU Session Resource Setup Request (NGAP)
(N1 Accept bundled in)
RAN->>UE: RRC Reconfiguration (AN-specific resources: DRB setup)
UE-->>RAN: RRC Reconfiguration Complete
Note over RAN,UE: Deliver N1 Accept to the UE / QoS Flow↔DRB mapping
RAN->>AMF: N2 PDU Session Resource Setup Response
(gNB-side N3 TEID / gNB IP)
AMF->>SMF: Nsmf_PDUSession_UpdateSMContext (gNB-side N3 info)
SMF->>UPF: N4 Session Modification Request (PFCP)
(apply gNB-side N3 TEID to the FAR)
UPF-->>SMF: N4 Session Modification Response
Note over UE,UPF: N3 (GTP-U) user plane connective → data communication possible
Step-by-step explanation (numbers correspond to the diagram above)¶
- UE→AMF: PDU Session Establishment Request (SM NAS). It includes the PDU Session ID, DNN, S-NSSAI, and PDU Session Type. The SM NAS is a 5GSM (Session Management) message, carried nested inside an MM NAS (5GMM) message.
- AMF→SMF: The AMF does not interpret the contents of the SM NAS; via SMF selection it picks an appropriate SMF and hands over the SM NAS as-is with Nsmf_PDUSession_CreateSMContext. 3-4. SMF→UDM: It fetches session-management subscription data (allowed DNN/S-NSSAI, default QoS, etc.) with Nudm_SDM_Get.
- SMF→AMF: The CreateSMContext response (confirming context creation).
- (optional/conditional) SMF↔PCF: It establishes an SM Policy Association with Npcf_SMPolicyControl_Create and fetches PCC rules / authorized QoS (in a dynamic-PCC configuration; if absent, it continues with the SMF's default QoS = configuration-dependent).
- (inside the SMF) UE IP address assignment and UPF selection (which UPF to use).
- SMF→UPF: With N4 Session Establishment (PFCP), it sets forwarding rules on the UPF (PDR = Packet Detection Rule / FAR = Forwarding Action Rule / QER = QoS Enforcement Rule, etc.). At this point the UPF-side N3 TEID is assigned.
- SMF→AMF→gNB: With Namf_Communication_N1N2MessageTransfer (provided by the AMF, consumed by the SMF), the SMF hands the AMF both the N1 (PDU Session Establishment Accept) and the N2 SM info (QoS Flow = QFI/5QI, UPF-side N3 info) together. The AMF forwards this to the gNB as an N2 PDU Session Resource Setup Request (NGAP).
- gNB↔UE: The gNB sets up AN-specific resources (DRB) with RRC Reconfiguration, performs the QoS Flow↔DRB mapping, and delivers the bundled N1 Accept to the UE.
- gNB→AMF→SMF: With the N2 Resource Setup Response, it returns the gNB-side N3 TEID to the SMF (via Nsmf_PDUSession_UpdateSMContext).
- SMF→UPF: With N4 Session Modification (PFCP), it applies the gNB-side N3 TEID to the FAR (finalizing the downlink destination).
- User-plane connectivity: Now the uplink and downlink N3 (GTP-U) tunnels are both in place, and data communication over UE↔gNB↔UPF↔DN becomes possible.
The relationship between control-plane establishment and U-Plane establishment
Control-plane establishment (the SMF creates a context and returns an Accept to the UE) and user-plane establishment (completion of the TEID exchange for the N3 tunnel) are two different things. Even after the Accept is returned, downlink real data does not flow until the gNB-side N3 TEID is applied to the UPF (step 12). The two-stage N4 process of "Establishment (uplink preparation)" → "Modification (downlink TEID application)" is the key to U-Plane establishment.
Message names and ordering are partly implementation/version-dependent
The Nsmf operation names (CreateSMContext / UpdateSMContext), the two-stage N4 Establishment→Modification, and the flow of bundling the N1 Accept into the N2 Resource Setup follow TS 23.502 §4.3.2.2.1. However, the fine message ordering, optional steps, and some IEs differ across versions and vendor implementations, and some are to be confirmed.
References: TS 23.502 §4.3.2.2.1 (UE-requested PDU Session Establishment), TS 24.501 §6.4.1 (NAS-side PDU session establishment).
Signal Flow¶
The main messages / service operations are organized in a table.
| Message / Operation | Protocol | Source→Dest | Purpose | Main IEs | Result |
|---|---|---|---|---|---|
| PDU Session Establishment Request | NAS (5GSM) | UE→AMF | Request session establishment | PDU Session ID, DNN, S-NSSAI, PDU Session Type, (requested QoS) | The AMF relays it to the SMF |
| Nsmf_PDUSession_CreateSMContext | SBI (HTTP/2) | AMF→SMF | Create SM context | SUPI, PDU Session ID, DNN, S-NSSAI, SM NAS | The SMF begins session processing |
| Nudm_SDM_Get | SBI (HTTP/2) | SMF→UDM | Fetch subscription data | SUPI, DNN, S-NSSAI | Obtain allowed DNN/S-NSSAI and default QoS |
| Npcf_SMPolicyControl_Create (conditional) | SBI (HTTP/2) | SMF→PCF | Fetch SM policy | SUPI, DNN, S-NSSAI, PDU Session ID | Obtain PCC rules / authorized QoS |
| N4 Session Establishment Request | PFCP | SMF→UPF | Set forwarding rules on the UPF | PDR, FAR, QER, instruction to assign UPF-side N3 TEID | The UPF applies the rules and assigns an N3 TEID |
| N4 Session Establishment Response | PFCP | UPF→SMF | Notify configuration result / TEID | UPF-side N3 TEID, UPF IP | The SMF obtains the UPF-side U-Plane info |
| Namf_Communication_N1N2MessageTransfer | SBI (HTTP/2) | SMF→AMF | Hand over the N1 Accept + N2 SM info | N1: PDU Session Establishment Accept, N2 SM info (QoS Flow, UPF-side N3 TEID) | The AMF dispatches to the UE and the gNB |
| PDU Session Establishment Accept | NAS (5GSM) | SMF→(AMF→)UE | Accept session establishment | PDU Session ID, PDU Session Type, UE IP, authorized QoS (QFI/5QI), DNN, S-NSSAI | The UE obtains its IP and QoS |
| N2 PDU Session Resource Setup Request | NGAP | AMF→gNB | Set up AN-side U-Plane resources | QoS Flow (QFI/5QI), UPF-side N3 TEID, N1 Accept | The gNB sets up the DRB and maps QoS Flow↔DRB |
| N2 PDU Session Resource Setup Response | NGAP | gNB→AMF | AN-side configuration result | gNB-side N3 TEID, gNB IP | Material for finalizing the downlink destination |
| Nsmf_PDUSession_UpdateSMContext | SBI (HTTP/2) | AMF→SMF | Convey the gNB-side N3 info | gNB-side N3 TEID/IP | The SMF triggers the N4 update |
| N4 Session Modification Request | PFCP | SMF→UPF | Apply the downlink TEID | gNB-side N3 TEID (FAR update) | The uplink/downlink tunnels are established |
For the detailed IEs and reference specs of each message, see the Message Dictionary.
State Machine¶
Here is the (conceptual) user-plane state transition of a PDU Session. The UE's 5GSM side also has states such as "PDU SESSION ACTIVE" (basis: TS 23.501 §5.6 / TS 24.501 §6.1.3. Some state names differ in implementation representation and are to be confirmed).
stateDiagram-v2
[*] --> INACTIVE
INACTIVE --> ACTIVATING: Establishment Request → configuring SMF/UPF
ACTIVATING --> ACTIVE: N3 tunnel established (U-Plane connective)
ACTIVATING --> INACTIVE: establishment failure / Establishment Reject
ACTIVE --> INACTIVE: PDU Session Release
ACTIVE --> ACTIVE: Modification (QoS change, etc.; state preserved)
ACTIVE --> [*]
- INACTIVE — the PDU Session is not established, or the U-Plane is inactive.
- ACTIVATING — a transient state during establishment processing (configuring SMF/UPF/N4/N2). On establishment failure or a Reject, it returns to INACTIVE.
- ACTIVE — the U-Plane is connective. Data communication is possible. A QoS change (Modification) is done while remaining in ACTIVE.
The state names are to be confirmed
INACTIVE/ACTIVATING/ACTIVE in the diagram above are conceptual representations for understanding. They may not correspond one-to-one with the strict state names in the 3GPP spec (e.g., 5GSM's "PDU SESSION ACTIVE," TS 24.501 §6.1.3), so the state names are to be confirmed. Note also that this is a different concept from U-Plane deactivation due to the CM state (IDLE/CONNECTED).
Packet Analysis (Wireshark)¶
Because PDU Session Establishment spans multiple segments, you use different filters per segment.
Main display filters¶
| Filter | Meaning | Segment to observe |
|---|---|---|
nas-5gs.sm |
5GS NAS SM (session management) messages | N1 (SM NAS) |
nas-5gs |
5GS NAS in general (SM nested in MM) | N1 |
ngap |
NGAP (PDU Session Resource Setup, etc.) | N2 |
pfcp |
PFCP (N4 session control) | N4 |
gtp |
GTP-U (N3 user-plane tunnel) | N3 |
Concrete values such as message type / procedure code are to be confirmed
The concrete numeric values of nas-5gs.sm.message_type (PDU Session Establishment Request/Accept, etc.), pfcp.msg_type (Session Establishment/Modification), and ngap.procedureCode (PDU Session Resource Setup) are based on 3GPP assignments, but display and matching may differ depending on the Wireshark version / dissector implementation. Treat the numbers as to be confirmed; on real equipment, checking via the GUI's protocol hierarchy view is the surest approach.
Points to look at when decoding (main IEs)¶
- PDU Session ID / DNN / S-NSSAI (in the SM NAS Request) — which session, which network, which slice.
- PDU Session Type / UE IP address (in the SM NAS Accept) — the assigned IP and type.
- QoS Flow (QFI / 5QI) (in the Accept / N2 SM info) — the quality allocation.
- TEID (in N3 GTP-U / PFCP) — the tunnel identifier. Two of them, the UPF side and the gNB side, are exchanged.
The SM NAS is nested in the MM NAS¶
The SM NAS (5GSM) does not travel on its own; it passes over N1 nested inside the MM NAS (5GMM). Further, over the N2 segment it is nested in NGAP, so the hierarchy is as follows.
NGAP-PDU
└─ (Uplink/Downlink)NASTransport, etc.
└─ NAS-PDU
└─ 5GS NAS (5GMM: e.g., UL NAS TRANSPORT)
└─ 5GS NAS (5GSM: PDU Session Establishment Request)
Actual pcaps are environment-dependent (implementation-dependent)
The filters and IE names are guidelines for analysis. N4 (PFCP) / N3 (GTP-U) are core-internal segments, so depending on the capture point they may not be visible. If you build an Open5GS or free5GC testbed, you can actually observe SM NAS / PFCP / GTP-U (implementation-dependent).
Configuration¶
Here are the structure-level essentials of the configuration needed to make PDU Session Establishment succeed. Concrete values and vendor-specific items (Cisco, etc.) are implementation-dependent, and we do not write fictitious values here.
SMF side (e.g., the SMF configuration of Open5GS / free5GC)¶
- The DNN (destination data network name, equivalent to the 4G APN) and the associated UE IP pool (the range of IP addresses to assign).
- The correspondence between the S-NSSAI (supported slices) and the DNN.
- UPF specification (which UPF to use, the basis of UPF selection) and the N4 (PFCP) connection destination.
- Default QoS (default values of 5QI/QFI, ARP, etc.) — the quality in a PCF-less (static PCC) configuration.
UPF side¶
- Configuration of the N3 / N6 interfaces (gNB side / DN side).
- Preparation to apply the rules received from the SMF over N4 (PFCP) (the PFCP association).
- Routing beyond N6 (the route to the DN/internet; NAT, etc., is configuration-dependent).
Subscriber data (UDM/UDR)¶
- Registration of the allowed DNN / allowed S-NSSAI for the subscriber (SUPI/IMSI).
- Session-management subscription data such as default QoS and (if needed) a static UE IP.
Concrete values and vendor-specific items are implementation-dependent
Configuration key names, hierarchy, and required items differ across Open5GS / free5GC / commercial vendors (Cisco, etc.). The above are structure-level essentials; check the actual key names and values in each implementation's documentation (implementation-dependent). We do not record fictitious configuration values.
Trouble Shooting¶
Here is the triage for representative PDU Session establishment failures. For details on Cause values, see the Cause Dictionary.
| Symptom | Suspected cause | Check points | Related logs/packets | Direction of remedy |
|---|---|---|---|---|
| (a) PDU Session Establishment Reject (DNN/S-NSSAI not allowed) | The requested DNN/S-NSSAI is not allowed in the subscription data; SMF selection failed | The allowed DNN/S-NSSAI in the UDM; SMF selection in the AMF | Establishment Reject (SM NAS, 5GSM cause), AMF/SMF logs | Check the allowed DNN/S-NSSAI in the subscription data; align the DNN/slice configuration |
| (b) N4/PFCP establishment failure | UPF unreachable, PFCP association not established, rule inconsistency | N4 reachability between SMF↔UPF, PFCP heartbeat/association | N4 Session Establishment response error, PFCP (pfcp), SMF/UPF logs | Check UPF reachability and the PFCP association; verify PDR/FAR consistency |
| (c) N3 GTP-U not connecting (TEID/route) | TEID/IP mismatch between gNB↔UPF, N3 route down | The N3 TEID/IP on both sides, application of the gNB TEID to the downlink FAR (step 12) | No data on GTP-U (gtp), UPF counters | Check the downlink TEID application in the N4 Modification; check N3 routing |
| (d) QoS Flow configuration inconsistency (5QI/QFI) | Mismatch between the authorized QoS and the gNB configuration, DRB mapping failure | The QFI/5QI in the Accept/N2 SM info, the gNB's DRB configuration | NGAP PDU Session Resource Setup failure, gNB/AMF logs | Align the 5QI/QFI; check the gNB's QoS Flow↔DRB mapping |
Comparison with EPC¶
Let's contrast them so that those experienced with 4G (EPC) can bridge over to 5G.
| Aspect | 4G / EPC | 5G / 5GC |
|---|---|---|
| Unit of data connection | PDN Connection (+ EPS bearers) | PDU Session |
| Unit of QoS | EPS bearer (bearer = QoS) | QoS Flow (QFI/5QI; separating the session from QoS) |
| Control NFs | Control by the MME, forwarding by the SGW/PGW (the PGW-C carries part of the control; CUPS was a later add-on option) | Separated into SMF (control) and UPF (forwarding) (CUPS standardized) |
| Control↔forwarding IF | (PGW-C/PGW-U separation realized later via Sx) | Standardized as N4 (PFCP) |
| U-Plane tunnel | GTP-U (S1-U/S5, etc.) | GTP-U (N3/N9) |
| Destination specification | APN | DNN (+ slice specification via S-NSSAI) |
| QoS identifier | QCI | 5QI |
| Radio bearer | E-RAB / DRB | DRB (QoS Flow↔DRB mapping) |
CUPS was standardized in 5G
In 4G, control/forwarding separation (CUPS, PGW-C/PGW-U + the Sx interface) was introduced in a later phase, but in 5G the SMF/UPF separation is the standard architecture from the start, and its control interface is N4 (PFCP). Separating the "session (PDU Session)" from the "quality (QoS Flow)" is also a major evolution from the 4G notion of "bearer = QoS."
Release differences¶
We mark uncertain items as to be confirmed and do not assert them.
- Rel-15 — The PDU Session / QoS Flow model, SMF/UPF separation (CUPS), N4 (PFCP), DNN/S-NSSAI, and the basics of UE-requested PDU Session Establishment were established (the foundation of TS 23.501/23.502/24.501).
- Rel-16 — The generation in which extensions such as slicing, URLLC, TSC (Time-Sensitive Communication), and Ethernet PDU advanced (the extent to which these are woven into the PDU Session establishment procedure itself is to be confirmed).
- Rel-17 / Rel-18 (5G-Advanced) — Feature extensions continue (the concrete differences to the establishment procedure are to be confirmed).
Release differences are to be confirmed
Which features were woven, and to what extent, into the "PDU Session establishment procedure itself" in each release needs to be checked individually against the version differences of the relevant TS. The above is an overview, and the concrete items are to be confirmed.
3GPP Specification¶
| Spec | Section | Content |
|---|---|---|
| TS 23.501 | §5.6 | The concept, types, and SSC mode of the PDU Session (to be confirmed: detailed subsection number) |
| TS 23.501 | §5.7 | The QoS model (QoS Flow / QFI / 5QI) (to be confirmed: detailed subsection number) |
| TS 23.502 | §4.3.2.2 | The UE-requested PDU Session Establishment procedure (the basis of this chapter's Call Flow) |
| TS 24.501 | §6.4 | NAS-side 5GSM (PDU session establishment) messages (to be confirmed: detailed subsection number) |
| TS 29.244 | — | PFCP (N4 session control, PDR/FAR/QER, etc.) |
| TS 29.502 | — | Nsmf_PDUSession (the SMF's service API) |
| TS 29.281 | — | GTP-U (the N3/N9 user plane) |
| TS 38.413 | (NGAP sections) | NGAP (PDU Session Resource Setup, etc.) |
| TS 33.501 | §11 | Secondary Authentication (mentioned only at an overview level in this chapter) |
Handling of section numbers
TS 23.502 §4.3.2.2 is referenced as the skeleton of this chapter's Call Flow. The detailed subsection numbers of TS 23.501 §5.6/§5.7 and TS 24.501 §6.4, as well as the individual section numbers of the SBI/U-Plane specs (29.502/29.244/29.281) and TS 38.413, may differ across versions, and some are marked as to be confirmed.
FAQ¶
Q1. What is the difference between a PDU Session and a 4G EPS bearer?
In 4G, the EPS bearer is the "unit of connection = unit of QoS," and a bearer was set up per QoS. In 5G, the large pipe called the PDU Session carries a quality unit called the QoS Flow (QFI/5QI) inside it, mapped to a DRB on the radio side. Separating the "session (pipe)" from the "QoS (quality)" is the 5G design (see Comparison with EPC).
Q2. What are the roles of DNN and S-NSSAI?
The DNN (Data Network Name) indicates "which data network to connect to" (equivalent to the 4G APN), and the S-NSSAI indicates "which network slice to use." Basically, the combination of (DNN, S-NSSAI) determines which network and which slice a PDU Session uses.
Q3. What is the relationship between QoS Flow and DRB?
A QoS Flow is the finest unit of QoS handled on the core side (SMF/UPF) (identified by QFI), while a DRB (Data Radio Bearer) is the bearer on the radio side (gNB-UE). The gNB performs the QoS Flow ↔ DRB mapping, and multiple QoS Flows can also be bundled onto a single DRB.
Q4. What does N4/PFCP do?
N4 is the interface connecting the SMF (control) and the UPF (forwarding), and PFCP (Packet Forwarding Control Protocol) is the control protocol on top of it. The SMF uses PFCP to set rules such as PDR (detection) / FAR (forwarding) / QER (QoS) on the UPF, instructing it "forward this packet like this" (TS 29.244).
Q5. When is Secondary Authentication used?
It is used when an external DN (such as an enterprise network) requires additional authentication per PDU Session. The SMF mediates EAP-based authentication with an external DN-AAA server (TS 33.501 §11). It is optional and occurs only when connecting to a DNN that requires it. This chapter covers it only at an overview level, and the details are out of scope.
Summary¶
- A PDU Session is a logical pipe that carries user data from the UE, through the UPF, and out to the DN. Registration and authentication alone are not enough to communicate; only once this is set up does data flow.
- The major flow is establishment request → SMF selection → fetch subscriber data/policy → configure the UPF over N4 → Accept + N2 resource setup → establish the N3 tunnel.
- The SMF is control (brain) and the UPF is forwarding (pipe), separated (CUPS), and N4 (PFCP) connects the two. User data is carried over N3 (GTP-U).
- DNN (which network), S-NSSAI (which slice), PDU Session Type, and QoS Flow (QFI/5QI) are the main parameters.
- The user plane becomes connective through the two N4 stages of Establishment→Modification, aligning the TEID on the UPF side and the gNB side.
- Secondary Authentication is covered only at an overview level (per-PDU-session authentication with an external DN-AAA; optional).
- The basis is TS 23.502 §4.3.2.2 / TS 24.501 §6.4 / TS 23.501 §5.6・§5.7 / TS 29.244.
Practice — comprehension check and exercises¶
Comprehension check¶
Q1. What NF handles the control of a PDU Session, and what NF handles the forwarding? (answer)
Control is the SMF, forwarding is the UPF. The two are separated (CUPS), and the SMF controls the UPF over N4 (PFCP).
Q2. Does the AMF interpret the contents of the SM NAS? (answer)
No. As the NAS point of contact, the AMF merely relays the SM NAS to the SMF (performing SMF selection). It is the SMF that handles the SM contents.
Q3. What is the identifier that identifies the finest unit of QoS, and what is the standardized number representing quality characteristics? (answer)
The one that identifies the unit of QoS is the QFI (QoS Flow Identifier), and the standardized number representing quality characteristics is the 5QI (5G QoS Identifier) (equivalent to the 4G QCI).
Q4. What is the user-plane protocol used over the N3 segment? (answer)
GTP-U (gNB⇔UPF, TS 29.281). It uses the TEID for tunnel identification.
Q5. What is the parameter that indicates 'which data network to connect to'? (answer)
The DNN (Data Network Name) (equivalent to the 4G APN). "Which slice" is the S-NSSAI.
Exercises¶
Question: Reorder the following main steps of UE-requested PDU Session Establishment into the correct order.
A. SMF → UPF: N4 Session Establishment (PFCP, set PDR/FAR/QER)
B. UE → AMF: PDU Session Establishment Request (SM NAS)
C. AMF → gNB: N2 PDU Session Resource Setup (N1 Accept bundled in)
D. AMF → SMF: Nsmf_PDUSession_CreateSMContext
E. SMF → UPF: N4 Session Modification (apply gNB-side N3 TEID)
F. SMF → UDM: Nudm_SDM_Get (fetch subscription data)
G. gNB → AMF → SMF: N2 response (gNB-side N3 TEID)
Answer
B → D → F → A → C → G → E
- B: establishment request (SM NAS)
- D: AMF→SMF context creation
- F: fetch subscription data (UDM)
- A: set rules on the UPF over N4 (assign UPF-side N3 TEID)
- C: Accept + N2 resource setup (DRB/QoS Flow mapping on the gNB side)
- G: gNB-side N3 TEID to the SMF
-
E: apply the downlink TEID in the N4 Modification → U-Plane connectivity
-
The PCF interaction (Npcf_SMPolicyControl) is optional/conditional and slots in around A (configuration-dependent).
Next Step¶
Here are the next steps to deepen your understanding.
- QoS chapter (details of QoS Flow, QFI, 5QI, GBR/Non-GBR, AMBR, DRB mapping) / Network Slicing chapter (slice selection, S-NSSAI)
- Security chapter (details including Secondary Authentication)
- PDU Session Modification / Release chapter (session modification/release, out of scope for this chapter)
- Preconditions of the procedure: Initial Registration / Authentication
- Related NFs: AMF / SMF / UPF / PCF
- Related interfaces: N1 / N2 / N3 / N4 / N6 / N7
- Dictionaries: Message Dictionary / Timer Dictionary / Cause Dictionary / Protocol Dictionary / NF Dictionary / Interface Dictionary