Encyclopedia
2026-08-26 18:24:45
How Does GTP-U Work in 5G?
How does GTP-U work in 5G? This guide explains N3, N9 and Xn-U transport, UDP 2152, TEID, GTP tunnels, PDU Session Container, QFI, Echo, Error Indication and End Marker behavior.

Becke Telcom

How Does GTP-U Work in 5G?

When a UE opens a video app, the actual user traffic has to travel from the gNB to the UPF before reaching the data network. The control plane establishes the PDU Session, assigns addresses, and installs forwarding rules, but the protocol that actually carries user IP packets across the 5G access and core user plane is GTP-U. Understanding GTP-U requires more than remembering "UDP port 2152" and "TEID." In 5G, a single N3 tunnel may carry multiple QoS Flows, while path supervision, unknown tunnel handling, and user-plane cleanup after mobility events also rely on GTP-U management messages. Looking at the protocol stack, tunnels, TEIDs, QFIs, and management procedures as one complete user-plane path makes it much easier to understand how 5G traffic actually reaches the UPF.

Where Does GTP-U Sit in the 5G Architecture?

GTP-U stands for GPRS Tunnelling Protocol for the User Plane. In the 5G user-plane architecture, it is primarily used to encapsulate and transport upper-layer user traffic between user-plane nodes.

From the 5G Core perspective, the two most common interfaces using GTP-U are N3 and N9. N3 connects the gNB to the UPF and carries user traffic between the radio access network and the 5G Core. N9 is used between UPFs. Within the RAN, Xn-U between gNBs can also use GTP-U.

This is quite different from the 5G control-plane architecture. Network functions such as the AMF and SMF use service-based interfaces that largely rely on HTTP/2, while the user-plane path continues to use GTP-U for carrying the subscriber's actual traffic. The move to a Service-Based Architecture in 5G did not mean that the user plane itself moved to HTTP.

GTP-U runs over UDP and continues to use UDP port 2152. If the protocol stack is viewed from a user's application packet downward, the structure can be understood as follows.

Application traffic first becomes a TCP or UDP packet and then an IP packet belonging to the UE. Once it enters the 5G user plane, that original user packet is encapsulated inside GTP-U. An outer UDP header, outer IP header, and lower-layer Ethernet framing are then added for transport between the GTP-U endpoints.

This means a packet capture may contain two different sets of IP addresses. The inner IP addresses describe communication between the UE and the application server on the data network, while the outer IP addresses are used between GTP-U tunnel endpoints such as the gNB and UPF. Mixing up the inner and outer IP headers is a common source of confusion when troubleshooting N3 traffic.

GTP-U in the 5G user plane connecting gNB and UPF across N3, N9 and Xn-U while using UDP port 2152 to transport user traffic
GTP-U in the 5G user plane connecting gNB and UPF across N3, N9 and Xn-U while using UDP port 2152 to transport user traffic

What Is the Difference Between a GTP Path, Tunnel, and TEID?

GTP Path, GTP Tunnel, Tunnel Endpoint, and TEID are closely related terms, but they describe different layers of the GTP-U transport model.

A GTP Path can be viewed as the connectionless communication path between two GTP tunnel endpoints. If a gNB and a UPF can exchange GTP-U packets across the IP network, a GTP Path exists between those endpoints. Multiple GTP-U tunnels can share the same Path.

A GTP Tunnel represents a more specific logical user-plane tunnel. A GTP-U tunnel is identified using a combination of the TEID, IP addressing, and UDP transport information, while the tunnel endpoint itself is identified by the node IP address and UDP port.

The TEID, or Tunnel Endpoint Identifier, is one of the most important fields in GTP-U. In the GTPv1-U basic header, the TEID is four bytes long. When a GTP-U packet reaches the receiving node, the receiver uses the TEID together with its local tunnel context to determine which user-plane tunnel the packet belongs to and which PDU Session or forwarding context should process it.

This is also why a TEID should never be interpreted in isolation. The same numerical TEID value can appear in different tunnel contexts. If the packets belong to different GTP endpoints or different directions, they are not necessarily part of the same tunnel.

Two additional terms are useful when looking at the payload itself. A T-PDU is the original upper-layer user data, while a G-PDU is the T-PDU after the GTP-U header has been added. What is carried across N3 is therefore not the UE's raw IP packet alone, but a GTP-U-encapsulated G-PDU.

GTP-U is also not limited to carrying user data. It has its own management messages. As a result, seeing UDP port 2152 in a packet capture does not automatically mean the packet belongs to user application traffic. Echo Request, Echo Response, Error Indication, End Marker, and other GTP-U messages use the same protocol framework.

Why Does 5G Need QFI If It Already Has TEID?

If GTP-U is first learned from a 4G perspective, it is easy to assume that identifying the TEID is enough to identify the bearer. In 5G, that assumption is no longer complete.

The 4G QoS architecture is based on EPS Bearers. Different bearers have their own user-plane transport contexts and GTP-U tunnels, so the tunnel and TEID naturally help distinguish different bearer traffic.

5G changes the QoS model to PDU Session plus QoS Flow. A single PDU Session may contain one or more QoS Flows, and a DRB may also carry one or more QoS Flows. However, N3 does not create a separate GTP-U tunnel for every QoS Flow within the same PDU Session.

In other words, the TEID can identify the GTP-U tunnel associated with the PDU Session, but several QoS Flows may still share that same tunnel.

That raises another question: how does the receiving node know which QoS Flow an individual packet belongs to?

This is one of the main reasons for the PDU Session Container extension header. 5G uses this GTP-U extension header to carry PDU Session-related user-plane information, including the QFI, or QoS Flow Identifier.

The QFI is a 6-bit identifier used to identify a QoS Flow. When analyzing 5G N3 traffic, TEID and QFI can therefore be understood at two different levels:

The TEID identifies the GTP-U tunnel or PDU Session context, while the QFI identifies the specific QoS Flow carried inside that tunnel.

The downlink PDU Session Container can also carry information such as RQI and PPI. RQI is used for Reflective QoS-related signaling, while PPI is associated with Paging Policy Differentiation and can support different paging treatment for different types of traffic within the same PDU Session.

The E bit in the GTP-U basic header indicates whether an Extension Header follows. This means that not every GTP-U packet necessarily carries the same extension headers. Whether a PDU Session Container is present depends on the packet and the function being performed.

5G N3 tunnel using the TEID to identify the PDU Session and the QFI inside the PDU Session Container to distinguish multiple QoS Flows
5G N3 tunnel using the TEID to identify the PDU Session and the QFI inside the PDU Session Container to distinguish multiple QoS Flows

What Actually Happens to an N3 User Packet?

The previous concepts become much easier to understand when they are placed into a real uplink packet flow.

Assume a UE is accessing an online video service. The UE first generates application traffic, which is carried over TCP or UDP and then placed inside a normal IP packet. In this inner IP header, the source address is the UE's assigned IP address, while the destination address belongs to the internet application server.

When the packet reaches the gNB, the gNB does not simply forward the UE's IP packet directly to the UPF. Instead, it applies GTP-U encapsulation based on the current user-plane context of the PDU Session.

The GTP-U header contains the relevant TEID. If the packet needs to identify a specific QoS Flow, the PDU Session Container can also carry the QFI. The gNB then adds the UDP header, with destination port 2152, followed by the outer IP header.

At this point, the outer IP addresses no longer describe the UE-to-internet communication. They represent the transport relationship between the gNB N3 interface and the UPF N3 interface.

When the packet reaches the UPF, the process is reversed. The UPF receives the packet based on the outer transport information, reads the TEID to locate the correct user-plane tunnel context, processes the QFI and other extension information where required, removes the GTP-U encapsulation, and then forwards the original UE IP packet toward the data network.

When troubleshooting N3 traffic with Wireshark or another packet-analysis tool, a useful approach is to work from the outside inward. First verify the outer gNB and UPF IP addresses, then UDP port 2152, followed by the TEID, the PDU Session Container and QFI where present, and only then inspect the user's inner IP, TCP or UDP, and application-layer traffic.

This method is often more effective than starting with the application packet because many N3 faults are caused by tunnel context, TEID, or endpoint issues rather than by the user's application itself.

Why Does GTP-U Need Its Own Management Messages?

Although GTP-U is a user-plane protocol, it is not limited to G-PDU user-data messages. It also defines path-management and tunnel-management messages that help keep the user-plane transport operational.

Echo Request and Echo Response Check Path Availability

An Echo Request is used to check whether the GTP Path and the peer GTP node are reachable and operational. The peer responds with an Echo Response.

These messages test the basic relationship between two GTP endpoints. If a gNB repeatedly fails to receive Echo Responses from a UPF, the issue may no longer be limited to one UE or one PDU Session. It can indicate a problem with the GTP Path itself or with the peer node.

GTP-U also defines the Supported Extension Headers Notification message, which allows a node to indicate which GTP extension headers it supports. This becomes relevant when 5G user-plane features depend on extension headers such as the PDU Session Container.

Error Indication Handles Unknown TEIDs

If a GTP endpoint receives a G-PDU but cannot find a local EPS Bearer or PDU Session context corresponding to the received TEID, and the TEID is not zero, it can send an Error Indication to the peer.

This tells the sending node that it is forwarding data toward a user-plane tunnel that the receiving side no longer recognizes.

If Error Indication messages appear repeatedly during troubleshooting, the first things to check are whether both endpoints have consistent TEID state and whether a PDU Session update, mobility procedure, or user-plane path change left the two sides out of sync.

End Marker Helps Finish a User-Plane Path Switch

The End Marker is commonly associated with mobility and user-plane path switching. It indicates that the last G-PDU on the old GTP-U path has been sent and that subsequent user traffic should no longer continue along that previous path.

For example, when a UE moves from a source gNB to a target gNB, the core-network user-plane path may also change. Traffic should not continue indefinitely over the old path, otherwise the old and new paths could overlap and create packet-ordering or forwarding problems.

The End Marker is therefore not simply a "delete tunnel" notification. It acts more like a boundary marker for the old user-plane path, informing the receiving side that the last packet on that path has already been delivered.

5G GTP-U using Echo Request and Response, Error Indication and End Marker for path supervision, unknown TEID handling and user-plane path switching
5G GTP-U using Echo Request and Response, Error Indication and End Marker for path supervision, unknown TEID handling and user-plane path switching

Once these mechanisms are viewed together, the role of GTP-U becomes much clearer. It is not simply a protocol that adds a TEID in front of a user's IP packet. It provides a complete user-plane tunneling framework that can be identified, monitored, managed, and updated as network state changes.

A practical troubleshooting sequence for 5G GTP-U is therefore to first confirm that the GTP endpoints and Path are healthy, then verify the TEID and Tunnel context, inspect the PDU Session Container and QFI where applicable, and finally move inward to the original user traffic. If the issue occurs during mobility or path updates, Error Indication and End Marker messages should also be reviewed.

Following this order turns an N3 packet capture from a large collection of UDP 2152 packets into a user-plane forwarding path that can be reconstructed layer by layer.

FAQ

Does Every Packet on UDP Port 2152 Carry User Traffic?

No. G-PDU messages carry user-plane data over GTP-U and UDP port 2152, but GTP-U management messages such as Echo Request, Echo Response, Error Indication, End Marker, and Supported Extension Headers Notification also use the same protocol framework. The GTP-U Message Type should be checked to determine what the packet actually represents.

Must a TEID Be Globally Unique Across the Entire 5G Network?

No. A TEID should not be treated as a globally unique network-wide identifier. GTP-U tunnel identification also depends on the tunnel endpoints, IP addressing, transport information, and direction. Troubleshooting should therefore consider the complete tunnel context rather than comparing TEID values alone.

Does Every 5G GTP-U Packet Include a PDU Session Container?

No. The PDU Session Container is a GTP-U extension header, and whether it is present depends on the packet and the function being performed. The E bit in the GTP-U basic header indicates whether additional Extension Headers follow, so not every N3 packet has the same header structure.

Does an End Marker Mean the Entire PDU Session Has Been Released?

Not necessarily. An End Marker primarily indicates that traffic on a particular GTP-U user-plane path has reached its end and is commonly seen during path switching after mobility events. It marks the end of traffic on that path rather than representing the complete PDU Session release procedure.

Recommended Products
catalogue
customer service Phone
We use cookie to improve your online experience. By continuing to browse this website, you agree to our use of cookie.

Cookies

This Cookie Policy explains how we use cookies and similar technologies when you access or use our website and related services. Please read this Policy together with our Terms and Conditions and Privacy Policy so that you understand how we collect, use, and protect information.

By continuing to access or use our Services, you acknowledge that cookies and similar technologies may be used as described in this Policy, subject to applicable law and your available choices.

Updates to This Cookie Policy

We may revise this Cookie Policy from time to time to reflect changes in legal requirements, technology, or our business practices. When we make updates, the revised version will be posted on this page and will become effective from the date of publication unless otherwise required by law.

Where required, we will provide additional notice or request your consent before applying material changes that affect your rights or choices.

What Are Cookies?

Cookies are small text files placed on your device when you visit a website or interact with certain online content. They help websites recognize your browser or device, remember your preferences, support essential functionality, and improve the overall user experience.

In this Cookie Policy, the term “cookies” also includes similar technologies such as pixels, tags, web beacons, and other tracking tools that perform comparable functions.

Why We Use Cookies

We use cookies to help our website function properly, remember user preferences, enhance website performance, understand how visitors interact with our pages, and support security, analytics, and marketing activities where permitted by law.

We use cookies to keep our website functional, secure, efficient, and more relevant to your browsing experience.

Categories of Cookies We Use

Strictly Necessary Cookies

These cookies are essential for the operation of the website and cannot be disabled in our systems where they are required to provide the service you request. They are typically set in response to actions such as setting privacy preferences, signing in, or submitting forms.

Without these cookies, certain parts of the website may not function correctly.

Functional Cookies

Functional cookies enable enhanced features and personalization, such as remembering your preferences, language settings, or previously selected options. These cookies may be set by us or by third-party providers whose services are integrated into our website.

If you disable these cookies, some services or features may not work as intended.

Performance and Analytics Cookies

These cookies help us understand how visitors use our website by collecting information such as traffic sources, page visits, navigation behavior, and general interaction patterns. In many cases, this information is aggregated and does not directly identify individual users.

We use this information to improve website performance, usability, and content relevance.

Targeting and Advertising Cookies

These cookies may be placed by our advertising or marketing partners to help deliver more relevant ads and measure the effectiveness of campaigns. They may use information about your browsing activity across different websites and services to build a profile of your interests.

These cookies generally do not store directly identifying personal information, but they may identify your browser or device.

First-Party and Third-Party Cookies

Some cookies are set directly by our website and are referred to as first-party cookies. Other cookies are set by third-party services, such as analytics providers, embedded content providers, or advertising partners, and are referred to as third-party cookies.

Third-party providers may use their own cookies in accordance with their own privacy and cookie policies.

Information Collected Through Cookies

Depending on the type of cookie used, the information collected may include browser type, device type, IP address, referring website, pages viewed, time spent on pages, clickstream behavior, and general usage patterns.

This information helps us maintain the website, improve performance, enhance security, and provide a better user experience.

Your Cookie Choices

You can control or disable cookies through your browser settings and, where available, through our cookie consent or preference management tools. Depending on your location, you may also have the right to accept or reject certain categories of cookies, especially those used for analytics, personalization, or advertising purposes.

Please note that blocking or deleting certain cookies may affect the availability, functionality, or performance of some parts of the website.

Restricting cookies may limit certain features and reduce the quality of your experience on the website.

Cookies in Mobile Applications

Where our mobile applications use cookie-like technologies, they are generally limited to those required for core functionality, security, and service delivery. Disabling these essential technologies may affect the normal operation of the application.

We do not use essential mobile application cookies to store unnecessary personal information.

How to Manage Cookies

Most web browsers allow you to manage cookies through browser settings. You can usually choose to block, delete, or receive alerts before cookies are stored. Because browser controls vary, please refer to your browser provider’s support documentation for details on how to manage cookie settings.

Contact Us

If you have any questions about this Cookie Policy or our use of cookies and similar technologies, please contact us at support@becke.cc .