| < draft-ietf-behave-turn-05.txt | draft-ietf-behave-turn-06.txt > | |||
|---|---|---|---|---|
| Behave J. Rosenberg | Behave J. Rosenberg | |||
| Internet-Draft Cisco | Internet-Draft Cisco | |||
| Intended status: Standards Track R. Mahy | Intended status: Standards Track R. Mahy | |||
| Expires: May 18, 2008 Plantronics | Expires: July 25, 2008 Plantronics | |||
| P. Matthews | P. Matthews | |||
| Avaya | Avaya | |||
| D. Wing | January 22, 2008 | |||
| Cisco | ||||
| November 15, 2007 | ||||
| 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-behave-turn-05 | draft-ietf-behave-turn-06 | |||
| Status of this Memo | Status of this Memo | |||
| By submitting this Internet-Draft, each author represents that any | By submitting this Internet-Draft, each author represents that any | |||
| applicable patent or other IPR claims of which he or she is aware | applicable patent or other IPR claims of which he or she is aware | |||
| have been or will be disclosed, and any of which he or she becomes | have been or will be disclosed, and any of which he or she becomes | |||
| aware will be disclosed, in accordance with Section 6 of BCP 79. | aware will be disclosed, in accordance with Section 6 of BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF), its areas, and its working groups. Note that | Task Force (IETF), its areas, and its working groups. Note that | |||
| skipping to change at page 1, line 40 ¶ | skipping to change at page 1, line 38 ¶ | |||
| 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." | |||
| The list of current Internet-Drafts can be accessed at | The list of current Internet-Drafts can be accessed at | |||
| http://www.ietf.org/ietf/1id-abstracts.txt. | http://www.ietf.org/ietf/1id-abstracts.txt. | |||
| The list of Internet-Draft Shadow Directories can be accessed at | The list of Internet-Draft Shadow Directories can be accessed at | |||
| http://www.ietf.org/shadow.html. | http://www.ietf.org/shadow.html. | |||
| This Internet-Draft will expire on May 18, 2008. | This Internet-Draft will expire on July 25, 2008. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (C) The IETF Trust (2007). | Copyright (C) The IETF Trust (2008). | |||
| Abstract | Abstract | |||
| This specification defines an extension of the Session Traversal | If a host is located behind a NAT, then in certain situations it can | |||
| Utilities for NAT (STUN) Protocol for asking the STUN server to relay | be impossible for that host to communicate directly with other hosts | |||
| packets towards a client. This extension, called Traversal Using | (peers) located behind other NATs. In these situations, it is | |||
| Relays around NAT (TURN), is useful for hosts behind address | necessary for the host to use the services of an intermediate node | |||
| dependent NATs. The extension purposefully restricts the ways in | that acts as a communication relay. This specification defines a | |||
| which the relayed address can be used. In particular, it prevents | protocol, called TURN (Traversal Using Relays around NAT), that | |||
| users from running general purpose servers on ports obtained from the | allows the host to control the operation of the relay and to exchange | |||
| TURN server. | packets with its peers using the relay. | |||
| The TURN protocol can be used in isolation, but is more properly used | ||||
| as part of the ICE (Interactive Connectivity Establishment) approach | ||||
| to NAT traversal. | ||||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 2. Overview of Operation . . . . . . . . . . . . . . . . . . . . 5 | |||
| 3. Overview of Operation . . . . . . . . . . . . . . . . . . . . 5 | 2.1. Transports . . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 3.1. Transports . . . . . . . . . . . . . . . . . . . . . . . . 8 | 2.2. Allocations . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 3.2. About Tuples . . . . . . . . . . . . . . . . . . . . . . . 9 | 2.3. Exchanging Data with Peers . . . . . . . . . . . . . . . . 9 | |||
| 3.3. Keepalives . . . . . . . . . . . . . . . . . . . . . . . . 10 | 2.4. Permissions . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 4. TURN Framing Mechanism . . . . . . . . . . . . . . . . . . . . 11 | 2.5. Channels . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 5. General Behavior . . . . . . . . . . . . . . . . . . . . . . . 11 | 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
| 6. Managing Allocations . . . . . . . . . . . . . . . . . . . . . 13 | 4. General Behavior . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
| 6.1. Client Behavior . . . . . . . . . . . . . . . . . . . . . 13 | 5. Managing Allocations . . . . . . . . . . . . . . . . . . . . . 14 | |||
| 6.1.1. Initial Allocate Requests . . . . . . . . . . . . . . 13 | 5.1. Client Behavior . . . . . . . . . . . . . . . . . . . . . 14 | |||
| 6.1.2. Refresh Requests . . . . . . . . . . . . . . . . . . . 14 | 5.1.1. Initial Allocate Requests . . . . . . . . . . . . . . 14 | |||
| 6.2. Server Behavior . . . . . . . . . . . . . . . . . . . . . 15 | 5.1.2. Refresh Requests . . . . . . . . . . . . . . . . . . . 15 | |||
| 6.2.1. Initial Allocate Requests . . . . . . . . . . 15 | 5.2. Server Behavior . . . . . . . . . . . . . . . . . . . . . 16 | |||
| 6.2.2. Refresh Requests . . . . . . . . . . . . . . . . . . . 18 | 5.2.1. Receiving an Allocate Request . . . . . . . . . . . . 16 | |||
| 7. Sending and Receiving Data . . . . . . . . . . . . . . . . . . 19 | 5.2.2. Refresh Requests . . . . . . . . . . . . . . . . . . . 20 | |||
| 7.1. Client Behavior . . . . . . . . . . . . . . . . . . . . . 19 | 6. Send and Data Indications . . . . . . . . . . . . . . . . . . 21 | |||
| 7.1.1. Sending . . . . . . . . . . . . . . . . . . . . . . . 19 | 6.1. Forming and Sending an Indication . . . . . . . . . . . . 21 | |||
| 7.1.2. Receiving . . . . . . . . . . . . . . . . . . . . . . 20 | 6.2. Receiving an Indication . . . . . . . . . . . . . . . . . 22 | |||
| 7.2. Server Behavior . . . . . . . . . . . . . . . . . . . . . 20 | 6.3. Relaying . . . . . . . . . . . . . . . . . . . . . . . . . 22 | |||
| 7.2.1. Receiving Data from the Client . . . . . . . . . . . . 20 | 7. Channel Mechanism . . . . . . . . . . . . . . . . . . . . . . 23 | |||
| 7.2.2. Receiving Data from Peers . . . . . . . . . . . . . . 22 | 7.1. Forming and Sending a ChannelBind Request . . . . . . . . 23 | |||
| 7.2.3. Allocation Activity Timer and Permission Timeout . . . 23 | 7.2. Receiving a ChannelBind Request and Sending a Response . . 24 | |||
| 8. New Attributes . . . . . . . . . . . . . . . . . . . . . . . . 23 | 7.3. Receiving a ChannelBind Response . . . . . . . . . . . . . 25 | |||
| 8.1. CHANNEL-NUMBER . . . . . . . . . . . . . . . . . . . . . . 23 | 7.4. The ChannelData Message . . . . . . . . . . . . . . . . . 25 | |||
| 8.2. LIFETIME . . . . . . . . . . . . . . . . . . . . . . . . . 24 | 7.5. Forming and Sending a ChannelData Message . . . . . . . . 25 | |||
| 8.3. BANDWIDTH . . . . . . . . . . . . . . . . . . . . . . . . 24 | 7.6. Receiving a ChannelData Message . . . . . . . . . . . . . 26 | |||
| 8.4. PEER-ADDRESS . . . . . . . . . . . . . . . . . . . . . . . 24 | 7.7. Relaying . . . . . . . . . . . . . . . . . . . . . . . . . 26 | |||
| 8.5. DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 | 8. New STUN Methods . . . . . . . . . . . . . . . . . . . . . . . 27 | |||
| 8.6. RELAY-ADDRESS . . . . . . . . . . . . . . . . . . . . . . 24 | 9. New STUN Attributes . . . . . . . . . . . . . . . . . . . . . 27 | |||
| 8.7. REQUESTED-PORT-PROPS . . . . . . . . . . . . . . . . . . . 24 | 9.1. CHANNEL-NUMBER . . . . . . . . . . . . . . . . . . . . . . 28 | |||
| 8.8. REQUESTED-TRANSPORT . . . . . . . . . . . . . . . . . . . 25 | 9.2. LIFETIME . . . . . . . . . . . . . . . . . . . . . . . . . 28 | |||
| 8.9. REQUESTED-IP . . . . . . . . . . . . . . . . . . . . . . . 26 | 9.3. BANDWIDTH . . . . . . . . . . . . . . . . . . . . . . . . 28 | |||
| 9. New Error Response Codes . . . . . . . . . . . . . . . . . . . 26 | 9.4. PEER-ADDRESS . . . . . . . . . . . . . . . . . . . . . . . 28 | |||
| 10. Client Discovery of TURN Servers . . . . . . . . . . . . . . . 27 | 9.5. DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 | |||
| 11. Security Considerations . . . . . . . . . . . . . . . . . . . 27 | 9.6. RELAY-ADDRESS . . . . . . . . . . . . . . . . . . . . . . 28 | |||
| 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 | 9.7. REQUESTED-PORT-PROPS . . . . . . . . . . . . . . . . . . . 28 | |||
| 12.1. New STUN Methods . . . . . . . . . . . . . . . . . . . . . 29 | 9.8. REQUESTED-TRANSPORT . . . . . . . . . . . . . . . . . . . 30 | |||
| 12.2. New STUN Attributes . . . . . . . . . . . . . . . . . . . 30 | 9.9. REQUESTED-IP . . . . . . . . . . . . . . . . . . . . . . . 30 | |||
| 12.3. New STUN Response Codes . . . . . . . . . . . . . . . . . 30 | 10. New STUN Error Response Codes . . . . . . . . . . . . . . . . 30 | |||
| 13. IAB Considerations . . . . . . . . . . . . . . . . . . . . . . 30 | 11. Client Discovery of TURN Servers . . . . . . . . . . . . . . . 31 | |||
| 14. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 | 12. Security Considerations . . . . . . . . . . . . . . . . . . . 32 | |||
| 15. Changes since version -04 . . . . . . . . . . . . . . . . . . 35 | 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 | |||
| 16. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 36 | 14. IAB Considerations . . . . . . . . . . . . . . . . . . . . . . 34 | |||
| 17. References . . . . . . . . . . . . . . . . . . . . . . . . . . 36 | 15. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 | |||
| 17.1. Normative References . . . . . . . . . . . . . . . . . . . 36 | 16. Changes from Previous Versions . . . . . . . . . . . . . . . . 35 | |||
| 17.2. Informative References . . . . . . . . . . . . . . . . . . 36 | 16.1. Changes from -05 to -06 . . . . . . . . . . . . . . . . . 35 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 37 | 16.2. Changes from -04 to -05 . . . . . . . . . . . . . . . . . 35 | |||
| Intellectual Property and Copyright Statements . . . . . . . . . . 39 | 17. Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 | |||
| 17.1. Open Issues . . . . . . . . . . . . . . . . . . . . . . . 37 | ||||
| 17.2. Closed Issues . . . . . . . . . . . . . . . . . . . . . . 39 | ||||
| 18. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 40 | ||||
| 19. References . . . . . . . . . . . . . . . . . . . . . . . . . . 40 | ||||
| 19.1. Normative References . . . . . . . . . . . . . . . . . . . 40 | ||||
| 19.2. Informative References . . . . . . . . . . . . . . . . . . 40 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 41 | ||||
| Intellectual Property and Copyright Statements . . . . . . . . . . 43 | ||||
| 1. Introduction | 1. Introduction | |||
| NOTE TO THE READER: This document is a work-in-progress. Please see | ||||
| the list of open and closed issues in Section 17. With only a few | ||||
| exceptions, if there is an open issue the text has NOT been updated | ||||
| in this area pending resolution of this issue - keep this in mind | ||||
| when reading the text. In addition, in the interest of getting the | ||||
| document out quickly in order to make progress on open issues, the | ||||
| authors have elected to release the document is a bit more "raw" | ||||
| state than they would prefer, resulting in some rough spots in the | ||||
| presentation. | ||||
| Session Traversal Utilities for NAT (STUN) | Session Traversal Utilities for NAT (STUN) | |||
| [I-D.ietf-behave-rfc3489bis] provides a suite of tools for | [I-D.ietf-behave-rfc3489bis] provides a suite of tools for | |||
| facilitating the traversal of NAT. Specifically, it defines the | facilitating the traversal of NAT. Specifically, it defines the | |||
| Binding method, which is used by a client to determine its reflexive | Binding method, which is used by a client to determine its reflexive | |||
| transport address towards the STUN server. The reflexive transport | transport address towards the STUN server. The reflexive transport | |||
| address can be used by the client for receiving packets from peers, | address can be used by the client for receiving packets from peers, | |||
| but only when the client is behind "good" NATs. In particular, if a | but only when the client is behind "good" NATs. In particular, if a | |||
| client is behind a NAT whose mapping behavior [RFC4787] is address or | client is behind a NAT whose mapping behavior [RFC4787] is address or | |||
| address and port dependent (sometimes called "bad" NATs), the | address and port dependent (sometimes called "bad" NATs), the | |||
| reflexive transport address will not be usable for communicating with | reflexive transport address will not be usable for communicating with | |||
| skipping to change at page 5, line 5 ¶ | skipping to change at page 5, line 14 ¶ | |||
| should only be used as a last resort. Protocols using relayed | should only be used as a last resort. Protocols using relayed | |||
| transport addresses should make use of mechanisms to dynamically | transport addresses should make use of mechanisms to dynamically | |||
| determine whether such an address is actually needed. One such | determine whether such an address is actually needed. One such | |||
| mechanism, defined for multimedia session establishment protocols | mechanism, defined for multimedia session establishment protocols | |||
| based on the offer/answer protocol in RFC 3264 [RFC3264], is | based on the offer/answer protocol in RFC 3264 [RFC3264], is | |||
| Interactive Connectivity Establishment (ICE) [I-D.ietf-mmusic-ice]. | Interactive Connectivity Establishment (ICE) [I-D.ietf-mmusic-ice]. | |||
| Though originally invented for Voice over IP applications, TURN is | Though originally invented for Voice over IP applications, TURN is | |||
| designed to be a general-purpose relay mechanism for NAT traversal. | designed to be a general-purpose relay mechanism for NAT traversal. | |||
| 2. Terminology | 2. Overview of Operation | |||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | This section gives an overview of the operation of TURN. It is non- | |||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | normative. | |||
| document are to be interpreted as described in RFC 2119 [RFC2119]. | ||||
| Relayed Transport Address: A transport address that terminates on a | In a typical configuration, a TURN client is connected to a private | |||
| server, and is forwarded towards the client. The TURN Allocate | network [RFC1918] and through one or more NATs to the public | |||
| request can be used to obtain a relayed transport address, for | Internet. On the public Internet is a TURN server. Elsewhere in the | |||
| example. | Internet are one or more peers that the TURN client wishes to | |||
| communicate with. These peers may or may not be behind one or more | ||||
| NATs. | ||||
| TURN client: A STUN client that implements this specification. It | +---------+ | |||
| obtains a relayed transport address that it provides to a small | | | | |||
| number of peers (usually one). | | | | |||
| / | Peer A | | ||||
| Client's TURN // | | | ||||
| Host Transport Server / | | | ||||
| Address Address +-+ // +---------+ | ||||
| 10.1.1.2:17240 192.0.2.15:3478 |N|/ 192.168.100.2:16400 | ||||
| | | |A| | ||||
| | +-+ | /|T| | ||||
| | | | | / +-+ | ||||
| v | | | / 192.0.2.210:18200 | ||||
| +---------+ | | |+---------+ / +---------+ | ||||
| | | |N| || | // | | | ||||
| | TURN | | | v| TURN |/ | | | ||||
| | Client |----|A|----------| Server |------------------| Peer B | | ||||
| | | | |^ | |^ ^| | | ||||
| | | |T|| | || || | | ||||
| +---------+ | || +---------+| |+---------+ | ||||
| | || | | | ||||
| | || | | | ||||
| +-+| | | | ||||
| | | | | ||||
| | | | | ||||
| Client's | Peer B | ||||
| Server-Reflexive Relayed Transport | ||||
| Transport Address Transport Address Address | ||||
| 192.0.2.1:7000 192.0.2.15:9000 192.0.2.210:18200 | ||||
| TURN server: A STUN server that implements this specification. It | Figure 1 | |||
| relays data between a TURN client and its peer(s). | ||||
| Peer: A node with which the TURN client wishes to communicate. The | Figure 1 shows a typical deployment. In this figure, the TURN client | |||
| TURN server relays traffic between the TURN client and its | and the TURN server are separated by a NAT, with the client on the | |||
| peer(s). | private side and the server on the public side of the NAT. This NAT | |||
| is assumed to be a "bad" NAT; for example, it might have a mapping | ||||
| property of address-and-port-dependent mapping (see [RFC4787]) for a | ||||
| description of what this means). | ||||
| Allocation: The IP address and port granted to a client through an | The client has allocated a local port on one of its addresses for use | |||
| Allocate request, along with related state, such as permissions | in communicating with the server. The combination of an IP address | |||
| and expiration timers. | and a port is called a TRANSPORT ADDRESS and since this (IP address, | |||
| port) combination is located on the client and not on the NAT, it is | ||||
| called the client's HOST transport address. | ||||
| 5-tuple: A combination of the source IP address and port, | The client sends TURN messages from its host transport address to a | |||
| destination IP address and port, and transport protocol (UDP, or | transport address on the TURN server which is known as the TURN | |||
| TCP). It uniquely identifies a TCP connection or bi-directional | SERVER ADDRESS. The client learns the server's address through some | |||
| flow of UDP datagrams. | unspecified means (e.g., configuration), and this address is | |||
| typically used by many clients simultaneously. The TURN server | ||||
| address is used by the client to send both commands and data to the | ||||
| server; the commands are processed by the TURN server, while the data | ||||
| is relayed on to the peers. | ||||
| Permission: A record of an IP address and transport of a peer that | Since the client is behind a NAT, the server sees these packets as | |||
| is permitted to send traffic to the TURN client. The TURN server | coming from a transport address on the NAT itself. This address is | |||
| will only forward traffic to its client from remote peers that | known as the client's SERVER-REFLEXIVE transport address; packets | |||
| match an existing permission. | sent by the server to the client's server-reflexive transport address | |||
| will be forwarded by the NAT to the client's host transport address. | ||||
| 3. Overview of Operation | The client uses TURN commands to allocate a RELAYED transport | |||
| address, which is an transport address located on the server. The | ||||
| server ensures that there is a one-to-one relationship between the | ||||
| client's server-reflexive transport address and the relayed transport | ||||
| address; thus a packet received at the relayed transport address can | ||||
| be unambiguously relayed by the server to the client. | ||||
| In a typical configuration, a TURN client is connected to a private | The client will typically communicate this relayed transport address | |||
| network and through one or more NATs to the public Internet. On the | to one or more peers through some mechanism not specified here (e.g., | |||
| public Internet is a TURN server. Elsewhere in the Internet are one | an ICE offer or answer [I-D.ietf-mmusic-ice]). Once this is done, | |||
| or more peers that the TURN client wishes to communicate with. This | peers can send data packets to the relayed transport address and the | |||
| specification defines a framing mechanism and several new STUN | server will forward them to the client. In the reverse direction, | |||
| methods. Together, these add the ability for a STUN server to act as | the client can send data packets to the server (at its TURN server | |||
| a packet relay. | address) and these will be forwarded by the server to the appropriate | |||
| peer, and the peer will see them as coming from the relayed transport | ||||
| address; in this direction, the client must specify the appropriate | ||||
| peer. | ||||
| The framing mechanism serves two purposes. First, it contains a | 2.1. Transports | |||
| length field that allow TURN nodes to find the boundaries between | ||||
| chunks of application data when the communication with the TURN | ||||
| server is over a stream-based transport such as TCP. Second, it | ||||
| carries a channel number. Channel zero is used for TURN control | ||||
| messages, while the other channel numbers are used for application | ||||
| data traveling to or from various peers. The channel number allows | ||||
| the client to know which peer sent data to it, and to specify which | ||||
| peer is to be the recipient of data. Application data flowing on any | ||||
| non-zero channel is unencapsulated, meaning that the application data | ||||
| starts immediately after the framing header. The framing header is | ||||
| just four bytes. This allows TURN to operate with minimal overhead, | ||||
| which is important for the real-time protocols it is designed to | ||||
| support. Application data can also flow in encapsulated format, | ||||
| meaning that it is carried in certain TURN messages on channel 0. | ||||
| Channel numbers are independent in each direction: for example, | ||||
| channel 5 might indicate one peer in the client to server direction, | ||||
| but a different peer in the server to client direction. | ||||
| When the client wants to obtain a relayed transport address, the | TURN as defined in this specification only allows the use of UDP | |||
| client first sends an Allocate request to the server, which the | between the server and the peer. However, this specification allows | |||
| server authenticates. The server generates an Allocate response with | the use of any one of UDP, TCP, or TLS over TCP to carry the TURN | |||
| the allocated address, port, and target transport. All other STUN | messages between the client and the server. | |||
| messages defined by this specification happen in the context of an | ||||
| +----------------------------+---------------------+ | ||||
| | TURN client to TURN server | TURN server to peer | | ||||
| +----------------------------+---------------------+ | ||||
| | UDP | UDP | | ||||
| | TCP | UDP | | ||||
| | TLS over TCP | UDP | | ||||
| +----------------------------+---------------------+ | ||||
| For TURN clients, using TLS over TCP to communicate with the TURN | ||||
| server provides two benefits. First, the client can be assured that | ||||
| the addresses of its peers are not visible to any attackers between | ||||
| it and the server. Second, the client may be able to communicate | ||||
| with TURN servers using TLS when it would not be able to communicate | ||||
| with the same server using TCP or UDP, due to the policy of a | ||||
| firewall between the TURN client and its server. In this second | ||||
| case, TLS between the client and TURN server facilitates traversal. | ||||
| There is a planned extension to TURN to add support for TCP between | ||||
| the server and the peers [I-D.ietf-behave-turn-tcp]. For this | ||||
| reason, allocations that use UDP between the server and the peers are | ||||
| known as UDP allocations, while allocations that use TCP between the | ||||
| server and the peers are known as TCP allocations. This | ||||
| specification describes only UDP allocations. | ||||
| 2.2. Allocations | ||||
| To allocate a relayed transport address, the client uses an Allocate | ||||
| transaction. The client sends a Allocate Request to the server, and | ||||
| the server replies with an Allocate Response containing the allocated | ||||
| relayed transport address. The client can include attributes in the | ||||
| Allocate Request that describe the type of allocation it desires | ||||
| (e.g., the lifetime of the allocation). And since relaying data can | ||||
| require lots of bandwidth, the server may require that the client | ||||
| authenticate itself using STUN's long-term credential mechanism, to | ||||
| show that it is authorized to use the server. | ||||
| Once a relayed transport address is allocated, a client must keep the | ||||
| allocation alive. This is done by the client periodically doing a | ||||
| Refresh transaction with the server, where the client includes the | ||||
| allocated relayed transport address in the Refresh Request. TURN | ||||
| deliberately uses a different method (Refresh rather than Allocate) | ||||
| for refreshes to ensure that the client is informed if the allocation | ||||
| vanishes for some reason. | ||||
| The frequency of the Refresh transaction is determined by the | ||||
| lifetime of the allocation. The client can request a lifetime in the | ||||
| Allocate Request and may modify its request in a Refresh Request, and | ||||
| the server always indicates the actual lifetime in the response. The | ||||
| client must issue a new Refresh transaction within 'lifetime' seconds | ||||
| of the previous Allocate or Refresh transaction. If a client no | ||||
| longer wishes to use an Allocation, it should do a Refresh | ||||
| transaction with a requested lifetime of 0. | ||||
| Note that sending or receiving data from a peer DOES NOT refresh the | ||||
| allocation. | allocation. | |||
| A successful Allocate transaction just reserves a transport address | The server remembers the 5-tuple used in the Allocate Request. | |||
| on the TURN server. Data does not flow through an allocated | Subsequent transactions between the client and the server use this | |||
| transport address until the TURN client asks the TURN server to open | same 5-tuple. In this way, the server knows which client owns the | |||
| a permission, which is done with a Send Indication. While the client | allocated relayed transport address. If the client wishes to | |||
| can request more than one permission per allocation, it needs to | allocate a second relayed transport address, it must use a different | |||
| request each permission explicitly and one at a time. This insures | 5-tuple for this allocation (e.g., by using a different client host | |||
| that a client can't use a TURN server to run a traditional server, | address). | |||
| and partially protects the client from DoS attacks. | ||||
| Once a permission is open, the client can then receive data flowing | While the terminology used in this document refers to 5-tuples, | |||
| back from its peer. Initially this data is encapsulated in a Data | the TURN server can store whatever identifier it likes that yields | |||
| Indication. Since multiple permissions can be open simultaneously, | identical results. Specifically, many implementations use a file- | |||
| the Data Indication contains the PEER-ADDRESS attribute so the TURN | descriptor in place of a 5-tuple to represent a TCP connection. | |||
| client knows which peer sent the data, and a CHANNEL-NUMBER attribute | ||||
| so the client knows how the server will refer to traffic from this | ||||
| peer when sent unencapsulated. Likewise when the client initially | ||||
| sends to a new peer, it uses a Send Indication with the peer address | ||||
| in the PEER-ADDRESS attribute, along with a channel number so the | ||||
| server knows how the client will refer to unencapsulated data to this | ||||
| peer. | ||||
| TURN TURN peer | 2.3. Exchanging Data with Peers | |||
| client server | ||||
| |--- Allocate Req -->| | | ||||
| |<-- Allocate Resp ---| | | ||||
| | | | | ||||
| |--- Send (chan 2) -->| data | | ||||
| | |============>| | ||||
| |<-- ChannelConfirm --| | | ||||
| | | data | | ||||
| | |<============| | ||||
| |<-- Data (chan 5) ---| | | ||||
| |--- ChannelConfirm ->| | | ||||
| | | | | ||||
| |--- [2] + data ----->| data | | ||||
| | |============>| | ||||
| | | data | | ||||
| | |<============| | ||||
| |<-- [5] + data ------| | | ||||
| Figure 1: Example Usage of Channels | The client can use the relayed transport address to exchange data | |||
| with its peers by using Send and Data indications. A Send Indication | ||||
| is sent from a client to the TURN server and contains, in attributes | ||||
| inside the message, the transport address of the peer and the data to | ||||
| be sent to that peer. When the TURN server receives the Send | ||||
| Indication, it extracts the data from the Send Indication and sends | ||||
| it in a UDP datagram to the peer, using the allocated relay address | ||||
| as the source address. In the reverse direction, UDP datagrams | ||||
| arriving at the relay address on the TURN server are converted into | ||||
| Data Indications and sent to the client, with the transport address | ||||
| of the peer included in an attribute in the Data Indication. | ||||
| When the client and server communicate over UDP, data and control | Note that a client can use a single relayed transport address to | |||
| messages can arrive out of order. For this reason, the client needs | exchange data with multiple peers at the same time. | |||
| to verify the server knows the client channel mapping before the | TURN TURN Peer Peer | |||
| client sends unencapsulated, and the server needs to verify the | client server A B | |||
| client knows the server channel mapping before the server sends | |--- Allocate Req -->| | | | |||
| unencapsulated. When the client and server communicate over UDP, a | |<-- Allocate Resp ---| | | | |||
| Channel Confirmation indication is sent after the Send (or Data) | | | | | | |||
| indication so the client (or server) knows that it can send | |--- Send (Peer A)--->| | | | |||
| unencapsulated. | | |=== data ===>| | | |||
| | | | | | ||||
| | |<== data ====| | | ||||
| |<-- Data (Peer A)----| | | | ||||
| | | | | | ||||
| |--- Send (Peer B)--->| | | | ||||
| | |=== data =================>| | ||||
| | | | | | ||||
| | |<== data ==================| | ||||
| |<-- Data (Peer B)----| | | | ||||
| Figure 1 demonstrates how this works. The client performs an | Figure 2 | |||
| Allocate Request, and gets a response. It decides to send data to a | ||||
| specific peer. Initially, it sends data to that peer using a TURN | ||||
| Send indication on channel 0. That Send Indication tells the TURN | ||||
| server that, once confirmed, the client will send data unencapsulated | ||||
| to that peer on channel 2. Whenever the TURN server receives a Send | ||||
| indication, it stores the mapping from channel number to peer, and | ||||
| sends a ChannelConfirm indication (on channel 0). Once the | ||||
| confirmation has been received by the client, the client can send | ||||
| data to the peer on channel 2. Prior to receipt of the | ||||
| ChannelConfirm, any other data the client wishes to send to the peer | ||||
| is sent using Send indications, all of which indicate that channel 2 | ||||
| is to be used for unencapsulated data. The same procedure happens | ||||
| from server to client; the TURN server initially sends data using a | ||||
| Data indication on channel 0, and once confirmed with a | ||||
| ChannelConfirm, it can send it unencapsulated on its selected channel | ||||
| (channel 5 in the example). | ||||
| Over a reliable transport, such as TCP, the confirmation step is not | In the figure above, the client first allocates a relayed transport | |||
| needed so the Channel Confirmation indication is not used. Clients | address. It then sends data to Peer A using a Send Indication; at | |||
| can immediately send the next piece of data to the peer on the | the server, the data is extracted and forwarded in a UDP datagram to | |||
| requested channel. | Peer A, using the relayed transport address as the source transport | |||
| address. When a UDP datagram from Peer A is received at the relayed | ||||
| transport address, the contents are placed into a Data Indication and | ||||
| forwarded to the client. A similar exchange happens with Peer B. | ||||
| Allocations can also request specific attributes such as the desired | 2.4. Permissions | |||
| Lifetime of the allocation and the maximum Bandwidth. Clients can | ||||
| also request specific port assignment behavior, for example, a | ||||
| specific port number, odd or even port numbers, or pairs of | ||||
| sequential port numbers. | ||||
| 3.1. Transports | To ease concerns amongst enterprise IT administrators that TURN could | |||
| be used to bypass corporate firewall security, TURN includes the | ||||
| notion of permissions. TURN permissions mimic the address-restricted | ||||
| filtering mechanism of NATs that comply with [RFC4787]. | ||||
| TURN clients can communicate with a TURN server using UDP, TCP, or | A TURN server will drop a UDP datagram arriving at a relayed | |||
| TLS over TCP. A TURN server can then relay traffic between a | transport address from a peer unless the client has recently sent | |||
| reliable transport used between the client and server (TCP or TLS | data to a peer with the same IP address (the port numbers can | |||
| over TCP), and UDP used from server to peer. When relaying data sent | differ). See the normative description for the precise definition of | |||
| from a stream-based protocol to a UDP peer, the TURN server emits | "recently". | |||
| datagrams which are the same length as the length field in the TURN | ||||
| framing or the length of the DATA attribute in a Send Indication. | ||||
| Likewise, when a UDP datagram is received by the TURN server and | ||||
| relayed to the client over a stream-based transport, the length of | ||||
| the datagram is the length of the TURN framing or Data Indication's | ||||
| DATA attribute. | ||||
| The following table shows the possible combinations of transport | A permission will timeout if not refreshed periodically. The client | |||
| protocols from client to server and from server to peer: | refreshes a permission by sending data to the corresponding peer. | |||
| Data received from the peer DOES NOT refresh the permission. | ||||
| +-----------------------+---------------------+ | 2.5. Channels | |||
| | client to TURN server | TURN server to peer | | ||||
| +-----------------------+---------------------+ | ||||
| | UDP | UDP | | ||||
| | TCP | UDP | | ||||
| | TLS | UDP | | ||||
| +-----------------------+---------------------+ | ||||
| For TURN clients, using TLS over TCP provides two benefits. When | In some applications, the overhead of using Send and Data indications | |||
| using TLS, the client can be assured that the address of the client's | can be substantial. For example, for applications like VoIP which | |||
| peers are not visible to an attacker except by traffic analysis | utilize small packets, Send and Data Indications, with 36 bytes of | |||
| downstream of the TURN server. Second, the client may be able to | overhead, can have a substantial impact on overall bandwidth usage. | |||
| communicate with TURN servers using TLS when it would not be able to | To remedy this, TURN clients can assign a CHANNEL to a peer. Data to | |||
| communicate with the same server using TCP or UDP, due to the | and from such a peer can then be sent using an alternate packet | |||
| configuration of a firewall between the TURN client and its server. | format that adds only 4 bytes per packet of overhead. | |||
| TLS between the client and TURN server in this case just facilitates | ||||
| traversal. | ||||
| In addition, an extension to TURN is planned to add support for TCP | The alternate packet format is known as the ChannelData message. The | |||
| allocations [I-D.ietf-behave-turn-tcp]. | ChannelData message does not use the STUN header used by other TURN | |||
| messages, but instead has a 4-byte header that includes a number | ||||
| known as a channel number. | ||||
| 3.2. About Tuples | To create a channel, the client sends a ChannelBind request to the | |||
| server, and includes an unallocated channel number and the transport | ||||
| address of the peer. Once the client receives the response to the | ||||
| ChannelBind request, it can send data to that peer using a | ||||
| ChannelData message. Similarly, once the server has received the | ||||
| request, it can relay data from that peer towards the client using a | ||||
| ChannelData message. There is no way to modify channel bindings, so | ||||
| once a channel is bound to a peer, it remains bound for the lifetime | ||||
| of the allocation. | ||||
| To relay data to and from the correct location, the TURN server | When the server receives a ChannelData message from the client, it | |||
| maintains an association between the 5-tuple used to communicate with | uses the channel number to determine the destination peer and then | |||
| the client and the 5-tuple used to communicate with each of the | forwards the data inside a UDP datagram to the peer. In the reverse | |||
| client's peers. The 5-tuple on the client side will consist of the | direction, when a UDP datagram arives at the relayed transport | |||
| client's reflexive address -- the apparent source address and port of | address from that peer, the server inserts it into a ChannelData | |||
| the client (typically as rewritten by the last NAT)--and the | message containing the channel number bound to that peer; in this way | |||
| destination address and port used by the TURN server. The figure | the client can determine the peer that send the UDP datagram. | |||
| below (Figure 2) shows a typical topology. In this diagram, the | TURN TURN Peer Peer | |||
| client 5-tuple is for a UDP flow between 192.0.2.1:7000 and | client server A B | |||
| 192.0.2.15:3490. The 5-tuple between the TURN server and Peer B is | |--- Allocate Req -->| | | | |||
| for a UDP flow between 192.0.2.15:9000 (the TURN allocated address) | |<-- Allocate Resp ---| | | | |||
| and 192.0.2.210:18200. | | | | | | |||
| |--- Send (Peer A)--->| | | | ||||
| | |=== data ===>| | | ||||
| | | | | | ||||
| | |<== data ====| | | ||||
| |<-- Data (Peer A)----| | | | ||||
| | | | | | ||||
| |- ChannelBind Req -->| | | | ||||
| | (Peer A to 0x4001) | | | | ||||
| | | | | | ||||
| |<- ChannelBind Resp -| | | | ||||
| | | | | | ||||
| |-- [0x4001] data --->| | | | ||||
| | |=== data ===>| | | ||||
| | | | | | ||||
| | |<== data ====| | | ||||
| |<- [0x4001] data --->| | | | ||||
| | | | | | ||||
| |--- Send (Peer B)--->| | | | ||||
| | |=== data =================>| | ||||
| | | | | | ||||
| | |<== data ==================| | ||||
| |<-- Data (Peer B)----| | | | ||||
| While the terminology used in this document refers to 5-tuples, | Figure 3 | |||
| the TURN server can store whatever identifier it likes that yields | ||||
| identical results. Specifically, many implementations may use a | ||||
| file-descriptor in place of a 5-tuple to represent a TCP | ||||
| connection. | ||||
| +---------+ | The figure above shows the channel mechanism in use. The client | |||
| | | | begins by allocating a relayed transport address, and then uses that | |||
| | | | address to exchange data with Peer A. After a bit, the client decides | |||
| / | Peer A | | to bind a channel to Peer A. To do this, it sends a ChannelBind | |||
| Client's TURN // | | | Request to the server, specifying the transport address of Peer A and | |||
| Host Server / | | | a channel number (0x4001). After that, the client can send | |||
| Address Address // +---------+ | application data encapsulated inside ChannelData messages to Peer A: | |||
| 10.1.1.2:17240 192.0.2.15:3490 / 192.0.2.180:16400 | this is shown as "[0x4001] data" where 0x4001 is the channel number. | |||
| | | // | ||||
| | +-+ | / | ||||
| | | | | / | ||||
| v | | | // 192.0.2.210:18200 | ||||
| +---------+ | | |+---------+ / +---------+ | ||||
| | | |N| || | // | | | ||||
| | TURN | | | v| TURN |/ | | | ||||
| | Client |----|A|----------| Server |------------------| Peer B | | ||||
| | | | |^ | |^ ^| | | ||||
| | | |T|| | || || | | ||||
| +---------+ | || +---------+| |+---------+ | ||||
| | || | | | ||||
| | || | | | ||||
| +-+| | | | ||||
| | | | | ||||
| | | ||||
| Client's TURN Peer B | ||||
| Reflexive Allocated Transport | ||||
| Address Address Address | ||||
| 192.0.2.1:7000 192.0.2.15:9000 192.0.2.210:18200 | ||||
| Figure 2 | Note that ChannelData messages can only be used for peers to which | |||
| the client has bound a channel. In the example above, Peer A has | ||||
| been bound to a channel, but Peer B has not, so application data to | ||||
| and from Peer B uses Send and Data indications. | ||||
| 3.3. Keepalives | Channel bindings are always initiated by the client. | |||
| Since the main purpose of STUN and TURN is to traverse NATs, it is | 3. Terminology | |||
| natural to consider which elements are responsible for generating | ||||
| sufficient periodic traffic to insure that NAT bindings stay alive. | ||||
| TURN clients need to send data frequently enough to keep both NAT | ||||
| bindings and the TURN server permissions fresh. Like NAT bindings, | ||||
| the TURN server permissions are refreshed by ordinary data traffic | ||||
| relayed from the client to the peer. Unlike permissions, allocations | ||||
| on the TURN server have an explicit expiration time and need to be | ||||
| refreshed explicitly by the client with a TURN Refresh request. When | ||||
| an allocation expires, all permissions associated with that | ||||
| allocation are automatically deleted. | ||||
| 4. TURN Framing Mechanism | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | ||||
| document are to be interpreted as described in RFC 2119 [RFC2119]. | ||||
| All TURN control messages and all application data sent between the | Readers are expected to be familar with [I-D.ietf-behave-rfc3489bis] | |||
| client and the server MUST start with the TURN framing header. This | and the terms defined there. | |||
| header is used for two purposes: indicating the channel number, and | ||||
| for framing. | ||||
| TURN uses a channel number to distinguish control traffic from data, | The following terms are used in this document: | |||
| and to distinguish among multiple peers using the same allocation. | ||||
| Channel number zero is reserved for TURN control messages. All TURN | ||||
| requests, responses and indications between the client and server | ||||
| MUST be sent on channel 0, and MUST NOT be sent on any other channel. | ||||
| Channel 0xFFFF is reserved for future use and MUST NOT be used by | ||||
| clients or servers compliant to this specification. Other channel | ||||
| numbers are assigned and communicated as described in Section 7. | ||||
| Because the framing is always used, TURN needs to run on a separate | ||||
| port number from unframed STUN requests. | ||||
| Over stream-based transports, the TURN client and server also need to | TURN: A protocol spoken between a TURN client and a TURN server. It | |||
| include an explicit length so that the TURN server can perform | is an extension to the STUN protocol [I-D.ietf-behave-rfc3489bis]. | |||
| conversion from streams to datagrams and vice versa. TURN framing | The protocol allows a client to allocate and use a relayed | |||
| has a 2 octet channel number and a 2 octet length field. Over | transport address. | |||
| stream-based transports, the length field counts the number of octets | ||||
| immediately after the length field itself. Over UDP the length is | ||||
| always set to zero. | ||||
| 0 1 2 3 | TURN client: A STUN client that implements this specification. | |||
| 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 numbers are always defined within a particular allocation. | TURN server: A STUN server that implements this specification. It | |||
| If a client has multiple allocations on a TURN server, there is no | relays data between a TURN client and its peer(s). | |||
| relationship whatsoever between the channel numbers in each | ||||
| allocation. Once created, a channel number persists for the lifetime | ||||
| of the allocation. There is no way to explicitly remove a channel. | ||||
| Consequently, a client which obtains an allocation with the intent of | ||||
| holding it for extremely long periods, possibly for communication | ||||
| with many different peers over time, may eventually exhaust the set | ||||
| of channels. In that case, the client will need to obtain a new | ||||
| allocation. | ||||
| 5. General Behavior | Peer: A host with which the TURN client wishes to communicate. The | |||
| TURN server relays traffic between the TURN client and its | ||||
| peer(s). The peer does not interact with the TURN server using | ||||
| the protocol defined in this document; rather, the peer receives | ||||
| data sent by the TURN server and the peer sends data towards the | ||||
| TURN server. | ||||
| Host Transport Address: A transport address allocated on a host. | ||||
| Server-Reflexive Transport Address: A transport address on the | ||||
| "public side" of a NAT. This address is allocated by the NAT to | ||||
| correspond to a specific host transport address. | ||||
| Relayed Transport Address: A transport address that exists on a TURN | ||||
| server. If a permission exists, packets that arrive at this | ||||
| address are relayed towards the TURN client. | ||||
| Allocation: The transport address granted to a client through an | ||||
| Allocate request, along with related state, such as permissions | ||||
| and expiration timers. See also Relayed Transport Address. | ||||
| 5-tuple: A combination of the source IP address and port, | ||||
| destination IP address and port, and transport protocol (UDP or | ||||
| TCP). A 5-tuple uniquely identifies a TCP connection or the bi- | ||||
| directional flow of UDP datagrams. | ||||
| Permission: The IP address and transport protocol (but not the port) | ||||
| 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 | ||||
| will only forward traffic to its client from peers that match an | ||||
| existing permission. | ||||
| 4. General Behavior | ||||
| After the initial Allocate transaction, all subsequent TURN | After the initial Allocate transaction, all subsequent TURN | |||
| transactions need to be sent in the context of a valid allocation. | transactions need to be sent in the context of a valid allocation. | |||
| The source and destination IP address and ports for these TURN | The source and destination IP address and ports for these TURN | |||
| messages MUST match the internal 5-tuple of an existing allocation. | messages MUST match the those used in the initial Allocate Request. | |||
| These are processed using the general server procedures in | These are processed using the general server procedures in | |||
| [I-D.ietf-behave-rfc3489bis] with a few important additions. For | [I-D.ietf-behave-rfc3489bis] with a few important additions. For | |||
| requests (in this specification, the only subsequent request possible | requests, if there is no matching allocation, the server MUST | |||
| is a Refresh request), if there is no matching allocation, the server | generate a 437 (Allocation Mismatch) error response. For | |||
| MUST generate a 437 (Allocation Mismatch) error response. For | ||||
| indications, if there is no matching allocation, the indication is | indications, if there is no matching allocation, the indication is | |||
| silently discarded. An Allocate request MUST NOT be sent by a client | silently discarded. An Allocate request MUST NOT be sent by a client | |||
| within the context of an existing allocation. Such a request MUST be | within the context of an existing allocation. Such a request MUST be | |||
| rejected by the server with a 437 (Allocation Mismatch) error | rejected by the server with a 437 (Allocation Mismatch) error | |||
| response. | response. | |||
| A subsequent request MUST be authenticated using the same username | A subsequent request MUST be authenticated using the same username, | |||
| and realm as the one used in the Allocate request that created the | password and realm as the one used in the Allocate request that | |||
| allocation. If the request was authenticated but not with the | created the allocation. If the request was authenticated but not | |||
| matching credential, the server MUST reject the request with a 401 | with the matching credential, the server MUST reject the request with | |||
| (Unauthorized) error response. | a 401 (Unauthorized) error response. | |||
| When a server returns an error response, it MAY include an ALTERNATE- | When a server returns an error response, it MAY include an ALTERNATE- | |||
| SERVER attribute if it has positive knowledge that the problem | SERVER attribute if it has positive knowledge that the problem | |||
| reported in the error response will not be a problem on the alternate | reported in the error response will not be a problem on the alternate | |||
| server. For example, a 443 response (Invalid IP Address) with an | server. For example, a 443 response (Invalid IP Address) with an | |||
| ALTERNATE-SERVER means that the other server is responsible for that | ALTERNATE-SERVER means that the other server is responsible for that | |||
| IP address. A 442 (Unsupported Transport Protocol) with this | IP address. A 442 (Unsupported Transport Protocol) with this | |||
| attribute means that the other server is known to support that | attribute means that the other server is known to support that | |||
| transport protocol. A 507 (Insufficient Capacity) means that the | transport protocol. A 507 (Insufficient Capacity) means that the | |||
| other server is known to have sufficient capacity. Using the | other server is known to have sufficient capacity. Using the | |||
| skipping to change at page 12, line 44 ¶ | skipping to change at page 14, line 10 ¶ | |||
| response can only be done if the rejecting server has definitive | response can only be done if the rejecting server has definitive | |||
| knowledge of available capacity on the target. This will require | knowledge of available capacity on the target. This will require | |||
| some kind of state sharing mechanism between TURN servers, which is | some kind of state sharing mechanism between TURN servers, which is | |||
| beyond the scope of this specification. If a TURN server attempts to | beyond the scope of this specification. If a TURN server attempts to | |||
| redirect to another server without knowledge of available capacity, | redirect to another server without knowledge of available capacity, | |||
| it is possible that all servers are in a congested state, resulting | it is possible that all servers are in a congested state, resulting | |||
| in series of rejections that only serve to further increase the load | in series of rejections that only serve to further increase the load | |||
| on the system. This can cause congestion collapse. | on the system. This can cause congestion collapse. | |||
| If a client sends a request to a server and gets a 500 class error | If a client sends a request to a server and gets a 500 class error | |||
| response without an ALTERNATE-SERVER, or the transaction times out | response without an ALTERNATE-SERVER, or the STUN transaction times | |||
| without a response, and the client was utilizing the SRV procedures | out without a response, and the client was utilizing the SRV | |||
| of [I-D.ietf-behave-rfc3489bis] to contact the server, the client | procedures of [I-D.ietf-behave-rfc3489bis] to contact the server, the | |||
| SHOULD try another server based on those procedures. However, the | client SHOULD try another server based on those procedures. However, | |||
| client SHOULD cache the fact that the request to this server failed, | the client SHOULD cache the fact that the request to this server | |||
| and not retry that server again for a configurable period of time. | failed, and not retry that server again for a configurable period of | |||
| Five minutes is RECOMMENDED. | time. Five minutes is RECOMMENDED. | |||
| TURN clients and servers MUST NOT include the FINGERPRINT attribute | TURN clients and servers MUST NOT include the FINGERPRINT attribute | |||
| in any of the methods defined in this document. | in any of the methods defined in this document. | |||
| 6. Managing Allocations | 5. Managing Allocations | |||
| Communications between a TURN client and a TURN server on a new flow | Communications between a TURN client and a TURN server begin with an | |||
| begin with an Allocate transaction. All subsequent transactions | Allocate transaction. All subsequent transactions happen in the | |||
| happen in the context of that allocation. The client refreshes | context of that allocation, and happen on the same 5-tuple. The | |||
| allocations and deallocates them using a Refresh transaction. | client refreshes allocations and deallocates them using a Refresh | |||
| transaction. | ||||
| 6.1. Client Behavior | 5.1. Client Behavior | |||
| 6.1.1. Initial Allocate Requests | 5.1.1. Initial Allocate Requests | |||
| When a client wishes to obtain a transport address, it sends an | When a client wishes to obtain a transport address, it sends an | |||
| Allocate request to the server. This request is constructed and sent | Allocate request to the server. This request is constructed and sent | |||
| using the general procedures defined in [I-D.ietf-behave-rfc3489bis]. | using the general procedures defined in [I-D.ietf-behave-rfc3489bis]. | |||
| Clients MUST implement the long term credential mechanism defined in | Clients MUST implement the long term credential mechanism defined in | |||
| [I-D.ietf-behave-rfc3489bis], and be prepared for the server to use | [I-D.ietf-behave-rfc3489bis], and be prepared for the server to | |||
| it. | demand credentials for requests. | |||
| The client SHOULD include a BANDWIDTH attribute, which indicates the | The client SHOULD include a BANDWIDTH attribute, which indicates the | |||
| maximum bandwidth that will be used with this binding. If the | maximum bandwidth that will be used with this binding. If the | |||
| maximum is unknown, the attribute is not included in the request. | maximum is unknown, the attribute is not included in the request. | |||
| OPEN ISSUE: Bandwidth is very much underspecified. Is anyone | ||||
| actually using it for capacity planning? If not we should remove. | ||||
| The client MAY request a particular lifetime for the allocation by | The client MAY request a particular lifetime for the allocation by | |||
| including it in the LIFETIME attribute in the request. | including it in the LIFETIME attribute in the request. | |||
| The client MUST include a REQUESTED-TRANSPORT attribute. In this | The client MUST include a REQUESTED-TRANSPORT attribute. In this | |||
| specification, the REQUESTED-TRANSPORT will always be UDP. This | specification, the REQUESTED-TRANSPORT MUST always be UDP. This | |||
| attribute is included to allow for future extensions to TURN. | attribute is included to allow for future extensions to TURN (e.g., | |||
| [I-D.ietf-behave-turn-tcp]) | ||||
| The client MAY include a REQUESTED-PORT-PROPS or REQUESTED-IP | The client MAY include a REQUESTED-PORT-PROPS or REQUESTED-IP | |||
| attribute in the request to obtain specific types of transport | attribute in the request to obtain specific types of transport | |||
| addresses. Whether these are needed depends on the application using | addresses, if desired. | |||
| the TURN server. As an example, the Real Time Transport Protocol | ||||
| (RTP) [RFC3550] requires that RTP and RTCP ports be an adjacent pair, | ||||
| even and odd respectively, for compatibility with a previous version | ||||
| of that specification. The REQUESTED-PORT-PROPS attribute allows the | ||||
| client to ask the relay for those properties. | ||||
| Processing of the response follows the general procedures of | Processing of the response follows the general procedures of | |||
| [I-D.ietf-behave-rfc3489bis]. A successful response will include | [I-D.ietf-behave-rfc3489bis]. A successful response will include | |||
| both a RELAY-ADDRESS and an XOR-MAPPED-ADDRESS attribute, providing | both a RELAY-ADDRESS and an XOR-MAPPED-ADDRESS attribute, providing | |||
| both a relayed transport address and a reflexive transport address, | both a relayed transport address and a reflexive transport address, | |||
| respectively, to the client. The value of the LIFETIME attribute in | respectively, to the client. The value of the LIFETIME attribute in | |||
| the response indicates the amount of time after which the server will | the response indicates the amount of time after which the server will | |||
| expire the allocation, if not refreshed with a Refresh request. The | expire the allocation, if not refreshed with a Refresh request. The | |||
| server will allow the user to send and receive at least the amount of | server will allow the user to send and receive at least the amount of | |||
| data indicated in the BANDWIDTH attribute per allocation. (At its | data indicated in the BANDWIDTH attribute per allocation. (At its | |||
| skipping to change at page 14, line 21 ¶ | skipping to change at page 15, line 29 ¶ | |||
| If the response is an error response and contains a 442, 443 or 444 | If the response is an error response and contains a 442, 443 or 444 | |||
| error code, the client knows that its requested properties could not | error code, the client knows that its requested properties could not | |||
| be met. The client MAY retry with different properties, with the | be met. The client MAY retry with different properties, with the | |||
| same properties (in a hope that something has changed on the server), | same properties (in a hope that something has changed on the server), | |||
| or give up, depending on the needs of the application. However, if | or give up, depending on the needs of the application. However, if | |||
| the client retries, it SHOULD wait 500ms, and if the request fails | the client retries, it SHOULD wait 500ms, and if the request fails | |||
| again, wait 1 second, then 2 seconds, and so on, exponentially | again, wait 1 second, then 2 seconds, and so on, exponentially | |||
| backing off. | backing off. | |||
| 6.1.2. Refresh Requests | 5.1.2. Refresh Requests | |||
| TURN permissions are kept alive by traffic flowing through them, and | ||||
| persist for the lifetime of the allocation. However, The allocations | ||||
| themselves have to be kept alive through Refresh Requests. | ||||
| Before 3/4 of the lifetime of the allocation has passed (the lifetime | Before 3/4 of the lifetime of the allocation has passed (the lifetime | |||
| of the allocation is conveyed in the LIFETIME attribute of the | of the allocation is conveyed in the LIFETIME attribute of the | |||
| Allocate Response), the client SHOULD refresh the allocation with a | Allocate Response), the client SHOULD refresh the allocation with a | |||
| Refresh transaction if it wishes to keep the allocation. | Refresh transaction if it wishes to keep the allocation. | |||
| To perform a refresh, the client generates a Refresh Request. The | To perform a refresh, the client generates a Refresh Request. The | |||
| client MUST use the same username, realm and password for the Refresh | client MUST use the same username, realm and password for the Refresh | |||
| request as it used in its initial Allocate Request. The Refresh | request as it used in its initial Allocate Request. The Refresh | |||
| request MAY contain a proposed LIFETIME attribute. The client MAY | request MAY contain a proposed LIFETIME attribute. The client MAY | |||
| include a BANDWIDTH attribute if it wishes to request more or less | include a BANDWIDTH attribute if it wishes to request more or less | |||
| bandwidth than in the original request. If absent, it indicates no | bandwidth than in the original request (this might also be the first | |||
| change in the requested bandwidth from the Allocate request. The | time the TURN client indicates bandwidth to the TURN server). If the | |||
| client MUST NOT include a REQUESTED-IP, REQUESTED-TRANSPORT, or | BANDWIDTH attribute is absent, it indicates no change in the | |||
| REQUESTED-PORT-PROPS attribute in the Refresh request. | requested bandwidth from the Allocate request. The client MUST NOT | |||
| include a REQUESTED-IP, REQUESTED-TRANSPORT, or REQUESTED-PORT-PROPS | ||||
| attribute in the Refresh request. | ||||
| In a successful response, the LIFETIME attribute indicates the amount | In a successful response, the LIFETIME attribute indicates the amount | |||
| of additional time (the number of seconds after the response is | of additional time (the number of seconds after the response is | |||
| received) that the allocation will live without being refreshed. A | received) that the allocation will live without being refreshed. A | |||
| successful response will also contain a BANDWIDTH attribute, | successful response will also contain a BANDWIDTH attribute, | |||
| indicating the bandwidth the server is allowing for this allocation. | indicating the bandwidth the server is allowing for this allocation. | |||
| Note that an error response does not imply that the allocation has | Note that an error response does not imply that the allocation has | |||
| expired, just that the refresh has failed. | expired, just that the refresh has failed. | |||
| If a client no longer needs an allocation, it SHOULD perform an | If a client no longer needs an allocation, it SHOULD perform an | |||
| explicit deallocation. If the client wishes to explicitly remove the | explicit deallocation. If the client wishes to explicitly remove the | |||
| allocation because it no longer needs it, it sends a Refresh request, | allocation because it no longer needs it, it sends a Refresh request, | |||
| but sets the LIFETIME attribute to zero. This will cause the server | but sets the LIFETIME attribute to zero. This will cause the server | |||
| to remove the allocation, and all associated permissions and channel | to remove the allocation, and all associated permissions and channel | |||
| numbers. For connection-oriented transports such as TCP, the client | numbers. For connection-oriented transports such as TCP, the client | |||
| can also remove the allocation (and all associated bindings) by | can also remove the allocation (and all associated bindings) by | |||
| closing the relevant connection with the TURN server. | closing the relevant connection with the TURN server. | |||
| 6.2. Server Behavior | 5.2. Server Behavior | |||
| The server first processes the request according to the base protocol | ||||
| procedures in [I-D.ietf-behave-rfc3489bis], extended with the | ||||
| procedures for the long-term credential mechanism. | ||||
| 6.2.1. Initial Allocate Requests | 5.2.1. Receiving an Allocate Request | |||
| When the server receives an Allocate request, the server attempts to | When the server receives an Allocate request, the server attempts to | |||
| allocate a relayed transport address. It first looks for the | allocate a relayed transport address. | |||
| BANDWIDTH attribute in the request. If present, the server | ||||
| determines whether or not it has sufficient capacity to handle a | When the server receives the Allocate Request, it begins by | |||
| binding that will generate the requested bandwidth. | processing it according to the base protocol procedures described in | |||
| [I-D.ietf-behave-rfc3489bis], plus the Long-Term Credential Mechanism | ||||
| procedures if the server is using this mechanism. | ||||
| It then checks if the 5-tuple used for the Allocate Request matches | ||||
| the 5-tuple used for an existing allocation. If there is a match, | ||||
| then: | ||||
| o If the transport protocol is UDP, and the transaction id in the | ||||
| request message matches the transaction id used for the original | ||||
| allocation, then the server treats this as a retransmission of the | ||||
| original request, and replies with the same response as it did to | ||||
| the original request. The server may do this by either storing | ||||
| its original response and resending it, or by rebuilding its | ||||
| original response from other state data. | ||||
| o If the transport protocol is not UDP, or if the transaction id in | ||||
| the request message does not match the transaction id used for the | ||||
| original allocation, then the server replies with an error | ||||
| response containing the error code 437 Allocation Mismatch. | ||||
| If the 5-tuple does not match an existing allocation, then processing | ||||
| continues as described below. | ||||
| 5.2.1.1. BANDWIDTH | ||||
| The server checks for the BANDWIDTH attribute in the request. If | ||||
| present, the server determines whether or not it has sufficient | ||||
| capacity to handle a binding that will generate the requested | ||||
| bandwidth. | ||||
| If it does, the server attempts to allocate a transport address for | If it does, the server attempts to allocate a transport address for | |||
| the client. The Allocate Request can contain several additional | the client. The Allocate Request can contain several additional | |||
| attributes that allow the client to request specific characteristics | attributes that allow the client to request specific characteristics | |||
| of the transport address. | of the transport address. If it doesn't, it sends an error response. | |||
| 6.2.1.1. REQUESTED-TRANSPORT | 5.2.1.2. REQUESTED-TRANSPORT | |||
| First, the server checks for the REQUESTED-TRANSPORT attribute. This | The server checks for the REQUESTED-TRANSPORT attribute. This | |||
| indicates the transport protocol requested by the client. This | indicates the transport protocol requested by the client. This | |||
| specification defines a value for UDP only, but support for TCP | specification defines a value for UDP only, but support for TCP | |||
| allocations is planned in [I-D.ietf-behave-turn-tcp]. | allocations is planned in [I-D.ietf-behave-turn-tcp]. | |||
| As a consequence of the REQUESTED-TRANSPORT attribute, it is | As a consequence of the REQUESTED-TRANSPORT attribute, it is | |||
| possible for a client to connect to the server over TCP or TLS | possible for a client to connect to the server over TCP or TLS | |||
| over TCP and request a UDP transport address. In this case, the | over TCP and request a UDP transport address. In this case, the | |||
| server will relay data between the transports. | server will relay data between the transports. | |||
| If the requested transport is supported, the server allocates a port | If the requested transport is supported, the server allocates a port | |||
| using the requested transport protocol. If the REQUESTED-TRANSPORT | using the requested transport protocol. If the REQUESTED-TRANSPORT | |||
| attribute contains a value of the transport protocol unknown to the | attribute contains a value of the transport protocol unknown to the | |||
| server, or known to the server but not supported by the server in the | server, or known to the server but not supported by the server in the | |||
| context of this request, the server MUST reject the request and | context of this request, the server MUST reject the request and | |||
| include a 442 (Unsupported Transport Protocol) in the response. If | include a 442 (Unsupported Transport Protocol) in the response. If | |||
| the request did not contain a REQUESTED-TRANSPORT attribute, the | the request did not contain a REQUESTED-TRANSPORT attribute, the | |||
| server MUST use the same transport protocol as the request arrived | server MUST use the same transport protocol as the request arrived | |||
| on. | on. | |||
| 6.2.1.2. REQUESTED-IP | 5.2.1.3. REQUESTED-IP | |||
| Next, the server checks for the REQUESTED-IP attribute. If present, | The server checks for the REQUESTED-IP attribute. If present, it | |||
| it indicates a specific IP address from which the client would like | indicates a specific IP address from which the client would like its | |||
| its transport address allocated. (The client could do this if it | transport address allocated. (The client could do this if it | |||
| requesting the second address in a specific port pair). If this IP | requesting the second address in a specific port pair). If this IP | |||
| address is not a valid one for allocations on the server, the server | address is not a valid one for allocations on the server, the server | |||
| MUST reject the request and include a 443 (Invalid IP Address) error | MUST reject the request and include a 443 (Invalid IP Address) error | |||
| code in the response, or else redirect the request to a server that | code in the response, or else redirect the request to a server that | |||
| is known to support this IP address. If the IP address is one that | is known to support this IP address. If the IP address is one that | |||
| is valid for allocations (presumably, the server is configured to | is valid for allocations (presumably, the server is configured to | |||
| know the set of IP addresses from which it performs allocations), the | know the set of IP addresses from which it performs allocations), the | |||
| server MUST provide an allocation from that IP address. If the | server MUST provide an allocation from that IP address. If the | |||
| attribute is not present, the selection of an IP address is at the | attribute is not present, the selection of an IP address is at the | |||
| discretion of the server. | discretion of the server. | |||
| 6.2.1.3. REQUESTED-PORT-PROPS | 5.2.1.4. REQUESTED-PORT-PROPS | |||
| Finally, the server checks for the REQUESTED-PORT-PROPS attribute. | The server checks for the REQUESTED-PORT-PROPS attribute. If | |||
| If present, it indicates specific port properties desired by the | present, it indicates specific port properties desired by the client. | |||
| client. This attribute is split into two portions: one portion for | This attribute is split into two portions: one portion for port | |||
| port behavior and the other for requested port alignment (whether the | behavior and the other for requested port alignment (whether the | |||
| allocated port is odd, even, reserved as a pair, or at the discretion | allocated port is odd, even, reserved as a pair, or at the discretion | |||
| of the server). | of the server). | |||
| If the port behavior requested is for a Specific Port, the server | If the port behavior requested is for a Specific Port, the server | |||
| MUST attempt to allocate that specific port for the client. If the | MUST attempt to allocate that specific port for the client. If the | |||
| specific port is not available (in use or reserved), the server MUST | specific port is not available (in use or reserved), the server MUST | |||
| reject the request with a 444 (Invalid Port) response. For example, | reject the request with a 444 (Invalid Port) response. For example, | |||
| the STUN server could reject a request for a Specific Port because | the STUN server could reject a request for a Specific Port because | |||
| the port is temporarily reserved as part of an adjacent pair of | the port is temporarily reserved as part of an adjacent pair of | |||
| ports, or because the requested port is a well-known port (1-1023). | ports, or because the requested port is a well-known port (1-1023). | |||
| skipping to change at page 16, line 51 ¶ | skipping to change at page 18, line 41 ¶ | |||
| of the next higher port" alignment is similar to requesting an even | of the next higher port" alignment is similar to requesting an even | |||
| port. It is a request for an even port, and MUST be rejected by the | port. It is a request for an even port, and MUST be rejected by the | |||
| server if an even port cannot be provided, or redirected to an | server if an even port cannot be provided, or redirected to an | |||
| alternate server. However, it is also a hint from the client that | alternate server. However, it is also a hint from the client that | |||
| the client will request the next higher port with a separate Allocate | the client will request the next higher port with a separate Allocate | |||
| request. As such, it is a request for the server to allocate an even | request. As such, it is a request for the server to allocate an even | |||
| port whose next higher port is also available, and furthermore, a | port whose next higher port is also available, and furthermore, a | |||
| request for the server to not allocate that one higher port to any | request for the server to not allocate that one higher port to any | |||
| other request except for one that asks for that port explicitly. The | other request except for one that asks for that port explicitly. The | |||
| server can honor this request for adjacency at its discretion. The | server can honor this request for adjacency at its discretion. The | |||
| only constraint is that the allocated port has to be even. | only constraint is that the allocated port number MUST be even. | |||
| Port alignment requests exist for compatibility with | Port alignment requests exist for compatibility with | |||
| implementations of RTP which predate RFC 3550. These | implementations of RTP which predate [RFC3550]. These | |||
| implementations use the port numbering conventions in (now | implementations use the port numbering conventions in (now | |||
| obsolete) RFC 1889. | obsolete) [RFC1889]. | |||
| 6.2.1.4. Creating the Allocation | 5.2.1.5. Lifetime | |||
| The server checks for a LIFETIME attribute. If present, it indicates | ||||
| the lifetime the client would like the server to assign to the | ||||
| allocation. | ||||
| If the LIFETIME attribute is malformed, or if the requested lifetime | ||||
| value is less than 32 seconds, the server replies with an error | ||||
| response with an error code of XXX Lifetime Malformed or Invalid. | ||||
| 5.2.1.6. Creating the Allocation | ||||
| If any of the requested or desired constraints cannot be met, whether | If any of the requested or desired constraints cannot be met, whether | |||
| it be bandwidth, transport protocol, IP address or port, instead of | it be bandwidth, transport protocol, IP address or port, the server | |||
| rejecting the request, the server can alternately redirect the client | can redirect the client to a different server that may be able to | |||
| to a different server that may be able to fulfill the request. This | fulfill the request. This is accomplished using the 300 error | |||
| is accomplished using the 300 error response and ALTERNATE-SERVER | response and ALTERNATE-SERVER attribute. If the server does not | |||
| attribute. If the server does not redirect and cannot service the | redirect and cannot service the request because the server has | |||
| request because the server has reached capacity, it sends a 507 | reached capacity, it sends a 507 (Insufficient Capacity) response. | |||
| (Insufficient Capacity) response. The server can also reject the | The server can also reject the request with a 486 (Allocation Quota | |||
| request with a 486 (Allocation Quota Reached) if the user or client | Reached) if the user or client is not authorized to request | |||
| is not authorized to request additional allocations. | additional allocations. | |||
| The server SHOULD only allocate ports in the range 1024-65535. This | The server SHOULD only allocate ports from the range 49152 - 65535 | |||
| is one of several ways to prohibit relayed transport addresses from | (the Dynamic and/or Private Port range [Port-Numbers]), unless the | |||
| being used to attempt to run standard services. | TURN server application knows, through some means not specified here, | |||
| that other applications running on the same host as the TURN server | ||||
| application will not be impacted by allocating ports outside this | ||||
| range. This condition can often be satisfied by running the TURN | ||||
| server application on a dedicated machine and/or by arranging that | ||||
| any other applications on the machine allocate ports before the TURN | ||||
| server application starts. In any case, the TURN server SHOULD NOT | ||||
| allocate ports in the range 0 - 1023 (the Well-Known Port range) to | ||||
| discourage clients from using TURN to run standard services. | ||||
| Once a port is allocated, the server associates the allocation with | Once a port is allocated, the server associates the allocation with | |||
| the 5-tuple used to communicate between the client and the server. | the 5-tuple used to communicate between the client and the server. | |||
| For TCP, this amounts to associating the TCP connection from the TURN | For TCP, this amounts to associating the TCP connection from the TURN | |||
| client with the allocated transport address. | client with the allocated transport address. | |||
| The new allocation MUST also be associated with the username, | The new allocation MUST also be associated with the username, | |||
| password and realm used to authenticate the request. These | password and realm used to authenticate the request. These | |||
| credentials are used in all subsequent requests to ensure that only | credentials are used in all subsequent requests to ensure that only | |||
| the same client can use or modify the allocation it was given. | the same client can use or modify the allocation it was given. | |||
| In addition, the allocation created by the server is associated with | In addition, the allocation created by the server is associated with | |||
| a set of permissions. Each permission is a specific IP address | a set of permissions and a set of channel bindings. Each set is | |||
| identifying an external client. Initially, this list is null. | initially empty. | |||
| If the LIFETIME attribute was present in the request, and the value | If the LIFETIME attribute was present in the request, and the value | |||
| is larger than the maximum duration the server is willing to use for | is larger than the maximum duration the server is willing to use for | |||
| the lifetime of the allocation, the server MAY lower it to that | the lifetime of the allocation, the server MAY lower it to that | |||
| maximum. However, the server MUST NOT increase the duration | maximum. However, the server MUST NOT increase the duration | |||
| requested in the LIFETIME attribute. If there was no LIFETIME | requested in the LIFETIME attribute. If there was no LIFETIME | |||
| attribute, the server may choose a duration at its discretion. Ten | attribute, the server may choose a duration at its discretion. Ten | |||
| minutes is RECOMMENDED. In either case, the resulting duration is | minutes is RECOMMENDED. In either case, the resulting duration is | |||
| added to the current time, and a timer, called the allocation | added to the current time, and a timer, called the allocation | |||
| expiration timer, is set to fire at or after that time. | expiration timer, is set to expire at or after that time. Note that | |||
| Section 7.2.3 discusses behavior when the timer fires. Note that the | the LIFETIME attribute in an Allocate request can be zero, though | |||
| LIFETIME attribute an Allocate request can be zero, though this is | this is effectively a no-op, since it will create and destroy the | |||
| effectively a no-op, since it will create and destroy the allocation | allocation in one transaction. | |||
| in one transaction. | ||||
| 6.2.1.5. Sending the Allocate Response | 5.2.1.7. Sending the Allocate Response | |||
| Once the port has been obtained and the allocation expiration timer | Once the port has been obtained and the allocation expiration timer | |||
| has been started, the server generates an Allocate Response using the | has been started, the server generates an Allocate Response using the | |||
| general procedures defined in [I-D.ietf-behave-rfc3489bis], including | general procedures defined in [I-D.ietf-behave-rfc3489bis], including | |||
| the ones for long term authentication. The transport address | the ones for long term authentication. The transport address | |||
| allocated to the client MUST be included in the RELAY-ADDRESS | allocated to the client MUST be included in the RELAY-ADDRESS | |||
| attribute in the response. In addition, this response MUST contain | attribute in the response. In addition, this response MUST contain | |||
| the XOR-MAPPED-ADDRESS attribute. This allows the client to | the XOR-MAPPED-ADDRESS attribute. This allows the client to | |||
| determine its reflexive transport address in addition to a relayed | determine its reflexive transport address in addition to a relayed | |||
| transport address, from the same Allocate request. | transport address, from the same Allocate request. | |||
| The server MUST add a LIFETIME attribute to the Allocate Response. | The server MUST add a LIFETIME attribute to the Allocate Response. | |||
| This attribute contains the duration, in seconds, of the allocation | This attribute contains the duration, in seconds, of the allocation | |||
| expiration timer associated with this allocation. | expiration timer associated with this allocation. | |||
| The server MUST add a BANDWIDTH attribute to the Allocate Response. | The server MUST add a BANDWIDTH attribute to the Allocate Response. | |||
| This MUST be equal to the attribute from the request, if one was | This MUST be equal to the attribute from the request, if one was | |||
| present. Otherwise, it indicates a per-allocation limit that the | present. Otherwise, it indicates a per-allocation limit that the | |||
| server is placing on the bandwidth usage on each binding. Such | server is placing on the bandwidth usage on each binding. Such | |||
| limits are needed to prevent against denial-of-service attacks (See | limits are needed to prevent against denial-of-service attacks (see | |||
| Section 11). | Section 12). | |||
| 6.2.2. Refresh Requests | 5.2.2. Refresh Requests | |||
| A Refresh request is processed using the general server and long term | A Refresh request is processed using the general server and long term | |||
| authentication procedures in [I-D.ietf-behave-rfc3489bis]. It is | authentication procedures in [I-D.ietf-behave-rfc3489bis]. It is | |||
| used to refresh and extend an allocation, or to cause an immediate | used to refresh and extend an allocation, or to cause an immediate | |||
| deallocation. It is processed as follows. | deallocation. It is processed as follows. | |||
| First, the request MUST be authenticated using the same shared secret | First, the request MUST be authenticated using the same shared secret | |||
| as the one associated with the allocation. If the request was | as the one associated with the allocation. If the request was | |||
| authenticated but not with such a matching credential, the server | authenticated but not with such a matching credential, the server | |||
| MUST generate a Refresh Error Response with a 401 response. | MUST generate a Refresh Error Response with a 401 response. | |||
| If the Refresh request contains a BANDWIDTH attribute, the server | If the Refresh request contains a BANDWIDTH attribute, the server | |||
| checks that it can relay the requested volume of traffic. | checks that it can relay the requested volume of traffic. | |||
| Finally, a Refresh Request will set a new allocation expiration timer | Finally, a Refresh Request will set a new allocation expiration timer | |||
| for the allocation, effectively canceling the previous allocation | for the allocation, effectively canceling the previous allocation | |||
| expiration timer. As with an Allocate request, the server can offer | expiration timer. As with an Allocate request, the server MAY | |||
| a shorter allocation lifetime, but never a longer one. | utilize a shorter allocation lifetime, but MUST NOT utilize a longer | |||
| lifetime. | ||||
| A success Refresh response MUST contain a LIFETIME attribute and a | A success Refresh response MUST contain a LIFETIME attribute. If its | |||
| BANDWIDTH attribute. | associated Allocate request contained the BANDWIDTH attribute, or | |||
| this Refresh request contained a new BANDWIDTH attribute, the | ||||
| response MUST also contain the BANDWIDTH attribute. | ||||
| 7. Sending and Receiving Data | 6. Send and Data Indications | |||
| As described in Section 4, TURN allows a client to send and receive | TURN supports two ways to send and receive data from peers. This | |||
| data without utilizing TURN Send and Data indications, by sending and | section describes the use of Send and Data indications, while | |||
| receiving them on channels. Before sending client-to-peer or peer- | Section 7 describes the use of the Channel Mechanism. | |||
| to-client data for a new peer, a TURN client or server needs to | ||||
| assign a channel number that corresponds to that remote peer. Once a | ||||
| channel number is assigned, it remains assigned through the duration | ||||
| of the allocation. It cannot be unassigned or reassigned to a | ||||
| different peer. | ||||
| 7.1. Client Behavior | 6.1. Forming and Sending an Indication | |||
| 7.1.1. Sending | When the client has data to send to a peer, it uses a Send Indication | |||
| to pass the data to the server. When the server has data to send to | ||||
| the client, it uses a Data Indication to pass the data to the client. | ||||
| A client can also use a Send Indication without a DATA attribute to | ||||
| install or refresh a permission for the specified IP address. Both | ||||
| indications are formed following the general rules described in [ref | ||||
| 3489bis] with the extra considerations described below. | ||||
| When the client wants to forward data to a peer, it checks if it has | A Send Indication MUST contain a PEER-ADDRESS attribute and MAY | |||
| assigned a channel number for communications with this peer (as | contain a DATA attribute, while a Data Indication MUST contain both | |||
| identified by its IP address and port) over this allocation: | attributes. The PEER-ADDRESS attribute contains the transport | |||
| address of the peer to which the data is to be sent (in the case of a | ||||
| Send Indication) or from which the data was received (in the case of | ||||
| a Data Indication). This peer address is the transport address of | ||||
| the peer as seen by the server, which may not be the same as the host | ||||
| transport address of the peer. The DATA attribute contains the | ||||
| actual application data. Note that the application data may need to | ||||
| be padded to ensure the DATA attribute length is a multiple of 4. | ||||
| o If one has not been assigned, the client assigns one of its own | No other attributes are included. For example, neither the | |||
| choosing. This channel number MUST be one that is currently | FINGERPRINT attribute nor any authentication attributes are included. | |||
| unassigned by the client for this allocation. It MUST be between | The latter holds even if the server is using the Long-Term Credential | |||
| 1 and 65534. It is RECOMMENDED that the client choose one of the | Mechanism, since indications cannot be authenticated using this | |||
| unassigned numbers randomly, rather than sequentially. The state | mechanism. | |||
| of the channel is set to unconfirmed. | ||||
| o If one has been assigned, that channel MUST be selected. | Both the Send and Data indications MUST be sent using the 5-tuple of | |||
| the original allocation. Thus, in the case of the Send Indication, | ||||
| the source transport address is the client's host transport address, | ||||
| the destination transport address is the TURN server address, and the | ||||
| transport protocol is the same as was used for the Allocate request. | ||||
| For the Data Indication, the source and destination transport | ||||
| addresses are the reverse. | ||||
| Next, the client checks if the channel number has been confirmed by | 6.2. Receiving an Indication | |||
| the server. If the channel number has been confirmed, the client | ||||
| simply sends the data to the TURN server with the appropriate channel | ||||
| number in the TURN framing. | ||||
| If the channel number has not been confirmed, the client creates a | When a Send Indication is received at the server, or a Data | |||
| Send indication. It places the selected channel number in a CHANNEL- | Indication is received at the client, the receiver first does the | |||
| NUMBER attribute, the peer IP address and port in a PEER-ADDRESS | basic indication processing described in [3489bis]. Once this is | |||
| attribute, and puts the data to be sent in a DATA attribute. (If the | done, it does the processing specific to the Send and Data methods | |||
| client just wishes to create a permission, it can omit the DATA | described below. | |||
| attribute.) If the Send indication is sent over a reliable transport | ||||
| (ex: TCP), the client marks that the channel number as confirmed. | ||||
| When the client receives a ChannelConfirmation Indication, and the | ||||
| channel number, IP address and port match the channel number assigned | ||||
| to that peer, the client marks that the channel number is confirmed. | ||||
| Since Send is an Indication, it generates no response. The client | A Send Indication MUST contain a PEER-ADDRESS attribute and MAY | |||
| must rely on application layer mechanisms to determine if the data | contain a DATA attribute, while a Data Indication MUST contain both | |||
| was received by the peer. A ChannelConfirmation Indication just | attributes. Any other attributes appearing in the message are | |||
| means that some Send indication was received by the TURN server. It | treated as unexpected. | |||
| does not mean that a specific Send indication was received by the | ||||
| peer. | ||||
| Note that Send Indications are not authenticated and do not | TODO: Add check that Send or Data indication arrives with | |||
| contain a MESSAGE-INTEGRITY attribute. Just like non-relayed data | appropriate 5-tuple. Since this check applies to all STUN | |||
| sent over UDP or TCP, the authenticity and integrity of this data | messages, not just Send and Data indications, perhaps this goes | |||
| can only be assured using security mechanisms at higher layers. | under the general processing section. | |||
| 7.1.2. Receiving | 6.3. Relaying | |||
| When the client receives a Data indication, it: | When the server receives a valid Send Indication contains a DATA | |||
| attribute, it forms a UDP datagram as follows: | ||||
| o records the channel number used by the server (from the CHANNEL- | o the source transport address is the relayed transport address of | |||
| NUMBER attribute) and associates it with the IP address and port | the allocation, where the allocation is determined by the 5-tuple | |||
| in the PEER-ADDRESS attribute, which identify the peer that sent | on which the Send Indication arrived; | |||
| the data. The resulting mapping from channel number to transport | ||||
| address MUST be stored by the client for the duration of the | ||||
| allocation. | ||||
| o delivers the contents of the DATA attribute to the client | o the destination transport address is taken from the PEER-ADDRESS | |||
| application as if it was received from the peer's IP address and | attribute; | |||
| port. | ||||
| o If the Data indication was received over UDP, the client MUST | o the data following the UDP header is the contents of the value | |||
| confirm the channel used by the server, by sending a | field of the DATA attribute; | |||
| ChannelConfirmation Indication to the server. This indication | ||||
| MUST contain the same PEER-ADDRESS and CHANNEL-NUMBER attributes | ||||
| included in the Data indication. This indication is sent to the | ||||
| server on channel 0 using the 5-tuple associated with this | ||||
| allocation. Note that, due to round trip delays, a client may | ||||
| receive several Data indications with the same channel number for | ||||
| the same remote peer. It MUST process each as defined here, | ||||
| resulting in several ChannelConfirmation indications. | ||||
| When the client receives unencapsulated data, it checks the received | o the Length field in the UDP header is set to the Length field of | |||
| channel number. If the client has a mapping associated with the | the DATA attribute; | |||
| server channel number it delivers the data to the client application | ||||
| as if it was received directly from that peer. Otherwise, it | ||||
| silently discards the data. | ||||
| 7.2. Server Behavior | o the Checksum field in the UDP header is computed as described in | |||
| [RFC 768]. | ||||
| 7.2.1. Receiving Data from the Client | The resulting UDP datagram is then sent to the peer. | |||
| When the server receives a Data indication from the client, it: | When the server receives a valid Send Indication (with or without a | |||
| DATA attribute), it also updates the permission associated with the | ||||
| IP address contained in the PEER-ADDRESS attribute. For a certain | ||||
| interval after the permission is updated, UDP datagrams received from | ||||
| peers with source IP address equal to the IP address contained in the | ||||
| PEER-ADDRESS attribute can be forwarded to the client. Note that | ||||
| only the IP addresses are considered and the port numbers are | ||||
| irrelevent. This permission is specific to the allocation and has no | ||||
| affect on any other allocation. The recommended length of time is 60 | ||||
| seconds from when the Send Indication is received. | ||||
| o records the channel number used by the client (from the CHANNEL- | When the server receives a UDP datagram with a destination transport | |||
| NUMBER attribute) and associates it with the IP address and port | address corresponding to an active (i.e., still alive) allocation, | |||
| in the PEER-ADDRESS attribute, which identify the peer to which | then it first checks to see if it is permitted to relay the datagram. | |||
| the data is to be sent. The resulting mapping from channel number | If it is not permitted, the UDP datagram MUST be discarded. | |||
| to peer transport address MUST be stored by the server for the | ||||
| duration of the allocation. | ||||
| o sends the contents of the DATA attribute in a UDP datagram, | If relaying is permitted, the server forms and send a Data Indication | |||
| sending it to the PEER-ADDRESS and sending from the allocated | as described in Section 6.1, using the data following the UDP header | |||
| transport address. | as the application data. | |||
| o if one doesn't exist, creates a permission for the IP address from | 7. Channel Mechanism | |||
| the PEER-ADDRESS (the port is ignored), and attaches the | ||||
| permission to the allocation | ||||
| o checks if a timer has been set for this permission. If none has | As described in the overview, channel mechanism provides a way for a | |||
| been started, the server starts one. It is RECOMMENDED that it | client and server to send application data using ChannelData | |||
| have a value of sixty seconds. If the timer is already running, | messages, which have less overhead than Send and Data indications. | |||
| it MUST be reset. | ||||
| o If the Send indication was received over UDP, the server MUST | Channel bindings are always initiated by the client. The client can | |||
| confirm the channel used by the client, by sending a | bind a channel to a peer at any time during the lifetime of the | |||
| ChannelConfirmation Indication to the client. This indication | allocation. The client may bind a channel to a peer before | |||
| MUST contain the same PEER-ADDRESS and CHANNEL-NUMBER attributes | exchanging data with it, or after exchanging data with it (using Send | |||
| included in the Send indication. This indication is sent to the | and Data indications) for some time, or may choose never to bind a | |||
| client on channel 0 using the 5-tuple associated with this | channel it. The client can also bind channels to some peers while | |||
| allocation. Note that, due to round trip delays, a server may | not binding channels to other peers. | |||
| receive several Send indications with the same channel number for | ||||
| the same remote peer. It MUST process each as defined here, | ||||
| resulting in several ChannelConfirmation indications. | ||||
| When the server receives unencapsulated data, it checks the received | Once a channel is bound to a peer, the channel binding cannot be | |||
| channel number: | changed. There is no way to unbind a channel or bind it to a | |||
| different peer. | ||||
| o If the server has a mapping associated with the client channel | Channel bindings are specific to an allocation, so that a binding in | |||
| number it: | one allocation has no relationship to a binding in any other | |||
| allocation. If an allocation expires, all its channel bindings | ||||
| expire with it. | ||||
| * sends a UDP datagram to the peer using the transport address | 7.1. Forming and Sending a ChannelBind Request | |||
| from the mapping, and sends from the allocated transport | ||||
| address. | ||||
| * checks if a permission activity timer is running for the | When a client wishes to bind a channel to a peer in an allocation, it | |||
| destination IP address of the peer. If one is not running, the | forms a ChannelBind Request. The Request formed following the | |||
| server starts one. It is RECOMMENDED that it have a value of | general rules described in [I-D.ietf-behave-rfc3489bis] with the | |||
| sixty seconds. If the timer is already running, it MUST be | extra considerations described below. | |||
| reset. | ||||
| o If the server has no mapping, it silently discards the data. | A ChannelBind Request MUST contain both a CHANNEL-NUMBER attribute | |||
| and a PEER-ADDRESS attribute. The CHANNEL-NUMBER attribute specifies | ||||
| the number of the channel that the client wishes to bind to the peer. | ||||
| The channel number MUST be in the range 0x4000 to 0xFFFE (inclusive) | ||||
| and the channel MUST NOT be already bound to a different peer. It is | ||||
| acceptable to rebind a channel to the peer it is already bound to. | ||||
| The PEER-ADDRESS attribute specifies the peer address to bind the | ||||
| channel to. | ||||
| 7.2.2. Receiving Data from Peers | Once formed, the ChannelBind Request is sent using the 5-tuple for | |||
| the allocation. | ||||
| If a server receives a UDP packet on an allocated UDP transport | The client SHOULD be prepared to receive ChannelData messages on the | |||
| address, it checks the permissions associated with that allocation. | channel as soon as it has sent the ChannelBind Request. Over UDP, it | |||
| If the source IP address of the UDP packet matches one of the | is possible for the client to receive these before it receives a | |||
| permissions (the source port is not used), the UDP packet is | ChannelBind Success Response. | |||
| accepted. Otherwise, it is discarded. If the packet is accepted, it | ||||
| is forwarded to the client as described below. | ||||
| The server checks if it has assigned a channel number for | Over UDP, the client SHOULD NOT send ChannelData messages on the | |||
| communications from this peer (as identified by its IP address and | channel until it has received a ChannelBind Success Response for the | |||
| port) over this allocation: | binding attempt. Sending them before the success response is | |||
| received risks having them dropped by the server if he ChannelBind | ||||
| Request was lost. | ||||
| o If one has not been assigned, the client assigns one of its own | 7.2. Receiving a ChannelBind Request and Sending a Response | |||
| choosing. This channel number MUST be one that is currently | ||||
| unassigned by the server for this allocation. It MUST be between | ||||
| 1 and 65534. It is RECOMMENDED that the server choose one of the | ||||
| unassigned numbers randomly, rather than sequentially. The state | ||||
| of the channel is set to unconfirmed. | ||||
| o If one has been assigned, that channel MUST be selected. | When the server receives a ChannelBind Request, it first does the | |||
| basic request processing described in [I-D.ietf-behave-rfc3489bis]. | ||||
| Once this is done, it does the processing specific to the ChannelBind | ||||
| method described below. | ||||
| Note that data from peers does not reset the permission activity | The server checks that the ChannelBind Request contains both a | |||
| timer. | CHANNEL-NUMBER attribute and a PEER-ADDRESS attribute. If the PEER- | |||
| ADDRESS attribute is missing or malformed, then the server rejects | ||||
| the request with an Error Response containing the error code XXX | ||||
| "Peer address missing or invalid". If the CHANNEL-NUMBER attribute | ||||
| is missing or malformed, or the channel number is not in the range | ||||
| 0x4000 to 0xFFFE (inclusive), or the channel is already bound to | ||||
| another peer (already bound to the same peer is OK) the server | ||||
| rejects the request with an Error Response containing the error code | ||||
| XXX "Channel number missing or invalid". Otherwise, if no errors are | ||||
| detected, the server replies with a ChannelBind Success Response. | ||||
| Next, the server checks if the channel number has been confirmed by | 7.3. Receiving a ChannelBind Response | |||
| the client. If the channel number has been confirmed, the server | ||||
| simply sends the data to the client with the appropriate channel | ||||
| number in the TURN framing. | ||||
| If the channel number has not been confirmed, the server creates a | When the client receives a ChannelBind response (either success or | |||
| Data indication. It places the selected channel number in a CHANNEL- | error), it processes it as specified in [3489bis]. Any additional | |||
| NUMBER attribute, the peer IP address and port in a PEER-ADDRESS | processing is implementation specific. | |||
| attribute, and puts the data to be sent in a DATA attribute. If the | ||||
| Data indication is sent over a reliable transport (ex: TCP), the | ||||
| server marks that the channel number as confirmed. When the server | ||||
| receives a ChannelConfirmation Indication, and the channel number, IP | ||||
| address and port match the channel number assigned to that peer, the | ||||
| server marks that the channel number is confirmed. | ||||
| Since Data is an Indication, it generates no response. The server | 7.4. The ChannelData Message | |||
| does not provide reliability for the data. When sending over a | ||||
| reliable transport to the client, if the server is unable to send the | ||||
| data received from the peer (for example, because the TCP connection | ||||
| cannot accept any more messages right now), it can silently discards | ||||
| UDP data received from the peer. | ||||
| Note that Send Indications are not authenticated and do not | The ChannelData message is used to carry application data between the | |||
| contain a MESSAGE-INTEGRITY attribute. Just like non-relayed data | client and the server. It has the following format: | |||
| sent over UDP or TCP, the authenticity and integrity of this data | ||||
| can only be assured using security mechanisms at higher layers. | ||||
| 7.2.3. Allocation Activity Timer and Permission Timeout | 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 | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | Channel Number | Length | | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | | | ||||
| / Application Data / | ||||
| / / | ||||
| | | | ||||
| | +-------------------------------+ | ||||
| | | | ||||
| +-------------------------------+ | ||||
| When the allocation activity timer expires, the server MUST destroy | The Channel Number field specifies the number of the channel on which | |||
| the allocation. This involves freeing the allocated transport | the data is traveling, and thus the address of the peer that is | |||
| address, deleting permissions and channel numbers, and removing other | sending or is to receive the data. The channel number MUST be in the | |||
| state associated with the allocation. | range 0x4000 - 0xFFFF, with channel number 0xFFFF being reserved for | |||
| possible future extensions. | ||||
| When a permission times out, the TURN server MUST NOT forward a | Channel numbers 0x0000 - 0x3FFF cannot be used because bits 0 and 1 | |||
| packet from that TURN peer to the TURN client. | are used to distinguish ChannelData messages from STUN-formatted | |||
| messages (i.e., Allocate, Send, Data, ChannelBind, etc). STUN- | ||||
| formatted messages always have bits 0 and 1 as "00", while | ||||
| ChannelData messages use combinations "01", "10", and "11". | ||||
| 8. New Attributes | The Length field specifies the length in bytes of the application | |||
| data field (i.e., it does not include the size of the ChannelData | ||||
| header). Note that 0 is a valid length. | ||||
| 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. | ||||
| 7.5. Forming and Sending a ChannelData Message | ||||
| 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 | ||||
| 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 | ||||
| when sending data to the peer. The server, on the other hand, SHOULD | ||||
| use the ChannelData message if a channel has been bound to the peer. | ||||
| The fields of the ChannelData message are filled in as described in | ||||
| Section 7.4. | ||||
| Over stream transports, the ChannelData message MUST be padded to a | ||||
| multiple of four bytes in order to ensure the alignment of subsequent | ||||
| messages. The padding is not reflected in the length field of the | ||||
| ChannelData message, so the actual size of a ChannelData message | ||||
| (including padding) is (4 + Length) rounded up to the nearest | ||||
| multiple of 4. Over UDP, the padding is not required but MAY be | ||||
| included. | ||||
| The ChannelData message is then sent on the 5-tuple associated with | ||||
| the allocation. | ||||
| 7.6. Receiving a ChannelData Message | ||||
| The receiver of the ChannelData message uses bits 0 and 1 to | ||||
| distinguish it from STUN-formatted messages, as described in | ||||
| Section 7.4. | ||||
| 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 | ||||
| ChannelData message (i.e., the UDP header length field value is less | ||||
| than the ChannelData header length field value + 4 + 8), then the | ||||
| message is silently discarded. | ||||
| 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 | ||||
| Section 7.5. | ||||
| If the ChannelData message is received on a channel which is not | ||||
| bound to any peer, then the message is silently discarded. | ||||
| 7.7. Relaying | ||||
| When the server receives a valid ChannelData message, it forms a UDP | ||||
| datagram as follows: the source transport address is the relayed | ||||
| transport address of the allocation, where the allocation is | ||||
| determined by the 5-tuple on which the ChannelData message arrived; | ||||
| the destination transport address is the peer address to which the | ||||
| channel is bound; the data following the UDP header is the contents | ||||
| of the data field of the ChannelData message; the Length field in the | ||||
| UDP header is set to the Length field of the ChannelData message + 8; | ||||
| and the Checksum field in the UDP header is computed as described in | ||||
| [RFC 768]. The resulting UDP datagram is then sent to the peer. | ||||
| The server also updates the permission associated with the IP address | ||||
| part of the peer address to which the UDP datagram is sent. | ||||
| When the server receives a UDP datagram with a destination transport | ||||
| address corresponding to an active (i.e., still alive) allocation, | ||||
| then it first checks to see if it is permitted to relay the datagram. | ||||
| If the allocation contains an active permission for the source IP | ||||
| address (from the IP header) of the received UDP datagram, then the | ||||
| UDP datagram is permitted. Otherwise, the UDP datagram MUST be | ||||
| discarded. | ||||
| To relay the UDP datagram, the server forms and send a ChannelData | ||||
| message as described in Section 7.5 | ||||
| 8. New STUN Methods | ||||
| This section lists the codepoints for the new STUN methods defined in | ||||
| this specification. See elsewhere in this document for the semantics | ||||
| of these new methods. | ||||
| Request/Response Transactions | ||||
| 0x003 : Allocate | ||||
| 0x004 : Refresh | ||||
| Indications | ||||
| 0x006 : Send | ||||
| 0x007 : Data | ||||
| 9. New STUN Attributes | ||||
| This STUN extension defines the following new attributes: | This STUN extension defines the following new attributes: | |||
| 0x000C: CHANNEL-NUMBER | 0x000C: CHANNEL-NUMBER | |||
| 0x000D: LIFETIME | 0x000D: LIFETIME | |||
| 0x0010: BANDWIDTH | 0x0010: BANDWIDTH | |||
| 0x0012: PEER-ADDRESS | 0x0012: PEER-ADDRESS | |||
| 0x0013: DATA | 0x0013: DATA | |||
| 0x0016: RELAY-ADDRESS | 0x0016: RELAY-ADDRESS | |||
| 0x0018: REQUESTED-PORT-PROPS | 0x0018: REQUESTED-PORT-PROPS | |||
| 0x0019: REQUESTED-TRANSPORT | 0x0019: REQUESTED-TRANSPORT | |||
| 0x0022: REQUESTED-IP | 0x0022: REQUESTED-IP | |||
| 8.1. CHANNEL-NUMBER | 9.1. CHANNEL-NUMBER | |||
| The channel number attribute represents the channel number assigned | The CHANNEL-NUMBER attribute contains the number of the channel. It | |||
| by the sender, that corresponds with the peer specified in the PEER- | is a 16-bit unsigned integer, followed by a two-octet RFFU field | |||
| ADDRESS attribute. It is a 16-bit unsigned integer, plus two octets | which MUST be set to 0 on transmission and ignored on reception. | |||
| of padding which MUST be set to zero. | ||||
| 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 | Reserved = 0 | | | Channel Number | RFFU | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| 8.2. LIFETIME | 9.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. It is a 32 | will maintain an allocation in the absence of a refresh. It is a 32 | |||
| bit unsigned integral value representing the number of seconds | bit unsigned integral value representing the number of seconds | |||
| remaining until expiration. | remaining until expiration. | |||
| 8.3. BANDWIDTH | 9.3. BANDWIDTH | |||
| The bandwidth attribute represents the peak bandwidth, measured in | The bandwidth attribute represents the peak bandwidth, measured in | |||
| kilobits per second, that the client expects to use on the allocation | kilobits per second, that the client expects to use on the allocation | |||
| in each direction. | in each direction. | |||
| 8.4. PEER-ADDRESS | 9.4. PEER-ADDRESS | |||
| The PEER-ADDRESS specifies the address and port of the peer as seen | The PEER-ADDRESS specifies the address and port of the peer as seen | |||
| from the TURN server. It is encoded in the same way as XOR-MAPPED- | from the TURN server. It is encoded in the same way as XOR-MAPPED- | |||
| ADDRESS. | ADDRESS. | |||
| 8.5. DATA | 9.5. DATA | |||
| The DATA attribute is present in most Send Indications and Data | The DATA attribute is present in most Send Indications and Data | |||
| Indications. It contains raw payload data that is to be sent (in the | Indications. It contains raw payload data that is to be sent (in the | |||
| case of a Send Request) or was received (in the case of a Data | case of a Send Request) or was received (in the case of a Data | |||
| Indication). | Indication). | |||
| 8.6. RELAY-ADDRESS | 9.6. RELAY-ADDRESS | |||
| The RELAY-ADDRESS is present in Allocate responses. It specifies the | The RELAY-ADDRESS is present in Allocate responses. It specifies the | |||
| address and port that the server allocated to the client. It is | address and port that the server allocated to the client. It is | |||
| encoded in the same way as XOR-MAPPED-ADDRESS. | encoded in the same way as XOR-MAPPED-ADDRESS. | |||
| 8.7. REQUESTED-PORT-PROPS | 9.7. REQUESTED-PORT-PROPS | |||
| This attribute allows the client to request certain properties for | This attribute allows the client to request certain properties for | |||
| the port that is allocated by the server. The attribute can be used | the port that is allocated by the server. The attribute can be used | |||
| with any transport protocol that has the notion of a 16 bit port | with any transport protocol that has the notion of a 16 bit port | |||
| space (including TCP and UDP). The attribute is 32 bits long. Its | space (including TCP and UDP). The attribute is 32 bits long. Its | |||
| format is: | format is: | |||
| 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 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Reserved = 0 | A | Specific Port Number | | | Reserved = 0 | A | Specific Port Number | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| The two bits labeled A in the diagram above are for requested port | The two bits labeled A in the diagram above are for requested port | |||
| alignment and have the following meaning: | alignment and have the following meaning: | |||
| 00 no specific port alignment | 00 no specific port alignment | |||
| 01 odd port number | 01 odd port number | |||
| 10 even port number | 10 even port number | |||
| 11 even port number; reserve next higher port | 11 even port number; reserve next higher port | |||
| If the value of the A field is 00 (no specific port alignment), then | If the value of the A field is 00 (no specific port alignment), then | |||
| the Specific Port Number field can either be 0 or some non-zero port | the Specific Port Number field can either be 0 or some non-zero port | |||
| number. If the Specific Port Number field is 0, then the client is | number. If the Specific Port Number field is 0, then the client is | |||
| not putting any restrictions on the port number it would like | not putting any restrictions on the port number it would like | |||
| allocated. If the Specific Port Number is some non-zero port number, | allocated. If the Specific Port Number is some non-zero port number, | |||
| then the client is requesting that the server allocate the specified | then the client is requesting that the server allocate the specified | |||
| port. | port and the server MUST provide that port. | |||
| If the value of the A field is 01 (odd port number), then the | If the value of the A field is 01 (odd port number), then the | |||
| Specific Port Number field must be zero, and the client is requesting | Specific Port Number field MUST be zero, and the client is requesting | |||
| the server allocate an odd-numbered port. | the server allocate an odd-numbered port. The server MUST provide an | |||
| odd port number. | ||||
| If the value of the A field is 10 (even port number), then the | If the value of the A field is 10 (even port number), then the | |||
| Specific Port number field must be zero, and the client is requesting | Specific Port number field MUST be zero, and the client is requesting | |||
| the server allocate an even-numbered port. | the server allocate an even-numbered port. The server MUST provide | |||
| an even port number. | ||||
| If the value of the A field is 11 (even port number; reserve next | If the value of the A field is 11 (even port number; reserve next | |||
| higher port), then the Specific Port Number field must be zero, and | higher port), then the Specific Port Number field MUST be zero, and | |||
| the client is requesting the server allocate an even-numbered port. | the client is requesting the server allocate an even-numbered port. | |||
| In addition, the client is requesting the server reserve the next | The server MUST return an even port number. In addition, the client | |||
| higher port (i.e., N+1 if the server allocates port N), and should | is requesting the server reserve the next higher port (i.e., N+1 if | |||
| only allocate the N+1 port number if it is explicit requested (with a | the server allocates port N). The server SHOULD only allocate the | |||
| subsequent request specifying that exact port number) | N+1 port number if it is explicitly requested (with a subsequent | |||
| request specifying that exact port number by the same TURN client, | ||||
| over a different alllocation). | ||||
| In all cases, if a port with the requested properties cannot be | In all cases, if a port with the requested properties cannot be | |||
| allocated, the server responds with a error response with an error | allocated, the server MUST respond with a error response with an | |||
| code of 444 (Invalid Port). | error code of 444 (Invalid Port). | |||
| 8.8. REQUESTED-TRANSPORT | 9.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. It is a 32 bit | protocol for the allocated transport address. It has the following | |||
| unsigned integer. Its values are: | format: | |||
| 0 1 2 3 | ||||
| 0x0000 0000: UDP | 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 | |||
| 0x0000 0001: Reserved for TCP | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Protocol | RFFU | | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| If an Allocate request is sent over TCP and requests a UDP | The Protocol field specifies the desired protocol. The codepoints | |||
| allocation, or an Allocate request is sent over TLS over TCP and | used in this field are taken from those allowed in the Protocol field | |||
| requests a UDP allocation, the server will relay data between the two | in the IPv4 header and the NextHeader field in the IPv6 header | |||
| transports. | [Protocol-Numbers]. This specification only allows the use of | |||
| codepoint 17 (User Datagram Protocol). | ||||
| Extensions to TURN can define additional transport protocols in an | The RFFU field is set to zero on transmission and ignored on | |||
| IETF-consensus RFC. | receiption. It is reserved for future uses. | |||
| 8.9. REQUESTED-IP | 9.9. REQUESTED-IP | |||
| The REQUESTED-IP attribute is used by the client to request that a | The REQUESTED-IP attribute is used by the client to request that a | |||
| specific IP address be allocated to it. This attribute is needed | specific IP address be allocated by the TURN server. This attribute | |||
| since it is anticipated that TURN servers will be multi-homed so as | is needed since it is anticipated that TURN servers will be multi- | |||
| to be able to allocate more than 64k transport addresses. As a | homed so as to be able to allocate more than 64k transport addresses. | |||
| consequence, a client needing a second transport address on the same | As a consequence, a client needing a second transport address on the | |||
| interface as a previous one can make that request. | same interface as a previous one can use this attribute to request a | |||
| remote address from the same TURN server interface as the TURN | ||||
| client's previous remote address. | ||||
| The format of this attribute is identical to XOR-MAPPED-ADDRESS. | The format of this attribute is identical to XOR-MAPPED-ADDRESS. | |||
| However, the port component of the attribute is ignored by the | However, the port component of the attribute MUST be ignored by the | |||
| server. If a client wishes to request a specific IP address and | server. If a client wishes to request a specific IP address and | |||
| port, it uses both the REQUESTED-IP and REQUESTED-PORT-PROPS | port, it uses both the REQUESTED-IP and REQUESTED-PORT-PROPS | |||
| attributes. | attributes. | |||
| 9. New Error Response Codes | 10. New STUN Error Response Codes | |||
| This document defines the following new Error response codes: | This document defines the following new error response codes: | |||
| 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 there is none, or a | requires an allocation to be in place, but there is none, or a | |||
| request was received which requires no allocation, but there is | request was received which requires no allocation, but there is | |||
| one. | one. | |||
| 442 (Unsupported Transport Protocol): The Allocate request asked for | 442 (Unsupported Transport Protocol): The Allocate request asked for | |||
| a transport protocol to be allocated that is not supported by the | a transport protocol to be allocated that is not supported by the | |||
| server. If the server is aware of another server that supports | server. If the server is aware of another server that supports | |||
| the requested protocol, it SHOULD include the other server's | the requested protocol, it SHOULD include the other server's | |||
| skipping to change at page 27, line 5 ¶ | skipping to change at page 31, line 26 ¶ | |||
| 443 (Invalid IP Address): The Allocate request asked for a transport | 443 (Invalid IP Address): The Allocate request asked for a transport | |||
| address to be allocated from a specific IP address that is not | address to be allocated from a specific IP address that is not | |||
| valid on the server. | valid on the server. | |||
| 444 (Invalid Port): The Allocate request asked for a port to be | 444 (Invalid Port): The Allocate request asked for a port to be | |||
| allocated that is not available on the server. | allocated that is not available on the server. | |||
| 486 (Allocation Quota Reached): The user or client is not authorized | 486 (Allocation Quota Reached): The user or client is not authorized | |||
| to request additional allocations. | to request additional allocations. | |||
| (tbd) (Channel Number Missing or Invalid): The request requires a | ||||
| channel number, but the CHANNEL-NUMBER attribute is missing, or | ||||
| the specified channel number is invalid in some way. | ||||
| (tbd) (Peer Address Missing or Invalid): The request requires a peer | ||||
| transport address, but the PEER-ADDRESS attribute is missing, or | ||||
| the specified peer transport address is invalid in some way. | ||||
| (tbd) (Lifetime Malformed or Invalid): The LIFETIME attribute is | ||||
| malformed or the specified lifetime is invalid in some way. | ||||
| 507 (Insufficient Capacity): The server cannot allocate a new port | 507 (Insufficient Capacity): The server cannot allocate a new port | |||
| for this client as it has exhausted its relay capacity. | for this client as it has exhausted its relay capacity. | |||
| 10. Client Discovery of TURN Servers | 11. Client Discovery of TURN Servers | |||
| The STUN extensions introduced by TURN differ from the binding | The STUN extensions introduced by TURN differ from the binding | |||
| requests defined in [I-D.ietf-behave-rfc3489bis] in that they are | requests defined in [I-D.ietf-behave-rfc3489bis] in that they are | |||
| sent with additional framing and demand substantial resources from | sent with additional framing and demand substantial resources from | |||
| the TURN server. In addition, it seems likely that administrators | the TURN server. In addition, it seems likely that administrators | |||
| might want to block connections from clients to the TURN server for | might want to block connections from clients to the TURN server for | |||
| relaying separately from connections for the purposes of binding | relaying separately from connections for the purposes of binding | |||
| discovery. As a consequence, TURN runs on a separate port from STUN. | discovery. As a consequence, TURN runs on a separate port from STUN. | |||
| The client discovers the address and port of the TURN server using | The client discovers the address and port of the TURN server using | |||
| the same DNS procedures defined in [I-D.ietf-behave-rfc3489bis], but | the same DNS procedures defined in [I-D.ietf-behave-rfc3489bis], but | |||
| using an SRV service name of "turn" (or "turns" for TURN over TLS) | using an SRV service name of "turn" (or "turns" for TURN over TLS) | |||
| instead of just "stun". | instead of just "stun". | |||
| For example, to find TURN servers in the example.com domain, the TURN | For example, to find TURN servers in the example.com domain, the TURN | |||
| client performs a lookup for '_turn._udp.example.com', | client performs a lookup for '_turn._udp.example.com', | |||
| '_turn._tcp.example.com', and '_turns._tcp.example.com' if the STUN | '_turn._tcp.example.com', and '_turns._tcp.example.com' if the STUN | |||
| client wants to communicate with the TURN server using UDP, TCP, or | client wants to communicate with the TURN server using UDP, TCP, or | |||
| TLS over TCP, respectively. | TLS over TCP, respectively. | |||
| 11. Security Considerations | 12. Security Considerations | |||
| TURN servers allocate bandwidth and port resources to clients, in | TURN servers allocate bandwidth and port resources to clients, in | |||
| contrast to the Binding method defined in | contrast to the Binding method defined in | |||
| [I-D.ietf-behave-rfc3489bis]. Therefore, a TURN server requires | [I-D.ietf-behave-rfc3489bis]. Therefore, a TURN server requires | |||
| authentication and authorization of STUN requests. This | authentication and authorization of STUN requests. This | |||
| authentication is provided by mechanisms defined in the STUN | authentication is provided by mechanisms defined in the STUN | |||
| specification itself, in particular digest authentication. | specification itself, in particular digest authentication. | |||
| Because TURN servers allocate resources, they can be susceptible to | Because TURN servers allocate resources, they can be susceptible to | |||
| denial-of-service attacks. All Allocate transactions are | denial-of-service attacks. All Allocate transactions are | |||
| skipping to change at page 29, line 25 ¶ | skipping to change at page 34, line 10 ¶ | |||
| Relay servers are useful even for users not behind a NAT. They can | Relay servers are useful even for users not behind a NAT. They can | |||
| provide a way for truly anonymous communications. A user can cause a | provide a way for truly anonymous communications. A user can cause a | |||
| call to have its media routed through a TURN server, so that the | call to have its media routed through a TURN server, so that the | |||
| user's IP addresses are never revealed. | user's IP addresses are never revealed. | |||
| 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 ESP [RFC4303] | transport or tunnel mode. However, tunnel-mode IPSec ESP [RFC4303] | |||
| should still operate. | should still operate. | |||
| 12. IANA Considerations | 13. IANA Considerations | |||
| This specification defines several new STUN methods, STUN attributes, | ||||
| and STUN response codes. This section directs IANA to add these new | ||||
| protocol elements to the IANA registry of STUN protocol elements. | ||||
| 12.1. New STUN Methods | ||||
| Request/Response Transactions | ||||
| 0x003 : Allocate | ||||
| 0x004 : Refresh | ||||
| Indications | Since TURN is an extension to STUN [I-D.ietf-behave-rfc3489bis], the | |||
| 0x006 : Send | methods, attributes and error codes defined in this specification are | |||
| 0x007 : Data | new method, attributes, and error codes for STUN. This section | |||
| 0x009 : Channel Confirmation | directs IANA to add these new protocol elements to the IANA registry | |||
| of STUN protocol elements. | ||||
| 12.2. New STUN Attributes | The codepoints for the new STUN methods defined in this specification | |||
| are listed in Section 8. | ||||
| 0x000C: CHANNEL-NUMBER | The codepoints for the new STUN attributes defined in this | |||
| 0x000D: LIFETIME | specification are listed in Section 9. | |||
| 0x0010: BANDWIDTH | ||||
| 0x0012: PEER-ADDRESS | ||||
| 0x0013: DATA | ||||
| 0x0016: RELAY-ADDRESS | ||||
| 0x0018: REQUESTED-PORT-PROPS | ||||
| 0x0019: REQUESTED-TRANSPORT | ||||
| 0x0022: REQUESTED-IP | ||||
| 12.3. New STUN Response Codes | The codepoints for the new STUN error codes defined in this | |||
| specification are listed in Section 10. | ||||
| 437 Allocation Mismatch | Extensions to TURN can be made through IETF consensus. | |||
| 442 Unsupported Transport Protocol | ||||
| 443 Invalid IP Address | ||||
| 444 Invalid Port | ||||
| 486 Allocation Quota Reached | ||||
| 507 Insufficient Capacity | ||||
| 13. IAB Considerations | 14. IAB Considerations | |||
| The IAB has studied the problem of "Unilateral Self Address Fixing", | The IAB has studied the problem of "Unilateral Self Address Fixing", | |||
| which is the general process by which a client attempts to determine | which is the general process by which a client attempts to determine | |||
| its address in another realm on the other side of a NAT through a | its address in another realm on the other side of a NAT through a | |||
| collaborative protocol reflection mechanism RFC 3424 [RFC3424]. The | collaborative protocol reflection mechanism [RFC3424]. The TURN | |||
| TURN extension is an example of a protocol that performs this type of | 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. | purpose document a specific set of considerations. | |||
| TURN is an extension of the STUN protocol. As such, the specific | TURN is an extension of the STUN protocol. As such, the specific | |||
| usages of STUN that use the TURN extensions need to specifically | usages of STUN that use the TURN extensions need to specifically | |||
| address these considerations. Currently the only STUN usage that | address these considerations. Currently the only STUN usage that | |||
| uses TURN is ICE [I-D.ietf-mmusic-ice]. | uses TURN is ICE [I-D.ietf-mmusic-ice]. | |||
| 14. Example | 15. Example | |||
| In this example, a TURN client is behind a NAT. This TURN client is | TBD | |||
| running SIP. The client has a private address of 10.0.1.1. The TURN | ||||
| server is on the public side of the NAT, and is listening for TURN | ||||
| requests on 192.0.2.3:8776. The public side of the NAT has an IP | ||||
| address of 192.0.2.1. The client is attempting to send a SIP INVITE | ||||
| to a peer, and wishes to allocate an IP address and port for | ||||
| inclusion in the SDP of the INVITE. Normally, TURN would be used in | ||||
| conjunction with ICE when applied to SIP. However, to keep the | ||||
| example simple, TURN is shown without ICE. | ||||
| The client communicates with a SIP user agent on the public network. | 16. Changes from Previous Versions | |||
| This user agent uses a 192.0.2.17:12734 for receipt of its RTP | ||||
| packets. | ||||
| 10.0.1.1 192.0.2.1 192.0.2.3 192.0.2.17 | Note to RFC Editor: Please remove this section prior to publication | |||
| Client NAT TURN Server Peer | of this document as an RFC. | |||
| | | | | | ||||
| |(1) Allocate |(2) Allocate | | | ||||
| |S=10.0.1.1:4334 |S=192.0.2.1:63346 | | | ||||
| |D=192.0.2.3:8776 |D=192.0.2.3:8776 | | | ||||
| |------------------>|------------------>| | | ||||
| | | | | | ||||
| |(4) Error |(3) Error | | | ||||
| |S=192.0.2.3:8776 |S=192.0.2.3:8776 | | | ||||
| |D=10.0.1.1:4334 |D=192.0.2.1:63346 | | | ||||
| |<------------------|<------------------| | | ||||
| | | | | | ||||
| |(5) Allocate |(6) Allocate | | | ||||
| |S=10.0.1.1:4334 |S=192.0.2.1:63346 | | | ||||
| |D=192.0.2.3:8776 |D=192.0.2.3:8776 | | | ||||
| |------------------>|------------------>| | | ||||
| | | | | | ||||
| | | (allocates port 32766) | | ||||
| | | | | | ||||
| | | | | | ||||
| |(8) Response |(7) Response | | | ||||
| |RA=192.0.2.3:32766 |RA=192.0.2.3:32766 | | | ||||
| |MA=192.0.2.1:63346 |MA=192.0.2.1:63346 | | | ||||
| |S=192.0.2.3:8776 |S=192.0.2.3:8776 | | | ||||
| |D=10.0.1.1:4334 |D=192.0.2.1:63346 | | | ||||
| |<------------------|<------------------| | | ||||
| | | | | | ||||
| |(9) SIP INVITE | | | | ||||
| |SDP=192.0.2.3:32766| | | | ||||
| |---------------------------------------------------------->| | ||||
| | | | | | ||||
| |(10) SIP 200 OK | | | | ||||
| |SDP=192.0.2.17:12734 | | | ||||
| |<----------------------------------------------------------| | ||||
| | | | | | ||||
| | | |(11) RTP | | ||||
| | | |S=192.0.2.17:12734 | | ||||
| | | |D=192.0.2.3:32766 | | ||||
| | | |<------------------| | ||||
| | | | | | ||||
| | | (no permission; packet dropped) | | ||||
| | | | | | ||||
| |(12) SIP ACK | | | | ||||
| |---------------------------------------------------------->| | ||||
| | | | | | ||||
| |(13) Send Indic. |(14) Send Indic. | | | ||||
| |TURN Channel=0 |TURN Channel=0 | | | ||||
| |STUN DATA=RTP |STUN DATA=RTP | | | ||||
| |CHANNEL-NUMER=77 |CHANNEL-NUMBER=77 | | | ||||
| |PA=192.0.2.17:12734|PA=192.0.2.17:12734| | | ||||
| |S=10.0.1.1:4334 |S=192.0.2.1:63346 | | | ||||
| |D=192.0.2.3:8776 |D=192.0.2.3:8776 | | | ||||
| |------------------>|------------------>| | | ||||
| | | | | | ||||
| | | permission created | | ||||
| | | | | | ||||
| | | |(15) RTP | | ||||
| | | |S=192.0.2.3:32766 | | ||||
| | | |D=192.0.2.17:12734 | | ||||
| | | |------------------>| | ||||
| | | | | | ||||
| |(17) ChannelConf |(16) ChannelConf | | | ||||
| |TURN Channel=0 |TURN Channel=0 | | | ||||
| |CHANNEL-NUMBER=77 |CHANNEL-NUMBER=77 | | | ||||
| |PA=192.0.2.17:12734|PA=192.0.2.17:12734| | | ||||
| |S=192.0.2.3:8776 |S=192.0.2.3:8776 | | | ||||
| |D=10.0.1.1:4334 |D=192.0.2.1:63346 | | | ||||
| |<------------------|<------------------| | | ||||
| | | | | | ||||
| |(18) TURN Framed |(19) TURN Framed | | | ||||
| |TURN Channel=77 |TURN Channel=77 |(20) RTP | | ||||
| |S=10.0.1.1:4334 |S=192.0.2.1:63346 |S=192.0.2.3:32766 | | ||||
| |D=192.0.2.3:8776 |D=192.0.2.3:8776 |D=192.0.2.17:12734 | | ||||
| |------------------>|------------------>|------------------>| | ||||
| | | | | | ||||
| |(23) Data Indic. |(22) Data Indic. | | | ||||
| |TURN Channel=0 |TURN Channel=0 | | | ||||
| |CHANNEL-NUMBER=33 |CHANNEL-NUMBER=33 |(21) RTP | | ||||
| |S=192.0.2.3:8776 |S=192.0.2.3:8776 |S=192.0.2.17:12734 | | ||||
| |D=10.0.1.1:4334 |D=192.0.2.1:63346 |D=192.0.2.3:32766 | | ||||
| |<------------------|<------------------|<------------------| | ||||
| | | | | | ||||
| |(24) ChannelConf |(25) ChannelConf | | | ||||
| |TURN Channel=0 |TURN Channel=0 | | | ||||
| |CHANNEL-NUMBER=33 |CHANNEL-NUMBER=33 | | | ||||
| |S=10.0.0.1:4334 |S=192.0.2.3:8776 | | | ||||
| |D=192.0.2.3:8776 |D=192.0.2.3:8776 | | | ||||
| |------------------>|------------------>| | | ||||
| | | | | | ||||
| |(28) TURN Framed |(27) TURN Framed | | | ||||
| |TURN Channel=33 |TURN Channel=33 |(26) RTP | | ||||
| |S=192.0.2.3:8776 |S=192.0.2.3:8776 |S=192.0.2.17:12734 | | ||||
| |D=10.0.1.1:4334 |D=192.0.2.1:63346 |D=192.0.2.3:32766 | | ||||
| |<------------------|<------------------|<------------------| | ||||
| | | | | | ||||
| Figure 12 | This section lists the changes between the various versions of this | |||
| specification. | ||||
| The message flow is shown in Figure 12. In step 1-2, the client | 16.1. Changes from -05 to -06 | |||
| allocates a UDP port from the local operating system on its private | ||||
| interface, obtaining 4334. It then attempts to obtain a port for RTP | ||||
| traffic. RTCP processing is not shown in the example. | ||||
| In step 1, the client sends an Allocate Request (1) with a source | o Changed the mechanism for allocating channels to the one proposed | |||
| address (denoted by S) of 10.0.1.1:4334 and a destination (denoted by | by Eric Rescorla at the Dec 2007 IETF meeting. | |||
| D) of 192.0.2.3:8776. This passes through the NAT (2), which | ||||
| allocates a new UDP port (63346) on the NAT's public interface | ||||
| (192.0.2.1), and creates an internal mapping between the internal | ||||
| address 10.0.1.1:4334 and that external address 192.0.2.1:63346. The | ||||
| NAT sends this request to the TURN server (3). The TURN server | ||||
| challenges the request, requesting credentials by sending a STUN | ||||
| error and including the NONCE and REALM attributes. Message 3 is | ||||
| relayed, by the NAT, to the TURN client (4). The client sends a new | ||||
| request (from the same UDP port), including its credentials (5, 6). | ||||
| The TURN server authenticates the request. The TURN server allocates | ||||
| a new UDP port on one of its interfaces, 192.0.2.3:32766. The TURN | ||||
| server puts 192.0.2.3:32766 into the RELAY-ADDRESS (denoted by RA) | ||||
| attribute of the response, and puts the source IP address and UDP | ||||
| port of the request (as seen by the TURN server) into the XOR-MAPPED- | ||||
| ADDRESS attribute (denoted by MA). In step 7, this message is sent | ||||
| back to the TURN client and relayed by the NAT in step 8. | ||||
| The client now proceeds to perform a basic SIP call setup. In | o Removed the framing mechanism (which was used to frame all | |||
| message 9, the TURN client includes the TURN server's address (which | messages) and replaced it with the ChannelData message. As part | |||
| it learned in message 8) in the SDP of its INVITE (e.g., using syntax | of this change, noted that the demux of ChannelData messages from | |||
| described in[I-D.ietf-mmusic-ice]). The called party responds with | TURN messages can be done using the first two bits of the message. | |||
| its SDP in a provisional response (18x) or a final response (200 Ok). | ||||
| The called party's SDP includes its IP address and UDP port, | ||||
| 192.0.2.17:12734. Immediately after sending its 200 Ok, the called | ||||
| party sends an RTP packet to the TURN server's IP address (11). This | ||||
| RTP packet is dropped by the TURN server, because the TURN server has | ||||
| not been given permission to relay that data. Incoming packets are | ||||
| dropped until a permission is created. The SIP exchange completes | ||||
| with an SIP 200 Ok message (12). | ||||
| Steps 13-20 show the client performing a channel allocation. The | o Rewrote the sections on transmitted and receiving data as a result | |||
| TURN client needs to send an RTP packet. Since no channels and no | of the above to changes, splitting it into a section on Send and | |||
| permissions have been created, the TURN client sends the RTP packet | Data Indications and a separate section on channels. | |||
| inside of a Send Indication, using channel number 0, with the | ||||
| CHANNEL-NUMBER attribute set to the channel number the TURN client | ||||
| wants to use for subsequent communication with this TURN peer (77 is | ||||
| shown in the example). The TURN peer's IP address and UDP port | ||||
| (which were learned from the SDP answer received in step 10) are | ||||
| placed in the PEER-ADDRESS attribute (denoted by PA). In message 13, | ||||
| the TURN client sends this Send Indication, and it is relayed by the | ||||
| NAT to the TURN server (14). Upon receipt of that message, the TURN | ||||
| server creates a permission, which allows subsequent traffic from | ||||
| that same peer address to be relayed to that TURN client's IP address | ||||
| and UDP port. The TURN server sends the contents of the Send | ||||
| Indication's DATA attribute towards the PEER-ADDRESS (15); this will | ||||
| typically be an RTP packet. Note that the source address and port of | ||||
| message 15 is the TURN server's address, 192.0.2.3:32766, which is | ||||
| the allocated transport address communicated to the TURN client in | ||||
| messages 7 and 8. | ||||
| In step 16, the TURN server sends a channel confirmation message to | o Clarified the handling of Allocate Request messages. In | |||
| the TURN client. Once the TURN client receives this message, it can | particular, subsequent Allocate Request messages over UDP with the | |||
| forgo using the Send Indication for that channel. Instead, it can | same transaction id are not an error but a retransmission. | |||
| utilize the channel number in the TURN framing header. Steps 18 and | ||||
| 19 show the TURN client sending a message to TURN server using the | ||||
| TURN framing header, with channel=1. Step 20 shows the TURN server | ||||
| removing the TURN framing and sending the RTP packet to the TURN | ||||
| peer. | ||||
| Steps 21-28 show an RTP packet from the TURN peer, which causes a | o Restricted the range of ports available for allocation to the | |||
| channel allocation by the TURN server. In packet 21, an RTP packet | Dynamic and/or Private Port range, and noted when ports outside | |||
| is sent by the TURN peer to the TURN server. There is an existing | this range can be used. | |||
| permission (created in step 14), so the TURN server accepts this | ||||
| incoming RTP packet. The TURN server knows the TURN client to send | ||||
| this packet to, but does not yet have a channel assigned for traffic | ||||
| in this direction. The TURN server chooses a channel number (33 in | ||||
| the example), and sends a Data Indication to the TURN client (message | ||||
| 22). The NAT relays this to the TURN client (message 23). The TURN | ||||
| client sends an Channel Confirmation message (24) which is relayed by | ||||
| the NAT (25). When the TURN server receives the Channel | ||||
| Confirmation, it no longer needs to use a Send Indication for traffic | ||||
| from that remote peer; instead, it can use TURN framing with its | ||||
| chosen channel number (33). The next RTP packet that arrives from | ||||
| that peer (26) is sent by the TURN server using TURN framing | ||||
| indicating the channel number (message 27) and relayed by the NAT to | ||||
| the TURN client (28). | ||||
| 15. Changes since version -04 | o Changed the format of the REQUESTED-TRANSPORT attribute. The | |||
| previous version used 00 for UDP and 01 for TCP; the new version | ||||
| uses protocol numbers from the IANA protocol number registry. The | ||||
| format of the attribute also changed. | ||||
| This section lists the major changes between thiis document and | o Made a large number of changes to the non-normative portion of the | |||
| draft-ietf-behave-turn-04: | document to reflect technical changes and improve the | |||
| presentation. | ||||
| o Added the Issues section. | ||||
| 16.2. Changes from -04 to -05 | ||||
| o Removed the ability to allocate addresses for TCP relaying. This | o Removed the ability to allocate addresses for TCP relaying. This | |||
| is now covered in a separate document. However, communication | is now covered in a separate document. However, communication | |||
| between the client and the server can still run over TCP or TLS/ | between the client and the server can still run over TCP or TLS/ | |||
| TCP. This resulted in the removal of the Connect method and the | TCP. This resulted in the removal of the Connect method and the | |||
| TIMER-VAL and CONNECT-STAT attributes. | TIMER-VAL and CONNECT-STAT attributes. | |||
| o Added the concept of channels. All communication between the | o Added the concept of channels. All communication between the | |||
| client and the server flows on a channel. Channels are numbered | client and the server flows on a channel. Channels are numbered | |||
| 0..65535. Channel 0 is used for TURN messages, while the | 0..65535. Channel 0 is used for TURN messages, while the | |||
| skipping to change at page 36, line 15 ¶ | skipping to change at page 37, line 5 ¶ | |||
| o Added a discussion of what happens if a client's public binding on | o Added a discussion of what happens if a client's public binding on | |||
| its outermost NAT changes. | its outermost NAT changes. | |||
| o The document now consistently uses the term "peer" as the name of | o The document now consistently uses the term "peer" as the name of | |||
| a remote endpoint with which the client wishes to communicate. | a remote endpoint with which the client wishes to communicate. | |||
| o Rewrote much of the document to describe the new concepts. At the | o Rewrote much of the document to describe the new concepts. At the | |||
| same time, tried to make the presentation clearer and less | same time, tried to make the presentation clearer and less | |||
| repetitive. | repetitive. | |||
| 16. Acknowledgements | 17. Issues | |||
| The authors would like to thank Marc Petit-Huguenin for his comments | NOTE to RFC Editor: Please remove this section prior to publication | |||
| and suggestions. | of this document as an RFC. | |||
| 17. References | This section lists the open and now closed issues in this document. | |||
| The descriptions here are brief, and the reader should consult the | ||||
| corresponding thread on the mailing list for a more in-depth | ||||
| description of the issue and the resolutions being considered. | ||||
| 17.1. Normative References | 17.1. Open Issues | |||
| 1. Bandwidth: What should we do with the BANDWIDTH attribute, which | ||||
| is currently ill-specified? Should we remove it? Or should we | ||||
| try to come up with a good specification, perhaps using ideas | ||||
| from RSVP? | ||||
| 2. Permission Policy: What should the permission policy be? | ||||
| Address-restricted, as is currently specified in the document? | ||||
| Or address-and-port-restricted, as many firewalls implement | ||||
| today? Or should we leave this open to the implementor, under | ||||
| the assumption that the IT administrator will only allow clients | ||||
| to contact those servers that implement whatever permission | ||||
| policy the IT administrator can accept? | ||||
| 3. Port Adjacency: The spec currently allows a client to request | ||||
| that the server allocate a port and also reserve the next higher | ||||
| port number for a possible future allocation (on a different | ||||
| 5-tuple). However, the exact behavior of the server in this | ||||
| case is ill-specified. For example, must the next-higher-port | ||||
| be available for the allocation of the lower port number to | ||||
| succeed? How long is the next-higher-port reserved? 30 seconds? | ||||
| For the lifetime of the lower-numbered-port's allocation? Or | ||||
| should we just ditch this feature, since it is difficult to | ||||
| implement, it is at odds with port randomization, and paired | ||||
| port numbers applications don't work well with NATs anyway? | ||||
| 4. Demuxing ChannelData messages: How does a client or server demux | ||||
| STUN-formatted messages from ChannelData messages? Does it use | ||||
| the first two bits (as currently specified) or just one bit? | ||||
| And how many channels do we need anyway? Some people are | ||||
| questioning the need for any more than 200 channels. If we | ||||
| don't need many channels, then the demux algorithm might become | ||||
| simpler. | ||||
| 5. Deallocating Channels: Do we need a mechanism for deallocating | ||||
| channels? Some have argued for this feature, because a TURN | ||||
| server administrator will want a way to recover resources for | ||||
| channels no longer in active use. If yes, then what is the | ||||
| mechanism? For example, should a channel binding expire when | ||||
| the corresponding permission expires? | ||||
| 6. Permissions and Channel Allocations: Should allocating a channel | ||||
| for a peer automatically install a permission for that peer's IP | ||||
| address? | ||||
| 7. Permission and Allocation Lifetimes: What should the default | ||||
| permission lifetime be? Should there be a minumum value? | ||||
| Should there be a way for the client to modify the permission | ||||
| lifetime? Should there be a way for the client to learn the | ||||
| current permission lifetime? And what is the relationship of | ||||
| the permission lifetime to the allocation lifetime? Does it | ||||
| make sense for the allocation lifetime to be less than the | ||||
| permission lifetime? | ||||
| 8. Preserving bits in the IP header: What bits (if any) should be | ||||
| preserved in the IP header when a packet is relayed by the | ||||
| server? The bits under consideration are currently the Don't | ||||
| Fragment (DF) bit, the Explicit Congestion Notification (ECN) | ||||
| bits, and the DiffServ (DS) bits. | ||||
| 9. Exceeding the Path MTU Size: TURN adds an overhead of 4 bytes | ||||
| (ChannelData msg) or 36 bytes (Send or Data Indication), thus | ||||
| potentially exceeding the path MTU between the client and | ||||
| server. This could either cause IP fragmentation, or cause the | ||||
| packet to be dropped if the DF bit is set. Who handles this | ||||
| problem? Does TURN need to handle this, or is this left up to | ||||
| the application to handle? | ||||
| 10. Allowed PEER-ADDRESS values: Should there be any restrictions on | ||||
| the IP address the client can specify in the PEER-ADDRESS | ||||
| attribute? Are multicast addresses allowed? What about | ||||
| 0.0.0.0? Any other restrictions? | ||||
| 11. Discarding UDP datagrams: If the server discards a received UDP | ||||
| datagram on the relayed transport address (because there is no | ||||
| corresponding permission), then does the server send an ICMP | ||||
| response? If so, what error code does it use? (What does RFC | ||||
| 4787 say about the corresponding situation in NATs? I believe | ||||
| many NATs silently discard these packets by default, or have a | ||||
| "stealth mode" that enables this behavior.) | ||||
| 12. Authentication: Is the use of STUN's Long-Term Authentication | ||||
| Mechanism by a TURN server mandatory? The document currently | ||||
| implicitly assumes "yes", but what about someone who wants to | ||||
| operate a public TURN server? | ||||
| 13. Re-using the 5-tuple: If an allocation expires, is there any | ||||
| reason a client should not be able to immediately create a new | ||||
| allocation using the same 5-tuple? | ||||
| 14. Password change: Is it possible to change the password for the | ||||
| Long-Term Authentication mechanism during the lifetime of an | ||||
| allocation? If so, how is it done? | ||||
| 15. IPv6: TURN probably works fine in an all IPv6 environment, but | ||||
| there are a number of mixed IPv4/IPv6 cases that are ill- | ||||
| specified. As an example, the server needs to check that the | ||||
| PEER-ADDRESS in a Send Indication is of the same address family | ||||
| as the relayed transport address. Should we carefully work | ||||
| through all these cases and make sure we have caught them all, | ||||
| or should we just state that this document covers the IPv4 case | ||||
| only, and punt the specification of IPv6 and mixed IPv4/IPv6 | ||||
| operation to draft-ietf-behave-turn-ipv6? Does the current | ||||
| interest in resurecting IPv4-to-IPv6 NATs have any impact on | ||||
| TURN? | ||||
| 17.2. Closed Issues | ||||
| 1. Channel Allocation: Should TURN use the mechanism proposed by EKR | ||||
| to allocate channels? RESOLUTION: Yes. Document now reflects | ||||
| this. | ||||
| 2. Stateful Allocations: Does a TURN server need to distinguish | ||||
| between the case where the client retransmits the initial | ||||
| Allocate Request because the Allocate Response was lost and the | ||||
| case where the client sends an Allocate Request because it thinks | ||||
| the allocation does not exist? RESOLUTION: Yes. Document now | ||||
| reflects this. | ||||
| 3. Port Range: From what range of port numbers should a TURN server | ||||
| allocate ports? RESOLUTION: The server SHOULD allocate from the | ||||
| Dynamic and/or Private Port range unless it is sure it will not | ||||
| interfere with other apps on the same machine. Document now | ||||
| reflects this. | ||||
| 4. Framing Header for STUN-formatted messages: Should TURN use the | ||||
| framing mechanism for STUN-formatted messages? RESOLUTION: NO. | ||||
| Document now reflects this. However, see related issues. | ||||
| 5. Length field in ChannelData header: Over UDP, the length of the | ||||
| application data field in the ChannelData message can be | ||||
| determined from the length field in the UDP header. So should | ||||
| the length field in the ChannelData header be set to zero in this | ||||
| case? RESOLUTION: No, the ChannelData length field should have | ||||
| the same semantics over both TCP and UDP. Document now reflects | ||||
| this. | ||||
| 18. Acknowledgements | ||||
| The authors would like to thank the various participants in the | ||||
| BEHAVE working group for their many comments on this draft. Marc | ||||
| Petit-Huguenin, Remi Denis-Courmont, Cullen Jennings, Lars Eggert, | ||||
| Magnus Westerlund, and Eric Rescorla have been particularly helpful, | ||||
| with Eric also suggesting the channel allocation mechanism. | ||||
| Christian Huitema was an early contributor to this document and was a | ||||
| co-author on the first few drafts. Finally, the authors would like | ||||
| to thank Dan Wing for his huge help in restarting progress on this | ||||
| draft after work had stalled. | ||||
| 19. References | ||||
| 19.1. Normative References | ||||
| [I-D.ietf-behave-rfc3489bis] | [I-D.ietf-behave-rfc3489bis] | |||
| Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, | Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, | |||
| "Session Traversal Utilities for (NAT) (STUN)", | "Session Traversal Utilities for (NAT) (STUN)", | |||
| draft-ietf-behave-rfc3489bis-12 (work in progress), | draft-ietf-behave-rfc3489bis-13 (work in progress), | |||
| November 2007. | November 2007. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, March 1997. | Requirement Levels", BCP 14, RFC 2119, March 1997. | |||
| 17.2. Informative References | 19.2. Informative References | |||
| [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. | [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. | |||
| Jacobson, "RTP: A Transport Protocol for Real-Time | Jacobson, "RTP: A Transport Protocol for Real-Time | |||
| Applications", STD 64, RFC 3550, July 2003. | Applications", STD 64, RFC 3550, July 2003. | |||
| [RFC1889] Schulzrinne, H., Casner, S., Frederick, R., and V. | ||||
| Jacobson, "RTP: A Transport Protocol for Real-Time | ||||
| Applications", RFC 1889, January 1996. | ||||
| [RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and | ||||
| E. Lear, "Address Allocation for Private Internets", | ||||
| BCP 5, RFC 1918, February 1996. | ||||
| [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model | [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model | |||
| with Session Description Protocol (SDP)", RFC 3264, | with Session Description Protocol (SDP)", RFC 3264, | |||
| June 2002. | June 2002. | |||
| [RFC4302] Kent, S., "IP Authentication Header", RFC 4302, | [RFC4302] Kent, S., "IP Authentication Header", RFC 4302, | |||
| December 2005. | December 2005. | |||
| [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", | [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", | |||
| RFC 4303, December 2005. | RFC 4303, December 2005. | |||
| skipping to change at page 37, line 22 ¶ | skipping to change at page 41, line 31 ¶ | |||
| [RFC4787] Audet, F. and C. Jennings, "Network Address Translation | [RFC4787] Audet, F. and C. Jennings, "Network Address Translation | |||
| (NAT) Behavioral Requirements for Unicast UDP", BCP 127, | (NAT) Behavioral Requirements for Unicast UDP", BCP 127, | |||
| RFC 4787, January 2007. | RFC 4787, January 2007. | |||
| [I-D.ietf-behave-turn-tcp] | [I-D.ietf-behave-turn-tcp] | |||
| Rosenberg, J. and R. Mahy, "Traversal Using Relays around | Rosenberg, J. and R. Mahy, "Traversal Using Relays around | |||
| NAT (TURN) Extensions for TCP Allocations", | NAT (TURN) Extensions for TCP Allocations", | |||
| draft-ietf-behave-turn-tcp-00 (work in progress), | draft-ietf-behave-turn-tcp-00 (work in progress), | |||
| November 2007. | November 2007. | |||
| [Port-Numbers] | ||||
| "IANA Port Numbers Registry", | ||||
| <http://www.iana.org/assignments/port-numbers>. | ||||
| [Protocol-Numbers] | ||||
| "IANA Protocol Numbers Registry", 2005, | ||||
| <http://www.iana.org/assignments/protocol-numbers>. | ||||
| Authors' Addresses | Authors' Addresses | |||
| Jonathan Rosenberg | Jonathan Rosenberg | |||
| Cisco Systems, Inc. | Cisco Systems, Inc. | |||
| Edison, NJ | Edison, NJ | |||
| US | USA | |||
| Email: jdrosen@cisco.com | Email: jdrosen@cisco.com | |||
| URI: http://www.jdrosen.net | URI: http://www.jdrosen.net | |||
| Rohan Mahy | Rohan Mahy | |||
| Plantronics, Inc. | Plantronics, Inc. | |||
| Email: rohan@ekabal.com | Email: rohan@ekabal.com | |||
| Philip Matthews | Philip Matthews | |||
| Avaya, Inc. | Avaya, Inc. | |||
| 1135 Innovation Drive | 1135 Innovation Drive | |||
| Ottawa, Ontario K2K 3G7 | Ottawa, Ontario K2K 3G7 | |||
| Canada | Canada | |||
| Phone: +1 613 592-4343 x223 | Phone: +1 613 592-4343 x223 | |||
| Fax: | Fax: | |||
| Email: philip_matthews@magma.ca | Email: philip_matthews@magma.ca | |||
| URI: | URI: | |||
| Dan Wing | ||||
| Cisco Systems, Inc. | ||||
| 170 West Tasman Drive | ||||
| San Jose, CA 95134 | ||||
| USA | ||||
| Phone: | ||||
| Fax: | ||||
| Email: dwing@cisco.com | ||||
| URI: | ||||
| Full Copyright Statement | Full Copyright Statement | |||
| Copyright (C) The IETF Trust (2007). | Copyright (C) The IETF Trust (2008). | |||
| This document is subject to the rights, licenses and restrictions | This document is subject to the rights, licenses and restrictions | |||
| contained in BCP 78, and except as set forth therein, the authors | contained in BCP 78, and except as set forth therein, the authors | |||
| retain all their rights. | retain all their rights. | |||
| This document and the information contained herein are provided on an | This document and the information contained herein are provided on an | |||
| "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS | "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS | |||
| OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND | OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND | |||
| THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS | THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS | |||
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF | OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF | |||
| End of changes. 194 change blocks. | ||||
| 898 lines changed or deleted | 1114 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||