RFC 4961
Symmetric RTP / RTP Control Protocol (RTCP)
Symmetric RTP / RTP Control Protocol (RTCP) π
Okay bestie, this is RFC 4961, a Best Current Practice (BCP 131) from July 2007, written by Dan Wing at Cisco Systems for the Network Working Group π¦. It's a category of "here's how everyone should do it," not a brand-new protocol. It doesn't list anything it obsoletes or updates in its header, so it stands on its own β¨.
Status of This Memo
This document is an Internet Best Current Practice for the Internet Community π. It asks for discussion and suggestions for improvements, and the memo can be distributed freely with no limits πΈ.
Copyright Notice
Copyright (C) The IETF Trust (2007) β.
Abstract
This doc recommends using one UDP port pair for both directions of a bidirectional RTP and RTP Control Protocol (RTCP) session. People call it "symmetric RTP" and "symmetric RTCP" π¦β¨.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Conventions Used in this Document . . . . . . . . . . . . . . . 2
3. Definition of Symmetric RTP and Symmetric RTCP . . . . . . . . 3
4. Recommended Usage . . . . . . . . . . . . . . . . . . . . . . . 3
5. Security Considerations . . . . . . . . . . . . . . . . . . . . 4
6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 4
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 4
7.1. Normative References . . . . . . . . . . . . . . . . . . . 4
7.2. Informative References . . . . . . . . . . . . . . . . . . 4
1. Introduction β¨
Okay so TCP [RFC0793] is inherently bidirectional π . It sends and receives data using the same local port. When host A opens a TCP connection from source port "a" to a remote host, the remote host sends its packets back to host A's source TCP port "a". Iconic behavior π.
UDP is a different story π. UDP is not inherently bidirectional, and it doesn't require the same port for sending and receiving. Some UDP apps use a single port to send and receive (DNS [RFC1035], for example). Some use different ports to send and receive, with explicit signaling (like Trivial File Transfer Protocol (TFTP) [RFC1350]). And some don't specify which ports to use for sending and receiving at all (RTP [RFC3550]).
Since RTP and RTCP aren't inherently bidirectional, and UDP isn't either, nobody really cared about using the same UDP port for sending and receiving with RTP and RTCP π₯². A lot of firewalls, Network Address Translators (NATs) [RFC3022], and RTP implementations expect symmetric RTP and don't work when you have asymmetric RTP. The wild part is that the term was never actually defined π. This document defines "symmetric RTP" and "symmetric RTCP" π«Ά.
The UDP port that receives media and the UDP port that transmits media are both picked by the device that receives and transmits that media π. For unicast flows, the receive port gets communicated to the remote peer. Examples include Session Description Protocol (SDP) [RFC4566] carried in SIP [RFC3261], Session Announcement Protocol (SAP) [RFC2974], or Megaco/H.248 [RFC3525].
There is no correspondence between the local RTP (or RTCP) port and the remote RTP (or RTCP) port π ββοΈ. Device "A" might pick port 1234 for its local transmit and receive port. Its peer, device "B", isn't required to also use port 1234. In fact, that kind of constraint would be impossible to meet, because device "B" might already be using that port for something else π.
The benefits of using one UDP port pair are described below in Section 4 π.
2. Conventions Used in this Document π
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 [RFC2119] π₯.
3. Definition of Symmetric RTP and Symmetric RTCP π
A device supports symmetric RTP if it selects, communicates, and uses IP addresses and port numbers so that, when it receives a bidirectional RTP media stream on UDP port "A" and IP address "a", it also transmits RTP media for that stream from the same source UDP port "A" and IP address "a". Basically, it uses the same UDP port to send and receive one RTP stream π.
A device that doesn't support symmetric RTP would transmit RTP from a different port, or a different IP address, than the ones it used to receive RTP for that bidirectional media stream π.
A device supports symmetric RTCP if it selects, communicates, and uses IP addresses and port numbers so that, when it receives RTCP packets for a media stream on UDP port "B" and IP address "b", it also transmits RTCP packets for that stream from the same source UDP port "B" and IP address "b". Same energy, different protocol π§. It uses the same UDP port to send and receive one RTCP stream.
A device that doesn't support symmetric RTCP would transmit RTCP from a different port, or a different IP address, than the port and IP address it used to receive RTCP π .
4. Recommended Usage πΈ
There are two specific instances where symmetric RTP and symmetric RTCP are REQUIRED π¨:
The first one is NATs that don't have integrated Application Layer Gateway (ALG) functionality. These NATs need endpoints to use symmetric UDP ports to set up bidirectional traffic. This requirement applies to every type of NAT described in Section 4 of [RFC4787]. ALGs are defined in Section 4.4 of [RFC3022] π€.
The second one is Session Border Controllers (SBCs) and other kinds of RTP and RTCP relays (for example, [TURN]). Media relays are needed to set up bidirectional UDP communication across a NAT that is 'Address-Dependent' or 'Address and Port-Dependent' [RFC4787]. Even with a media relay, though, you still need symmetric UDP ports to get through that kind of NAT π.
There are other situations where symmetric RTP and symmetric RTCP are helpful but not required β¨. For example, if a firewall can expect symmetric RTP and symmetric RTCP, its dynamic per-call port filter list can be more restrictive than it would be with asymmetric RTP and asymmetric RTCP. Symmetric RTP and symmetric RTCP can also make debugging and troubleshooting easier π.
Other UDP-based protocols can also benefit from sharing local transmit and receive ports π¦.
There are no known cases where symmetric RTP or symmetric RTCP are harmful π«Ά.
So for all of these reasons, it is RECOMMENDED that symmetric RTP and symmetric RTCP always be used for bidirectional RTP media streams ππ.
5. Security Considerations π¨
Okay, this part is serious bestie π±. If an attacker learns the source and destination UDP ports of a symmetric RTP or symmetric RTCP flow, the attacker can send RTP or RTCP packets to that host. This is different from asymmetric RTP and asymmetric RTCP, where an attacker has to learn the UDP source and destination ports used for the reverse traffic before it can send packets to that host. So if a host uses symmetric RTP or symmetric RTCP, an attacker only needs to see one RTP or RTCP packet to attack either RTP endpoint ππ₯. This attack is similar to the one against other UDP-based protocols that use one UDP port pair (DNS [RFC1035], for example) π.
6. Acknowledgments π«Ά
The author thanks Francois Audet, Sunil Bhargo, Lars Eggert, Francois Le Faucheur, Cullen Jennings, Benny Rodrig, Robert Sparks, and Joe Stone for their help with this document π.
7. References π
7.1. Normative References
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
7.2. Informative References
- [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", STD 64, RFC 3550, July 2003.
- [RFC4787] Audet, F. and C. Jennings, "Network Address Translation (NAT) Behavioral Requirements for Unicast UDP", BCP 127, RFC 4787, January 2007.
- [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981.
- [RFC3022] Srisuresh, P. and K. Egevang, "Traditional IP Network Address Translator (Traditional NAT)", RFC 3022, January 2001.
- [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session Description Protocol", RFC 4566, July 2006.
- [RFC1035] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, November 1987.
- [RFC1350] Sollins, K., "The TFTP Protocol (Revision 2)", STD 33, RFC 1350, July 1992.
- [TURN] Rosenberg, J., "Obtaining Relay Addresses from Simple Traversal Underneath NAT (STUN)", Work in Progress, July 2007.
- [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.
- [RFC2974] Handley, M., Perkins, C., and E. Whelan, "Session Announcement Protocol", RFC 2974, October 2000.
- [RFC3525] Groves, C., Pantaleo, M., Anderson, T., and T. Taylor, "Gateway Control Protocol Version 1", RFC 3525, June 2003.
Author's Address ποΈ
Dan Wing Cisco Systems 170 West Tasman Drive San Jose, CA 95134 USA
EMail: dwing@cisco.com
Full Copyright Statement β
Copyright (C) The IETF Trust (2007).
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM 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.
Intellectual Property π
The IETF takes no position on the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document, or on whether any license under such rights might or might not be available. It also doesn't claim to have made any independent effort to identify such rights. Info on the procedures for rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat, and any assurances of licenses to be made available, or the result of an attempt to get a general license or permission for implementers or users to use these proprietary rights, can be found in the IETF online IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents, patent applications, or other proprietary rights that may cover technology needed to implement this standard. Send that info to the IETF at ietf-ipr@ietf.org π©.
Acknowledgement π
Funding for the RFC Editor function is currently provided by the Internet Society πΈ.
π¦ where this page comes from
- ietf: rfc4961 2007-07
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms