<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY filename "draft-eastlake-dnsop-svcb-rr-tunnel-09">
  <!ENTITY nbsp   "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY zwnbsp "&#8288;">
]>
<!-- This template is for creating an Internet Draft using xml2rfc,
which is available here: http://xml.resource.org. -->
<!-- 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. -->
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     docName="&filename;"
     ipr="trust200902"
     submissionType="IETF"
     category="std" consensus="true"
     tocInclude="true"
     sortRefs="true"
     symRefs="true"
     version="3">
  <!-- category values: std, bcp, info, exp, and historic ipr values:
      trust200902, noModificationTrust200902,
      noDerivativesTrust200902, or pre5378Trust200902 you can add the
      attributes updates="NNNN" and obsoletes="NNNN" they will
      automatically be output with "(if approved)" -->

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

<front>
  <title abbrev="DNS Storage of Tunnel Info">
    A Domain Name System (DNS) Service Parameter and Resource Record
    for Tunneling Information</title>
  
<seriesInfo name="Internet-Draft"
                value="&filename;"/>

<author fullname="Donald Eastlake" initials="D." surname="Eastlake">
  <organization>Independent</organization>
  <address>
    <postal>
      <street>2386 Panoramic Circle</street>
      <city>Apopka</city>
      <region>FL</region>
      <code>32703</code>
      <country>US</country>
    </postal>
    <phone>+1-508-333-2270</phone>
    <email>d3e3e3@gmail.com</email>
  </address>
</author>

<author fullname="Haoyu Song" initials="H." surname="Song">
  <organization>Futurewei Technologies</organization>
  <address>
    <postal>
      <street>2220 Central Expressway</street>
      <city>Santa Clara</city>
      <region>CA</region>
      <code>95050</code>
      <country>US</country>
    </postal>
    <email>haoyu.song@futurewei.com</email>
  </address>
</author>

<date year="2026" month="4" day="11"/>

  <!-- Meta-data Declarations -->

  <area/>
<workgroup>DNSOP</workgroup>
    <!-- WG name at the upperleft corner of the doc, IETF is fine for
       individual submissions.  If this element is not present, the
       default is "Network Working Group", which is used by the RFC
       Editor as a nod to the history of the IETF. -->

<keyword>DNS</keyword>
<keyword>SVCB</keyword>
<keyword>Tunnel</keyword>
<keyword>Encapsulation</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>A Domain Name System (DNS) Service Binding (SVCB) Service
    Parameter Type and a DNS Resource Record (RR) Type are specified
    for storing connection tunneling / encapsulation information in
    the DNS.
    </t>
  </abstract>
  
</front>

<!-- ***** MIDDLE MATTER ***** -->

<middle>
  
    <section anchor="Introduction">  <!-- 1. -->
      <name>Introduction</name>
      
<t>The Domain Name System (DNS) is a hierarchical, distributed, highly
available database with a variety of security features used for
bi-directional mapping between domain names and addresses, for email
routing, and for other information <xref target="RFC1034"
format="default"/> <xref target="RFC1035" format="default"/> <xref
target="RFC4033"/>. This data is formatted into resource records (RRs)
whose content type and structure are indicated by the RR Type
field. General familiarity with the DNS and its terminology <xref
target="RFC9499" format="default"/> is assumed in this document.</t>
      
      <section anchor="Tunnel">  <!-- 1.1  -->
        <name>Tunneling</name>
        
<t>It is common for there to be a requirement to use or some benefit
from using a "tunnel" or encapsulation scheme when connecting to a
service/host. For a reachability use case, see Section 1.3 of <xref
target="RFC9012"/>.  Typically, this involves taking a packet with a
transport header addressed to the ultimate destination, adding a
tunnel header to the packet, and then adding an outer transport header
before transmitting the packet out of a network interface (port). The
resulting packet is illustrated in <xref target="EncapFig" />. In
some cases, such as IP-in-IP, the Tunneling Header may be null.</t>
        
<figure anchor="EncapFig">
        <name>Encapsulation</name>
        <artwork align="center" name="" type="" alt=""><![CDATA[
+--------------------------------------------------------------+
|                   Outer Transport Header                     |
+--------------------------------------------------------------+
|                   Tunneling Header                           |
+--------------------------------------------------------------+
|                   Inner Transport Header                     |
+--------------------------------------------------------------+
|                   Tunneled/Encapsulated Packet               |
|                                                              |
]]></artwork>
</figure>

<t>The addition of the Outer Transport and Tunneling Headers will
lengthen packets which may result in the need for fragmentation. Some
tunneling protocol support fragmentation but for those that do not,
fragmentation of the Tunneled Packet before encapsulation may be
required.</t>

<t>This document specifies a Domain Name System (DNS) Service Binding
(SVCB) Service Parameter Type and a DNS Resource Record (RR) Type for
storing connection tunneling / encapsulation information in the
DNS. This enables the storage and retrieval of tunneling information
that may be needed to connect to a remote service or host.</t>
        
  </section>
      
  <section anchor="Terminology">
    <name>Terminology</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>

<t>The following acronyms are used in this document:</t>

<ul empty="true" spacing="normal">
     <li>DNS - Domain Name System <xref target="RFC1034"/><xref
         target="RFC1035"/>.</li>
     <li>IANA - Internet
         Assigned Numbers Authority &lt;www.iana.org&gt;.</li>
     <li>RDATA - The data portion of an RR.</li>
     <li>RR - DNS Resource Record.</li>
     <li>RRType - The type field in an RR.</li>
     <li>SVCB - Service Binding <xref target="RFC9460"/>.</li>
</ul>

      </section>
</section>
    
<section anchor="SVCB">
  <name>SVCB RR Service Parameter "tunnel"</name>

<t> The SVCB (Service Binding) RR is specified in <xref
target="RFC9460"/>. It provides, when used in the "Service Mode", for
the encoding of a variety of "Service Parameters" to assist in
connecting to a service.</t>

<t>The "tunnel" SVCB Service Parameter, whose numeric key value is
TBD1, has a value consisting of the Tunnel Type, Tunnel Parameters
Length, and Tunnel Parameters TLVs. It uses the same Tunnel Type codes
and parameter TLVs as are specified for the BGP Tunnel Encapsulation
Attribute in <xref target="RFC9012"/> as shown in <xref
target="SVCBFigure"/>. The presentation format for this value is
hexadecimal.</t>
      
<figure anchor="SVCBFigure">
   <name>SVCB tunnel Service Parameter Value</name>
   <artwork align="center"><![CDATA[
 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3     
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Tunnel Type         |   Tunnel Parameters Length    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                                                               /
/           Tunnel Parameters TLVs (variable length)            /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>

<t>For further details on the fields in <xref target="SVCBFigure"/>
see <xref target="RDATA"/> which re-uses these fields with the same
names and specifies those details.</t>
      
</section>

<section anchor="RDATA">
  <name>TUNNEL RR Type RDATA</name>
      
  <t>The RDATA for this RR type includes the following as explained
  further below and illustrated in <xref target="RDataFigure"/>:</t>

  <ul>
    <li>tunneling information in the format used in the BGP Tunnel
    Encapsulation Attribute <xref target="RFC9012"
    format="default"/>, and</li>

    <li>a domain name that maps to the Inner Transport Header
    destination.</li>
  </ul>
      
<t>The RRType Code for the TUNNEL RR is TBD2.</t>
      
<figure anchor="RDataFigure">
   <name>TUNNEL RRTYPE Data</name>
   <artwork align="center"><![CDATA[
 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3     
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Priority            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Tunnel Type         |   Tunnel Parameters Length    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                                                               /
/           Tunnel Parameters TLVs (variable length)            /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/           Target Name (variable length)                       /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
            
<t>The fields in <xref target="RDataFigure"/> are explained
below. The contiguous Tunnel Type, Tunnel Parameters Length, and
Tunnel Parameters TLV (Value) as a block of data are identical to the
"Tunnel Encapsulation TLV" specified in <xref target="RFC9012"/> ("The
BGP Tunnel Encapsulation Attribute").</t>

    <dl>
    <dt>Priority</dt>
    <dd><t>-&nbsp; This field is a two-byte unsigned integer using
    network byte order that is the priority of using this tunnel
    to the target. A client MUST use the tunnel with the lowest
    priority field value RR (highest priority) that meets the
    following conditions:</t>
    <ul spacing="compact">
      <li>The client implements the Tunnel Type.</li>
      <li>The client can resolve the Target Name.</li>
      <li>The type of packet being tunneled in not prohibited by
      an optional Protocol Type Tunnel Parameters TLV (see Section
      3.4.1 of <xref target="RFC9012"/>). For example, the
      tunneling could be restricted to TCP packets.</li>
    </ul>
    </dd>
    <dt>Tunnel Type</dt>
    <dd>-&nbsp; This is the Tunnel Type from the IANA "BGP Tunnel
    Encapsulation Attribute Tunnel Types" registry as specified in
    <xref target="RFC9012"/>.
    </dd>
    <dt>Tunnel Parameters Length</dt>
    <dd>-&nbsp; A two-byte unsigned integer using network byte order
    giving the number of octets in the Tunnel Parameters TLVs
    field. Necessary because that field is not self-terminating.
    </dd>
    <dt>Tunnel Parameters TLVs</dt>
    <dd><t>-&nbsp; This field consists of "Tunnel Encapsulation Attribute
    Sub-TLVs" as specified in <xref target="RFC9012"/>. These TLVs can
    specify a variety of parameters, including the following, which
    may be useful in constructing the Outer Transport Header (<xref
    target="EncapFig"/>):</t>
    <ul spacing="compact">
      <li>Tunnel Egress Endpoint</li>
      <li>Differentiated Services Field <xref
      target="RFC2474"/></li>
      <li>UDP Destination Port</li>
    </ul>
    </dd>
    <dt>Target Name</dt>
    <dd>-&nbsp; The domain name of the ultimate destination in DNS
    wire encoding format. This domain name MUST NOT be compressed
    <xref target="RFC3597"/>. Used to obtain the destination address
    for the construction of the Inner Transport Header as shown in
    <xref target="EncapFig"/>. (The Outer Transport Header comes from
    the Tunnel Egress Endpoint sub-TLV.)
    </dd>
  </dl>

  </section>

  <section>
    <name>Use of the Specified RRs</name>

 <t>A client/application seeking to send packets to a host or service
 can query the DNS using the name of the host or service for the
 TUNNEL RR. If that name is found and one or more TUNNEL RRs are
 returned, it can use the highest priority TUNNEL RR for which it has
 implemented the Tunnel Type indicated in that RR to create and
 populate a tunneling header as shown in <xref
 target="EncapFig"/>. The Target Name in that TUNNEL RR can then be
 used to obtain an address for use in the Outer Transport Header as
 also shown in <xref target="EncapFig"/>. With these headers, a packet
 can then be transmitted. </t>

 <t>Where a client/application is already using the SVCB RR <xref
 target="RFC9460"/>, similar logic applies using the tunnel SVCB
 Service Parameter.</t>
 
  </section>
    
  <section anchor="Acknowledgements">
    <name>Acknowledgements</name>
      
<t>The suggestions and comments of the following persons are
gratefully acknowledged:</t>
      
      <t>tbd</t>
      
    </section>
    <!-- Possibly a 'Contributors' section ... -->

  <section anchor="IANA" numbered="true" toc="default">
    <name>IANA Considerations</name>

<t>IANA is requested to assign a value from the Service Parameter Keys
Registry on the "DNS Service Bindings (SVCB)" IANA web page as
follows:</t>

      <table>
        <thead>
<tr><th>Number</th><th>Name</th><th>Meaning</th><th>Reference</th></tr>
        </thead>
      <tbody>
<tr><td>TBD1</td><td>tunnel</td><td>Tunneling information</td>
<td>[this document]</td></tr>
      </tbody>
    </table>
    
<t>IANA is requested to assign a TUNNEL RR Type (TBD2) as in the
template in Appendix A.</t>

  </section>

  <section anchor="Security" numbered="true" toc="default">
    <name>Security Considerations</name>

    <t>For SVCB Security Considerations, see <xref
    target="RFC9460"/>. For Tunnel Encapsulation attribute Security
    Considerations, see <xref target="RFC9012"/></t>

    <t>Tunneling information, including end point identity derived
    from the facilities specified in this document, is only as
    reliable as the DNS data. Use of DNSSEC <xref target="RFC4033"/>
    should be considered.</t>
    
  </section>
  
  </middle>
  
  <!--  *****BACK MATTER ***** -->

<back>

  <references>
    <name>References</name>

      <references>
    <name>Normative References</name>
    
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.1034.xml"/>
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.1035.xml"/> 
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.3597.xml"/>
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9012.xml"/>
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9460.xml"/>
    
  </references>

  <references>
    <name>Informative References</name>
    
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2474.xml"/>
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4033.xml"/>
<xi:include
    href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9499.xml"/>

  </references>
</references>

<section anchor="template">  <!-- Appendix A -->
  <name>Tunnel RR Type Template</name>
  
  <artwork name="" type="" align="left"
           alt="TUNNEL RRType Application Template"><![CDATA[
A. Submission Date: tbd

B.1 Submission Type:  [X] New RRTYPE  [ ] Modification to RRTYPE
B.2 Kind of RR:  [X] Data RR  [ ] Meta-RR

C. Contact Information for submitter (will be publicly posted):
   Name: Donald Eastlake       Email Address: d3e3e3@gmail.com
   International telephone number: +1-508-333-2270
   Other contact handles:

D. Motivation for the new RRTYPE application.

   Need to store tunneling information in the DNS.

E. Description of the proposed RR type.
   See draft-eastlake-dnsop-svcb-rr-tunnel

F. What existing RRTYPE or RRTYPEs come closest to filling that need
   and why are they unsatisfactory?

   The SRV RR provides connection information for a service/host but
   not tunneling information.

G. What mnemonic is requested for the new RRTYPE (optional)?

   TUNNEL

H. Does the requested RRTYPE make use of any existing IANA registry
   or require the creation of a new IANA subregistry in DNS
   Parameters?  If so, please indicate which registry is to be used
   or created.  If a new subregistry is needed, specify the
   allocation policy for it and its initial contents.

   Makes use of the Border Gateway Protocol (BGP) Tunnel
   Encapsulation Registry and subsidiary Registries under the
   encapsulation registry. Does not create a new registry.

I. Does the proposal require/expect any changes in DNS
   servers/resolvers that prevent the new type from being processed
   as an unknown RRTYPE (see [RFC3597])?

   No.

J. Comments:  None.
]]></artwork>
  
</section>

</back>
  
</rfc>
