Description
Session Traversal Utilities for NAT (STUN) is a client-server protocol defined by the IETF and adopted within 3GPP standards to assist applications in dealing with Network Address Translation (NAT) and firewall obstacles. It operates by having a STUN client, typically residing in a User Equipment (UE) or application server, send requests to a STUN server located on the public internet. The server echoes back the request, allowing the client to discern its public IP address and port as seen by the server—the NAT binding. This process, known as NAT discovery, is the foundational mechanism. Beyond simple discovery, STUN provides methods for keeping these NAT bindings alive through periodic keep-alive messages, preventing premature timeout and port closure by intermediary NAT devices, which is vital for maintaining ongoing sessions. Furthermore, STUN can be used in connectivity checks between two endpoints, a critical step in the Interactive Connectivity Establishment (ICE) framework to establish direct peer-to-peer media paths. Within the 3GPP architecture, STUN is often employed in the IP Multimedia Subsystem (IMS) for enabling real-time communication services, ensuring that SIP-based sessions can traverse the complex network boundaries between operator networks, private enterprise networks, and the public internet. Its role is integral to the successful deployment of services that require end-to-end IP connectivity, such as Voice over LTE (VoLTE) and Video over LTE (ViLTE).
Purpose & Motivation
STUN was created to solve the fundamental problem of establishing direct communication between devices located behind NATs, a common scenario in modern IP networks including mobile broadband. Prior to STUN and similar techniques, NATs acted as opaque barriers, making it difficult for an internal host to be contacted from the outside, which broke many peer-to-peer protocols. This limitation hindered the deployment of real-time, bidirectional communication services like voice and video calls over IP. STUN provides a standardized, lightweight method for an endpoint to determine the nature of the NAT it is behind and to learn the address binding that the NAT has created for its outgoing traffic. This knowledge is the first step in establishing a communication channel. Its integration into 3GPP standards, starting in Release 7, was motivated by the need to support IMS-based services in all network environments, including those where UEs are behind carrier-grade NATs (CGNAT) in mobile networks or firewalls in fixed broadband access. It addresses the limitations of earlier, often proprietary, NAT traversal methods by providing an interoperable toolkit that works in concert with other protocols like TURN and ICE to ensure reliable connectivity.
What changed in its specifications
The latest release-to-release comparison of specifications that define STUN. Each summary describes the whole specification, not only this term.
Rel-19 TS 23.228 adds SBI service operations for IMS data channels, event subscription, and user information, plus HSS lookup of the serving IMS AS. It adds PS Data Off handling for IMS Data Channel services and Multimedia Priority Service for Messaging.
Full comparison in TS 23.228 →EVS Codec Extension for Immersive Voice and Audio Services adds handling procedures and references for the IVAS speech codec.
Full comparison in TS 23.333 →Release Timeline
Detected Changes Across Releases
from 3GPP Change RequestsSpecific changes extracted from the „Change history“ tables of 3GPP specifications (3 CRs across 1 releases). Complements the general historical overview above with the evidence-based evolution of this function.
Defining Specifications
3GPP specifications that define or reference STUN, with the latest known release. Sourced from the 3GPP document catalog — see methodology.
| Specification | Title | Release |
|---|---|---|
| TS 23.228 vk10 | IP Multimedia Core Network Subsystem | Rel-20 read |
| TS 23.333 vj00 | MRFC-MRFP Mp Interface Requirements | Rel-19 read |
| TS 23.334 vj00 | IMS-ALG to IMS-AGW Interface (Iq) Stage 2 | Rel-19 read |
| TS 24.229 vk10 | IMS SIP/SDP Call Control Protocol | Rel-20 read |
| TS 26.506 vk00 | 5G Real-Time Media Communication Architecture | Rel-20 read |
| TR 26.998 vj00 | 5G AR/MR Glasses Integration Study | Rel-19 read |
| TS 29.162 vj00 | IMS-IP Network Interworking | Rel-19 read |
| TS 29.163 vj00 | Interworking between 3GPP IM CN and CS networks | Rel-19 read |
| TS 29.232 vj00 | Mc Interface Protocol Profile | Rel-19 read |
| TS 29.235 vj00 | SIP-I CS Core Network Interworking | Rel-19 read |
| TS 29.238 vj00 | H.248 Profile for IBCF-TrGW Interface | Rel-19 read |
| TS 29.332 vj00 | MGCF-IM-MGW Interface Protocol (Mn) | Rel-19 read |
| TS 29.333 vj00 | MRFC-MRFP Mp Interface Protocol | Rel-19 read |
| TS 29.334 vj00 | IMS-ALG to IMS-AGW Interface Protocol | Rel-19 read |