﻿<?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 category="info" docName="draft-karstens-dnssd-dns-msd-01" updates="" ipr="trust200902" submissionType="IETF">

  <front>
    <title abbrev="DNS-MSD">DNS-Based Multicast Stream Discovery</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="26" month="March" year="2023"/>

    <abstract>
      <t>This document describes an application of DNS-SD for the advertisement and discovery of multicast streams. This is especially useful with multicast streams that use a dynamically-assigned multicast address.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>Several documents describe locally-scoped or administratively-scoped allocation of multicast addresses. Some examples of this include:</t>

      <ul>
        <li><xref target="RFC2365"/></li>
        <li><xref target="RFC3307" sectionFormat="parens" section="4.3"/></li>
        <li><xref target="RFC4489"/></li>
        <li><xref target="I-D.karstens-pim-ipv6-zeroconf-assignment"/></li>
      </ul>

      <t>These documents do not specify a mechanism for how these multicast streams should be advertised or discovered. This document specifies an application of DNS-Based Service Discovery (DNS-SD, <xref target="RFC6763"/>) for advertisement and discovery of multicast streams.</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="Stream Instance Enumeration and Resolution">
      <t>DNS-SD uses PTR, SRV, and TXT records to describe a service. DNS-MSD also makes use of these records to describe a multicast stream, but makes a few modifications to the method described in <xref target="RFC6763"/>.</t>
      
      <t>First, DNS-MSD uses a new "mcast.arpa." special use domain in all records to indicate that the advertised service is a multicast stream.</t>
      
      <t>The second label in the &lt;Service&gt; portion of a Service Instance Name MUST be "_udp".</t>

      <t>The port advertised in the SRV record has a restriction not seen with unicast services. Unicast services can dynamically allocate a free port for the service. Multicast streams cannot use a dynamic port because there is no guarantee that applications on all clients can bind to the dynamic port. If all devices on the network are purpose-built for the application, then multicast streams may use a pre-determined port in the dynamic range. Otherwise, multicast streams should use a port registered with IANA. In either case, the chosen port is advertised in the SRV record.</t>

      <t>The hostname advertised in the SRV, A, and AAAA records is a combination of the &lt;Instance&gt; portion of the Service Instance Name, the hostname of the stream's origin, and the "mcast.arpa." special use domain name.</t>

      <t>Finally, the address advertised in A and AAAA records is the chosen multicast address. The "in-addr.arpa." and "ip6.arpa." records advertised for reverse lookup also reflect the chosen multicast address.</t>
    </section>

    <section title="Notes">
      <t>When used with Mulicast DNS <xref target="RFC6762"/>, DNS-MSD can provide a zero-configuration mechanism for advertising and discovering multicast streams.</t>

      <t>Nothing in DNS-MSD restricts its usage to link-local scope multicast addresses. If Multicast&nbsp;DNS is needed to provide zero-configuration address advertisement in other scopes, then the recommendation is to consider using it with larger-scoped addresses (see <xref target="RFC7558"/> and note in <xref target="RFC6762" section="22"/>).</t>
    </section>

    <section title="Example">
      <t>An example host has an Ethernet MAC address of <tt>00-00-5E-00-53-00</tt>. This is used to create IPv6 link local address <tt>fe80::200:5eff:fe00:5300</tt>. It creates a link-scoped IPv6 multicast address <tt>ff32:ff:200:5eff:fe00:5300:aabb:ccdd</tt> to transmit with. Its hostname is "example", the service name is "_heartbeat._udp", service instance is "instance", and by pre-agreement all hosts on the network reserve port 62000 for this protocol. It has no additional data to include in a TXT record. The following DNS records are created:</t>
      <sourcecode>
_heartbeat._udp 4500 IN PTR instance._heartbeat._udp.mcast.arpa.
instance._heartbeat._udp.mcast.arpa. \
    120 IN SRV 0 0 62000 instance.example.mcast.arpa.
instance._heartbeat._udp.mcast.arpa. 4500 IN TXT ""
instance.example.mcast.arpa. \
    120 IN AAAA ff32:ff:200:5eff:fe00:5300:aabb:ccdd
d.d.c.c.b.b.a.a.0.0.3.5.0.0.e.f. \
    f.f.e.5.0.0.2.0.f.f.0.0.2.3.f.f. \
    ip6.arpa. 120 PTR instance.example.mcast.arpa.
      </sourcecode>
      <t>Note that the backslash ('\') denotes a line that was divided for publication.</t>
    </section>

    <section title="IANA Considerations">
      <t>The special-use domain "mcast.arpa" should be registered in the "Special-Use Domain Names" registry <eref target="https://www.iana.org/assignments/special-use-domain-names"/>.</t>

      <section title="Domain Name Reservation Considerations">
        <t>Domain name reservation considerations for "mcast.arpa." as required by <xref target="RFC6761" section="5"/>:</t>
        <ol>
          <li>Users will not use the "mcast.arpa." domain directly.</li>
          <li>Applications SHOULD recognize the "mcast.arpa." domain and reject any use in a unicast context.</li>
          <li>Name resolution APIs and libraries SHOULD resolve the "mcast.arpa." domain to the multicast address that carries the service's data.</li>
          <li>Caching DNS servers SHOULD NOT recognize the "mcast.arpa." domain as special.</li>
          <li>Authoritative DNS servers SHOULD NOT recognize the "mcast.arpa." domain as special.</li>
          <li>DNS server operators SHOULD be aware of the "mcast.arpa." domain's use in resolving multicast services.</li>
          <li>DNS registries/registrars MUST NOT allow the "mcast.arpa." domain to be registered to any person or entity.</li>
        </ol>
      </section>
    </section>

    <section title="Security Considerations">
      <t>This document does not have any additional security notes beyond what is described in <xref target="RFC6763" section="15"/>.</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>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.2119'?>
      <?rfc include='reference.RFC.6763'?>
      <?rfc include='reference.RFC.8174'?>
    </references>
    <references title="Informative References">
      <?rfc include='reference.I-D.karstens-pim-ipv6-zeroconf-assignment'?>
      <?rfc include='reference.RFC.2365'?>
      <?rfc include='reference.RFC.3307'?>
      <?rfc include='reference.RFC.4489'?>
      <?rfc include='reference.RFC.6761'?>
      <?rfc include='reference.RFC.6762'?>
      <?rfc include='reference.RFC.7558'?>
    </references>
  </back>
</rfc>
