idnits 2.17.1 draft-ietf-avt-app-rtp-keepalive-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- 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 (March 4, 2011) is 4801 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) == Unused Reference: 'RFC3261' is defined on line 423, but no explicit reference was found in the text ** Obsolete normative reference: RFC 5405 (Obsoleted by RFC 8085) -- Obsolete informational reference (is this intentional?): RFC 4566 (Obsoleted by RFC 8866) -- Obsolete informational reference (is this intentional?): RFC 5245 (Obsoleted by RFC 8445, RFC 8839) -- Obsolete informational reference (is this intentional?): RFC 5389 (Obsoleted by RFC 8489) -- Obsolete informational reference (is this intentional?): RFC 5766 (Obsoleted by RFC 8656) Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group X. Marjou 3 Internet-Draft A. Sollaud 4 Intended status: Standards Track France Telecom Orange 5 Expires: September 5, 2011 March 4, 2011 7 Application Mechanism for keeping alive the Network Address Translator 8 (NAT) mappings associated to RTP/RTCP flows. 9 draft-ietf-avt-app-rtp-keepalive-10 11 Abstract 13 This document lists the different mechanisms that enable applications 14 using Real-time Transport Protocol (RTP) and RTP control protocol 15 (RTCP) to maintain their RTP Network Address Translator (NAT) 16 mappings alive. It also makes a recommendation for a preferred 17 mechanism. This document is not applicable to Interactive 18 Connectivity Establishment (ICE) agents. 20 Status of this Memo 22 This Internet-Draft is submitted to IETF in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on September 5, 2011. 37 Copyright Notice 39 Copyright (c) 2011 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 56 3. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 4. List of Alternatives for Performing RTP Keepalive . . . . . . 5 58 4.1. Transport Packet of 0-byte . . . . . . . . . . . . . . . . 5 59 4.2. RTP Packet with Comfort Noise Payload . . . . . . . . . . 5 60 4.3. RTCP Packets Multiplexed with RTP Packets . . . . . . . . 5 61 4.4. STUN Indication Packet . . . . . . . . . . . . . . . . . . 6 62 4.5. RTP Packet with Incorrect Version Number . . . . . . . . . 6 63 4.6. RTP Packet with Unknown Payload Type . . . . . . . . . . . 6 64 5. Recommended Solution for Keepalive Mechanism . . . . . . . . . 7 65 6. Media Format Exceptions . . . . . . . . . . . . . . . . . . . 7 66 7. Timing and Transport Considerations . . . . . . . . . . . . . 7 67 8. RTCP Flow Keepalive . . . . . . . . . . . . . . . . . . . . . 8 68 9. Security Considerations . . . . . . . . . . . . . . . . . . . 9 69 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 70 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9 71 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 72 12.1. Normative references . . . . . . . . . . . . . . . . . . . 10 73 12.2. Informative references . . . . . . . . . . . . . . . . . . 10 74 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 11 76 1. Introduction 78 Documents [RFC4787] and [RFC5382] describe Network Address Translator 79 (NAT) behaviors and point out that two key aspects of NAT are 80 mappings (a.k.a. bindings) and keeping them refreshed. This 81 introduces a derived requirement for applications engaged in a 82 multimedia session involving NAT traversal: they need to generate a 83 minimum of flow activity in order to create NAT mappings and maintain 84 them. 86 When applied to applications using the real-time transport protocol 87 (RTP) [RFC3550], the RTP media stream packets themselves normally 88 fulfill this requirement. However there exist some cases where RTP 89 does not generate the minimum required flow activity. 91 The examples are: 93 o In some RTP usages, such as the Session Inititation Protocol (SIP) 94 [RFC3550], agents can negotiate a unidirectional media stream by 95 using the Session Description Protocol (SDP) [RFC4566] "recvonly" 96 attribute on one agent and "sendonly" on the peer, as defined in 97 [RFC3264]. [RFC3264] directs implementations not to transmit 98 media on the receiving agent. In case the agent receiving the 99 media is located in the private side of a NAT, it will never 100 receive RTP packets from the public peer if the NAT mapping has 101 not been created. 103 o Similarly, a bidirectional media stream can be "put on hold". 104 This is accomplished by using the SDP "sendonly" or "inactive" 105 attributes. Again [RFC3264] directs implementations to cease 106 transmission of media in these cases. However, doing so may cause 107 NAT bindings to timeout, and media won't be able to come off hold. 109 o Some RTP payload formats, such as the payload format for text 110 conversation [RFC4103], may send packets so infrequently that the 111 interval exceeds the NAT binding timeouts. 113 To solve these problems, an agent therefore needs to periodically 114 send keepalive data within the outgoing RTP session of an RTP media 115 stream regardless of whether the media stream is currently inactive, 116 sendonly, recvonly or sendrecv, and regardless of the presence or 117 value of the bandwidth attribute. 119 It is important to note that NAT traversals constraints also usually 120 require the agents to use Symmetric RTP / RTP Control Protocol (RTCP) 121 [RFC4961] in addition to RTP keepalive. 123 This document first states the requirements that must be supported to 124 perform RTP keepalives (Section 3). In a second step, the document 125 reports the different mechanisms to overcome this problem 126 (Section 4). Section 5 finally states the recommended solution for 127 RTP keepalive. Section 6 discusses some media format exceptions. 128 Section 7 adds details about timing and transport considerations. 129 Section 8 documents how to maintain NAT bindings for RTCP. 131 This document is not applicable to Interactive Connectivity 132 Establishment (ICE) [RFC5245] agents. Indeed, the ICE protocol 133 together with Session Traversal Utilities for NAT (STUN) [RFC5389] 134 and Traversal Using Relays around NAT (TURN) [RFC5766] solve the 135 overall Network Address Translator (NAT) traversal mechanism of media 136 streams. In the context of RTP media streams, some agents may not 137 require all ICE functionalities and may only need a keepalive 138 mechanism. This document thus applies to such agents, and does not 139 apply to agents implementing ICE. 141 Note that if a given media uses a codec that already integrates a 142 keepalive mechanism, no additional keepalive mechanism is required at 143 the RTP level. 145 As mentioned in Section 3.5 of [RFC5405] "It is important to note 146 that keepalive messages are NOT RECOMMENDED for general use -- they 147 are unnecessary for many applications and can consume significant 148 amounts of system and network resources." 150 2. Terminology 152 In this document, the key words "MUST", "MUST NOT", "REQUIRED", 153 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 154 and "OPTIONAL" are to be interpreted as described in RFC 2119 155 [RFC2119]. 157 3. Requirements 159 This section outlines the key requirements that need to be satisfied 160 in order to provide RTP media keepalive. 162 REQ-1 Some data is sent periodically within the outgoing RTP session 163 for the whole duration of the RTP media stream. 165 REQ-2 Any type of transport (e.g. UDP, TCP) MUST be supported. 167 REQ-3 Any media type (e.g. audio, video, text) MUST be supported. 169 REQ-4 Any media format (e.g. G.711, H.263) MUST be supported. 171 REQ-5 Session signaling protocols SHOULD NOT be impacted. 173 REQ-6 Impacts on existing software SHOULD be minimized. 175 REQ-7 Remote peer SHOULD NOT be impacted. 177 REQ-8 The support for RTP keepalive SHOULD be described in the SDP. 179 REQ-9 The solution SHOULD cover the integration with RTCP. 181 4. List of Alternatives for Performing RTP Keepalive 183 This section lists, in no particular order, some alternatives that 184 can be used to perform a keepalive message within RTP media streams. 186 4.1. Transport Packet of 0-byte 188 The application sends an empty transport packet (e.g. UDP packet, 189 DCCP packet). 191 Cons: 192 o This alternative is specific to each transport protocol. 194 4.2. RTP Packet with Comfort Noise Payload 196 The application sends an RTP packet with a comfort-noise payload 197 [RFC3389]. 199 Cons: 200 o This alternative is limited to audio formats only. 201 o Comfort Noise needs to be supported by the remote peer. 202 o Comfort Noise needs to be signalled in SDP offer/answer. 203 o The peer is likely to render comfort noise at the other side, so 204 the content of the payload (the noise level) needs to be carefully 205 chosen. 207 4.3. RTCP Packets Multiplexed with RTP Packets 209 The application sends RTCP packets in the RTP media path itself (i.e. 210 same tuples for both RTP and RTCP packets) [RFC5761]. RTCP packets 211 therefore maintain the NAT mappings open as long as the requirements 212 on parameter selection are fulfilled as discussed in Section 8. 214 Note: "on hold" procedures of [RFC3264] do not impact RTCP 215 transmissions. 217 Cons: 218 o Multiplexing RTP and RTCP must be supported by the remote peer. 219 o Some RTCP monitoring tools expect that RTCP packets are not 220 multiplexed. 221 o RTCP must be configured so that Tmin value [RFC3550] is lower or 222 equal to the Tr interval. 224 4.4. STUN Indication Packet 226 The application sends a STUN [RFC5389] Binding Indication packet as 227 specified in ICE [RFC5245]. 229 Thanks to the RTP validity check, STUN packets will be ignored by the 230 RTP stack. 232 Cons: 233 o The sending agent needs to support STUN. 235 4.5. RTP Packet with Incorrect Version Number 237 The application sends an RTP packet with an incorrect version number, 238 which value is zero. 240 Based on RTP specification [RFC3550], the peer should perform a 241 header validity check, and therefore ignore these types of packet. 243 Cons: 244 o Only four version numbers are possible. Using one of them for RTP 245 keepalive would be wasteful. 246 o [RFC4566] and [RFC3264] mandate not to send media with inactive 247 and recvonly attributes, however this is mitigated as no real 248 media is sent with this mechanism. 250 4.6. RTP Packet with Unknown Payload Type 252 The application sends an RTP packet of 0 length with a dynamic 253 payload type that has not been negotiated by the peers (e.g. not 254 negotiated within the SDP offer/answer, and thus not mapped to any 255 media format). 257 The sequence number is incremented by one for each packet, as it is 258 sent within the same RTP session as the actual media. The timestamp 259 contains the same value a media packet would have at this time. The 260 marker bit is not significant for the keepalive packets and is thus 261 set to zero. 263 The SSRC is the same as for the media for which keepalive is sent. 265 Normally the peer will ignore this packet, as RTP [RFC3550] states 266 that "a receiver MUST ignore packets with payload types that it does 267 not understand". 269 Cons: 270 o [RFC4566] and [RFC3264] mandate not to send media with inactive 271 and recvonly attributes, however this is mitigated as no real 272 media is sent with this mechanism. 273 o [RFC3550] does not preclude examination of received packets by the 274 peer in an attempt to determine if it is under attack. 275 o The statement "RTP Packet with Unknown Payload Type" of RFC3550 is 276 not always observed in real life. 277 o There is no RTCP reporting for the keepalive packets as RFC3550 278 mandates to ignore "RTP Packet with Unknown Payload Type". 279 o Some RTP payload formats do not handle gaps in RTP sequence number 280 well. 282 5. Recommended Solution for Keepalive Mechanism 284 The RECOMMENDED mechanism is the "RTCP packets multiplexed with RTP 285 packets" (Section 4.3). This mechanism is desirable because it 286 reduces the number of ports when RTP and RTCP are used. It also has 287 the advantage of taking into account RTCP aspects, which is not the 288 case of other mechanisms. 290 Other mechanisms (Section 4.1, Section 4.2, Section 4.4, Section 4.5, 291 Section 4.6) are NOT RECOMMENDED. 293 6. Media Format Exceptions 295 When a given media format does not allow the keepalive solution 296 recommended in Section 5, an alternative mechanism SHOULD be defined 297 in the payload format specification for this media format. 299 7. Timing and Transport Considerations 301 An application supporting this specification MUST transmit either 302 keepalive packets or media packets at least once every Tr seconds 303 during the whole duration of the media session. 305 Tr has different value according to the transport protocol 307 For UDP, the minimum RECOMMENDED Tr value is 15 seconds, and Tr 308 SHOULD be configurable to larger values. 310 For TCP, the recommended Tr value is 7200 seconds. 312 When using the "RTCP packets multiplexed with RTP packets" solution 313 for keepalive, Tr MUST comply with the RTCP timing rules of 314 [RFC3550]. 316 Keepalive packets within a particular RTP session MUST use the tuple 317 (source IP address, source TCP/UDP ports, target IP address, target 318 TCP/UDP Port) of the regular RTP packets. 320 The agent SHOULD only send RTP keepalive when it does not send 321 regular RTP packets. 323 8. RTCP Flow Keepalive 325 RTCP packets are sent periodically and can thus normally maintain the 326 NAT mappings open as long as they are sent frequently enough. There 327 are two conditions for that. First RTCP needs to be used bi- 328 directionally and in a symmetric fashion, as described in [RFC4961]. 329 Secondly, RTCP needs to be sent frequently enough. However, there 330 are certain configurations that can break this latter assumption. 332 There are two factors that need to be considered to ensure that RTCP 333 is sent frequently enough. First the RTCP bandwidth needs to be 334 sufficiently large so that transmission will occur more frequently 335 than the longest acceptable packet transmission interval (Tr). The 336 worst case RTCP interval (Twc) can be calculated using this formula 337 by inserting the max value of the following parameters: 338 o Maximum RTCP packet size (avg_rtcp_size_max) 339 o Maximum number of participants (members_max) 340 o RTCP receiver bandwidth (rtcp_bw) 342 The RTCP bandwidth value to use here is for a worst case, which will 343 be the receiver proportion when all members are not senders except 344 one. This can be approximated to be all members. Thus for sessions 345 where RR and RS values are used, then rtcp_bw shall be set to RR. 346 For sessions where the [RFC3550] defines proportions of 1/4 for 347 sender and 3/4 for receivers are used, then rtcp_bw will be 5% of 3/4 348 of the AS value in bits per second. 350 Twc = 1.5 / 1.21828 * members_max * rtcp_bw / avg_rtcp_size_max * 8 352 The second factor is the minimum RTCP interval Tmin defined in 353 [RFC3550]. Its base value is 5 seconds, but it might also be scaled 354 to 360 divided by the session bandwidth in kbps. The Extended RTP 355 Profile for Real-time Transport Control Protocol (RTCP)-Based 356 Feedback (RTP/AVPF) [RFC4585] also allows for the setting of a trr- 357 int parameter which is a minimal RTCP interval for regular RTCP 358 packets. It is also used as the Tmin value in the regular Td 359 calculation. An analysis of the algorithm gives that the longest 360 possible regular RTCP interval possible are: 362 RTCP_int_max = trr-int * 1.5 + Td * 1.5 / 1.21828 364 And as long as the there is sufficient bandwidth according to 365 criteria 1, then this can be simplified by setting Td = trr-int 366 giving 368 RTCP_int_max = trr-int * (1.5 + 1.5 / 1.21828) = 2.73123 * trr-int 370 Thus the requirements on the RTCP parameters are the following for 371 functioning keepalive: 372 1. Ensure that sufficient RTCP bandwidth is provided by calculating 373 Twc and ensure that this is less than or equal to Tr. 374 2. If AVP or SAVP is used the Tmin value can't be greater that Tr 375 divided by 1.5 / (e-3/2). 376 3. If AVPF or SAVPF is to be used trr-min must not be set to a 377 greater value than Tr / 3. 379 9. Security Considerations 381 The RTP keepalive packets are sent on the same path as regular RTP 382 media packets and may be perceived as an attack by a peer. However, 383 [RFC3550] mandates a peer to "ignore packets with payload types that 384 it does not understand". A peer that does not understand the 385 keepalive message will thus appropriately drop the received packets. 387 10. IANA Considerations 389 None. 391 11. Acknowledgements 393 Jonathan Rosenberg provided the major inputs for this draft via the 394 ICE specification. Magnus Westerlund provided the text for the RTCP 395 flow keepalive section. In addition, thanks to Alfred E. Heggestad, 396 Colin Perkins, Dan Wing, Gunnar Hellstrom, Hadriel Kaplan, Randell 397 Jesup, Remi Denis-Courmont, Robert Sparks, and Steve Casner for their 398 useful inputs and comments. 400 12. References 402 12.1. Normative references 404 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 405 Requirement Levels", BCP 14, RFC 2119, March 1997. 407 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 408 Jacobson, "RTP: A Transport Protocol for Real-Time 409 Applications", STD 64, RFC 3550, July 2003. 411 [RFC4961] Wing, D., "Symmetric RTP / RTP Control Protocol (RTCP)", 412 BCP 131, RFC 4961, July 2007. 414 [RFC5405] Eggert, L. and G. Fairhurst, "Unicast UDP Usage Guidelines 415 for Application Designers", BCP 145, RFC 5405, 416 November 2008. 418 [RFC5761] Perkins, C. and M. Westerlund, "Multiplexing RTP Data and 419 Control Packets on a Single Port", RFC 5761, April 2010. 421 12.2. Informative references 423 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 424 A., Peterson, J., Sparks, R., Handley, M., and E. 425 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 426 June 2002. 428 [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model 429 with Session Description Protocol (SDP)", RFC 3264, 430 June 2002. 432 [RFC3389] Zopf, R., "Real-time Transport Protocol (RTP) Payload for 433 Comfort Noise (CN)", RFC 3389, September 2002. 435 [RFC4103] Hellstrom, G. and P. Jones, "RTP Payload for Text 436 Conversation", RFC 4103, June 2005. 438 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 439 Description Protocol", RFC 4566, July 2006. 441 [RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, 442 "Extended RTP Profile for Real-time Transport Control 443 Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, 444 July 2006. 446 [RFC4787] Audet, F. and C. Jennings, "Network Address Translation 447 (NAT) Behavioral Requirements for Unicast UDP", BCP 127, 448 RFC 4787, January 2007. 450 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 451 (ICE): A Protocol for Network Address Translator (NAT) 452 Traversal for Offer/Answer Protocols", RFC 5245, 453 April 2010. 455 [RFC5382] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. 456 Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, 457 RFC 5382, October 2008. 459 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 460 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 461 October 2008. 463 [RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using 464 Relays around NAT (TURN): Relay Extensions to Session 465 Traversal Utilities for NAT (STUN)", RFC 5766, April 2010. 467 Authors' Addresses 469 Xavier Marjou 470 France Telecom Orange 471 2, avenue Pierre Marzin 472 Lannion 22307 473 France 475 Email: xavier.marjou@orange-ftgroup.com 477 Aurelien Sollaud 478 France Telecom Orange 479 2, avenue Pierre Marzin 480 Lannion 22307 481 France 483 Email: aurelien.sollaud@orange-ftgroup.com