<?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-02"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">
  <front>
    <title abbrev="TVR Contact Plan">Contact Plan YANG Model for Time-Variant Routing of the Bundle Protocol</title>
    <author fullname="Marc Blanchet" initials="MB">
      <organization>Viagenie</organization>
      <address>
        <postal>
          <country>Canada</country>
        </postal>
        <email>marc.blanchet@viagenie.ca</email>
      </address>
    </author>
    <author fullname="Leigh Jordan Torgerson" surname="Torgerson">
      <organization>Jet Propulsion Laboratory</organization>
      <address>
          <postal>
            <country>USA</country>
          </postal>
         <email>jordan.l.torgerson@jpl.nasa.gov</email>
      </address>
    </author>
    <author fullname="Yingzhen Qu" initials="Y" surname="Qu">
      <organization>Futurewei</organization>
      <address>
        <postal>
          <country>USA</country>
        </postal>
        <phone></phone>
        <email>yingzhen.qu@futurewei.com</email>
      </address>
    </author>
    <date/>
    <area>Routing</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>dtn</keyword>
    <keyword>bundle</keyword>
    <keyword>time-variant routing</keyword>
    <keyword>contact plan</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 and are important information for routing decisions. This document describes a YANG data model, also known as contact plan. This specification applies to the 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 and are important information for routing decisions. This document describes a Yang data model, also known as contact plan. This specification applies to the Bundle Protocol.</t>
      <t>For delay-tolerant networks using the Bundle Protocol(BP) <xref target="RFC9171"/>, implementations have defined different formats and data models (<xref target="iondtncp"/>, <xref target="ionipncp"/>, <xref target="ud3tncgf"/>, <xref target="hdtncp"/>) for such data. This specification aims to specify a common interoperable data model.</t>
      <t>While this work is related to space communications, it could be applied to any use case that is using a contact plan.</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 title="Tree Diagrams">
        <t>
        This document uses the graphical representation of data models
        defined in <xref target="RFC8340"/>.</t>
        <t>
        The following figure shows the tree diagram of the ietf-tvr-bundle-schedule module.</t>
        <artwork>
module: ietf-tvr-bundle-schedule

  augment /bundle:node/bundle:neighbors/bundle:neighbor:
    +--rw contact-schedule
       +--rw schedules* [schedule-id]
       |  +--rw schedule-id                     uint32
       |  +--rw (schedule-type)?
       |  |  +--:(period)
       |  |  |  +--rw period-description?       string
       |  |  |  +--rw period-start              yang:date-and-time
       |  |  |  +--rw time-zone-identifier?     sys:timezone-name
       |  |  |  +--rw (period-type)?
       |  |  |     +--:(explicit)
       |  |  |     |  +--rw period-end?         yang:date-and-time
       |  |  |     +--:(duration)
       |  |  |        +--rw duration?           duration
       |  |  +--:(recurrence)
       |  |     +--rw recurrence-first
       |  |     |  +--rw utc-start-time?   yang:date-and-time
       |  |     |  +--rw duration?         uint32
       |  |     +--rw (recurrence-bound)?
       |  |     |  +--:(until)
       |  |     |  |  +--rw utc-until?          yang:date-and-time
       |  |     |  +--:(count)
       |  |     |     +--rw count?              uint32
       |  |     +--rw recurrence-description?   string
       |  |     +--rw frequency                 identityref
       |  |     +--rw interval?                 uint32
       |  +--rw attr-value
       |     +--rw bandwidth?   yang:gauge64
       +--rw bandwidth?   yang:gauge64
        </artwork>
      
    </section>
    <section>
      <name>Data Model</name>
      <t>The YANG data model augments the Bundle Protocol YANG data model<xref target="draft-blanchet-dtn-bp-yang-model"/> by adding the TVR schedule YANG data model <xref target="draft-ietf-tvr-schedule-yang"/> to the neighbors of a Bundle protocol node.</t>
      <t>In the case of DTN networks using Bundle Protocol, additional attributes are used on the contact, such as the bandwidth of the convergence layer adapter link at the time of the contact. It is added to the augmentation.</t>
      <artwork><![CDATA[
  <CODE BEGINS> file "ietf-tvr-bundle-schedule@2024-07-06.yang"
module ietf-tvr-bundle-schedule {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-tvr-bundle-schedule";
  prefix bundle-schedule;

  import ietf-bundle-protocol {
    prefix bundle;
  }
  import ietf-tvr-schedule {
    prefix tvr-schd;
  }
  import ietf-yang-types {
    prefix yang;
  }

  organization
    "IETF TVR - Time Variant Routing Working Group";
  contact
    "WG Web:   <http://datatracker.ietf.org/wg/tvr>
     WG List:  <mailto:tvr@ietf.org>

     Author:   Marc Blanchet
               <mailto:marc.blanchet@viagenie.ca>
     Author:   Yingzhen Qu
               <mailto:yingzhen.ietf@gmail.com>
     Author:   Leigh Jordan Torgerson
               <mailto:jordan.l.torgerson@jpl.nasa.gov>";
  description
    "The YANG module defines an augmentation to the Bundle
     protocol YANG model.

     This YANG model conforms to the Network Management
     Datastore Architecture (NMDA) as described in RFC 8342.

     Copyright (c) 2024 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX
     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
     for full legal notices.

     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 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";
  reference
    "RFC XXXX: Contact Plan YANG Model for Time-Variant Routing of
               the Bundle Protocol";

  revision 2024-07-06 {
    description
      "Initial Version";
    reference
      "RFC XXXX: Contact Plan YANG Model for Time-Variant Routing
                 of the Bundle Protocol.";
  }

  augment "/bundle:node/bundle:neighbors/bundle:neighbor" {
    container contact-schedule {
      description
        "Augment Bundle node neighbor with a contact schedule.";

      uses tvr-schd:tvr-schedule {
        augment "schedules/attr-value" {
          description
            "Augment the power state within each period.";
          leaf bandwidth {
            type yang:gauge64;
            units "bits/second";
            description
              "An estimate of the convergence layer bandwidth
              in bits per second during the scheduled time.";
          }
        }
      }

      leaf bandwidth {
        type yang:gauge64;
        units "bits/second";
        default "0";
        description
          "The convergence layer default bandwidth in bits
           per second.";
      }
    }
    description
      "Augment the neighbor with a contact schedule.";
  }
}
  <CODE ENDS>
        ]]></artwork>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>
        The YANG modules specified in this document define a schema for
        data that is designed to be accessed via network
        management protocols such as NETCONF <xref target="RFC6241"/> or
        RESTCONF <xref target="RFC8040"/>. The lowest NETCONF layer is the secure transport
        layer, and the mandatory-to-implement secure transport is Secure Shell (SSH)
        <xref target="RFC6242"/>. The lowest RESTCONF layer is HTTPS, and the
        mandatory-to-implement secure transport is TLS <xref target="RFC8446"/>.
      </t>
      <t>
        The NETCONF access control model <xref target="RFC8341"/> provides the
        means to restrict access for particular NETCONF or RESTCONF users to a
        pre-configured subset of all available NETCONF or RESTCONF protocol
        operations and content.
      </t>
      <t>
        Augmenting neighbors with a contact plan could be used by an adversary to influence
        the routing and the base function of the networking config of the node, the end-result
        may be a denial of service.
      </t>
   </section>
<section title="IANA Considerations">
  <t>
    This document registers an URI in the IETF XML registry
    <xref target="RFC3688"/>.  Following the format in <xref target="RFC3688"/>,
    the following registration is requested to be made:
  </t>

   <artwork>
   URI: urn:ietf:params:xml:ns:yang:ietf-tvr-bundle-schedule
   Registrant Contact: The IESG.
   XML: N/A, the requested URI is an XML namespace.
   </artwork>

   <t>
     This document registers a YANG module in the YANG Module Names
     registry <xref target="RFC6020"/>.
   </t>
   <artwork>
   name: ietf-tvr-bundle-schedule
   namespace: urn:ietf:params:xml:ns:yang:ietf-tvr-bundle-schedule
   prefix: bundle-schedule
   reference: RFC XXXX
   </artwork>
</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.3688.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6020.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6242.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8040.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.8340.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9171.xml"/>
        <reference anchor="draft-ietf-tvr-schedule-yang" target="draft-ietf-tvr-schedule-yang">
             <front>
                 <title>YANG Model for Scheduled Attributes</title>
                 <author fullname="Yingzhen Qu" initials="Y" surname="Qu"/>
                 <author fullname="Acee Lindem" initials="A." surname="Lindem"/>
                 <author fullname="Eric Kinzie" initials="E." surname="Kinzie"/>
                 <author fullname="Don Fedyk" initials="D." surname="Fedyk"/>
                 <author fullname="Marc Blanchet" initials="M" surname="Blanchet"/>
                 <date/>
             </front>
             <seriesInfo name="Internet-Draft" value="draft-ietf-tvr-schedule-yang-01"/>
         </reference>
        <reference anchor="draft-blanchet-dtn-bp-yang-model" target="draft-blanchet-dtn-bp-yang-model">
             <front>
                 <title>Bundle Protocol Yang Model</title>
                 <author fullname="Marc Blanchet" initials="M" surname="Blanchet"/>
                 <author fullname="Yingzhen Qu" initials="Y" surname="Qu"/>
                 <date/>
             </front>
             <seriesInfo name="Internet-Draft" value="draft-blanchet-dtn-bp-yang-model-02"/>
         </reference>

      </references>
      <references>
        <name>Informative References</name>
        <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 (in no particular order): Felix Walter, Scott Burleigh, Dean Bogdanovic, Tony Li, Brian Sipos, Jordan Leigh Torgerson, Yingzhen Qu.</t>
    </section>
 </back>
</rfc>
