1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445
|
<pre>Network Working Group C. Huitema
Request for Comments: 3605 Microsoft
Category: Standards Track October 2003
<span class="h1">Real Time Control Protocol (RTCP) attribute in</span>
<span class="h1">Session Description Protocol (SDP)</span>
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2003). All Rights Reserved.
Abstract
The Session Description Protocol (SDP) is used to describe the
parameters of media streams used in multimedia sessions. When a
session requires multiple ports, SDP assumes that these ports have
consecutive numbers. However, when the session crosses a network
address translation device that also uses port mapping, the ordering
of ports can be destroyed by the translation. To handle this, we
propose an extension attribute to SDP.
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The session invitation protocol (SIP, [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>]) is often used to
establish multi-media sessions on the Internet. There are often
cases today in which one or both ends of the connection are hidden
behind a network address translation device [<a href="./rfc2766" title=""Network Address Translation - Protocol Translation (NAT-PT)"">RFC2766</a>]. In this case,
the SDP text must document the IP addresses and UDP ports as they
appear on the "public Internet" side of the NAT. In this memo, we
will suppose that the host located behind a NAT has a way to obtain
these numbers. A possible way to learn these numbers is briefly
outlined in <a href="#section-3">section 3</a>, however, just learning the numbers is not
enough.
The SIP messages use the encoding defined in SDP [<a href="./rfc2327" title=""SDP: Session Description Protocol"">RFC2327</a>] to
describe the IP addresses and TCP or UDP ports used by the various
media. Audio and video are typically sent using RTP [<a href="./rfc3550" title=""RTP: A Transport Protocol for Real-Time Applications"">RFC3550</a>], which
requires two UDP ports, one for the media and one for the control
protocol (RTCP). SDP carries only one port number per media, and
<span class="grey">Huitema Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc3605">RFC 3605</a> RTCP attribute in SDP October 2003</span>
states that "other ports used by the media application (such as the
RTCP port) should be derived algorithmically from the base media
port." RTCP port numbers were necessarily derived from the base
media port in older versions of RTP (such as [<a href="./rfc1889" title=""RTP: A Transport Protocol for Real-Time Applications"">RFC1889</a>]), but now that
this restriction has been lifted, there is a need to specify RTCP
ports explicitly in SDP. Note, however, that implementations of RTP
adhering to the earlier [<a href="./rfc1889" title=""RTP: A Transport Protocol for Real-Time Applications"">RFC1889</a>] specification may not be able to
make use of the SDP attributes specified in this document.
When the NAT device performs port mapping, there is no guarantee that
the mappings of two separate ports reflects the sequencing and the
parity of the original port numbers; in fact, when the NAT manages a
pool of IP addresses, it is even possible that the RTP and the RTCP
ports may be mapped to different addresses. In order to successfully
establish connections despite the misordering of the port numbers and
the possible parity switches caused by the NAT, we propose to use a
specific SDP attribute to document the RTCP port and optionally the
RTCP address.
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 [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Description of the Solution</span>
The main part of our solution is the declaration of an SDP attribute
for documenting the port used by RTCP.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. The RTCP Attribute</span>
The RTCP attribute is used to document the RTCP port used for media
stream, when that port is not the next higher (odd) port number
following the RTP port described in the media line. The RTCP
attribute is a "value" attribute, and follows the general syntax
specified page 18 of [<a href="./rfc2327" title=""SDP: Session Description Protocol"">RFC2327</a>]: "a=<attribute>:<value>". For the
RTCP attribute:
* the name is the ascii string "rtcp" (lower case),
* the value is the RTCP port number and optional address.
The formal description of the attribute is defined by the following
ABNF [<a href="./rfc2234" title=""Augmented BNF for Syntax Specifications: ABNF"">RFC2234</a>] syntax:
rtcp-attribute = "a=rtcp:" port [nettype space addrtype space
connection-address] CRLF
<span class="grey">Huitema Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc3605">RFC 3605</a> RTCP attribute in SDP October 2003</span>
In this description, the "port", "nettype", "addrtype" and
"connection-address" tokens are defined as specified in "Appendix A:
SDP Grammar" of [<a href="./rfc2327" title=""SDP: Session Description Protocol"">RFC2327</a>].
Example encodings could be:
m=audio 49170 RTP/AVP 0
a=rtcp:53020
m=audio 49170 RTP/AVP 0
a=rtcp:53020 IN IP4 126.16.64.4
m=audio 49170 RTP/AVP 0
a=rtcp:53020 IN IP6 2001:2345:6789:ABCD:EF01:2345:6789:ABCD
The RTCP attribute MAY be used as a media level attribute; it MUST
NOT be used as a session level attribute. Though the examples below
relate to a method that will return only unicast addresses, both
unicast and multicast values are valid.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Discussion of the Solution</span>
The implementation of the solution is fairly straightforward. The
questions that have been most often asked regarding this solution are
whether this is useful, i.e., whether a host can actually discover
port numbers in an unmodified NAT, whether it is sufficient, i.e.,
whether or not there is a need to document more than one ancillary
port per media type, and whether why should not change the media
definition instead of adding a new attribute.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. How do we Discover Port Numbers?</span>
The proposed solution is only useful if the host can discover the
"translated port numbers", i.e., the value of the ports as they
appear on the "external side" of the NAT. One possibility is to ask
the cooperation of a well connected third party that will act as a
server according to STUN [<a href="./rfc3489" title=""STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs)"">RFC3489</a>]. We thus obtain a four step
process:
1 - The host allocates two UDP ports numbers for an RTP/RTCP pair,
2 - The host sends a UDP message from each port to the STUN server,
3 - The STUN server reads the source address and port of the packet,
and copies them in the text of a reply,
<span class="grey">Huitema Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc3605">RFC 3605</a> RTCP attribute in SDP October 2003</span>
4 - The host parses the reply according to the STUN protocol and
learns the external address and port corresponding to each of the
two UDP ports.
This algorithm supposes that the NAT will use the same translation
for packets sent to the third party and to the "SDP peer" with which
the host wants to establish a connection. There is no guarantee that
all NAT boxes deployed on the Internet have this characteristic.
Implementers are referred to the STUN specification [<a href="./rfc3489" title=""STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs)"">RFC3489</a>] for an
extensive discussion of the various types of NAT.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Do we need to Support Multiple Ports?</span>
Most media streams are transmitted using a single pair of RTP and
RTCP ports. It is possible, however, to transmit a single media over
several RTP flows, for example using hierarchical encoding. In this
case, SDP will encode the port number used by RTP on the first flow,
and the number of flows, as in:
m=video 49170/2 RTP/AVP 31
In this example, the media is sent over 2 consecutive pairs of ports,
corresponding respectively to RTP for the first flow (even number,
49170), RTCP for the first flow (odd number, 49171), RTP for the
second flow (even number, 49172), and RTCP for the second flow (odd
number, 49173).
In theory, it would be possible to modify SDP and document the many
ports corresponding to the separate encoding layers. However,
layered encoding is not much used in practice, and when used is
mostly used in conjunction with multicast transmission. The
translation issues documented in this memo apply uniquely to unicast
transmission, and thus there is no short term need for the support of
multiple port descriptions. It is more convenient and more robust to
focus on the simple case in which a media is sent over exactly one
RTP/RTCP stream.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Why not Expand the Media Definition?</span>
The RTP ports are documented in the media description line, and it
would seem convenient to document the RTCP port at the same place,
rather than create an RTCP attribute. We considered this design
alternative and rejected it for two reasons: adding an extra port
number and an option address in the media description would be
awkward, and more importantly it would create problems with existing
applications, which would have to reject the entire media description
if they did not understand the extension. On the contrary, adding an
attribute has a well defined failure mode: implementations that don't
<span class="grey">Huitema Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc3605">RFC 3605</a> RTCP attribute in SDP October 2003</span>
understand the "a=rtcp" attribute will simply ignore it; they will
fail to send RTCP packets to the specified address, but they will at
least be able to receive the media in the RTP packets.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. UNSAF Considerations</span>
The RTCP attribute in SDP is used to enable establishment of RTP/RTCP
flows through NAT. This mechanism can be used in conjunction with an
address discovery mechanism such as STUN [<a href="./rfc3489" title=""STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs)"">RFC3489</a>]. STUN is a short
term fix to the NAT traversal problem, which requires thus
consideration of the general issues linked to "Unilateral self-
address fixing" [<a href="./rfc3424" title=""IAB considerations for UNilateral Self- Address Fixing (UNSAF) across network address translation"">RFC3424</a>].
The RTCP attribute addresses a very specific problem, the
documentation of port numbers as they appear after address
translation by a port-mapping NAT. The RTCP attribute SHOULD NOT be
used for other applications.
We expect that, with time, one of two exit strategies can be
developed. The IETF may develop an explicit "middlebox control"
protocol that will enable applications to obtain a pair of port
numbers appropriate for RTP and RTCP. Another possibility is the
deployment of IPv6, which will enable use of "end to end" addressing
and guarantee that the two hosts will be able to use appropriate
ports. In both cases, there will be no need for documenting a "non
standard" RTCP port with the RTCP attribute.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Security Considerations</span>
This SDP extension is not believed to introduce any significant
security risk to multi-media applications. One could conceive that a
malevolent third party would use the extension to redirect the RTCP
fraction of an RTP exchange, but this requires intercepting and
rewriting the signaling packet carrying the SDP text; if an
interceptor can do that, many more attacks are available, including a
wholesale change of the addresses and port numbers at which the media
will be sent.
In order to avoid attacks of this sort, when SDP is used in a
signaling packet where it is of the form application/sdp, end-to-end
integrity using S/MIME [<a href="./rfc3369" title=""Cryptographic Message Syntax (CMS)"">RFC3369</a>] is the technical method to be
implemented and applied. This is compatible with SIP [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>].
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. IANA Considerations</span>
This document defines a new SDP parameter, the attribute field
"rtcp", which per [<a href="./rfc2327" title=""SDP: Session Description Protocol"">RFC2327</a>] has been registered by IANA. This
attribute field is designed for use at media level only.
<span class="grey">Huitema Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc3605">RFC 3605</a> RTCP attribute in SDP October 2003</span>
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Intellectual Property Statement</span>
The IETF takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to
pertain to the implementation or use other technology described in
this document or the extent to which any license under such rights
might or might not be available; neither does it represent that it
has made any effort to identify any such rights. Information on the
IETF's procedures with respect to rights in standards-track and
standards-related documentation can be found in <a href="https://www.rfc-editor.org/bcp/bcp11">BCP-11</a>. Copies of
claims of rights made available for publication and any assurances of
licenses to be made available, or the result of an attempt made to
obtain a general license or permission for the use of such
proprietary rights by implementers or users of this specification can
be obtained from the IETF Secretariat.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to practice
this standard. Please address the information to the IETF Executive
Director.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Acknowledgements</span>
The original idea for using the "rtcp" attribute was developed by Ann
Demirtjis. The document was reviewed by the MMUSIC and AVT working
groups of the IETF.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. References</span>
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. Normative References</span>
[<a id="ref-RFC1889">RFC1889</a>] Schulzrinne, H., Casner, S., Frederick, R. and V.
Jacobson. "RTP: A Transport Protocol for Real-Time
Applications", <a href="./rfc1889">RFC 1889</a>, January 1996.
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC2234">RFC2234</a>] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", <a href="./rfc2234">RFC 2234</a>, November 1997.
[<a id="ref-RFC2327">RFC2327</a>] Handley, M. and V. Jacobson, "SDP: Session Description
Protocol", <a href="./rfc2327">RFC 2327</a>, April 1998.
<span class="grey">Huitema Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc3605">RFC 3605</a> RTCP attribute in SDP October 2003</span>
[<a id="ref-RFC3489">RFC3489</a>] Rosenberg, J., Weinberger, J., Huitema, C. and R. Mahy.
"STUN - Simple Traversal of User Datagram Protocol (UDP)
Through Network Address Translators (NATs)", <a href="./rfc3489">RFC 3489</a>,
March 2003.
[<a id="ref-RFC3550">RFC3550</a>] Schulzrinne, H., Casner, S., Frederick, R. and V.
Jacobson. "RTP: A Transport Protocol for Real-Time
Applications", <a href="./rfc3550">RFC 3550</a>, July 2003.
<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>. Informative References</span>
[<a id="ref-RFC2766">RFC2766</a>] Tsirtsis, G. and P. Srisuresh. "Network Address
Translation - Protocol Translation (NAT-PT)", <a href="./rfc2766">RFC 2766</a>,
February 2000.
[<a id="ref-RFC3261">RFC3261</a>] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
A., Peterson, J., Sparks, R., Handley, M. and E. Schooler,
"SIP: Session Initiation Protocol", <a href="./rfc3261">RFC 3261</a>, June 2002.
[<a id="ref-RFC3369">RFC3369</a>] Housley, R., "Cryptographic Message Syntax (CMS)", <a href="./rfc3369">RFC</a>
<a href="./rfc3369">3369</a>, August 2002.
[<a id="ref-RFC3424">RFC3424</a>] Daigle, L., "IAB considerations for UNilateral Self-
Address Fixing (UNSAF) across network address
translation", <a href="./rfc3424">RFC 3424</a>, November 2002.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Author's Address</span>
Christian Huitema
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052-6399
EMail: huitema@microsoft.com
<span class="grey">Huitema Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc3605">RFC 3605</a> RTCP attribute in SDP October 2003</span>
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Full Copyright Statement</span>
Copyright (C) The Internet Society (2003). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assignees.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Huitema Standards Track [Page 8]
</pre>
|