datatracker.ietf.org
Sign in
Version 5.7.1.p2, 2014-10-29
Report a bug

Session Traversal Utilities for NAT (STUN)
RFC 5389

Network Working Group                                       J. Rosenberg
Request for Comments: 5389                                         Cisco
Obsoletes: 3489                                                  R. Mahy
Category: Standards Track                                    P. Matthews
                                                            Unaffiliated
                                                                 D. Wing
                                                                   Cisco
                                                            October 2008

               Session Traversal Utilities for NAT (STUN)

Status of This Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Abstract

   Session Traversal Utilities for NAT (STUN) is a protocol that serves
   as a tool for other protocols in dealing with Network Address
   Translator (NAT) traversal.  It can be used by an endpoint to
   determine the IP address and port allocated to it by a NAT.  It can
   also be used to check connectivity between two endpoints, and as a
   keep-alive protocol to maintain NAT bindings.  STUN works with many
   existing NATs, and does not require any special behavior from them.

   STUN is not a NAT traversal solution by itself.  Rather, it is a tool
   to be used in the context of a NAT traversal solution.  This is an
   important change from the previous version of this specification (RFC
   3489), which presented STUN as a complete solution.

   This document obsoletes RFC 3489.

Table of Contents

1. Introduction ....................................................4
2. Evolution from RFC 3489 .........................................4
3. Overview of Operation ...........................................5
4. Terminology .....................................................8
5. Definitions .....................................................8
6. STUN Message Structure .........................................10
7. Base Protocol Procedures .......................................12
   7.1. Forming a Request or an Indication ........................12
   7.2. Sending the Request or Indication .........................13

Rosenberg, et al.           Standards Track                     [Page 1]
RFC 5389                          STUN                      October 2008

        7.2.1. Sending over UDP ...................................13
        7.2.2. Sending over TCP or TLS-over-TCP ...................14
   7.3. Receiving a STUN Message ..................................16
        7.3.1. Processing a Request ...............................17
               7.3.1.1. Forming a Success or Error Response .......18
               7.3.1.2. Sending the Success or Error Response .....19
        7.3.2. Processing an Indication ...........................19
        7.3.3. Processing a Success Response ......................19
        7.3.4. Processing an Error Response .......................20
8. FINGERPRINT Mechanism ..........................................20
9. DNS Discovery of a Server ......................................21
10. Authentication and Message-Integrity Mechanisms ...............22
   10.1. Short-Term Credential Mechanism ..........................22
        10.1.1. Forming a Request or Indication ...................23
        10.1.2. Receiving a Request or Indication .................23
        10.1.3. Receiving a Response ..............................24
   10.2. Long-Term Credential Mechanism ...........................24
        10.2.1. Forming a Request .................................25
               10.2.1.1. First Request ............................25
               10.2.1.2. Subsequent Requests ......................26
        10.2.2. Receiving a Request ...............................26
        10.2.3. Receiving a Response ..............................27
11. ALTERNATE-SERVER Mechanism ....................................28
12. Backwards Compatibility with RFC 3489 .........................28
   12.1. Changes to Client Processing .............................29
   12.2. Changes to Server Processing .............................29
13. Basic Server Behavior .........................................30
14. STUN Usages ...................................................30
15. STUN Attributes ...............................................31
   15.1. MAPPED-ADDRESS ...........................................32
   15.2. XOR-MAPPED-ADDRESS .......................................33
   15.3. USERNAME .................................................34

[include full document text]