| STUN, Simple Traversal of UDP Through NAT |
| Description | Glossary | RFCs | Publications | Obsolete RFCs |
| Protocol suite: | TCP/IP. |
| Type: | Application layer protocol. |
| Port: | 3478 (TCP, UDP). |
| MIME subtype: | |
| SNMP MIBs: | |
| Working groups: | behave, Behavior Engineering for Hindrance Avoidance. |
| Links: |
A lightweight protocol that allows applications to discover the presence and types of Network Address Translators and firewalls between them and the public Internet. It also provides the ability for applications to determine the public IP addresses allocated to them by the NAT. STUN works with many existing NATs, and does not require any special behavior from them. As a result, it allows a wide variety of applications to work through existing NAT infrastructure.
| MAC header | IP header | TCP header | STUN header | Data ::: |
| MAC header | IP header | UDP header | STUN header | Data ::: |
STUN header:
| 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Length | ||||||||||||||||||||||||||||||
| Transaction ID - - - | |||||||||||||||||||||||||||||||
| Data ::: | |||||||||||||||||||||||||||||||
Type. 16 bits.
| Type | Description |
|---|---|
| 0x0001 | Binding Request. |
| 0x0002 | Shared Secret Request. |
| 0x0101 | Binding Response. |
| 0x0102 | Shared Secret Response. |
| 0x0111 | Binding Error Response. |
| 0x0112 | Shared Secret Error Response. |
Length.
16 bits.
The size of the message in bytes not including the STUN header.
Transaction ID. 16 bits.
Data. Variable length.
RFCs:
[RFC 3489] STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs).
| Description | Glossary | RFCs | Publications | Obsolete RFCs |