idnits 2.17.1 draft-ietf-mmusic-sdp-comedia-02.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: ---------------------------------------------------------------------------- == There are 2 instances of lines with non-ascii characters in the document. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 13 longer pages, the longest (page 2) being 59 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Authors' Addresses Section. ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. == There are 5 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == 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 84: '... specifies "TCP" MUST further qualify ...' RFC 2119 keyword, line 95: '...at specifies TLS MUST further qualify ...' RFC 2119 keyword, line 125: '...e port number is RECOMMENDED but may b...' RFC 2119 keyword, line 131: '...oint. The endpoint MUST NOT specify a...' RFC 2119 keyword, line 139: '...pposite endpoint MUST NOT attempt to i...' (46 more instances...) 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 (April 2002) is 8048 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) -- Looks like a reference, but probably isn't: '7' on line 72 == Unused Reference: 'T38' is defined on line 660, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2234 (ref. 'ABNF') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 2327 (ref. 'SDP') (Obsoleted by RFC 4566) -- Possible downref: Non-RFC (?) normative reference: ref. 'T38' ** Obsolete normative reference: RFC 2246 (ref. 'TLS') (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 2044 (ref. 'UTF-8') (Obsoleted by RFC 2279) Summary: 8 errors (**), 0 flaws (~~), 8 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 INTERNET-DRAFT D. Yon 2 Document: draft-ietf-mmusic-sdp-comedia-02.txt Dialout.Net 3 Expires October 2002 April 2002 5 Connection-Oriented Media Transport in SDP 6 8 Status of this Memo 10 This document is an Internet-Draft and is in full conformance with 11 all provisions of Section 10 of RFC2026. 13 Internet-Drafts are working documents of the Internet Engineering 14 Task Force (IETF), its areas, and its working groups. Note that 15 other groups may also distribute working documents as Internet- 16 Drafts. 18 Internet-Drafts are draft documents valid for a maximum of six 19 months and may be updated, replaced, or obsoleted by other documents 20 at any time. It is inappropriate to use Internet-Drafts as reference 21 material or to cite them other than as "work in progress." 23 The list of current Internet-Drafts can be accessed at: 24 http://www.ietf.org/ietf/1id-abstracts.txt 26 The list of Internet-Draft Shadow Directories can be accessed at: 27 http://www.ietf.org/shadow.html. 29 Copyright (C) The Internet Society (2002). All Rights Reserved. 31 Abstract 33 This document describes how to express media transport over 34 connection-oriented protocols using the Session Description Protocol 35 (SDP). It defines two new protocol identifiers: TCP and TLS. It 36 also defines the syntax and semantics for an SDP "direction" 37 attribute that describes the connection setup procedure. 39 Yon 1 40 1 Introduction 42 The Session Description Protocol [SDP] provides a general-purpose 43 format for describing multimedia sessions in announcements or 44 invitations. SDP uses an entirely textual data format (the US-ASCII 45 subset of [UTF-8]) to maximize portability among transports. SDP 46 does not define a protocol, but only the syntax to describe a 47 multimedia session with sufficient information to discover and 48 participate in that session. Session descriptions may be sent using 49 any number of existing application protocols for transport (e.g., 50 SAP, SIP, RTSP, email, HTTP, etc.). 52 [SDP] describes two protocol identifiers: RTP/AVP and UDP, both of 53 which are unreliable, connectionless protocols, an appropriate 54 choice for multimedia streams. There are, however, applications for 55 which the connection-oriented transports such as TCP are more 56 appropriate, but [SDP] provides no way to describe a session that 57 uses protocols other than RTP or UDP. 59 Connection-oriented protocols introduce a new factor when describing 60 a session: not only must it be possible to express that a protocol 61 will be based on this protocol, but it must also describe the 62 connection setup procedure. This memo defines two new protocol 63 identifiers, TCP and TLS, along with the syntax and semantics of the 64 a=direction attribute. 66 Terminology 68 In this document, the key words "MUST", "MUST NOT", "REQUIRED", 69 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 70 and "OPTIONAL" are to be interpreted as described in RFC 2119 [7] 71 and indicate requirement levels for compliant implementations. 73 2 Protocol Identifiers 75 The m= line in [SDP] is where an endpoint specifies the protocol 76 used for the media in the session. See the "Media Announcements" 77 section of [SDP] for a discussion on protocol identifiers. 79 2.1 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.2 TLS 89 The TLS protocol identifier specifies that the session will use the 90 Transport Layer Security protocol [TLS] with an implied transport 91 protocol of TCP. To describe a media session that uses TLS over 92 TCP, the protocol identifier "TLS" must be specified in the m= line. 94 Yon INTERNET-DRAFT - Expires October 2002 2 95 An m= line that specifies TLS MUST further qualify the protocol 96 using a fmt identifier. 98 3 Direction Attribute 100 An important attribute of connection-oriented protocols is the setup 101 procedure. One endpoint needs to initiate the connection and the 102 other endpoint needs to accept the connection. The direction 103 attribute is used to describe these roles, and the syntax is as 104 follows: 106 a=direction: [] 108 The is one of the following: 110 passive: The endpoint will accept an incoming connection. 112 active: The endpoint will initiate an outgoing connection. 114 both: The endpoint will both accept an incoming connection 115 and will initiate an outgoing connection. 117 The is a sequence of values that describe the 118 address and port number from where the connection will originate, 119 and consists of the following values: 121 nettype addrtype unicast-address [port] 123 The is an optional value that may be specified with 124 direction:active or direction:both. Within the , 125 the source port number is RECOMMENDED but may be omitted. 127 3.1 Semantics of direction:passive 129 By specifying direction:passive, the endpoint indicates that the 130 port number specified in the m= line is available to accept a 131 connection from the other endpoint. The endpoint MUST NOT specify a 132 after direction:passive. 134 3.2 Semantics of direction:active 136 By specifying direction:active, the endpoint indicates that it will 137 initiate a connection to the port number on the m= line of the other 138 endpoint. The port number on its own m= line is irrelevant, and the 139 opposite endpoint MUST NOT attempt to initiate a connection to the 140 port number specified there. Nevertheless, since the m= line must 141 contain a valid port number, the endpoint specifying 142 direction:active SHOULD specify a port number of 9 (the discard 143 port) on its m= line. The endpoint MUST NOT specify a port number 144 of zero, as that carries other semantics in [SDP]. 146 The endpoint SHOULD specify the address and port number from which 147 it will initiate the connection in the position on 149 Yon INTERNET-DRAFT - Expires October 2002 3 150 the a=direction line. The following SDP fragment shows an example 151 of direction:active: 153 c=IN IP4 10.1.1.1 154 m=image 9 TCP t38 155 a=direction:active IN IP4 10.1.1.1 1892 157 3.3 Semantics of direction:both 159 By specifying direction:both, the endpoint indicates that it will 160 both accept a TCP connection on the port number of its own m= line, 161 and that it will also initiate a connection to the port number on 162 the m= line of the other endpoint. 164 As with direction:active, the endpoint SHOULD specify the address 165 and port number from which it will initiate the connection in the 166 position on the a=direction line. 168 Since this attribute describes behavior that is similar to 169 connectionless media descriptions in [SDP], it is the default value 170 for the direction attribute and is therefore optional. 172 Endpoints may choose to specify direction:both for one or more of 173 the following reasons: 175 1) The endpoint has no preference as to whether it accepts or 176 initiates the connection, and therefore is offering the remote 177 endpoint a choice of connection setup procedures. 179 2) The endpoints intend to use a single connection to transport 180 the media, but it is not known whether firewall issues will 181 prevent either endpoint from initiating or accepting the 182 connection. Therefore both endpoints will attempt to initiate 183 a connection in hopes that at least one will succeed. 185 If one endpoint specifies either direction:active or 186 direction:passive and the other specifies direction:both, both 187 endpoints MUST behave as if the latter had specified the inverse 188 direction of the former. For example, specifying direction:both 189 when the other endpoint specifies direction:active SHALL cause both 190 endpoints to behave as if the former had specified 191 direction:passive. Conversely, specifying direction:both when the 192 other endpoint specifies direction:passive SHALL cause both 193 endpoints to behave as if the former had specified direction:active. 195 If both endpoints specify direction:both then each endpoint MUST 196 initiate a connection to the port number specified on the m= line of 197 the opposite endpoint. There is one exception to this requirement: 198 if an endpoint receives the incoming connection from the opposite 199 endpoint prior to initiating its own outbound connection, then that 200 endpoint MAY use that connection rather than attempt to make an 201 outbound connection to the opposite endpoint. 203 Yon INTERNET-DRAFT - Expires October 2002 4 204 If only one connection succeeds, then that connection will be used 205 to carry the media. Once it has transmitted data on this 206 connection, the initiating endpoint MUST NOT perform another 207 connection attempt to the accepting endpoint. This allows the 208 accepting endpoint to release or recycle the listening port for 209 another session once it has received data from the initiating 210 endpoint. 212 If both connections succeed, the following rules SHALL apply: 214 a) Each endpoint MUST accept data from either connection. 216 b) Once an endpoint has transmitted data to one of the connections, 217 it MUST use that connection exclusively for transmission. 219 c) Once an endpoint has transmitted AND received data, if one of the 220 connections is determined to be idle, the endpoint SHOULD close 221 the idle connection. 223 3.4 Optimizing direction:both 225 As discussed in the previous section, there is the possibility that 226 two connections will be created when only one is needed. While 227 rules in the previous section accommodate the closing of an idle 228 connection, they do not prevent a race condition where the endpoints 229 simultaneously start sending data on opposite connections thereby 230 causing two connections to be used where one would have sufficed. 231 While it is not possible to entirely eliminate this race condition, 232 it is in the endpoints� interest to minimize its occurrence. 233 Therefore, when a session is negotiated through interactive exchange 234 of SDP between endpoints (as in the case of SIP) AND the result of 235 the negotiation is that each endpoint specifies direction:both, it 236 is RECOMMENDED that the endpoints use the following guidelines: 238 a) There comes a point during the exchange of SDP where one endpoint 239 is prepared to send the final message that will complete the 240 negotiation and allow the session to begin. For the purposes of 241 this discussion, the endpoint that will send this final message 242 will be called the Initiator, and the endpoint that will receive 243 this message will be called the Acceptor. 245 b) The Initiator, upon receiving sufficient information to initiate a 246 connection, MUST attempt to connect to the Acceptor as soon as 247 possible. 249 c) In order to lower the likelihood that the Acceptor will also 250 attempt to initiate a connection, the Initiator SHOULD incorporate 251 a short delay between initiating the connection and sending the 252 final SDP to the Acceptor. 254 d) The delay time chosen by the Initiator MUST NOT introduce an 255 unacceptable session setup delay should the connection to the 256 Acceptor not succeed. 258 Yon INTERNET-DRAFT - Expires October 2002 5 259 3.5 Bidirectional versus Unidirectional Media 261 In traditional SDP transport types the flow is unidirectional. If 262 the intent is for media to flow in both directions, both endpoints 263 must specify SDP that describes where to deliver the media and what 264 media type(s) to use. For example, if only Endpoint A presents SDP 265 then media can only flow towards Endpoint A, as Endpoint B has not 266 specified where and how to send media to it. 268 Because most connection-oriented media is inherently bi-directional, 269 endpoints may encounter a situation where only one side presented 270 SDP yet there is now a network path that can carry media in either 271 direction. In keeping with traditional SDP semantics, an endpoint 272 MUST NOT send data to the other endpoint unless it has specified SDP 273 information describing the type of media it can accept. 275 It is, however, perfectly acceptable for an endpoint to transmit 276 data on the same connection it is using to receive data, so long as 277 the other endpoint has advertised its willingness to accept data. 278 Likewise, it is perfectly acceptable for an endpoint to receive data 279 on the same connection it is using to transmit data to the 280 corresponding remote endpoint. In other words, for a bi-directional 281 application-level session, a connection may be used to send data in 282 both directions (contingent to rules outlined in Section 2.3) as 283 long as one side of the connection is attached to either of the 284 advertised SDP transport addresses. 286 3.6 Treating UDP and RTP/AVP like Connection Oriented Media 288 Endpoints MAY specify a direction attribute for UDP or RTP/AVP 289 media. This indicates that the endpoint would like to treat this 290 media as a type of connection oriented media. (The endpoint may do 291 this to facilitate NAT traversal for example.) Note that for 292 backwards compatibility, an endpoint which can specify 293 direction:active MUST include valid addresses and ports in the SDP 294 as always. If the peer's SDP does not include a direction 295 attribute, it knows that the peer does not support connection- 296 oriented media, and media exchange will proceed normally, as if 297 connection-oriented media were not offered. 299 Endpoints that specify direction:passive MUST NOT send any media, 300 any packets whatsoever (including control packets such as RTCP), 301 from their passive ports until they receive a packet on these ports 302 and record the source address and port of the sender. The passive 303 endpoint then assumes that the first packet received corresponds to 304 its active peer. From this point onward, passive endpoints MUST 305 send UDP or RTP media from the same port as the port indicated in 306 the m= line. Passive endpoints MUST send RTCP media (if any) from 307 the port on which they expect to receive it (typically the RTP port 308 number plus 1). 310 Endpoints that specify direction:active MUST be prepared to receive 311 on the ports from which they send. Once they learn the IP address 313 Yon INTERNET-DRAFT - Expires October 2002 6 314 and port of their peer from the peer's SDP, they SHOULD immediately 315 send some kind of media (even if just comfort noise) to each of 316 these ports. This is so the peer can learn their IP address and 317 port, in order to send media back without additional delay. 318 Effectively, the exchange of the first media packet completes a bi- 319 directional handshake between the active and passive peer. 321 4 Source-Address Considerations 323 In the cases where the endpoint is initiating the connection, it is 324 RECOMMENDED that a source address be specified on the a=direction 325 line by that endpoint. It is also RECOMMENDED that the source port 326 be included in the source address. In most environments, the source 327 port number can be determined by binding the socket before 328 initiating the connect, as shown in the sample C code below: 330 { 331 SOCKET s_id 332 SOCKADDR_IN cli_sin; 333 int namelen; 335 // Create the socket 336 s_id = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); 338 // Bind the socket to any IP address and port 339 bzero((char *)&cli_sin,sizeof(cli_sin)); 340 cli_sin.sin_family = AF_INET; 341 cli_sin.sin_addr.s_addr = htonl(INADDR_ANY); 342 cli_sin.sin_port = 0; 343 bind(s_id,(SOCKADDR *)&cli_sin,sizeof(cli_sin)); 345 // Find the port number that was bound 346 namelen = sizeof(cli_sin); 347 getsockname(s_id,(SOCKADDR *)&cli_sin,&namelen); 349 // Print the port number 350 printf("Source Port = %d\n",ntohs(cli_sin.sin_port)); 351 } 353 If the source address is omitted, the receiver of the SDP packet 354 MUST NOT make any assumptions in regards to the address or port from 355 where the connection will originate. In particular, the receiver 356 MUST NOT assume that the address information listed on the c= line 357 has any implication as to where the media connection originates. 359 NOTE: 360 The motivation for specifying the source address is 361 twofold. First, it aids Application-Level Proxies 362 (ALP) by explicitly announcing the source of the 363 outbound connection. This allows, for example, a 364 dynamic firewall pinhole to be created that will allow 365 the connection to pass. Or as another example, an ALP 366 integrated with a Network Address Translation (NAT) 368 Yon INTERNET-DRAFT - Expires October 2002 7 369 gateway could create a dynamic address/port binding 370 and rewrite the SDP accordingly. 372 Second, it allows the passive endpoint to correlate 373 the incoming connection with the session being 374 negotiated. Note that great care must be taken when 375 using the source address as a means to identify 376 incoming connections, as NAT can render the source 377 address unreliable. In addition if the originating 378 endpoint omits the source port, the source address can 379 be ambiguous if multiple, logical endpoints share the 380 same network address. Therefore it is NOT RECOMMENDED 381 that the source address be used for this purpose 382 unless the SDP occurs in the context of a controlled 383 network topology that guarantees that the source 384 address is both correct (i.e., no NAT, or a NAT with 385 an Application-Level Proxy that rewrites the SDP) and 386 unambiguous (i.e., the source port is specified). 388 4.1 Source Address Timing Considerations 390 When used in conjunction with a session signaling protocol such as 391 SIP, there may be cases where an endpoint initiates a connection 392 prior to the opposite endpoint receiving the SDP that describe the 393 source address of the initiating endpoint. Therefore, an endpoint 394 that has advertised an address and port number with direction:both 395 or direction:passive MUST be ready to accept a connection on that 396 address and port immediately. If the accepting endpoint requires 397 the source address to identify the initiating endpoint, it MUST keep 398 the connection active and allow sufficient time for the source 399 address to arrive before discarding the connection. 401 5 Connection and Listener Lifetime Considerations 403 5.1 Listener Lifetime 405 An endpoint that has specified direction:both or direction:passive 406 MUST be ready to accept a connection on the appropriate address and 407 port during the time slot(s) advertised for that session. The 408 endpoint MUST keep the address and port available for incoming 409 connections until either: 411 a) The time window for the session has expired, or 413 b) The endpoint has received the expected number of incoming 414 connections on that address and port, or 416 c) Subsequent exchanges have superceded the SDP that originally 417 advertised the availability of the address and port. 419 Once the endpoint has determined that a listener is no longer needed 420 on a specific address and port, it SHOULD terminate the listener. 421 The endpoint is then free to re-use the address and port for 422 subsequent session advertisements. 424 Yon INTERNET-DRAFT - Expires October 2002 8 425 5.2 Connection Lifetime 427 An endpoint that intends to initiate the connection MUST initiate 428 the connection immediately after it has sufficient information to do 429 so, even if it does not intend to immediately begin sending media to 430 the remote endpoint. This allows media to flow from the remote 431 endpoint. 433 An endpoint MUST NOT close the connection until the session has 434 expired, been explicitly terminated, or the media stream is 435 redirected to a different address or port. 437 If the endpoint determines that the connection has been closed, it 438 MAY attempt to re-establish the connection. The decision to do so 439 is application and/or context dependant. If the endpoint opts to 440 re-establish the connection, it MUST NOT assume that the original 441 address and port advertised by the remote endpoint is still valid. 442 Instead, the endpoint MUST renegotiate the session parameters by 443 exchanging new SDP. 445 5.3 Session Renegotiation and Connection Lifetime 447 There are scenarios where SDP is sent by an endpoint in order to 448 renegotiate an existing session. These include muting/unmuting a 449 session, renegotiating the attributes of the media used by the 450 session, or extending the length of a session about to expire. 451 Connection-oriented media introduces some ambiguities into session 452 renegotiation as to when the direction attribute must be obeyed and 453 when it is ignored. 455 The scenario of extending the duration of an existing session is a 456 good example: in order to extend an existing session, endpoints will 457 typically resend the original SDP with updated time information. In 458 connectionless media the result is no change to the existing media 459 streams. The problem with connection oriented media is that the 460 original SDP will contain a direction attribute which can be 461 construed as a request to create a new connection, as opposed to a 462 request to maintain steady state. To avoid this ambiguity, the 463 following rule SHALL apply to subsequent exchanges of SDP: 465 If the transport section combined with the direction 466 attribute of an SDP message describes an existing 467 connection between two endpoints, then the endpoints 468 MUST use that connection to carry the media described 469 in the remainder of the message. The endpoints MUST 470 NOT attempt to set up a new connection, regardless of 471 what is specified in the direction attribute. 473 This disambiguates most session renegotiation scenarios, with the 474 exception of muting. Muting a media stream is accomplished by 475 sending the original session SDP but with the port number set to 476 zero. This is still valid for connection oriented media, with the 478 Yon INTERNET-DRAFT - Expires October 2002 9 479 additional caveat that the endpoints MUST NOT close the connection 480 described by that SDP. 482 6 Examples 484 What follows are a number of examples that show the most common 485 usage of the direction attribute combined with TCP-based media 486 descriptions. For the purpose of brevity, the main portion of the 487 session description is omitted in the examples and is assumed to be 488 the following: 490 v=0 491 o=me 2890844526 2890842807 IN IP4 10.1.1.2 492 s=Call me using TCP 493 t=3034423619 3042462419 495 6.1 Example: simple passive/active 497 An endpoint at 10.1.1.2 signals the availability of a T.38 fax 498 session at port 54111: 500 c=IN IP4 10.1.1.2 501 m=image 54111 TCP t38 502 a=direction:passive 504 An endpoint at 10.1.1.1 receiving this description responds with the 505 following: 507 c=IN IP4 10.1.1.1 508 m=image 9 TCP t38 509 a=direction:active 511 The endpoint at 10.1.1.1 then initiates the TCP connection to port 512 54111 at 10.1.1.2. Note that the TCP connection may originate from 513 any address or port. The endpoint at 10.1.1.1 could have optionally 514 committed to a source address with a simple modification: 516 c=IN IP4 10.1.1.1 517 m=image 9 TCP t38 518 a=direction:active IN IP4 10.1.1.1 1892 520 By adding the source address to the a=direction line, the endpoint 521 at 10.1.1.1 must now use a source port of 1892 when initiating the 522 TCP connection to port 54111 at 10.1.1.2. 524 6.2 Example: agnostic both 526 An endpoint at 10.1.1.2 signals the availability of a T.38 fax 527 session at TCP port 54111, but is also willing to set up the media 528 stream by initiating the TCP connection: 530 c=IN IP4 10.1.1.2 531 m=image 54111 TCP t38 532 a=direction:both 534 Yon INTERNET-DRAFT - Expires October 2002 10 535 The endpoint at 10.1.1.1 has three choices: 537 1) It can respond with either of the two direction:active 538 descriptions listed in the previous example. In this case the 539 endpoint at 10.1.1.1 must initiate a connection to port 54111 540 at 10.1.1.2. 542 2) It can respond with a description similar to the following: 544 c=IN IP4 10.1.1.1 545 m=image 54321 TCP t38 546 a=direction:passive 548 In this case the endpoint at 10.1.1.2 must initiate a 549 connection to port 54321 at 10.1.1.1. 551 3) It can respond with a description that specifies 552 direction:both, which is covered in the next example. 554 6.3 Example: redundant both 556 An endpoint at 10.1.1.2 uses the same description as the previous 557 example: 559 c=IN IP4 10.1.1.2 560 m=image 54111 TCP t38 561 a=direction:both 563 Unlike the previous example, the endpoint at 10.1.1.1 responds with 564 the following description: 566 c=IN IP4 10.1.1.1 567 m=image 54321 TCP t38 568 a=direction:both 570 This will cause the endpoint at 10.1.1.2 to initiate a connection to 571 port 54321 at 10.1.1.1, and the endpoint at 10.1.1.1 to initiate a 572 connection to port 54111 at 10.1.1.2. Whichever TCP connection 573 succeeds will be used. If both succeed, one of the connections may 574 be closed as an optimization, using the rules in section 2.3. 576 6.4 Example: "Bidirectional" RTP and RTCP 578 An endpoint at 10.1.1.2 is behind a NAT and does not know its own 579 public address. 581 c=IN IP4 10.1.1.2 582 m=audio 9 RTP/AVP 0 583 a=direction:active 585 A peer with a public IP address responds as follows and waits to 586 receive RTP and RTCP packets from its active peer. 588 Yon INTERNET-DRAFT - Expires October 2002 11 589 c=IN IP4 1.2.3.4 590 m=audio 18240 RTP/AVP 0 591 a=direction:passive 593 The endpoint at 10.1.1.2 immediately sends RTP from port 9012 to 594 1.2.3.4 port 18240. A NAT translates the source address to 5.6.7.8 595 port 1542. The passive endpoint receives this RTP packet and stores 596 this source address. When the passive endpoint wants to send RTP 597 media it sends it back to 5.6.7.8 port 1542. The NAT translates this 598 destination address back to 10.1.1.2 port 9012 and delivers it to 599 the active endpoint. 601 Likewise the endpoint at 10.1.1.2 immediately sends RTCP from port 602 9013 to 1.2.3.4:18241. The NAT translates this to 5.6.7.8:1984. The 603 passive endpoint receives the RTCP packet and stores the source 604 address. The passive endpoint sends its RTCP to 5.6.7.8:1984 which 605 is translated back to 10.1.1.2:9013 and delivered to the active 606 endpoint. 608 7 Security Considerations 610 See [SDP] for security and other considerations specific to the 611 Session Description Protocol in general. 613 A possible security concern arises if a firewall were to monitor and 614 act on the source address as described in the note in Section 4. 615 Firewall implementers must take care to ensure that the SDP came 616 from a trusted source before deciding whether to change the network 617 traffic restrictions currently imposed by the firewall. 619 8 IANA Considerations 621 As recommended by [SDP] Appendix B, the direction attribute 622 described in this document should be registered with IANA, as should 623 the "TCP" and "TLS" protocol identifiers. 625 Acknowledgements 627 The author would like to thank Jonathan Rosenberg, Rohan Mahy, 628 Anders Kristensen, Paul Kyzivat, and Robert Fairlie-Cuninghame for 629 their valuable insights and contributions. 631 Yon INTERNET-DRAFT - Expires October 2002 12 632 Appendix A: Direction Attribute Syntax 634 This appendix provides an Augmented BNF [ABNF] grammar for 635 expressing the direction attribute for connection setup. It is 636 intended as an extension to the grammar for the Session Description 637 Protocol, as defined in [SDP]. Specifically, it describes the 638 syntax for the new "connection-setup" attribute field, which MAY be 639 either a session-level or media-level attribute. 641 connection-setup = "direction" ":" direction-spec 643 direction-spec = "passive" | qualified-direction 645 qualified-direction = direction-ident | direction-ident source 647 direction-ident = "both" | "active" | "passive" 649 source = nettype addrtype unicast-address | 650 nettype addrtype unicast-address port 652 References 654 [ABNF] D. Crocker, P. Overell, "Augmented BNF for Syntax 655 Specifications: ABNF," RFC 2234, November 1997 657 [SDP] M. Handley, V. Jacobson, "SDP: Session Description 658 Protocol," RFC 2327, April 1998 660 [T38] International Telecommunication Union, "Procedures for 661 Real-Time Group 3 Facsimile Communications over IP 662 Networks," Recommendation T.38, June 1998 664 [TLS] T. Dierks, C. Allen, "The TLS Protocol," RFC 2246, 665 January 1999 667 [UTF-8] F. Yergeau, "UTF-8, a transformation format of Unicode 668 and ISO 10646," RFC 2044, October 1996 670 Author�s Address 672 David Yon 673 Dialout.Net, Inc. 674 One Indian Head Plaza 675 Nashua, NH 03060 677 Phone: (603) 324-4100 678 EMail: yon@dialout.net 680 Full Copyright Statement 682 Copyright (C) The Internet Society (2001). All Rights Reserved. 684 Yon INTERNET-DRAFT - Expires October 2002 13 685 This document and translations of it may be copied and furnished to 686 others, and derivative works that comment on or otherwise explain it 687 or assist in its implementation may be prepared, copied, published 688 and distributed, in whole or in part, without restriction of any 689 kind, provided that the above copyright notice and this paragraph 690 are included on all such copies and derivative works. However, this 691 document itself may not be modified in any way, such as by removing 692 the copyright notice or references to the Internet Society or other 693 Internet organizations, except as needed for the purpose of 694 developing Internet standards in which case the procedures for 695 copyrights defined in the Internet Standards process must be 696 followed, or as required to translate it into languages other than 697 English. 699 The limited permissions granted above are perpetual and will not be 700 revoked by the Internet Society or its successors or assigns. 702 This document and the information contained herein is provided on an 703 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 704 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 705 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 706 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 707 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE." 709 Yon INTERNET-DRAFT - Expires October 2002 14