<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" category="std" docName="draft-bretelle-dnsop-recursive-iprange-location-00" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.3.0 -->
  <front>
    <title abbrev="dns-recursive-iploc">Recursive Resolver </title>
    <seriesInfo name="Internet-Draft" value="draft-bretelle-dnsop-recursive-iprange-location-00"/>
    <author initials="E." surname="Bretelle" fullname="Emmanuel Bretelle">
      <organization>Facebook</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <code/>
          <country/>
          <region/>
        </postal>
        <phone/>
        <email>chantra@fb.com</email>
        <uri/>
      </address>
    </author>
    <date year="2020" month="October" day="29"/>
    <area>Internet</area>
    <workgroup>dnsop</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This document specifies a way for recursive resolvers operators to signal the IP ranges and locations used by their server pools.
</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Source for this draft and an issue tracker can be found at
  <eref target="https://github.com/chantra/draft-dns-recursive-iprange-location"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t>Big distributed recursive resolver pools tend to be distributed across the world, operating under multiple countries and possibly using IP ranges for which the country is not necessarily perfectly matching the location of the service. This has lead to sub-optimal answers being returned to those server pools. An solution to this problem has been to use EDNS Client Subnet (ECS) <xref target="RFC7871" format="default"/>, but this require support
from both the recursive resolvers and the name servers authorities, comes with its own Security Considerations, and increased resources usage.
</t>
      <t>DNS server operators are commonly receiving spoofed DNS traffic over UDP, common techniques have been to reply with TC bit set to force legitimate clients to use TCP, if the load is still too high, they may start to drop traffic from selected subnets. While this may protect their resources, it has the possibility of denying the service to legitimate resolvers.
</t>
      <t>So far, operators have resorted to ad-hoc mechanism, ranging from exchanging list by email, providing IP ranges and location via webpages, or specific DNS queries, like <eref target="https://developers.google.com/speed/public-dns/faq#locations_of_ip_address_ranges_google_public_dns_uses_to_send_queries">Google Public DNS</eref>, or <eref target="https://www.cloudflare.com/ips/">Cloudflare</eref>, or <eref target="https://www.opendns.com/data-center-locations/">OpenDNS</eref>. When web pages are available, they are rarely found at consistent locations, neither are they formatted in a uniform way, essentially making name server operators' task rather complicated and brittle.
</t>
      <t>This document helps providing uniform solutions to let recursive server operators distribute the list of IP ranges under which their servers are operating as well as possibly location up to the postal code granularity by leveraging <xref target="RFC8805" format="default"/> format.
</t>
    </section>
    <section anchor="conventions-and-definitions" numbered="true" toc="default">
      <name>Conventions and Definitions</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" format="default"/> <xref target="RFC8174" format="default"/> when, and only when, they appear in all capitals, as shown here.
</t>
    </section>
    <section anchor="publishing-resolver-pool-ip-ranges" numbered="true" toc="default">
      <name>Publishing Resolver pool IP ranges</name>
      <t>An entity willing to share the IP ranges used by their recursive servers would publish a record under the special name <tt>_rdns.example.com</tt>. The IP ranges can be distributed either using a <tt>TXT</tt> record or <tt>HTTPS</tt> resource record <xref target="I-D.ietf-dnsop-svcb-https" format="default"/>
An entity can share IP information in 2 ways: via an IP Geolocation Feed, or list of IP ranges in a TXT record.
</t>
      <section anchor="txt-resource-record" numbered="true" toc="default">
        <name>TXT Resource Record</name>
        <t>An entity that wishes to share the IP ranges they are using with their recursive resolvers can distribute it via a TXT record.
</t>
        <t>The record is expressed as a single line of text found in the RDATA. Multiple TXT resource records for the same owner name may be permitted.
</t>
        <t>The record is made of a list of space separated IP ranges with optional comma separated Geolocation. The Geolocation field MUST be a 2-letter ISO country code conforming to ISO 3166-1 alpha 2 <xref target="ISO.3166.1alpha2" format="default"/>. Parsers SHOULD treat this field case-insensitively.
</t>
        <t>This example illustrate a record without geolocation:
</t>
        <artwork align="center" name="" type="" alt=""><![CDATA[
_rdns.example.com. 3600 IN TXT "192.0.2.0/24 198.51.100.0/24 2001:db8::/56 2001:db8:00:ab00::/56"
]]></artwork>
        <t>This example illustrate a record with geolocation information:
</t>
        <artwork align="center" name="" type="" alt=""><![CDATA[
_rdns.example.com. 3600 IN TXT "192.0.2.0/24,xa 198.51.100.0/24,xb 2001:db8::/56,xc 2001:db8:00:ab00::/56,xa"
]]></artwork>
        <t>As the number of IP ranges increases, the size of the DNS response can become a source for amplification attacks. This is being discussed in <xref target="security" format="default"/>.
</t>
      </section>
      <section anchor="https-resource-record" numbered="true" toc="default">
        <name>HTTPS Resource Record</name>
        <t>Another approach is share an IP geolocation feed <xref target="RFC8805" format="default"/> via an HTTPS Resource Record <xref target="I-D.ietf-dnsop-svcb-https" format="default"/>. This record has the benefit of providing a format which can provide more granularity if the entity sharing it wishes to, and can scale even when the number of IP ranges increases.
</t>
        <artwork align="center" name="" type="" alt=""><![CDATA[
_rdns.example.com. 3600 IN HTTPS . (
                              uri=https://foo.example.com/geofeed )
]]></artwork>
      </section>
    </section>
    <section anchor="security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>Unless the record is DNSSEC-signed <xref target="RFC4033" format="default"/>, the answers returned cannot be trusted. In HTTPS Resource Record is requested, the client can possibly trust the content if the URI is within the same zone cut, and HTTPS can authenticate the domain.
</t>
      <t>When using the TXT Resource Record, the answer returned can quickly become big and the name server operator should aggressively limit the size of the answer it will return to the client, and Truncate it if needed.
</t>
    </section>
    <section anchor="iana-consideration" numbered="true" toc="default">
      <name>IANA Consideration</name>
      <section anchor="underscored-node-name" numbered="true" toc="default">
        <name>Underscored Node Name</name>
        <t>This document updates the IANA registry "Underscored and Globally Scoped DNS Node Names" at <eref target="https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#underscored-globally-scoped-dns-node-names"/>
        </t>
        <t>The following entries have been added to the registry:
</t>
        <artwork align="center" type="ascii-art" name="" alt=""><![CDATA[
+--------------+----------------+
| RR Type      | HTTPS          |
| Node Name    | _rdns          |
| Reference    | This document  |
+--------------+----------------+

+--------------+----------------+
| RR Type      | TXT            |
| Node Name    | _rdns          |
| Reference    | This document  |
+--------------+----------------+
]]></artwork>
      </section>
      <section anchor="uri-dns-service-parameter" numbered="true" toc="default">
        <name>URI DNS Service Parameter</name>
        <t>This document adds a parameter to the "Service Binding (SVCB)
Parameter" registry.  The allocation request is TBD, taken from the
to the First Come First Served range.
</t>
        <t>If present, this parameters indicates the URI template of an IP Geolocation feed. This
is a string encoded as UTF-8 characters.
</t>
        <t>Name:  uri
</t>
        <artwork align="center" type="ascii-art" name="" alt=""><![CDATA[
+--------------+----------------+
| SvcParamKey  |  TBD           |
| Meaning      | URI to an IP Geolocation feed |
| Reference    | This document  |
+--------------+----------------+
]]></artwork>
      </section>
    </section>
    <section anchor="acknowledgments" numbered="true" toc="default">
      <name>Acknowledgments</name>
      <t>The authors would like to thank the following individuals for their useful input: John Todd.
</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="I-D.ietf-dnsop-svcb-https" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-dnsop-svcb-https.xml" target="http://www.ietf.org/internet-drafts/draft-ietf-dnsop-svcb-https-01.txt">
          <front>
            <title>Service binding and parameter specification via the DNS (DNS SVCB and HTTPS RRs)</title>
            <author initials="B" surname="Schwartz" fullname="Benjamin Schwartz">
              <organization/>
            </author>
            <author initials="M" surname="Bishop" fullname="Mike Bishop">
              <organization/>
            </author>
            <author initials="E" surname="Nygren" fullname="Erik Nygren">
              <organization/>
            </author>
            <date month="July" day="13" year="2020"/>
            <abstract>
              <t>This document specifies the "SVCB" and "HTTPS" DNS resource record (RR) types to facilitate the lookup of information needed to make connections to network services, such as for HTTPS origins.  SVCB records allow a service to be provided from multiple alternative endpoints, each with associated parameters (such as transport protocol configuration and keys for encrypting the TLS ClientHello). They also enable aliasing of apex domains, which is not possible with CNAME.  The HTTPS RR is a variation of SVCB for HTTPS and HTTP origins.  By providing more information to the client before it attempts to establish a connection, these records offer potential benefits to both performance and privacy.  TO BE REMOVED: This proposal is inspired by and based on recent DNS usage proposals such as ALTSVC, ANAME, and ESNIKEYS (as well as long standing desires to have SRV or a functional equivalent implemented for HTTP).  These proposals each provide an important function but are potentially incompatible with each other, such as when an origin is load-balanced across multiple hosting providers (multi-CDN). Furthermore, these each add potential cases for adding additional record lookups in addition to AAAA/A lookups.  This design attempts to provide a unified framework that encompasses the key functionality of these proposals, as well as providing some extensibility for addressing similar future challenges.  TO BE REMOVED: This document is being collaborated on in Github at: https://github.com/MikeBishop/dns-alt-svc [1].  The most recent working version of the document, open issues, etc. should all be available there.  The authors (gratefully) accept pull requests.</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-dnsop-svcb-https-01"/>
        </reference>
        <reference anchor="ISO.3166.1alpha2" target="http://www.iso.org/iso/home/standards/country_codes/iso-3166-1_decoding_table.htm">
          <front>
            <title>ISO 3166-1 decoding table</title>
            <author fullname="ISO">
              <organization>ISO</organization>
            </author>
          </front>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8805" target="https://www.rfc-editor.org/info/rfc8805" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8805.xml">
          <front>
            <title>A Format for Self-Published IP Geolocation Feeds</title>
            <author initials="E." surname="Kline" fullname="E. Kline">
              <organization/>
            </author>
            <author initials="K." surname="Duleba" fullname="K. Duleba">
              <organization/>
            </author>
            <author initials="Z." surname="Szamonek" fullname="Z. Szamonek">
              <organization/>
            </author>
            <author initials="S." surname="Moser" fullname="S. Moser">
              <organization/>
            </author>
            <author initials="W." surname="Kumari" fullname="W. Kumari">
              <organization/>
            </author>
            <date year="2020" month="August"/>
            <abstract>
              <t>This document records a format whereby a network operator can publish a mapping of IP address prefixes to simplified geolocation information, colloquially termed a "geolocation feed".  Interested parties can poll and parse these feeds to update or merge with other geolocation data sources and procedures.  This format intentionally only allows specifying coarse-level location.</t>
              <t>Some technical organizations operating networks that move from one conference location to the next have already experimentally published small geolocation feeds.</t>
              <t>This document describes a currently deployed format. At least one consumer (Google) has incorporated these feeds into a geolocation data pipeline, and a significant number of ISPs are using it to inform them where their prefixes should be geolocated.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8805"/>
          <seriesInfo name="DOI" value="10.17487/RFC8805"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC4033" target="https://www.rfc-editor.org/info/rfc4033" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4033.xml">
          <front>
            <title>DNS Security Introduction and Requirements</title>
            <author initials="R." surname="Arends" fullname="R. Arends">
              <organization/>
            </author>
            <author initials="R." surname="Austein" fullname="R. Austein">
              <organization/>
            </author>
            <author initials="M." surname="Larson" fullname="M. Larson">
              <organization/>
            </author>
            <author initials="D." surname="Massey" fullname="D. Massey">
              <organization/>
            </author>
            <author initials="S." surname="Rose" fullname="S. Rose">
              <organization/>
            </author>
            <date year="2005" month="March"/>
            <abstract>
              <t>The Domain Name System Security Extensions (DNSSEC) add data origin authentication and data integrity to the Domain Name System.  This document introduces these extensions and describes their capabilities and limitations.  This document also discusses the services that the DNS security extensions do and do not provide.  Last, this document describes the interrelationships between the documents that collectively describe DNSSEC.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4033"/>
          <seriesInfo name="DOI" value="10.17487/RFC4033"/>
        </reference>
        <reference anchor="RFC7871" target="https://www.rfc-editor.org/info/rfc7871" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7871.xml">
          <front>
            <title>Client Subnet in DNS Queries</title>
            <author initials="C." surname="Contavalli" fullname="C. Contavalli">
              <organization/>
            </author>
            <author initials="W." surname="van der Gaast" fullname="W. van der Gaast">
              <organization/>
            </author>
            <author initials="D." surname="Lawrence" fullname="D. Lawrence">
              <organization/>
            </author>
            <author initials="W." surname="Kumari" fullname="W. Kumari">
              <organization/>
            </author>
            <date year="2016" month="May"/>
            <abstract>
              <t>This document describes an Extension Mechanisms for DNS (EDNS0) option that is in active use to carry information about the network that originated a DNS query and the network for which the subsequent response can be cached.  Since it has some known operational and privacy shortcomings, a revision will be worked through the IETF for improvement.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7871"/>
          <seriesInfo name="DOI" value="10.17487/RFC7871"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
    </references>
  </back>
</rfc>
