<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp "&#160;">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-ietf-intarea-multicast-application-port-04"
  ipr="trust200902"
  submissionType="IETF"
  consensus="true">

  <front>
    <title abbrev="Mcast App Port">The Multicast Application Port</title>

    <author fullname="Nate Karstens" initials="N" surname="Karstens">
      <organization abbrev="Garmin">Garmin International, Inc.</organization>

      <address>
        <postal>
          <street>1200 E. 151st St.</street>
          <city>Olathe</city>
          <region>KS</region>
          <code>66062-3426</code>
          <country>United States of America</country>
        </postal>
        <email>nate.karstens@gmail.com</email>
      </address>
    </author>

    <author fullname="Stuart Cheshire" initials="S" surname="Cheshire">
      <organization>Apple Inc.</organization>
      <address>
        <email>cheshire@apple.com</email>
      </address>
    </author>

    <author fullname="Mike McBride" initials="M" surname="McBride">
      <organization>Futurewei</organization>
      <address>
        <postal>
          <country>United States of America</country>
        </postal>
        <email>michael.mcbride@futurewei.com</email>
      </address>
    </author>

    <date day="14" month="February" year="2026"/>

    <abstract>
      <t>This document discusses the drawbacks of the current practice of assigning a UDP port to each multicast application. Such assignments are redundant because the multicast address already uniquely identifies the data. The document proposes assigning a UDP port specifically for use with multicast applications and lists requirements for using this port. This method does not require modification to existing protocol stacks, though recommended updates to make the port easier to use are included. This approach provides immediate compatibility with existing protocol stacks, while also requiring improvements to make the port easier to use.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The Internet community has recognized the need to be judicious when assigning port numbers (see <xref target="RFC7605" sectionFormat="comma" section="6"/>). With unicast applications, the need for explicit port assignment has been reduced by techniques such as locally assigning a dynamic port, combined with some mechanism for advertising that port (see <xref target="RFC7605" sectionFormat="comma" section="7.1"/>). Dynamic assignment does not work with multicast applications because it is impossible to guarantee that the port remains unused by all hosts that may want to join a given multicast group. The result is that each multicast application-layer protocol has had to have its own dedicated port assignment. Even worse, each different use of that multicast application-layer protocol has had to have a different unique port assigned.</t>

      <t>In the TCP/IP model, the port number in the transport layer multiplexes applications within a host (see <xref target="RFC1122" sectionFormat="comma" section="4.1.1"/> and <xref target="RFC7605" sectionFormat="comma" section="5"/>). With Any-Source Multicast, the use of a port number to multiplex applications is unnecessary because the destination multicast address already provides a unique identifier for the application. The same applies to Source-Specific Multicast if both source address and destination multicast address are considered.</t>

      <t>Because of the desire to conserve port numbers and the fact that a port is not necessary to multiplex multicast applications, this document assigns a UDP port that may be used with multicast applications: the Multicast Application Port.</t>

      <t>Assigning a UDP port for multicast applications (as opposed to other methods) provides immediate compatibility with existing network protocol stacks. <xref target="host"/> contains requirements that facilitate use of the port on a given platform, but incorporating these requirements into existing platforms is expected to be a gradual process.</t>

      <t>Use of this port is optional because there may be circumstances where assigning a port is preferred, such as when participants cannot meet the requirements in <xref target="host"/> and <xref target="application"/>, or when a firewall blocks a traffic pattern used by the application (see <xref target="firewall"/>).</t>

      <t>An application may use this port in conjunction with a unicast port to balance out deficiencies related to multicast distribution (see <xref target="RFC9119"/>, for example).</t>

      <section title="Requirements Language" anchor="requirements">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
      </section>
    </section>

    <section title="Assignment">
      <t>This document <em>requests</em> assignment of UDP port 8738 (0x2222) and gives it the service name "mcast-app-port".</t>

      <t>The Multicast Application Port SHALL NOT be used as a destination port for any non-multicast messages. It MAY be used as a source port by an application that exclusively uses multicast messages.</t>

      <t>If any application messages are unicast, then a different port should be used for the source port. This allows receivers to know which port to send replies to. Such arrangements would likely require receivers to use multiple sockets, as the application would need to bind to multiple ports.</t>
    </section>

    <section title="Host Requirements" anchor="host">
      <t>Hosts SHALL require applications using this port to use it non-exclusively. In practice, this means hosts using POSIX-like socket APIs would require applications to set the <tt>SO_REUSEADDR</tt> and/or <tt>SO_REUSEPORT</tt> socket options before binding the socket <xref target="POSIX"/>. This ensures that applications developed on a conformant host will also work on a non-conformant host.</t>

      <t>Hosts SHALL prevent use of the port with the wildcard address (see <xref target="RFC3493" sectionFormat="comma" section="3.8"/>) by having the socket bind operation return an error code.</t>

      <t>Hosts SHALL prevent applications from sending non-multicast packets to this destination port by having the send operation return an error code.</t>

      <t>Hosts SHALL discard all incoming, non-multicast packets that use this destination port.</t>

      <section title="Host Firewall Considerations" anchor="firewall">
        <t>Certain host firewalls are designed to accept incoming messages as long as there was first an outgoing message using the same set of ports (see <xref target="RFC7288"/> for more discussion). Consider the following sequence of messages:</t>

        <ol>
          <li>(Multicast) Host A to group containing Host B<br />Source Port: 50000 (Dynamic)<br />Dest Port: 8738</li>
          <li>(Unicast) Host B to Host A<br />Source Port: 60000 (Dynamic)<br />Dest Port: 50000</li>
          <li>(Unicast) Host A to Host B<br />Source Port: 50000<br />Dest Port: 60000</li>
        </ol>

        <t>The host firewall on Host A may block Message 2 because it uses a different set of ports than Message 1 uses. Host firewalls SHOULD be designed to allow this sequence of messages, but MAY filter traffic based on the multicast address used in Message 1, which identifies the application.</t>
      </section>
    </section>

    <section title="Application Requirements" anchor="application">
      <t>Applications running on non-conformant hosts can ensure compatibility with conformant hosts by meeting the requirements in this section.</t>

      <t>Applications running on a non-conformant host SHALL NOT prevent other applications from using this port. In practice, this means that applications using POSIX-like socket APIs would enable the <tt>SO_REUSEADDR</tt> and/or <tt>SO_REUSEPORT</tt> socket options before binding the socket <xref target="POSIX"/>.</t>

      <t>Applications running on a non-conformant host SHALL discard all datagrams received on the Multicast Application Port that do not have the multicast address used by the application.</t>
    </section>

    <section title="Security Considerations">
      <t>Firewall rules referencing ports are typically intended to match specific applications. Because applications using the Multicast Application Port are identified by both port and destination multicast address, rules referencing the Multicast Application Port SHOULD also consider the destination multicast address.</t>

      <t>Applications running on non-conformant hosts are vulnerable to a denial of service attack if another application claims exclusive access to the port.</t>

      <t>Systems that use POSIX-like socket APIs typically have restrictions on binding multiple sockets to the same port. This can serve as a rudimentary security mechanism in that other local applications cannot eavesdrop on the multicast stream. A necessary side-effect of using the Multicast Application Port is that applications can no longer rely on these security mechanisms. These applications may want to incorporate additional security measures into their protocol. Note that the problem of local eavesdropping is typically no worse than eavesdropping in-flight, so it is likely that both attack vectors can be resolved by the same security measure.</t>
    </section>

    <section title="IANA Considerations">
      <t>IANA is <em>requested</em> to assign the following port:</t>

      <artwork><![CDATA[
Service Name        mcast-app-port
Transport Protocol  UDP
Assignee            IESG <iesg@ietf.org>
Contact             IETF Chair <chair@ietf.org>
Description         Multicast Application Port
Reference           This document
Port Number         8738]]>
      </artwork>

      <t>IANA is requested to update its "Application for Service Names and User Port Numbers" <xref target="IANA-APP"/> to reference this document, ask if the Multicast Application Port may be used, and require an explanation if not. This document does not prohibit future port assignments for multicast applications; the review team still has discretion to approve requests on a case-by-case basis.</t>
    </section>

    <section title="Acknowledgement">
      <t>Special thanks to the National Marine Electronics Association for their contributions in developing marine industry standards and their support for this research.</t>

      <t>The authors are grateful to the members of the PIM and INT-AREA working groups for their review of this draft, and to the following individuals specifically:</t>
      
      <ul>
        <li>Dr. Joe Touch for consulting on port assignment</li>
        <li>Lorenzo Colitti for his suggestions for host requirements</li>
        <li>David Schinazi for pointing out likely port conflicts with several major OSes</li>
        <li>Juliusz Chroboczek for suggestions on the source port used for unicast</li>
        <li>Dave Thaler for suggestions related to host firewalls</li>
      </ul>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
    </references>
    <references title="Informative References">
      <reference anchor="IANA-APP" target="https://www.iana.org/form/ports-services">
        <front>
          <title>Application for Service Names and User Port Numbers</title>
          <author>
            <organization>Internet Assigned Numbers Authority</organization>
          </author>
        </front>
      </reference>
      <reference anchor="POSIX" target="https://pubs.opengroup.org/onlinepubs/9699919799/">
        <front>
          <title>"The Open Group Base Specifications", Issue 7, 2018 edition</title>
          <author>
            <organization>The Open Group</organization>
          </author>
          <date month="December" year="2001" />
        </front>
      </reference>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1122.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3493.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7288.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7605.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9119.xml"/>
    </references>
  </back>
</rfc>
