<?xml version="1.0" encoding="US-ASCII"?>
<!-- $Id:$  -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->

  <!ENTITY RFC2119 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">

<!--  &RFC2460;  IP Version 6 -->
  <!ENTITY RFC2460 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2460.xml">

<!-- &RFC3596; DNS Extensions to Support IP Version 6 -->
  <!ENTITY RFC3596 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3596.xml">

<!-- &RFC3986;  Uniform Resource Identifier (URI) -->
  <!ENTITY RFC3986 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml">

<!-- &RFC4074; inappropriate AAAA replies -->
  <!ENTITY RFC4074 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4074.xml">

<!-- &RFC5625; DNS Proxy Implementation Guidelines -->
  <!ENTITY RFC5625 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5625.xml">

<!-- &RFC6145; NAT46 -->
  <!ENTITY RFC6145 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6145.xml">

<!-- &RFC6146; Stateful NAT64 -->
  <!ENTITY RFC6146 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6146.xml">

<!-- &RFC6147; DNS64 -->
  <!ENTITY RFC6147 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6147.xml">

<!-- &RFC6384; FTP64 -->
  <!ENTITY RFC6384 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6384.xml">

<!-- &RFC6877; 464XLAT -->
  <!ENTITY RFC6877 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6877.xml">

<!-- &RFC6535; BIH -->
  <!ENTITY RFC6535 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6535.xml">

<!-- &RFC6586; ipv6 only experience in ietf -->
  <!ENTITY RFC6586 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6586.xml">

<!-- &RFC6761; special-purpose Domain Names -->
  <!ENTITY RFC6761 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6761.xml">

<!-- &RFC7050;  Discovery of the IPv6 Prefix Used for IPv6 Address Synthesis -->
  <!ENTITY RFC7050 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7050.xml">

<!-- &RFC7051;  Discovery of the IPv6 Prefix Used for IPv6 Address Synthesis -->
  <!ENTITY RFC7051 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7051.xml">


]><!-- End of DOCTYPE -->


<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<?rfc strict="yes" ?>
<?rfc toc="no"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="yes" ?>
<rfc category="exp" docName="draft-osamu-v6ops-ipv4-literal-in-url-02"
  ipr="pre5378Trust200902" submissionType="IETF">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

<front>

    <title abbrev="TLD for IPv4addr in URL">
        A Special Purpose TLD to resolve IPv4 Address Literal on DNS64/NAT64 environments
    </title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Osamu Nakamura" initials="O" role="" surname="Nakamura">
      <organization>Keio Univ./WIDE Project</organization>
      <address>
        <postal>
          <street>5322 Endo</street>
          <city>Fujisawa</city>
          <region>Kanagawa</region>
          <code>252-0882</code>
          <country>JP</country>
        </postal>
        <phone>+81 466 49 1100</phone>
        <email>osamu@wide.ad.jp</email>
      </address>
    </author>
    <author fullname="Hiroaki Hazeyama" initials="H" role="" surname="Hazeyama">      <organization>NAIST / WIDE Project</organization>
      <address>
        <postal>
          <street>8916-5 Takayama</street>
          <city>Ikoma</city>
          <region>Nara</region>
          <code>630-0192</code>
          <country>JP</country>
        </postal>
        <phone>+81 743 72 5111</phone>
        <email>hiroa-ha@is.naist.jp</email>
      </address>
    </author>
    <author fullname="Yukito Ueno" initials="Y" role="" surname="Ueno">
      <organization>Keio Univ./WIDE Project</organization>
      <address>
        <postal>
          <street>5322 Endo</street>
          <city>Fujisawa</city>
          <region>Kanagawa</region>
          <code>252-0882</code>
          <country>JP</country>
        </postal>
        <phone>+81 466 49 1100</phone>
        <email>eden@sfc.wide.ad.jp</email>
      </address>
    </author>
    <author fullname="Akira Kato" initials="A" role="" surname="Kato">
      <organization>Keio Univ. / WIDE Project</organization>
      <address>
        <postal>
          <street>Graduate School of Media Design, 4-1-1 Hiyoshi</street>
          <city>Kohoku</city>
          <region>Yokohama</region>
          <code>223-8526</code>
          <country>JP</country>
        </postal>
        <phone>+81 45 564 2490</phone>
        <email>kato@wide.ad.jp</email>
      </address>
    </author>

    <date year="2014" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
   in the current day and month for you. If the year is not the current one, it is 
   necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
   purpose of calculating the expiry date).  With drafts it is normally sufficient to 
   specify just the year. -->

    <area>Operation and Management</area>  <!-- XXXX -->

    <workgroup>IPv6 Operations Working Group (v6ops)</workgroup>

    <keyword>IPv6</keyword>
    <keyword>IPv4</keyword>
    <keyword>URL</keyword>
    <keyword>DNS64</keyword>
    <keyword>Stateful NAT64</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>
        In an IPv6-only environment with DNS64/NAT64 based translation
        service, there is no way to get access a URL whose domain
        name part includes an IPv4 address literal. 
        This memo proposes a special purpose TLD 
        so that the IPv4 address literal is accessible from 
        such a DNS64/NAT64 environments.
      </t>
    </abstract>
</front>

<middle>

<!-- ############################################################# -->

<section title="Introduction and Overview">

<t>
    When a host in an IPv6 only environment (an IPv6-only host) 
    has to access an IPv4-only destination, 
    a translator-based approach is a powerful tool. 
    The translator-based approach is usually composed of a DNS64 server 
    <xref target="RFC6147"/> and a stateful NAT64 translator 
    <xref target="RFC6146"/>. 

    The DNS64 server responds with a AAAA record of an
    IPv4 embedded IPv6 address with a certain 
    IPv6 prefix assigned to the NAT64 translator, for example, 
    the well known NAT64 prefix (64:ff9b::) or a global IPv6 prefix.
    The IPv6-only host sends an IPv6 packet, which is translated by the 
    NAT64 box to an IPv4 packet. In this memo, an IPv4 embedded 
    IPv6 address with a NAT64 prefix is described as ``Pref64::/n address''.

    The translation of responded IPv4 packet back into
    an IPv6 packet is also performed in the NAT64 translator.
</t>
<t>
    The NAT64 with DNS64 approach works well for most destinations. 
    But it does not work well when the DNS response packet resulted 
    NXDOMAIN
    or SERVFAIL to the AAAA query, partly described in
    <xref target="RFC4074"/>. Resolutions of this case are out of
    scope of this memo.
</t>
<t>
    It is legitimate to embed an IPv4 address literal in an URL such
    as follows:
    <list hangIndent="4" style="empty">
      <t> http://192.0.2.10/index.html </t>
    </list>
    In the environment described above, the destination is not
    accessible from an IPv6-only host.
    This problem has already been reported in <xref target="RFC6586"/> 
    and others.
</t>
<t>
    The reason why the destination specified by above
    notation cannot be accessible is that no DNS lookup is performed, 
    and no DNS64 service is able to tell a Pref64::/n address
    to the host.
    To perform DNS64/NAT64 translation against such an IPv4 address 
    literal notation, some mechanism will be required.
</t>
<t>
    This memo proposes a special-purpose TLD and defines behaviors of 
    resolvers and of the authoritative servers to treat 
    the special-purpose TLD. This memo also considers implementation 
    strategy of .TLD and side effects of .TLD usages to the current 
    communications on the Internet. 
    The special-purpose TLD is denoted as .TLD which will be 
    replaced with an actual TLD allocated by IANA.
</t>
<t>
    The concept of .TLD is simple: 
    All IPv4 address literal notations are rewritten to 
    ``&lt;ipv4-address-literal&gt;.TLD'' on a host. 
    As ``&lt;ipv4-address-literal&gt;.TLD'' is seemed to be 
    a regular FQDN,
    ``&lt;ipv4-address-literal&gt;.TLD'' lets DNS64 servers resolve IPv4
    address literal as a regular FQDN and translate the A record of 
    ``&lt;ipv4-address-literal&gt;.TLD'' to a corresponding Pref64::/n 
    address on each leaf network.
    For example, 192.0.2.10.TLD in DNS64/NAT64 
    environment would be translated to a Pref64::c000:020a. 
    In an IPv4 environment, 192.0.2.10.TLD would 
    be resolved just as an A record about 192.0.2.10.
</t>
<t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
    document are to be interpreted as described in
    <xref target="RFC2119"/>.
 </t>
</section>

<!-- ############################################################# -->

<section anchor="scope" title="Scope of this memo">
<t>
  This memo focuses only on smooth migration to an IPv6-only environment
  with the DNS64/NAT64 solution. Therefore, this memo focuses on only 
  ``IPv4 address literal'' problem mentioned in <xref target="RFC6586"/>.
</t>
<t>
  The ``IPv6 address literal'' is out of scope of this memo,
  because an URL including IPv6 address literal can be accessible 
  in IPv6-only networks and in dual stack networks. 
  The solutions to keep IPv4-only hosts or IPv4-only applications 
  in IPv6 only environment are out of scope on this memo. 
</t>
</section>


<section anchor="special-tld" title="A special-purpose TLD for IPv4 Address Literal">
<t>
  When the part of IPv4 address literal is written to form 
  a pseudo FQDN and the pseudo FQDN is resolved as an IPv4 address, 
  a DNS64 server can return a AAAA record 
  with the specified IPv4 address that is mapped to 
  an appropriate NAT64 prefix. 
</t>
<t>
  Once a AAAA record is obtained, the IPv6-only host can send 
  IPv6 packets to the destination. IPv6 packets will be translated back
  via NAT64 translator in exactly the same as a regular IPv4-only 
  destination. 
</t>

 <section anchor="behavior-of-auth-dns" title=".TLD Authoritative DNS server behavior">
 <t>
 The authoritative DNS server of .TLD SHOULD be operated only 
 for a special purpose. 
 
    <list style="numbers">
    <t> 
       If a DNS query asks ``&lt;ipv4-address-literal&gt;.TLD '', 
       .TLD authoritative server MUST return ``&lt;ipv4-address-literal&gt;'' as 
       the A record of ``&lt;ipv4-address-literal&gt;.TLD ''.
    </t>
<!--
    <t>
       To avoid misuses, .TLD authoritative server MAY check 
       whether the PTR record
       corresponding to &lt;ipv4-address-literal&gt; exists or not. 
       If the PTR record of &lt;ipv4-address-literal&gt; exists, 
       .TLD authoritative server MAY return a DNS response with 
       a TXT record as well 
       to notify the existence  of the PTR record corresponding to
       the issued IPv4 address literal.
    </t>
-->
    <t>
    Otherwise, .TLD authoritative server MUST return NXDOMAIN. 
    </t>
    </list>
 </t>
 </section>

 <section anchor="behavior-of-dns64" title="DNS64 behaviors">
 <t> 
    When a DNS64 receives a query of &lt;ipv4-address-literal&gt;.TLD, 
    it SHOULD issue a DNS query to one of the .TLD authoritative servers. 
    The response from .TLD authoritative server will be either 
    an A record of the issued
    &lt;ipv4-address-literal&gt; or NXDOMAIN. If the response contains 
    an A record, the DNS64 MUST translate the IPv4 address 
    in the A record to the AAAA record by 
    Pref64::/n address according to <xref target="RFC6147"/>. 
 </t>
 <t>
    Taking into account of scalability, the DNS64 WOULD cache 
    the AAAA record of &lt;ipv4-address-literal&gt;.TLD in a certain 
    interval.
    As one of possible ways to get more scalability, 
    the DNS64 CLOUD have the function of .TLD authoritative server. 
 </t>
 </section>

 <section anchor="behavior-of-clients" title="Client behaviors">
  <section anchor="behavior-of-typewriting" title="Case 1: manual type-writing ">
  <t>
  When a client (human) wants to access an IPv4 only server 
  by IPv4 address literal in a DNS64/NAT64 network, 
  he / she manually attaches .TLD to the IPv4 address of the IPv4 only server.
  When the network has DNS64/NAT64 function, 
  the AAAA record, that is Pref64::/n address of the issued 
  &lt;ipv4-address-literal&gt; , will be return.
  </t>
  <t>
  The client COULD attach .TLD to the IPv4 address of the IPv4 only 
  server in an IPv4 only network or a dual stack network.
  When the network situation is IPv4 only or dual stack, 
  the A record of the issued &lt;ipv4-address-literal&gt;.TLD 
  will be returned. 
  </t>

  <t>
  If the client uses FQDN or IPv6 address literal, he / she MUST NOT 
  attach .TLD. 
  </t>
  </section>

  <section anchor="behavior-of-device" title="Case 2: device or application">
  <t>
   A client (device or application), that has a name resolution 
   function, SHOULD attach .TLD when the input value of getaddrinfo 
   is an IPv4 address literal. 
   For example, &lt;ipv4-address-literal&gt; SHOULD be rewritten to 
   &lt;ipv4-address-literal&gt;.TLD.
   If the input value of getaddrinfo is not IPv4 address literal,
   the client MUST NOT attach .TLD.
  </t>
  <t>
   Of course, the client CAN take self-synthesizing of mapped address 
   mentioned in <xref target="RFC7050"/>, or MAY combine .TLD method 
   and <xref target="RFC7050"/> self-synthesizing method.
  </t>
  <t>
   Some access authentication may not allow any external accesses until 
   access authentication procedure is finished, and may use an IPv4 
   address literal on the redirected authentication web page. 
   Taking into account such corner case, client WOULD check 
   the reachability to the external network initially.
  </t>
  <t>
   NOTE: migrating from IPv4 to IPv6, access authentication SHOULD avoid
   to use IPv4 address literal and SHOULD use FQDN for dual stack client
   or IPv6 only client. 
  </t>
  </section>
 </section>

 <section anchor="query-flow" title="DNS query flow">
  <t> 
    <xref target="topology_query_flow"/> shows a DNS query flow 
    on the .TLD.
  </t>
  <t>
  <list style="numbers">
  <t> 
    An application on a client creates &lt;ipv4-address-literal&gt;.TLD.
  </t>
  <t> 
    The application inputs the query of AAAA or ANY about 
    &lt;ipv4-address-literal&gt;.TLD. to its local resolver.
  </t>
  <t> 
    The local resolver forwards the query to a recursive resolver 
    that would be a DNS64 server in DNS64/NAT64 environment.
  </t>
  <t>
    The recursive resolver sends a recursive query of 
    &lt;ipv4-address-literal&gt;.TLD.
  </t>
  <t>
    .TLD authoritative server creates the A record of the issued 
    &lt;ipv4-address-literal&gt;.TLD,
    and MAY check PTR record of the issued &lt;ipv4-address-literal&gt;.
    Then, .TLD authoritative server returns the DNS response to the recursive resolver.
  </t>
  <t>
    When the recursive resolver has DNS64 function, it creates the AAAA 
    record according to <xref target="RFC6147"/> and replies the AAAA 
    record to the local resolver on the client. If the recursive 
    resolver does not have DNS64 function, the recursive resolver 
    returns the A record responded from .TLD authoritative server. 
  </t>
  <t>
    The application on the client gets the appropriate IP address 
    (IPv4 address or Pref64::/n address), then creates an appropriate 
    socket.
  </t>
  </list>
  </t>
    <figure align="center" anchor="topology_query_flow">
      <artwork align="left"><![CDATA[



                                                       +----------+
                                                       | auth DNS |
                                                       | for PTR  |
                                                       |  Record  |
                                                       +----------+
                                                            ||
                                                            (5)
                                                            ||
 +-------+        +--------+        +---------+        +----------+
 |  app  |--(2)-->| local  |--(3)-->|Recursive|--(4)-->|auth .TLD | 
 |(1)(7) |<-(6)-- |resolver|<-(6)---|Resolver |<-(5)---|DNS server|
 +-------+        |        |        |         |        +----------+
                  +--------+        | (DNS64) |       
                                    +---------+
                      


            ]]></artwork>

      <postamble> DNS Query Flow on .TLD </postamble>
    </figure>

  <t> 
    This solution would not require the modification of common shared 
    libraries on any Operating Systems. 
    The DNS implementations, SHOULD support .TLD. 
    As the query flow mentioned above, .TLD authoritative server 
    SHOULD be placed. 
    The modification of NAT64 or DHCP are not required in this method. 
  </t>
 </section><!-- procedure -->

 
 <section anchor="use-cases" title="Use cases">
  <section anchor="example-manual" title="Use case 1: manual type-writing">
    <t>
      For example, consider living on an IPv6-only network with 
      DNS64/NAT64, and receiving a message like 
     ``please download a file foo.doc from a ftp server 192.0.2.10''. 
      Usually, you may estimate the NAT64 prefix and calculate 
      Pref64::/n address through <xref target="RFC7050"/> or
      <xref target="RFC7051"/>.
      Under the proposed mechanism on this memo, you can just type as 
      follow;
      <list hangIndent="4" style="empty">
        <t> % ftp 192.0.2.10.TLD</t>
      </list>
    </t>
    <t>
       The packet would be transferred along with 
       <xref target="RFC6384"/>.
    </t>
  </section><!-- use case 1 -->

  <section anchor="example-browser-plug-in" title="Use case 2: browser plug-in">
    <t>
       An IPv4 address literal is often used in URL for 
       the lazy DNS operation,
       a temporary HTTP server or a hidden (private) server. 
       Taking into account user convenience,
       a browser plug-in can be developed that
       it converts the &lt;ipv4-address-literal&gt; on the hostname 
       part of an URL to &lt;ipv4-address-literal&gt;.TLD. It may
       be suggested to turn this function on when the host is on 
       IPv6-only network, however, it may not be easy to detect 
       the situation of the network (IPv4 only, dual stack or 
       DNS64/NAT64 environment). 
       A sample of Google Chrome plug-in is attached in 
       <xref target="Example code for Chrome"/>
       
    </t>
  </section><!-- use case 2 -->
 </section><!-- use cases  -->

 <section anchor="tld-recommendation" title="Recommendation">
 <t>
  For usability in manual type-writing, the .TLD SHOULD be as short as 
  possible, and SHOULD express the special purpose in the name space. 
  ``.v4'' is recommended as a candidate of .TLD, because of 
  the simplicity and the expression of IPv4. 
 </t>
 </section><!-- .v4 -->

</section><!-- tls -->


<section anchor="consideration" title="Considerations">

 <section anchor="misuse" title="Attached the special-purpose TLD to a regular FQDN">
 <t>
  Conceptually, the special-purpose TLD would be attached to only 
  IPv4 address literals, however, the special-purpose TLD may be 
  attached to a regular FQDN notation like ``foo.bar.com.TLD''.
  Such misuses SHOULD be avoided.
 </t>
 </section><!-- misuse -->

 <section anchor="embedded-in-content-part-of-url" title="An embedded IP address literal in the content part of URL">

 <t>
  In some case, &lt;ipv4-address-literal&gt; may be embedded into 
  the content part of a URL, however, it may be difficult for users or 
  browser plug-ins to recognize unambiguously that a string like 
  &lt;ipv4-address-literal&gt; surely means some IPv4 address. 
  From the point of view of IPv6 migration, embedded IP address literal 
  in the content part of an URL MUST be avoided. 
 </t>
 </section><!-- embedded -->

 <section anchor="validation" title="Prevention the leak of the special-purpose TLD">
 <t>
  When .TLD is actually employed in the operation,
  .TLD may leak to the public DNS infrastructure
  including root DNS servers as seen in ``.local''. 
  Therefore, once consensus is obtained, 
  the relevant TLD SHOULD be delegated to a set of DNS servers.
 </t>
 <t>
  Two possible DNS operation methods can be considered.
  One is to delegate the TLD to AS112 servers 
  <xref target="as112-servers"/>. 
  When one of the AS112 servers received a query with .TLD,
  it returns with NXDOMAIN. 
 </t>

 <t>
  The other possible DNS operation is to deploy a set of special purpose 
  DNS servers which accept queries with .TLD and
  synthesize an A record corresponding to the IPv4 address in the
  QNAME when it is a legitimate IPv4 address. Otherwise, NXDOMAIN
  MUST be returned.
 </t>
 </section><!-- validation -->

 <section anchor="apache-virtual-host" title="Possibility to break connections with Apache VirtualHost concept">
 <t>
  Changing the URL (swapping the DNS name or adding in a Pref64) 
  frequently breaks the connections since the application is aware of 
  the name it expects, and connecting correctly to the correct IP 
  address is not sufficient, the name must also be the same 
  in many cases.
 </t>
 <t>
  For example, many websites use the Apache VirtualHost concept. 
  When a web site that changes contents along with accessed 
  IP address family like http://www.kame.net/ or http://dual.tlund.se/ , 
  and if some client accesses such web site by 
  &lt;ipv4-address-literal&gt;.TLD instead of FQDN, 
  the VirtualHost may not work as intended. 
 </t>
 <t>
  Therefore, such web site, that uses the Apache VirtualHost concept, 
  SHOULD NOT use &lt;ipv4-address-literal&gt; in URL and SHOULD use 
  appropriate FQDN.
 </t>
 </section><!-- comment from cb -->

 <section anchor="http-cookie" title="Inaffinity with HTTP/HTTPS Cookie">
 <t> 
  This solution may not work with HTTP/HTTPS cookie.
  We should also consider the HTTP security considerations for 
  the cases where someone puts one of the names into a URL. 
  For example, consider http://192.0.2.10.TLD/ to an origin that sets 
  a cookie on the domain "*.10.TLD". 
 </t>
 <t>
  There are likely already plenty of ways to do the same thing out there, 
  so this may not be a major issue.
 </t>

 </section><!-- comments from erik and dwing --> 
 
 <section anchor="tld-alternatives" title="TLD alternatives">
    <t>
      In <xref target="tld-recommendation"/>, we propose .v4 as the
      TLD, and comparisons with other candidates are discussed as follows.
    </t>

   <section anchor="tld-v4-arpa" title=".v4.arpa">
   <t>
      ``v4.arpa'' may be a candidate of .TLD that does not 
      require new TLD, however, it may be confued with <xref target="RFC7050"/> 
      ``ipv4only.arpa'', and the length (8 characters) of ``.v4.arpa'' 
      is bit longer than the length (3 characters) of ``.v4''
      for type-writing usages. 
   </t>
   </section><!-- .v4.arpa -->

   <section anchor="tld-dot-host" title=".host">
   <t>
     ``.host'' has already been assigned as one of the new gTLDs, 
       and not considered a candidate here unless the authority of 
       .host offers 256 (or 356 -- see discussion 
       in <xref target="tld-delegation"/>) delegations to this purpose. 
   </t>
   </section><!-- .host -->

   <section anchor="tld-delegation" title="TLD less delegation">
     <t>
       When it is feasible to "delegate" 256 TLDs (from ".0" through ".255")
       or 366 TLDs (".00", ".000", and others are added) for this particular
       purpose, it is possible to implement the functionality described 
       in this memo without assigning a particular .TLD. It contributes 256
       (or 356) extra TLDs in the Root zone.
     </t>
     <t>
       It is known that DNS queries with such TLDs have been observed, and this
       delegation may interfere with undocumented usage of such TLDs.
     </t>
     <t>
       If such 256 (or 366) delegations is suitable, bogus such queries
       to the root servers will be redirected to the DNS server described
       in <xref target="implementation strategy"/>.
     </t>
   </section><!-- tld delegation -->
 </section><!-- tld alternatives -->

 <section anchor="ipv6-addr-literal" title="Usages of IPv6 address literal">
 <t>
  The special-purpose TLD may be applied to IPv6 address cases in same 
  ways, however, such notation is not required in dual stack / IPv6-only 
  environment, generally. 
 </t>
 </section><!-- ipv6 addr literal -->
 
 
 <section anchor="situation" title="RFC7050 ipv4only.arpa">
   <t>
     <xref target="RFC7050"/> defines a method to estimate a NAT64 prefix 
     by querying Well-Known IPv4-only Name ``ipv4only.arpa''. 
     <xref target="RFC7050"/> does not cover several situations. 
     .TLD method is aimed to solve such situations as follows:
   </t>

   <section anchor="for-load-balancing" title="Multiple NAT64 prefixes for load balancing">
   <t>
      One of situations is multihoming, illustrated in 
      <xref target="case_one"/>.
      In this situation, 
      the NAT64 prefix estimated by <xref target="RFC7050"/> method
      may be different from the one that the operator intends. 
   </t>
   <figure align="center" anchor="case_one">

        <artwork align="left"><![CDATA[
             +-------------+    +-------+     +-------------------+
             |             +====| NAT64 |=====+    IPv4 ISP A     |
 +------+    |  IPv6 Only  |    +-------+     +-------------------+
 |client|====|  Segment    |
 +------+    |             |    +-------+     +-------------------+
             |             +====| NAT64 |=====+    IPv4 ISP B     |
             +-------------+    +-------+     +-------------------+
                    |
                +---+---+
                | DNS64 |
                +-------+
            ]]></artwork>
       <postamble> Situation A : multiple NAT64 prefixes for optimizing routes on multihoming </postamble>
      </figure>
   </section>

   <section anchor="for-internal-ipv4only-domain" title="Multiple NAT64 prefixes for external / internal IPv4 only networks">
   <t>
      Another situation is where multiple NAT64 prefixes are operated 
      for accessing the external IPv4 Internet and an internal private 
      IPv4 only network from an internal IPv6 only network.

      <xref target="case_two"/> draws this situation.
      In this situation, 
      the NAT64 prefix estimated by <xref target="RFC7050"/> method could not 
      be reached to the internal IPv4 only network.
   </t>

   <figure align="center" anchor="case_two">

        <artwork align="left"><![CDATA[
                              +-------+
                              | DNS64 |
                              +---+---+
                                  |
 +-------------+              +--------+             +----------+
 |             |   +-------+  |  IPv6  |  +-------+  |          |
 |   internal  +===| NAT64 |==+  Only  +==| NAT64 |==+ IPv4     |
 |   network   |   +-------+  |  Seg.  |  +-------+  | Internet |
 +-------------+              +--------+             +----------+
                                  |
                              +---+----+
                              | client |
                              +--------+
            ]]></artwork>
       <postamble> Situation B : multiple NAT64 prefixes for internal / external</postamble>
      </figure>
   </section>

   <section anchor="for-human-typewriting" title="Difficulty of conversion from octet expression to hex expression by human type-writing">
    <t>
     As the initial motivation of this memo, IPv4 address literal is 
     often used for a personal / private server that is not registered 
     in DNS record because of lazy operation, temporal usage, 
     or the intention to hide from DNS query scans. 
   
     ``ipv4only.arpa'' solution can be available to synthesize 
     the Pref64::/n address for the private server, however, the owner of 
     the private server has to convert the octet expression of the IPv4 
     address on his/her private server to the hex expression by manual.
     Usually, conversion from octet expression to hex expression by manual
     is difficult or tiresome operation.
    </t>
   </section>
 </section>

</section><!-- discussion-->



 <section anchor="implementation strategy" title="Implementation Strategy">
<t>
It is suggested to implement the .TLD rewriting as in the following 
order:

<list style="numbers">
  <t> Define .TLD 
   <list style="empty">
      <t>
        Once the community agrees to accept the rewriting scheme 
        described in this memo, it must fix the .TLD to be used. 
        The .TLD WOULD  require the update of <xref target="RFC6761"/>.
      </t>
   </list>
  </t>

  <t>
    .TLD delegation 
   <list style="empty">
      <t>
        DNS queries with .TLD can leak to the DNS of the global Internet,
        it is highly suggested to delegate .TLD to a set of 
        authoritative DNS servers as discussed 
        in <xref target="validation"/>.
     </t>
   </list>
  </t>
  <t>
     DNS64 modification 
   <list style="empty">
     <t>
      	DNS64 implementation is suggested to modify to respond 
      	corresponding AAAA record to a query with .TLD. This process can
      	be done in parallel to the step 2 above.
    </t>
   </list>
  </t>

  <t>
   Start using .TLD rewriting 
   <list style="empty">
     <t>
      After, at least the step 2 is completed, the TLD rewriting may be
      used in manually described in <xref target="example-manual"/> or 
      automatically by browser plugins described 
      in <xref target="example-browser-plug-in"/>.
    </t>
    <t>
      While further discussions and observation is required, 
      the use of an URL in IPv4 literal embedded might be discouraged. 
      Instead, the use of .TLD notation as a legitimate URL might be 
      encouraged even in the server side.
    </t>
   </list>
  </t>
</list>
</t>

</section><!-- Implementation Strategy -->

<!-- ############################################################# -->

<!-- ############################################################# -->

<section title="Security Considerations">
<t>
    The recommendation contains security considerations related to DNS. 
    The special purpose DNS servers of this memo only treats the IPv4 
    address literal with .TLD. Therefore, the special DNS MAY use 
    self-signed / authorized key for DNS responses. 
</t>
<t>
    When a client is to access an URL with IPv4 literal address embedded,
    it triggers a DNS query, and the query may be sent over the Internet
    to the nearest authoritative .TLD DNS server. 
    It may break the confidentiality against the DNS service.
</t>
<t>
    TBD
</t>
</section>

<!-- ############################################################# -->

<section title="IANA Considerations">
<t>
    This memo calls for ``.v4'' as the special-purpose TLD to 
    the IANA registry.
</t>
</section><!-- IANA consideration -->

<!-- ############################################################# -->

<section title="Acknowledgments">
<t>
    Authors thank to WIDE Project members for their active
    discussion, implementations, and evaluations. Especially, 
    we thank to Atsushi ONOE for the revision of this solution, 
    Hirochika ASAI for the contribution of the prototype implementation
    of the special purpose authoritative DNS, and Hirotaka NAKAJIMA for 
    the contribution of the Google chrome plug-in. 
    
    We also thank to Yoshiaki KITAGUCHI, Yu-ya KAWAKAMI and others who 
    evaluated our proof of concept special purpose  DNS (.v4.wide.ad.jp)
    and the Google Chrome plugin-in at JANOG34 DNS64/NAT64 experiment 
    networks. 

    Teeme Savolainen, Cameron Byrne, Dan Wing, Erik Nygren gave us 
    various considerations on the actual operation of .TLD. 
</t>
</section> <!-- ack -->

</middle>


  <back>
      <!-- References split into informative and normative -->

  <references title="Normative References">
      &RFC2119; <!--  Key words for use in RFCs -->
      &RFC4074; <!-- inappropriate AAAA replies -->
      <!-- &RFC6145;  NAT46 -->
      &RFC6146; <!-- Stateful NAT64 -->
      &RFC6147; <!-- DNS64 -->
      &RFC6384; <!-- FTP64 -->
      <!-- &RFC6535;  BIH -->
      <!-- &RFC6877;  464XLAT -->
      &RFC6586; <!-- ipv6 only experience in ietf -->
      &RFC6761; <!-- special use domain name -->
      &RFC7050; <!-- Discovery of the IPv6 Prefix -->
      &RFC7051; <!-- for Hosts to Learn NAT64 Prefix -->
  </references>


  <references title="Informative References"> 
      <!-- Here we use entities that we defined at the beginning. -->

      <reference anchor="as112-servers"
                 target="https://www.as112.net/">
        <front>
          <title>AS112 Project</title>
          <author><organization>AS112 Project</organization></author>
          <date year="October 2009" />
        </front>
      </reference>

  </references> 

  <!-- ############################################################# -->
<!-- ##################################################################### -->
    <section anchor="Test Server of a special TLD" title="A Test Server of the special TLD">
    <t> We run a prototype implementation of the special-purpose DNS 
    server in the WIDE backbone (AS 2500). We use ``.v4.wide.ad.jp'' as 
    .TLD. 
    </t>
    </section>

    <section anchor="Example code for Chrome" title="Sample extension for Google Chrome">
    <t> We developed a sample plug-in code for Google Chrome 
    ``IPv4 Address Literal Appender'' that automatically converts 
    &lt;ipv4-address-literal&gt; in URL to 
    &lt;ipv4-address-literal&gt;.TLD. The .TLD can be customized 
    in the option. The ``IPv4 Address Literal Appender'' is freely 
    available in Google Chrome Web Store, and also in github 
    https://github.com/nunnun/nat64-v4-literal-extension.
    </t>
      <figure>
        <preamble></preamble>

        <artwork><![CDATA[
var wr = chrome.webRequest;

var v4Suffix = ".TLD";
var ipAddrRegex = /^(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|
2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2
[0-4]\d|25[0-5])$/;

function onBeforeRequest(details) {
  var tmpuri = new URI(details.url);
  var tmphost = tmpuri.host();
  var finalUri = '';
  tmphost.replace(ipAddrRegex,function(str,p1,p2,p3,p4,offset,s){
  finalUri=tmpuri.host(p1+"."+p2+"."+p3+"."+p4+v4Suffix).toString();
  });
 if('' != finalUri) {
  console.log(finalUri);
  return {redirectUrl: finalUri};
 }
};

wr.onBeforeRequest.addListener(onBeforeRequest,{urls: ["https://*/*", 
"http://*/*", "ftp://*/*"]}, ["blocking"]);
            ]]></artwork>
      </figure>
    </section>

  </back>
</rfc>
