Inside E1AP: How the gNB-CU-CP and CU-UP Set Up a PDU Session, Packet by Packet

This walkthrough uses two sets of captures from public srsRAN bug reports. The main one is logs_17_Sep_2_20PM.zip, attached to srsRAN_Project issue #1347. The comparison run is gnb-e1ap-f1ap-mac.pcap.zip, attached to srsRAN_4G issue #1213. Download them there. We decoded and annotated them with VisualEther, which turns a Wireshark PCAP into a sequence diagram with a plain-English caption on every message.

Our F1AP walkthrough split the 5G base station (gNB) in two: a central unit (CU) that runs the upper protocol layers and a distributed unit (DU) that runs the radio. This article splits the CU again. Its control plane and its user plane can be separate nodes, the gNB-CU-CP and the gNB-CU-UP, and the E1 interface connects them.

The captures show one PDU session, a UE's data connection, being set up across that split. The core asks the CU-CP for a session; the CU-CP gets the CU-UP and the DU to build it and passes tunnel addresses back and forth between them until every hop has both ends. This article is written for RAN engineers who know a monolithic gNB, or the CU/DU split, but have never looked inside a split CU.

💡 Read the walkthrough and the diagram side by side: open the interactive diagram in a split-screen window, or open it in a new tab and snap the two windows side by side. The comparison run's diagram is linked in its own section.

Overview

Both runs come from an srsRAN gNB whose DU, CU-CP, and CU-UP run as parts of one program. srsRAN can write each internal interface to its own pcap file, and these runs did. The interfaces never cross a network here, but their messages are the real E1AP, F1AP, and NGAP a split deployment would send.

The main run is the same run as our GEO satellite walkthrough, which reads its radio side. The satellite shows up exactly once here, as a 272 ms wait for the UE; E1 itself doesn't care.

Ciphering is null in both runs (NEA0 on the radio and the user plane, 5G-EA0 on NAS), so every message is readable, the NAS inside them included.

Why split the CU into a CU-CP and a CU-UP?

The split lets the two halves of the CU scale and sit apart. The control plane handles signaling: a few messages per procedure, a few procedures per UE. The user plane handles every data packet. An operator may want a few CU-CP instances and many CU-UP instances, or CU-UPs placed close to the users while the CU-CP stays central. TS 38.401, the NG-RAN architecture specification, allows one CU-CP to control many CU-UPs.

Each node owns specific layers:

That division creates the need for E1. The CU-CP decides how a UE's data bearer should be set up, but the CU-UP is the node that has to run it. E1AP, the E1 Application Protocol, is how the CU-CP tells it. E1AP is specified in TS 38.463 up to Release 17; from Release 18 that spec is a pointer to TS 37.483, which holds the same text. Clause numbers below are from TS 37.483 V18.6.0.

flowchart LR accTitle: The split gNB and its interfaces accDescr: The AMF connects to the gNB-CU-CP over N2, carrying NGAP signaling such as PDU session requests and tunnel endpoints. The UPF connects to the gNB-CU-UP over N3, carrying user data in GTP-U tunnels. The CU-CP connects to the CU-UP over E1, carrying E1AP bearer contexts with keys, PDCP settings, and tunnel endpoints. The CU-CP connects to the DU over F1-C, carrying F1AP UE contexts and RRC messages. The CU-UP connects to the DU over F1-U, carrying user data in GTP-U tunnels. The DU connects to the UE over the radio. AMF["AMF"] UPF["UPF"] subgraph gNB["gNB"] CUCP["gNB-CU-CP<br/>RRC · PDCP for RRC"] CUUP["gNB-CU-UP<br/>SDAP · PDCP for data"] DU["gNB-DU<br/>RLC · MAC · PHY"] end UE["UE"] AMF ---|"N2 · NGAP: PDU sessions, UL tunnel"| CUCP UPF ---|"N3 · GTP-U: user data"| CUUP CUCP ===|"E1 · E1AP: bearer contexts, keys, tunnels"| CUUP CUCP ---|"F1-C · F1AP: UE contexts, RRC"| DU CUUP ---|"F1-U · GTP-U: user data"| DU DU ---|"radio"| UE
The split gNB (TS 38.401). The CU-CP terminates every control interface: N2 to the AMF, F1-C to the DU, and E1 to the CU-UP. The CU-UP terminates the two user-plane interfaces, N3 to the UPF and F1-U to the DU. The CU-CP never carries user data, and the CU-UP and DU never talk to the core's control plane.

User data crosses two tunnels on its way through the gNB, and both use GTP-U, the GPRS Tunneling Protocol for user data. Each tunnel endpoint is a pair: a transport-layer address and a TEID (tunnel endpoint identifier), a 32-bit number that the receiving node chooses so it can tell which bearer an arriving packet belongs to. 3GPP calls such a pair UP TNL information, user-plane transport network layer information. Every tunnel has two of them, one for each direction, and most of what follows is about how each node learns the other's.

In a real split deployment E1AP runs over SCTP, the Stream Control Transmission Protocol, which carries signaling messages reliably over IP (TS 38.462, now TS 37.482). IANA assigns E1AP SCTP port 38462 and payload protocol identifier 64. These captures hold only the E1AP messages.

sequenceDiagram accTitle: E1 protocol stack between the gNB-CU-CP and the gNB-CU-UP, E1AP highlighted accDescr: E1AP spans the CU-CP and the CU-UP, carried over SCTP and IP. E1AP, the subject of this article, is highlighted. participant CUCP as gNB-CU-CP participant CUUP as gNB-CU-UP Note over CUCP,CUUP: E1AP Note over CUCP,CUUP: SCTP Note over CUCP,CUUP: IP
The E1 control-plane stack, with E1AP highlighted. E1AP runs between the CU-CP and the CU-UP over SCTP and IP. The captures in this article hold the E1AP layer only.

E1AP messages come in two families, like F1AP's:

FamilyIn these capturesKeyed by
Interface managementgNB-CU-UP E1 Setup, gNB-CU-CP E1 SetupA Transaction ID
Bearer context managementBearer Context Setup, Bearer Context ModificationThe pair gNB-CU-CP UE E1AP ID and gNB-CU-UP UE E1AP ID

A bearer context is the CU-UP's state for one UE: its PDU sessions, its data radio bearers (DRBs), their QoS flows, and the keys and tunnels that go with them. The CU-CP allocates its UE ID in the first request; the CU-UP allocates its own and returns it in the response, and both IDs ride every later message for that UE.

What does the whole flow look like?

The main run's 24 frames fall into eight phases. The first six frames set up the three interfaces; one UE's PDU session takes most of the rest.

sequenceDiagram accTitle: PDU session setup across NGAP, E1, F1, and N3 accDescr: The AMF sends PDU Session Resource Setup Request to the CU-CP. The CU-CP sends Bearer Context Setup Request to the CU-UP, which answers with its tunnel endpoints. The CU-CP sends UE Context Modification Request to the DU, which answers with its endpoint. The CU-CP sends Bearer Context Modification Request to the CU-UP, which confirms. The CU-CP sends the RRC Reconfiguration to the UE through the DU, receives the Reconfiguration Complete, and answers the AMF with PDU Session Resource Setup Response. The UPF then sends the first downlink packet to the CU-UP. participant DU as gNB-DU participant CP as gNB-CU-CP participant UP as gNB-CU-UP participant AMF participant UPF AMF->>CP: [12] PDU Session Resource Setup Request CP->>UP: [13] Bearer Context Setup Request UP-->>CP: [14] Bearer Context Setup Response CP->>DU: [15] UE Context Modification Request DU-->>CP: [16] UE Context Modification Response CP->>UP: [17] Bearer Context Modification Request UP-->>CP: [18] Bearer Context Modification Response CP->>DU: [19] RRC Reconfiguration DU->>CP: [20] RRC Reconfiguration Complete CP-->>AMF: [21] PDU Session Resource Setup Response UPF->>UP: [22] first downlink data
The main run at a glance. Frame numbers are in brackets. The CU-CP sits in the middle of every exchange: the AMF, the CU-UP, and the DU never talk to each other.
PhaseFramesInterfacesWhat happens
Interface setup1 to 6N2, E1, F1NG Setup, gNB-CU-UP E1 Setup, F1 Setup, within 45 ms
UE security context7 to 10N2, F1The AMF hands over K_gNB; the CU-CP builds the UE's context on the DU
PDU session request11 to 12N2The UE asks for a session; the AMF asks the gNB for it
Bearer context13 to 14E1The CU-CP sets up the bearer; the CU-UP returns two tunnel endpoints
F1-U wiring15 to 18F1, E1The DU gets the CU-UP's endpoint; the CU-UP gets the DU's
UE reconfiguration19 to 20F1The UE gets the new DRB
Session answer and data21 to 22N2, N3The AMF gets the gNB's endpoint; the first packet arrives
Teardown23 to 24F1F1 Removal, 65 s later

The bearer context itself moves through three states. E1AP defines procedures, not states, so this is a lifecycle read from the flow:

stateDiagram-v2 accTitle: Bearer context lifecycle in the main run accDescr: The CU-UP starts with no bearer context. Bearer Context Setup creates it with the NG-U and F1-U uplink endpoints allocated but no downlink endpoint for F1-U. Bearer Context Modification adds the DU's F1-U downlink endpoint, which completes the user plane. A Bearer Context Release would end it, but the captures contain none. state "No bearer context" as None state "Set up, F1-U DL unknown" as Half state "User plane complete" as Full [*] --> None None --> Half: Bearer Context Setup Half --> Full: Bearer Context Modification Full --> None: Bearer Context Release (not captured)
The UE's bearer context at the CU-UP, read from frames 13 to 18. Setup creates it with the uplink side of each tunnel ready. Modification completes the F1-U tunnel. The captures never release it.

How was one diagram built from four captures?

srsRAN wrote each interface of the main run to its own file: gnb_e1ap.pcap, gnb_f1ap.pcap, gnb_ngap.pcap, and gnb_n3.pcap. Each stores bare protocol messages, with no IP or SCTP headers, under its own user-defined link type (DLT_USER), so Wireshark needs to be told which protocol each holds. All four were written by the same gNB process with one clock. Their first frames fall within 45 ms of each other, and the order they give matches the bearer context setup flow in TS 38.401 (§8.9.2) step for step.

We windowed each file to the frames that matter (all 6 E1AP frames, 10 of 24 F1AP, 7 of 15 NGAP, and the first of 7,977 N3) and merged them with Wireshark's mergecap into one pcapng, renumbered 1 to 24 in time order. Pcapng keeps each file's link type, so one Wireshark profile with four DLT_USER mappings decodes all of it. VisualEther draws each protocol between fixed lanes, because there are no addresses to read lanes from.

The F1AP frames left out (RRC setup, authentication, NAS security, and UE capabilities) are read frame by frame in our F1AP walkthrough.

How do the three interfaces come up? (frames 1–6)

Every interface is set up once, before any UE: N2 first, then E1, then F1.

sequenceDiagram accTitle: Interface setup accDescr: The CU-CP sends NG Setup Request to the AMF and receives NG Setup Response 7.5 milliseconds later. The CU-UP sends gNB-CU-UP E1 Setup Request to the CU-CP and receives the response 30 microseconds later. The DU sends F1 Setup Request to the CU-CP and receives F1 Setup Response. participant DU as gNB-DU participant CP as gNB-CU-CP participant UP as gNB-CU-UP participant AMF CP->>AMF: [1] NG Setup Request (srscucp01) AMF-->>CP: [2] NG Setup Response (open5gs-amf0) UP->>CP: [3] gNB-CU-UP E1 Setup Request (srs_cu_up_0, 5GC, PLMN 001/01) CP-->>UP: [4] gNB-CU-UP E1 Setup Response DU->>CP: [5] F1 Setup Request (srsdu0, PCI 1) CP-->>DU: [6] F1 Setup Response
Frames 1 to 6: NG Setup, gNB-CU-UP E1 Setup, and F1 Setup, all within 44.9 ms.

Frames 1 and 2: NG Setup. The CU-CP registers with the AMF as srscucp01, with a 22-bit gNB ID and tracking area code 1, and the AMF (open5gs-amf0, an Open5GS core) accepts 7.5 ms later. Only the CU-CP speaks NGAP.

Frames 3 and 4: gNB-CU-UP E1 Setup. E1AP defines two E1 Setup procedures, one started by each side (§8.2.3 and §8.2.4). Whichever node opens the first SCTP association also starts E1 Setup, and no other E1AP message may come before it. In this run the CU-UP starts it. Its request says who it is and what it can serve:

FieldValueMeaning
TransactionID0Pairs the response with this request
gNB-CU-UP-ID0The CU-UP's identity within this gNB
gNB-CU-UP-Namesrs_cu_up_0An optional readable name
CNSupportc-5gcIt serves a 5G core (the alternative is an LTE core, for EN-DC)
SupportedPLMNs00f110MCC 001, MNC 01, the usual test network

The CU-CP accepts 30 µs later with nothing but the Transaction ID. After this, the CU-CP knows a CU-UP exists and what it can carry. No UE context exists on E1 yet.

Frames 5 and 6: F1 Setup. The DU (srsdu0, ID 0) registers its cell, PCI 1, and the CU-CP accepts under the same name it gave the AMF. The three setups finish within 44.9 ms of the first.

Where do the user-plane keys come from? (frames 7–10)

The keys start in the core and are narrowed at each step. In the Initial Context Setup Request (frame 7) the AMF gives the CU-CP K_gNB, the 256-bit key from which every access-stratum key is derived, along with the NAS Registration Accept to relay. The CU-CP then builds the UE's context on the DU and starts RRC security (frame 8, F1 UE Context Setup Request, carrying the RRC Security Mode Command with ciphering NEA0 and integrity NIA2).

The CU-CP keeps K_gNB. When it later sets up the user plane, it derives the two user-plane keys, KUPenc for ciphering and KUPint for integrity, and sends only those to the CU-UP. The CU-UP can protect user data but can't derive any other key.

The DU confirms in 2.5 ms (frame 9). The CU-CP answers the AMF in frame 10, 618 ms after the AMF's request, once the UE has completed RRC security and sent its radio capabilities (frames left out of the diagram).

What does the CU-CP ask the CU-UP for? (frames 11–13)

Everything the CU-UP needs to carry one PDU session, all decided by the CU-CP. The trigger comes from the UE: a PDU Session Establishment Request for session 1 to the data network internet (frame 11). 22 ms later the AMF asks the gNB to set the session up (frame 12), and 0.4 ms after that the CU-CP sends the Bearer Context Setup Request (frame 13).

sequenceDiagram accTitle: PDU session request and Bearer Context Setup Request accDescr: The CU-CP relays the UE's PDU Session Establishment Request to the AMF. The AMF sends PDU Session Resource Setup Request with the UPF's uplink tunnel, 192.168.32.45 TEID 0x802b. The CU-CP sends Bearer Context Setup Request to the CU-UP with the same uplink tunnel, the user-plane keys, and the DRB configuration. participant CP as gNB-CU-CP participant UP as gNB-CU-UP participant AMF CP->>AMF: [11] Uplink NAS Transport (PDU Session Establishment Request) AMF->>CP: [12] PDU Session Resource Setup Request (UL tunnel 192.168.32.45, TEID 0x802b) CP->>UP: [13] Bearer Context Setup Request (keys, UL tunnel, DRB 1)
Frames 11 to 13: the session request, and the bearer context request 0.4 ms after it. The UL tunnel endpoint passes through unchanged.

The AMF's request (frame 12) carries the session as the SMF, the core's session management function, built it: PDU session 1 of type IPv4, slice SST 1 / SD 010203, one QoS flow with QFI (QoS flow identifier) 1 at 5QI 9, and the UPF's uplink endpoint, 192.168.32.45 with TEID 0x0000802b. Inside it rides the NAS PDU Session Establishment Accept, which gives the UE its address, 10.45.0.2.

The CU-CP turns that into the Bearer Context Setup Request:

FieldValueMeaning
gNB-CU-CP-UE-E1AP-ID0The CU-CP's ID for this UE on E1
cipheringAlgorithmnEA0Null ciphering for user data
integrityProtectionAlgorithmi-128-NIA2AES-based integrity, if integrity is used
encryptionKey, integrityProtectionKey256-bit keysKUPenc and KUPint, in clear
UEDLAggregateMaximumBitRate1 Gbit/sThe UE's downlink cap across all its sessions
UE-Inactivity-Timer7200 sHow long the CU-UP waits before it reports the UE as inactive; 7200 s is the maximum the IE allows
ActivityNotificationLevelueReport activity per UE, not per DRB or session
pDU-Session-ID, type1, ipv4The session from NGAP
sNSSAISST 1, SD 010203The slice from NGAP
securityIndicationintegrity not-needed, confidentiality requiredThe user-plane security policy, mandatory on E1. The NGAP request carried none (the IE is optional there), so these values are srsRAN's default
nG-UL-UP-TNL-Information192.168.32.45, TEID 0x0000802bWhere to send uplink packets: the UPF's endpoint from NGAP, unchanged
dRB-ID1The data radio bearer to create
sDAP-Configurationdefault DRB, no SDAP header UL or DLWith one QoS flow on the DRB, no per-packet QFI is needed over the air
pDCP-Configuration18-bit SN, RLC AM, t-Reordering 220 ms, discard timer infinityThe PDCP settings the CU-UP must run
qos-flow-Information-To-Be-SetupQFI 1, 5QI 9, ARP priority 8The QoS flow mapped onto DRB 1, with the allocation and retention priority from NGAP
🧱 [00013] Frame 13 Bearer Context Setup Request 2025-09-17T08:51:04.136944Z gNB-CU-CP → gNB-CU-UP
frame : Frame 13: Packet, 158 bytes on wire (1264 bits), 158 bytes captured (1264 bits) on interface unknown, id 0
Section number : 1
Interface id : 0 (unknown)
Interface name : unknown
Encapsulation type : USER 6 (51)
Arrival Time : Sep 17, 2025 14:21:04.136944000 India Standard Time
UTC Arrival Time : Sep 17, 2025 08:51:04.136944000 UTC
Epoch Arrival Time : 1758099064.136944000
Time shift for this packet : 0.000000000 seconds
Time delta from previous captured frame : 398.000 microseconds
Time delta from previous displayed frame : 398.000 microseconds
Time since reference or first frame : 1 minute, 41.035087000 seconds
Frame Number : 13
Frame Length : 158 bytes (1264 bits)
Capture Length : 158 bytes (1264 bits)
Frame is marked : False
Frame is ignored : False
Protocols in frame : user_dlt:e1ap
Character encoding : ASCII (0)
user_dlt : DLT: 153, Payload: e1ap (E1 Application Protocol)
e1ap : E1 Application Protocol
0... .... Extension Bit : False
E1AP-PDU : initiatingMessage (0)
initiatingMessage
procedureCode : id-bearerContextSetup (8)
criticality : reject (0)
value
BearerContextSetupRequest
0... .... Extension Bit : False
protocolIEs : 7 items
Item 0 : id-gNB-CU-CP-UE-E1AP-ID
ProtocolIE-Field
id : id-gNB-CU-CP-UE-E1AP-ID (2)
criticality : reject (0)
value
GNB-CU-CP-UE-E1AP-ID : 0
Item 1 : id-SecurityInformation
ProtocolIE-Field
id : id-SecurityInformation (13)
criticality : reject (0)
value
SecurityInformation
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (iE-Extensions is NOT present)
securityAlgorithm
..0. .... Extension Bit : False
...1 .... Optional Field Bit : True (integrityProtectionAlgorithm is present)
.... 0... Optional Field Bit : False (iE-Extensions is NOT present)
.... .0.. Extension Present Bit : False
cipheringAlgorithm : nEA0 (0)
0... .... Extension Present Bit : False
integrityProtectionAlgorithm : i-128-NIA2 (2)
uPSecuritykey
...0 .... Extension Bit : False
.... 1... Optional Field Bit : True (integrityProtectionKey is present)
.... .0.. Optional Field Bit : False (iE-Extensions is NOT present)
encryptionKey : 051df5624b5c441e4334ae0838c3d0710e92f0174e4ef8519840e5c562c87970
integrityProtectionKey : a4af9fcba29377314871f77951d6a047e9f848e5f6081c520f66da503a1ba534
Item 2 : id-UEDLAggregateMaximumBitRate
ProtocolIE-Field
id : id-UEDLAggregateMaximumBitRate (14)
criticality : reject (0)
value
0... .... Extension Present Bit : False
BitRate : 1000000000bits/s
Item 3 : id-Serving-PLMN
ProtocolIE-Field
id : id-Serving-PLMN (58)
criticality : ignore (1)
value
PLMN-Identity : 00f110
Mobile Country Code (MCC) : Test network (001)
Mobile Network Code (MNC) : Test network (01)
Item 4 : id-ActivityNotificationLevel
ProtocolIE-Field
id : id-ActivityNotificationLevel (23)
criticality : reject (0)
value
0... .... Extension Present Bit : False
ActivityNotificationLevel : ue (2)
Item 5 : id-UE-Inactivity-Timer
ProtocolIE-Field
id : id-UE-Inactivity-Timer (59)
criticality : reject (0)
value
0... .... Extension Present Bit : False
Inactivity-Timer : 7200s
Item 6 : id-System-BearerContextSetupRequest
ProtocolIE-Field
id : id-System-BearerContextSetupRequest (15)
criticality : reject (0)
value
System-BearerContextSetupRequest : nG-RAN-BearerContextSetupRequest (1)
nG-RAN-BearerContextSetupRequest : 1 item
Item 0 : id-PDU-Session-Resource-To-Setup-List
ProtocolIE-Field
id : id-PDU-Session-Resource-To-Setup-List (42)
criticality : reject (0)
value
PDU-Session-Resource-To-Setup-List : 1 item
Item 0
PDU-Session-Resource-To-Setup-Item
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (pDU-Session-Resource-DL-AMBR is NOT present)
..0. .... Optional Field Bit : False (pDU-Session-Data-Forwarding-Information-Request is NOT present)
...0 .... Optional Field Bit : False (pDU-Session-Inactivity-Timer is NOT present)
.... 0... Optional Field Bit : False (existing-Allocated-NG-DL-UP-TNL-Info is NOT present)
.... .0.. Optional Field Bit : False (networkInstance is NOT present)
.... ..0. Optional Field Bit : False (iE-Extensions is NOT present)
pDU-Session-ID : 1
0... .... Extension Present Bit : False
pDU-Session-Type : ipv4 (0)
sNSSAI
.... 0... Extension Bit : False
.... .1.. Optional Field Bit : True (sD is present)
.... ..0. Optional Field Bit : False (iE-Extensions is NOT present)
sST : 01
sD : 010203
securityIndication
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (maximumIPdatarate is NOT present)
..0. .... Optional Field Bit : False (iE-Extensions is NOT present)
...0 .... Extension Present Bit : False
integrityProtectionIndication : not-needed (2)
.... ..0. Extension Present Bit : False
confidentialityProtectionIndication : required (0)
nG-UL-UP-TNL-Information : gTPTunnel (0)
gTPTunnel
..0. .... Extension Bit : False
...0 .... Optional Field Bit : False (iE-Extensions is NOT present)
.... 0... Extension Present Bit : False
transportLayerAddress : c0a8202d [bit length 32, 1100 0000 1010 1000 0010 0000 0010 1101 decimal value 3232243757]
IPv4 transportLayerAddress : 192.168.32.45
gTP-TEID : 0000802b
dRB-To-Setup-List-NG-RAN : 1 item
Item 0
DRB-To-Setup-Item-NG-RAN
.... .0.. Extension Bit : False
.... ..0. Optional Field Bit : False (dRB-Data-Forwarding-Information-Request is NOT present)
.... ...0 Optional Field Bit : False (dRB-Inactivity-Timer is NOT present)
0... .... Optional Field Bit : False (pDCP-SN-Status-Information is NOT present)
.0.. .... Optional Field Bit : False (iE-Extensions is NOT present)
..0. .... Extension Present Bit : False
dRB-ID : 1
sDAP-Configuration
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (iE-Extensions is NOT present)
..0. .... Extension Present Bit : False
defaultDRB : true (0)
.... 0... Extension Present Bit : False
sDAP-Header-UL : absent (1)
.... ..0. Extension Present Bit : False
sDAP-Header-DL : absent (1)
pDCP-Configuration
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (rOHC-Parameters is NOT present)
..1. .... Optional Field Bit : True (t-ReorderingTimer is present)
...1 .... Optional Field Bit : True (discardTimer is present)
.... 0... Optional Field Bit : False (uLDataSplitThreshold is NOT present)
.... .0.. Optional Field Bit : False (pDCP-Duplication is NOT present)
.... ..0. Optional Field Bit : False (pDCP-Reestablishment is NOT present)
.... ...0 Optional Field Bit : False (pDCP-DataRecovery is NOT present)
0... .... Optional Field Bit : False (duplication-Activation is NOT present)
.0.. .... Optional Field Bit : False (outOfOrderDelivery is NOT present)
..0. .... Optional Field Bit : False (iE-Extensions is NOT present)
...0 .... Extension Present Bit : False
pDCP-SN-Size-UL : s-18 (1)
.... .0.. Extension Present Bit : False
pDCP-SN-Size-DL : s-18 (1)
.... ...0 Extension Present Bit : False
rLC-Mode : rlc-am (1)
t-ReorderingTimer
...0 .... Extension Bit : False
.... 0... Optional Field Bit : False (iE-Extensions is NOT present)
.... .0.. Extension Present Bit : False
t-Reordering : ms220 (20)
discardTimer : infinity (15)
cell-Group-Information : 1 item
Item 0
Cell-Group-Information-Item
..0. .... Extension Bit : False
...0 .... Optional Field Bit : False (uL-Configuration is NOT present)
.... 0... Optional Field Bit : False (dL-TX-Stop is NOT present)
.... .0.. Optional Field Bit : False (rAT-Type is NOT present)
.... ..0. Optional Field Bit : False (iE-Extensions is NOT present)
.... ...0 Extension Present Bit : False
cell-Group-ID : 0
qos-flow-Information-To-Be-Setup : 1 item
Item 0
QoS-Flow-QoS-Parameter-Item
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (qoSFlowMappingIndication is NOT present)
..0. .... Optional Field Bit : False (iE-Extensions is NOT present)
qoS-Flow-Identifier : 1
qoSFlowLevelQoSParameters
.0.. .... Optional Field Bit : False (gBR-QoS-Flow-Information is NOT present)
..0. .... Optional Field Bit : False (reflective-QoS-Attribute is NOT present)
...0 .... Optional Field Bit : False (additional-QoS-Information is NOT present)
.... 0... Optional Field Bit : False (paging-Policy-Index is NOT present)
.... .0.. Optional Field Bit : False (reflective-QoS-Indicator is NOT present)
.... ..0. Optional Field Bit : False (iE-Extensions is NOT present)
qoS-Characteristics : non-Dynamic-5QI (0)
non-Dynamic-5QI
.0.. .... Optional Field Bit : False (qoSPriorityLevel is NOT present)
..0. .... Optional Field Bit : False (averagingWindow is NOT present)
...0 .... Optional Field Bit : False (maxDataBurstVolume is NOT present)
.... 0... Optional Field Bit : False (iE-Extensions is NOT present)
.... .0.. Extension Present Bit : False
fiveQI : 9
nGRANallocationRetentionPriority
0... .... Optional Field Bit : False (iE-Extensions is NOT present)
priorityLevel : Unknown (8)
pre-emptionCapability : shall-not-trigger-pre-emption (0)
pre-emptionVulnerability : not-pre-emptable (0)
Rendered from a Wireshark PCAP by VisualEther.

Frame 13, Bearer Context Setup Request. Under protocolIEs, SecurityInformation holds the algorithms and the uPSecuritykey. System-BearerContextSetupRequest -> PDU-Session-Resource-To-Setup-List holds the session: sNSSAI, securityIndication, nG-UL-UP-TNL-Information with the UPF's address and gTP-TEID, and DRB-To-Setup-Item-NG-RAN with the SDAP, PDCP, and QoS flow configuration.

What does the request leave out?

The request is complete in a narrow way. It carries no RRC, no K_gNB, and nothing about the radio: the CU-UP never learns the cell, the UE's capabilities, or the RLC settings beyond the mode. It carries nothing about the DU either. The CU-UP doesn't know where to send downlink data for DRB 1, because the DU hasn't been asked yet. That gap is why a Bearer Context Modification follows.

What does the CU-UP hand back? (frame 14)

Its own UE ID and two tunnel endpoints it allocated, 9.5 ms after the request.

FieldValueMeaning
gNB-CU-UP-UE-E1AP-ID0The CU-UP's ID for this UE; both IDs now name the context
nG-DL-UP-TNL-Information192.168.32.40, TEID 0x00000001Where the UPF must send downlink packets for session 1
uL-UP-Transport-Parameters (DRB 1)127.0.10.1, TEID 0x00000001Where the DU must send uplink packets for DRB 1
flow-Setup-ListQFI 1The QoS flow was accepted
✅ [00014] Frame 14 Bearer Context Setup Response 2025-09-17T08:51:04.146451Z gNB-CU-UP → gNB-CU-CP
frame : Frame 14: Packet, 58 bytes on wire (464 bits), 58 bytes captured (464 bits) on interface unknown, id 0
Section number : 1
Interface id : 0 (unknown)
Interface name : unknown
Encapsulation type : USER 6 (51)
Arrival Time : Sep 17, 2025 14:21:04.146451000 India Standard Time
UTC Arrival Time : Sep 17, 2025 08:51:04.146451000 UTC
Epoch Arrival Time : 1758099064.146451000
Time shift for this packet : 0.000000000 seconds
Time delta from previous captured frame : 9.507000 milliseconds
Time delta from previous displayed frame : 9.507000 milliseconds
Time since reference or first frame : 1 minute, 41.044594000 seconds
Frame Number : 14
Frame Length : 58 bytes (464 bits)
Capture Length : 58 bytes (464 bits)
Frame is marked : False
Frame is ignored : False
Protocols in frame : user_dlt:e1ap
Character encoding : ASCII (0)
user_dlt : DLT: 153, Payload: e1ap (E1 Application Protocol)
e1ap : E1 Application Protocol
0... .... Extension Bit : False
E1AP-PDU : successfulOutcome (1)
successfulOutcome
procedureCode : id-bearerContextSetup (8)
criticality : reject (0)
value
BearerContextSetupResponse
0... .... Extension Bit : False
protocolIEs : 3 items
Item 0 : id-gNB-CU-CP-UE-E1AP-ID
ProtocolIE-Field
id : id-gNB-CU-CP-UE-E1AP-ID (2)
criticality : reject (0)
value
GNB-CU-CP-UE-E1AP-ID : 0
Item 1 : id-gNB-CU-UP-UE-E1AP-ID
ProtocolIE-Field
id : id-gNB-CU-UP-UE-E1AP-ID (3)
criticality : reject (0)
value
GNB-CU-UP-UE-E1AP-ID : 0
Item 2 : id-System-BearerContextSetupResponse
ProtocolIE-Field
id : id-System-BearerContextSetupResponse (16)
criticality : ignore (1)
value
System-BearerContextSetupResponse : nG-RAN-BearerContextSetupResponse (1)
nG-RAN-BearerContextSetupResponse : 1 item
Item 0 : id-PDU-Session-Resource-Setup-List
ProtocolIE-Field
id : id-PDU-Session-Resource-Setup-List (46)
criticality : ignore (1)
value
PDU-Session-Resource-Setup-List : 1 item
Item 0
PDU-Session-Resource-Setup-Item
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (securityResult is NOT present)
..0. .... Optional Field Bit : False (pDU-Session-Data-Forwarding-Information-Response is NOT present)
...0 .... Optional Field Bit : False (nG-DL-UP-Unchanged is NOT present)
.... 0... Optional Field Bit : False (dRB-Failed-List-NG-RAN is NOT present)
.... .0.. Optional Field Bit : False (iE-Extensions is NOT present)
pDU-Session-ID : 1
nG-DL-UP-TNL-Information : gTPTunnel (0)
gTPTunnel
.0.. .... Extension Bit : False
..0. .... Optional Field Bit : False (iE-Extensions is NOT present)
...0 .... Extension Present Bit : False
transportLayerAddress : c0a82028 [bit length 32, 1100 0000 1010 1000 0010 0000 0010 1000 decimal value 3232243752]
IPv4 transportLayerAddress : 192.168.32.40
gTP-TEID : 00000001
dRB-Setup-List-NG-RAN : 1 item
Item 0
DRB-Setup-Item-NG-RAN
.... .0.. Extension Bit : False
.... ..0. Optional Field Bit : False (dRB-data-Forwarding-Information-Response is NOT present)
.... ...0 Optional Field Bit : False (flow-Failed-List is NOT present)
0... .... Optional Field Bit : False (iE-Extensions is NOT present)
.0.. .... Extension Present Bit : False
dRB-ID : 1
uL-UP-Transport-Parameters : 1 item
Item 0
UP-Parameters-Item
..0. .... Extension Bit : False
...0 .... Optional Field Bit : False (iE-Extensions is NOT present)
uP-TNL-Information : gTPTunnel (0)
gTPTunnel
.... .0.. Extension Bit : False
.... ..0. Optional Field Bit : False (iE-Extensions is NOT present)
.... ...0 Extension Present Bit : False
transportLayerAddress : 7f000a01 [bit length 32, 0111 1111 0000 0000 0000 1010 0000 0001 decimal value 2130708993]
IPv4 transportLayerAddress : 127.0.10.1
gTP-TEID : 00000001
0... .... Extension Present Bit : False
cell-Group-ID : 0
flow-Setup-List : 1 item
Item 0
QoS-Flow-Item
.0.. .... Extension Bit : False
..0. .... Optional Field Bit : False (iE-Extensions is NOT present)
qoS-Flow-Identifier : 1
Rendered from a Wireshark PCAP by VisualEther.

Frame 14, Bearer Context Setup Response. Under PDU-Session-Resource-Setup-Item, nG-DL-UP-TNL-Information is the CU-UP's N3 endpoint. Under DRB-Setup-Item-NG-RAN, uL-UP-Transport-Parameters is its F1-U endpoint for DRB 1. Both carry gTP-TEID 00000001.

Both endpoints are TEID 1, and they are different tunnels: one on N3, one on F1-U. A TEID has meaning only at the node that receives on it, so the same number on two interfaces names two unrelated tunnels. The response holds no security result, and none is expected: the CU-UP reports one only for a policy marked preferred. Under required it must apply the protection or reject the setup.

How does the F1-U tunnel get both ends? (frames 15–18)

Through the CU-CP, in two hops: the DU gets the CU-UP's endpoint in an F1 request, and the CU-UP gets the DU's in an E1 request. The DU and the CU-UP never exchange signaling directly.

sequenceDiagram accTitle: Wiring the F1-U tunnel accDescr: The CU-CP sends UE Context Modification Request to the DU with DRB 1 and the CU-UP's uplink endpoint, 127.0.10.1 TEID 1. The DU answers with its downlink endpoint, 127.0.10.2 TEID 1. The CU-CP sends Bearer Context Modification Request to the CU-UP with the DU's endpoint. The CU-UP confirms. participant DU as gNB-DU participant CP as gNB-CU-CP participant UP as gNB-CU-UP CP->>DU: [15] UE Context Modification Request (DRB 1, UL 127.0.10.1 TEID 1) DU-->>CP: [16] UE Context Modification Response (DL 127.0.10.2 TEID 1) CP->>UP: [17] Bearer Context Modification Request (DL 127.0.10.2 TEID 1) UP-->>CP: [18] Bearer Context Modification Response
Frames 15 to 18: the F1-U endpoints cross over through the CU-CP, 15.5 ms in all.

Frame 15: UE Context Modification Request. 0.35 ms after the CU-UP's response, the CU-CP asks the DU to add DRB 1 for QFI 1 in RLC acknowledged mode and gives it the CU-UP's F1-U uplink endpoint as uLUPTNLInformation: 127.0.10.1, TEID 0x00000001, copied from frame 14.

Frame 16: UE Context Modification Response. The DU sets up the bearer and allocates its downlink endpoint, dLUPTNLInformation: 127.0.10.2, TEID 0x00000001. This takes 14.7 ms, the slowest step inside the gNB.

Frame 17: Bearer Context Modification Request. 0.3 ms later the CU-CP passes the DU's endpoint to the CU-UP as dL-UP-Parameters for DRB 1. Now the CU-UP knows where to send downlink PDCP PDUs.

Frame 18: Bearer Context Modification Response. The CU-UP confirms 0.43 ms later. The whole E1 part, from frame 13 to here, takes 25.2 ms.

The order is forced, not chosen. Each node allocates the endpoint it receives on, so the DU can't give its endpoint until it has the bearer, and the CU-UP can't send downlink data until the DU has given it. One E1 round trip creates the context; a second completes it.

How does each TEID travel across the interfaces?

Every endpoint is allocated once, by the node that receives on it, and copied verbatim from message to message until the sender has it. The main run shows all four:

EndpointAllocated byFirst appearsCopied intoUsed on the wire
NG-U UL: 192.168.32.45, TEID 0x0000802bUPFFrame 12, NGAP requestFrame 13, E1 setup requestNot captured: the N3 file holds downlink only
NG-U DL: 192.168.32.40, TEID 0x00000001CU-UPFrame 14, E1 setup responseFrame 21, NGAP responseFrame 22 and all 7,977 N3 frames
F1-U UL: 127.0.10.1, TEID 0x00000001CU-UPFrame 14, E1 setup responseFrame 15, F1 requestNot captured: the run has no F1-U file
F1-U DL: 127.0.10.2, TEID 0x00000001DUFrame 16, F1 responseFrame 17, E1 modification requestNot captured: the run has no F1-U file
flowchart LR accTitle: Tunnel endpoints of one PDU session across the split gNB accDescr: The DU sends uplink data to the CU-UP at 127.0.10.1 TEID 1, an endpoint the CU-UP allocated and the DU learned in F1 frame 15. The CU-UP sends downlink data to the DU at 127.0.10.2 TEID 1, which the DU allocated and the CU-UP learned in E1 frame 17. The CU-UP sends uplink data to the UPF at 192.168.32.45 TEID 0x802b, which the UPF allocated and the CU-UP learned in E1 frame 13. The UPF sends downlink data to the CU-UP at 192.168.32.40 TEID 1, which the CU-UP allocated and the AMF learned in NGAP frame 21. DU["gNB-DU"] CUUP["gNB-CU-UP"] UPF["UPF"] DU -->|"F1-U UL · 127.0.10.1 TEID 1 · learned in frame 15"| CUUP CUUP -->|"F1-U DL · 127.0.10.2 TEID 1 · learned in frame 17"| DU CUUP -->|"NG-U UL · 192.168.32.45 TEID 0x802b · learned in frame 13"| UPF UPF -->|"NG-U DL · 192.168.32.40 TEID 1 · learned via frame 21"| CUUP
The four tunnel endpoints of PDU session 1 in the main run. Each arrow points at the node that receives on that endpoint; its label names the endpoint and the frame that carried it toward the sender. The CU-CP relays all four and uses none.

The downlink NG-U endpoint is the one the captures prove end to end. The CU-UP allocates it in frame 14, the CU-CP reports it to the AMF in frame 21, and 5.9 ms later the first downlink packet arrives on N3 with TEID 0x00000001 (frame 22). Its GTP-U header carries a PDU Session Container with QFI 1 (TS 38.415), and the IP packet inside is addressed to 10.45.0.2, the address assigned in frame 12.

Does the UE get the same PDCP settings?

Yes. PDCP runs at both ends of the radio bearer, in the CU-UP and in the UE, and the two must agree. The CU-CP configures both: the CU-UP over E1 (frame 13) and the UE in the RRC Reconfiguration (frame 19).

SettingE1, frame 13RRC, frame 19
DRB11
QoS flow on the DRBQFI 1, default DRBQFI 1, defaultDRB: True
SDAP header UL / DLabsent / absentabsent / absent
PDCP SN size UL / DL18 / 18 bits18 / 18 bits
t-Reordering220 ms220 ms
Discard timerinfinityinfinity
Integrity protectionnot needednot configured

The RRC Reconfiguration also carries the NAS PDU Session Establishment Accept. The UE confirms 272 ms later (frame 20), and the CU-CP answers the AMF 0.1 ms after that (frame 21).

How long does each step take?

All four capture files come from one process with one clock, so cross-interface intervals are meaningful. Times are from the main run, measured from the AMF's request:

StepFrameTimeStep time
PDU Session Resource Setup Request120
Bearer Context Setup Request130.4 ms0.4 ms
Bearer Context Setup Response149.9 ms9.5 ms
UE Context Modification Request1510.3 ms0.4 ms
UE Context Modification Response1624.9 ms14.7 ms
Bearer Context Modification Request1725.2 ms0.3 ms
Bearer Context Modification Response1825.6 ms0.4 ms
RRC Reconfiguration1926.2 ms0.6 ms
RRC Reconfiguration Complete20298.0 ms271.8 ms
PDU Session Resource Setup Response21298.1 ms0.1 ms
First downlink packet on N322304.0 ms5.9 ms

The gNB spends 26 ms on its own work and then 272 ms waiting for the UE. That wait is the satellite: the cell runs through an emulated geostationary satellite with a round trip of about 244 ms, as the GEO walkthrough shows. Without the satellite, the comparison run's UE answers in 38 ms. Because every part of the gNB here runs in one process, the E1 and F1 steps measure software, not a network; a deployment with separate nodes would add its transport delay to each.

Traps for first-time readers

How is a CU-CP-initiated E1 Setup different? (frames 1–11)

The comparison run starts E1 from the other side and then runs the same bearer context procedures. It comes from srsRAN issue #1213, a 2023 report of downlink data stalling 10 to 20 s after registration; the issue's reporter attached the gNB's E1AP, F1AP, and MAC captures. The gNB ran with srsUE, srsRAN's software UE, over ZeroMQ instead of radio. We merged the E1AP and F1AP files the same way: all 5 E1AP frames and 6 of 22 F1AP frames.

sequenceDiagram accTitle: The comparison run on E1 and F1 accDescr: The CU-CP sends gNB-CU-CP E1 Setup Request to the CU-UP, and no response is captured. The DU sends F1 Setup Request and receives F1 Setup Response. Later the CU-CP sends Bearer Context Setup Request and receives the response, sends UE Context Modification Request to the DU and receives its response, sends Bearer Context Modification Request to the CU-UP and receives its response, then sends RRC Reconfiguration and receives RRC Reconfiguration Complete. participant DU as gNB-DU participant CP as gNB-CU-CP participant UP as gNB-CU-UP CP->>UP: [1] gNB-CU-CP E1 Setup Request (srs_cu_cp) Note over CP,UP: no response in the capture DU->>CP: [2] F1 Setup Request (srsdu1) CP-->>DU: [3] F1 Setup Response CP->>UP: [4] Bearer Context Setup Request UP-->>CP: [5] Bearer Context Setup Response CP->>DU: [6] UE Context Modification Request DU-->>CP: [7] UE Context Modification Response CP->>UP: [8] Bearer Context Modification Request UP-->>CP: [9] Bearer Context Modification Response CP->>DU: [10] RRC Reconfiguration DU->>CP: [11] RRC Reconfiguration Complete
The comparison run: E1 Setup from the CU-CP with no response captured, F1 Setup 0.46 s later, then the bearer context and F1-U wiring, 4.6 ms for the four bearer context messages.

Frame 1: gNB-CU-CP E1 Setup Request. Here the CU-CP introduces itself (srs_cu_cp, Transaction ID 0), and the CU-UP is expected to answer with its own identity. The capture has no response, so it can't prove E1 came up, though the bearer context exchange below wouldn't run on an interface that hadn't.

Which side starts is fixed by transport, not by role, as in the main run's E1 Setup (§8.2.3.1 and §8.2.4.1). The two procedures carry the same kind of information in opposite directions.

The rest follows the main run's pattern, with different values:

Main run (2025, issue #1347)Comparison run (2023, issue #1213)
E1 Setup started byCU-UP, response capturedCU-CP, no response captured
UE's data network and addressinternet, 10.45.0.2ims, 10.46.0.11
QoS flowQFI 1, 5QI 9QFI 5, 5QI 5 (IMS signaling)
PDCP SN size, t-Reordering18 bits, 220 ms12 bits, 80 ms
User-plane security policyintegrity not needed, ciphering requiredintegrity required, ciphering required
NG-U UL (UPF)192.168.32.45, TEID 0x0000802b172.42.42.30, TEID 0x4fe401fa
NG-U DL (CU-UP)192.168.32.40, TEID 0x00000001172.42.42.10, TEID 0x00000001
F1-U UL (CU-UP)127.0.10.1, TEID 0x00000001172.42.42.10, TEID 0x00000000
F1-U DL (DU)127.0.10.2, TEID 0x00000001127.0.0.1, TEID 0x00000000
E1 time, setup request to modification response25.2 ms4.6 ms
UE's RRC Reconfiguration round trip272 ms (GEO satellite)38 ms (ZeroMQ)

The F1-U endpoints in the comparison run use TEID 0. GTP-U reserves TEID 0 for path management and error messages such as Echo and Error Indication. TS 29.281 §5.1 says a node shall not assign it to its own tunnel endpoint, though a receiver must accept a peer that does.

Which setting contradicts itself?

The user-plane integrity policy. In frame 4 the CU-CP tells the CU-UP that integrity protection is required for PDU session 1. In frame 10 it tells the UE, in the RRC Reconfiguration, how to run PDCP on DRB 1, and that PDCP configuration has no integrityProtection field, so integrity protection is off for the DRB. That breaks two rules. Under required, E1AP §8.3.1.2 says the CU-UP shall apply integrity protection or reject the setup, and TS 33.501 §6.6.1 says the gNB shall not overrule a required policy. The CU-UP accepted (frame 5), so it was told to protect data that the UE, as configured, won't protect. A security result wouldn't settle it: the CU-UP sends one only for preferred policies. The bug the issue reported, downlink data stopping, was traced in the thread to the DU's scheduler, not to this.

How to analyze E1AP in Wireshark

What the captures prove, and what they can't

They prove the shape of a CU-CP/CU-UP bearer setup on real messages: the order of the four procedures on three interfaces, the content of each E1AP message, and where every tunnel endpoint comes from. In the main run they also show one endpoint in use: the downlink NG-U TEID the CU-UP allocated arrives on N3 6 ms after the session is set up. Both runs show the RRC configuration matching what E1 told the CU-UP, except for the comparison run's integrity setting.

They can't show transport. Every interface here is internal to one srsRAN process, written without IP or SCTP, so they say nothing about E1 over a real network: association setup, the SCTP payload protocol identifier, or IPsec. The uplink endpoints never appear in data, because the main run's N3 file holds only downlink and neither run has an F1-U capture. Neither run releases the bearer context. And the comparison run lacks the E1 Setup Response and any NGAP, so its UPF endpoint can't be checked against the core's request.

Takeaways

  1. The CU-CP decides; the CU-UP carries. Every setting in a bearer context, from keys to PDCP timers, is chosen by the CU-CP and sent over E1.
  2. E1 Setup can start from either side. The main run's CU-UP starts it; the comparison run's CU-CP does. E1AP has a procedure for each.
  3. The CU-UP gets keys, not key material. It receives KUPenc and KUPint, which E1AP calls keys generated by the CU-CP (§9.3.1.32), never K_gNB.
  4. Every tunnel endpoint is allocated by its receiver and copied verbatim through the CU-CP until the sender has it.
  5. Bearer Context Modification completes F1-U. The CU-UP can't learn the DU's downlink endpoint until the DU has the bearer, so a second E1 exchange always follows.
  6. Read a TEID with its address and interface. TEID 1 names three different endpoints in one PDU session here.
  7. Check E1 against RRC. The PDCP settings must match at both ends; in the comparison run the integrity policy doesn't.