GTP-U (User-Plane Transport) in 5G NR
Tunnelling user data over N3 and F1-U with GTP-U and the PDU session container.
Every byte a UE sends or receives on the internet has to cross a transport network of routers that know nothing about UEs, bearers, or QoS. GTP-U is the wrapper that carries that user traffic across those routers intact: it takes the UE's original IP packet, stamps it with a tunnel identity and a QoS marking, and ships the whole thing over ordinary UDP/IP. Get GTP-U right and user data reaches the correct PDU session and the correct QoS flow every time; get it wrong and packets either vanish into the wrong tunnel or arrive stripped of the treatment they were promised. It is defined in TS 29.281, with the 5G-specific extension header defined in TS 38.415.
Introduction
GTP-U (GPRS Tunnelling Protocol, user-plane part) is the protocol that actually moves your data across the 5G user plane. It is not a radio protocol and not a core-network signalling protocol — it is a transport-level tunnel that sits on top of plain UDP/IP and carries a UE's traffic between two user-plane nodes as if there were a private pipe between them. Whenever you open a web page over 5G, every packet in both directions spends part of its life encapsulated inside GTP-U.
In the UE/network lifecycle GTP-U comes into play the moment a PDU session is established. The control plane (NGAP on N2, session management via the SMF) negotiates the tunnel endpoints and their identities; from then on, user data flows through GTP-U tunnels between the gNB and the UPF on N3, inside a split gNB on F1-U, and briefly between gNBs on Xn-U during handover. The tunnel lives as long as the session (or the bearer) does.
It matters because GTP-U is where 5G's promises about reachability and quality of service become bytes on a wire. The tunnel identity (TEID) is what guarantees a packet lands in the right session at the right node; the QoS marking (QFI) is what guarantees that packet gets the treatment it was provisioned for, even though the routers in between are completely QoS-agnostic. Understand GTP-U and you understand how the user plane keeps its promises across an ordinary IP backhaul.
On this page
Why GTP-U is needed
In plain words: think of GTP-U as the shipping container of the mobile network. Your data is the goods inside; the container is a standard box with a shipping label (the TEID) and a handling sticker (the QFI). The trucks and ports along the way — the transport routers — never open the box or care what is inside; they just read the outer label and forward it. Only the warehouse at each end (the gNB and the UPF) opens the container, checks the sticker, and delivers the goods to the right shelf.
The concrete problem GTP-U solves is that a UE's packet cannot simply be routed across the operator's backhaul on its own. The backhaul is a general-purpose IP network whose routers are addressed to the transport nodes, not to individual UEs; they have no notion of PDU sessions, radio bearers, or 5G QoS flows. If you handed them the UE's raw IP packet they would not know which session it belonged to, which QoS it deserved, or even that it was mobile-subscriber traffic at all.
GTP-U fixes this with encapsulation. The tunnel endpoint wraps the UE's packet in a new outer packet addressed to the peer endpoint's transport IP, and into the wrapper it writes the two things the transport cannot preserve on its own: a TEID so the receiver knows exactly which tunnel context (session, UE, direction) the packet belongs to, and, on N3, a QFI so the receiver knows which QoS flow to give it. Everything the RAN and core need travels inside the wrapper, so the transport can stay simple and QoS-agnostic while 5G still delivers differentiated, per-session treatment end to end.
What GTP-U Is and Why It Exists
GTP-U — the GPRS Tunnelling Protocol, user-plane part — is a tunnelling protocol that runs between two user-plane endpoints and carries user data packets between them. The name is a leftover from GPRS/EPC, but the 5G core and NR RAN reuse the same protocol almost unchanged, adding one new extension header for QoS. In 5G you find GTP-U on three interfaces: N3 between the gNB and the UPF, F1-U between the DU and the CU-UP inside a split gNB, and Xn-U for data forwarding between gNBs during handover.
A user-plane tunnelling protocol carried over UDP port 2152. It encapsulates a user's IP (or Ethernet) packet inside a GTP-U header plus outer UDP/IP so the packet can be routed across a transport network that has no knowledge of the UE.
A UE's data must reach the right PDU session and the right QoS flow after crossing an IP backhaul that only understands the outer transport addresses. GTP-U gives each flow a tunnel identity (the TEID) and a place to carry QoS marking (the QFI), so both survive the transport unchanged.
Each direction of each tunnel has a TEID chosen by the receiver. The sender writes the peer's TEID into the GTP-U header, attaches the PDU Session Container extension header carrying the QFI, and sends the encapsulated packet to the peer's transport IP address on UDP:2152.
The core idea is encapsulation. The UE's real packet — whatever it is, an HTTPS request, a video frame, a DNS query — becomes the payload of a brand-new packet. That new packet's destination is not the UE and not the far-end server; it is the transport address of the tunnel's other end (the UPF's N3 address in the uplink, the gNB's N3 address in the downlink). The routers in between forward it like any other UDP datagram. Only at the tunnel endpoints is the outer wrapper removed and the inner packet recovered. This is why the transport network can be a plain, QoS-agnostic IP fabric and still deliver 5G's differentiated treatment: everything the RAN and core need to know travels inside the GTP-U header, not in the routers.
One tunnel per direction, receiver-assigned identity: the TEID is chosen by the receiving end and signalled to the peer during setup (e.g. in the NGAP UP Transport Layer Information for N3). Uplink and downlink of the same PDU session therefore use different TEIDs, because each direction has a different receiver.
Encapsulation over UDP/IP
Before looking at individual header fields, it helps to see the full stack of headers wrapped around one user packet on N3. Reading from the outside in: an outer IP header (transport addresses of the two tunnel endpoints), a UDP header with destination port 2152, the GTP-U header carrying the TEID, an optional PDU Session Container extension header carrying the QFI, and finally the original UE packet as payload.
Two consequences fall out of this picture. First, the transport MTU has to allow for the added overhead — roughly 8 bytes of GTP-U, 4 or more for the extension header, 8 for UDP and 20/40 for outer IP — which is why operators size N3/F1-U links with jumbo frames or configure fragmentation carefully. Second, because the inner packet is opaque payload, the transport cannot read or act on the UE's own DSCP; any differentiation the transport applies must be driven from the outer header, typically by the endpoint copying a DSCP derived from the QFI onto the outer IP header.
The GTP-U Header
Every GTP-U packet begins with a mandatory 8-byte header, optionally followed by a sequence number, an N-PDU number, and one or more extension headers. The fields that matter day to day:
| Field | Size | Meaning |
|---|---|---|
Version | 3 bits | Always 1 for GTPv1-U. |
PT (Protocol Type) | 1 bit | 1 = GTP (as opposed to the old GTP' charging protocol). |
E / S / PN flags | 1 bit each | Signal the presence of an extension header (E), a sequence number (S), and an N-PDU number (PN) in the optional part. |
Message Type | 1 byte | What the packet is: G-PDU (255, a data packet), Echo Request/Echo Response, Error Indication, End Marker, and so on. |
Length | 2 bytes | Number of bytes after the first 8 mandatory bytes (i.e. optional fields + extension headers + payload). |
TEID | 4 bytes | 32-bit Tunnel Endpoint Identifier — selects the receiving tunnel context, i.e. which bearer / PDU-session direction this packet belongs to at the receiver. |
Sequence Number | 2 bytes | Present when the S flag is set. Used for in-order delivery on tunnels that need it and to match Echo/Error Indication requests with responses. |
Next Extension Header Type | 1 byte | Present when the E flag is set; identifies the first extension header — this is how the 5G PDU Session Container is attached. |
The TEID is the heart of the protocol. It is not a globally unique identifier and it carries no structure the receiver has to parse — it is simply an index the receiver handed out at setup so that, when a packet arrives, a single lookup on the TEID resolves the full context: which PDU session, which UE, which peer, and what to do next. Because the receiver picks it, the two ends of a tunnel almost always use different TEID values, and the same session's uplink and downlink use different values again. When a packet arrives for a TEID the receiver has never allocated (or has since released), the receiver cannot process it — and that condition is exactly what triggers an Error Indication, described below.
The extension header mechanism is a small chained list. When the E flag is set, the mandatory header is followed by a Next Extension Header Type byte; each extension header ends with its own Next Extension Header Type, and a value of 0 terminates the chain. This chaining is how 3GPP added the 5G QoS container without changing the base header format — older nodes that don't understand a given extension header type are told, by a two-bit comprehension-required flag in the type value, whether they may skip it or must discard the packet.
Message Types and Path Management
Although GTP-U's main job is carrying data (the G-PDU), it also carries a handful of control messages that manage the tunnels and the path itself, so no separate signalling protocol is needed on the user plane.
| Message | Type | Purpose |
|---|---|---|
Echo Request | 1 | Path keepalive probe sent to a peer's UDP:2152. |
Echo Response | 2 | Reply to an Echo Request; carries the Recovery IE (restart counter). |
Error Indication | 26 | Sent when a G-PDU arrives for an unknown TEID; returns the offending TEID and peer address. |
Supported Extension Headers Notification | 31 | Lists the extension header types the sender supports. |
End Marker | 254 | Marks the last packet forwarded on an old path during a path switch. |
G-PDU | 255 | A user-data packet; payload is the encapsulated UE packet. |
The G-PDU is the workhorse: Message Type = 255, and its payload is the UE's original packet. The receiver reads the TEID, finds the tunnel context, strips the GTP-U/UDP/IP encapsulation, reads the QFI from the extension header, and hands the inner packet on. Everything else in the table is control plumbing.
Echo Request/Echo Response— a keepalive between two GTP-U peers. A node periodically sends anEcho Requestto each peer it has tunnels with; if a series go unanswered, the path is declared down and the affected tunnels are torn down. TheEcho Responsecarries aRecoveryIE holding a restart counter: if a peer reboots and comes back with a higher counter, the receiver learns that all contexts on that peer were lost and cleans up its stale tunnels. This is the primary path management mechanism.Error Indication— sent when aG-PDUarrives with aTEIDthat has no matching context at the receiver, typically because the bearer or session was released while the sender kept transmitting. It carries the offendingTEID(in theTunnel Endpoint Identifier Data IIE) and the receiver's address, so the sender can immediately stop transmitting on that dead tunnel rather than waiting for a timeout.End Marker— sent on the old downlink path at a path switch (for example, when a handover moves a UE from a source gNB to a target gNB, or when the UPF's N3 tunnel is redirected). It is the last thing sent on the old tunnel and tells the receiver "no more data will come this way," so the receiver knows in-order forwarding on the old path is complete and can switch cleanly to the new path without either losing packets or waiting indefinitely for more.
End Marker is about ordering, not delivery: during handover, downlink data already in flight toward the source is forwarded over Xn-U to the target. The End Marker lets the target know when that forwarded stream has ended, so it can stop reordering forwarded packets against fresh packets arriving directly from the UPF on the new N3 tunnel. Without it, the target cannot tell "slow" from "finished."
The PDU Session Container โ Carrying QoS (TS 38.415)
The transport network is a plain IP backhaul; it does not understand 5G QoS flows. To keep QoS end to end, 5G defines a GTP-U extension header called the PDU Session Container, also known as the NR RAN Container, specified in TS 38.415. It is inserted into the GTP-U header on N3 (and used analogously on Xn-U during forwarding) and carries the per-packet QoS information the RAN and core need.
| Field | Direction | What it does |
|---|---|---|
PDU Type | both | 0 = DL PDU Session Information, 1 = UL PDU Session Information — identifies which container format follows. |
QFI (QoS Flow Identifier) | both | 6-bit identifier (values 0–63) of which QoS flow within the PDU session this packet belongs to. The gNB maps QFI ↔ DRB; the UPF maps QFI ↔ the service data flow / PCC rules. |
RQI (Reflective QoS Indicator) | DL only | Tells the UE to derive an uplink QoS rule reflectively for this flow, so no explicit signalling of the rule is needed. |
PPP / PPI | DL only | Paging Policy Presence flag and Paging Policy Indicator, letting the UPF influence how a downlink packet triggers paging. |
DL Sending Time / QMP | optional | Optional QoS-monitoring timestamps used for round-trip delay measurement between UPF and gNB. |
The QFI is the single most important field here. In 5G's QoS model, traffic is grouped into QoS flows, each identified by a QFI, and it is the finest granularity of QoS that the 5G system enforces end to end. On the downlink, the UPF classifies each incoming packet against its service-data-flow filters, decides which QoS flow it belongs to, and writes that flow's QFI into the PDU Session Container. On the uplink, the UE marks packets with the QFI (per its QoS rules) and the gNB copies it into the container toward the UPF, so the core can verify and police the flow.
Why the QFI lives in the GTP-U header, not in the payload: the inner packet's own DSCP is not trusted across the RAN, and the RAN must not have to deep-inspect user IP. By carrying the QFI in the PDU Session Container, the downlink UPF marks each packet with its flow once, and the gNB reads that mark to pick the right DRB and scheduling treatment with a single header lookup. That is precisely what "QoS is preserved across the transport" means in 5G.
The RQI supports reflective QoS: rather than signalling an uplink QoS rule to the UE explicitly, the network sets the RQI on downlink packets of a flow, and the UE infers "send my matching uplink traffic on this same flow." It is a bandwidth-saving shortcut for flows whose uplink treatment can mirror the downlink.
Where GTP-U Is Used: N3, F1-U, Xn-U
The same protocol appears on three different interfaces in the 5G user plane, each with its own pair of endpoints and its own reason for tunnelling. What changes is who owns the TEIDs and what, if anything, rides on top of GTP-U.
| Interface | Endpoints | What it carries | Notes |
|---|---|---|---|
N3 | gNB ↔ UPF | User data between the RAN and the core, per PDU session. | Carries the PDU Session Container with the QFI; TEIDs signalled via NGAP. |
F1-U | DU ↔ CU-UP | User data between the two halves of a split gNB, per DRB. | Runs the NR User Plane Protocol (TS 38.425) on top for downlink flow control; TEIDs signalled via F1AP. |
Xn-U | gNB ↔ gNB | Temporary data forwarding during handover. | Source forwards in-flight data to target; End Marker closes the forwarded stream. |
On N3 the tunnel exists per PDU session and the QoS granularity is the QFI. Inside a split gNB, F1-U tunnels exist per DRB, and on top of GTP-U runs the NR User Plane Protocol (TS 38.425), which adds downlink data-delivery status and flow-control feedback so the CU-UP knows how fast the DU can drain its buffers. Xn-U is transient: it appears only during a handover, carrying data the source gNB had already received for the UE but not yet delivered, forwarded to the target so nothing is lost across the move — and it is on this interface that the End Marker earns its keep.
Same wrapper, different endpoints: whether it is N3, F1-U, or Xn-U, the encapsulation is identical — GTP-U over UDP:2152 with a receiver-assigned TEID. Only the endpoints, the granularity (session vs DRB), and the protocol layered on top differ. Learn the wrapper once and it reads the same everywhere. See the CU/DU/RU Split for the F1-U side.
LTE โ NR: GTP-U is one of the few protocols 5G carried over from EPC almost verbatim — the same GTPv1-U over UDP:2152, defined in the same TS 29.281. In LTE it ran on S1-U (eNB ↔ S-GW) and S5/S8 (S-GW ↔ P-GW), keyed by the same 32-bit TEID. The one genuinely new piece in NR is the PDU Session Container extension header (TS 38.415) carrying the QFI: LTE's QoS granularity was the EPS bearer (one GTP-U tunnel per bearer), whereas NR multiplexes many QFI-identified QoS flows inside one per-session tunnel. So the wrapper is old; the QoS-flow marking it now carries is the 5G addition.
A Downlink Packet, End to End
Putting the pieces together, here is what happens to a single downlink packet arriving from the data network, classified by the UPF and delivered to the UE by the gNB. It shows exactly where the QFI is set and where it is consumed.
Step by step: a packet arrives at the UPF from the data network. The UPF runs it through the packet detection / service-data-flow filters installed for that PDU session, which resolve the packet to one QoS flow. The UPF writes that flow's QFI into a PDU Session Container extension header, prepends the GTP-U header with the downlink TEID the gNB assigned at setup, wraps it in UDP:2152 and outer IP addressed to the gNB, and sends it across N3. The gNB receives it, uses the TEID to find the PDU-session context, reads the QFI, and consults its QFI-to-DRB mapping to decide which Data Radio Bearer carries this flow over the air. From there PDCP/RLC/MAC take over and the packet is scheduled to the UE. The uplink is the mirror image: the UE tags packets with a QFI per its QoS rules, the gNB relays them over N3 with the uplink TEID the UPF assigned, and the UPF polices each flow against its rules.
The two mappings that make QoS work: the UPF owns QFI ↔ service-data-flow (which packets belong to which flow), and the gNB owns QFI ↔ DRB (which flow rides which radio bearer). GTP-U's job is simply to carry the QFI intact between them. See the 5G QoS Model for how the flows and DRBs are defined.
⚠ Common pitfalls / gotchas
- MTU / fragmentation. Forgetting the ~36+ bytes of GTP-U/UDP/IP overhead on
N3/F1-Uleads to inner-packet fragmentation or black-holed large packets. Size transport MTU (jumbo frames) or clamp accordingly. - Stale TEID after release. A peer that keeps sending on a released tunnel triggers a flood of
Error Indications; the fix is to honour the indication and tear down promptly, not to ignore it. - Direction confusion. Uplink and downlink use different receiver-assigned
TEIDs; wiring the same value both ways is a classic bring-up bug that sends traffic into the wrong context. - Outer DSCP not set. Because the transport cannot see the inner packet or the
QFI, if the endpoint does not map theQFIto an outer DSCP, the backhaul treats premium and best-effort traffic identically. - Missing End Marker at handover. Without the
End Markeron the old path, the target keeps reordering forwarded packets against freshN3traffic, causing stalls or out-of-order delivery.
Summary
GTP-U is the user-plane tunnel that lets 5G data cross a QoS-agnostic IP backhaul without losing its session identity or its quality of service. It wraps each UE packet in outer IP + UDP:2152 + an 8-byte GTP-U header, and the fields that do the real work are the 32-bit receiver-assigned TEID (which tunnel context this packet belongs to) and, on N3, the QFI carried in the PDU Session Container extension header (TS 38.415) that names the QoS flow. Data rides as a G-PDU (type 255); a small set of control messages — Echo, Error Indication, End Marker — handle path keepalive, stale-tunnel cleanup, and clean path switches.
The same wrapper appears on three interfaces — N3 (gNB↔UPF, per session), F1-U (DU↔CU-UP, per DRB, with NR-UP flow control on top per TS 38.425), and Xn-U (gNB↔gNB, handover forwarding) — differing only in endpoints, granularity, and what layers above. Remember the two mappings that make QoS real: the UPF owns QFI↔service-data-flow and the gNB owns QFI↔DRB, and GTP-U simply carries the QFI intact between them.
Quick Q&A
Q. What identifies a GTP-U tunnel, and who assigns the identifier?
A. The 32-bit TEID in the GTP-U header. It is chosen by the receiving endpoint and signalled to the peer at setup (e.g. NGAP UP Transport Layer Information on N3, F1AP on F1-U). Because each direction has its own receiver, the uplink and downlink of one PDU session use different TEIDs.
Q. How is 5G QoS preserved across an IP backhaul that doesn't understand it?
A. The PDU Session Container extension header (TS 38.415) carries the QFI (and, downlink, the RQI) inside the GTP-U header. The UPF marks each downlink packet with its QoS flow; the gNB reads the QFI and maps it to the correct DRB and scheduling, independent of the inner packet's own DSCP.
Q. What triggers an Error Indication, and how does it differ from an Echo?
A. A G-PDU arrives with a TEID the receiver has no context for — usually the bearer was released while the peer kept sending. The Error Indication returns the offending TEID so the sender tears down the stale tunnel. Echo Request/Response, by contrast, are periodic keepalives that monitor whole-path liveness and carry the Recovery restart counter.
Q. Why is an End Marker sent during a path switch?
A. It is the last packet on the old downlink path (e.g. the forwarding tunnel during handover). It tells the receiver that no more data will arrive on the old path, so the target can stop reordering forwarded packets against fresh packets on the new N3 tunnel and switch cleanly with no loss or stall.
Q. Where does GTP-U appear besides N3, and what rides on top of it?
A. On F1-U between the DU and CU-UP (with the NR User Plane Protocol, TS 38.425, for flow control), and on Xn-U for handover data forwarding. Same encapsulation over UDP:2152, different endpoints and granularity (per-DRB on F1-U, per-session on N3).
Q. Which UDP port does GTP-U use, and what is the G-PDU message type?
A. UDP destination port 2152. A data packet is Message Type = G-PDU = 255; its payload is the encapsulated UE packet, and the receiver strips the GTP-U/UDP/IP wrapper after resolving the TEID.
Where to go next
See what the QFI GTP-U carries actually controls on the air interface, follow the same tunnels into a split gNB, and trace how the TEIDs are signalled during session setup.