GTP-U & GTP-C (S1-U, S5/S8, S11) in LTE 4G
Tunnelling user data (GTP-U) and control (GTP-C) across the EPC bearer path with TEIDs.
User data doesn't just float across the EPC — it rides inside tunnels. The GPRS Tunnelling Protocol (GTP) wraps each user's IP packets in an outer header so the core network can carry them between nodes without caring what's inside, and a separate control-plane variant builds, moves and tears down those tunnels. Get GTP right and the whole Evolved Packet Core stops being a cloud of boxes and becomes a set of named pipes. This page is grounded in TS 29.281 (GTP-U) and TS 29.274 (GTP-C, a.k.a. GTPv2-C).
Introduction
GTP is the tunnelling protocol that carries a subscriber's traffic across the Evolved Packet Core, and the signalling that manages those tunnels. It exists in two independent flavours: GTP-U (TS 29.281) on the user plane, which encapsulates and moves the actual data packets, and GTP-C / GTPv2-C (TS 29.274) on the control plane, which creates, modifies and deletes the tunnels and the session/bearer state behind them. Both run over UDP, but on different ports and with different message sets.
GTP is active across the whole EPS data lifecycle. When a UE attaches, GTP-C builds the tunnels (allocating TEIDs and agreeing QoS) so a default bearer exists; while the UE is connected, GTP-U carries every uplink and downlink packet between eNB, S-GW and P-GW; when the UE moves, GTP-C re-points the tunnels and GTP-U's End Marker keeps the switchover in order; when the UE detaches, GTP-C tears the tunnels down and frees the identifiers. Nothing in the EPC user plane happens without it.
It matters because the EPC deliberately does not route on the UE's own IP address. Instead it addresses traffic by tunnel, using a 32-bit TEID in each packet's header. Understanding GTP — the header fields, the TEID, and the control-plane messages that wire it all together — is what turns "the core" from a diagram of boxes into a concrete set of named, per-bearer pipes.
On this page
Why GTP is needed
In plain words: think of the postal system's shipping containers. Your letter (the UE's IP packet) already has an address on it, but that address means nothing to the freight network between depots. So the post office seals your letter inside a numbered container, and the depots route on the container number (the TEID), not on your letter. At the final depot the container is opened and your letter is delivered as written. GTP is the container; the TEID is the number stencilled on its side.
Concretely, the core cannot route on the UE's own IP address — that address belongs to the external packet data network (the SGi side), not to the transport between core nodes, and the same UE address may even be reused across many bearers and PDN connections. GTP solves three problems at once. It separates identity from transport: the TEID restores the per-bearer identity that outer IP routing throws away. It enables mobility: when the UE moves, only the tunnel endpoint is re-pointed — the UE keeps its IP. And it keeps flows separate: because each bearer is its own tunnel, QoS and charging rules apply to exactly the right traffic, not to a blurred aggregate.
Why Tunnel At All
In the Evolved Packet Core (EPC), a UE's IP packets have to travel eNB → S-GW → P-GW and back, across transport nodes that may sit anywhere in the operator's network. The core cannot route on the UE's own IP address — that address belongs to the external packet data network (the SGi side), not to the transport between core nodes, and the same UE address may even be reused across many bearers and PDN connections. So instead the EPC tunnels: it takes the UE's packet, wraps it in an outer UDP/IP header plus a small GTP-U header, and ships that between two node addresses. The inner packet becomes opaque payload that the transport network happily forwards on its own routing.
GTP is a tunnelling protocol running over UDP. In EPS it comes in two independent flavours: GTP-U (TS 29.281) carries the actual user data packets on the user plane, and GTP-C (TS 29.274, GTPv2-C) carries the signalling that creates, modifies and tears those tunnels down on the control plane.
Tunnels let the core move a UE's traffic between fixed node addresses regardless of the UE's own IP, support mobility (re-point a tunnel when the UE moves), and keep per-user, per-bearer traffic separated so QoS and charging rules can be applied to exactly the right flow.
Every tunnel endpoint is named by a TEID (Tunnel Endpoint Identifier), a 32-bit value. The receiver reads the TEID in the incoming header and instantly knows which UE and which EPS bearer the packet belongs to — no deep inspection of the inner packet required.
The one idea to keep: the TEID is the tunnel's name. A GTP-U packet carries no UE IP that the core routes on — the TEID in the header is the entire addressing mechanism that maps the packet to a specific EPS bearer at the receiving node.
Because the two planes are fully separate protocols — different specs, different UDP ports, different message sets — it is worth pinning down how they differ before looking at either in detail. They share only the tunnelling idea and, on S5/S8, the interface name.
| Aspect | GTP-U | GTP-C (GTPv2-C) |
|---|---|---|
| Spec | TS 29.281 | TS 29.274 |
| Plane | User plane (carries data) | Control plane (builds tunnels) |
| Transport | UDP port 2152 | UDP port 2123 |
| Interfaces (EPS) | S1-U, S5/S8, X2-U | S11, S5/S8, S10 |
| Endpoint id | User-plane TEID (per bearer, per direction) | Control-plane TEID (per PDN connection / signalling context) |
| Typical payload | A G-PDU = one user IP packet | Session-management messages + Information Elements |
| Reliability | Best-effort; own Echo/Error Indication | Request/Response with retransmission timers |
GTP-U — The User Plane (TS 29.281)
GTP-U is the workhorse that carries user IP packets across the EPC. Each user packet is encapsulated as a stack: an outer IP header (source and destination = the two node addresses) → UDP (destination port 2152) → a GTP-U header → then the original user packet as payload. The most important field in that GTP-U header is the TEID, a 32-bit value the receiving endpoint uses to look up the exact EPS bearer the packet belongs to.
A thin encapsulation header carried over UDP, whose job is to label each user packet with the tunnel it belongs to via the TEID and let the peer distinguish user data from GTP-U's own housekeeping messages.
The transport network only routes on the outer IP header between node addresses. The TEID restores the per-bearer identity that outer routing threw away, so the receiver can re-map an arriving packet to one UE and one bearer.
A fixed 8-byte header carries flags, a Message Type, a Length, and the TEID; optional fields (sequence number, N-PDU number, next-extension-header) follow when their flags are set. For user data the type is G-PDU and the payload is the user packet.
Inside the GTP-U header
The GTP-U header is a fixed 8 octets, optionally followed by a 4-octet optional block. It begins with a flags octet: 3-bit Version = 1, a PT (Protocol Type) bit = 1 for GTP (0 would mean the older GTP’), one spare bit, then the E (extension-header present), S (sequence number present) and PN (N-PDU number present) flags. Next comes the Message Type (1 octet), a 16-bit Length (the number of octets after the mandatory 8-byte header, so it includes the optional block and payload), and the 32-bit TEID. If any of E, S or PN is set, the 4-octet optional block is present: a 16-bit Sequence Number, an 8-bit N-PDU Number, and an 8-bit Next Extension Header Type.
| Field | Size | Purpose |
|---|---|---|
Flags (Version, PT, E, S, PN) | 1 octet | Version = 1, PT = 1 for GTP; E/S/PN say whether the optional block and extension headers follow. |
Message Type | 1 octet | Identifies the message (e.g. G-PDU = 255, End Marker = 254, Error Indication = 26, Echo Request/Response = 1/2). |
Length | 2 octets | Octets after the mandatory 8-byte header (includes optional block + payload). |
TEID | 4 octets | The tunnel endpoint identifier at the receiver — selects the bearer. |
Sequence Number | 2 octets (optional) | Present if S=1; used for in-order handling / echo correlation, not for ARQ. |
N-PDU Number | 1 octet (optional) | Present if PN=1; legacy inter-system handover sequencing. |
Next Extension Header Type | 1 octet (optional) | Present if E=1; chains extension headers such as the PDCP PDU Number extension used in handover forwarding. |
Beyond ordinary data transport, GTP-U defines a small set of its own messages — the ones you must recognise are below.
| Message | Type | Purpose |
|---|---|---|
Echo Request / Echo Response | 1 / 2 | Path management — check that a GTP-U peer and the path to it are still alive; carries a Recovery counter so a restart is detected. |
Error Indication | 26 | Sent back when a G-PDU arrives for a TEID the receiver has no context for (e.g. bearer already released). Carries the offending TEID Data I and GTP-U Peer Address; tells the sender to stop and triggers cleanup. |
End Marker | 254 | Marks the last packet on an old path during a path switch, so the receiver knows in-order forwarding is finished and can release the old tunnel. Central to handover — see below. |
G-PDU | 255 | The normal case: the payload is one user IP packet. The overwhelming majority of GTP-U traffic is G-PDU. |
GTP-U runs on three key EPS interfaces:
S1-U— between the eNB and the S-GW. This is the radio-facing user-plane tunnel, one segment per bearer per direction.S5/S8— between the S-GW and the P-GW (S5when both are in the same PLMN,S8in roaming across PLMNs). This is the core-facing user-plane tunnel.X2-U— between two eNBs, used to forward buffered and in-flight downlink data from the source to the target eNB during handover so packets aren't lost while the UE moves.
Per-bearer, per-direction: a single EPS bearer has a separate GTP-U tunnel on S1-U and another on S5/S8, and each has its own uplink and downlink TEID. Each endpoint allocates the TEID it wants its peer to send to — so the eNB tells the S-GW which TEID to stamp for downlink, and the S-GW tells the eNB which to stamp for uplink.
GTP-C v2 — The Control Plane (TS 29.274)
Before any user packet can flow, someone has to build the tunnels — allocate the TEIDs, agree the QoS, and tell each node the peer's address. That's the job of GTP-C (GTPv2-C). It also runs over UDP, but on port 2123, and it manages sessions and bearers over their whole lifetime: setup, modification (when the UE moves, or a dedicated bearer is added), and teardown.
A request/response signalling protocol between core nodes (MME, S-GW, P-GW) that establishes and manages the GTP-U tunnels and the EPS session/bearer state behind them, carrying its parameters as typed Information Elements.
Tunnels are dynamic: they appear when a UE attaches, change when it moves or adds a bearer, and vanish when it detaches. GTP-C is how the nodes stay in sync about which tunnels exist, what QoS they carry, and which endpoint owns which TEID.
Paired messages such as Create Session Request/Create Session Response carry F-TEIDs (Fully-Qualified TEID = TEID + IP address + interface type) that wire the user plane together. Each side stamps the peer's control-plane TEID into subsequent signalling for that session.
Inside the GTP-C v2 header and its IEs
GTP-C is a transaction protocol: every Request has a matching Response, correlated by a Sequence Number, and guarded by a retransmission timer (the T3 timer with N3 retries) so a lost message is re-sent rather than silently dropping a session. Its header carries a version (2), the P (piggyback) and T (TEID present) flags, the Message Type, a 16-bit Length, the 32-bit TEID (present for all messages except the initial Create Session Request and Echo, where the receiver's control-plane TEID is not yet known and the field is omitted), a 24-bit Sequence Number, and a spare octet.
Every parameter in a GTP-C message is a typed Information Element (IE) in TLV form: an 8-bit Type, a 16-bit Length, an Instance nibble (which lets several IEs of the same type appear and be told apart — e.g. multiple F-TEIDs or Bearer Contexts in one message), then the value. IEs can be grouped: a Bearer Context IE, for instance, nests an EPS Bearer ID (EBI), the bearer-level F-TEIDs, and the bearer QoS inside it. The central IE to know is the F-TEID (Fully-Qualified TEID): it bundles the TEID, the endpoint IPv4/IPv6 address, and an Interface Type code (e.g. S1-U eNB, S1-U S-GW, S5/S8 S-GW GTP-U, S5/S8 P-GW GTP-U, S11 MME) — so a single IE tells the peer where to send, which tunnel to stamp, and on which interface.
The core session-management messages are:
| Message (paired) | Interface(s) | What it does |
|---|---|---|
Create Session Request / Response | S11, then S5/S8 | Sets up a PDN connection and its default bearer: MME asks S-GW (S11), S-GW asks P-GW (S5/S8). Carries IMSI, APN, PDN Type, Bearer Context(s) with EBI and bearer QoS, and F-TEIDs for both control and user plane; the P-GW assigns the PAA (PDN Address Allocation — the UE IP) and default Bearer QoS (QCI/ARP). |
Modify Bearer Request / Response | S11 (and S5/S8) | Updates the downlink S1-U endpoint after the eNB is known or after handover — the S-GW learns the eNB's new user-plane F-TEID so downlink data flows to the right eNB. Also used on service-request and X2/S1 handover path switch. |
Create Bearer Request / Response | S5/S8, then S11 | Adds a dedicated bearer, usually triggered by the PCRF for a new QoS flow (e.g. VoLTE). Carries the new Bearer Context with its TFT and Bearer QoS. P-GW initiates toward S-GW, S-GW toward MME. |
Delete Bearer Request / Response | S5/S8, S11 | Removes a dedicated bearer (or signals deactivation, via EBI) without tearing down the whole PDN connection. |
Delete Session Request / Response | S11, S5/S8 | Tears the PDN connection down entirely on detach: releases the default bearer, frees all TEIDs, and stops charging. |
GTP-C runs on:
S11— between the MME and the S-GW. The MME never touches user data; it drives the S-GW overS11to build tunnels on the UE's behalf.S5/S8— the control-plane side, between the S-GW and P-GW, alongside the user-plane GTP-U on the same interface name.S10— between two MMEs, used to transfer UE context (Forward Relocation Request/Response) during MME relocation in inter-MME mobility.
Mental model: GTP-C is the construction crew that lays the pipe and hands over the keys (the TEIDs); GTP-U is the water that then flows through the pipe. Different ports, different specs, same interface names on S5/S8.
How a Bearer Maps to Tunnels — End to End
The single most useful thing to internalise is the chain of identifiers that stitch one EPS bearer together across the whole path. On the radio it is a DRB (Data Radio Bearer); on S1-U it is a pair of TEIDs; on S5/S8 it is another pair. These are separate tunnels — the packet is de-encapsulated and re-encapsulated at each node — but they are all bound to the same EPS bearer (identified end to end by its EPS Bearer ID), and control-plane signalling is what glued them together.
| Segment | Bound to (DL) | Endpoint that allocates it | How the peer learns it |
|---|---|---|---|
| Radio | DRB id | eNB (RRC) | RRCConnectionReconfiguration to the UE |
S1-U DL | eNB DL TEID + eNB IP | eNB | S1AP to MME → Modify Bearer Request (S11) to S-GW |
S1-U UL | S-GW UL TEID + S-GW IP | S-GW | Create Session Response (S11) → S1AP to eNB |
S5/S8 DL | S-GW DL TEID + S-GW IP | S-GW | Create Session Request (S5/S8) to P-GW |
S5/S8 UL | P-GW UL TEID + P-GW IP | P-GW | Create Session Response (S5/S8) to S-GW |
Follow a downlink packet to see the chain in action — a video frame arriving from the internet for your phone. It reaches the P-GW on the SGi interface (the boundary to the external network), and the P-GW must get it to the right eNB, which will send it over the air. 1. The P-GW matches the packet to the UE's EPS bearer via its packet filters (the downlink TFT) and encapsulates it in GTP-U, stamping the downlink TEID the S-GW gave it and addressing the outer IP to the S-GW. 2. It travels over S5/S8. 3. The S-GW reads that TEID, looks up the bearer, strips the wrapper and re-encapsulates with the eNB's downlink TEID, sending it over S1-U. 4. The eNB reads that TEID, maps it to the matching DRB, strips the GTP-U/UDP/IP wrapping, and schedules the inner packet over the air. Uplink is the mirror image, keyed by the uplink TEIDs.
The crucial observation is in the diagram below: the inner user IP packet is byte-for-byte identical on every segment. Only the outer IP/UDP/GTP-U wrapper — and specifically the TEID — is rewritten at each node.
TEID in each outer wrapper selects the bearer at the next node; the inner packet is unchanged end to end until the eNB delivers it on the radio DRB.End Marker — Path Switch at Handover
Handover is where GTP-U's tidiness earns its keep. When a UE moves from a source eNB to a target eNB, the S1-U downlink tunnel has to be re-pointed from the old eNB to the new one. But packets are already in flight, and in-order delivery matters. The End Marker message (GTP-U type 254) is how the network draws a clean line between the old path and the new one.
In an X2-based handover, the source eNB starts forwarding buffered and freshly arriving downlink data to the target eNB over the X2-U tunnel, so nothing is lost while the UE completes the radio switch. Meanwhile the target eNB signals the MME, which sends a Modify Bearer Request over S11 so the S-GW updates the S1-U downlink TEID/address to the target eNB — this is the path switch. At the moment the S-GW switches the downlink path, it sends one or more End Marker packets down the old S1-U tunnel (to the source eNB). The source eNB forwards those End Markers to the target over X2-U as the last thing on the forwarding tunnel.
Why the End Marker exists: it tells the target eNB "everything that was going to arrive on the old path has now arrived — the packets after me come directly on the new S1-U path." The target can then stop expecting forwarded packets, release the X2-U forwarding tunnel, and deliver directly-received packets without risking reordering.
The same principle applies to S1-based handover and to S-GW relocation: the source-side node emits an End Marker on the old GTP-U path so the target knows it is drained. Because it is an ordinary GTP-U message on the same tunnel as the data, it arrives strictly after all preceding data — that ordering guarantee is the whole point. An Error Indication is the ungraceful counterpart: if a packet shows up for a TEID the receiver has already released, it replies with one to make the sender stop.
Interface, Variant and Endpoints — At a Glance
The same interface name can carry both variants (S5/S8 carries user data and control), so it helps to see them side by side. Note that the S1-MME interface between eNB and MME is not GTP at all — it uses S1AP over SCTP — a common point of confusion, since it sits right next to the GTP interfaces.
| Interface | GTP variant | Endpoints | Role |
|---|---|---|---|
S1-U | GTP-U | eNB ↔ S-GW | Radio-facing user-plane tunnel |
S5/S8 (user) | GTP-U | S-GW ↔ P-GW | Core-facing user-plane tunnel (S8 = roaming) |
X2-U | GTP-U | eNB ↔ eNB | Downlink data forwarding during handover |
S11 | GTP-C | MME ↔ S-GW | Session & bearer management |
S5/S8 (control) | GTP-C | S-GW ↔ P-GW | Session & bearer management to the PDN GW |
S10 | GTP-C | MME ↔ MME | UE context transfer at MME relocation |
Ports to memorise: GTP-U uses UDP port 2152; GTP-C (GTPv2-C) uses UDP port 2123. Both over UDP — GTP does not rely on TCP; GTP-C provides its own reliability with sequence numbers and retransmission timers.
LTE ↔ NR: in 5G, GTP-U stays on the user plane — the same TS 29.281 protocol, same UDP port 2152 — now on the NG-U (N3, gNB↔UPF) and N9 (UPF↔UPF) interfaces, with a PDU Session Container extension header carrying the QFI (QoS Flow Identifier) and reflective-QoS bits. GTP-C, however, is gone from the 5G core: the SBA control plane replaces GTPv2-C session management with HTTP/2 service-based APIs (the SMF drives the UPF over N4 using PFCP, not GTP-C). So the LTE split "GTP-U for data, GTP-C for control" becomes "GTP-U for data, PFCP + service-based interfaces for control" in 5G. The TEID concept survives unchanged.
⚠ Common pitfalls / gotchas
- Assuming the UE IP is routable in the core. It is not — the core routes only on the outer node addresses and the
TEID. The UE IP is opaque payload until the P-GW'sSGiside. - Confusing GTP-U port 2152 with GTP-C port 2123. Both are UDP; a firewall or capture filter that only opens one silently breaks either data or signalling.
- Thinking S1-MME is GTP. S1-MME (eNB↔MME) is
S1AP/SCTP, not GTP, even though it sits beside the GTP interfaces. - Treating a TEID as globally unique or as the allocator's own. A
TEIDis local to the receiving node and is the value that node wants its peer to send to — each direction on each segment has its own. - Reading the GTP-U
Lengthas the whole packet. It counts octets after the mandatory 8-byte header, so it includes the optional block and payload but not the first 8 bytes. - Ignoring
End Marker/Error Indicationin traces. A flood ofError Indicationusually means staleTEIDs (context released on one side but not the other), not link loss.
Summary
GTP is how the EPC carries and manages user traffic without routing on the UE's IP. Two separate protocols share only the tunnelling idea: GTP-U (TS 29.281, UDP 2152) encapsulates each user packet with a TEID and moves it on S1-U, S5/S8 and X2-U; GTP-C / GTPv2-C (TS 29.274, UDP 2123) builds, modifies and tears down those tunnels on S11, S5/S8 and S10, carrying its parameters as typed IEs and wiring the user plane together with F-TEIDs.
The TEID is the one idea to keep: a 32-bit name, local to the receiving node, that maps an arriving packet to exactly one EPS bearer. One bearer is realised as a chain of distinct tunnels — radio DRB, S1-U pair, S5/S8 pair — each re-encapsulated at every node, with only the outer wrapper (and its TEID) rewritten per hop while the inner user packet stays identical. Handover keeps this orderly with the End Marker, and Error Indication is the ungraceful signal for a stale tunnel.
In 5G the user-plane half survives almost intact — GTP-U with a QFI-carrying extension header on N3/N9 — while the control-plane half is replaced by PFCP and the service-based interfaces. Learn the LTE TEID and F-TEID model and the 5G user plane is largely familiar.
Quick Q&A
Q. What is the TEID and why is it needed?
A. The TEID (Tunnel Endpoint Identifier) is a 32-bit value in the GTP header that names a specific tunnel endpoint at the receiving node. Because the core tunnels user traffic and does not route on the UE's own IP, the receiver uses the TEID to map an incoming packet to the correct UE and EPS bearer. Each endpoint allocates the TEID it wants its peer to send to, and it is exchanged during GTP-C session setup as part of an F-TEID (TEID + IP + interface type).
Q. What's the difference between GTP-U and GTP-C, including ports and specs?
A. GTP-U (TS 29.281, UDP port 2152) carries the actual user data packets, encapsulating them for transport on S1-U, S5/S8 and X2-U. GTP-C (TS 29.274 / GTPv2-C, UDP port 2123) carries signalling that creates, modifies and deletes those tunnels and manages session/bearer state — on S11, S5/S8 and S10. One moves data, the other moves the control messages that build the pipes.
Q. Which GTP-C messages set up and tear down a session?
A. Create Session Request/Response establishes the PDN connection and default bearer (MME→S-GW on S11, then S-GW→P-GW on S5/S8), exchanging F-TEIDs. Modify Bearer Request/Response updates the S1-U downlink endpoint (e.g. after the eNB is known or after handover). Create Bearer/Delete Bearer add or remove dedicated bearers. Delete Session Request/Response tears the whole PDN connection down on detach.
Q. Trace a downlink packet from the internet to the UE across the GTP tunnels.
A. Internet → P-GW on SGi; the P-GW maps it to the EPS bearer via the downlink TFT and encapsulates in GTP-U over S5/S8 to the S-GW using the S-GW's downlink TEID; the S-GW reads that TEID, re-encapsulates with the eNB's downlink TEID and forwards over S1-U; the eNB reads its TEID, strips GTP-U, and sends the inner packet on the radio DRB. The inner packet is unchanged; every hop is selected by the TEID.
Q. What is the End Marker for?
A. At a handover path switch the S-GW re-points the downlink S1-U tunnel from the source to the target eNB. It sends an End Marker (GTP-U type 254) down the old path so the target eNB knows the last forwarded packet has arrived; the target can then release the X2-U forwarding tunnel and deliver directly-received packets without reordering. It is the graceful end-of-path signal, versus the Error Indication that a node sends when it gets data for an unknown TEID.
Q. How does one EPS bearer relate to the various tunnels and the DRB?
A. One EPS bearer is realised as a chain: a radio DRB between UE and eNB, an S1-U GTP-U tunnel (its own UL/DL TEIDs) between eNB and S-GW, and an S5/S8 GTP-U tunnel (another UL/DL TEID pair) between S-GW and P-GW. They are distinct tunnels re-encapsulated at each node, all bound to the same bearer (its EPS Bearer ID) and wired together by GTP-C F-TEID exchange.
Where GTP connects
GTP tunnels are the pipes that EPS bearers ride through, laid out across the EPC nodes and armed by control-plane signalling on the radio side. From here, look at how the bearer they carry is defined, the nodes that terminate these interfaces, and the non-GTP control protocol that sits alongside them.