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 (srsRAN issue #1347, 17 September 2025; 24 frames): N2, E1, and F1 come up; then one PDU session is set up across all of them, ending with the first downlink packet on N3. We merged four per-interface captures into one diagram; a section below explains how.
- The comparison run (srsRAN issue #1213, 30 August 2023; 11 frames): the same procedures on E1 and F1 only, with E1 Setup started from the other side, and one setting that contradicts itself.
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:
- gNB-CU-CP (central unit, control plane) runs RRC, the radio resource control protocol that configures the UE, and the PDCP instance that protects RRC messages. It terminates NGAP, the N2 signaling to the core's access and mobility management function (AMF), and F1AP, the control signaling to the DU. It makes every decision: which bearers exist, their settings, and their security.
- gNB-CU-UP (central unit, user plane) runs SDAP, which maps QoS flows onto radio bearers, and the PDCP instance that ciphers and numbers user data. It terminates N3 toward the core's user plane function (UPF) and F1-U toward the DU. It decides almost nothing, but it holds the data path.
- gNB-DU (distributed unit) runs RLC, MAC, and the physical layer, as in the F1AP article.
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.
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.
E1AP messages come in two families, like F1AP's:
| Family | In these captures | Keyed by |
|---|---|---|
| Interface management | gNB-CU-UP E1 Setup, gNB-CU-CP E1 Setup | A Transaction ID |
| Bearer context management | Bearer Context Setup, Bearer Context Modification | The 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.
| Phase | Frames | Interfaces | What happens |
|---|---|---|---|
| Interface setup | 1 to 6 | N2, E1, F1 | NG Setup, gNB-CU-UP E1 Setup, F1 Setup, within 45 ms |
| UE security context | 7 to 10 | N2, F1 | The AMF hands over K_gNB; the CU-CP builds the UE's context on the DU |
| PDU session request | 11 to 12 | N2 | The UE asks for a session; the AMF asks the gNB for it |
| Bearer context | 13 to 14 | E1 | The CU-CP sets up the bearer; the CU-UP returns two tunnel endpoints |
| F1-U wiring | 15 to 18 | F1, E1 | The DU gets the CU-UP's endpoint; the CU-UP gets the DU's |
| UE reconfiguration | 19 to 20 | F1 | The UE gets the new DRB |
| Session answer and data | 21 to 22 | N2, N3 | The AMF gets the gNB's endpoint; the first packet arrives |
| Teardown | 23 to 24 | F1 | F1 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:
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.
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:
| Field | Value | Meaning |
|---|---|---|
TransactionID | 0 | Pairs the response with this request |
gNB-CU-UP-ID | 0 | The CU-UP's identity within this gNB |
gNB-CU-UP-Name | srs_cu_up_0 | An optional readable name |
CNSupport | c-5gc | It serves a 5G core (the alternative is an LTE core, for EN-DC) |
SupportedPLMNs | 00f110 | MCC 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).
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:
| Field | Value | Meaning |
|---|---|---|
gNB-CU-CP-UE-E1AP-ID | 0 | The CU-CP's ID for this UE on E1 |
cipheringAlgorithm | nEA0 | Null ciphering for user data |
integrityProtectionAlgorithm | i-128-NIA2 | AES-based integrity, if integrity is used |
encryptionKey, integrityProtectionKey | 256-bit keys | KUPenc and KUPint, in clear |
UEDLAggregateMaximumBitRate | 1 Gbit/s | The UE's downlink cap across all its sessions |
UE-Inactivity-Timer | 7200 s | How long the CU-UP waits before it reports the UE as inactive; 7200 s is the maximum the IE allows |
ActivityNotificationLevel | ue | Report activity per UE, not per DRB or session |
pDU-Session-ID, type | 1, ipv4 | The session from NGAP |
sNSSAI | SST 1, SD 010203 | The slice from NGAP |
securityIndication | integrity not-needed, confidentiality required | The 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-Information | 192.168.32.45, TEID 0x0000802b | Where to send uplink packets: the UPF's endpoint from NGAP, unchanged |
dRB-ID | 1 | The data radio bearer to create |
sDAP-Configuration | default DRB, no SDAP header UL or DL | With one QoS flow on the DRB, no per-packet QFI is needed over the air |
pDCP-Configuration | 18-bit SN, RLC AM, t-Reordering 220 ms, discard timer infinity | The PDCP settings the CU-UP must run |
qos-flow-Information-To-Be-Setup | QFI 1, 5QI 9, ARP priority 8 | The QoS flow mapped onto DRB 1, with the allocation and retention priority from NGAP |
frame : Frame 13: Packet, 158 bytes on wire (1264 bits), 158 bytes captured (1264 bits) on interface unknown, id 0
Interface id : 0 (unknown)
e1ap : E1 Application Protocol
E1AP-PDU : initiatingMessage (0)
initiatingMessage
value
BearerContextSetupRequest
protocolIEs : 7 items
Item 0 : id-gNB-CU-CP-UE-E1AP-ID
ProtocolIE-Field
value
Item 1 : id-SecurityInformation
ProtocolIE-Field
value
SecurityInformation
securityAlgorithm
uPSecuritykey
Item 2 : id-UEDLAggregateMaximumBitRate
ProtocolIE-Field
value
Item 3 : id-Serving-PLMN
ProtocolIE-Field
value
PLMN-Identity : 00f110
Item 4 : id-ActivityNotificationLevel
ProtocolIE-Field
value
Item 5 : id-UE-Inactivity-Timer
ProtocolIE-Field
value
Item 6 : id-System-BearerContextSetupRequest
ProtocolIE-Field
value
System-BearerContextSetupRequest : nG-RAN-BearerContextSetupRequest (1)
nG-RAN-BearerContextSetupRequest : 1 item
Item 0 : id-PDU-Session-Resource-To-Setup-List
ProtocolIE-Field
value
PDU-Session-Resource-To-Setup-List : 1 item
Item 0
PDU-Session-Resource-To-Setup-Item
sNSSAI
securityIndication
nG-UL-UP-TNL-Information : gTPTunnel (0)
gTPTunnel
transportLayerAddress : c0a8202d [bit length 32, 1100 0000 1010 1000 0010 0000 0010 1101 decimal value 3232243757]
dRB-To-Setup-List-NG-RAN : 1 item
Item 0
DRB-To-Setup-Item-NG-RAN
sDAP-Configuration
pDCP-Configuration
t-ReorderingTimer
cell-Group-Information : 1 item
Item 0
Cell-Group-Information-Item
qos-flow-Information-To-Be-Setup : 1 item
Item 0
QoS-Flow-QoS-Parameter-Item
qoSFlowLevelQoSParameters
qoS-Characteristics : non-Dynamic-5QI (0)
non-Dynamic-5QI
nGRANallocationRetentionPriority
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.
| Field | Value | Meaning |
|---|---|---|
gNB-CU-UP-UE-E1AP-ID | 0 | The CU-UP's ID for this UE; both IDs now name the context |
nG-DL-UP-TNL-Information | 192.168.32.40, TEID 0x00000001 | Where the UPF must send downlink packets for session 1 |
uL-UP-Transport-Parameters (DRB 1) | 127.0.10.1, TEID 0x00000001 | Where the DU must send uplink packets for DRB 1 |
flow-Setup-List | QFI 1 | The QoS flow was accepted |
frame : Frame 14: Packet, 58 bytes on wire (464 bits), 58 bytes captured (464 bits) on interface unknown, id 0
Interface id : 0 (unknown)
e1ap : E1 Application Protocol
E1AP-PDU : successfulOutcome (1)
successfulOutcome
value
BearerContextSetupResponse
protocolIEs : 3 items
Item 0 : id-gNB-CU-CP-UE-E1AP-ID
ProtocolIE-Field
value
Item 1 : id-gNB-CU-UP-UE-E1AP-ID
ProtocolIE-Field
value
Item 2 : id-System-BearerContextSetupResponse
ProtocolIE-Field
value
System-BearerContextSetupResponse : nG-RAN-BearerContextSetupResponse (1)
nG-RAN-BearerContextSetupResponse : 1 item
Item 0 : id-PDU-Session-Resource-Setup-List
ProtocolIE-Field
value
PDU-Session-Resource-Setup-List : 1 item
Item 0
PDU-Session-Resource-Setup-Item
nG-DL-UP-TNL-Information : gTPTunnel (0)
gTPTunnel
transportLayerAddress : c0a82028 [bit length 32, 1100 0000 1010 1000 0010 0000 0010 1000 decimal value 3232243752]
dRB-Setup-List-NG-RAN : 1 item
Item 0
DRB-Setup-Item-NG-RAN
uL-UP-Transport-Parameters : 1 item
Item 0
UP-Parameters-Item
uP-TNL-Information : gTPTunnel (0)
gTPTunnel
transportLayerAddress : 7f000a01 [bit length 32, 0111 1111 0000 0000 0000 1010 0000 0001 decimal value 2130708993]
flow-Setup-List : 1 item
Item 0
QoS-Flow-Item
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.
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:
| Endpoint | Allocated by | First appears | Copied into | Used on the wire |
|---|---|---|---|---|
NG-U UL: 192.168.32.45, TEID 0x0000802b | UPF | Frame 12, NGAP request | Frame 13, E1 setup request | Not captured: the N3 file holds downlink only |
NG-U DL: 192.168.32.40, TEID 0x00000001 | CU-UP | Frame 14, E1 setup response | Frame 21, NGAP response | Frame 22 and all 7,977 N3 frames |
F1-U UL: 127.0.10.1, TEID 0x00000001 | CU-UP | Frame 14, E1 setup response | Frame 15, F1 request | Not captured: the run has no F1-U file |
F1-U DL: 127.0.10.2, TEID 0x00000001 | DU | Frame 16, F1 response | Frame 17, E1 modification request | Not captured: the run has no F1-U file |
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).
| Setting | E1, frame 13 | RRC, frame 19 |
|---|---|---|
| DRB | 1 | 1 |
| QoS flow on the DRB | QFI 1, default DRB | QFI 1, defaultDRB: True |
| SDAP header UL / DL | absent / absent | absent / absent |
| PDCP SN size UL / DL | 18 / 18 bits | 18 / 18 bits |
| t-Reordering | 220 ms | 220 ms |
| Discard timer | infinity | infinity |
| Integrity protection | not needed | not 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:
| Step | Frame | Time | Step time |
|---|---|---|---|
| PDU Session Resource Setup Request | 12 | 0 | |
| Bearer Context Setup Request | 13 | 0.4 ms | 0.4 ms |
| Bearer Context Setup Response | 14 | 9.9 ms | 9.5 ms |
| UE Context Modification Request | 15 | 10.3 ms | 0.4 ms |
| UE Context Modification Response | 16 | 24.9 ms | 14.7 ms |
| Bearer Context Modification Request | 17 | 25.2 ms | 0.3 ms |
| Bearer Context Modification Response | 18 | 25.6 ms | 0.4 ms |
| RRC Reconfiguration | 19 | 26.2 ms | 0.6 ms |
| RRC Reconfiguration Complete | 20 | 298.0 ms | 271.8 ms |
| PDU Session Resource Setup Response | 21 | 298.1 ms | 0.1 ms |
| First downlink packet on N3 | 22 | 304.0 ms | 5.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
- The same TEID means different things. In the main run TEID 1 names three different endpoints: the CU-UP's N3 endpoint, the CU-UP's F1-U endpoint, and the DU's F1-U endpoint (frame 22 uses the first). Always read a TEID together with its address and its interface.
- The direction in a field name is the traffic's, not the message's.
uL-UP-Transport-Parametersin the CU-UP's response (frame 14) is the CU-UP's own endpoint, for uplink traffic it will receive.dL-UP-Parametersin the CU-CP's request (frame 17) is the DU's endpoint, for downlink traffic the CU-UP will send. - The modification response returns an endpoint nobody can use. In frame 18 the CU-UP returns UL UP parameters of 0.0.0.0 with TEID 0. The IE is optional and, when present, announces a new uplink endpoint; with nothing changed it should be left out. TEID 0 isn't a valid endpoint either (TS 29.281 §5.1), so read it as an srsRAN placeholder. The real F1-U uplink endpoint is still the one from frame 14. The comparison run does the same, two years earlier.
- Ciphering "required" with a null cipher. The policy says user-plane confidentiality is required, but the algorithm is NEA0. Ciphering is nominally active, with an all-zero keystream, so the data travels in clear. The specs don't say whether NEA0 satisfies a
requiredconfidentiality policy. - The keys travel in clear. KUPenc and KUPint sit readable in frame 13 because these captures were taken inside the gNB, before any transport security. TS 33.501 requires E1 to be confidentiality-, integrity-, and replay-protected (§5.3.10), and both nodes must support IPsec and DTLS for it (§9.8.3), but whether to use them is the operator's decision. Anyone who reads an unprotected E1 gets the keys.
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.
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 by | CU-UP, response captured | CU-CP, no response captured |
| UE's data network and address | internet, 10.45.0.2 | ims, 10.46.0.11 |
| QoS flow | QFI 1, 5QI 9 | QFI 5, 5QI 5 (IMS signaling) |
| PDCP SN size, t-Reordering | 18 bits, 220 ms | 12 bits, 80 ms |
| User-plane security policy | integrity not needed, ciphering required | integrity required, ciphering required |
| NG-U UL (UPF) | 192.168.32.45, TEID 0x0000802b | 172.42.42.30, TEID 0x4fe401fa |
| NG-U DL (CU-UP) | 192.168.32.40, TEID 0x00000001 | 172.42.42.10, TEID 0x00000001 |
| F1-U UL (CU-UP) | 127.0.10.1, TEID 0x00000001 | 172.42.42.10, TEID 0x00000000 |
| F1-U DL (DU) | 127.0.10.2, TEID 0x00000001 | 127.0.0.1, TEID 0x00000000 |
| E1 time, setup request to modification response | 25.2 ms | 4.6 ms |
| UE's RRC Reconfiguration round trip | 272 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
- Map the link types. srsRAN writes E1AP on DLT_USER 6 (link type 153), F1AP on 7 (154), NGAP on 5 (152), and N3 GTP-U on 9 (156). Add a DLT_USER row for each (Preferences, Protocols, DLT_USER), or on the command line:
-o 'uat:user_dlts:"User 6 (DLT=153)","e1ap","0","","0",""', and the same forf1ap,ngap, andgtp. Several-o uat:user_dlts:options add several rows. VisualEther'sanalyze_capturefound only the NGAP mapping on the merged file, so set all four explicitly. - Merge interfaces on one timeline.
mergecap -w merged.pcapng gnb_e1ap.pcap gnb_f1ap.pcap gnb_ngap.pcap gnb_n3.pcapinterleaves the files by timestamp and keeps each file's link type. It means something only when the files share a clock, as srsRAN's do. - Filter by message. Each E1AP message has its own field:
e1ap.BearerContextSetupRequest_element,e1ap.BearerContextModificationRequest_element,e1ap.GNB_CU_UP_E1SetupRequest_element, and so on.e1ap.procedureCode == 8selects both halves of Bearer Context Setup (9 is Modification, 3 gNB-CU-UP E1 Setup, 4 gNB-CU-CP E1 Setup). - Follow a tunnel.
e1ap.gTP_TEID,f1ap.gTP_TEID, andngap.gTP_TEIDhold the TEIDs as hex, andgtp.teidon N3 as a number. The addresses aree1ap.transportLayerAddressIPv4,f1ap.transportLayerAddressIPv4, andngap.TransportLayerAddressIPv4. To tell which endpoint a TEID belongs to, expand its parent:nG-UL-UP-TNL-Information,nG-DL-UP-TNL-Information,uL-UP-Transport-Parameters, ordL-UP-Parameters. - Read the NAS inside. The PDU session's NAS messages are protected with 5G-EA0 here, so
-o nas-5gs.null_decipher:TRUEdecodes them. Turn it on only when the Security Mode Command shows 5G-EA0; with a real cipher it decodes garbage.
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
- 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.
- 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.
- 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.
- Every tunnel endpoint is allocated by its receiver and copied verbatim through the CU-CP until the sender has it.
- 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.
- Read a TEID with its address and interface. TEID 1 names three different endpoints in one PDU session here.
- Check E1 against RRC. The PDCP settings must match at both ends; in the comparison run the integrity policy doesn't.