draft-ietf-tram-turnbis-24.txt   draft-ietf-tram-turnbis-25.txt 
TRAM WG T. Reddy, Ed. TRAM WG T. Reddy, Ed.
Internet-Draft McAfee Internet-Draft McAfee
Obsoletes: 5766, 6156 (if approved) A. Johnston, Ed. Obsoletes: 5766, 6156 (if approved) A. Johnston, Ed.
Intended status: Standards Track Villanova University Intended status: Standards Track Villanova University
Expires: October 27, 2019 P. Matthews Expires: November 15, 2019 P. Matthews
Alcatel-Lucent Alcatel-Lucent
J. Rosenberg J. Rosenberg
jdrosen.net jdrosen.net
April 25, 2019 May 14, 2019
Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Using Relays around NAT (TURN): Relay Extensions to Session
Traversal Utilities for NAT (STUN) Traversal Utilities for NAT (STUN)
draft-ietf-tram-turnbis-24 draft-ietf-tram-turnbis-25
Abstract Abstract
If a host is located behind a NAT, then in certain situations it can If a host is located behind a NAT, then in certain situations it can
be impossible for that host to communicate directly with other hosts be impossible for that host to communicate directly with other hosts
(peers). In these situations, it is necessary for the host to use (peers). In these situations, it is necessary for the host to use
the services of an intermediate node that acts as a communication the services of an intermediate node that acts as a communication
relay. This specification defines a protocol, called TURN (Traversal relay. This specification defines a protocol, called TURN (Traversal
Using Relays around NAT), that allows the host to control the Using Relays around NAT), that allows the host to control the
operation of the relay and to exchange packets with its peers using operation of the relay and to exchange packets with its peers using
skipping to change at page 2, line 4 skipping to change at page 2, line 4
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 27, 2019. This Internet-Draft will expire on November 15, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 24 skipping to change at page 3, line 24
12.2. Receiving a ChannelBind Request . . . . . . . . . . . . 47 12.2. Receiving a ChannelBind Request . . . . . . . . . . . . 47
12.3. Receiving a ChannelBind Response . . . . . . . . . . . . 48 12.3. Receiving a ChannelBind Response . . . . . . . . . . . . 48
12.4. The ChannelData Message . . . . . . . . . . . . . . . . 48 12.4. The ChannelData Message . . . . . . . . . . . . . . . . 48
12.5. Sending a ChannelData Message . . . . . . . . . . . . . 49 12.5. Sending a ChannelData Message . . . . . . . . . . . . . 49
12.6. Receiving a ChannelData Message . . . . . . . . . . . . 49 12.6. Receiving a ChannelData Message . . . . . . . . . . . . 49
12.7. Relaying Data from the Peer . . . . . . . . . . . . . . 50 12.7. Relaying Data from the Peer . . . . . . . . . . . . . . 50
13. Packet Translations . . . . . . . . . . . . . . . . . . . . . 51 13. Packet Translations . . . . . . . . . . . . . . . . . . . . . 51
13.1. IPv4-to-IPv6 Translations . . . . . . . . . . . . . . . 51 13.1. IPv4-to-IPv6 Translations . . . . . . . . . . . . . . . 51
13.2. IPv6-to-IPv6 Translations . . . . . . . . . . . . . . . 52 13.2. IPv6-to-IPv6 Translations . . . . . . . . . . . . . . . 52
13.3. IPv6-to-IPv4 Translations . . . . . . . . . . . . . . . 53 13.3. IPv6-to-IPv4 Translations . . . . . . . . . . . . . . . 53
14. IP Header Fields . . . . . . . . . . . . . . . . . . . . . . 54 14. IP Header Fields for UDP-to-UDP translation . . . . . . . . . 54
15. STUN Methods . . . . . . . . . . . . . . . . . . . . . . . . 56 15. IP Header Fields for TCP-to-UDP translation . . . . . . . . . 56
16. STUN Attributes . . . . . . . . . . . . . . . . . . . . . . . 56 16. STUN Methods . . . . . . . . . . . . . . . . . . . . . . . . 59
16.1. CHANNEL-NUMBER . . . . . . . . . . . . . . . . . . . . . 57 17. STUN Attributes . . . . . . . . . . . . . . . . . . . . . . . 59
16.2. LIFETIME . . . . . . . . . . . . . . . . . . . . . . . . 57 17.1. CHANNEL-NUMBER . . . . . . . . . . . . . . . . . . . . . 60
16.3. XOR-PEER-ADDRESS . . . . . . . . . . . . . . . . . . . . 57 17.2. LIFETIME . . . . . . . . . . . . . . . . . . . . . . . . 60
16.4. DATA . . . . . . . . . . . . . . . . . . . . . . . . . . 57 17.3. XOR-PEER-ADDRESS . . . . . . . . . . . . . . . . . . . . 60
16.5. XOR-RELAYED-ADDRESS . . . . . . . . . . . . . . . . . . 57 17.4. DATA . . . . . . . . . . . . . . . . . . . . . . . . . . 60
16.6. REQUESTED-ADDRESS-FAMILY . . . . . . . . . . . . . . . . 58 17.5. XOR-RELAYED-ADDRESS . . . . . . . . . . . . . . . . . . 60
16.7. EVEN-PORT . . . . . . . . . . . . . . . . . . . . . . . 58 17.6. REQUESTED-ADDRESS-FAMILY . . . . . . . . . . . . . . . . 61
16.8. REQUESTED-TRANSPORT . . . . . . . . . . . . . . . . . . 59 17.7. EVEN-PORT . . . . . . . . . . . . . . . . . . . . . . . 61
16.9. DONT-FRAGMENT . . . . . . . . . . . . . . . . . . . . . 59 17.8. REQUESTED-TRANSPORT . . . . . . . . . . . . . . . . . . 62
16.10. RESERVATION-TOKEN . . . . . . . . . . . . . . . . . . . 59 17.9. DONT-FRAGMENT . . . . . . . . . . . . . . . . . . . . . 62
16.11. ADDITIONAL-ADDRESS-FAMILY . . . . . . . . . . . . . . . 59 17.10. RESERVATION-TOKEN . . . . . . . . . . . . . . . . . . . 62
16.12. ADDRESS-ERROR-CODE Attribute . . . . . . . . . . . . . . 60 17.11. ADDITIONAL-ADDRESS-FAMILY . . . . . . . . . . . . . . . 62
16.13. ICMP Attribute . . . . . . . . . . . . . . . . . . . . . 60 17.12. ADDRESS-ERROR-CODE Attribute . . . . . . . . . . . . . . 63
17. STUN Error Response Codes . . . . . . . . . . . . . . . . . . 61 17.13. ICMP Attribute . . . . . . . . . . . . . . . . . . . . . 63
18. Detailed Example . . . . . . . . . . . . . . . . . . . . . . 62 18. STUN Error Response Codes . . . . . . . . . . . . . . . . . . 64
19. Security Considerations . . . . . . . . . . . . . . . . . . . 70 19. Detailed Example . . . . . . . . . . . . . . . . . . . . . . 65
19.1. Outsider Attacks . . . . . . . . . . . . . . . . . . . . 70 20. Security Considerations . . . . . . . . . . . . . . . . . . . 73
19.1.1. Obtaining Unauthorized Allocations . . . . . . . . . 70 20.1. Outsider Attacks . . . . . . . . . . . . . . . . . . . . 73
19.1.2. Offline Dictionary Attacks . . . . . . . . . . . . . 70 20.1.1. Obtaining Unauthorized Allocations . . . . . . . . . 73
19.1.3. Faked Refreshes and Permissions . . . . . . . . . . 71 20.1.2. Offline Dictionary Attacks . . . . . . . . . . . . . 73
19.1.4. Fake Data . . . . . . . . . . . . . . . . . . . . . 71 20.1.3. Faked Refreshes and Permissions . . . . . . . . . . 74
19.1.5. Impersonating a Server . . . . . . . . . . . . . . . 72 20.1.4. Fake Data . . . . . . . . . . . . . . . . . . . . . 74
19.1.6. Eavesdropping Traffic . . . . . . . . . . . . . . . 72 20.1.5. Impersonating a Server . . . . . . . . . . . . . . . 75
19.1.7. TURN Loop Attack . . . . . . . . . . . . . . . . . . 73 20.1.6. Eavesdropping Traffic . . . . . . . . . . . . . . . 75
19.2. Firewall Considerations . . . . . . . . . . . . . . . . 73 20.1.7. TURN Loop Attack . . . . . . . . . . . . . . . . . . 76
19.2.1. Faked Permissions . . . . . . . . . . . . . . . . . 74
19.2.2. Blacklisted IP Addresses . . . . . . . . . . . . . . 74 20.2. Firewall Considerations . . . . . . . . . . . . . . . . 76
19.2.3. Running Servers on Well-Known Ports . . . . . . . . 75 20.2.1. Faked Permissions . . . . . . . . . . . . . . . . . 77
19.3. Insider Attacks . . . . . . . . . . . . . . . . . . . . 75 20.2.2. Blacklisted IP Addresses . . . . . . . . . . . . . . 77
19.3.1. DoS against TURN Server . . . . . . . . . . . . . . 75 20.2.3. Running Servers on Well-Known Ports . . . . . . . . 78
19.3.2. Anonymous Relaying of Malicious Traffic . . . . . . 75 20.3. Insider Attacks . . . . . . . . . . . . . . . . . . . . 78
19.3.3. Manipulating Other Allocations . . . . . . . . . . . 76 20.3.1. DoS against TURN Server . . . . . . . . . . . . . . 78
19.4. Tunnel Amplification Attack . . . . . . . . . . . . . . 76 20.3.2. Anonymous Relaying of Malicious Traffic . . . . . . 78
19.5. Other Considerations . . . . . . . . . . . . . . . . . . 77 20.3.3. Manipulating Other Allocations . . . . . . . . . . . 79
20. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 77 20.4. Tunnel Amplification Attack . . . . . . . . . . . . . . 79
21. IAB Considerations . . . . . . . . . . . . . . . . . . . . . 78 20.5. Other Considerations . . . . . . . . . . . . . . . . . . 80
22. Changes since RFC 5766 . . . . . . . . . . . . . . . . . . . 80 21. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 80
23. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 80 22. IAB Considerations . . . . . . . . . . . . . . . . . . . . . 81
24. References . . . . . . . . . . . . . . . . . . . . . . . . . 81 23. Changes since RFC 5766 . . . . . . . . . . . . . . . . . . . 83
24.1. Normative References . . . . . . . . . . . . . . . . . . 81 24. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 83
24.2. Informative References . . . . . . . . . . . . . . . . . 83 25. References . . . . . . . . . . . . . . . . . . . . . . . . . 84
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 86 25.1. Normative References . . . . . . . . . . . . . . . . . . 84
25.2. Informative References . . . . . . . . . . . . . . . . . 86
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 89
1. Introduction 1. Introduction
A host behind a NAT may wish to exchange packets with other hosts, A host behind a NAT may wish to exchange packets with other hosts,
some of which may also be behind NATs. To do this, the hosts some of which may also be behind NATs. To do this, the hosts
involved can use "hole punching" techniques (see [RFC5128]) in an involved can use "hole punching" techniques (see [RFC5128]) in an
attempt discover a direct communication path; that is, a attempt discover a direct communication path; that is, a
communication path that goes from one host to another through communication path that goes from one host to another through
intervening NATs and routers, but does not traverse any relays. intervening NATs and routers, but does not traverse any relays.
skipping to change at page 5, line 7 skipping to change at page 5, line 8
for the server to relay packets to and from certain other hosts for the server to relay packets to and from certain other hosts
(called peers) and can control aspects of how the relaying is done. (called peers) and can control aspects of how the relaying is done.
The client does this by obtaining an IP address and port on the The client does this by obtaining an IP address and port on the
server, called the relayed transport address. When a peer sends a server, called the relayed transport address. When a peer sends a
packet to the relayed transport address, the server relays the packet to the relayed transport address, the server relays the
transport protocol data from the packet to the client. The client transport protocol data from the packet to the client. The client
knows the peer from which the transport protocol data was relayed by knows the peer from which the transport protocol data was relayed by
the server. If the server receives an ICMP error packet, the server the server. If the server receives an ICMP error packet, the server
also relays certain layer 3/4 header fields from the ICMP header to also relays certain layer 3/4 header fields from the ICMP header to
the client. When the client sends a packet to the server, the server the client. When the client sends a packet to the server, the server
relays the transport protocol data from the packet to the appropriate relays the transport protocol data from the packet to the intended
peer using the relayed transport address as the source. peer using the relayed transport address as the source.
A client using TURN must have some way to communicate the relayed A client using TURN must have some way to communicate the relayed
transport address to its peers, and to learn each peer's IP address transport address to its peers, and to learn each peer's IP address
and port (more precisely, each peer's server-reflexive transport and port (more precisely, each peer's server-reflexive transport
address, see Section 2). How this is done is out of the scope of the address, see Section 2). How this is done is out of the scope of the
TURN protocol. One way this might be done is for the client and TURN protocol. One way this might be done is for the client and
peers to exchange email messages. Another way is for the client and peers to exchange email messages. Another way is for the client and
its peers to use a special-purpose "introduction" or "rendezvous" its peers to use a special-purpose "introduction" or "rendezvous"
protocol (see [RFC5128] for more details). protocol (see [RFC5128] for more details).
skipping to change at page 8, line 22 skipping to change at page 8, line 22
The client uses TURN commands to create and manipulate an ALLOCATION The client uses TURN commands to create and manipulate an ALLOCATION
on the server. An allocation is a data structure on the server. on the server. An allocation is a data structure on the server.
This data structure contains, amongst other things, the RELAYED This data structure contains, amongst other things, the RELAYED
TRANSPORT ADDRESS for the allocation. The relayed transport address TRANSPORT ADDRESS for the allocation. The relayed transport address
is the transport address on the server that peers can use to have the is the transport address on the server that peers can use to have the
server relay data to the client. An allocation is uniquely server relay data to the client. An allocation is uniquely
identified by its relayed transport address. identified by its relayed transport address.
Once an allocation is created, the client can send application data Once an allocation is created, the client can send application data
to the server along with an indication of to which peer the data is to the server along with an indication of to which peer the data is
to be sent, and the server will relay this data to the appropriate to be sent, and the server will relay this data to the intended peer.
peer. The client sends the application data to the server inside a The client sends the application data to the server inside a TURN
TURN message; at the server, the data is extracted from the TURN message; at the server, the data is extracted from the TURN message
message and sent to the peer in a UDP datagram. In the reverse and sent to the peer in a UDP datagram. In the reverse direction, a
direction, a peer can send application data in a UDP datagram to the peer can send application data in a UDP datagram to the relayed
relayed transport address for the allocation; the server will then transport address for the allocation; the server will then
encapsulate this data inside a TURN message and send it to the client encapsulate this data inside a TURN message and send it to the client
along with an indication of which peer sent the data. Since the TURN along with an indication of which peer sent the data. Since the TURN
message always contains an indication of which peer the client is message always contains an indication of which peer the client is
communicating with, the client can use a single allocation to communicating with, the client can use a single allocation to
communicate with multiple peers. communicate with multiple peers.
When the peer is behind a NAT, then the client must identify the peer When the peer is behind a NAT, then the client must identify the peer
using its server-reflexive transport address rather than its host using its server-reflexive transport address rather than its host
transport address. For example, to send application data to Peer A transport address. For example, to send application data to Peer A
in the example above, the client must specify 192.0.2.150:32102 (Peer in the example above, the client must specify 192.0.2.150:32102 (Peer
skipping to change at page 26, line 41 skipping to change at page 26, line 41
An allocation on the server is created using an Allocate transaction. An allocation on the server is created using an Allocate transaction.
7.1. Sending an Allocate Request 7.1. Sending an Allocate Request
The client forms an Allocate request as follows. The client forms an Allocate request as follows.
The client first picks a host transport address. It is RECOMMENDED The client first picks a host transport address. It is RECOMMENDED
that the client pick a currently unused transport address, typically that the client pick a currently unused transport address, typically
by allowing the underlying OS to pick a currently unused port. by allowing the underlying OS to pick a currently unused port.
The client then picks a transport protocol to use between the client The client then picks a transport protocol that the client supports
and the server based on the transport protocols supported by the to use between the client and the server based on the transport
server. The transport protocol MUST be one of UDP, TCP, TLS-over-TCP protocols supported by the server. Since this specification only
or DTLS-over-UDP. Since this specification only allows UDP between allows UDP between the server and the peers, it is RECOMMENDED that
the server and the peers, it is RECOMMENDED that the client pick UDP the client pick UDP unless it has a reason to use a different
unless it has a reason to use a different transport. One reason to transport. One reason to pick a different transport would be that
pick a different transport would be that the client believes, either the client believes, either through configuration or discovery or by
through configuration or discovery or by experiment, that it is experiment, that it is unable to contact any TURN server using UDP.
unable to contact any TURN server using UDP. See Section 2.1 for See Section 2.1 for more discussion.
more discussion.
The client also picks a server transport address, which SHOULD be The client also picks a server transport address, which SHOULD be
done as follows. The client uses one or more procedures described in done as follows. The client uses one or more procedures described in
[RFC8155] to discover a TURN server and uses the TURN server [RFC8155] to discover a TURN server and uses the TURN server
resolution mechanism defined in [RFC5928] and [RFC7350] to get a list resolution mechanism defined in [RFC5928] and [RFC7350] to get a list
of server transport addresses that can be tried to create a TURN of server transport addresses that can be tried to create a TURN
allocation. allocation.
The client MUST include a REQUESTED-TRANSPORT attribute in the The client MUST include a REQUESTED-TRANSPORT attribute in the
request. This attribute specifies the transport protocol between the request. This attribute specifies the transport protocol between the
server and the peers (note that this is NOT the transport protocol server and the peers (note that this is NOT the transport protocol
that appears in the 5-tuple). In this specification, the REQUESTED- that appears in the 5-tuple). In this specification, the REQUESTED-
TRANSPORT type is always UDP. This attribute is included to allow TRANSPORT type is always UDP. This attribute is included to allow
skipping to change at page 28, line 52 skipping to change at page 28, line 52
of this document. of this document.
2. The server checks if the 5-tuple is currently in use by an 2. The server checks if the 5-tuple is currently in use by an
existing allocation. If yes, the server rejects the request existing allocation. If yes, the server rejects the request
with a 437 (Allocation Mismatch) error. with a 437 (Allocation Mismatch) error.
3. The server checks if the request contains a REQUESTED-TRANSPORT 3. The server checks if the request contains a REQUESTED-TRANSPORT
attribute. If the REQUESTED-TRANSPORT attribute is not included attribute. If the REQUESTED-TRANSPORT attribute is not included
or is malformed, the server rejects the request with a 400 (Bad or is malformed, the server rejects the request with a 400 (Bad
Request) error. Otherwise, if the attribute is included but Request) error. Otherwise, if the attribute is included but
specifies a protocol other that UDP that is not supported by the specifies a protocol other than UDP that is not supported by the
server, the server rejects the request with a 442 (Unsupported server, the server rejects the request with a 442 (Unsupported
Transport Protocol) error. Transport Protocol) error.
4. The request may contain a DONT-FRAGMENT attribute. If it does, 4. The request may contain a DONT-FRAGMENT attribute. If it does,
but the server does not support sending UDP datagrams with the but the server does not support sending UDP datagrams with the
DF bit set to 1 (see Section 14), then the server treats the DF bit set to 1 (see Section 14), then the server treats the
DONT-FRAGMENT attribute in the Allocate request as an unknown DONT-FRAGMENT attribute in the Allocate request as an unknown
comprehension-required attribute. comprehension-required attribute.
5. The server checks if the request contains a RESERVATION-TOKEN 5. The server checks if the request contains a RESERVATION-TOKEN
skipping to change at page 54, line 32 skipping to change at page 54, line 32
reported in the ICMP message by 48 bytes to allow room for the reported in the ICMP message by 48 bytes to allow room for the
overhead of a Data indication. overhead of a Data indication.
Alternate behavior: The TURN server assembles incoming fragments. Alternate behavior: The TURN server assembles incoming fragments.
The TURN server follows its default behavior to send outgoing The TURN server follows its default behavior to send outgoing
packets. packets.
For both preferred and alternate behavior, the DONT-FRAGMENT For both preferred and alternate behavior, the DONT-FRAGMENT
attribute MUST be ignored by the server. attribute MUST be ignored by the server.
14. IP Header Fields 14. IP Header Fields for UDP-to-UDP translation
This section describes how the server sets various fields in the IP This section describes how the server sets various fields in the IP
header when relaying between the client and the peer or vice versa. header for UDP-to-UDP translation when relaying between the client
The descriptions in this section apply: (a) when the server sends a and the peer or vice versa. The descriptions in this section apply:
UDP datagram to the peer, or (b) when the server sends a Data (a) when the server sends a UDP datagram to the peer, or (b) when the
indication or ChannelData message to the client over UDP transport. server sends a Data indication or ChannelData message to the client
The descriptions in this section do not apply to TURN messages sent over UDP transport. The descriptions in this section do not apply to
over TCP or TLS transport from the server to the client. TURN messages sent over TCP or TLS transport from the server to the
client.
The descriptions below have two parts: a preferred behavior and an The descriptions below have two parts: a preferred behavior and an
alternate behavior. The server SHOULD implement the preferred alternate behavior. The server SHOULD implement the preferred
behavior, but if that is not possible for a particular field, then it behavior, but if that is not possible for a particular field, then it
SHOULD implement the alternative behavior. SHOULD implement the alternative behavior.
Time to Live (TTL) field Time to Live (TTL) field
Preferred Behavior: If the incoming value is 0, then the drop the Preferred Behavior: If the incoming value is 0, then drop the
incoming packet. Otherwise, set the outgoing Time to Live/Hop incoming packet. Otherwise, set the outgoing Time to Live/Hop
Count to one less than the incoming value. Count to one less than the incoming value.
Alternate Behavior: Set the outgoing value to the default for Alternate Behavior: Set the outgoing value to the default for
outgoing packets. outgoing packets.
Differentiated Services Code Point (DSCP) field [RFC2474] Differentiated Services Code Point (DSCP) field [RFC2474]
Preferred Behavior: Set the outgoing value to the incoming value, Preferred Behavior: Set the outgoing value to the incoming value,
unless the server includes a differentiated services classifier unless the server includes a differentiated services classifier
skipping to change at page 56, line 16 skipping to change at page 56, line 16
packet may be too large for the outgoing link. If this is the packet may be too large for the outgoing link. If this is the
case, then the normal fragmentation rules apply [RFC1122]. case, then the normal fragmentation rules apply [RFC1122].
IPv4 Options IPv4 Options
Preferred Behavior: The outgoing packet is sent without any IPv4 Preferred Behavior: The outgoing packet is sent without any IPv4
options. options.
Alternate Behavior: Same as preferred. Alternate Behavior: Same as preferred.
15. STUN Methods 15. IP Header Fields for TCP-to-UDP translation
This section describes how the server sets various fields in the IP
header for TCP-to-UDP translation when relaying between the client
and the peer, and UDP-to-TCP translation when relaying between the
peer and the client. The descriptions in this section apply: (a)
when the server sends a UDP datagram to the peer, or (b) when the
server sends a Data indication or ChannelData message to the client
over TCP or TLS transport. The descriptions in this section do not
apply to TURN messages sent over UDP transport from the server to the
client.
The descriptions below have two parts: a preferred behavior and an
alternate behavior. The server SHOULD implement the preferred
behavior, but if that is not possible for a particular field, then it
SHOULD implement the alternative behavior.
For the UDP datagram sent to the peer based on Send Indication or
ChannelData message arriving at the TURN server over a TCP Transport,
the server sets various fields in the IP header as follows:
Time to Live (TTL) field
Preferred Behavior: Set to default outgoing value.
Alternate Behavior: Same as preferred.
Differentiated Services Code Point (DSCP) field [RFC2474]
Preferred Behavior: Set the outgoing value to the incoming value,
unless the server includes a differentiated services classifier
and marker [RFC2474]. Note, the TCP connection can only use a
single DSCP code point so inter flow differentiation is not
possible, see Section 5.1 of [RFC7657].
Alternate Behavior: Set the outgoing value to a fixed value, which
by default is Best Effort unless configured otherwise.
In both cases, if the server is immediately adjacent to a
differentiated services classifier and marker, then DSCP MAY be
set to any arbitrary value in the direction towards the
classifier.
Explicit Congestion Notification (ECN) field [RFC3168]
Preferred Behavior: No mechanism is defined to indicate what ECN
value should be used for the outgoing UDP datagrams of an
allocation, therefore set the outgoing value to Not-ECT (=0b00).
Alternate Behavior: Same as preferred.
IPv4 Fragmentation fields
Preferred Behavior: When the server sends a packet to a peer in
response to a Send indication containing the DONT-FRAGMENT
attribute, then set the DF bit in the outgoing IP header to 1. In
all other cases when sending an outgoing packet containing
application data (e.g., Data indication, ChannelData message, or
DONT-FRAGMENT attribute not included in the Send indication), set
the DF bit in the outgoing IP header to 0.
Alternate Behavior: Same as preferred.
IPv6 Fragmentation
Preferred Behavior: If the TCP traffic arrives over IPv4 or IPv6,
the server will ignore the DF bit in the IPv4 header or the
Fragment header in IPv6, and relies on the presence of
DON'T-FRAGMENT attribute in the send indication to not include the
Fragment header for the outgoing IPv6 packet.
Alternate Behavior: Same as preferred.
IPv4 Options
Preferred Behavior: The outgoing packet is sent without any IPv4
options.
Alternate Behavior: Same as preferred.
For the Data indication or ChannelData message sent to the client
over TCP or TLS transport based on the UDP datagram from the peer,
the server sets various fields in the IP header as follows:
Time to Live (TTL) field
Preferred Behavior: If TTL value is zero then drop the packet,
else ignore.
Alternate Behavior: Same as preferred.
Differentiated Services Code Point (DSCP) field [RFC2474]
Preferred Behavior: Ignore the incoming DSCP value, the DSCP value
for the server to client direction of the TCP connection should be
based on the value used for the client to server direction.
Alternate Behavior: Same as preferred.
Explicit Congestion Notification (ECN) field [RFC3168]
Preferred Behavior: Ignore, ECN signals are dropped in the TURN
server for the incoming UDP datagrams from the peer.
Alternate Behavior: Same as preferred.
Fragmentation
Preferred Behavior: Any fragmented packets are reassembled in the
server and then forwarded to the client over the TCP connection.
ICMP messages resulting from the UDP datagrams sent to the peer
MUST be forwarded to the client using TURN's mechanism for
relevant ICMP types and codes.
Alternate Behavior: Same as preferred.
Extension Headers
Preferred behavior: The TURN server sends outgoing packet without
any IPv6 extension headers.
Alternate behavior: Same as preferred.
IPv4 Options
Preferred Behavior: The outgoing packet is sent without any IPv4
options.
Alternate Behavior: Same as preferred.
16. STUN Methods
This section lists the codepoints for the STUN methods defined in This section lists the codepoints for the STUN methods defined in
this specification. See elsewhere in this document for the semantics this specification. See elsewhere in this document for the semantics
of these methods. of these methods.
0x003 : Allocate (only request/response semantics defined) 0x003 : Allocate (only request/response semantics defined)
0x004 : Refresh (only request/response semantics defined) 0x004 : Refresh (only request/response semantics defined)
0x006 : Send (only indication semantics defined) 0x006 : Send (only indication semantics defined)
0x007 : Data (only indication semantics defined) 0x007 : Data (only indication semantics defined)
0x008 : CreatePermission (only request/response semantics defined 0x008 : CreatePermission (only request/response semantics defined
0x009 : ChannelBind (only request/response semantics defined) 0x009 : ChannelBind (only request/response semantics defined)
16. STUN Attributes 17. STUN Attributes
This STUN extension defines the following attributes: This STUN extension defines the following attributes:
0x000C: CHANNEL-NUMBER 0x000C: CHANNEL-NUMBER
0x000D: LIFETIME 0x000D: LIFETIME
0x0010: Reserved (was BANDWIDTH) 0x0010: Reserved (was BANDWIDTH)
0x0012: XOR-PEER-ADDRESS 0x0012: XOR-PEER-ADDRESS
0x0013: DATA 0x0013: DATA
0x0016: XOR-RELAYED-ADDRESS 0x0016: XOR-RELAYED-ADDRESS
0x0017: REQUESTED-ADDRESS-FAMILY 0x0017: REQUESTED-ADDRESS-FAMILY
skipping to change at page 57, line 8 skipping to change at page 60, line 5
TBD-CA: ADDITIONAL-ADDRESS-FAMILY TBD-CA: ADDITIONAL-ADDRESS-FAMILY
TBD-CA: ADDRESS-ERROR-CODE TBD-CA: ADDRESS-ERROR-CODE
TBD-CA: ICMP TBD-CA: ICMP
Some of these attributes have lengths that are not multiples of 4. Some of these attributes have lengths that are not multiples of 4.
By the rules of STUN, any attribute whose length is not a multiple of By the rules of STUN, any attribute whose length is not a multiple of
4 bytes MUST be immediately followed by 1 to 3 padding bytes to 4 bytes MUST be immediately followed by 1 to 3 padding bytes to
ensure the next attribute (if any) would start on a 4-byte boundary ensure the next attribute (if any) would start on a 4-byte boundary
(see [I-D.ietf-tram-stunbis]). (see [I-D.ietf-tram-stunbis]).
16.1. CHANNEL-NUMBER 17.1. CHANNEL-NUMBER
The CHANNEL-NUMBER attribute contains the number of the channel. The The CHANNEL-NUMBER attribute contains the number of the channel. The
value portion of this attribute is 4 bytes long and consists of a value portion of this attribute is 4 bytes long and consists of a
16-bit unsigned integer, followed by a two-octet RFFU (Reserved For 16-bit unsigned integer, followed by a two-octet RFFU (Reserved For
Future Use) field, which MUST be set to 0 on transmission and MUST be Future Use) field, which MUST be set to 0 on transmission and MUST be
ignored on reception. ignored on reception.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Channel Number | RFFU = 0 | | Channel Number | RFFU = 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16.2. LIFETIME 17.2. LIFETIME
The LIFETIME attribute represents the duration for which the server The LIFETIME attribute represents the duration for which the server
will maintain an allocation in the absence of a refresh. The TURN will maintain an allocation in the absence of a refresh. The TURN
client can include the LIFETIME attribute with the desired lifetime client can include the LIFETIME attribute with the desired lifetime
in Allocate and Refresh requests. The value portion of this in Allocate and Refresh requests. The value portion of this
attribute is 4-bytes long and consists of a 32-bit unsigned integral attribute is 4-bytes long and consists of a 32-bit unsigned integral
value representing the number of seconds remaining until expiration. value representing the number of seconds remaining until expiration.
16.3. XOR-PEER-ADDRESS 17.3. XOR-PEER-ADDRESS
The XOR-PEER-ADDRESS specifies the address and port of the peer as The XOR-PEER-ADDRESS specifies the address and port of the peer as
seen from the TURN server. (For example, the peer's server-reflexive seen from the TURN server. (For example, the peer's server-reflexive
transport address if the peer is behind a NAT.) It is encoded in the transport address if the peer is behind a NAT.) It is encoded in the
same way as XOR-MAPPED-ADDRESS [I-D.ietf-tram-stunbis]. same way as XOR-MAPPED-ADDRESS [I-D.ietf-tram-stunbis].
16.4. DATA 17.4. DATA
The DATA attribute is present in all Send and Data indications. The The DATA attribute is present in all Send and Data indications. The
value portion of this attribute is variable length and consists of value portion of this attribute is variable length and consists of
the application data (that is, the data that would immediately follow the application data (that is, the data that would immediately follow
the UDP header if the data was been sent directly between the client the UDP header if the data was been sent directly between the client
and the peer). If the length of this attribute is not a multiple of and the peer). The application data is equivalent to the "UDP user
4, then padding must be added after this attribute. data" and does not include the "surplus area" defined in Section 4 of
[I-D.ietf-tsvwg-udp-options]. If the length of this attribute is not
a multiple of 4, then padding must be added after this attribute.
16.5. XOR-RELAYED-ADDRESS 17.5. XOR-RELAYED-ADDRESS
The XOR-RELAYED-ADDRESS is present in Allocate responses. It The XOR-RELAYED-ADDRESS is present in Allocate responses. It
specifies the address and port that the server allocated to the specifies the address and port that the server allocated to the
client. It is encoded in the same way as XOR-MAPPED-ADDRESS client. It is encoded in the same way as XOR-MAPPED-ADDRESS
[I-D.ietf-tram-stunbis]. [I-D.ietf-tram-stunbis].
16.6. REQUESTED-ADDRESS-FAMILY 17.6. REQUESTED-ADDRESS-FAMILY
This attribute is used in Allocate and Refresh requests to specify This attribute is used in Allocate and Refresh requests to specify
the address type requested by the client. The value of this the address type requested by the client. The value of this
attribute is 4 bytes with the following format: attribute is 4 bytes with the following format:
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Family | Reserved | | Family | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Family: there are two values defined for this field and specified in Family: there are two values defined for this field and specified in
[I-D.ietf-tram-stunbis], Section 14.1: 0x01 for IPv4 addresses and [I-D.ietf-tram-stunbis], Section 14.1: 0x01 for IPv4 addresses and
0x02 for IPv6 addresses. 0x02 for IPv6 addresses.
Reserved: at this point, the 24 bits in the Reserved field MUST be Reserved: at this point, the 24 bits in the Reserved field MUST be
set to zero by the client and MUST be ignored by the server. set to zero by the client and MUST be ignored by the server.
16.7. EVEN-PORT 17.7. EVEN-PORT
This attribute allows the client to request that the port in the This attribute allows the client to request that the port in the
relayed transport address be even, and (optionally) that the server relayed transport address be even, and (optionally) that the server
reserve the next-higher port number. The value portion of this reserve the next-higher port number. The value portion of this
attribute is 1 byte long. Its format is: attribute is 1 byte long. Its format is:
0 0
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
|R| RFFU | |R| RFFU |
skipping to change at page 59, line 5 skipping to change at page 62, line 5
0, no such reservation is requested. 0, no such reservation is requested.
RFFU: Reserved For Future Use. RFFU: Reserved For Future Use.
The other 7 bits of the attribute's value must be set to zero on The other 7 bits of the attribute's value must be set to zero on
transmission and ignored on reception. transmission and ignored on reception.
Since the length of this attribute is not a multiple of 4, padding Since the length of this attribute is not a multiple of 4, padding
must immediately follow this attribute. must immediately follow this attribute.
16.8. REQUESTED-TRANSPORT 17.8. REQUESTED-TRANSPORT
This attribute is used by the client to request a specific transport This attribute is used by the client to request a specific transport
protocol for the allocated transport address. The value of this protocol for the allocated transport address. The value of this
attribute is 4 bytes with the following format: attribute is 4 bytes with the following format:
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol | RFFU | | Protocol | RFFU |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Protocol field specifies the desired protocol. The codepoints The Protocol field specifies the desired protocol. The codepoints
used in this field are taken from those allowed in the Protocol field used in this field are taken from those allowed in the Protocol field
in the IPv4 header and the NextHeader field in the IPv6 header in the IPv4 header and the NextHeader field in the IPv6 header
[Protocol-Numbers]. This specification only allows the use of [Protocol-Numbers]. This specification only allows the use of
codepoint 17 (User Datagram Protocol). codepoint 17 (User Datagram Protocol).
The RFFU field MUST be set to zero on transmission and MUST be The RFFU field MUST be set to zero on transmission and MUST be
ignored on reception. It is reserved for future uses. ignored on reception. It is reserved for future uses.
16.9. DONT-FRAGMENT 17.9. DONT-FRAGMENT
This attribute is used by the client to request that the server set This attribute is used by the client to request that the server set
the DF (Don't Fragment) bit in the IP header when relaying the the DF (Don't Fragment) bit in the IP header when relaying the
application data onward to the peer, and for determining the server application data onward to the peer, and for determining the server
capability in Allocate requests. This attribute has no value part capability in Allocate requests. This attribute has no value part
and thus the attribute length field is 0. and thus the attribute length field is 0.
16.10. RESERVATION-TOKEN 17.10. RESERVATION-TOKEN
The RESERVATION-TOKEN attribute contains a token that uniquely The RESERVATION-TOKEN attribute contains a token that uniquely
identifies a relayed transport address being held in reserve by the identifies a relayed transport address being held in reserve by the
server. The server includes this attribute in a success response to server. The server includes this attribute in a success response to
tell the client about the token, and the client includes this tell the client about the token, and the client includes this
attribute in a subsequent Allocate request to request the server use attribute in a subsequent Allocate request to request the server use
that relayed transport address for the allocation. that relayed transport address for the allocation.
The attribute value is 8 bytes and contains the token value. The attribute value is 8 bytes and contains the token value.
16.11. ADDITIONAL-ADDRESS-FAMILY 17.11. ADDITIONAL-ADDRESS-FAMILY
This attribute is used by clients to request the allocation of a IPv4 This attribute is used by clients to request the allocation of a IPv4
and IPv6 address type from a server. It is encoded in the same way and IPv6 address type from a server. It is encoded in the same way
as REQUESTED-ADDRESS-FAMILY Section 16.6. The ADDITIONAL-ADDRESS- as REQUESTED-ADDRESS-FAMILY Section 17.6. The ADDITIONAL-ADDRESS-
FAMILY attribute MAY be present in Allocate request. The attribute FAMILY attribute MAY be present in Allocate request. The attribute
value of 0x02 (IPv6 address) is the only valid value in Allocate value of 0x02 (IPv6 address) is the only valid value in Allocate
request. request.
16.12. ADDRESS-ERROR-CODE Attribute 17.12. ADDRESS-ERROR-CODE Attribute
This attribute is used by servers to signal the reason for not This attribute is used by servers to signal the reason for not
allocating the requested address family. The value portion of this allocating the requested address family. The value portion of this
attribute is variable length with the following format: attribute is variable length with the following format:
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Family | Reserved |Class| Number | | Family | Reserved |Class| Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 60, line 36 skipping to change at page 63, line 36
Class: The Class represents the hundreds digit of the error code and Class: The Class represents the hundreds digit of the error code and
is defined in section 14.8 of [I-D.ietf-tram-stunbis]. is defined in section 14.8 of [I-D.ietf-tram-stunbis].
Number: this 8-bit field contains the reason server cannot allocate Number: this 8-bit field contains the reason server cannot allocate
one of the requested address types. The error code values could one of the requested address types. The error code values could
be either 440 (unsupported address family) or 508 (insufficient be either 440 (unsupported address family) or 508 (insufficient
capacity). The number representation is defined in section 14.8 capacity). The number representation is defined in section 14.8
of [I-D.ietf-tram-stunbis]. of [I-D.ietf-tram-stunbis].
Reason Phrase: The recommended reason phrases for error codes 440 Reason Phrase: The recommended reason phrases for error codes 440
and 508 are explained in Section 17. The reason phrase MUST be a and 508 are explained in Section 18. The reason phrase MUST be a
UTF-8 [RFC3629] encoded sequence of less than 128 characters UTF-8 [RFC3629] encoded sequence of less than 128 characters
(which can be as long as 509 bytes when encoding them or 763 bytes (which can be as long as 509 bytes when encoding them or 763 bytes
when decoding them). when decoding them).
16.13. ICMP Attribute 17.13. ICMP Attribute
This attribute is used by servers to signal the reason an UDP packet This attribute is used by servers to signal the reason an UDP packet
was dropped. The following is the format of the ICMP attribute. was dropped. The following is the format of the ICMP attribute.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | ICMP Type | ICMP Code | | Reserved | ICMP Type | ICMP Code |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Error Data | | Error Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 61, line 31 skipping to change at page 64, line 31
IPv6. IPv6.
Error Data: This field size is 4 bytes long. If the ICMPv6 type is Error Data: This field size is 4 bytes long. If the ICMPv6 type is
2 (Packet Too Big Message) or ICMPv4 type is 3 ( Destination 2 (Packet Too Big Message) or ICMPv4 type is 3 ( Destination
Unreachable) and Code is 4 (fragmentation needed and DF set), the Unreachable) and Code is 4 (fragmentation needed and DF set), the
Error Data field will be set to the Maximum Transmission Unit of Error Data field will be set to the Maximum Transmission Unit of
the next-hop link (Section 3.2 of [RFC4443]) and Section 4 of the next-hop link (Section 3.2 of [RFC4443]) and Section 4 of
[RFC1191]). For other ICMPv6 types and ICMPv4 types and codes, [RFC1191]). For other ICMPv6 types and ICMPv4 types and codes,
Error Data field MUST be set to zero. Error Data field MUST be set to zero.
17. STUN Error Response Codes 18. STUN Error Response Codes
This document defines the following error response codes: This document defines the following error response codes:
403 (Forbidden): The request was valid but cannot be performed due 403 (Forbidden): The request was valid but cannot be performed due
to administrative or similar restrictions. to administrative or similar restrictions.
437 (Allocation Mismatch): A request was received by the server that 437 (Allocation Mismatch): A request was received by the server that
requires an allocation to be in place, but no allocation exists, requires an allocation to be in place, but no allocation exists,
or a request was received that requires no allocation, but an or a request was received that requires no allocation, but an
allocation exists. allocation exists.
skipping to change at page 62, line 21 skipping to change at page 65, line 21
486 (Allocation Quota Reached): No more allocations using this 486 (Allocation Quota Reached): No more allocations using this
username can be created at the present time. username can be created at the present time.
508 (Insufficient Capacity): The server is unable to carry out the 508 (Insufficient Capacity): The server is unable to carry out the
request due to some capacity limit being reached. In an Allocate request due to some capacity limit being reached. In an Allocate
response, this could be due to the server having no more relayed response, this could be due to the server having no more relayed
transport addresses available at that time, having none with the transport addresses available at that time, having none with the
requested properties, or the one that corresponds to the specified requested properties, or the one that corresponds to the specified
reservation token is not available. reservation token is not available.
18. Detailed Example 19. Detailed Example
This section gives an example of the use of TURN, showing in detail This section gives an example of the use of TURN, showing in detail
the contents of the messages exchanged. The example uses the network the contents of the messages exchanged. The example uses the network
diagram shown in the Overview (Figure 1). diagram shown in the Overview (Figure 1).
For each message, the attributes included in the message and their For each message, the attributes included in the message and their
values are shown. For convenience, values are shown in a human- values are shown. For convenience, values are shown in a human-
readable format rather than showing the actual octets; for example, readable format rather than showing the actual octets; for example,
"XOR-RELAYED-ADDRESS=192.0.2.15:9000" shows that the XOR-RELAYED- "XOR-RELAYED-ADDRESS=192.0.2.15:9000" shows that the XOR-RELAYED-
ADDRESS attribute is included with an address of 192.0.2.15 and a ADDRESS attribute is included with an address of 192.0.2.15 and a
skipping to change at page 70, line 5 skipping to change at page 73, line 5
in Allocate and Refresh messages. When the server receives the in Allocate and Refresh messages. When the server receives the
Refresh request, it notices that the nonce value has expired, and so Refresh request, it notices that the nonce value has expired, and so
replies with 438 (Stale Nonce) error given a new nonce value. The replies with 438 (Stale Nonce) error given a new nonce value. The
client then reattempts the request, this time with the new nonce client then reattempts the request, this time with the new nonce
value. This second attempt is accepted, and the server replies with value. This second attempt is accepted, and the server replies with
a success response. Note that the client did not include a LIFETIME a success response. Note that the client did not include a LIFETIME
attribute in the request, so the server refreshes the allocation for attribute in the request, so the server refreshes the allocation for
the default lifetime of 10 minutes (as can be seen by the LIFETIME the default lifetime of 10 minutes (as can be seen by the LIFETIME
attribute in the success response). attribute in the success response).
19. Security Considerations 20. Security Considerations
This section considers attacks that are possible in a TURN This section considers attacks that are possible in a TURN
deployment, and discusses how they are mitigated by mechanisms in the deployment, and discusses how they are mitigated by mechanisms in the
protocol or recommended practices in the implementation. protocol or recommended practices in the implementation.
Most of the attacks on TURN are mitigated by the server requiring Most of the attacks on TURN are mitigated by the server requiring
requests be authenticated. Thus, this specification requires the use requests be authenticated. Thus, this specification requires the use
of authentication. The mandatory-to-implement mechanism is the long- of authentication. The mandatory-to-implement mechanism is the long-
term credential mechanism of STUN. Other authentication mechanisms term credential mechanism of STUN. Other authentication mechanisms
of equal or stronger security properties may be used. However, it is of equal or stronger security properties may be used. However, it is
important to ensure that they can be invoked in an inter-operable important to ensure that they can be invoked in an inter-operable
way. way.
19.1. Outsider Attacks 20.1. Outsider Attacks
Outsider attacks are ones where the attacker has no credentials in Outsider attacks are ones where the attacker has no credentials in
the system, and is attempting to disrupt the service seen by the the system, and is attempting to disrupt the service seen by the
client or the server. client or the server.
19.1.1. Obtaining Unauthorized Allocations 20.1.1. Obtaining Unauthorized Allocations
An attacker might wish to obtain allocations on a TURN server for any An attacker might wish to obtain allocations on a TURN server for any
number of nefarious purposes. A TURN server provides a mechanism for number of nefarious purposes. A TURN server provides a mechanism for
sending and receiving packets while cloaking the actual IP address of sending and receiving packets while cloaking the actual IP address of
the client. This makes TURN servers an attractive target for the client. This makes TURN servers an attractive target for
attackers who wish to use it to mask their true identity. attackers who wish to use it to mask their true identity.
An attacker might also wish to simply utilize the services of a TURN An attacker might also wish to simply utilize the services of a TURN
server without paying for them. Since TURN services require server without paying for them. Since TURN services require
resources from the provider, it is anticipated that their usage will resources from the provider, it is anticipated that their usage will
come with a cost. come with a cost.
These attacks are prevented using the long-term credential mechanism, These attacks are prevented using the long-term credential mechanism,
which allows the TURN server to determine the identity of the which allows the TURN server to determine the identity of the
requestor and whether the requestor is allowed to obtain the requestor and whether the requestor is allowed to obtain the
allocation. allocation.
19.1.2. Offline Dictionary Attacks 20.1.2. Offline Dictionary Attacks
The long-term credential mechanism used by TURN is subject to offline The long-term credential mechanism used by TURN is subject to offline
dictionary attacks. An attacker that is capable of eavesdropping on dictionary attacks. An attacker that is capable of eavesdropping on
a message exchange between a client and server can determine the a message exchange between a client and server can determine the
password by trying a number of candidate passwords and seeing if one password by trying a number of candidate passwords and seeing if one
of them is correct. This attack works when the passwords are low of them is correct. This attack works when the passwords are low
entropy, such as a word from the dictionary. This attack can be entropy, such as a word from the dictionary. This attack can be
mitigated by using strong passwords with large entropy. In mitigated by using strong passwords with large entropy. In
situations where even stronger mitigation is required, (D)TLS situations where even stronger mitigation is required, (D)TLS
transport between the client and the server can be used. transport between the client and the server can be used.
19.1.3. Faked Refreshes and Permissions 20.1.3. Faked Refreshes and Permissions
An attacker might wish to attack an active allocation by sending it a An attacker might wish to attack an active allocation by sending it a
Refresh request with an immediate expiration, in order to delete it Refresh request with an immediate expiration, in order to delete it
and disrupt service to the client. This is prevented by and disrupt service to the client. This is prevented by
authentication of refreshes. Similarly, an attacker wishing to send authentication of refreshes. Similarly, an attacker wishing to send
CreatePermission requests to create permissions to undesirable CreatePermission requests to create permissions to undesirable
destinations is prevented from doing so through authentication. The destinations is prevented from doing so through authentication. The
motivations for such an attack are described in Section 19.2. motivations for such an attack are described in Section 20.2.
19.1.4. Fake Data 20.1.4. Fake Data
An attacker might wish to send data to the client or the peer, as if An attacker might wish to send data to the client or the peer, as if
they came from the peer or client, respectively. To do that, the they came from the peer or client, respectively. To do that, the
attacker can send the client a faked Data Indication or ChannelData attacker can send the client a faked Data Indication or ChannelData
message, or send the TURN server a faked Send Indication or message, or send the TURN server a faked Send Indication or
ChannelData message. ChannelData message.
Since indications and ChannelData messages are not authenticated, Since indications and ChannelData messages are not authenticated,
this attack is not prevented by TURN. However, this attack is this attack is not prevented by TURN. However, this attack is
generally present in IP-based communications and is not substantially generally present in IP-based communications and is not substantially
skipping to change at page 72, line 19 skipping to change at page 75, line 19
To mitigate this attack, TURN requires that the client establish a To mitigate this attack, TURN requires that the client establish a
permission to a host before sending it data. Thus, an attacker can permission to a host before sending it data. Thus, an attacker can
only attack hosts with which the client is already communicating, only attack hosts with which the client is already communicating,
unless the attacker is able to create authenticated requests. unless the attacker is able to create authenticated requests.
Furthermore, the server administrator may configure the server to Furthermore, the server administrator may configure the server to
restrict the range of IP addresses and ports to which it will relay restrict the range of IP addresses and ports to which it will relay
data. To provide even greater security, the server administrator can data. To provide even greater security, the server administrator can
require that the client use (D)TLS for all communication between the require that the client use (D)TLS for all communication between the
client and the server. client and the server.
19.1.5. Impersonating a Server 20.1.5. Impersonating a Server
When a client learns a relayed address from a TURN server, it uses When a client learns a relayed address from a TURN server, it uses
that relayed address in application protocols to receive traffic. that relayed address in application protocols to receive traffic.
Therefore, an attacker wishing to intercept or redirect that traffic Therefore, an attacker wishing to intercept or redirect that traffic
might try to impersonate a TURN server and provide the client with a might try to impersonate a TURN server and provide the client with a
faked relayed address. faked relayed address.
This attack is prevented through the long-term credential mechanism, This attack is prevented through the long-term credential mechanism,
which provides message integrity for responses in addition to which provides message integrity for responses in addition to
verifying that they came from the server. Furthermore, an attacker verifying that they came from the server. Furthermore, an attacker
cannot replay old server responses as the transaction id in the STUN cannot replay old server responses as the transaction id in the STUN
header prevents this. Replay attacks are further thwarted through header prevents this. Replay attacks are further thwarted through
frequent changes to the nonce value. frequent changes to the nonce value.
19.1.6. Eavesdropping Traffic 20.1.6. Eavesdropping Traffic
TURN concerns itself primarily with authentication and message TURN concerns itself primarily with authentication and message
integrity. Confidentiality is only a secondary concern, as TURN integrity. Confidentiality is only a secondary concern, as TURN
control messages do not include information that is particularly control messages do not include information that is particularly
sensitive. The primary protocol content of the messages is the IP sensitive. The primary protocol content of the messages is the IP
address of the peer. If it is important to prevent an eavesdropper address of the peer. If it is important to prevent an eavesdropper
on a TURN connection from learning this, TURN can be run over (D)TLS. on a TURN connection from learning this, TURN can be run over (D)TLS.
Confidentiality for the application data relayed by TURN is best Confidentiality for the application data relayed by TURN is best
provided by the application protocol itself, since running TURN over provided by the application protocol itself, since running TURN over
(D)TLS does not protect application data between the server and the (D)TLS does not protect application data between the server and the
peer. If confidentiality of application data is important, then the peer. If confidentiality of application data is important, then the
application should encrypt or otherwise protect its data. For application should encrypt or otherwise protect its data. For
example, for real-time media, confidentiality can be provided by example, for real-time media, confidentiality can be provided by
using SRTP. using SRTP.
19.1.7. TURN Loop Attack 20.1.7. TURN Loop Attack
An attacker might attempt to cause data packets to loop indefinitely An attacker might attempt to cause data packets to loop indefinitely
between two TURN servers. The attack goes as follows. First, the between two TURN servers. The attack goes as follows. First, the
attacker sends an Allocate request to server A, using the source attacker sends an Allocate request to server A, using the source
address of server B. Server A will send its response to server B, address of server B. Server A will send its response to server B,
and for the attack to succeed, the attacker must have the ability to and for the attack to succeed, the attacker must have the ability to
either view or guess the contents of this response, so that the either view or guess the contents of this response, so that the
attacker can learn the allocated relayed transport address. The attacker can learn the allocated relayed transport address. The
attacker then sends an Allocate request to server B, using the source attacker then sends an Allocate request to server B, using the source
address of server A. Again, the attacker must be able to view or address of server A. Again, the attacker must be able to view or
skipping to change at page 73, line 48 skipping to change at page 76, line 48
the attacker to have credentials acceptable to the server, which the attacker to have credentials acceptable to the server, which
turns this from an outsider attack into an insider attack and allows turns this from an outsider attack into an insider attack and allows
the attack to be traced back to the client initiating it. the attack to be traced back to the client initiating it.
The attack can be further mitigated by imposing a per-username limit The attack can be further mitigated by imposing a per-username limit
on the bandwidth used to relay data by allocations owned by that on the bandwidth used to relay data by allocations owned by that
username, to limit the impact of this attack on other allocations. username, to limit the impact of this attack on other allocations.
More mitigation can be achieved by decrementing the TTL when relaying More mitigation can be achieved by decrementing the TTL when relaying
data packets (if the underlying OS allows this). data packets (if the underlying OS allows this).
19.2. Firewall Considerations 20.2. Firewall Considerations
A key security consideration of TURN is that TURN should not weaken A key security consideration of TURN is that TURN should not weaken
the protections afforded by firewalls deployed between a client and a the protections afforded by firewalls deployed between a client and a
TURN server. It is anticipated that TURN servers will often be TURN server. It is anticipated that TURN servers will often be
present on the public Internet, and clients may often be inside present on the public Internet, and clients may often be inside
enterprise networks with corporate firewalls. If TURN servers enterprise networks with corporate firewalls. If TURN servers
provide a 'backdoor' for reaching into the enterprise, TURN will be provide a 'backdoor' for reaching into the enterprise, TURN will be
blocked by these firewalls. blocked by these firewalls.
TURN servers therefore emulate the behavior of NAT devices that TURN servers therefore emulate the behavior of NAT devices that
skipping to change at page 74, line 28 skipping to change at page 77, line 28
client, unless the client has tried to contact the attacker first. client, unless the client has tried to contact the attacker first.
It is important to note that some firewalls have policies that are It is important to note that some firewalls have policies that are
even more restrictive than address-dependent filtering. Firewalls even more restrictive than address-dependent filtering. Firewalls
can also be configured with address- and port-dependent filtering, or can also be configured with address- and port-dependent filtering, or
can be configured to disallow inbound traffic entirely. In these can be configured to disallow inbound traffic entirely. In these
cases, if a client is allowed to connect the TURN server, cases, if a client is allowed to connect the TURN server,
communications to the client will be less restrictive than what the communications to the client will be less restrictive than what the
firewall would normally allow. firewall would normally allow.
19.2.1. Faked Permissions 20.2.1. Faked Permissions
In firewalls and NAT devices, permissions are granted implicitly In firewalls and NAT devices, permissions are granted implicitly
through the traversal of a packet from the inside of the network through the traversal of a packet from the inside of the network
towards the outside peer. Thus, a permission cannot, by definition, towards the outside peer. Thus, a permission cannot, by definition,
be created by any entity except one inside the firewall or NAT. With be created by any entity except one inside the firewall or NAT. With
TURN, this restriction no longer holds. Since the TURN server sits TURN, this restriction no longer holds. Since the TURN server sits
outside the firewall, at attacker outside the firewall can now send a outside the firewall, at attacker outside the firewall can now send a
message to the TURN server and try to create a permission for itself. message to the TURN server and try to create a permission for itself.
This attack is prevented because all messages that create permissions This attack is prevented because all messages that create permissions
(i.e., ChannelBind and CreatePermission) are authenticated. (i.e., ChannelBind and CreatePermission) are authenticated.
19.2.2. Blacklisted IP Addresses 20.2.2. Blacklisted IP Addresses
Many firewalls can be configured with blacklists that prevent a Many firewalls can be configured with blacklists that prevent a
client behind the firewall from sending packets to, or receiving client behind the firewall from sending packets to, or receiving
packets from, ranges of blacklisted IP addresses. This is packets from, ranges of blacklisted IP addresses. This is
accomplished by inspecting the source and destination addresses of accomplished by inspecting the source and destination addresses of
packets entering and exiting the firewall, respectively. packets entering and exiting the firewall, respectively.
This feature is also present in TURN, since TURN servers are allowed This feature is also present in TURN, since TURN servers are allowed
to arbitrarily restrict the range of addresses of peers that they to arbitrarily restrict the range of addresses of peers that they
will relay to. will relay to.
19.2.3. Running Servers on Well-Known Ports 20.2.3. Running Servers on Well-Known Ports
A malicious client behind a firewall might try to connect to a TURN A malicious client behind a firewall might try to connect to a TURN
server and obtain an allocation which it then uses to run a server. server and obtain an allocation which it then uses to run a server.
For example, a client might try to run a DNS server or FTP server. For example, a client might try to run a DNS server or FTP server.
This is not possible in TURN. A TURN server will never accept This is not possible in TURN. A TURN server will never accept
traffic from a peer for which the client has not installed a traffic from a peer for which the client has not installed a
permission. Thus, peers cannot just connect to the allocated port in permission. Thus, peers cannot just connect to the allocated port in
order to obtain the service. order to obtain the service.
19.3. Insider Attacks 20.3. Insider Attacks
In insider attacks, a client has legitimate credentials but defies In insider attacks, a client has legitimate credentials but defies
the trust relationship that goes with those credentials. These the trust relationship that goes with those credentials. These
attacks cannot be prevented by cryptographic means but need to be attacks cannot be prevented by cryptographic means but need to be
considered in the design of the protocol. considered in the design of the protocol.
19.3.1. DoS against TURN Server 20.3.1. DoS against TURN Server
A client wishing to disrupt service to other clients might obtain an A client wishing to disrupt service to other clients might obtain an
allocation and then flood it with traffic, in an attempt to swamp the allocation and then flood it with traffic, in an attempt to swamp the
server and prevent it from servicing other legitimate clients. This server and prevent it from servicing other legitimate clients. This
is mitigated by the recommendation that the server limit the amount is mitigated by the recommendation that the server limit the amount
of bandwidth it will relay for a given username. This won't prevent of bandwidth it will relay for a given username. This won't prevent
a client from sending a large amount of traffic, but it allows the a client from sending a large amount of traffic, but it allows the
server to immediately discard traffic in excess. server to immediately discard traffic in excess.
Since each allocation uses a port number on the IP address of the Since each allocation uses a port number on the IP address of the
TURN server, the number of allocations on a server is finite. An TURN server, the number of allocations on a server is finite. An
attacker might attempt to consume all of them by requesting a large attacker might attempt to consume all of them by requesting a large
number of allocations. This is prevented by the recommendation that number of allocations. This is prevented by the recommendation that
the server impose a limit of the number of allocations active at a the server impose a limit of the number of allocations active at a
time for a given username. time for a given username.
19.3.2. Anonymous Relaying of Malicious Traffic 20.3.2. Anonymous Relaying of Malicious Traffic
TURN servers provide a degree of anonymization. A client can send TURN servers provide a degree of anonymization. A client can send
data to peers without revealing its own IP address. TURN servers may data to peers without revealing its own IP address. TURN servers may
therefore become attractive vehicles for attackers to launch attacks therefore become attractive vehicles for attackers to launch attacks
against targets without fear of detection. Indeed, it is possible against targets without fear of detection. Indeed, it is possible
for a client to chain together multiple TURN servers, such that any for a client to chain together multiple TURN servers, such that any
number of relays can be used before a target receives a packet. number of relays can be used before a target receives a packet.
Administrators who are worried about this attack can maintain logs Administrators who are worried about this attack can maintain logs
that capture the actual source IP and port of the client, and perhaps that capture the actual source IP and port of the client, and perhaps
even every permission that client installs. This will allow for even every permission that client installs. This will allow for
forensic tracing to determine the original source, should it be forensic tracing to determine the original source, should it be
discovered that an attack is being relayed through a TURN server. discovered that an attack is being relayed through a TURN server.
19.3.3. Manipulating Other Allocations 20.3.3. Manipulating Other Allocations
An attacker might attempt to disrupt service to other users of the An attacker might attempt to disrupt service to other users of the
TURN server by sending Refresh requests or CreatePermission requests TURN server by sending Refresh requests or CreatePermission requests
that (through source address spoofing) appear to be coming from that (through source address spoofing) appear to be coming from
another user of the TURN server. TURN prevents this by requiring another user of the TURN server. TURN prevents this by requiring
that the credentials used in CreatePermission, Refresh, and that the credentials used in CreatePermission, Refresh, and
ChannelBind messages match those used to create the initial ChannelBind messages match those used to create the initial
allocation. Thus, the fake requests from the attacker will be allocation. Thus, the fake requests from the attacker will be
rejected. rejected.
19.4. Tunnel Amplification Attack 20.4. Tunnel Amplification Attack
An attacker might attempt to cause data packets to loop numerous An attacker might attempt to cause data packets to loop numerous
times between a TURN server and a tunnel between IPv4 and IPv6. The times between a TURN server and a tunnel between IPv4 and IPv6. The
attack goes as follows. attack goes as follows.
Suppose an attacker knows that a tunnel endpoint will forward Suppose an attacker knows that a tunnel endpoint will forward
encapsulated packets from a given IPv6 address (this doesn't encapsulated packets from a given IPv6 address (this doesn't
necessarily need to be the tunnel endpoint's address). Suppose he necessarily need to be the tunnel endpoint's address). Suppose he
then spoofs two packets from this address: then spoofs two packets from this address:
skipping to change at page 77, line 34 skipping to change at page 80, line 34
increase traffic volume by sending multiple packets or by increase traffic volume by sending multiple packets or by
establishing multiple channels spoofed from different addresses establishing multiple channels spoofed from different addresses
behind the same tunnel endpoint. behind the same tunnel endpoint.
The attack is mitigated as follows. It is RECOMMENDED that TURN The attack is mitigated as follows. It is RECOMMENDED that TURN
servers not accept allocation or channel binding requests from servers not accept allocation or channel binding requests from
addresses known to be tunneled, and that they not forward data to addresses known to be tunneled, and that they not forward data to
such addresses. In particular, a TURN server MUST NOT accept Teredo such addresses. In particular, a TURN server MUST NOT accept Teredo
or 6to4 addresses in these requests. or 6to4 addresses in these requests.
19.5. Other Considerations 20.5. Other Considerations
Any relay addresses learned through an Allocate request will not Any relay addresses learned through an Allocate request will not
operate properly with IPsec Authentication Header (AH) [RFC4302] in operate properly with IPsec Authentication Header (AH) [RFC4302] in
transport or tunnel mode. However, tunnel-mode IPsec Encapsulating transport or tunnel mode. However, tunnel-mode IPsec Encapsulating
Security Payload (ESP) [RFC4303] should still operate. Security Payload (ESP) [RFC4303] should still operate.
20. IANA Considerations 21. IANA Considerations
[Paragraphs in braces should be removed by the RFC Editor upon [Paragraphs in braces should be removed by the RFC Editor upon
publication] publication]
The codepoints for the STUN methods defined in this specification are The codepoints for the STUN methods defined in this specification are
listed in Section 15. [IANA is requested to update the reference listed in Section 16. [IANA is requested to update the reference
from [RFC5766] to RFC-to-be for the STUN methods listed in from [RFC5766] to RFC-to-be for the STUN methods listed in
Section 15.] Section 16.]
The codepoints for the STUN attributes defined in this specification The codepoints for the STUN attributes defined in this specification
are listed in Section 16. [IANA is requested to update the reference are listed in Section 17. [IANA is requested to update the reference
from [RFC5766] to RFC-to-be for the STUN attributes CHANNEL-NUMBER, from [RFC5766] to RFC-to-be for the STUN attributes CHANNEL-NUMBER,
LIFETIME, Reserved (was BANDWIDTH), XOR-PEER-ADDRESS, DATA, XOR- LIFETIME, Reserved (was BANDWIDTH), XOR-PEER-ADDRESS, DATA, XOR-
RELAYED-ADDRESS, REQUESTED-ADDRESS-FAMILY, EVEN-PORT, REQUESTED- RELAYED-ADDRESS, REQUESTED-ADDRESS-FAMILY, EVEN-PORT, REQUESTED-
TRANSPORT, DONT-FRAGMENT, Reserved (was TIMER-VAL) and RESERVATION- TRANSPORT, DONT-FRAGMENT, Reserved (was TIMER-VAL) and RESERVATION-
TOKEN listed in Section 16.] TOKEN listed in Section 17.]
[The ADDITIONAL-ADDRESS-FAMILY, ADDRESS-ERROR-CODE and ICMP [The ADDITIONAL-ADDRESS-FAMILY, ADDRESS-ERROR-CODE and ICMP
attributes requires that IANA allocate a value in the "STUN attributes requires that IANA allocate a value in the "STUN
attributes Registry" from the comprehension-optional range attributes Registry" from the comprehension-optional range
(0x8000-0xFFFF), to be replaced for TBD-CA throughout this document] (0x8000-0xFFFF), to be replaced for TBD-CA throughout this document]
The codepoints for the STUN error codes defined in this specification The codepoints for the STUN error codes defined in this specification
are listed in Section 17. [IANA is requested to update the reference are listed in Section 18. [IANA is requested to update the reference
from [RFC5766] to RFC-to-be for the STUN error codes listed in from [RFC5766] to RFC-to-be for the STUN error codes listed in
Section 17.] Section 18.]
IANA has allocated the SRV service name of "turn" for TURN over UDP IANA has allocated the SRV service name of "turn" for TURN over UDP
or TCP, and the service name of "turns" for TURN over (D)TLS. or TCP, and the service name of "turns" for TURN over (D)TLS.
IANA has created a registry for TURN channel numbers, initially IANA has created a registry for TURN channel numbers, initially
populated as follows: populated as follows:
o 0x0000 through 0x3FFF: Reserved and not available for use, since o 0x0000 through 0x3FFF: Reserved and not available for use, since
they conflict with the STUN header. they conflict with the STUN header.
o 0x4000 through 0x4FFF: A TURN implementation is free to use o 0x4000 through 0x4FFF: A TURN implementation is free to use
channel numbers in this range. channel numbers in this range.
o 0x5000 through 0xFFFF: Unassigned. o 0x5000 through 0xFFFF: Unassigned.
Any change to this registry must be made through an IETF Standards Any change to this registry must be made through an IETF Standards
Action. Action.
21. IAB Considerations 22. IAB Considerations
The IAB has studied the problem of "Unilateral Self Address Fixing" The IAB has studied the problem of "Unilateral Self Address Fixing"
(UNSAF), which is the general process by which a client attempts to (UNSAF), which is the general process by which a client attempts to
determine its address in another realm on the other side of a NAT determine its address in another realm on the other side of a NAT
through a collaborative protocol-reflection mechanism [RFC3424]. The through a collaborative protocol-reflection mechanism [RFC3424]. The
TURN extension is an example of a protocol that performs this type of TURN extension is an example of a protocol that performs this type of
function. The IAB has mandated that any protocols developed for this function. The IAB has mandated that any protocols developed for this
purpose document a specific set of considerations. These purpose document a specific set of considerations. These
considerations and the responses for TURN are documented in this considerations and the responses for TURN are documented in this
section. section.
skipping to change at page 80, line 8 skipping to change at page 83, line 8
Consideration 5: Discussion of the impact of the noted practical Consideration 5: Discussion of the impact of the noted practical
issues with existing deployed NATs and experience reports. issues with existing deployed NATs and experience reports.
Response: Some NATs deployed today exhibit a mapping behavior other Response: Some NATs deployed today exhibit a mapping behavior other
than Endpoint-Independent mapping. These NATs are difficult to work than Endpoint-Independent mapping. These NATs are difficult to work
with, as they make it difficult or impossible for protocols like ICE with, as they make it difficult or impossible for protocols like ICE
to use server-reflexive transport addresses on those NATs. A client to use server-reflexive transport addresses on those NATs. A client
behind such a NAT is often forced to use a relay protocol like TURN behind such a NAT is often forced to use a relay protocol like TURN
because "UDP hole punching" techniques [RFC5128] do not work. because "UDP hole punching" techniques [RFC5128] do not work.
22. Changes since RFC 5766 23. Changes since RFC 5766
This section lists the major changes in the TURN protocol from the This section lists the major changes in the TURN protocol from the
original [RFC5766] specification. original [RFC5766] specification.
o IPv6 support. o IPv6 support.
o REQUESTED-ADDRESS-FAMILY, ADDITIONAL-ADDRESS-FAMILY, AND ADDRESS- o REQUESTED-ADDRESS-FAMILY, ADDITIONAL-ADDRESS-FAMILY, AND ADDRESS-
ERR-CODE attributes. ERR-CODE attributes.
o 440 (Address Family not Supported) and 443 (Peer Address Family o 440 (Address Family not Supported) and 443 (Peer Address Family
skipping to change at page 80, line 31 skipping to change at page 83, line 31
o Description of the tunnel amplification attack. o Description of the tunnel amplification attack.
o DTLS support. o DTLS support.
o More details on packet translations. o More details on packet translations.
o Add support for receiving ICMP packets. o Add support for receiving ICMP packets.
o Updates PMTUD. o Updates PMTUD.
23. Acknowledgements 24. Acknowledgements
Most of the text in this note comes from the original TURN Most of the text in this note comes from the original TURN
specification, [RFC5766]. The authors would like to thank Rohan Mahy specification, [RFC5766]. The authors would like to thank Rohan Mahy
co-author of original TURN specification and everyone who had co-author of original TURN specification and everyone who had
contributed to that document. The authors would also like to contributed to that document. The authors would also like to
acknowledge that this document inherits material from [RFC6156]. acknowledge that this document inherits material from [RFC6156].
Thanks to Justin Uberti, Pal Martinsen, Oleg Moskalenko, Aijun Wang Thanks to Justin Uberti, Pal Martinsen, Oleg Moskalenko, Aijun Wang
and Simon Perreault for their help on the ADDITIONAL-ADDRESS-FAMILY and Simon Perreault for their help on the ADDITIONAL-ADDRESS-FAMILY
mechanism. Authors would like to thank Gonzalo Salgueiro, Simon mechanism. Authors would like to thank Gonzalo Salgueiro, Simon
Perreault, Jonathan Lennox, Brandon Williams, Karl Stahl, Noriyuki Perreault, Jonathan Lennox, Brandon Williams, Karl Stahl, Noriyuki
Torii, Nils Ohlmeier, Dan Wing, Justin Uberti and Oleg Moskalenko for Torii, Nils Ohlmeier, Dan Wing, Justin Uberti and Oleg Moskalenko for
comments and review. The authors would like to thank Marc for his comments and review. The authors would like to thank Marc for his
contributions to the text. contributions to the text.
Special thanks to Magnus Westerlund for the detailed AD review. Special thanks to Magnus Westerlund for the detailed AD review.
24. References 25. References
24.1. Normative References 25.1. Normative References
[I-D.ietf-tram-stunbis] [I-D.ietf-tram-stunbis]
Petit-Huguenin, M., Salgueiro, G., Rosenberg, J., Wing, Petit-Huguenin, M., Salgueiro, G., Rosenberg, J., Wing,
D., Mahy, R., and P. Matthews, "Session Traversal D., Mahy, R., and P. Matthews, "Session Traversal
Utilities for NAT (STUN)", draft-ietf-tram-stunbis-21 Utilities for NAT (STUN)", draft-ietf-tram-stunbis-21
(work in progress), March 2019. (work in progress), March 2019.
[Protocol-Numbers] [Protocol-Numbers]
"IANA Protocol Numbers Registry", 2005, "IANA Protocol Numbers Registry", 2005,
<http://www.iana.org/assignments/protocol-numbers>. <http://www.iana.org/assignments/protocol-numbers>.
skipping to change at page 83, line 5 skipping to change at page 86, line 5
[RFC8305] Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2: [RFC8305] Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2:
Better Connectivity Using Concurrency", RFC 8305, Better Connectivity Using Concurrency", RFC 8305,
DOI 10.17487/RFC8305, December 2017, DOI 10.17487/RFC8305, December 2017,
<https://www.rfc-editor.org/info/rfc8305>. <https://www.rfc-editor.org/info/rfc8305>.
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>. <https://www.rfc-editor.org/info/rfc8446>.
24.2. Informative References 25.2. Informative References
[Frag-Harmful] [Frag-Harmful]
"Fragmentation Considered Harmful", <Proc. SIGCOMM '87, "Fragmentation Considered Harmful", <Proc. SIGCOMM '87,
vol. 17, No. 5, October 1987>. vol. 17, No. 5, October 1987>.
[I-D.ietf-tram-stun-pmtud] [I-D.ietf-tram-stun-pmtud]
Petit-Huguenin, M. and G. Salgueiro, "Path MTU Discovery Petit-Huguenin, M. and G. Salgueiro, "Path MTU Discovery
Using Session Traversal Utilities for NAT (STUN)", draft- Using Session Traversal Utilities for NAT (STUN)", draft-
ietf-tram-stun-pmtud-10 (work in progress), September ietf-tram-stun-pmtud-10 (work in progress), September
2018. 2018.
[I-D.ietf-tsvwg-udp-options]
Touch, J., "Transport Options for UDP", draft-ietf-tsvwg-
udp-options-07 (work in progress), March 2019.
[I-D.rosenberg-mmusic-ice-nonsip] [I-D.rosenberg-mmusic-ice-nonsip]
Rosenberg, J., "Guidelines for Usage of Interactive Rosenberg, J., "Guidelines for Usage of Interactive
Connectivity Establishment (ICE) by non Session Initiation Connectivity Establishment (ICE) by non Session Initiation
Protocol (SIP) Protocols", draft-rosenberg-mmusic-ice- Protocol (SIP) Protocols", draft-rosenberg-mmusic-ice-
nonsip-01 (work in progress), July 2008. nonsip-01 (work in progress), July 2008.
[Port-Numbers] [Port-Numbers]
"IANA Port Numbers Registry", 2005, "IANA Port Numbers Registry", 2005,
<http://www.iana.org/assignments/port-numbers>. <http://www.iana.org/assignments/port-numbers>.
skipping to change at page 85, line 31 skipping to change at page 88, line 37
Using Relays around NAT (TURN) Extension for IPv6", Using Relays around NAT (TURN) Extension for IPv6",
RFC 6156, DOI 10.17487/RFC6156, April 2011, RFC 6156, DOI 10.17487/RFC6156, April 2011,
<https://www.rfc-editor.org/info/rfc6156>. <https://www.rfc-editor.org/info/rfc6156>.
[RFC7635] Reddy, T., Patil, P., Ravindranath, R., and J. Uberti, [RFC7635] Reddy, T., Patil, P., Ravindranath, R., and J. Uberti,
"Session Traversal Utilities for NAT (STUN) Extension for "Session Traversal Utilities for NAT (STUN) Extension for
Third-Party Authorization", RFC 7635, Third-Party Authorization", RFC 7635,
DOI 10.17487/RFC7635, August 2015, DOI 10.17487/RFC7635, August 2015,
<https://www.rfc-editor.org/info/rfc7635>. <https://www.rfc-editor.org/info/rfc7635>.
[RFC7657] Black, D., Ed. and P. Jones, "Differentiated Services
(Diffserv) and Real-Time Communication", RFC 7657,
DOI 10.17487/RFC7657, November 2015,
<https://www.rfc-editor.org/info/rfc7657>.
[RFC7983] Petit-Huguenin, M. and G. Salgueiro, "Multiplexing Scheme [RFC7983] Petit-Huguenin, M. and G. Salgueiro, "Multiplexing Scheme
Updates for Secure Real-time Transport Protocol (SRTP) Updates for Secure Real-time Transport Protocol (SRTP)
Extension for Datagram Transport Layer Security (DTLS)", Extension for Datagram Transport Layer Security (DTLS)",
RFC 7983, DOI 10.17487/RFC7983, September 2016, RFC 7983, DOI 10.17487/RFC7983, September 2016,
<https://www.rfc-editor.org/info/rfc7983>. <https://www.rfc-editor.org/info/rfc7983>.
[RFC8155] Patil, P., Reddy, T., and D. Wing, "Traversal Using Relays [RFC8155] Patil, P., Reddy, T., and D. Wing, "Traversal Using Relays
around NAT (TURN) Server Auto Discovery", RFC 8155, around NAT (TURN) Server Auto Discovery", RFC 8155,
DOI 10.17487/RFC8155, April 2017, DOI 10.17487/RFC8155, April 2017,
<https://www.rfc-editor.org/info/rfc8155>. <https://www.rfc-editor.org/info/rfc8155>.
 End of changes. 68 change blocks. 
129 lines changed or deleted 272 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/