﻿<?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-pim-ipv6-zeroconf-assignment-04"
  ipr="trust200902"
  submissionType="IETF"
  consensus="true">

  <front>
    <title abbrev="Zeroconf Assignment of IPv6 Mcast Addrs">Zero-Configuration Assignment of IPv6 Multicast Addresses</title>

    <author fullname="Nate Karstens" initials="N" surname="Karstens">
      <organization>Garmin International</organization>

      <address>
        <email>nate.karstens@gmail.com</email>
      </address>
    </author>

    <author fullname="Dino Farinacci" initials="D" surname="Farinacci">
      <organization>lispers.net</organization>

      <address>
        <email>farinacci@gmail.com</email>
      </address>
    </author>

    <author fullname="Mike McBride" initials="M" surname="McBride">
      <organization>Futurewei</organization>

      <address>
        <email>michael.mcbride@futurewei.com</email>
      </address>
    </author>

    <date day="15" month="March" year="2025"/>

    <abstract>
      <t>Describes a zero-configuration protocol for dynamically assigning IPv6 multicast addresses. Applications randomly assign multicast group IDs from a specified range and prevent collisions by using Multicast DNS (mDNS) to publish records in a new "eth-addr.arpa" special-use domain. This protocol satisfies all of the criteria listed in draft-ietf-pim-zeroconf-mcast-addr-alloc-ps.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t><xref target="I-D.ietf-pim-zeroconf-mcast-addr-alloc-ps"/> includes a problem statement and requirements for a zero-configuration method for dynamically assigning multicast addresses. This document describes a process that fulfills these requirements by having applications randomly assign IPv6 multicast group IDs from a specified range and using mDNS <xref target="RFC6762"/> to prevent collisions.</t>

      <t>Note that DNS-based Service Discovery (DNS-SD) <xref target="RFC6763"/> uses several different DNS record types, published using either Unicast or Multicast DNS, to facilitate service discovery. This document uses a single DNS record type (PTR), published using Multicast DNS, to coordinate IPv6 multicast address assignment in a zero-configuration environment. The DNS records in this protocol may be published alongside records for other domain name services, such as DNS-SD, or they may be published alone. mDNS is used in favor of a new protocol with the expectation that functionality for address assignment can be achieved using existing mDNS implementations.</t>

      <section anchor="requirements">
        <name>Requirements Language</name>
        <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="Procedure">
      <t>When an application is preparing to transmit a multicast stream, it first generates a random group ID in the range <tt>0x90000000-0x9FFFFFFF</tt>, which IANA is REQUESTED to assign from the "Dynamic Multicast Group IDs" registry (see <xref target="iana"/>). It combines this with the Interface Identifier (IID) of the intended source address for the multicast stream to generate a link-scoped IPv6 multicast address <xref target="RFC4489"/>. The application then calculates the multicast Ethernet address that will be used to transmit the data (<xref target="RFC2464" sectionFormat="comma" section="7"/>) and uses that to construct a string like a reverse-mapping domain, using a new <tt>"eth-addr.arpa"</tt> special-use domain.</t>

      <t>For example, given a source address of <tt>fe80::a12:34ff:fe56:7890</tt>, the IPv6 multicast address may be <tt>ff32:00ff:a12:34ff:fe56:7890:9abc:def0</tt>, the multicast Ethernet address <tt>33:33:9A:BC:DE:F0</tt>, and the resulting string is <tt>"0.f.e.d.c.b.a.9.3.3.3.3.eth-addr.arpa"</tt>.</t>

      <t>The application then uses the mDNS probing algorithm described in <xref target="RFC6762" sectionFormat="comma" section="8.1"/> to continuously query for a PTR record with the same name as the generated string. If the probing algorithm completes without any conflict, then the application begins advertising its own unique PTR record using that name. The <tt>PTRDNAME</tt> field consists of a unique application identifier, in the form of a DNS label, followed by the device's host name (for example, "application.example.local."). Integrating a unique identifier in this manner allows for multiple applications to be on the same host. Note that A/AAAA records may also be published for this host name ("example.local."), though this is not a requirement for this design.</t>

      <t>Because this protocol is focused specifically on allocating IPv6 multicast addresses, mDNS records MUST be published using IPv6, but MAY also be published using IPv4.</t>

      <t>Once the PTR record is advertised, the host may then begin transmitting multicast data using the generated address.</t>

      <t>The application shall retain the group ID value and use it the next time the multicast stream is transmitted. This allows the network to quickly settle on a configuration that will never have another collision as long as the network is unchanged.</t>

      <t>If a conflict is detected at any point, then the application stops transmitting that multicast stream and starts the process over using a different group ID.</t>

      <t>The host may optionally monitor the bus for traffic that uses the same destination multicast Ethernet address, but a different destination multicast IPv6 address. If this is detected, then the application responds the same as a collision.</t>

      <t>While intended primarily for allocating IPv6 multicast addresses on the same subnet (link-local scope), the same technique could also apply to a larger network as long as mDNS traffic is routed between subnets (for any scope excluding global scope).</t>

      <section title="Veto Records">
        <t><xref target="I-D.ietf-pim-zeroconf-mcast-addr-alloc-ps"/> describes collisions occurring in the network infrastructure. When an infrastructure component detects a collision it cannot resolve, it triggers a conflict with the application by publishing a veto record. A veto record is a unique PTR record using the string generated for the address as its name and the <tt>PTRDNAME</tt> field set to the string <tt>"veto"</tt>, formatted as a DNS label. The veto record is published without probing.</t>

        <t>Applications respond to the conflict the same as to a collision. The application retains its new group ID, so the same conflict is not repeated in the future.</t>
      </section>
    </section>

    <section title="Evaluation of Solution">
      <t><xref target="I-D.ietf-pim-zeroconf-mcast-addr-alloc-ps"/> contains a list of criteria to evaluate potential solutions. The protocol described in this document satisfies all of the required criteria.</t>

      <t>However, because mDNS is designed to be a low-bandwidth protocol, it can take a signficant amount of time to detect a record collision after a network partition is repaired. This is not a concern on networks where all multicast streams are established before any likely partition event because all group IDs will have been selected and stored for future use.</t>

      <t>It is a greater concern on networks where multicast streams may be established at any time. Deployments on these networks may consider engaging a detection mechanism and prompting hosts to send unsolicited mDNS response messages when the partition is repaired.</t>

      <t>The protocol described in this document also satisfies the recommended criteria, to the extent that a deployment supports publishing mDNS-based DNS-SD records across multiple subnets (see <xref target="RFC8766"/>).</t>
    </section>

    <section title="IANA Considerations" anchor="iana">
      <t>IANA should allocate a block of group IDs from the "Dynamic Multicast Group IDs" registry in the "IPv6 Multicast Address Space Registry" registry group that was created by <xref target="I-D.ietf-pim-updt-ipv6-dyn-mcast-addr-grp-id"/>. The range of this block should be <tt>0x90000000-0x9FFFFFFF</tt> and the description should be the title of this document.</t>

      <t>The special-use domain <tt>"eth-addr.arpa"</tt> should be registered in the .arpa registry (https://www.iana.org/domains/arpa) and the "Special-Use Domain Names" registry (https://www.iana.org/assignments/special-use-domain-names). This domain should not be delegated.</t>

      <section title="Domain Name Reservation Considerations">
        <t>The "eth-addr.arpa." domain is effectively a reverse-mapping domain and so has the same considerations as the reverse-mapping domains listed in <xref target="RFC6761" sectionFormat="comma" section="6.1"/>.</t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>This algorithm only works in environments where all hosts are cooperating. Malicious hosts could deny service by either repeatedly responding to queries for a given address or by flooding the network with traffic.</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>Thanks also to the members of the PIM working group for their early brainstorming sessions and review of this draft, and to Esko Dijk for his review of the draft.</t>
    </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.2464.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4489.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6761.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6762.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-pim-zeroconf-mcast-addr-alloc-ps.xml"/>
    </references>
    <references title="Informative References">
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6763.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8766.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-pim-updt-ipv6-dyn-mcast-addr-grp-id.xml"/>
    </references>
  </back>
</rfc>
