| Internet-Draft | Mcast App Port | November 2026 |
| Karstens, et al. | Expires 31 May 2027 | [Page] |
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 group address already identifies the traffic. This document assigns a UDP port for use by multicast applications and lists requirements for using it. The approach works with existing protocol stacks today, and the document also defines host enhancements that help safeguard the ongoing cooperative use of this port by multicast applications.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 31 May 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This document uses the term "multicast group address" to refer collectively to the IP destination address for Any-Source Multicast (ASM) [RFC1112] and the (S,G) channel for Source-Specific Multicast (SSM) [RFC4607], since they serve the same purpose. Both exist to identify a stream of packets related to a particular activity. The network's multicast routing infrastructure uses the multicast group address to determine where packets should be forwarded, so that they reach all group members that need them, without being delivered to networks or hosts that do not.¶
For the purposes of this document, a "multicast packet" is a packet whose destination address is a multicast address. A "non-multicast packet" is a packet with any other destination address, including unicast, anycast, and broadcast addresses.¶
This document describes each separate usage of an application as an "instantiation" of that application. For example, a multicast videoconferencing application could be in use all over the world for a thousand different videoconference meetings at the same time. It would be highly inefficient (and would defeat the purpose of multicast) if all the meetings were to use the same multicast group and all copies of the application were to receive all the traffic for all videoconference meetings taking place at that time. Consequently, each instantiation of a multicast application requires its own unique multicast group address. How a unique multicast group address is assigned for each instantiation is covered by other IETF documents, such as the guidelines for IPv4 multicast address assignment [RFC5771] and for IPv6 multicast address assignment [RFC3307] [RFC10028].¶
The Internet community has recognized the need to be judicious when assigning port numbers ([RFC6335]; [RFC7605], 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 a mechanism for advertising that port ([RFC6763]; [RFC7605], 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. As a result, each multicast application-layer protocol has traditionally requested its own dedicated port assignment. It might seem that even this is insufficient and that each instantiation of each multicast application-layer protocol should be assigned its own port. In fact, neither per-protocol nor per-instantiation port assignment is necessary.¶
In the TCP/IP model, the port number in the transport
layer multiplexes unicast traffic destined for different
applications within a host
([RFC1122], Section 4.1.1;
[RFC7605], Section 5).
With multicast, the use of a port number to multiplex applications
is unnecessary because the multicast group address already
provides a unique identifier for each application instantiation
within a given multicast scope.
Socket options such as
SO_REUSEADDR and SO_REUSEPORT
(details vary by API) already
allow multiple copies of the same multicast application to
run on the same host and receive copies of multicast packets
addressed to the same multicast group address and UDP port.
This approach is widely used to run
multiple independent implementations of Multicast DNS
[RFC6762] on a single host,
where two independent implementations of Multicast DNS
(e.g., a smart speaker that implements both
AirPlay and Chromecast music streaming)
both receive copies of all received Multicast DNS packets
addressed to 224.0.0.251:5353.¶
This existing practice inspired this specification. If the destination port number is not needed for multicast traffic, and multiple instantiations of the same application can share a single port, then, by the same logic, all multicast applications can share one port, as long as they cooperate and use the appropriate API mechanisms. This specification codifies and extends this existing practice and assigns a single UDP port that all multicast applications can use: the Multicast Application Port.¶
This document does not specify any on-the-wire protocol, except inasmuch as it specifies the 16-bit value that goes in the destination port field in the UDP header for multicast traffic that follows this specification. If multiple applications (or multiple instantiations of the same application) on a single host are to receive multicast traffic with the same 16-bit value in the destination port field of the UDP header, they need to follow certain procedures to share that UDP port cooperatively. This document describes those procedures with reference to POSIX-like socket APIs [POSIX] as a representative example. Applications using other networking APIs will need to follow the equivalent procedures available in those APIs.¶
The Multicast Application Port can be used with both IPv6 and IPv4.¶
On any platform that supports
SO_REUSEADDR and SO_REUSEPORT
or equivalents, multicast applications can begin using
the Multicast Application Port immediately by following
the guidance in Section 4.
In addition, network protocol stacks and APIs can help
developers write correct applications by enforcing rules
(Section 5) that ensure proper use of the
Multicast Application Port.
Such enforcement helps detect and prevent application bugs
that would interfere with sharing of this port.
These protections are expected to be deployed incrementally,
but applications can use the Multicast Application Port
without waiting for networking APIs to enforce them.¶
In effect, the Multicast Application Port becomes a vestigial placeholder value, present only because the UDP packet format requires a value in the destination port field. At most, it signifies that the traffic is multicast, and even that is redundant, because the destination IP address already indicates this.¶
Use of this port is optional. In some circumstances, a dedicated port might still be preferable, such as when participants cannot meet the application requirements (Section 4) or when a firewall blocks a traffic pattern used by the application (Section 6).¶
An application sending multicast messages using the Multicast Application Port as the destination port can also send unicast messages, which necessarily use a different destination port (Section 3). Doing so can help mitigate the limitations of multicast delivery, particularly on wireless media [RFC9119].¶
Identifying each multicast application instantiation by its multicast group address requires that each instantiation be assigned its own multicast group address. How these addresses are assigned is outside the scope of this document. The need for a unique multicast group address per instantiation applies to all multicast traffic, whether it uses the Multicast Application Port or some other UDP port.¶
The network's multicast routing infrastructure determines where packets should be forwarded by examining the multicast group address of each IP packet, without regard for the destination port field in the UDP header. The goal of multicast routing is to deliver packets efficiently to all intended recipients, without wasting resources on networks and hosts that do not need them. If numerous multicast applications were to use the same multicast group address, differentiating their packets only by using different destination ports in the UDP header, then the network would expend resources to deliver all the traffic for all the applications to all hosts running any of those applications. In the extreme case, where all multicast applications share a single global-scope multicast group address and rely on the UDP destination port to tell their traffic apart, multicast would degenerate into a worldwide broadcast system, with every host receiving every packet and every network stack discarding all the unwanted packets after reception. Clearly, worldwide broadcast would not be scalable and would not be in keeping with the spirit of how IP multicast is expected to operate [RFC2365] [RFC3307] [RFC4007] [RFC4291] [RFC5771] [RFC7346].¶
Further information is available in the overview of the Internet multicast addressing architecture [RFC6308] and the following IANA registry groups:¶
This document requests assignment of UDP port 8738 (0x2222) with the service name "multicast-app".¶
ASM application instantiations using the Multicast Application Port are identified by their multicast destination address. SSM application instantiations using the Multicast Application Port are identified by their (S,G) channel, the combination of the unicast source address and the multicast destination address [RFC4607]. Because non-multicast traffic carries no such identifier, the Multicast Application Port MUST NOT be used as either a source or destination port of any non-multicast packet.¶
The Multicast Application Port MAY be used as a source port by an application that sends only multicast messages.¶
If an application also exchanges unicast messages, it is RECOMMENDED that the source port of its multicast messages be the port on which it receives unicast replies. Such arrangements require each participant to use at least two sockets: one bound to the Multicast Application Port (to receive multicast packets) and one bound to its unicast port (to receive unicast packets).¶
Applications that use the Multicast Application Port MUST meet the requirements in this section.¶
An application MUST NOT prevent other applications on the same host (including other copies of the same application) from receiving multicast packets addressed to the Multicast Application Port, regardless of whether those packets are addressed to the same multicast group address or different multicast group addresses.¶
The intent is that any applications that can each receive the desired multicast packets when running on separate hosts can also do so when running on the same host. For example, consider a temperature sensor that multicasts the current temperature once per minute. Two independent applications on one host, such as a display and a data logger, might both need to receive these updates. A "first come, first served" outcome is not acceptable. In that outcome, the first application to start receives the packets, and the second fails because the first has claimed exclusive access to the multicast group address, the UDP port, or both.¶
On hosts using POSIX-like socket APIs [POSIX],
sharing is typically accomplished by enabling
the SO_REUSEADDR socket option,
the SO_REUSEPORT socket option,
or both, as the platform requires.
The details vary by platform. For example,
Microsoft Windows provides SO_REUSE_MULTICASTPORT,
which may be preferable.¶
For efficiency, applications SHOULD use networking APIs in a way that minimizes reception of unwanted traffic that the application would then have to discard. An application using POSIX-like socket APIs MUST bind its multicast receiving socket to the application instantiation's multicast destination address and the Multicast Application Port, so that the host delivers only packets sent to that address. Applications MUST NOT bind their multicast receiving sockets to the wildcard (zero) address ([RFC3493], Section 3.8).¶
Note that with POSIX Sockets and similar APIs, just binding to
the appropriate multicast destination address is insufficient.
After binding, the application needs to use
IP_ADD_MEMBERSHIP, IPV6_JOIN_GROUP
[RFC3493],
MCAST_JOIN_GROUP, MCAST_JOIN_SOURCE_GROUP
[RFC3678], or equivalent,
to tell the networking stack that it should actually subscribe
to receive packets for the indicated multicast group address.
An application receiving traffic for more than one
multicast group address needs a separate
bound socket for each one.¶
Applications MUST discard all received non-multicast packets that use the Multicast Application Port as either a source or destination port.¶
As a further safeguard, applications MUST discard
any packet received on the Multicast Application Port
unless it matches the desired multicast group address
and, if one is specified, the desired interface.
Mechanisms for determining a received packet's
destination address and arrival interface include
IPV6_PKTINFO [RFC3542]
and, where available, IP_PKTINFO.¶
Applications MUST NOT send any non-multicast packets using the Multicast Application Port as either a source or destination port.¶
Hosts implementing this specification MUST require applications using the Multicast Application Port to use it non-exclusively, as described in Section 4.¶
The networking API MUST reject,
with the error EINVAL or equivalent,
any attempt to bind a socket to the Multicast Application Port if:¶
This requirement helps application developers discover and correct mistakes. The networking API MUST NOT try to be "helpful" by silently correcting a misbehaving application and automatically granting it shared access. Doing so would let an incorrectly written application work on platforms that silently correct the error, only to fail on older platforms that do not.¶
For efficiency, hosts SHOULD deliver to each application endpoint (e.g., a socket) only those packets that are addressed to a multicast group address the endpoint has joined and that arrive on the desired network interface, if one is specified. This filtering is not strictly required, because Section 4 requires applications to discard incorrectly delivered packets themselves, but it avoids the waste of delivering packets only to have them discarded.¶
Hosts MUST discard all received non-multicast packets that use the Multicast Application Port as either a source or destination port.¶
Hosts MUST cause any attempt to send a non-multicast packet
with the Multicast Application Port as its source or destination
port to fail with the error EINVAL or equivalent.¶
Some networking APIs allow applications to disable
the generation and checking of UDP checksums
[RFC6935] [RFC6936]
(e.g., the Linux SO_NO_CHECK socket option).
Where a networking API supports disabling UDP checksums,
the setting MUST apply per endpoint (socket), as on Linux,
rather than system-wide or per port.
Because different multicast protocols share the Multicast
Application Port, the port number cannot identify a
traffic flow for the purpose of selecting a checksum policy.¶
Many network firewalls (which operate on network infrastructure) and host firewalls (which operate on individual hosts) are configured to accept incoming messages as long as there was first an outgoing message using the same set of ports [RFC7288]. Consider the following sequence of messages:¶
A host firewall running on Host A (or a network firewall between Host A and Host B) may block Message 2 because Message 1 has port 8738 as its destination port but Message 2 does not have (and is not allowed to have) port 8738 as its source port.¶
While a firewall could be configured to accept Message 2, this configuration would have to be automated [RFC6887] because the use of dynamic ports makes manual configuration impractical even in small deployments. However, this automation leads to unacceptable security risks. For example, if a firewall were to respond to Message 1 by opening up the source port used in the message, a malicious application running on the host could open large holes in the firewall by repeatedly sending variations of Message 1 using different source ports.¶
Host firewalls could be configured to allow messages associated with a given application instantiation (instead of specific ports), but this approach would not work with a network firewall.¶
Ultimately, the current practice of assigning each multicast application its own port is more practical for any application that uses both multicast and unicast messages and could be deployed in an environment using firewalls. Firewall configuration with a dedicated port is straightforward: allow all messages using that port [RFC7605]. However, port-based rules offer limited assurance, because a rogue application can use the same port to masquerade as the legitimate trusted application.¶
Note to RFC Editor: please remove this entire section before publication, as well as the reference to RFC7942.¶
This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on the IETF's guidance on improving awareness of running code [RFC7942]. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist.¶
According to that guidance, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".¶
Prototypes for Linux, macOS, and Windows are available at
<https://github.com/ietf-wg-pim/draft-ietf-intarea-multicast-application-port/>.
These programs configure a socket to receive messages sent
to the Multicast Application Port using a specified
multicast address. Another program, such as socat,
can be used to send messages and demonstrate, with an
unmodified operating system, that the prototype will
(1) display messages sent to the Multicast Application
Port using the specified multicast address, and
(2) not display messages sent to the Multicast Application
Port but addressed to a different multicast address.¶
Firewall and QoS rules that reference ports are typically intended to match specific applications. Because application instantiations using the Multicast Application Port are identified by their multicast group address, rules referencing the Multicast Application Port SHOULD also consider any applicable network-layer address. A firewall rule that references only the Multicast Application Port would match all applications using that port, and would therefore be too broad.¶
Applications running on a host that does not protect the Multicast Application Port from misuse are vulnerable to a denial-of-service attack if another application claims exclusive access to the port. This vulnerability is not unique to the Multicast Application Port. Regardless of which port an application uses, a malicious application could claim exclusive access to that port first and thereby prevent the legitimate application from using it.¶
Systems that use POSIX-like socket APIs typically restrict binding multiple sockets to the same port. This can serve as a rudimentary security mechanism because it prevents other local applications from eavesdropping on an application's multicast traffic. A necessary side effect of using the Multicast Application Port is that applications can no longer rely on this protection. Applications that use the Multicast Application Port should consider incorporating additional security measures into their protocol. Note that the problem of local eavesdropping is typically no worse than the problem of on-path eavesdropping, so both threats can likely be mitigated by the same measure (e.g., encryption).¶
IANA is requested to assign the following port:¶
Service Name multicast-app Transport Protocol UDP Assignee IESG <iesg@ietf.org> Contact IETF Chair <chair@ietf.org> Description Multicast Application Port Reference This document Port Number 8738¶
IANA is requested to update its "Application for Service Names and User Port Numbers" form [IANA-APP] to reference this document and to include text asking applicants to consider whether using the Multicast Application Port would be appropriate. These changes will help applicants understand that a dedicated port may be unnecessary for their multicast protocol. If the applicant believes that their multicast protocol requires a dedicated port, the Designated Expert [RFC6335] is responsible for determining whether that is the case.¶
Special thanks to the National Marine Electronics Association for its contributions to developing marine industry standards and its support for this work.¶
The authors are grateful to the members of the PIM and INTAREA working groups for their review of this document, and in particular to the following individuals:¶