<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="info" ipr="trust200902" number="8501" submissionType="IETF" consensus="yes">
  <front>
    <title abbrev="Reverse DNS in IPv6 for ISPs">Reverse DNS in IPv6 for Internet
    Service Providers</title>

    <author fullname="Lee Howard" initials="L" surname="Howard">
      <organization>Retevia</organization>

      <address>
        <postal>
          <street></street>


          <city>Fairfax</city>

          <region>VA</region>

          <code>22032</code>

          <country>United States of America</country>
        </postal>

        <phone/>

        <email>lee.howard@retevia.net</email>


      </address>
    </author>

    <date month="November" year="2018"/>



    <abstract><t> In IPv4, Internet Service Providers (ISPs) commonly provide IN-ADDR.ARPA information for their customers by prepopulating the zone with one PTR record for every available address.  This practice does not scale in IPv6.  This document analyzes different approaches and considerations for ISPs in managing the IP6.ARPA zone.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">


      <t><xref target="RFC1912" /> recommended that "every Internet-reachable
      host should have a name" and says "Failure to have matching PTR and A
      records can cause loss of Internet services similar to not being
      registered in the DNS at all". While the need for a PTR record and for
      it to match is debatable as a best practice, some network services (see
      <xref target="considerations" />) still do rely on PTR lookups, and
      some check the source
      address of incoming connections and verify that the PTR and A records
      match before providing service.</t>

      <t>Individual Internet users on the residential or consumer scale,
      including small and home businesses, are constantly connecting to or moving around 
      the Internet.
      For large ISPs who serve residential
      users, maintenance of individual PTR records is impractical.
      Administrators at ISPs should consider whether customer PTR records are
      needed, and if so, evaluate methods for responding to reverse DNS queries 
      in IPv6.</t>

      <section title="Reverse DNS in IPv4">

        <t>ISPs that provide access to many residential users typically assign
        one or a few IPv4 addresses to each of those users and populate an
        IN-ADDR.ARPA zone with one PTR record for every IPv4 address. Some
        ISPs also configure forward zones with matching A records so that
        lookups match. For instance, if an ISP Example.com aggregated
        192.0.2.0/24 at a network hub in one region, the reverse zone might 
   	look like:</t>

        <t>1.2.0.192.IN-ADDR.ARPA. IN PTR 1.string.region.example.com.</t>

        <t>2.2.0.192.IN-ADDR.ARPA. IN PTR 2.string.region.example.com.</t>

        <t>3.2.0.192.IN-ADDR.ARPA. IN PTR 3.string.region.example.com.</t>

        <t>.</t>

        <t>.</t>

        <t>.</t>

        <t>254.2.0.192.IN-ADDR.ARPA. IN PTR 254.string.region.example.com.</t>

        <t>The conscientious Example.com might then also have a zone:</t>

        <t>1.string.region.example.com. IN A 192.0.2.1</t>

        <t>2.string.region.example.com. IN A 192.0.2.2</t>

        <t>3.string.region.example.com. IN A 192.0.2.3</t>

        <t>.</t>

        <t>.</t>

        <t>.</t>

        <t>254.string.region.example.com. IN A 192.0.2.254</t>

        <t>Many ISPs generate PTR records for all IP addresses used for
        customers, and many create the matching A record.</t>
      </section>

      <section title="Reverse DNS Considerations in IPv6">

        <t>A sample entry for 2001:0db8:0f00:0000:0012:34ff:fe56:789a might
        be:</t>

        <t>a.9.8.7.6.5.e.f.f.f.4.3.2.1.0.0.0.0.0.0.0.0.f.0.8.b.d.0.1.0.0.2
        .IP6.ARPA. IN PTR 1.string.region.example.com.</t>

        <t>ISPs will often delegate an IPv6 prefix to their customers. Since
        2^^80 possible addresses could be configured in a single
        /48 zone alone, it is impractical to
        write a zone with every possible address entered, even with automation. If 1000 entries
        could be written per second, the zone would still not be complete
        after 38 trillion years.</t>

        <t>Furthermore, it is often impossible to associate hostnames and
        addresses, since the 64 bits in the Interface Identifier portion of
        the address are frequently assigned using Stateless Address
	Autoconfiguration (SLAAC) <xref target="RFC4862" /> when the host
	comes online, and they may be short-lived.</t>

        <t><xref target="RFC1912" /> is an Informational RFC that says "PTR records must
        point back to a valid A record" and further that the administrator
        should "Make sure your PTR and A records match." Herein are 
 	considerations for how to follow this advice for AAAA and PTR records.</t>
      </section>

    </section>


    <section title="Alternatives in IPv6">

      <t>Several options exist for providing reverse DNS in IPv6. All of these
      options also exist for IPv4, but the scaling problem is much less severe
      in IPv4. Each option should be evaluated for its scaling ability,
      compliance with existing standards and best practices, and
      availability in common systems.</t>

      <section title="Negative Response">

        <t>Some ISP DNS administrators may choose to provide only an NXDOMAIN
        response to PTR queries for subscriber addresses. In some ways, this
        is the most accurate response, since no name information is known
        about the host. However, providing a negative response to PTR
        queries does not satisfy the expectation in <xref target="RFC1912" /> for entries to match. Users of services that are dependent on a successful lookup
        will have a poor experience. For instance, some web services and Secure Shell (SSH)
        connections wait for a DNS response, even NXDOMAIN, before responding.
        For the best user experience, then, it is important to return a response,
        rather than time out with no answer. On the other hand, external mail
        servers are likely to reject connections, which might be an advantage
        in fighting spam. When evaluating this option, DNS administrators
	should consider the uses for
        reverse DNS records and the number of services affecting the number of
        users.</t>
      </section>



      <section title="Wildcard Match" anchor="wildcard">


        <t>The use of wildcards in the DNS is described in <xref target="RFC4592" />, and
        their use in IPv6 reverse DNS is described in <xref target="RFC4472" />.</t>

        <t>While recording all possible addresses is not scalable, it may be
        possible to record a wildcard entry for each prefix assigned to a
        customer. Consider also that "inclusion of wildcard NS RRSets in a
        zone is discouraged, but not barred". <xref target="RFC4592" /></t>

        <t>This solution generally scales well. However, since the response
        will match any address in the wildcard range (/48, /56, /64, etc.), a
        forward DNS lookup on the response given will not be able to return
        the same hostname. This method therefore fails the expectation in
        <xref target="RFC1912" /> that forward and reverse will match. DNSSEC
	<xref target="RFC4035" />
        scalability is limited to signing the wildcard zone, which may be
        satisfactory.</t>
      </section>



      <section title="Dynamic DNS">


        <t>One way to ensure that forward and reverse records match is for hosts to
        update DNS servers dynamically once interface configuration is
	complete (whether by SLAAC, DHCPv6, or other means), as
	described in <xref target="RFC4472" />.
        Hosts would need to provide both AAAA and PTR updates and would need
        to know which servers would accept the information.</t>

        <t>This option should scale as well or as poorly as IPv4 dynamic DNS
        (DDNS) does. Dynamic DNS may not scale effectively in large ISP networks
        that have no single master name server, but a single master server is
        not best practice. The ISP's DNS system may provide a point for
	Denial-of-Service attacks, including many attempted DDNS
	updates. Accepting
        updates only from authenticated sources may mitigate this risk, but
        only if authentication itself does not require excessive overhead. No
        authentication of dynamic DNS updates is inherently provided.
        Implementers should therefore consider use of TSIG <xref target="RFC2845" />, or at least
        ingress filtering, so that updates are only accepted from customer address
        space from internal network interfaces. They should also rate limit the number of
        updates from a customer per second and consider impacts on
        scalability. UDP is allowed per <xref target="RFC2136" />, so connection reliability is
        not assured, though the host should expect an ERROR or NOERROR message
        from the server; TCP provides transmission control, but the updating 
	host would need to be configured to use TCP.</t>

        <t>Administrators may want to consider user creativity if they provide
        hostnames, as described in <xref target="user-creativity" />, "User Creativity".</t>

        <t>There is no assurance of uniqueness if multiple hosts try to update
        with the same name ("mycomputer.familyname.org"). There is no standard
        way to indicate to a host what server it should send DDNS updates
        to; the master listed in the SOA is often assumed to be a DDNS server,
 	but this may not scale.</t>

        <section title="Dynamic DNS from Individual Hosts">

          <t>In the simplest case, a residential user will have a single host
          connected to the ISP. Since the typical residential user cannot
          configure IPv6 addresses or resolving name servers on their hosts,
          the ISP should provide address information conventionally -- i.e.,
          using their normal combination of Router Advertisements (RAs), DHCP, etc.
	  The ISP should also provide a DNS Recursive Name Server and Domain Search 
	  List as described in <xref target="RFC3646" /> or <xref
	  target="RFC8106" />. In determining its Fully Qualified Domain Name
	  (FQDN), a host will typically use a domain 
	  from the Domain Search List. This is an overloading of the parameter;
	  multiple domains could be listed, since hosts may need to search for 
	  unqualified names in multiple domains without necessarily being a 
	  member of those domains. Administrators should consider whether the 
	  Domain Search List actually provides an appropriate DNS suffix(es) 
	  when considering use of this option. For the purposes of dynamic DNS, the
          host would concatenate its local hostname (e.g., "hostname") plus
          the domain(s) in the Domain Search List (e.g.,
          "customer.example.com"), as in "hostname.customer.example.com".</t>

          <t>Once it learns its address and has a resolving name server, the
          host must perform an SOA lookup on the IP6.ARPA record to be added
	  in order to find the owner and eventually the server that is authoritative for
          the zone (which might accept dynamic updates). Several recursive
          lookups may be required to find the longest prefix that has been
          delegated. The DNS administrator must designate the Primary Master
          Server for the longest match required. Once found, the host sends
          dynamic AAAA and PTR updates using the concatenation defined above
          ("hostname.customer.example.com").</t>

          <t>In order to use this alternative, hosts must be configured to use
          dynamic DNS. This is not default behavior for many hosts, which is
          an inhibitor for a large ISP. This option may be scalable,
          although registration following an outage may cause significant
          load, and hosts using privacy extensions <xref target="RFC4941" /> may update
          records daily. It is up to the host to provide matching forward and
          reverse records and update them when the address changes.</t>
        </section>

        <section title="Dynamic DNS through Residential Gateways">

          <t>Residential customers may have a gateway, which may provide
          DHCPv6 service to hosts from a delegated prefix. ISPs should provide
          a DNS Recursive Name Server and Domain Search List to the gateway,
          as described above and in <xref target="RFC3646" /> and <xref
	  target="RFC8106" />. There are two
          options for how the gateway uses this information. The first option
          is for the gateway to respond to DHCPv6 requests with the same DNS
          Recursive Name Server and Domain Search List provided by the ISP.
          The alternate option is for the gateway to relay dynamic DNS updates
          from hosts to the servers and domain provided by the ISP. Host
          behavior is unchanged; the host sends the same dynamic updates,
          either to the ISP's server (as provided by the gateway) or to the
          gateway for it to forward. The gateway would need to be capable of
	  and configured to use dynamic DNS.</t>
        </section>



        <section title="Automatic DNS Delegations" anchor="auto-DNS">


          <t>An ISP may delegate authority for a subdomain, such as
          "customer12345.town.AW.customer.example.com" or
          "customer12345.example.com", to the customer's gateway. Each domain
          thus delegated must be unique within the DNS. The ISP may also then
          delegate the IP6.ARPA zone for the prefix delegated to the customer,
          as in (for 2001:db8:f00::/48) "0.0.f.0.8.b.d.0.1.0.0.2.IP6.ARPA".
          Then, the customer could provide updates to their own gateway, with
          forward and reverse. However, individual hosts connected directly to
          the ISP rarely have the capability to run DNS for themselves;
          therefore, an ISP can only delegate to customers with gateways
          capable of being authoritative name servers. If a device requests a
          DHCPv6 Prefix Delegation, that may be considered a reasonably
          reliable indicator that it is a gateway, rather than an individual
          host. It is not necessarily an indicator that the gateway is capable
          of providing DNS services and therefore cannot be relied upon as a
          way to test whether this option is feasible. In fact, this kind of
          delegation will not work for devices complying with <xref
	  target="RFC6092" />, which
          includes the requirement, "By DEFAULT, inbound DNS queries received
          on exterior interfaces MUST NOT be processed by any integrated DNS
          resolving server".</t>

          <t>If the customer's gateway is the name server, it provides its own
          information to hosts on the network, as described in <xref
	  target="RFC2136" />, which is often done for enterprise
          networks.</t>

          <t>An ISP could provide authoritative responses as a secondary
          server to the customer's master server. For instance, the home
          gateway name server could be the master server, with the ISP
          providing the only published NS authoritative servers.</t>

          <t>To implement this alternative, users' residential gateways must
          be capable of acting as authoritative name servers capable of
          dynamic DNS updates. There is no mechanism for an ISP to dynamically
          communicate to a user's equipment that a zone has been delegated, so
          user action would be required. Most users have neither the equipment
          nor the expertise to run DNS servers, so this option is unavailable
          to the residential ISP.</t>
        </section>

        <section title="Generate Dynamic Records">

          <t>An ISP's name server that receives a dynamic forward or reverse
          DNS update may create a matching entry. Since a host capable of
          updating one is generally capable of updating the other, this should
          not be required, but redundant record creation will ensure that a record
          exists. ISPs implementing this method should check whether a record
          already exists before accepting or creating updates.</t>

          <t>This method is also dependent on hosts being capable of providing
          dynamic DNS updates, which is not default behavior for many
          hosts.</t>
        </section>


        <section title="Populate from DHCP Server" anchor="Populate-DHCP">

          <t>An ISP's DHCPv6 server may populate the forward and reverse zones
          when the DHCP request is received if the request contains enough
          information  <xref target="RFC4704" />.</t>

          <t>However, this method will only work for a single host address
          (IA_NA); the ISP's DHCP server would not have enough information to
          update all records for a prefix delegation. If the zone authority is
          delegated to a home gateway that used this method, the gateway
          could update records for residential hosts. To implement this
          alternative, users' residential gateways would have to support the
          FQDN DHCP option and would have to either have the zones
          configured or send DDNS messages to the ISP's name server.</t>
        </section>

        <section title="Populate from RADIUS Server">

          <t>A user may receive an address or prefix from a RADIUS server <xref
	  target="RFC2865" />, the details of which may be recorded via RADIUS Accounting
          data <xref target="RFC2866" />. The ISP may populate the forward and reverse zones
          from the accounting data if it contains enough information. This
          solution allows the ISP to populate data concerning allocated
          prefixes as per <xref target="wildcard" /> (wildcards) and customer premise
	  equipment (CPE) endpoints. However, as with <xref
	  target="Populate-DHCP" />, it does not allow the ISP to 
	  populate information concerning individual hosts.</t>
        </section>

      </section>


      <section title="Delegate DNS">

        <t>For customers who are able to run their own DNS servers, such as
        commercial customers, often the best option is to delegate the reverse
        DNS zone to them, as described in <xref target="RFC2317" /> (for IPv4). However, since
        most residential users have neither the equipment nor the expertise to
        run DNS servers, this method is unavailable to residential ISPs.</t>

        <t>This is a general case of the specific case described in <xref
	target="auto-DNS" />. All of the same considerations still apply.</t>
      </section>

      <section title="Dynamically Generate PTR When Queried (&quot;On the
		      Fly&quot;)" anchor="on-the-fly">

        <t>Common practice in IPv4 is to provide PTR records for all
        addresses, regardless of whether a host is actually using the address.
        In IPv6, ISPs may generate PTR records for all IPv6 addresses as the
        records are requested. Several DNS servers are capable of this.</t>

        <t>An ISP using this option should generate a PTR record on demand
        and cache or prepopulate the forward (AAAA) entry for the duration of
        the Time to Live of the PTR. Similarly, the ISP would prepopulate
        the PTR following a AAAA query. To reduce exposure to a
	Denial-of-Service attack, state or storage should be
	limited. Alternatively, 
        if an algorithm is used to generate a unique name, it can be employed 
        on the fly in both directions. This option has the advantage of 
	assuring matching forward and reverse entries while being simpler 
	than dynamic DNS.  Administrators should consider whether the lack 
	of user-specified hostnames is a drawback. It may be possible to 
	allow user-specified hostnames for some records and generate others 
	on the fly; looking up a record before generating on the fly may slow 
	responses or may not scale well.</t>

        <t>DNSSEC <xref target="RFC4035" /> signing records on the fly may increase load;
        unsigned records can indicate that these records are less trusted,
        which might be acceptable.</t>

        <t>Another consideration is that the algorithm used for generating the
        record must be the same on all servers for a zone. In other words, any
        server for the zone must produce the same response for a given query.
        Administrators managing a variety of rules within a zone might find it
        difficult to keep those rules synchronized on all servers.</t>
      </section>


    </section>

    <section title="Manual User Updates">

	<t>It is possible to create a user interface, such as a web page, that
	would allow end users to enter a hostname to associate with an 
	address. Such an interface would need to be authenticated; only the
	authorized user could add/change/delete entries. If the ISP changes prefixes assigned to
	customers, the interface would need to specify only the host bits. The
	backend would therefore need to be integrated
	with prefix assignments so that when a new prefix was assigned to a
	customer, the DNS service would look up user-generated hostnames,
	delete the old record, and create the new one.</t>

	<t>Considerations about some records being static and others dynamic
	or dynamically generated (<xref target="on-the-fly" />) and the creativity of users
	(<xref target="user-creativity" />) still apply.</t>
    </section>

    <section title="Considerations and Recommendations" anchor="considerations">

      <t>There are six common uses for PTR lookups:</t>

      <t>Rejecting mail: A PTR with a certain string may indicate
      "This host is not a mail server", which may be useful for rejecting
      probable spam. The absence of a PTR leads to the desired behavior.</t>

      <t>Serving ads: "This host is probably in town.province." An ISP that
      does not provide PTR records might affect somebody else's
      geolocation (also see privacy consideration about location).</t>

      <t>Accepting SSH connections: The presence of a PTR may be inferred to
      mean "This host has an administrator with enough clue to set up forward
      and reverse DNS". This is a poor inference.</t>

      <t>Log files: Many systems will record the PTR of remote hosts in their
      log files to make it easier when reading logs later to see what network
      the remote host uses.</t>

      <t>Traceroute: The ability to identify an interface and name of any
      intermediate node or router is important for troubleshooting.</t>

      <t>Service discovery: <xref target="RFC6763" /> specifies "DNS-Based Service 
      Discovery", and Section 11 specifically describes how PTRs are used.</t>

      <t>As a general guideline, when address assignment and name are under
      the same authority, or when a host has a static address and name, AAAA
      and PTR records should exist and match. For residential users, if these
      use cases are important to the ISP, the administrator will then
      need to consider how to provide PTR records.</t>

      <t>The best accuracy would be achieved if ISPs delegated authority along
      with address delegation, but residential users rarely have domain names
      or authoritative name servers.</t>

      <t>Dynamic DNS updates can provide accurate data, but there is no
      standard way to indicate to residential devices where to send updates,
      whether the hosts support DDNS, or whether it scales.</t>

      <t>An ISP has no knowledge of its residential users' hostnames and
      therefore can either provide a wildcard response or a dynamically
      generated response. A valid negative response (such as NXDOMAIN) is a
      valid response if the four cases above are not essential; delegation
      where no name server exists should be avoided.</t>
    </section>


    <section title="Security and Privacy Considerations">

      <section title="Using Reverse DNS for Security">

        <t>Some people think the existence of reverse DNS records, or matching
        forward and reverse DNS records, provides useful information about the
        hosts with those records. For example, one might infer that the
        administrator of a network with properly configured DNS records was
        better informed, and by further inference more responsible, than the
        administrator of a less thoroughly configured network. For instance,
        most email providers will not accept incoming connections on port 25
        unless forward and reverse DNS entries match. If they match, but
        information higher in the stack (for instance, mail source) is
        inconsistent, the packet is questionable. However, these records may be easily
        forged unless DNSSEC or other measures are taken. The string
        of inferences is questionable and may become unneeded if other means
        for evaluating trustworthiness (such as positive reputations) become
        predominant in IPv6.</t>

        <t>Providing location information in PTR records is useful for
        troubleshooting, law enforcement, and geolocation services, but for
        the same reasons, it can be considered sensitive information.</t>
      </section>


      <section title="DNS Security with Dynamic DNS">

        <t>The security considerations for using dynamic DNS are described in
        <xref target="RFC3007" />. DNS Security Extensions are documented in
	<xref target="RFC4033" />.</t>

        <t>Interactions with DNSSEC are described throughout this
        document.</t>
      </section>

      <section title="Considerations for Other Uses of the DNS">

        <t>Several methods exist for providing encryption keys in the DNS. Any
        of the options presented here may interfere with these key
        techniques.</t>
      </section>

      <section title="Privacy Considerations" anchor="privacy">

 	<t>Given the considerations in <xref target="RFC8117" />, hostnames that provide 
	information about a user compromise that user's privacy. Some 
	users may want to identify their hosts using user-specified
	hostnames, but the default behavior should not be to identify a
	user, their location, their connectivity, or other information
	in a PTR record.</t> 

      </section>

      <section title="User Creativity" anchor="user-creativity">
        <t>Though not precisely a security consideration, administrators may
        want to consider what domain will contain the records and who will 
        provide the names. If subscribers provide hostnames, they may provide 
        inappropriate strings. Consider "ihate.example.com" or 
        "badword.customer.example.com" or 
        "celebrityname.committed.illegal.acts.example.com".</t>
      </section>
    </section>

    <section title="IANA Considerations">
<t>This document has no IANA actions.</t>

    </section>
  </middle>

  <back>

      <references title="Normative References">


<?rfc include="reference.RFC.1912" ?>
<?rfc include="reference.RFC.2136" ?>
<?rfc include="reference.RFC.2845" ?>
<?rfc include="reference.RFC.2865" ?>
<?rfc include="reference.RFC.2866" ?>
<?rfc include="reference.RFC.3007" ?>
<?rfc include="reference.RFC.3646" ?>
<?rfc include="reference.RFC.4033" ?>
<?rfc include="reference.RFC.4035" ?>
<?rfc include="reference.RFC.4592" ?>
<?rfc include="reference.RFC.4704" ?>
<?rfc include="reference.RFC.4862" ?>
<?rfc include="reference.RFC.4941" ?>
<?rfc include="reference.RFC.8106" ?>
<?rfc include="reference.RFC.6763" ?>
      </references>


      <references title="Informative References">

<?rfc include="reference.RFC.2317" ?>
<?rfc include="reference.RFC.4472" ?>
<?rfc include="reference.RFC.6092" ?>
<?rfc include="reference.RFC.8117" ?>


      </references>



    <section title="Acknowledgements" numbered="no">

      <t>The author would like to thank Alain Durand, JINMEI Tatuya, David
      Freedman, Andrew Sullivan, Chris Griffiths, Darryl Tanner, Ed Lewis,
      John Brzozowski, Chris Donley, Wes George, Jason Weil, John Spence, Ted
      Lemon, Stephan Lagerholm, Steinar Haug, Mark Andrews, Chris
      Roosenraad, Fernando Gont, John Levine, and many others who discussed
      and provided suggestions for this document.</t>
    </section>

  </back>
</rfc>
