Menu
Latest
12 meetings · Prague, Jeju · 12–16 Oct
Reports
RAN1#126-bis · SA2#177

Glossary term · Protocol

STUN

Simple Traversal of UDP Through NAT

Protocol →

STUN is a protocol toolkit that allows devices behind a NAT to discover their public address bindings, keep them open, and validate connectivity for peer-to-peer and real-time communications.

Introduced
Rel-7
Where
Core Network › Evolved Packet Core
Specifications
14 specs
Also in
Services
STUN Description Purpose What changed Neighbours Detected Changes Specifications

Description

STUN (Simple Traversal of UDP Through NAT) is a protocol defined by the IETF and referenced in 3GPP specifications for IP multimedia subsystem (IMS) and other services. It provides a set of functions that enable applications to traverse Network Address Translators (NATs), which are widely deployed in enterprise and residential networks. NATs modify IP addresses and port numbers, breaking end-to-end connectivity for protocols like SIP and RTP. STUN allows endpoints to discover the public IP address and port allocated by the NAT, and to keep that binding alive.

The core mechanism of STUN involves a client sending a Binding Request to a STUN server on the public Internet. The server responds with a Binding Response containing the source IP address and port as observed by the server, which reflects the NAT's external mapping. The client can then use this information in signaling (e.g., SDP in SIP) to inform the remote peer where to send media. STUN also includes mechanisms for keepalives (to prevent NAT bindings from expiring) and for connectivity checks (used in ICE, Interactive Connectivity Establishment).

In 3GPP, STUN is referenced in specifications such as TS 23.228 (IMS), TS 23.333 (Multimedia Resource Function Controller), TS 23.334 (IMS Application Level Gateway), TS 24.229 (IMS call control), and various others related to IMS and service enablers. It is used in conjunction with ICE and TURN (Traversal Using Relays around NAT) to establish media paths through NATs and firewalls. The IMS ALG (Application Level Gateway) may also use STUN to manage NAT bindings for SIP signaling.

STUN operates over UDP (and optionally TCP) and uses a simple request/response model. It defines attributes for various purposes, including XOR-MAPPED-ADDRESS (to avoid NAT rewriting of the address), MESSAGE-INTEGRITY (for authentication), and FINGERPRINT (for demultiplexing). The protocol is lightweight and designed to be stateless on the server side, allowing scalability. Security considerations include preventing amplification attacks and ensuring that responses are not spoofed.

The evolution of STUN from its original definition in RFC 3489 to the revised RFC 5389 (and later RFC 8489) reflects improvements in security, efficiency, and support for IPv6. 3GPP specifications updated their references accordingly, ensuring alignment with the latest IETF standards. STUN remains a critical component for enabling VoIP, video calls, and other real-time services over the Internet and within operator networks.

Purpose & Motivation

STUN was created to solve the problem of NAT traversal for UDP-based applications. NATs were introduced to conserve IPv4 addresses and provide a basic level of security, but they break the end-to-end principle of the Internet. Applications that rely on receiving incoming packets (e.g., VoIP, online gaming) cannot function if they are behind a NAT without a mechanism to discover and use the NAT's external mapping. STUN provides a standardized way for endpoints to learn their public address and port, and to keep the binding open, thus enabling peer-to-peer communication.

Before STUN, applications used proprietary or ad-hoc methods to discover NAT bindings, which were unreliable and not interoperable. STUN standardized this process, allowing different vendors' equipment to work together. It also introduced security features to prevent abuse, such as authentication and message integrity. In 3GPP networks, STUN is essential for IMS-based services, where UEs may be behind NATs in fixed or mobile access networks. It allows the IMS core to establish media sessions without requiring manual configuration or always-on VPNs.

The protocol continues to evolve to address new challenges, such as carrier-grade NAT (CGN) and IPv6 transition. Its inclusion in 3GPP specifications ensures that mobile operators can deploy IMS and other IP services with confidence that NAT traversal will work across a wide range of devices and networks.

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.

TS 23.228Rel-18 → Rel-19

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 →
TS 23.333Rel-17 → Rel-18

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 Requests

Specific 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.

Rel-17 3 changes
  • Update of IETF references for ICE, STUN and TURN TS 23.334CR0177
  • Update of IETF references for ICE, STUN, TURN and IPv6 privacy TS 24.229CR6544
  • Update of IETF references for ICE and STUN TS 29.163CR1078

Defining Specifications

3GPP specifications that define or reference STUN, with the latest known release. Sourced from the 3GPP document catalog — see methodology.

SpecificationTitleRelease
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