draft-ietf-tram-turnbis-12.txt   draft-ietf-tram-turnbis-13.txt 
TRAM WG T. Reddy, Ed. TRAM WG T. Reddy, Ed.
Internet-Draft McAfee Internet-Draft McAfee
Updates: 5766,6156 (if approved) A. Johnston, Ed. Obsoletes: 5766,6156 (if approved) A. Johnston, Ed.
Intended status: Standards Track Rowan University Intended status: Standards Track Rowan University
Expires: April 26, 2018 P. Matthews Expires: August 15, 2018 P. Matthews
Alcatel-Lucent Alcatel-Lucent
J. Rosenberg J. Rosenberg
jdrosen.net jdrosen.net
October 23, 2017 February 11, 2018
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-12 draft-ietf-tram-turnbis-13
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 April 26, 2018. This Internet-Draft will expire on August 15, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2018 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 33 skipping to change at page 2, line 33
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Overview of Operation . . . . . . . . . . . . . . . . . . . . 6 2. Overview of Operation . . . . . . . . . . . . . . . . . . . . 6
2.1. Transports . . . . . . . . . . . . . . . . . . . . . . . 8 2.1. Transports . . . . . . . . . . . . . . . . . . . . . . . 8
2.2. Allocations . . . . . . . . . . . . . . . . . . . . . . . 9 2.2. Allocations . . . . . . . . . . . . . . . . . . . . . . . 9
2.3. Permissions . . . . . . . . . . . . . . . . . . . . . . . 11 2.3. Permissions . . . . . . . . . . . . . . . . . . . . . . . 11
2.4. Send Mechanism . . . . . . . . . . . . . . . . . . . . . 12 2.4. Send Mechanism . . . . . . . . . . . . . . . . . . . . . 12
2.5. Channels . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5. Channels . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6. Unprivileged TURN Servers . . . . . . . . . . . . . . . . 16 2.6. Unprivileged TURN Servers . . . . . . . . . . . . . . . . 16
2.7. Avoiding IP Fragmentation . . . . . . . . . . . . . . . . 16 2.7. Avoiding IP Fragmentation . . . . . . . . . . . . . . . . 16
2.8. RTP Support . . . . . . . . . . . . . . . . . . . . . . . 18 2.8. RTP Support . . . . . . . . . . . . . . . . . . . . . . . 18
2.9. Discovery of TURN server . . . . . . . . . . . . . . . . 18 2.9. Happy Eyeballs for TURN . . . . . . . . . . . . . . . . . 18
2.9.1. TURN URI Scheme Semantics . . . . . . . . . . . . . . 18
2.10. Happy Eyeballs for TURN . . . . . . . . . . . . . . . . . 18
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 19 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 19
4. General Behavior . . . . . . . . . . . . . . . . . . . . . . 21 4. Discovery of TURN server . . . . . . . . . . . . . . . . . . 21
5. Allocations . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.1. TURN URI Scheme Semantics . . . . . . . . . . . . . . . . 21
6. Creating an Allocation . . . . . . . . . . . . . . . . . . . 25 5. General Behavior . . . . . . . . . . . . . . . . . . . . . . 21
6.1. Sending an Allocate Request . . . . . . . . . . . . . . . 25 6. Allocations . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.2. Receiving an Allocate Request . . . . . . . . . . . . . . 26 7. Creating an Allocation . . . . . . . . . . . . . . . . . . . 25
6.3. Receiving an Allocate Success Response . . . . . . . . . 31 7.1. Sending an Allocate Request . . . . . . . . . . . . . . . 25
6.4. Receiving an Allocate Error Response . . . . . . . . . . 32 7.2. Receiving an Allocate Request . . . . . . . . . . . . . . 26
7. Refreshing an Allocation . . . . . . . . . . . . . . . . . . 34 7.3. Receiving an Allocate Success Response . . . . . . . . . 31
7.1. Sending a Refresh Request . . . . . . . . . . . . . . . . 34 7.4. Receiving an Allocate Error Response . . . . . . . . . . 32
7.2. Receiving a Refresh Request . . . . . . . . . . . . . . . 35 8. Refreshing an Allocation . . . . . . . . . . . . . . . . . . 34
7.3. Receiving a Refresh Response . . . . . . . . . . . . . . 36 8.1. Sending a Refresh Request . . . . . . . . . . . . . . . . 34
8. Permissions . . . . . . . . . . . . . . . . . . . . . . . . . 36 8.2. Receiving a Refresh Request . . . . . . . . . . . . . . . 35
9. CreatePermission . . . . . . . . . . . . . . . . . . . . . . 37 8.3. Receiving a Refresh Response . . . . . . . . . . . . . . 36
9.1. Forming a CreatePermission Request . . . . . . . . . . . 37 9. Permissions . . . . . . . . . . . . . . . . . . . . . . . . . 36
9.2. Receiving a CreatePermission Request . . . . . . . . . . 38 10. CreatePermission . . . . . . . . . . . . . . . . . . . . . . 37
9.3. Receiving a CreatePermission Response . . . . . . . . . . 38 10.1. Forming a CreatePermission Request . . . . . . . . . . . 37
10. Send and Data Methods . . . . . . . . . . . . . . . . . . . . 38 10.2. Receiving a CreatePermission Request . . . . . . . . . . 38
10.1. Forming a Send Indication . . . . . . . . . . . . . . . 39 10.3. Receiving a CreatePermission Response . . . . . . . . . 38
10.2. Receiving a Send Indication . . . . . . . . . . . . . . 39 11. Send and Data Methods . . . . . . . . . . . . . . . . . . . . 39
10.3. Receiving a UDP Datagram . . . . . . . . . . . . . . . . 40 11.1. Forming a Send Indication . . . . . . . . . . . . . . . 39
10.4. Receiving a Data Indication with DATA attribute . . . . 40 11.2. Receiving a Send Indication . . . . . . . . . . . . . . 39
10.5. Receiving an ICMP Packet . . . . . . . . . . . . . . . . 41 11.3. Receiving a UDP Datagram . . . . . . . . . . . . . . . . 40
10.6. Receiving a Data Indication with an ICMP attribute . . . 42 11.4. Receiving a Data Indication . . . . . . . . . . . . . . 40
11. Channels . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.5. Receiving an ICMP Packet . . . . . . . . . . . . . . . . 41
11.1. Sending a ChannelBind Request . . . . . . . . . . . . . 44 11.6. Receiving a Data Indication with an ICMP attribute . . . 42
11.2. Receiving a ChannelBind Request . . . . . . . . . . . . 44 12. Channels . . . . . . . . . . . . . . . . . . . . . . . . . . 42
11.3. Receiving a ChannelBind Response . . . . . . . . . . . . 45 12.1. Sending a ChannelBind Request . . . . . . . . . . . . . 44
11.4. The ChannelData Message . . . . . . . . . . . . . . . . 46 12.2. Receiving a ChannelBind Request . . . . . . . . . . . . 44
11.5. Sending a ChannelData Message . . . . . . . . . . . . . 46 12.3. Receiving a ChannelBind Response . . . . . . . . . . . . 46
11.6. Receiving a ChannelData Message . . . . . . . . . . . . 47 12.4. The ChannelData Message . . . . . . . . . . . . . . . . 46
11.7. Relaying Data from the Peer . . . . . . . . . . . . . . 48 12.5. Sending a ChannelData Message . . . . . . . . . . . . . 46
12. Packet Translations . . . . . . . . . . . . . . . . . . . . . 48 12.6. Receiving a ChannelData Message . . . . . . . . . . . . 47
12.1. IPv4-to-IPv6 Translations . . . . . . . . . . . . . . . 48 12.7. Relaying Data from the Peer . . . . . . . . . . . . . . 48
12.2. IPv6-to-IPv6 Translations . . . . . . . . . . . . . . . 49 13. Packet Translations . . . . . . . . . . . . . . . . . . . . . 48
12.3. IPv6-to-IPv4 Translations . . . . . . . . . . . . . . . 51 13.1. IPv4-to-IPv6 Translations . . . . . . . . . . . . . . . 49
13. IP Header Fields . . . . . . . . . . . . . . . . . . . . . . 51 13.2. IPv6-to-IPv6 Translations . . . . . . . . . . . . . . . 49
14. New STUN Methods . . . . . . . . . . . . . . . . . . . . . . 53 13.3. IPv6-to-IPv4 Translations . . . . . . . . . . . . . . . 51
15. New STUN Attributes . . . . . . . . . . . . . . . . . . . . . 53 14. IP Header Fields . . . . . . . . . . . . . . . . . . . . . . 52
15.1. CHANNEL-NUMBER . . . . . . . . . . . . . . . . . . . . . 54 15. STUN Methods . . . . . . . . . . . . . . . . . . . . . . . . 53
15.2. LIFETIME . . . . . . . . . . . . . . . . . . . . . . . . 54 16. STUN Attributes . . . . . . . . . . . . . . . . . . . . . . . 54
15.3. XOR-PEER-ADDRESS . . . . . . . . . . . . . . . . . . . . 55 16.1. CHANNEL-NUMBER . . . . . . . . . . . . . . . . . . . . . 54
15.4. DATA . . . . . . . . . . . . . . . . . . . . . . . . . . 55 16.2. LIFETIME . . . . . . . . . . . . . . . . . . . . . . . . 54
15.5. XOR-RELAYED-ADDRESS . . . . . . . . . . . . . . . . . . 55 16.3. XOR-PEER-ADDRESS . . . . . . . . . . . . . . . . . . . . 55
15.6. REQUESTED-ADDRESS-FAMILY . . . . . . . . . . . . . . . . 55 16.4. DATA . . . . . . . . . . . . . . . . . . . . . . . . . . 55
15.7. EVEN-PORT . . . . . . . . . . . . . . . . . . . . . . . 56 16.5. XOR-RELAYED-ADDRESS . . . . . . . . . . . . . . . . . . 55
15.8. REQUESTED-TRANSPORT . . . . . . . . . . . . . . . . . . 56 16.6. REQUESTED-ADDRESS-FAMILY . . . . . . . . . . . . . . . . 55
15.9. DONT-FRAGMENT . . . . . . . . . . . . . . . . . . . . . 57 16.7. EVEN-PORT . . . . . . . . . . . . . . . . . . . . . . . 56
15.10. RESERVATION-TOKEN . . . . . . . . . . . . . . . . . . . 57 16.8. REQUESTED-TRANSPORT . . . . . . . . . . . . . . . . . . 56
15.11. ADDITIONAL-ADDRESS-FAMILY . . . . . . . . . . . . . . . 57 16.9. DONT-FRAGMENT . . . . . . . . . . . . . . . . . . . . . 57
15.12. ADDRESS-ERROR-CODE Attribute . . . . . . . . . . . . . . 57 16.10. RESERVATION-TOKEN . . . . . . . . . . . . . . . . . . . 57
15.13. ICMP Attribute . . . . . . . . . . . . . . . . . . . . . 58 16.11. ADDITIONAL-ADDRESS-FAMILY . . . . . . . . . . . . . . . 57
16. New STUN Error Response Codes . . . . . . . . . . . . . . . . 59 16.12. ADDRESS-ERROR-CODE Attribute . . . . . . . . . . . . . . 57
17. Detailed Example . . . . . . . . . . . . . . . . . . . . . . 60 16.13. ICMP Attribute . . . . . . . . . . . . . . . . . . . . . 58
18. Security Considerations . . . . . . . . . . . . . . . . . . . 68 17. STUN Error Response Codes . . . . . . . . . . . . . . . . . . 58
18.1. Outsider Attacks . . . . . . . . . . . . . . . . . . . . 68 18. Detailed Example . . . . . . . . . . . . . . . . . . . . . . 59
18.1.1. Obtaining Unauthorized Allocations . . . . . . . . . 68 19. Security Considerations . . . . . . . . . . . . . . . . . . . 67
18.1.2. Offline Dictionary Attacks . . . . . . . . . . . . . 68 19.1. Outsider Attacks . . . . . . . . . . . . . . . . . . . . 67
18.1.3. Faked Refreshes and Permissions . . . . . . . . . . 69 19.1.1. Obtaining Unauthorized Allocations . . . . . . . . . 67
18.1.4. Fake Data . . . . . . . . . . . . . . . . . . . . . 69 19.1.2. Offline Dictionary Attacks . . . . . . . . . . . . . 67
18.1.5. Impersonating a Server . . . . . . . . . . . . . . . 70 19.1.3. Faked Refreshes and Permissions . . . . . . . . . . 68
18.1.6. Eavesdropping Traffic . . . . . . . . . . . . . . . 70 19.1.4. Fake Data . . . . . . . . . . . . . . . . . . . . . 68
18.1.7. TURN Loop Attack . . . . . . . . . . . . . . . . . . 71 19.1.5. Impersonating a Server . . . . . . . . . . . . . . . 69
18.2. Firewall Considerations . . . . . . . . . . . . . . . . 71 19.1.6. Eavesdropping Traffic . . . . . . . . . . . . . . . 69
18.2.1. Faked Permissions . . . . . . . . . . . . . . . . . 72 19.1.7. TURN Loop Attack . . . . . . . . . . . . . . . . . . 70
18.2.2. Blacklisted IP Addresses . . . . . . . . . . . . . . 72 19.2. Firewall Considerations . . . . . . . . . . . . . . . . 70
18.2.3. Running Servers on Well-Known Ports . . . . . . . . 73 19.2.1. Faked Permissions . . . . . . . . . . . . . . . . . 71
18.3. Insider Attacks . . . . . . . . . . . . . . . . . . . . 73 19.2.2. Blacklisted IP Addresses . . . . . . . . . . . . . . 71
18.3.1. DoS against TURN Server . . . . . . . . . . . . . . 73 19.2.3. Running Servers on Well-Known Ports . . . . . . . . 72
18.3.2. Anonymous Relaying of Malicious Traffic . . . . . . 73 19.3. Insider Attacks . . . . . . . . . . . . . . . . . . . . 72
18.3.3. Manipulating Other Allocations . . . . . . . . . . . 74 19.3.1. DoS against TURN Server . . . . . . . . . . . . . . 72
18.4. Tunnel Amplification Attack . . . . . . . . . . . . . . 74 19.3.2. Anonymous Relaying of Malicious Traffic . . . . . . 72
18.5. Other Considerations . . . . . . . . . . . . . . . . . . 75 19.3.3. Manipulating Other Allocations . . . . . . . . . . . 73
19. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 75 19.4. Tunnel Amplification Attack . . . . . . . . . . . . . . 73
20. IAB Considerations . . . . . . . . . . . . . . . . . . . . . 76 19.5. Other Considerations . . . . . . . . . . . . . . . . . . 74
21. Changes since RFC 5766 . . . . . . . . . . . . . . . . . . . 78 20. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 74
22. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 78 21. IAB Considerations . . . . . . . . . . . . . . . . . . . . . 75
23. References . . . . . . . . . . . . . . . . . . . . . . . . . 78 22. Changes since RFC 5766 . . . . . . . . . . . . . . . . . . . 77
23.1. Normative References . . . . . . . . . . . . . . . . . . 78 23. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 77
23.2. Informative References . . . . . . . . . . . . . . . . . 80 24. References . . . . . . . . . . . . . . . . . . . . . . . . . 77
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 83 24.1. Normative References . . . . . . . . . . . . . . . . . . 77
24.2. Informative References . . . . . . . . . . . . . . . . . 79
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 82
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 29 skipping to change at page 5, line 29
carry. For example, if TURN and ICE are used as part of a multimedia carry. For example, if TURN and ICE are used as part of a multimedia
solution using SIP [RFC3261], then SIP serves the role of the solution using SIP [RFC3261], then SIP serves the role of the
rendezvous protocol, carrying the ICE candidate information inside rendezvous protocol, carrying the ICE candidate information inside
the body of SIP messages. If TURN and ICE are used with some other the body of SIP messages. If TURN and ICE are used with some other
rendezvous protocol, then [I-D.rosenberg-mmusic-ice-nonsip] provides rendezvous protocol, then [I-D.rosenberg-mmusic-ice-nonsip] provides
guidance on the services the rendezvous protocol must perform. guidance on the services the rendezvous protocol must perform.
Though the use of a TURN server to enable communication between two Though the use of a TURN server to enable communication between two
hosts behind NATs is very likely to work, it comes at a high cost to hosts behind NATs is very likely to work, it comes at a high cost to
the provider of the TURN server, since the server typically needs a the provider of the TURN server, since the server typically needs a
high-bandwidth connection to the Internet . As a consequence, it is high-bandwidth connection to the Internet. As a consequence, it is
best to use a TURN server only when a direct communication path best to use a TURN server only when a direct communication path
cannot be found. When the client and a peer use ICE to determine the cannot be found. When the client and a peer use ICE to determine the
communication path, ICE will use hole punching techniques to search communication path, ICE will use hole punching techniques to search
for a direct path first and only use a TURN server when a direct path for a direct path first and only use a TURN server when a direct path
cannot be found. cannot be found.
TURN was originally invented to support multimedia sessions signaled TURN was originally invented to support multimedia sessions signaled
using SIP. Since SIP supports forking, TURN supports multiple peers using SIP. Since SIP supports forking, TURN supports multiple peers
per relayed transport address; a feature not supported by other per relayed transport address; a feature not supported by other
approaches (e.g., SOCKS [RFC1928]). However, care has been taken to approaches (e.g., SOCKS [RFC1928]). However, care has been taken to
skipping to change at page 9, line 30 skipping to change at page 9, line 30
allocations that use TCP between the server and the peers are known allocations that use TCP between the server and the peers are known
as TCP allocations. This specification describes only UDP as TCP allocations. This specification describes only UDP
allocations. allocations.
In some applications for TURN, the client may send and receive In some applications for TURN, the client may send and receive
packets other than TURN packets on the host transport address it uses packets other than TURN packets on the host transport address it uses
to communicate with the server. This can happen, for example, when to communicate with the server. This can happen, for example, when
using TURN with ICE. In these cases, the client can distinguish TURN using TURN with ICE. In these cases, the client can distinguish TURN
packets from other packets by examining the source address of the packets from other packets by examining the source address of the
arriving packet: those arriving from the TURN server will be TURN arriving packet: those arriving from the TURN server will be TURN
packets. packets. The algorithm of demultiplexing packets received from
multiple protocols on the host transport address is discussed in
[RFC7983].
2.2. Allocations 2.2. Allocations
To create an allocation on the server, the client uses an Allocate To create an allocation on the server, the client uses an Allocate
transaction. The client sends an Allocate request to the server, and transaction. The client sends an Allocate request to the server, and
the server replies with an Allocate success response containing the the server replies with an Allocate success response containing the
allocated relayed transport address. The client can include allocated relayed transport address. The client can include
attributes in the Allocate request that describe the type of attributes in the Allocate request that describe the type of
allocation it desires (e.g., the lifetime of the allocation). Since allocation it desires (e.g., the lifetime of the allocation). Since
relaying data has security implications, the server requires that the relaying data has security implications, the server requires that the
client authenticate itself, typically using STUN's long-term client authenticate itself, typically using STUN's long-term
credential mechanism, to show that it is authorized to use the credential mechanism or the STUN Extension for Third-Party
Authorization [RFC7635], to show that it is authorized to use the
server. server.
Once a relayed transport address is allocated, a client must keep the Once a relayed transport address is allocated, a client must keep the
allocation alive. To do this, the client periodically sends a allocation alive. To do this, the client periodically sends a
Refresh request to the server. TURN deliberately uses a different Refresh request to the server. TURN deliberately uses a different
method (Refresh rather than Allocate) for refreshes to ensure that method (Refresh rather than Allocate) for refreshes to ensure that
the client is informed if the allocation vanishes for some reason. the client is informed if the allocation vanishes for some reason.
The frequency of the Refresh transaction is determined by the The frequency of the Refresh transaction is determined by the
lifetime of the allocation. The default lifetime of an allocation is lifetime of the allocation. The default lifetime of an allocation is
skipping to change at page 12, line 26 skipping to change at page 12, line 26
send data to peers) do not install or refresh any permissions. send data to peers) do not install or refresh any permissions.
Note that permissions are within the context of an allocation, so Note that permissions are within the context of an allocation, so
adding or expiring a permission in one allocation does not affect adding or expiring a permission in one allocation does not affect
other allocations. other allocations.
2.4. Send Mechanism 2.4. Send Mechanism
There are two mechanisms for the client and peers to exchange There are two mechanisms for the client and peers to exchange
application data using the TURN server. The first mechanism uses the application data using the TURN server. The first mechanism uses the
Send and Data methods, the second way uses channels. Common to both Send and Data methods, the second mechanism uses channels. Common to
ways is the ability of the client to communicate with multiple peers both mechanisms is the ability of the client to communicate with
using a single allocated relayed transport address; thus, both ways multiple peers using a single allocated relayed transport address;
include a means for the client to indicate to the server which peer thus, both mechanisms include a means for the client to indicate to
should receive the data, and for the server to indicate to the client the server which peer should receive the data, and for the server to
which peer sent the data. indicate to the client which peer sent the data.
The Send mechanism uses Send and Data indications. Send indications The Send mechanism uses Send and Data indications. Send indications
are used to send application data from the client to the server, are used to send application data from the client to the server,
while Data indications are used to send application data from the while Data indications are used to send application data from the
server to the client. server to the client.
When using the Send mechanism, the client sends a Send indication to When using the Send mechanism, the client sends a Send indication to
the TURN server containing (a) an XOR-PEER-ADDRESS attribute the TURN server containing (a) an XOR-PEER-ADDRESS attribute
specifying the (server-reflexive) transport address of the peer and specifying the (server-reflexive) transport address of the peer and
(b) a DATA attribute holding the application data. When the TURN (b) a DATA attribute holding the application data. When the TURN
skipping to change at page 13, line 11 skipping to change at page 13, line 11
indications and sent to the client, with the server-reflexive indications and sent to the client, with the server-reflexive
transport address of the peer included in an XOR-PEER-ADDRESS transport address of the peer included in an XOR-PEER-ADDRESS
attribute and the data itself in a DATA attribute. Since the relayed attribute and the data itself in a DATA attribute. Since the relayed
transport address uniquely identified the allocation, the server transport address uniquely identified the allocation, the server
knows which client should receive the data. knows which client should receive the data.
Some ICMP (Internet Control Message Protocol) packets arriving at the Some ICMP (Internet Control Message Protocol) packets arriving at the
relayed transport address on the TURN server may be converted into relayed transport address on the TURN server may be converted into
Data indications and sent to the client, with the transport address Data indications and sent to the client, with the transport address
of the peer included in an XOR-PEER-ADDRESS attribute and the ICMP of the peer included in an XOR-PEER-ADDRESS attribute and the ICMP
type and code in a ICMP attribute. Data indications containing the type and code in a ICMP attribute. ICMP attribute forwarding always
XOR-PEER-ADDRESS and ICMP attribute are also sent when using the uses Data indications containing the XOR-PEER-ADDRESS and ICMP
channel mechanism. attributes, even when using the channel mechanism to forward UDP
data.
Send and Data indications cannot be authenticated, since the long- Send and Data indications cannot be authenticated, since the long-
term credential mechanism of STUN does not support authenticating term credential mechanism of STUN does not support authenticating
indications. This is not as big an issue as it might first appear, indications. This is not as big an issue as it might first appear,
since the client-to-server leg is only half of the total path to the since the client-to-server leg is only half of the total path to the
peer. Applications that want proper security should encrypt the data peer. Applications that want proper security should encrypt the data
sent between the client and a peer. sent between the client and a peer.
Because Send indications are not authenticated, it is possible for an Because Send indications are not authenticated, it is possible for an
attacker to send bogus Send indications to the server, which will attacker to send bogus Send indications to the server, which will
skipping to change at page 15, line 17 skipping to change at page 15, line 17
| | | | | | | |
|-- ChannelBind req ---------------->| | | |-- ChannelBind req ---------------->| | |
| (Peer A to 0x4001) | | | | (Peer A to 0x4001) | | |
| | | | | | | |
|<---------- ChannelBind succ resp --| | | |<---------- ChannelBind succ resp --| | |
| | | | | | | |
|-- [0x4001] data ------------------>| | | |-- [0x4001] data ------------------>| | |
| |=== data ===>| | | |=== data ===>| |
| | | | | | | |
| |<== data ====| | | |<== data ====| |
|<------------------ [0x4001] data --| | | |<------------------ (0x4001) data --| | |
| | | | | | | |
|--- Send ind (Peer A)-------------->| | | |--- Send ind (Peer A)-------------->| | |
| |=== data ===>| | | |=== data ===>| |
| | | | | | | |
| |<== data ====| | | |<== data ====| |
|<------------------ [0x4001] data --| | | |<------------------ (0x4001) data --| | |
| | | | | | | |
Figure 4 Figure 4
Figure 4 shows the channel mechanism in use. The client has already Figure 4 shows the channel mechanism in use. The client has already
created an allocation and now wishes to bind a channel to Peer A. To created an allocation and now wishes to bind a channel to Peer A. To
do this, the client sends a ChannelBind request to the server, do this, the client sends a ChannelBind request to the server,
specifying the transport address of Peer A and a channel number specifying the transport address of Peer A and a channel number
(0x4001). After that, the client can send application data (0x4001). After that, the client can send application data
encapsulated inside ChannelData messages to Peer A: this is shown as encapsulated inside ChannelData messages to Peer A: this is shown as
"[0x4001] data" where 0x4001 is the channel number. When the "(0x4001) data" where 0x4001 is the channel number. When the
ChannelData message arrives at the server, the server transfers the ChannelData message arrives at the server, the server transfers the
data to a UDP datagram and sends it to Peer A (which is the peer data to a UDP datagram and sends it to Peer A (which is the peer
bound to channel number 0x4001). bound to channel number 0x4001).
In the reverse direction, when Peer A sends a UDP datagram to the In the reverse direction, when Peer A sends a UDP datagram to the
relayed transport address, this UDP datagram arrives at the server on relayed transport address, this UDP datagram arrives at the server on
the relayed transport address assigned to the allocation. Since the the relayed transport address assigned to the allocation. Since the
UDP datagram was received from Peer A, which has a channel number UDP datagram was received from Peer A, which has a channel number
assigned to it, the server encapsulates the data into a ChannelData assigned to it, the server encapsulates the data into a ChannelData
message when sending the data to the client. message when sending the data to the client.
skipping to change at page 17, line 43 skipping to change at page 17, line 43
- a probe packet with DF bit set to test a path for a larger MTU - a probe packet with DF bit set to test a path for a larger MTU
can be dropped by routers, or can be dropped by routers, or
- ICMP error messages can be dropped by middle boxes. - ICMP error messages can be dropped by middle boxes.
As a result, the client and server need to use a path MTU discovery As a result, the client and server need to use a path MTU discovery
algorithm that does not require ICMP messages. The Packetized Path algorithm that does not require ICMP messages. The Packetized Path
MTU Discovery algorithm defined in [RFC4821] is one such algorithm. MTU Discovery algorithm defined in [RFC4821] is one such algorithm.
[I-D.ietf-tram-stun-pmtud] is an implementation of [RFC4821] that is [I-D.ietf-tram-stun-pmtud] is an implementation of [RFC4821] that
using STUN to discover the PMTUD, and so may be a suitable approach uses STUN to discover the path MTU, and so might be a suitable
to be used in conjunction with a TURN server, together with the DONT- approach to be used in conjunction with a TURN server that supports
FRAGMENT attribute. When the client includes the DONT-FRAGMENT the DONT-FRAGMENT attribute. When the client includes the DONT-
attribute in a Send indication, this tells the server to set the DF FRAGMENT attribute in a Send indication, this tells the server to set
bit in the resulting UDP datagram that it sends to the peer. Since the DF bit in the resulting UDP datagram that it sends to the peer.
some servers may be unable to set the DF bit, the client should also Since some servers may be unable to set the DF bit, the client should
include this attribute in the Allocate request -- any server that also include this attribute in the Allocate request -- any server
does not support the DONT-FRAGMENT attribute will indicate this by that does not support the DONT-FRAGMENT attribute will indicate this
rejecting the Allocate request. by rejecting the Allocate request.
2.8. RTP Support 2.8. RTP Support
One of the envisioned uses of TURN is as a relay for clients and One of the envisioned uses of TURN is as a relay for clients and
peers wishing to exchange real-time data (e.g., voice or video) using peers wishing to exchange real-time data (e.g., voice or video) using
RTP. To facilitate the use of TURN for this purpose, TURN includes RTP. To facilitate the use of TURN for this purpose, TURN includes
some special support for older versions of RTP. some special support for older versions of RTP.
Old versions of RTP [RFC3550] required that the RTP stream be on an Old versions of RTP [RFC3550] required that the RTP stream be on an
even port number and the associated RTP Control Protocol (RTCP) even port number and the associated RTP Control Protocol (RTCP)
stream, if present, be on the next highest port. To allow clients to stream, if present, be on the next highest port. To allow clients to
work with peers that still require this, TURN allows the client to work with peers that still require this, TURN allows the client to
request that the server allocate a relayed transport address with an request that the server allocate a relayed transport address with an
even port number, and to optionally request the server reserve the even port number, and to optionally request the server reserve the
next-highest port number for a subsequent allocation. next-highest port number for a subsequent allocation.
2.9. Discovery of TURN server 2.9. Happy Eyeballs for TURN
Methods of TURN server discovery, including using anycast, are
described in [RFC8155]. The syntax of the "turn" and "turn" URIs are
defined in Section 3.1 of [RFC7065].
2.9.1. TURN URI Scheme Semantics
The "turn" and "turns" URI schemes are used to designate a TURN
server (also known as a relay) on Internet hosts accessible using the
TURN protocol. The TURN protocol supports sending messages over UDP,
TCP, TLS-over-TCP or DTLS-over-UDP. The "turns" URI scheme MUST be
used when TURN is run over TLS-over-TCP or in DTLS-over-UDP, and the
"turn" scheme MUST be used otherwise. The required <host> part of
the "turn" URI denotes the TURN server host. The <port> part, if
present, denotes the port on which the TURN server is awaiting
connection requests. If it is absent, the default port is 3478 for
both UDP and TCP. The default port for TURN over TLS and TURN over
DTLS is 5349.
2.10. Happy Eyeballs for TURN
If an IPv4 path to reach a TURN server is found, but the TURN If an IPv4 path to reach a TURN server is found, but the TURN
server's IPv6 path is not working, a dual-stack TURN client can server's IPv6 path is not working, a dual-stack TURN client can
experience a significant connection delay compared to an IPv4-only experience a significant connection delay compared to an IPv4-only
TURN client. To overcome these connection setup problems, the TURN TURN client. To overcome these connection setup problems, the TURN
client MUST query both A and AAAA records for the TURN server client MUST query both A and AAAA records for the TURN server
specified using a domain name and try connecting to the TURN server specified using a domain name and try connecting to the TURN server
using both IPv6 and IPv4 addresses in a fashion similar to the Happy using both IPv6 and IPv4 addresses in a fashion similar to the Happy
Eyeballs mechanism defined in [RFC6555]. The TURN client performs Eyeballs mechanism defined in [RFC6555]. The TURN client performs
the following steps based on the transport protocol being used to the following steps based on the transport protocol being used to
connect to the TURN server. connect to the TURN server.
o For TCP, initiate TCP connection to both IP address families as o For TCP or TLS-over-TCP, initiate TCP connection to both IP
discussed in [RFC6555], and use the first TCP connection that is address families as discussed in [RFC6555], and use the first TCP
established. If connections are established on both IP address connection that is established. If connections are established on
families then terminate the TCP connection using the IP address both IP address families then terminate the TCP connection using
family with lower precedence [RFC6724]. the IP address family with lower precedence [RFC6724].
o For clear text UDP, send TURN Allocate requests to both IP address o For clear text UDP, send TURN Allocate requests to both IP address
families as discussed in [RFC6555], without authentication families as discussed in [RFC6555], without authentication
information. If the TURN server requires authentication, it will information. If the TURN server requires authentication, it will
send back a 401 unauthenticated response and the TURN client uses send back a 401 unauthenticated response and the TURN client uses
the first UDP connection on which a 401 error response is the first UDP connection on which a 401 error response is
received. If a 401 error response is received from both IP received. If a 401 error response is received from both IP
address families then the TURN client can silently abandon the UDP address families then the TURN client can silently abandon the UDP
connection on the IP address family with lower precedence. If the connection on the IP address family with lower precedence. If the
TURN server does not require authentication (as described in TURN server does not require authentication (as described in
Section 9 of [RFC8155]), it is possible for both Allocate requests Section 9 of [RFC8155]), it is possible for both Allocate requests
to succeed. In this case, the TURN client sends a Refresh with to succeed. In this case, the TURN client sends a Refresh with
LIFETIME value of 0 on the allocation using the IP address family LIFETIME value of 0 on the allocation using the IP address family
with lower precedence to delete the allocation. with lower precedence to delete the allocation.
o For DTLS over UDP, initiate DTLS handshake to both IP address o For DTLS over UDP, initiate DTLS handshake to both IP address
families as discussed in [RFC6555] and use the first DTLS session families as discussed in [RFC6555] and use the first DTLS session
that is established. If the DTLS session is established on both that is established. If the DTLS session is established on both
IP addresses families then the client sends DTLS close_notify IP address families then the client sends DTLS close_notify alert
alert to terminate the DTLS session using the IP address family to terminate the DTLS session using the IP address family with
with lower precedence. If TURN over DTLS server has been lower precedence. If TURN over DTLS server has been configured to
configured to require a cookie exchange (Section 4.2 in [RFC6347]) require a cookie exchange (Section 4.2 in [RFC6347]) and
and HelloVerifyRequest is received from the TURN servers on both HelloVerifyRequest is received from the TURN servers on both IP
IP addresses families then the client can silently abandon the address families then the client can silently abandon the
connection on the IP address family with lower precedence. connection on the IP address family with lower precedence.
3. Terminology 3. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Readers are expected to be familiar with [I-D.ietf-tram-stunbis] and Readers are expected to be familiar with [I-D.ietf-tram-stunbis] and
the terms defined there. the terms defined there.
skipping to change at page 21, line 21 skipping to change at page 20, line 50
of a peer that is permitted to send traffic to the TURN server and of a peer that is permitted to send traffic to the TURN server and
have that traffic relayed to the TURN client. The TURN server have that traffic relayed to the TURN client. The TURN server
will only forward traffic to its client from peers that match an will only forward traffic to its client from peers that match an
existing permission. existing permission.
Realm: A string used to describe the server or a context within the Realm: A string used to describe the server or a context within the
server. The realm tells the client which username and password server. The realm tells the client which username and password
combination to use to authenticate requests. combination to use to authenticate requests.
Nonce: A string chosen at random by the server and included in the Nonce: A string chosen at random by the server and included in the
message-digest. To prevent reply attacks, the server should message-digest. To prevent replay attacks, the server should
change the nonce regularly. change the nonce regularly.
4. General Behavior (D)TLS: This term is used for statements that apply to both
Transport Layer Security [RFC5246] and Datagram Transport Layer
Security [RFC6347].
4. Discovery of TURN server
Methods of TURN server discovery, including using anycast, are
described in [RFC8155]. The syntax of the "turn" and "turns" URIs
are defined in Section 3.1 of [RFC7065].
4.1. TURN URI Scheme Semantics
The "turn" and "turns" URI schemes are used to designate a TURN
server (also known as a relay) on Internet hosts accessible using the
TURN protocol. The TURN protocol supports sending messages over UDP,
TCP, TLS-over-TCP or DTLS-over-UDP. The "turns" URI scheme MUST be
used when TURN is run over TLS-over-TCP or in DTLS-over-UDP, and the
"turn" scheme MUST be used otherwise. The required <host> part of
the "turn" URI denotes the TURN server host. The <port> part, if
present, denotes the port on which the TURN server is awaiting
connection requests. If it is absent, the default port is 3478 for
both UDP and TCP. The default port for TURN over TLS and TURN over
DTLS is 5349.
5. General Behavior
This section contains general TURN processing rules that apply to all This section contains general TURN processing rules that apply to all
TURN messages. TURN messages.
TURN is an extension to STUN. All TURN messages, with the exception TURN is an extension to STUN. All TURN messages, with the exception
of the ChannelData message, are STUN-formatted messages. All the of the ChannelData message, are STUN-formatted messages. All the
base processing rules described in [I-D.ietf-tram-stunbis] apply to base processing rules described in [I-D.ietf-tram-stunbis] apply to
STUN-formatted messages. This means that all the message-forming and STUN-formatted messages. This means that all the message-forming and
message-processing descriptions in this document are implicitly message-processing descriptions in this document are implicitly
prefixed with the rules of [I-D.ietf-tram-stunbis]. prefixed with the rules of [I-D.ietf-tram-stunbis].
skipping to change at page 22, line 4 skipping to change at page 22, line 9
Note that the long-term credential mechanism applies only to requests Note that the long-term credential mechanism applies only to requests
and cannot be used to authenticate indications; thus, indications in and cannot be used to authenticate indications; thus, indications in
TURN are never authenticated. If the server requires requests to be TURN are never authenticated. If the server requires requests to be
authenticated, then the server's administrator MUST choose a realm authenticated, then the server's administrator MUST choose a realm
value that will uniquely identify the username and password value that will uniquely identify the username and password
combination that the client must use, even if the client uses combination that the client must use, even if the client uses
multiple servers under different administrations. The server's multiple servers under different administrations. The server's
administrator MAY choose to allocate a unique username to each administrator MAY choose to allocate a unique username to each
client, or MAY choose to allocate the same username to more than one client, or MAY choose to allocate the same username to more than one
client (for example, to all clients from the same department or client (for example, to all clients from the same department or
company). For each allocation, the server SHOULD generate a new company). For each Allocate request, the server SHOULD generate a
random nonce when the allocation is first attempted following the new random nonce when the allocation is first attempted following the
randomness recommendations in [RFC4086] and SHOULD expire the nonce randomness recommendations in [RFC4086] and SHOULD expire the nonce
at least once every hour during the lifetime of the allocation. at least once every hour during the lifetime of the allocation.
All requests after the initial Allocate must use the same username as All requests after the initial Allocate must use the same username as
that used to create the allocation, to prevent attackers from that used to create the allocation, to prevent attackers from
hijacking the client's allocation. Specifically, if the server hijacking the client's allocation. Specifically, if the server
requires the use of the long-term credential mechanism, and if a non- requires the use of the long-term credential mechanism, and if a non-
Allocate request passes authentication under this mechanism, and if Allocate request passes authentication under this mechanism, and if
the 5-tuple identifies an existing allocation, but the request does the 5-tuple identifies an existing allocation, but the request does
not use the same username as used to create the allocation, then the not use the same username as used to create the allocation, then the
skipping to change at page 23, line 8 skipping to change at page 23, line 11
allocate (e.g., an IPv4-only node may request the TURN server to allocate (e.g., an IPv4-only node may request the TURN server to
allocate an IPv6 address). The ADDITIONAL-ADDRESS-FAMILY attribute allocate an IPv6 address). The ADDITIONAL-ADDRESS-FAMILY attribute
allows a client to request the server to allocate one IPv4 and one allows a client to request the server to allocate one IPv4 and one
IPv6 relay address in a single Allocate request. This saves local IPv6 relay address in a single Allocate request. This saves local
ports on the client and reduces the number of messages sent between ports on the client and reduces the number of messages sent between
the client and the TURN server. the client and the TURN server.
By default, TURN runs on the same ports as STUN: 3478 for TURN over By default, TURN runs on the same ports as STUN: 3478 for TURN over
UDP and TCP, and 5349 for TURN over (D)TLS. However, TURN has its UDP and TCP, and 5349 for TURN over (D)TLS. However, TURN has its
own set of Service Record (SRV) names: "turn" for UDP and TCP, and own set of Service Record (SRV) names: "turn" for UDP and TCP, and
"turns" for (D)TLS. Either the SRV procedures or the ALTERNATE- "turns" for (D)TLS. Either the DNS resolution procedures or the
SERVER procedures, both described in Section 6, can be used to run ALTERNATE-SERVER procedures, both described in Section 7, can be used
TURN on a different port. to run TURN on a different port.
To ensure interoperability, a TURN server MUST support the use of UDP To ensure interoperability, a TURN server MUST support the use of UDP
transport between the client and the server, and SHOULD support the transport between the client and the server, and SHOULD support the
use of TCP and (D)TLS transport. use of TCP, TLS-over-TCP and DTLS-over-UDP transports.
When UDP transport is used between the client and the server, the When UDP transport is used between the client and the server, the
client will retransmit a request if it does not receive a response client will retransmit a request if it does not receive a response
within a certain timeout period. Because of this, the server may within a certain timeout period. Because of this, the server may
receive two (or more) requests with the same 5-tuple and same receive two (or more) requests with the same 5-tuple and same
transaction id. STUN requires that the server recognize this case transaction id. STUN requires that the server recognize this case
and treat the request as idempotent (see [I-D.ietf-tram-stunbis]). and treat the request as idempotent (see [I-D.ietf-tram-stunbis]).
Some implementations may choose to meet this requirement by Some implementations may choose to meet this requirement by
remembering all received requests and the corresponding responses for remembering all received requests and the corresponding responses for
40 seconds. Other implementations may choose to reprocess the 40 seconds. Other implementations may choose to reprocess the
skipping to change at page 23, line 47 skipping to change at page 23, line 50
SHOULD close the corresponding TCP connection to help the other end SHOULD close the corresponding TCP connection to help the other end
detect this situation more rapidly. detect this situation more rapidly.
To mitigate either intentional or unintentional denial-of-service To mitigate either intentional or unintentional denial-of-service
attacks against the server by clients with valid usernames and attacks against the server by clients with valid usernames and
passwords, it is RECOMMENDED that the server impose limits on both passwords, it is RECOMMENDED that the server impose limits on both
the number of allocations active at one time for a given username and the number of allocations active at one time for a given username and
on the amount of bandwidth those allocations can use. The server on the amount of bandwidth those allocations can use. The server
should reject new allocations that would exceed the limit on the should reject new allocations that would exceed the limit on the
allowed number of allocations active at one time with a 486 allowed number of allocations active at one time with a 486
(Allocation Quota Exceeded) (see Section 6.2), and should discard (Allocation Quota Exceeded) (see Section 7.2), and should discard
application data traffic that exceeds the bandwidth quota. application data traffic that exceeds the bandwidth quota.
5. Allocations 6. Allocations
All TURN operations revolve around allocations, and all TURN messages All TURN operations revolve around allocations, and all TURN messages
are associated with either a single or dual allocation. An are associated with either a single or dual allocation. An
allocation conceptually consists of the following state data: allocation conceptually consists of the following state data:
o the relayed transport address or addresses; o the relayed transport address or addresses;
o the 5-tuple: (client's IP address, client's port, server IP o the 5-tuple: (client's IP address, client's port, server IP
address, server port, transport protocol); address, server port, transport protocol);
skipping to change at page 24, line 41 skipping to change at page 24, line 41
allocations, so it can be used to uniquely identify the allocation. allocations, so it can be used to uniquely identify the allocation.
The authentication information (e.g., username, password, realm, and The authentication information (e.g., username, password, realm, and
nonce) is used to both verify subsequent requests and to compute the nonce) is used to both verify subsequent requests and to compute the
message integrity of responses. The username, realm, and nonce message integrity of responses. The username, realm, and nonce
values are initially those used in the authenticated Allocate request values are initially those used in the authenticated Allocate request
that creates the allocation, though the server can change the nonce that creates the allocation, though the server can change the nonce
value during the lifetime of the allocation using a 438 (Stale Nonce) value during the lifetime of the allocation using a 438 (Stale Nonce)
reply. Note that, rather than storing the password explicitly, for reply. Note that, rather than storing the password explicitly, for
security reasons, it may be desirable for the server to store the key security reasons, it may be desirable for the server to store the key
value, which is an secure hash over the username, realm, and password value, which is a secure hash over the username, realm, and password
(see [I-D.ietf-tram-stunbis]). (see [I-D.ietf-tram-stunbis]).
The time-to-expiry is the time in seconds left until the allocation The time-to-expiry is the time in seconds left until the allocation
expires. Each Allocate or Refresh transaction sets this timer, which expires. Each Allocate or Refresh transaction sets this timer, which
then ticks down towards 0. By default, each Allocate or Refresh then ticks down towards 0. By default, each Allocate or Refresh
transaction resets this timer to the default lifetime value of 600 transaction resets this timer to the default lifetime value of 600
seconds (10 minutes), but the client can request a different value in seconds (10 minutes), but the client can request a different value in
the Allocate and Refresh request. Allocations can only be refreshed the Allocate and Refresh request. Allocations can only be refreshed
using the Refresh request; sending data to a peer does not refresh an using the Refresh request; sending data to a peer does not refresh an
allocation. When an allocation expires, the state data associated allocation. When an allocation expires, the state data associated
with the allocation can be freed. with the allocation can be freed.
The list of permissions is described in Section 8 and the list of The list of permissions is described in Section 9 and the list of
channels is described in Section 11. channels is described in Section 12.
6. Creating an Allocation 7. Creating an Allocation
An allocation on the server is created using an Allocate transaction. An allocation on the server is created using an Allocate transaction.
6.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 for a by allowing the underlying OS to pick a currently unused port for a
new socket. new socket.
The client then picks a transport protocol to use between the client The client then picks a transport protocol to use between the client
and the server. The transport protocol MUST be one of UDP, TCP, TLS- and the server. The transport protocol MUST be one of UDP, TCP, TLS-
over-TCP or DTLS-over-UDP. Since this specification only allows UDP over-TCP or DTLS-over-UDP. Since this specification only allows UDP
between the server and the peers, it is RECOMMENDED that the client between the server and the peers, it is RECOMMENDED that the client
pick UDP unless it has a reason to use a different transport. One pick UDP unless it has a reason to use a different transport. One
reason to pick a different transport would be that the client reason to pick a different transport would be that the client
believes, either through configuration or by experiment, that it is believes, either through configuration or by experiment, that it is
unable to contact any TURN server using UDP. See Section 2.1 for unable to contact any TURN server using UDP. 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 the procedures described in done as follows. The client uses one or more procedures described in
[RFC8155] to discover a TURN server and TURN server resolution [RFC8155] to discover a TURN server and uses the TURN server
mechanism defined in [RFC5928] to get a list of server transport resolution mechanism defined in [RFC5928] to get a list of server
addresses that can be tried to create a TURN allocation. transport addresses that can be tried to create a TURN 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
future extensions to specify other protocols. future extensions to specify other protocols.
If the client wishes to obtain a relayed transport address of a If the client wishes to obtain a relayed transport address of a
specific address type then it includes a REQUESTED-ADDRESS-FAMILY specific address type then it includes a REQUESTED-ADDRESS-FAMILY
attribute in the request. This attribute indicates the specific attribute in the request. This attribute indicates the specific
address type the client wishes the TURN server to allocate. Clients address type the client wishes the TURN server to allocate. Clients
MUST NOT include more than one REQUESTED-ADDRESS-FAMILY attribute in MUST NOT include more than one REQUESTED-ADDRESS-FAMILY attribute in
an Allocate request. Clients MUST NOT include a REQUESTED-ADDRESS- an Allocate request. Clients MUST NOT include a REQUESTED-ADDRESS-
FAMILY attribute in an Allocate request that contains a RESERVATION- FAMILY attribute in an Allocate request that contains a RESERVATION-
TOKEN attribute, for the reasons outlined in [RFC6156]. TOKEN attribute, for the reasons outlined in [RFC6156].
If the client wishes to obtain one IPv6 and one IPv4 relayed If the client wishes to obtain one IPv6 and one IPv4 relayed
transport addresses then it includes an ADDITIONAL-ADDRESS-FAMILY transport address then it includes an ADDITIONAL-ADDRESS-FAMILY
attribute in the request. This attribute specifies that the server attribute in the request. This attribute specifies that the server
must allocate both address types. The attribute value in the must allocate both address types. The attribute value in the
ADDITIONAL-ADDRESS-FAMILY MUST be set to 0x02 (IPv6 address family). ADDITIONAL-ADDRESS-FAMILY MUST be set to 0x02 (IPv6 address family).
Clients MUST NOT include REQUESTED-ADDRESS-FAMILY and ADDITIONAL- Clients MUST NOT include REQUESTED-ADDRESS-FAMILY and ADDITIONAL-
ADDRESS-FAMILY attributes in the same request. Clients MUST NOT ADDRESS-FAMILY attributes in the same request. Clients MUST NOT
include ADDITIONAL-ADDRESS-FAMILY attribute in a Allocate request include ADDITIONAL-ADDRESS-FAMILY attribute in a Allocate request
that contains a RESERVATION-TOKEN attribute. Clients MUST NOT that contains a RESERVATION-TOKEN attribute. Clients MUST NOT
include ADDITIONAL-ADDRESS-FAMILY attribute in a Allocate request include ADDITIONAL-ADDRESS-FAMILY attribute in a Allocate request
that contains an EVEN-PORT attribute with the R bit set to 1. that contains an EVEN-PORT attribute with the R bit set to 1.
skipping to change at page 26, line 46 skipping to change at page 26, line 46
such request is made. such request is made.
The client MAY also include a RESERVATION-TOKEN attribute in the The client MAY also include a RESERVATION-TOKEN attribute in the
request to ask the server to use a previously reserved port for the request to ask the server to use a previously reserved port for the
allocation. If the RESERVATION-TOKEN attribute is included, then the allocation. If the RESERVATION-TOKEN attribute is included, then the
client MUST omit the EVEN-PORT attribute. client MUST omit the EVEN-PORT attribute.
Once constructed, the client sends the Allocate request on the Once constructed, the client sends the Allocate request on the
5-tuple. 5-tuple.
6.2. Receiving an Allocate Request 7.2. Receiving an Allocate Request
When the server receives an Allocate request, it performs the When the server receives an Allocate request, it performs the
following checks: following checks:
1. The server MUST require that the request be authenticated. This 1. The server MUST require that the request be authenticated. This
authentication MUST be done using the long-term credential authentication MUST be done using the long-term credential
mechanism of [I-D.ietf-tram-stunbis] unless the client and mechanism of [I-D.ietf-tram-stunbis] unless the client and
server agree to use another mechanism through some procedure server agree to use another mechanism through some procedure
outside the scope of this document. outside the scope of this document.
skipping to change at page 27, line 21 skipping to change at page 27, line 21
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, the server rejects the specifies a protocol other that UDP, the server rejects the
request with a 442 (Unsupported Transport Protocol) error. request with a 442 (Unsupported 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 13), 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
attribute. If yes, and the request also contains an EVEN-PORT attribute. If yes, and the request also contains an EVEN-PORT
or REQUESTED-ADDRESS-FAMILY or ADDITIONAL-ADDRESS-FAMILY or REQUESTED-ADDRESS-FAMILY or ADDITIONAL-ADDRESS-FAMILY
attribute, the server rejects the request with a 400 (Bad attribute, the server rejects the request with a 400 (Bad
Request) error. Otherwise, it checks to see if the token is Request) error. Otherwise, it checks to see if the token is
valid (i.e., the token is in range and has not expired and the valid (i.e., the token is in range and has not expired and the
corresponding relayed transport address is still available). If corresponding relayed transport address is still available). If
the token is not valid for some reason, the server rejects the the token is not valid for some reason, the server rejects the
request with a 508 (Insufficient Capacity) error. request with a 508 (Insufficient Capacity) error.
6. The server checks if the request contains both REQUESTED- 6. The server checks if the request contains both REQUESTED-
ADDRESS-FAMILY and ADDITIONAL-ADDRESS-FAMILY attributes, then ADDRESS-FAMILY and ADDITIONAL-ADDRESS-FAMILY attributes. If
the server rejects the request with a 400 (Bad Request) error. yes, then the server rejects the request with a 400 (Bad
Request) error.
7. If the server does not support the address family requested by 7. If the server does not support the address family requested by
the client in REQUESTED-ADDRESS-FAMILY or is disabled by local the client in REQUESTED-ADDRESS-FAMILY or is disabled by local
policy, it MUST generate an Allocate error response, and it MUST policy, it MUST generate an Allocate error response, and it MUST
include an ERROR-CODE attribute with the 440 (Address Family not include an ERROR-CODE attribute with the 440 (Address Family not
Supported) response code. If the REQUESTED-ADDRESS-FAMILY Supported) response code. If the REQUESTED-ADDRESS-FAMILY
attribute is absent, the server MUST allocate an IPv4 relayed attribute is absent and the server does not support IPv4 address
transport address for the TURN client. family, the server MUST include an ERROR-CODE attribute with the
440 (Address Family not Supported) response code. If the
REQUESTED-ADDRESS-FAMILY attribute is absent and the server
supports IPv4 address family, the server MUST allocate an IPv4
relayed transport address for the TURN client.
8. The server checks if the request contains an EVEN-PORT attribute 8. The server checks if the request contains an EVEN-PORT attribute
with the R bit set to 1. If yes, and the request also contains with the R bit set to 1. If yes, and the request also contains
an ADDITIONAL- ADDRESS-FAMILY attribute, the server rejects the an ADDITIONAL-ADDRESS-FAMILY attribute, the server rejects the
request with a 400 (Bad Request) error. Otherwise, the server request with a 400 (Bad Request) error. Otherwise, the server
checks if it can satisfy the request (i.e., can allocate a checks if it can satisfy the request (i.e., can allocate a
relayed transport address as described below). If the server relayed transport address as described below). If the server
cannot satisfy the request, then the server rejects the request cannot satisfy the request, then the server rejects the request
with a 508 (Insufficient Capacity) error. with a 508 (Insufficient Capacity) error.
9. The server checks if the request contains an ADDITIONAL-ADDRESS- 9. The server checks if the request contains an ADDITIONAL-ADDRESS-
FAMILY attribute. If yes, and the attribute value is 0x01 (IPv4 FAMILY attribute. If yes, and the attribute value is 0x01 (IPv4
address family), then the server rejects the request with a 400 address family), then the server rejects the request with a 400
(Bad Request) error. Otherwise, and the server checks if it can (Bad Request) error. Otherwise, the server checks if it can
allocate relayed transport addresses of both address types. If allocate relayed transport addresses of both address types. If
the server cannot satisfy the request, then the server rejects the server cannot satisfy the request, then the server rejects
the request with a 508 (Insufficient Capacity) error. If the the request with a 508 (Insufficient Capacity) error. If the
server can partially meet the request, i.e. if it can only server can partially meet the request, i.e. if it can only
allocate one relayed transport address of a specific address allocate one relayed transport address of a specific address
type, then it includes ADDRESS-ERROR-CODE attribute in the type, then it includes ADDRESS-ERROR-CODE attribute in the
response to inform the client the reason for partial failure of response to inform the client the reason for partial failure of
the request. The error code value signaled in the ADDRESS- the request. The error code value signaled in the ADDRESS-
ERROR-CODE attribute could be 440 (Address Family not Supported) ERROR-CODE attribute could be 440 (Address Family not Supported)
or 508 (Insufficient Capacity). If the server can fully meet or 508 (Insufficient Capacity). If the server can fully meet
skipping to change at page 28, line 40 skipping to change at page 28, line 46
server is free to define this allocation quota any way it server is free to define this allocation quota any way it
wishes, but SHOULD define it based on the username used to wishes, but SHOULD define it based on the username used to
authenticate the request, and not on the client's transport authenticate the request, and not on the client's transport
address. address.
11. Also at any point, the server MAY choose to reject the request 11. Also at any point, the server MAY choose to reject the request
with a 300 (Try Alternate) error if it wishes to redirect the with a 300 (Try Alternate) error if it wishes to redirect the
client to a different server. The use of this error code and client to a different server. The use of this error code and
attribute follow the specification in [I-D.ietf-tram-stunbis]. attribute follow the specification in [I-D.ietf-tram-stunbis].
If all the checks pass, the server creates either the single or dual If all the checks pass, the server creates the allocation. The
allocation. The 5-tuple is set to the 5-tuple from the Allocate 5-tuple is set to the 5-tuple from the Allocate request, while the
request, while the list of permissions and the list of channels are list of permissions and the list of channels are initially empty.
initially empty.
The server chooses a relayed transport address for the allocation as The server chooses a relayed transport address for the allocation as
follows: follows:
o If the request contains a RESERVATION-TOKEN attribute, the server o If the request contains a RESERVATION-TOKEN attribute, the server
uses the previously reserved transport address corresponding to uses the previously reserved transport address corresponding to
the included token (if it is still available). Note that the the included token (if it is still available). Note that the
reservation is a server-wide reservation and is not specific to a reservation is a server-wide reservation and is not specific to a
particular allocation, since the Allocate request containing the particular allocation, since the Allocate request containing the
RESERVATION-TOKEN uses a different 5-tuple than the Allocate RESERVATION-TOKEN uses a different 5-tuple than the Allocate
skipping to change at page 30, line 46 skipping to change at page 30, line 50
NOTE: The XOR-MAPPED-ADDRESS attribute is included in the response NOTE: The XOR-MAPPED-ADDRESS attribute is included in the response
as a convenience to the client. TURN itself does not make use of as a convenience to the client. TURN itself does not make use of
this value, but clients running ICE can often need this value and this value, but clients running ICE can often need this value and
can thus avoid having to do an extra Binding transaction with some can thus avoid having to do an extra Binding transaction with some
STUN server to learn it. STUN server to learn it.
The response (either success or error) is sent back to the client on The response (either success or error) is sent back to the client on
the 5-tuple. the 5-tuple.
NOTE: When the Allocate request is sent over UDP, section 6.3.1 of NOTE: When the Allocate request is sent over UDP,
[I-D.ietf-tram-stunbis] requires that the server handle the [I-D.ietf-tram-stunbis] requires that the server handle the
possible retransmissions of the request so that retransmissions do possible retransmissions of the request so that retransmissions do
not cause multiple allocations to be created. Implementations may not cause multiple allocations to be created. Implementations may
achieve this using the so-called "stateless stack approach" as achieve this using the so-called "stateless stack approach" as
follows. To detect retransmissions when the original request was follows. To detect retransmissions when the original request was
successful in creating an allocation, the server can store the successful in creating an allocation, the server can store the
transaction id that created the request with the allocation data transaction id that created the request with the allocation data
and compare it with incoming Allocate requests on the same and compare it with incoming Allocate requests on the same
5-tuple. Once such a request is detected, the server can stop 5-tuple. Once such a request is detected, the server can stop
parsing the request and immediately generate a success response. parsing the request and immediately generate a success response.
skipping to change at page 31, line 31 skipping to change at page 31, line 36
time period). If the client receives the first failure response, time period). If the client receives the first failure response,
it will ignore the second (success) response and believe that an it will ignore the second (success) response and believe that an
allocation was not created. An allocation created in this matter allocation was not created. An allocation created in this matter
will eventually timeout, since the client will not refresh it. will eventually timeout, since the client will not refresh it.
Furthermore, if the client later retries with the same 5-tuple but Furthermore, if the client later retries with the same 5-tuple but
different transaction id, it will receive a 437 (Allocation different transaction id, it will receive a 437 (Allocation
Mismatch), which will cause it to retry with a different 5-tuple. Mismatch), which will cause it to retry with a different 5-tuple.
The server may use a smaller maximum lifetime value to minimize The server may use a smaller maximum lifetime value to minimize
the lifetime of allocations "orphaned" in this manner. the lifetime of allocations "orphaned" in this manner.
6.3. Receiving an Allocate Success Response 7.3. Receiving an Allocate Success Response
If the client receives an Allocate success response, then it MUST If the client receives an Allocate success response, then it MUST
check that the mapped address and the relayed transport address or check that the mapped address and the relayed transport address or
addresses are part of an address family or families that the client addresses are part of an address family or families that the client
understands and is prepared to handle. If these addresses are not understands and is prepared to handle. If these addresses are not
part of an address family or families which the client is prepared to part of an address family or families which the client is prepared to
handle, then the client MUST delete the allocation (Section 7) and handle, then the client MUST delete the allocation (Section 8) and
MUST NOT attempt to create another allocation on that server until it MUST NOT attempt to create another allocation on that server until it
believes the mismatch has been fixed. believes the mismatch has been fixed.
Otherwise, the client creates its own copy of the allocation data Otherwise, the client creates its own copy of the allocation data
structure to track what is happening on the server. In particular, structure to track what is happening on the server. In particular,
the client needs to remember the actual lifetime received back from the client needs to remember the actual lifetime received back from
the server, rather than the value sent to the server in the request. the server, rather than the value sent to the server in the request.
The client must also remember the 5-tuple used for the request and The client must also remember the 5-tuple used for the request and
the username and password it used to authenticate the request to the username and password it used to authenticate the request to
ensure that it reuses them for subsequent messages. The client also ensure that it reuses them for subsequent messages. The client also
needs to track the channels and permissions it establishes on the needs to track the channels and permissions it establishes on the
server. server.
If the client receives an Allocate success response but with ADDRESS-
ERROR-CODE attribute in the response and the error code value
signaled in the ADDRESS-ERROR-CODE attribute is 440 (Address Family
not Supported), the client MUST NOT retry its request for the
rejected address type. If the client receives an ADDRESS-ERROR-CODE
attribute in the response and the error code value signaled in the
ADDRESS-ERROR-CODE attribute is 508 (Insufficient Capacity), the
client SHOULD wait at least 1 minute before trying to request any
more allocations on this server for the rejected address type.
The client will probably wish to send the relayed transport address The client will probably wish to send the relayed transport address
to peers (using some method not specified here) so the peers can to peers (using some method not specified here) so the peers can
communicate with it. The client may also wish to use the server- communicate with it. The client may also wish to use the server-
reflexive address it receives in the XOR-MAPPED-ADDRESS attribute in reflexive address it receives in the XOR-MAPPED-ADDRESS attribute in
its ICE processing. its ICE processing.
6.4. Receiving an Allocate Error Response 7.4. Receiving an Allocate Error Response
If the client receives an Allocate error response, then the If the client receives an Allocate error response, then the
processing depends on the actual error code returned: processing depends on the actual error code returned:
o (Request timed out): There is either a problem with the server, or o (Request timed out): There is either a problem with the server, or
a problem reaching the server with the chosen transport. The a problem reaching the server with the chosen transport. The
client considers the current transaction as having failed but MAY client considers the current transaction as having failed but MAY
choose to retry the Allocate request using a different transport choose to retry the Allocate request using a different transport
(e.g., TCP instead of UDP). (e.g., TCP instead of UDP).
o 300 (Try Alternate): The server would like the client to use the o 300 (Try Alternate): The server would like the client to use the
server specified in the ALTERNATE-SERVER attribute instead. The server specified in the ALTERNATE-SERVER attribute instead. The
client considers the current transaction as having failed, but client considers the current transaction as having failed, but
SHOULD try the Allocate request with the alternate server before SHOULD try the Allocate request with the alternate server before
trying any other servers (e.g., other servers discovered using the trying any other servers (e.g., other servers discovered using the
SRV procedures). When trying the Allocate request with the DNS resolution procedures). When trying the Allocate request with
alternate server, the client follows the ALTERNATE-SERVER the alternate server, the client follows the ALTERNATE-SERVER
procedures specified in [I-D.ietf-tram-stunbis]. procedures specified in [I-D.ietf-tram-stunbis].
o 400 (Bad Request): The server believes the client's request is o 400 (Bad Request): The server believes the client's request is
malformed for some reason. The client considers the current malformed for some reason. The client considers the current
transaction as having failed. The client MAY notify the user or transaction as having failed. The client MAY notify the user or
operator and SHOULD NOT retry the request with this server until operator and SHOULD NOT retry the request with this server until
it believes the problem has been fixed. it believes the problem has been fixed.
o 401 (Unauthorized): If the client has followed the procedures of o 401 (Unauthorized): If the client has followed the procedures of
the long-term credential mechanism and still gets this error, then the long-term credential mechanism and still gets this error, then
skipping to change at page 34, line 15 skipping to change at page 34, line 30
The client considers the current operation as having failed. If The client considers the current operation as having failed. If
the client is using either the EVEN-PORT or the RESERVATION-TOKEN the client is using either the EVEN-PORT or the RESERVATION-TOKEN
attribute, then the client MAY choose to remove or modify this attribute, then the client MAY choose to remove or modify this
attribute and try again immediately. Otherwise, the client SHOULD attribute and try again immediately. Otherwise, the client SHOULD
wait at least 1 minute before trying to create any more wait at least 1 minute before trying to create any more
allocations on this server. allocations on this server.
An unknown error response MUST be handled as described in An unknown error response MUST be handled as described in
[I-D.ietf-tram-stunbis]. [I-D.ietf-tram-stunbis].
7. Refreshing an Allocation 8. Refreshing an Allocation
A Refresh transaction can be used to either (a) refresh an existing A Refresh transaction can be used to either (a) refresh an existing
allocation and update its time-to-expiry or (b) delete an existing allocation and update its time-to-expiry or (b) delete an existing
allocation. allocation.
If a client wishes to continue using an allocation, then the client If a client wishes to continue using an allocation, then the client
MUST refresh it before it expires. It is suggested that the client MUST refresh it before it expires. It is suggested that the client
refresh the allocation roughly 1 minute before it expires. If a refresh the allocation roughly 1 minute before it expires. If a
client no longer wishes to use an allocation, then it SHOULD client no longer wishes to use an allocation, then it SHOULD
explicitly delete the allocation. A client MAY refresh an allocation explicitly delete the allocation. A client MAY refresh an allocation
at any time for other reasons. at any time for other reasons.
7.1. Sending a Refresh Request 8.1. Sending a Refresh Request
If the client wishes to immediately delete an existing allocation, it If the client wishes to immediately delete an existing allocation, it
includes a LIFETIME attribute with a value of 0. All other forms of includes a LIFETIME attribute with a value of 0. All other forms of
the request refresh the allocation. the request refresh the allocation.
When refreshing a dual allocation, the client includes REQUESTED- When refreshing a dual allocation, the client includes REQUESTED-
ADDRESS-FAMILY attribute indicating the address family type that ADDRESS-FAMILY attribute indicating the address family type that
should be refreshed. If no REQUESTED-ADDRESS-FAMILY is included then should be refreshed. If no REQUESTED-ADDRESS-FAMILY is included then
the request should be treated as applying to all current allocations. the request should be treated as applying to all current allocations.
The client MUST only include family types it previously allocated and The client MUST only include family types it previously allocated and
has not yet deleted. This process can also be used to delete an has not yet deleted. This process can also be used to delete an
allocation of a specific address type, by setting the lifetime of allocation of a specific address type, by setting the lifetime of
that refresh request to 0. Deleting a single allocation destroys any that refresh request to 0. Deleting a single allocation destroys any
permissions or channels associated with that particular allocation; permissions or channels associated with that particular allocation;
it MUST NOT affect any permissions or channels associated with it MUST NOT affect any permissions or channels associated with
allocations for the other address family. allocations for the other address family.
The Refresh transaction updates the time-to-expiry timer of an The Refresh transaction updates the time-to-expiry timer of an
allocation. If the client wishes the server to set the time-to- allocation. If the client wishes the server to set the time-to-
skipping to change at page 35, line 7 skipping to change at page 35, line 21
allocations for the other address family. allocations for the other address family.
The Refresh transaction updates the time-to-expiry timer of an The Refresh transaction updates the time-to-expiry timer of an
allocation. If the client wishes the server to set the time-to- allocation. If the client wishes the server to set the time-to-
expiry timer to something other than the default lifetime, it expiry timer to something other than the default lifetime, it
includes a LIFETIME attribute with the requested value. The server includes a LIFETIME attribute with the requested value. The server
then computes a new time-to-expiry value in the same way as it does then computes a new time-to-expiry value in the same way as it does
for an Allocate transaction, with the exception that a requested for an Allocate transaction, with the exception that a requested
lifetime of 0 causes the server to immediately delete the allocation. lifetime of 0 causes the server to immediately delete the allocation.
7.2. Receiving a Refresh Request 8.2. Receiving a Refresh Request
When the server receives a Refresh request, it processes it as per When the server receives a Refresh request, it processes the request
Section 4 plus the specific rules mentioned here. as per Section 5 plus the specific rules mentioned here.
If the server receives a Refresh Request with an REQUESTED-ADDRESS- If the server receives a Refresh Request with a REQUESTED-ADDRESS-
FAMILY attribute and the attribute value does not match the address FAMILY attribute and the attribute value does not match the address
family of the allocation, the server MUST reply with a 443 (Peer family of the allocation, the server MUST reply with a 443 (Peer
Address Family Mismatch) Refresh error response. Address Family Mismatch) Refresh error response.
The server computes a value called the "desired lifetime" as follows: The server computes a value called the "desired lifetime" as follows:
if the request contains a LIFETIME attribute and the attribute value if the request contains a LIFETIME attribute and the attribute value
is 0, then the "desired lifetime" is 0. Otherwise, if the request is 0, then the "desired lifetime" is 0. Otherwise, if the request
contains a LIFETIME attribute, then the server computes the minimum contains a LIFETIME attribute, then the server computes the minimum
of the client's requested lifetime and the server's maximum allowed of the client's requested lifetime and the server's maximum allowed
lifetime. If this computed value is greater than the default lifetime. If this computed value is greater than the default
skipping to change at page 36, line 5 skipping to change at page 36, line 17
NOTE: A server need not do anything special to implement NOTE: A server need not do anything special to implement
idempotency of Refresh requests over UDP using the "stateless idempotency of Refresh requests over UDP using the "stateless
stack approach". Retransmitted Refresh requests with a non-zero stack approach". Retransmitted Refresh requests with a non-zero
"desired lifetime" will simply refresh the allocation. A "desired lifetime" will simply refresh the allocation. A
retransmitted Refresh request with a zero "desired lifetime" will retransmitted Refresh request with a zero "desired lifetime" will
cause a 437 (Allocation Mismatch) response if the allocation has cause a 437 (Allocation Mismatch) response if the allocation has
already been deleted, but the client will treat this as equivalent already been deleted, but the client will treat this as equivalent
to a success response (see below). to a success response (see below).
7.3. Receiving a Refresh Response 8.3. Receiving a Refresh Response
If the client receives a success response to its Refresh request with If the client receives a success response to its Refresh request with
a non-zero lifetime, it updates its copy of the allocation data a non-zero lifetime, it updates its copy of the allocation data
structure with the time-to-expiry value contained in the response. structure with the time-to-expiry value contained in the response.
If the client receives a 437 (Allocation Mismatch) error response to If the client receives a 437 (Allocation Mismatch) error response to
a request to delete the allocation, then the allocation no longer a request to delete the allocation, then the allocation no longer
exists and it should consider its request as having effectively exists and it should consider its request as having effectively
succeeded. succeeded.
8. Permissions 9. Permissions
For each allocation, the server keeps a list of zero or more For each allocation, the server keeps a list of zero or more
permissions. Each permission consists of an IP address and an permissions. Each permission consists of an IP address and an
associated time-to-expiry. While a permission exists, all peers associated time-to-expiry. While a permission exists, all peers
using the IP address in the permission are allowed to send data to using the IP address in the permission are allowed to send data to
the client. The time-to-expiry is the number of seconds until the the client. The time-to-expiry is the number of seconds until the
permission expires. Within the context of an allocation, a permission expires. Within the context of an allocation, a
permission is uniquely identified by its associated IP address. permission is uniquely identified by its associated IP address.
By sending either CreatePermission requests or ChannelBind requests, By sending either CreatePermission requests or ChannelBind requests,
skipping to change at page 37, line 6 skipping to change at page 37, line 18
with a ChannelBind request, or vice versa. with a ChannelBind request, or vice versa.
When a UDP datagram arrives at the relayed transport address for the When a UDP datagram arrives at the relayed transport address for the
allocation, the server extracts the source IP address from the IP allocation, the server extracts the source IP address from the IP
header. The server then compares this address with the IP address header. The server then compares this address with the IP address
associated with each permission in the list of permissions for the associated with each permission in the list of permissions for the
allocation. If no match is found, relaying is not permitted, and the allocation. If no match is found, relaying is not permitted, and the
server silently discards the UDP datagram. If an exact match is server silently discards the UDP datagram. If an exact match is
found, then the permission check is considered to have succeeded and found, then the permission check is considered to have succeeded and
the server continues to process the UDP datagram as specified the server continues to process the UDP datagram as specified
elsewhere (Section 10.3). Note that only addresses are compared and elsewhere (Section 11.3). Note that only addresses are compared and
port numbers are not considered. port numbers are not considered.
The permissions for one allocation are totally unrelated to the The permissions for one allocation are totally unrelated to the
permissions for a different allocation. If an allocation expires, permissions for a different allocation. If an allocation expires,
all its permissions expire with it. all its permissions expire with it.
NOTE: Though TURN permissions expire after 5 minutes, many NATs NOTE: Though TURN permissions expire after 5 minutes, many NATs
deployed at the time of publication expire their UDP bindings deployed at the time of publication expire their UDP bindings
considerably faster. Thus, an application using TURN will considerably faster. Thus, an application using TURN will
probably wish to send some sort of keep-alive traffic at a much probably wish to send some sort of keep-alive traffic at a much
faster rate. Applications using ICE should follow the keep-alive faster rate. Applications using ICE should follow the keep-alive
guidelines of ICE [RFC5245], and applications not using ICE are guidelines of ICE [RFC5245], and applications not using ICE are
advised to do something similar. advised to do something similar.
9. CreatePermission 10. CreatePermission
TURN supports two ways for the client to install or refresh TURN supports two ways for the client to install or refresh
permissions on the server. This section describes one way: the permissions on the server. This section describes one way: the
CreatePermission request. CreatePermission request.
A CreatePermission request may be used in conjunction with either the A CreatePermission request may be used in conjunction with either the
Send mechanism in Section 10 or the Channel mechanism in Section 11. Send mechanism in Section 11 or the Channel mechanism in Section 12.
9.1. Forming a CreatePermission Request 10.1. Forming a CreatePermission Request
The client who wishes to install or refresh one or more permissions The client who wishes to install or refresh one or more permissions
can send a CreatePermission request to the server. can send a CreatePermission request to the server.
When forming a CreatePermission request, the client MUST include at When forming a CreatePermission request, the client MUST include at
least one XOR-PEER-ADDRESS attribute, and MAY include more than one least one XOR-PEER-ADDRESS attribute, and MAY include more than one
such attribute. The IP address portion of each XOR-PEER-ADDRESS such attribute. The IP address portion of each XOR-PEER-ADDRESS
attribute contains the IP address for which a permission should be attribute contains the IP address for which a permission should be
installed or refreshed. The port portion of each XOR-PEER-ADDRESS installed or refreshed. The port portion of each XOR-PEER-ADDRESS
attribute will be ignored and can be any arbitrary value. The attribute will be ignored and can be any arbitrary value. The
various XOR-PEER-ADDRESS attributes can appear in any order. The various XOR-PEER-ADDRESS attributes MAY appear in any order. The
client MUST only include XOR-PEER-ADDRESS attributes with addresses client MUST only include XOR-PEER-ADDRESS attributes with addresses
of the same address family as that of the relayed transport address of the same address family as that of the relayed transport address
for the allocation. For dual allocations obtained using the for the allocation. For dual allocations obtained using the
ADDITIONAL-FAMILY-ADDRESS attribute, the client can include XOR-PEER- ADDITIONAL-ADDRESS-FAMILY attribute, the client MAY include XOR-PEER-
ADDRESS attributes with addresses of IPv4 and IPv6 address families. ADDRESS attributes with addresses of IPv4 and IPv6 address families.
9.2. Receiving a CreatePermission Request 10.2. Receiving a CreatePermission Request
When the server receives the CreatePermission request, it processes When the server receives the CreatePermission request, it processes
as per Section 4 plus the specific rules mentioned here. as per Section 5 plus the specific rules mentioned here.
The message is checked for validity. The CreatePermission request The message is checked for validity. The CreatePermission request
MUST contain at least one XOR-PEER-ADDRESS attribute and MAY contain MUST contain at least one XOR-PEER-ADDRESS attribute and MAY contain
multiple such attributes. If no such attribute exists, or if any of multiple such attributes. If no such attribute exists, or if any of
these attributes are invalid, then a 400 (Bad Request) error is these attributes are invalid, then a 400 (Bad Request) error is
returned. If the request is valid, but the server is unable to returned. If the request is valid, but the server is unable to
satisfy the request due to some capacity limit or similar, then a 508 satisfy the request due to some capacity limit or similar, then a 508
(Insufficient Capacity) error is returned. (Insufficient Capacity) error is returned.
If an XOR-PEER-ADDRESS attribute contains an address of an address If an XOR-PEER-ADDRESS attribute contains an address of an address
family that is not the same as that of the relayed transport address family that is not the same as that of a relayed transport address
for the allocation, the server MUST generate an error response with for the allocation, the server MUST generate an error response with
the 443 (Peer Address Family Mismatch) response code. the 443 (Peer Address Family Mismatch) response code.
The server MAY impose restrictions on the IP address allowed in the The server MAY impose restrictions on the IP address allowed in the
XOR-PEER-ADDRESS attribute -- if a value is not allowed, the server XOR-PEER-ADDRESS attribute -- if a value is not allowed, the server
rejects the request with a 403 (Forbidden) error. rejects the request with a 403 (Forbidden) error.
If the message is valid and the server is capable of carrying out the If the message is valid and the server is capable of carrying out the
request, then the server installs or refreshes a permission for the request, then the server installs or refreshes a permission for the
IP address contained in each XOR-PEER-ADDRESS attribute as described IP address contained in each XOR-PEER-ADDRESS attribute as described
in Section 8. The port portion of each attribute is ignored and may in Section 9. The port portion of each attribute is ignored and may
be any arbitrary value. be any arbitrary value.
The server then responds with a CreatePermission success response. The server then responds with a CreatePermission success response.
There are no mandatory attributes in the success response. There are no mandatory attributes in the success response.
NOTE: A server need not do anything special to implement NOTE: A server need not do anything special to implement
idempotency of CreatePermission requests over UDP using the idempotency of CreatePermission requests over UDP using the
"stateless stack approach". Retransmitted CreatePermission "stateless stack approach". Retransmitted CreatePermission
requests will simply refresh the permissions. requests will simply refresh the permissions.
9.3. Receiving a CreatePermission Response 10.3. Receiving a CreatePermission Response
If the client receives a valid CreatePermission success response, If the client receives a valid CreatePermission success response,
then the client updates its data structures to indicate that the then the client updates its data structures to indicate that the
permissions have been installed or refreshed. permissions have been installed or refreshed.
10. Send and Data Methods 11. Send and Data Methods
TURN supports two mechanisms for sending and receiving data from TURN supports two mechanisms for sending and receiving data from
peers. This section describes the use of the Send and Data peers. This section describes the use of the Send and Data
mechanisms, while Section 11 describes the use of the Channel mechanisms, while Section 12 describes the use of the Channel
mechanism. mechanism.
10.1. Forming a Send Indication 11.1. Forming a Send Indication
The client can use a Send indication to pass data to the server for The client can use a Send indication to pass data to the server for
relaying to a peer. A client may use a Send indication even if a relaying to a peer. A client may use a Send indication even if a
channel is bound to that peer. However, the client MUST ensure that channel is bound to that peer. However, the client MUST ensure that
there is a permission installed for the IP address of the peer to there is a permission installed for the IP address of the peer to
which the Send indication is being sent; this prevents a third party which the Send indication is being sent; this prevents a third party
from using a TURN server to send data to arbitrary destinations. from using a TURN server to send data to arbitrary destinations.
When forming a Send indication, the client MUST include an XOR-PEER- When forming a Send indication, the client MUST include an XOR-PEER-
ADDRESS attribute and a DATA attribute. The XOR-PEER-ADDRESS ADDRESS attribute and a DATA attribute. The XOR-PEER-ADDRESS
attribute contains the transport address of the peer to which the attribute contains the transport address of the peer to which the
data is to be sent, and the DATA attribute contains the actual data is to be sent, and the DATA attribute contains the actual
application data to be sent to the peer. application data to be sent to the peer.
The client MAY include a DONT-FRAGMENT attribute in the Send The client MAY include a DONT-FRAGMENT attribute in the Send
indication if it wishes the server to set the DF bit on the UDP indication if it wishes the server to set the DF bit on the UDP
datagram sent to the peer. datagram sent to the peer.
10.2. Receiving a Send Indication 11.2. Receiving a Send Indication
When the server receives a Send indication, it processes as per When the server receives a Send indication, it processes as per
Section 4 plus the specific rules mentioned here. Section 5 plus the specific rules mentioned here.
The message is first checked for validity. The Send indication MUST The message is first checked for validity. The Send indication MUST
contain both an XOR-PEER-ADDRESS attribute and a DATA attribute. If contain both an XOR-PEER-ADDRESS attribute and a DATA attribute. If
one of these attributes is missing or invalid, then the message is one of these attributes is missing or invalid, then the message is
discarded. Note that the DATA attribute is allowed to contain zero discarded. Note that the DATA attribute is allowed to contain zero
bytes of data. bytes of data.
The Send indication may also contain the DONT-FRAGMENT attribute. If The Send indication may also contain the DONT-FRAGMENT attribute. If
the server is unable to set the DF bit on outgoing UDP datagrams when the server is unable to set the DF bit on outgoing UDP datagrams when
this attribute is present, then the server acts as if the DONT- this attribute is present, then the server acts as if the DONT-
skipping to change at page 40, line 16 skipping to change at page 40, line 22
the allocation, where the allocation is determined by the 5-tuple the allocation, where the allocation is determined by the 5-tuple
on which the Send indication arrived; on which the Send indication arrived;
o the destination transport address is taken from the XOR-PEER- o the destination transport address is taken from the XOR-PEER-
ADDRESS attribute; ADDRESS attribute;
o the data following the UDP header is the contents of the value o the data following the UDP header is the contents of the value
field of the DATA attribute. field of the DATA attribute.
The handling of the DONT-FRAGMENT attribute (if present), is The handling of the DONT-FRAGMENT attribute (if present), is
described in Section 13. described in Section 14.
The resulting UDP datagram is then sent to the peer. The resulting UDP datagram is then sent to the peer.
10.3. Receiving a UDP Datagram 11.3. Receiving a UDP Datagram
When the server receives a UDP datagram at a currently allocated When the server receives a UDP datagram at a currently allocated
relayed transport address, the server looks up the allocation relayed transport address, the server looks up the allocation
associated with the relayed transport address. The server then associated with the relayed transport address. The server then
checks to see whether the set of permissions for the allocation allow checks to see whether the set of permissions for the allocation allow
the relaying of the UDP datagram as described in Section 8. the relaying of the UDP datagram as described in Section 9.
If relaying is permitted, then the server checks if there is a If relaying is permitted, then the server checks if there is a
channel bound to the peer that sent the UDP datagram (see channel bound to the peer that sent the UDP datagram (see
Section 11). If a channel is bound, then processing proceeds as Section 12). If a channel is bound, then processing proceeds as
described in Section 11.7. described in Section 12.7.
If relaying is permitted but no channel is bound to the peer, then If relaying is permitted but no channel is bound to the peer, then
the server forms and sends a Data indication. The Data indication the server forms and sends a Data indication. The Data indication
MUST contain both an XOR-PEER-ADDRESS and a DATA attribute. The DATA MUST contain both an XOR-PEER-ADDRESS and a DATA attribute. The DATA
attribute is set to the value of the 'data octets' field from the attribute is set to the value of the 'data octets' field from the
datagram, and the XOR-PEER-ADDRESS attribute is set to the source datagram, and the XOR-PEER-ADDRESS attribute is set to the source
transport address of the received UDP datagram. The Data indication transport address of the received UDP datagram. The Data indication
is then sent on the 5-tuple associated with the allocation. is then sent on the 5-tuple associated with the allocation.
10.4. Receiving a Data Indication with DATA attribute 11.4. Receiving a Data Indication
When the client receives a Data indication with DATA attribute, it When the client receives a Data indication, it checks that the Data
checks that the Data indication contains an XOR-PEER-ADDRESS indication contains an XOR-PEER-ADDRESS attribute, and discards the
attribute, and discards the indication if it does not. The client indication if it does not. The client SHOULD also check that the
SHOULD also check that the XOR-PEER-ADDRESS attribute value contains XOR-PEER-ADDRESS attribute value contains an IP address with which
an IP address with which the client believes there is an active the client believes there is an active permission, and discard the
permission, and discard the Data indication otherwise. Note that the Data indication otherwise.
DATA attribute is allowed to contain zero bytes of data.
NOTE: The latter check protects the client against an attacker who NOTE: The latter check protects the client against an attacker who
somehow manages to trick the server into installing permissions somehow manages to trick the server into installing permissions
not desired by the client. not desired by the client.
If the XOR-PEER-ADDRESS is present and valid, the client checks that
the Data indication contains either a DATA attribute or an ICMP
attribute and discards the indication if it does not. Note that a
DATA attribute is allowed to contain zero bytes of data. Processing
of Data indications with an ICMP attribute is described in
Section 11.6.
If the Data indication passes the above checks, the client delivers If the Data indication passes the above checks, the client delivers
the data octets inside the DATA attribute to the application, along the data octets inside the DATA attribute to the application, along
with an indication that they were received from the peer whose with an indication that they were received from the peer whose
transport address is given by the XOR-PEER-ADDRESS attribute. transport address is given by the XOR-PEER-ADDRESS attribute.
10.5. Receiving an ICMP Packet 11.5. Receiving an ICMP Packet
When the server receives an ICMP packet, the server verifies that the When the server receives an ICMP packet, the server verifies that the
type is either 3, 11 or 12 for an ICMPv4 [RFC0792] packet or either type is either 3, 11 or 12 for an ICMPv4 [RFC0792] packet or either
1, 2, or 3 for an ICMPv6 [RFC4443] packet. It also verifies that the 1, 2, or 3 for an ICMPv6 [RFC4443] packet. It also verifies that the
IP packet in the ICMP packet payload contains a UDP header. If IP packet in the ICMP packet payload contains a UDP header. If
either of these conditions fail, then the ICMP packet is silently either of these conditions fail, then the ICMP packet is silently
dropped. dropped.
The server looks up the allocation whose relayed transport address The server looks up the allocation whose relayed transport address
corresponds to the encapsulated packet's source IP address and UDP corresponds to the encapsulated packet's source IP address and UDP
skipping to change at page 42, line 5 skipping to change at page 42, line 12
address portion of XOR-PEER-ADDRESS attribute is set to the address portion of XOR-PEER-ADDRESS attribute is set to the
destination IP address in the encapsulated IP header. At the time of destination IP address in the encapsulated IP header. At the time of
writing of this specification, Socket APIs on some operating systems writing of this specification, Socket APIs on some operating systems
do not deliver the destination port in the encapsulated UDP header to do not deliver the destination port in the encapsulated UDP header to
applications without superuser privileges. If destination port in applications without superuser privileges. If destination port in
the encapsulated UDP header is available to the server then the port the encapsulated UDP header is available to the server then the port
portion of XOR-PEER-ADDRESS attribute is set to the destination port portion of XOR-PEER-ADDRESS attribute is set to the destination port
otherwise the port portion is set to 0. The Data indication is then otherwise the port portion is set to 0. The Data indication is then
sent on the 5-tuple associated with the allocation. sent on the 5-tuple associated with the allocation.
10.6. Receiving a Data Indication with an ICMP attribute 11.6. Receiving a Data Indication with an ICMP attribute
When the client receives a Data indication with an ICMP attribute, it When the client receives a Data indication with an ICMP attribute, it
checks that the Data indication contains an XOR-PEER-ADDRESS checks that the Data indication contains an XOR-PEER-ADDRESS
attribute, and discards the indication if it does not. The client attribute, and discards the indication if it does not. The client
SHOULD also check that the XOR-PEER-ADDRESS attribute value contains SHOULD also check that the XOR-PEER-ADDRESS attribute value contains
an IP address with an active permission, and discard the Data an IP address with an active permission, and discard the Data
indication otherwise. indication otherwise.
If the Data indication passes the above checks, the client signals If the Data indication passes the above checks, the client signals
the application of the error condition, along with an indication that the application of the error condition, along with an indication that
it was received from the peer whose transport address is given by the it was received from the peer whose transport address is given by the
XOR-PEER-ADDRESS attribute. The application can make sense of the XOR-PEER-ADDRESS attribute. The application can make sense of the
meaning of the type and code values in the ICMP attribute by using meaning of the type and code values in the ICMP attribute by using
the family field in the XOR-PEER-ADDRESS attribute. the family field in the XOR-PEER-ADDRESS attribute.
11. Channels 12. Channels
Channels provide a way for the client and server to send application Channels provide a way for the client and server to send application
data using ChannelData messages, which have less overhead than Send data using ChannelData messages, which have less overhead than Send
and Data indications. and Data indications.
The ChannelData message (see Section 11.4) starts with a two-byte The ChannelData message (see Section 12.4) starts with a two-byte
field that carries the channel number. The values of this field are field that carries the channel number. The values of this field are
allocated as follows: allocated as follows:
0x0000 through 0x3FFF: These values can never be used for channel 0x0000 through 0x3FFF: These values can never be used for channel
numbers. numbers.
0x4000 through 0x7FFF: These values are the allowed channel 0x4000 through 0x7FFF: These values are the allowed channel
numbers (16,384 possible values). numbers (16,384 possible values).
0x8000 through 0xFFFF: These values are reserved for future use. 0x8000 through 0xFFFF: These values are reserved for future use.
skipping to change at page 44, line 16 skipping to change at page 44, line 23
In the other direction, the client MAY elect to send ChannelData In the other direction, the client MAY elect to send ChannelData
messages before receiving the ChannelBind success response. Doing messages before receiving the ChannelBind success response. Doing
so, however, runs the risk of having the ChannelData messages dropped so, however, runs the risk of having the ChannelData messages dropped
by the server if the ChannelBind request does not succeed for some by the server if the ChannelBind request does not succeed for some
reason (e.g., packet lost if the request is sent over UDP, or the reason (e.g., packet lost if the request is sent over UDP, or the
server being unable to fulfill the request). A client that wishes to server being unable to fulfill the request). A client that wishes to
be safe should either queue the data or use Send indications until be safe should either queue the data or use Send indications until
the channel binding is confirmed. the channel binding is confirmed.
11.1. Sending a ChannelBind Request 12.1. Sending a ChannelBind Request
A channel binding is created or refreshed using a ChannelBind A channel binding is created or refreshed using a ChannelBind
transaction. A ChannelBind transaction also creates or refreshes a transaction. A ChannelBind transaction also creates or refreshes a
permission towards the peer (see Section 8). permission towards the peer (see Section 9).
To initiate the ChannelBind transaction, the client forms a To initiate the ChannelBind transaction, the client forms a
ChannelBind request. The channel to be bound is specified in a ChannelBind request. The channel to be bound is specified in a
CHANNEL-NUMBER attribute, and the peer's transport address is CHANNEL-NUMBER attribute, and the peer's transport address is
specified in an XOR-PEER-ADDRESS attribute. Section 11.2 describes specified in an XOR-PEER-ADDRESS attribute. Section 12.2 describes
the restrictions on these attributes. The client MUST only include the restrictions on these attributes. The client MUST only include
an XOR-PEER-ADDRESS attribute with an address of the same address an XOR-PEER-ADDRESS attribute with an address of the same address
family as that of the relayed transport address for the allocation. family as that of a relayed transport address for the allocation.
Rebinding a channel to the same transport address that it is already Rebinding a channel to the same transport address that it is already
bound to provides a way to refresh a channel binding and the bound to provides a way to refresh a channel binding and the
corresponding permission without sending data to the peer. Note corresponding permission without sending data to the peer. Note
however, that permissions need to be refreshed more frequently than however, that permissions need to be refreshed more frequently than
channels. channels.
11.2. Receiving a ChannelBind Request 12.2. Receiving a ChannelBind Request
When the server receives a ChannelBind request, it processes as per When the server receives a ChannelBind request, it processes as per
Section 4 plus the specific rules mentioned here. Section 5 plus the specific rules mentioned here.
The server checks the following: The server checks the following:
o The request contains both a CHANNEL-NUMBER and an XOR-PEER-ADDRESS o The request contains both a CHANNEL-NUMBER and an XOR-PEER-ADDRESS
attribute; attribute;
o The channel number is in the range 0x4000 through 0x7FFE o The channel number is in the range 0x4000 through 0x7FFE
(inclusive); (inclusive);
o The channel number is not currently bound to a different transport o The channel number is not currently bound to a different transport
address (same transport address is OK); address (same transport address is OK);
o The transport address is not currently bound to a different o The transport address is not currently bound to a different
channel number. channel number.
o If the XOR-PEER-ADDRESS attribute contains an address of an o If the XOR-PEER-ADDRESS attribute contains an address of an
address family that is not the same as that of the relayed address family that is not the same as that of a relayed transport
transport address for the allocation, the server MUST generate an address for the allocation, the server MUST generate an error
error response with the 443 (Peer Address Family Mismatch) response with the 443 (Peer Address Family Mismatch) response
response code. code.
If any of these tests fail, the server replies with a 400 (Bad If any of these tests fail, the server replies with a 400 (Bad
Request) error. Request) error.
The server MAY impose restrictions on the IP address and port values The server MAY impose restrictions on the IP address and port values
allowed in the XOR-PEER-ADDRESS attribute -- if a value is not allowed in the XOR-PEER-ADDRESS attribute -- if a value is not
allowed, the server rejects the request with a 403 (Forbidden) error. allowed, the server rejects the request with a 403 (Forbidden) error.
If the request is valid, but the server is unable to fulfill the If the request is valid, but the server is unable to fulfill the
request due to some capacity limit or similar, the server replies request due to some capacity limit or similar, the server replies
skipping to change at page 45, line 34 skipping to change at page 45, line 40
Otherwise, the server replies with a ChannelBind success response. Otherwise, the server replies with a ChannelBind success response.
There are no required attributes in a successful ChannelBind There are no required attributes in a successful ChannelBind
response. response.
If the server can satisfy the request, then the server creates or If the server can satisfy the request, then the server creates or
refreshes the channel binding using the channel number in the refreshes the channel binding using the channel number in the
CHANNEL-NUMBER attribute and the transport address in the XOR-PEER- CHANNEL-NUMBER attribute and the transport address in the XOR-PEER-
ADDRESS attribute. The server also installs or refreshes a ADDRESS attribute. The server also installs or refreshes a
permission for the IP address in the XOR-PEER-ADDRESS attribute as permission for the IP address in the XOR-PEER-ADDRESS attribute as
described in Section 8. described in Section 9.
NOTE: A server need not do anything special to implement NOTE: A server need not do anything special to implement
idempotency of ChannelBind requests over UDP using the "stateless idempotency of ChannelBind requests over UDP using the "stateless
stack approach". Retransmitted ChannelBind requests will simply stack approach". Retransmitted ChannelBind requests will simply
refresh the channel binding and the corresponding permission. refresh the channel binding and the corresponding permission.
Furthermore, the client must wait 5 minutes before binding a Furthermore, the client must wait 5 minutes before binding a
previously bound channel number or peer address to a different previously bound channel number or peer address to a different
channel, eliminating the possibility that the transaction would channel, eliminating the possibility that the transaction would
initially fail but succeed on a retransmission. initially fail but succeed on a retransmission.
11.3. Receiving a ChannelBind Response 12.3. Receiving a ChannelBind Response
When the client receives a ChannelBind success response, it updates When the client receives a ChannelBind success response, it updates
its data structures to record that the channel binding is now active. its data structures to record that the channel binding is now active.
It also updates its data structures to record that the corresponding It also updates its data structures to record that the corresponding
permission has been installed or refreshed. permission has been installed or refreshed.
If the client receives a ChannelBind failure response that indicates If the client receives a ChannelBind failure response that indicates
that the channel information is out-of-sync between the client and that the channel information is out-of-sync between the client and
the server (e.g., an unexpected 400 "Bad Request" response), then it the server (e.g., an unexpected 400 "Bad Request" response), then it
is RECOMMENDED that the client immediately delete the allocation and is RECOMMENDED that the client immediately delete the allocation and
start afresh with a new allocation. start afresh with a new allocation.
11.4. The ChannelData Message 12.4. The ChannelData Message
The ChannelData message is used to carry application data between the The ChannelData message is used to carry application data between the
client and the server. It has the following format: client and the server. It has 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Channel Number | Length | | Channel Number | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
skipping to change at page 46, line 40 skipping to change at page 46, line 47
the data is traveling, and thus the address of the peer that is the data is traveling, and thus the address of the peer that is
sending or is to receive the data. sending or is to receive the data.
The Length field specifies the length in bytes of the application The Length field specifies the length in bytes of the application
data field (i.e., it does not include the size of the ChannelData data field (i.e., it does not include the size of the ChannelData
header). Note that 0 is a valid length. header). Note that 0 is a valid length.
The Application Data field carries the data the client is trying to The Application Data field carries the data the client is trying to
send to the peer, or that the peer is sending to the client. send to the peer, or that the peer is sending to the client.
11.5. Sending a ChannelData Message 12.5. Sending a ChannelData Message
Once a client has bound a channel to a peer, then when the client has Once a client has bound a channel to a peer, then when the client has
data to send to that peer it may use either a ChannelData message or data to send to that peer it may use either a ChannelData message or
a Send indication; that is, the client is not obligated to use the a Send indication; that is, the client is not obligated to use the
channel when it exists and may freely intermix the two message types channel when it exists and may freely intermix the two message types
when sending data to the peer. The server, on the other hand, MUST when sending data to the peer. The server, on the other hand, MUST
use the ChannelData message if a channel has been bound to the peer. use the ChannelData message if a channel has been bound to the peer.
The server uses a Data indication to signal the XOR-PEER-ADDRESS and The server uses a Data indication to signal the XOR-PEER-ADDRESS and
ICMP attributes to the client even if a channel has been bound to the ICMP attributes to the client even if a channel has been bound to the
peer. peer.
The fields of the ChannelData message are filled in as described in The fields of the ChannelData message are filled in as described in
Section 11.4. Section 12.4.
Over TCP and TLS-over-TCP, the ChannelData message MUST be padded to Over TCP and TLS-over-TCP, the ChannelData message MUST be padded to
a multiple of four bytes in order to ensure the alignment of a multiple of four bytes in order to ensure the alignment of
subsequent messages. The padding is not reflected in the length subsequent messages. The padding is not reflected in the length
field of the ChannelData message, so the actual size of a ChannelData field of the ChannelData message, so the actual size of a ChannelData
message (including padding) is (4 + Length) rounded up to the nearest message (including padding) is (4 + Length) rounded up to the nearest
multiple of 4. Over UDP, the padding is not required but MAY be multiple of 4. Over UDP, the padding is not required but MAY be
included. included.
The ChannelData message is then sent on the 5-tuple associated with The ChannelData message is then sent on the 5-tuple associated with
the allocation. the allocation.
11.6. Receiving a ChannelData Message 12.6. Receiving a ChannelData Message
The receiver of the ChannelData message uses the first two bits to The receiver of the ChannelData message uses the first two bits to
distinguish it from STUN-formatted messages, as described above. If distinguish it from STUN-formatted messages, as described above. If
the message uses a value in the reserved range (0x8000 through the message uses a value in the reserved range (0x8000 through
0xFFFF), then the message is silently discarded. 0xFFFF), then the message is silently discarded.
If the ChannelData message is received in a UDP datagram, and if the If the ChannelData message is received in a UDP datagram, and if the
UDP datagram is too short to contain the claimed length of the UDP datagram is too short to contain the claimed length of the
ChannelData message (i.e., the UDP header length field value is less ChannelData message (i.e., the UDP header length field value is less
than the ChannelData header length field value + 4 + 8), then the than the ChannelData header length field value + 4 + 8), then the
message is silently discarded. message is silently discarded.
If the ChannelData message is received over TCP or over TLS-over-TCP, If the ChannelData message is received over TCP or over TLS-over-TCP,
then the actual length of the ChannelData message is as described in then the actual length of the ChannelData message is as described in
Section 11.5. Section 12.5.
If the ChannelData message is received on a channel that is not bound If the ChannelData message is received on a channel that is not bound
to any peer, then the message is silently discarded. to any peer, then the message is silently discarded.
On the client, it is RECOMMENDED that the client discard the On the client, it is RECOMMENDED that the client discard the
ChannelData message if the client believes there is no active ChannelData message if the client believes there is no active
permission towards the peer. On the server, the receipt of a permission towards the peer. On the server, the receipt of a
ChannelData message MUST NOT refresh either the channel binding or ChannelData message MUST NOT refresh either the channel binding or
the permission towards the peer. the permission towards the peer.
skipping to change at page 48, line 16 skipping to change at page 48, line 20
which the channel is bound; which the channel is bound;
o the data following the UDP header is the contents of the data o the data following the UDP header is the contents of the data
field of the ChannelData message. field of the ChannelData message.
The resulting UDP datagram is then sent to the peer. Note that if The resulting UDP datagram is then sent to the peer. Note that if
the Length field in the ChannelData message is 0, then there will be the Length field in the ChannelData message is 0, then there will be
no data in the UDP datagram, but the UDP datagram is still formed and no data in the UDP datagram, but the UDP datagram is still formed and
sent. sent.
11.7. Relaying Data from the Peer 12.7. Relaying Data from the Peer
When the server receives a UDP datagram on the relayed transport When the server receives a UDP datagram on the relayed transport
address associated with an allocation, the server processes it as address associated with an allocation, the server processes it as
described in Section 10.3. If that section indicates that a described in Section 11.3. If that section indicates that a
ChannelData message should be sent (because there is a channel bound ChannelData message should be sent (because there is a channel bound
to the peer that sent to the UDP datagram), then the server forms and to the peer that sent to the UDP datagram), then the server forms and
sends a ChannelData message as described in Section 11.5. sends a ChannelData message as described in Section 12.5.
When the server receives an ICMP packet, the server processes it as When the server receives an ICMP packet, the server processes it as
described in Section 10.5. A Data indication MUST be sent regardless described in Section 11.5. A Data indication MUST be sent regardless
if there is a channel bound to the peer that was the destination of of whether there is a channel bound to the peer that was the
the UDP datagram that triggered the reception of the ICMP packet. destination of the UDP datagram that triggered the reception of the
ICMP packet.
12. Packet Translations 13. Packet Translations
This section addresses IPv4-to-IPv6, IPv6-to-IPv4, and IPv6-to-IPv6
translations. Requirements for translation of the IP addresses and
port numbers of the packets are described above. The following
sections specify how to translate other header fields.
As discussed in Section 2.6, translations in TURN are designed so As discussed in Section 2.6, translations in TURN are designed so
that a TURN server can be implemented as an application that runs in that a TURN server can be implemented as an application that runs in
userland under commonly available operating systems and that does not userland under commonly available operating systems and that does not
require special privileges. The translations specified in the require special privileges. The translations specified in the
following sections follow this principle. following sections follow this principle.
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. Otherwise, the server MUST implement the alternate behavior. Otherwise, the server MUST implement the alternate
behavior and MUST NOT do anything else for the reasons detailed in behavior and MUST NOT do anything else for the reasons detailed in
[RFC7915]. [RFC7915].
12.1. IPv4-to-IPv6 Translations 13.1. IPv4-to-IPv6 Translations
Traffic Class Traffic Class
Preferred behavior: As specified in Section 4 of [RFC7915]. Preferred behavior: As specified in Section 4 of [RFC7915].
Alternate behavior: The relay sets the Traffic Class to the Alternate behavior: The relay sets the Traffic Class to the
default value for outgoing packets. default value for outgoing packets.
Flow Label Flow Label
Preferred behavior: The relay sets the Flow label to 0. The relay Preferred behavior: The relay sets the Flow label to 0. The relay
can choose to set the Flow label to a different value if it can choose to set the Flow label to a different value if it
supports the IPv6 Flow Label field[RFC6437]. supports the IPv6 Flow Label field [RFC6437].
Alternate behavior: the relay sets the Flow label to the default Alternate behavior: The relay sets the Flow label to the default
value for outgoing packets. value for outgoing packets.
Hop Limit Hop Limit
Preferred behavior: As specified in Section 4 of [RFC7915]. Preferred behavior: As specified in Section 4 of [RFC7915].
Alternate behavior: The relay sets the Hop Limit to the default Alternate behavior: The relay sets the Hop Limit to the default
value for outgoing packets. value for outgoing packets.
Fragmentation Fragmentation
skipping to change at page 49, line 39 skipping to change at page 49, line 48
attribute MUST be ignored by the server. attribute MUST be ignored by the server.
Extension Headers Extension Headers
Preferred behavior: The relay sends outgoing packet without any Preferred behavior: The relay sends outgoing packet without any
IPv6 extension headers, with the exception of the Fragmentation IPv6 extension headers, with the exception of the Fragmentation
header as described above. header as described above.
Alternate behavior: Same as preferred. Alternate behavior: Same as preferred.
12.2. IPv6-to-IPv6 Translations 13.2. IPv6-to-IPv6 Translations
Flow Label Flow Label
The relay should consider that it is handling two different IPv6 The relay should consider that it is handling two different IPv6
flows. Therefore, the Flow label [RFC6437] SHOULD NOT be copied as flows. Therefore, the Flow label [RFC6437] SHOULD NOT be copied as
part of the translation. part of the translation.
Preferred behavior: The relay sets the Flow label to 0. The relay Preferred behavior: The relay sets the Flow label to 0. The relay
can choose to set the Flow label to a different value if it can choose to set the Flow label to a different value if it
supports the IPv6 Flow Label field[RFC6437]. supports the IPv6 Flow Label field [RFC6437].
Alternate behavior: The relay sets the Flow label to the default Alternate behavior: The relay sets the Flow label to the default
value for outgoing packets. value for outgoing packets.
Hop Limit Hop Limit
Preferred behavior: The relay acts as a regular router with Preferred behavior: The relay acts as a regular router with
respect to decrementing the Hop Limit and generating an ICMPv6 respect to decrementing the Hop Limit and generating an ICMPv6
error if it reaches zero. error if it reaches zero.
skipping to change at page 51, line 7 skipping to change at page 51, line 19
attribute MUST be ignored by the server. attribute MUST be ignored by the server.
Extension Headers Extension Headers
Preferred behavior: The relay sends outgoing packet without any Preferred behavior: The relay sends outgoing packet without any
IPv6 extension headers, with the exception of the Fragmentation IPv6 extension headers, with the exception of the Fragmentation
header as described above. header as described above.
Alternate behavior: Same as preferred. Alternate behavior: Same as preferred.
12.3. IPv6-to-IPv4 Translations 13.3. IPv6-to-IPv4 Translations
Type of Service and Precedence Type of Service and Precedence
Preferred behavior: As specified in Section 5 of [RFC7915]. Preferred behavior: As specified in Section 5 of [RFC7915].
Alternate behavior: The relay sets the Type of Service and Alternate behavior: The relay sets the Type of Service and
Precedence to the default value for outgoing packets. Precedence to the default value for outgoing packets.
Time to Live Time to Live
Preferred behavior: As specified in Section 5 of [RFC7915]. Preferred behavior: As specified in Section 5 of [RFC7915].
Alternate behavior: The relay sets the Time to Live to the default Alternate behavior: The relay sets the Time to Live to the default
value for outgoing packets. value for outgoing packets.
Fragmentation Fragmentation
Preferred behavior: As specified in Section 5 of [RFC7915]. Preferred behavior: As specified in Section 5 of [RFC7915].
Additionally, when the outgoing packet's size exceeds the Additionally, when the outgoing packet's size exceeds the outgoing
outgoing link's MTU, the relay needs to generate an ICMP error link's MTU, the relay needs to generate an ICMP error (ICMPv6
(ICMPv6 Packet Too Big) reporting the MTU size. If the packet is Packet Too Big) reporting the MTU size. If the packet is being
being sent to the peer, the relay SHOULD reduce the MTU reported sent to the peer, the relay SHOULD reduce the MTU reported in the
in the ICMP message by 48 bytes to allow room for the overhead of ICMP message by 48 bytes to allow room for the overhead of a Data
a Data indication. indication.
Alternate behavior: The relay assembles incoming fragments. The Alternate behavior: The relay assembles incoming fragments. The
relay follows its default behavior to send outgoing packets. relay follows its default behavior to send outgoing 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.
13. IP Header Fields 14. IP Header Fields
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 when relaying between the client and the peer or vice versa.
The descriptions in this section apply: (a) when the server sends a 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 UDP datagram to the peer, or (b) when the server sends a Data
indication or ChannelData message to the client over UDP transport. indication or ChannelData message to the client over UDP transport.
The descriptions in this section do not apply to TURN messages sent The descriptions in this section do not apply to TURN messages sent
over TCP or TLS transport from the server to the client. 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
skipping to change at page 53, line 23 skipping to change at page 53, line 36
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.
14. New STUN Methods 15. STUN Methods
This section lists the codepoints for the new 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 new 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)
15. New STUN Attributes 16. STUN Attributes
This STUN extension defines the following new 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
0x0018: EVEN-PORT 0x0018: EVEN-PORT
0x0019: REQUESTED-TRANSPORT 0x0019: REQUESTED-TRANSPORT
skipping to change at page 54, line 28 skipping to change at page 54, line 31
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]).
15.1. CHANNEL-NUMBER 16.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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15.2. LIFETIME 16.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 value will maintain an allocation in the absence of a refresh. The value
portion of this attribute is 4-bytes long and consists of a 32-bit portion of this attribute is 4-bytes long and consists of a 32-bit
unsigned integral value representing the number of seconds remaining unsigned integral value representing the number of seconds remaining
until expiration. until expiration.
15.3. XOR-PEER-ADDRESS 16.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].
15.4. DATA 16.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). If the length of this attribute is not a multiple of
4, then padding must be added after this attribute. 4, then padding must be added after this attribute.
15.5. XOR-RELAYED-ADDRESS 16.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].
15.6. REQUESTED-ADDRESS-FAMILY 16.6. REQUESTED-ADDRESS-FAMILY
This attribute is used by clients to request the allocation of a This attribute is used by clients to request the allocation or
specific address type from a server. The following is the format of refresh of a specific address type from a server. The value of this
the REQUESTED-ADDRESS-FAMILY attribute. Note that TURN attributes attribute is 4 bytes with the following format:
are TLV (Type-Length-Value) encoded, with a 16-bit type, a 16-bit
length, and a variable-length value.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Family | Reserved | | Family | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type: the type of the REQUESTED-ADDRESS-FAMILY attribute is 0x0017.
As specified in [I-D.ietf-tram-stunbis], attributes with values
between 0x0000 and 0x7FFF are comprehension-required, which means
that the client or server cannot successfully process the message
unless it understands the attribute.
Length: this 16-bit field contains the length of the attribute in
bytes. The length of this attribute is 4 bytes.
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.
The REQUEST-ADDRESS-TYPE attribute MAY only be present in Allocate The REQUEST-ADDRESS-TYPE attribute MAY only be present in Allocate
requests. requests.
15.7. EVEN-PORT 16.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 56, line 40 skipping to change at page 56, line 30
R: If 1, the server is requested to reserve the next-higher port R: If 1, the server is requested to reserve the next-higher port
number (on the same IP address) for a subsequent allocation. If number (on the same IP address) for a subsequent allocation. If
0, no such reservation is requested. 0, no such reservation is requested.
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.
15.8. REQUESTED-TRANSPORT 16.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.
15.9. DONT-FRAGMENT 16.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. This attribute has no value application data onward to the peer. This attribute has no value
part and thus the attribute length field is 0. part and thus the attribute length field is 0.
15.10. RESERVATION-TOKEN 16.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.
15.11. ADDITIONAL-ADDRESS-FAMILY 16.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 15.6. The ADDITIONAL-ADDRESS- as REQUESTED-ADDRESS-FAMILY Section 16.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.
15.12. ADDRESS-ERROR-CODE Attribute 16.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 following is the format allocating the requested address family. The value portion of this
of the ADDRESS-ERROR-CODE attribute. 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Family | Rsvd |Class| Number | | Family | Rsvd |Class| Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reason Phrase (variable) .. | Reason Phrase (variable) ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type: the type of the ADDRESS-ERROR-CODE attribute is TBD-CA. As
specified in [I-D.ietf-tram-stunbis], attributes with values
between 0x8000 and 0xFFFF are comprehension-optional, which means
that the client or server can safely ignore the attribute if they
don't understand it.
Length: this 16-bit field contains the length of the attribute in
bytes.
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 13 bits in the Reserved field MUST be Reserved: at this point, the 13 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.
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 16. and 508 are explained in Section 17.
The ADDRESS-ERROR-CODE attribute MAY only be present in Allocate The ADDRESS-ERROR-CODE attribute MAY only be present in Allocate
responses. responses.
15.13. ICMP Attribute 16.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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Reserved: This field MUST be set to 0 when sent, and MUST be ignored Reserved: This field MUST be set to 0 when sent, and MUST be ignored
when received. when received.
ICMP Type: The field contains the value in the ICMP type. Its ICMP Type: The field contains the value in the ICMP type. Its
interpretation depends whether the ICMP was received over IPv4 or interpretation depends whether the ICMP was received over IPv4 or
IPv6. IPv6.
ICMP Code: The field contains the value in the ICMP code. Its ICMP Code: The field contains the value in the ICMP code. Its
interpretation depends whether the ICMP was received over IPv4 or interpretation depends whether the ICMP was received over IPv4 or
IPv6. IPv6.
16. New STUN Error Response Codes 17. STUN Error Response Codes
This document defines the following new 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.
440 (Address Family not Supported): The server does not support the 440 (Address Family not Supported): The server does not support the
skipping to change at page 60, line 12 skipping to change at page 59, line 30
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.
17. Detailed Example 18. 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 68, line 5 skipping to change at page 67, 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).
18. Security Considerations 19. 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.
18.1. Outsider Attacks 19.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.
18.1.1. Obtaining Unauthorized Allocations 19.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.
18.1.2. Offline Dictionary Attacks 19.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.
18.1.3. Faked Refreshes and Permissions 19.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 18.2. motivations for such an attack are described in Section 19.2.
18.1.4. Fake Data 19.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 70, line 19 skipping to change at page 69, 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.
18.1.5. Impersonating a Server 19.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.
18.1.6. Eavesdropping Traffic 19.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.
18.1.7. TURN Loop Attack 19.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 71, line 48 skipping to change at page 70, 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).
18.2. Firewall Considerations 19.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 72, line 28 skipping to change at page 71, 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.
18.2.1. Faked Permissions 19.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.
18.2.2. Blacklisted IP Addresses 19.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.
18.2.3. Running Servers on Well-Known Ports 19.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.
18.3. Insider Attacks 19.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.
18.3.1. DoS against TURN Server 19.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.
18.3.2. Anonymous Relaying of Malicious Traffic 19.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.
18.3.3. Manipulating Other Allocations 19.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.
18.4. Tunnel Amplification Attack 19.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 75, line 33 skipping to change at page 74, line 33
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
relays not accept allocation or channel binding requests from relays 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 relay MUST NOT accept Teredo such addresses. In particular, a TURN relay MUST NOT accept Teredo
or 6to4 addresses in these requests. or 6to4 addresses in these requests.
18.5. Other Considerations 19.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.
19. IANA Considerations 20. IANA Considerations
Since TURN is an extension to STUN [I-D.ietf-tram-stunbis], the [Paragraphs in braces should be removed by the RFC Editor upon
methods, attributes, and error codes defined in this specification publication]
are new methods, attributes, and error codes for STUN. IANA has
added these new protocol elements to the IANA registry of STUN
protocol elements.
The codepoints for the new STUN methods defined in this specification The codepoints for the STUN methods defined in this specification are
are listed in Section 14. listed in Section 15. [IANA is requested to update the reference
from [RFC5766] to RFC-to-be for the STUN methods listed in
Section 15.]
The codepoints for the new STUN attributes defined in this The codepoints for the STUN attributes defined in this specification
specification are listed in Section 15. are listed in Section 16. [IANA is requested to update the reference
from [RFC5766] to RFC-to-be for the STUN attributes CHANNEL-NUMBER,
LIFETIME, Reserved (was BANDWIDTH), XOR-PEER-ADDRESS, DATA, XOR-
RELAYED-ADDRESS, REQUESTED-ADDRESS-FAMILY, EVEN-PORT, REQUESTED-
TRANSPORT, DONT-FRAGMENT, Reserved (was TIMER-VAL) and RESERVATION-
TOKEN listed in Section 16.]
The codepoints for the new STUN error codes defined in this [The ADDITIONAL-ADDRESS-FAMILY, ADDRESS-ERROR-CODE and ICMP
specification are listed in Section 16. attributes requires that IANA allocate a value in the "STUN
attributes Registry" from the comprehension-optional range
(0x8000-0xFFFF), to be replaced for TBD-CA throughout this document]
The codepoints for the STUN error codes defined in this specification
are listed in Section 17. [IANA is requested to update the reference
from [RFC5766] to RFC-to-be for the STUN error codes listed in
Section 17.]
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 0x7FFF: A TURN implementation is free to use o 0x4000 through 0x7FFF: A TURN implementation is free to use
channel numbers in this range. channel numbers in this range.
o 0x8000 through 0xFFFF: Unassigned. o 0x8000 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.
[Paragraphs in braces should be removed by the RFC Editor upon 21. IAB Considerations
publication]
[The ADDITIONAL-ADDRESS-FAMILY, ADDRESS-ERROR-CODE and ICMP
attributes requires that IANA allocate a value in the "STUN
attributes Registry" from the comprehension- optional range
(0x8000-0xFFFF), to be replaced for TBD-CA throughout this document]
[The SendErr method requires that IANA allocate a value in the "STUN
Methods Registry" from the range (0x000-0x7FF), to be replaced for
TBD-DA throughout this document]
20. 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 78, line 7 skipping to change at page 77, line 7
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.
21. Changes since RFC 5766 22. 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-
ERRR-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
Mismatch) responses. Mismatch) responses.
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.
22. Acknowledgements 23. 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 orginal 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 SSODA mechanism. Authors would and Simon Perreault for their help on SSODA mechanism. Authors would
like to thank Gonzalo Salgueiro, Simon Perreault, Jonathan Lennox and like to thank Gonzalo Salgueiro, Simon Perreault, Jonathan Lennox and
Oleg Moskalenko for comments and review. The authors would like to Oleg Moskalenko for comments and review. The authors would like to
thank Marc for his contributions to the text. thank Marc for his contributions to the text.
23. References 24. References
23.1. Normative References 24.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-12 Utilities for NAT (STUN)", draft-ietf-tram-stunbis-15
(work in progress), March 2017. (work in progress), January 2018.
[RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5,
RFC 792, DOI 10.17487/RFC0792, September 1981, RFC 792, DOI 10.17487/RFC0792, September 1981,
<https://www.rfc-editor.org/info/rfc792>. <https://www.rfc-editor.org/info/rfc792>.
[RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts -
Communication Layers", STD 3, RFC 1122, Communication Layers", STD 3, RFC 1122,
DOI 10.17487/RFC1122, October 1989, DOI 10.17487/RFC1122, October 1989,
<https://www.rfc-editor.org/info/rfc1122>. <https://www.rfc-editor.org/info/rfc1122>.
skipping to change at page 79, line 42 skipping to change at page 78, line 42
of Explicit Congestion Notification (ECN) to IP", of Explicit Congestion Notification (ECN) to IP",
RFC 3168, DOI 10.17487/RFC3168, September 2001, RFC 3168, DOI 10.17487/RFC3168, September 2001,
<https://www.rfc-editor.org/info/rfc3168>. <https://www.rfc-editor.org/info/rfc3168>.
[RFC4443] Conta, A., Deering, S., and M. Gupta, Ed., "Internet [RFC4443] Conta, A., Deering, S., and M. Gupta, Ed., "Internet
Control Message Protocol (ICMPv6) for the Internet Control Message Protocol (ICMPv6) for the Internet
Protocol Version 6 (IPv6) Specification", STD 89, Protocol Version 6 (IPv6) Specification", STD 89,
RFC 4443, DOI 10.17487/RFC4443, March 2006, RFC 4443, DOI 10.17487/RFC4443, March 2006,
<https://www.rfc-editor.org/info/rfc4443>. <https://www.rfc-editor.org/info/rfc4443>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008,
<https://www.rfc-editor.org/info/rfc5246>.
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
January 2012, <https://www.rfc-editor.org/info/rfc6347>. January 2012, <https://www.rfc-editor.org/info/rfc6347>.
[RFC6437] Amante, S., Carpenter, B., Jiang, S., and J. Rajahalme, [RFC6437] Amante, S., Carpenter, B., Jiang, S., and J. Rajahalme,
"IPv6 Flow Label Specification", RFC 6437, "IPv6 Flow Label Specification", RFC 6437,
DOI 10.17487/RFC6437, November 2011, DOI 10.17487/RFC6437, November 2011,
<https://www.rfc-editor.org/info/rfc6437>. <https://www.rfc-editor.org/info/rfc6437>.
[RFC6555] Wing, D. and A. Yourtchenko, "Happy Eyeballs: Success with [RFC6555] Wing, D. and A. Yourtchenko, "Happy Eyeballs: Success with
skipping to change at page 80, line 24 skipping to change at page 79, line 29
[RFC7065] Petit-Huguenin, M., Nandakumar, S., Salgueiro, G., and P. [RFC7065] Petit-Huguenin, M., Nandakumar, S., Salgueiro, G., and P.
Jones, "Traversal Using Relays around NAT (TURN) Uniform Jones, "Traversal Using Relays around NAT (TURN) Uniform
Resource Identifiers", RFC 7065, DOI 10.17487/RFC7065, Resource Identifiers", RFC 7065, DOI 10.17487/RFC7065,
November 2013, <https://www.rfc-editor.org/info/rfc7065>. November 2013, <https://www.rfc-editor.org/info/rfc7065>.
[RFC7915] Bao, C., Li, X., Baker, F., Anderson, T., and F. Gont, [RFC7915] Bao, C., Li, X., Baker, F., Anderson, T., and F. Gont,
"IP/ICMP Translation Algorithm", RFC 7915, "IP/ICMP Translation Algorithm", RFC 7915,
DOI 10.17487/RFC7915, June 2016, DOI 10.17487/RFC7915, June 2016,
<https://www.rfc-editor.org/info/rfc7915>. <https://www.rfc-editor.org/info/rfc7915>.
23.2. Informative References 24.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-06 (work in progress), September ietf-tram-stun-pmtud-06 (work in progress), September
2017. 2017.
skipping to change at page 83, line 5 skipping to change at page 82, line 10
[RFC6062] Perreault, S., Ed. and J. Rosenberg, "Traversal Using [RFC6062] Perreault, S., Ed. and J. Rosenberg, "Traversal Using
Relays around NAT (TURN) Extensions for TCP Allocations", Relays around NAT (TURN) Extensions for TCP Allocations",
RFC 6062, DOI 10.17487/RFC6062, November 2010, RFC 6062, DOI 10.17487/RFC6062, November 2010,
<https://www.rfc-editor.org/info/rfc6062>. <https://www.rfc-editor.org/info/rfc6062>.
[RFC6156] Camarillo, G., Novo, O., and S. Perreault, Ed., "Traversal [RFC6156] Camarillo, G., Novo, O., and S. Perreault, Ed., "Traversal
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,
"Session Traversal Utilities for NAT (STUN) Extension for
Third-Party Authorization", RFC 7635,
DOI 10.17487/RFC7635, August 2015,
<https://www.rfc-editor.org/info/rfc7635>.
[RFC7983] Petit-Huguenin, M. and G. Salgueiro, "Multiplexing Scheme
Updates for Secure Real-time Transport Protocol (SRTP)
Extension for Datagram Transport Layer Security (DTLS)",
RFC 7983, DOI 10.17487/RFC7983, September 2016,
<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>.
Authors' Addresses Authors' Addresses
Tirumaleswar Reddy (editor) Tirumaleswar Reddy (editor)
McAfee, Inc. McAfee, Inc.
Embassy Golf Link Business Park Embassy Golf Link Business Park
 End of changes. 173 change blocks. 
369 lines changed or deleted 396 lines changed or added

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