<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-blanchet-tvr-contactplan-00"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">
  <front>
    <title abbrev="TVR Contact Plan">Contact Plan for Time-Variant Routing</title>
    <seriesInfo name="Internet-Draft" value="draft-blanchet-tvr-contactplan-00"/>
    <author fullname="Marc Blanchet" initials="MB">
      <organization>Viagenie</organization>
      <address>
        <email>marc.blanchet@viagenie.ca</email>  
      </address>
    </author>
    <date year="2023"/> 
    <area>Routing</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>rfc822</keyword>
    <keyword>dtn</keyword>
    <keyword>email</keyword>
    <keyword>bundle</keyword>
    <abstract>
      <t>Some networks, such as in space, have links that are up and down based on a known schedule. The links characteristics, such as latency and bandwidth, are often also known in advance. This document describes a data model, also known as contact plan or graph, and file format to be used as input to forwarding and routing engines. This specification applies for both IP and Bundle Protocol.</t>
    </abstract>
  </front>
  <middle>
    <section>
      <name>Introduction</name>
      <t>Some networks, such as in space, have links that are up and down based on a known schedule. The links characteristics, such as latency and bandwidth, are also known in advance. This document describes a data model and file format to be used as input to forwarding and routing engines. </t>
      <t>For delay-tolerant networks using the Bundle Protocol(BP) <xref target="RFC9171"/>, implementations have defined different formats (<xref target="iondtncp"/>, <xref target="ionipncp"/>, <xref target="ud3tncgf"/>, <xref target="hdtncp"/>) for such data. This specification aims to specify a common interoperable format.</t>
      <t>Since networks may have some combination of IP and BP, it is useful to have in a single file the contact plan for all types of networks and address space, hence this combined format.</t>
      <t>While this work is related to space communications, it could be applied to any use case that is using a contact plan. s</t>
      <section anchor="requirements">
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
          RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
          interpreted as described in BCP 14 <xref target="RFC2119"/>
          <xref target="RFC8174"/> when, and only when, they appear in
          all capitals, as shown here.</t>
      </section>
      </section>
    <section>
      <name>Data Model and File Format</name>
      <t>The file is coded in JSON<xref target="RFC8259"/>.</t>
      <t>The file has the following first level properties:</t>
      <ul>
          <li>type: mandatory. always set to "tvrContactPlan". This enables identification of that file outside of the expected context.</li>
          <li>version: mandatory. this document set to 1. New specifications may define new versions.</li>
          <li>lastUpdated: mandatory. the last time this file was updated in <xref target="RFC3339"/> format</li>
          <li>contacts: mandatory. a non-empty array of contact objects/records as defined below.</li>
      </ul>
      <t>A contact record has an "address" family. This document defines 4 families: "ip4", "ip6", "ipn", "dtn". Others may be added to the IANA registry (see <xref target="IANA"/>). Each address family has a different syntax as shown below.</t>
          <ul>
              <li>"ip4": addresses are expressed in CIDR format<xref target="RFC4632"/>. The /length suffix may be removed for a single /32 IPv4 address.</li>
              <li>"ip6": addresses are expressed in <xref target="RFC4291"/> format. The /length suffix may be removed for a single /128 IPv6 address.</li>
              <li>"dtn" and "ipn": endpoint id are expressed using the URI syntax as described in <xref target="RFC9171"/>.</li>
          </ul>
          <t>The "source", "next-hop" and "destination" are using this syntax.</t>
          <t>A contact record contains the following properties:</t>
          <ul>
              <li>id: mandatory. a unique identifier for this contact record expressed as a UUID <xref target="RFC4122"/></li>
              <li>source: optional. single ip/bp node id. if unknown, do not specify.</li>
              <li>next-hop: optional. single ip/bp node id. if unknown, do not specify.</li>
              <li>destinations: mandatory. a non-empty list of ip/bp network prefixes</li>
              <li>start time: mandatory. <xref target="RFC3339"/> format</li>
              <li>stop time: mandatory. <xref target="RFC3339"/> format</li>
              <li>bandwidth: optional. in bits/sec.</li>
              <li>latency: optional. in ms</li>
          </ul>
      <t>The following shows an example of a contact plan.</t>
          <sourcecode type="json" markers="true">
              <![CDATA[
{
    "type": "tvrContactPlan",
    "version": 1,
    "lastUpdated": "2025-01-17T23:20:50Z",
    "contacts": [
      {
        "id": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
        "family": "ip4",
        "source": "192.0.2.0",
        "destinations": ["198.51.100.0/24", "203.0.114.0/28", "192.0.3.1"],
        "nextHop": "203.0.113.1",
        "startTime": "1985-04-12T23:20:50Z",
        "stopTime": "1985-04-13T14:12:48Z",
        "bandwidth": 1000000,
        "latency": 30000
      },
      {
        "id": "f81d4fae-abcd-efgh-a765-00a0c91e6b88",
        "family": "ip6",
        "source": "2001:db8::1",
        "destinations": ["2001:db8:abcd::/48"],
        "nextHop": "2001:db8:3::1",
        "startTime": "2030-04-12T23:20:50Z",
        "stopTime": "2031-04-13T14:12:48Z",
        "bandwidth": 10000000,
        "latency": 300000
      },
      {
        "id": "659e4fae-7dec-11d0-a765-00a0c91e6b04",
        "family": "dtn",
        "source": "dtn://ud3tn2.dtn/",
        "destinations": ["dtn://18471/","dtn://81491/"],
        "nextHop": "203.0.113.1",
        "startTime": "1985-04-12T23:20:50Z",
        "stopTime": "1985-04-13T14:12:48Z",
        "bandwidth": 1000000,
        "latency": 30000
      },
      {
        "id": "f81dab43-7dec-e8a2-a765-00a0c91e6bf6",
        "family": "ipn",
        "destinations": "ipn:5.34",
        "nextHop": "ipn:7.43",
        "startTime": "1985-04-12T23:20:50Z",
        "stopTime": "1985-04-13T14:12:48Z",
        "bandwidth": 1000000,
        "latency": 30000
      }
    ]
}
              ]]>
            </sourcecode>
    </section>
    <section>
        <name>Considerations</name>
        <t>Some Bundle Protocol implementations have defined an interface where the add, change, delete actions are performed on contact info to update the underlying contact plan. We believe this can be better accomplished at the API level, instead of within the file format. For example, if a REST API is used, the HTTP methods can be used for that purpose.</t>
    </section>
    <section>
      <name>TODO or Comments (section to be deleted when ready for publication)</name>
      <ul>
          <li>bp convergence layer syntax (FW: needed)</li>
          <li>wildcard for dtn as in ION</li>
          <li>notion of timezone: (FW: do not agree to have it)</li>
          <li>JSON schema</li>
          <li>Media-Type: application/json or specific one</li>
          <li>FW: extension mechanism for additional parameters: probability of contact. (MB: IANA registry)</li>
      </ul>
   </section>
    <section anchor="IANA">
      <name>IANA Considerations</name>
      <t>TBD: registry of "address family"</t>
    </section>
    <section anchor="Security">
      <name>Security Considerations</name>
      <t>TBD</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <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.3339.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4122.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4291.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4632.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.8259.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9171.xml"/>
        <reference anchor="ud3tncgf" target="https://gitlab.com/d3tn/ud3tn/-/blob/master/doc/contacts_data_format.md">
          <front>
            <title>µD3TN Contacts Data Format</title>
            <author/>
          </front>
        </reference>
        <reference anchor="hdtncp" target="https://github.com/nasa/HDTN/blob/master/module/scheduler/src/contactPlan.json">
            <front>
              <title>High-rate Delay Tolerant Network Contact Plan Example</title>
              <author/>
            </front>
          </reference>
      <reference anchor="iondtncp" target="https://sourceforge.net/p/ion-dtn/code/ci/current/tree/bpv7/doc/pod5/dtn2rc.pod">
          <front>
            <title>ION "dtn" scheme configuration commands file</title>
            <author/>
          </front>
        </reference>
      <reference anchor="ionipncp" target="https://sourceforge.net/p/ion-dtn/code/ci/current/tree/bpv7/doc/pod5/ipnrc.pod">
          <front>
            <title>ION "ipn" scheme configuration commands file</title>
            <author/>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>This work is vastly inspired by Scott Burleigh's' Contact Graph Routing for DTN as implemented in ION as well as the contact plan of HDTN and uD3TN implementations.</t>
      <t>The following people have provided comments to improve this document: Felix Walter</t>
    </section>
 </back>
</rfc>
