idnits 2.17.1 draft-ietf-mmusic-sdp-tcpmedia-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 9 longer pages, the longest (page 2) being 60 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** The abstract seems to contain references ([SDP], [UTF-8]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. == There are 35 instances of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 180: '...a) Each endpoint MUST accept data from...' RFC 2119 keyword, line 183: '... connections, it MUST use that TCP con...' RFC 2119 keyword, line 187: '...etermined to be idle, the endpoint MAY...' RFC 2119 keyword, line 371: '...n-setup" attribute field, which MAY be...' Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 2000) is 8588 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2234 (ref. 'ABNF') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 2327 (ref. 'SDP') (Obsoleted by RFC 4566) ** Obsolete normative reference: RFC 2044 (ref. 'UTF-8') (Obsoleted by RFC 2279) Summary: 7 errors (**), 0 flaws (~~), 5 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT D. Yon 3 Document: draft-ietf-mmusic-sdp-tcpmedia-00.txt Dialout.Net 4 Expires April 2001 October 2000 6 TCP-Based Media Transport in SDP 7 9 Status of this Memo 11 This document is an Internet-Draft and is in full conformance with 12 all provisions of Section 10 of RFC2026. 14 Internet-Drafts are working documents of the Internet Engineering 15 Task Force (IETF), its areas, and its working groups. Note that 16 other groups may also distribute working documents as Internet- 17 Drafts. 19 Internet-Drafts are draft documents valid for a maximum of six 20 months and may be updated, replaced, or obsoleted by other documents 21 at any time. It is inappropriate to use Internet-Drafts as reference 22 material or to cite them other than as "work in progress." 24 The list of current Internet-Drafts can be accessed at: 25 http://www.ietf.org/ietf/1id-abstracts.txt 27 The list of Internet-Draft Shadow Directories can be accessed at: 28 http://www.ietf.org/shadow.html. 30 Copyright (C) The Internet Society (2000). All Rights Reserved. 32 Abstract 34 This document describes how to express TCP-based media transport 35 using the Session Description Protocol (SDP). It defines two new 36 protocol identifiers: TCP and RTP/AVP-TCP. It also defines the 37 syntax and semantics for an SDP "direction" attribute that describes 38 the TCP connection setup procedure. 40 Yon 1 41 Introduction 43 The Session Description Protocol [SDP] provides a general-purpose 44 format for describing multimedia sessions in announcements or 45 invitations. SDP uses an entirely textual data format (the US-ASCII 46 subset of [UTF-8]) to maximize portability among transports. SDP 47 does not define a protocol, but only the syntax to describe a 48 multimedia session with sufficient information to discover and 49 participate in that session. Session descriptions may be sent using 50 any number of existing application protocols for transport (e.g., 51 SAP, SIP, RTSP, email, HTTP, etc.). 53 Motivation 55 [SDP] describes two protocol identifiers: RTP/AVP and UDP, both of 56 which are unreliable, connectionless protocols, an appropriate 57 choice for multimedia streams. There are, however, applications for 58 which the connection-oriented TCP transport is more appropriate, but 59 [SDP] provides no way to describe a session that uses the TCP 60 protocol. 62 The connection-oriented nature of TCP introduces a new factor when 63 describing a session: not only must it be possible to express that a 64 protocol will be based on TCP, but it must also describe the 65 connection setup procedure. 67 1 Protocol Identifiers 69 1.1 RTP/AVP-TCP 71 [SDP] already specifies the RTP/AVP protocol identifier as a way to 72 describe media that uses the Real Time Protocol and the associated 73 Audio-Video Profiles. The assumption in [SDP] is that the 74 underlying network transport is UDP. RTP is transport-neutral, so 75 it is possible to transport RTP/RTCP packets using TCP rather than 76 UDP. To describe a media session that uses RTP/AVP over TCP, the 77 protocol identifier RTP/AVP-TCP must be specified in the m= line. 79 1.2 TCP 81 The TCP protocol identifier is similar to the UDP protocol 82 identifier in that it only describes the transport protocol without 83 any connotation as to the upper-layer protocol. An m= line that 84 specifies TCP must further qualify the protocol using a fmt 85 identifier (see [SDP] Appendix B). 87 2 Direction Attribute 89 An important attribute of a TCP connection is the setup procedure. 90 One endpoint needs to initiate the connection and the other endpoint 91 needs to accept the connection. The direction attribute is used to 92 describe these roles, and the syntax is as follows: 94 Yon INTERNET-DRAFT - Expires March 2001 2 95 a=direction: 97 The is one of the following: 99 passive: The endpoint will accept an incoming TCP connection. 101 active: The endpoint will initiate an outgoing TCP connection. 103 both: The endpoint will both accept an incoming TCP connection 104 and will initiate an outgoing TCP connection. 106 The is an optional value that may only be specified in 107 the context of direction:active or direction:both. 109 2.1 Semantics of direction:passive 111 By specifying direction:passive, the endpoint indicates that the 112 port number specified in the m= line is available to accept a TCP 113 connection from the other endpoint. 115 2.2 Semantics of direction:active 117 By specifying direction:active, the endpoint indicates that it will 118 initiate a TCP connection to the port number on the m= line of the 119 other endpoint. The port number on its own m= line is irrelevant 120 and is to be ignored by the other endpoint. Nevertheless, since the 121 m= line must contain a valid port number, the endpoint specifying 122 direction:active should specify a port number of 9 (the discard 123 port) on its m= line. The endpoint must not specify a port number 124 of zero, as that carries other semantics in [SDP]. 126 The endpoint may optionally specify the port number from which it 127 will initiate the TCP connection in the position on 128 the a= line. 130 2.3 Semantics of direction:both 132 By specifying direction:both, the endpoint indicates that it will 133 both accept a TCP connection on the port number of its own m= line, 134 and that it will also initiate a TCP connection to the port number 135 on the m= line of the other endpoint. As with direction:active, the 136 endpoint may optionally specify the port number from which it will 137 initiate the TCP connection in the position on the a= 138 line. 140 Since this attribute describes behavior that is similar to 141 connectionless media descriptions in [SDP], it is the default value 142 for the direction attribute and is therefore optional. 144 Endpoints may choose to specify direction:both for one or more of 145 the following reasons: 147 Yon INTERNET-DRAFT - Expires March 2001 3 148 1) The endpoint has no preference as to whether it accepts or 149 initiates the TCP connection, and therefore is offering the 150 remote endpoint a choice of connection setup procedures. 152 2) The endpoints intend to use a single TCP connection to 153 transport the media, but it is not known whether firewall 154 issues will prevent either endpoint from initiating or 155 accepting the TCP connection. Therefore both endpoints will 156 attempt to initiate a TCP connection in hopes that at least 157 one will succeed. 159 3) The endpoints intend to use two TCP connections to transport 160 the media, and one must be initiated by the remote endpoint 161 and the other must be initiated by the local endpoint. 163 If one endpoint specifies either direction:active or 164 direction:passive and the other specifies direction:both, both 165 endpoints must behave as if the latter had specified the inverse 166 direction of the former. For example, specifying direction:both 167 when the other endpoint specifies direction:active should cause both 168 endpoints to behave as if the former had specified 169 direction:passive. Conversely, specifying direction:both when the 170 other endpoint specifies direction:passive should cause both 171 endpoints to behave as if the former had specified direction:active. 173 If both endpoints specify direction:both then each endpoint must 174 initiate a TCP connection to the port number specified on the m= 175 line of the opposite endpoint. If only one connection succeeds, 176 then that connection will be used to carry the media. If both 177 connections succeed but only one was needed (case #2 above), the 178 following rules shall apply: 180 a) Each endpoint MUST accept data from either TCP connection. 182 b) Once an endpoint has transmitted data to one of the TCP 183 connections, it MUST use that TCP connection exclusively for 184 transmission. 186 c) Once an endpoint has transmitted AND received data, if one of 187 the TCP connections is determined to be idle, the endpoint MAY 188 close the idle TCP connection. 190 3 Source-Port Considerations 192 In the cases where the endpoint is initiating the TCP connection, a 193 source port number may optionally be specified on the a= line by 194 that endpoint. In most environments, the source port number can be 195 determined by binding the socket before initiating the connect, as 196 shown in the sample C code below: 198 { 199 SOCKET s_id 200 SOCKADDR_IN cli_sin; 201 int namelen; 203 Yon INTERNET-DRAFT - Expires March 2001 4 204 // Create the socket 205 s_id = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); 207 // Bind the socket to any IP address and port 208 bzero((char *)&cli_sin,sizeof(cli_sin)); 209 cli_sin.sin_family = AF_INET; 210 cli_sin.sin_addr.s_addr = htonl(INADDR_ANY); 211 cli_sin.sin_port = 0; 212 bind(s_id,(SOCKADDR *)&cli_sin,sizeof(cli_sin)); 214 // Find the port number that was bound 215 namelen = sizeof(cli_sin); 216 getsockname(s_id,(SOCKADDR *)&cli_sin,&namelen); 218 // Print the port number 219 printf("Source Port = %d\n",ntohs(cli_sin.sin_port)); 220 } 222 The motivation for specifying the source port is to allow topologies 223 where one or more endpoints use a single, fixed TCP port for 224 incoming connections. Non-RTP protocols transported over TCP 225 commonly use this technique. By specifying the source port, an 226 endpoint avoids a potential ambiguity when more than one session is 227 set up between two endpoints. 229 For example, consider two endpoints with IP addresses of 10.1.1.1 230 and 10.1.1.2. The endpoint at 10.1.1.1 signals the availability of 231 a session on TCP port 2393 (passive). Before the endpoint at 232 10.1.1.2 has a chance to initiate the connection, events transpire 233 that cause the endpoint at 10.1.1.1 to signal the availability of a 234 separate session that is also found at TCP port 2393 (passive). 235 Shortly thereafter, both entities at 10.1.1.2 initiate connections 236 to 10.1.1.1 on port 2393. 238 The problem is this: how does the endpoint at 10.1.1.1 differentiate 239 the two connections? To which entity at 10.1.1.2 does each 240 connection correspond? By specifying the source port prior to 241 connecting, the entities at 10.1.1.2 can avoid this ambiguity, 242 because now the endpoint at 10.1.1.1 can simply inspect the port 243 number from which the connection originated to determine which 244 entity has initiated the connection. 246 Caution must be exercised when designing systems that rely on this 247 feature, as not all environments are able to determine the source 248 port prior to initiating the connection. 250 4 Examples 252 What follows are a number of examples that show the most common 253 usage of the direction attribute combined with TCP-based media 254 descriptions. For the purpose of brevity, the main portion of the 255 session description is omitted in the examples and is assumed to be 256 the following: 258 Yon INTERNET-DRAFT - Expires March 2001 5 259 v=0 260 o=Me 261 s=Call me using TCP 262 t=0 0 264 4.1 Example: simple passive/active 266 An endpoint at 10.1.1.2 signals the availability of an audio session 267 at port 54111: 269 c=IN IP4 10.1.1.2/127 270 m=audio 54111 RTP/AVP-TCP 0 271 a=direction:passive 273 An endpoint at 10.1.1.1 receiving this description responds with the 274 following: 276 c=IN IP4 10.1.1.1/127 277 m=audio 9 RTP/AVP-TCP 0 278 a=direction:active 280 The endpoint at 10.1.1.1 then initiates the TCP connection to port 281 54111 at 10.1.1.2. Note that the TCP connection may originate from 282 any port. The endpoint at 10.1.1.1 could have optionally committed 283 to a source port with a simple modification: 285 c=IN IP4 10.1.1.1/127 286 m=audio 9 RTP/AVP-TCP 0 287 a=direction:active 1892 289 By adding the "1892" to the a= line, the endpoint at 10.1.1.1 must 290 now use a source port of 1892 when initiating the TCP connection to 291 port 54111 at 10.1.1.2. 293 4.2 Example: agnostic both 295 An endpoint at 10.1.1.2 signals the availability of an audio session 296 at TCP port 54111, but is also willing to set up the media stream by 297 initiating the TCP connection: 299 c=IN IP4 10.1.1.2/127 300 m=audio 54111 RTP/AVP-TCP 0 301 a=direction:both 303 The endpoint at 10.1.1.1 has three choices: 305 1) It can respond with either of the two direction:active 306 descriptions listed in the previous example. In this case the 307 endpoint at 10.1.1.1 must initiate a connection to port 54111 308 at 10.1.1.2. 310 2) It can respond with a description similar to the following: 312 Yon INTERNET-DRAFT - Expires March 2001 6 313 c=IN IP4 10.1.1.1/127 314 m=audio 54321 RTP/AVP-TCP 0 315 a=direction:passive 317 In this case the endpoint at 10.1.1.2 must initiate a 318 connection to port 54321 at 10.1.1.1. 320 3) It can respond with a description that specifies 321 direction:both, which is covered in the next example. 323 4.3 Example: redundant both 325 An endpoint at 10.1.1.2 uses the same description as the previous 326 example: 328 c=IN IP4 10.1.1.2/127 329 m=audio 54111 RTP/AVP-TCP 0 330 a=direction:both 332 Unlike the previous example, the endpoint at 10.1.1.1 responds with 333 the following description: 335 c=IN IP4 10.1.1.1/127 336 m=audio 54321 RTP/AVP-TCP 0 337 a=direction:both 339 This will cause the endpoint at 10.1.1.2 to initiate a connection to 340 port 54321 at 10.1.1.1, and the endpoint at 10.1.1.1 to initiate a 341 connection to port 54111 at 10.1.1.2. Whichever TCP connection 342 succeeds will be used. If both succeed, one of the connections may 343 be closed as an optimization, using the rules in section 2.3. 345 5 Security Considerations 347 See [SDP] for security and other considerations specific to the 348 Session Description Protocol in general. There are no new security 349 considerations introduced by these protocol identifiers and 350 attributes. 352 6 IANA Considerations 354 As recommended by [SDP] Appendix B, the direction attribute 355 described in this document should be registered with IANA, as should 356 the TCP and RTP/AVP-TCP protocol identifiers. 358 Acknowledgements 360 The author would like to thank Jonathan Rosenberg, Anders 361 Kristensen, and Robert Fairlie-Cuninghame for their valuable 362 insights. 364 Yon INTERNET-DRAFT - Expires March 2001 7 365 Appendix A: Direction Attribute Syntax 367 This appendix provides an Augmented BNF [ABNF] grammar for 368 expressing the direction attribute for TCP connection setup. It is 369 intended as an extension to the grammar for the Session Description 370 Protocol, as defined in [SDP]. Specifically, it describes the 371 syntax for the new "connection-setup" attribute field, which MAY be 372 either a session-level or media-level attribute. 374 connection-setup = "direction" ":" direction-spec 376 direction-spec = "passive" | qualified-direction 378 qualified-direction = direction-ident | direction-ident port 380 direction-ident = "both" | "active" 382 References 384 [ABNF] D. Crocker, P. Overell, "Augmented BNF for Syntax 385 Specifications: ABNF," RFC 2234, November 1997 387 [SDP] M. Handley, V. Jacobson, "SDP: Session Description 388 Protocol," RFC 2327, April 1998 390 [UTF-8] F. Yergeau, "UTF-8, a transformation format of Unicode 391 and ISO 10646," RFC 2044, October 1996 393 Author's Address 395 David Yon 396 Dialout.Net, Inc. 397 402 Amherst St 398 Nashua, NH 03063 400 Phone: (603) 577-8708 401 EMail: yon@dialout.net 403 Full Copyright Statement 405 Copyright (C) The Internet Society (2000). All Rights Reserved. 407 This document and translations of it may be copied and furnished to 408 others, and derivative works that comment on or otherwise explain it 409 or assist in its implementation may be prepared, copied, published 410 and distributed, in whole or in part, without restriction of any 411 kind, provided that the above copyright notice and this paragraph 412 are included on all such copies and derivative works. However, this 413 document itself may not be modified in any way, such as by removing 414 the copyright notice or references to the Internet Society or other 415 Internet organizations, except as needed for the purpose of 416 developing Internet standards in which case the procedures for 417 copyrights defined in the Internet Standards process must be 419 Yon INTERNET-DRAFT - Expires March 2001 8 420 followed, or as required to translate it into languages other than 421 English. 423 The limited permissions granted above are perpetual and will not be 424 revoked by the Internet Society or its successors or assigns. 426 This document and the information contained herein is provided on an 427 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 428 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 429 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 430 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 431 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE." 433 Yon INTERNET-DRAFT - Expires March 2001 9