<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6020 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6020.xml">
<!ENTITY RFC6241 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC6536 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6536.xml">
<!ENTITY I-D.ietf-i2rs-architecture SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-architecture.xml">

<!ENTITY I-D.ietf-netmod-acl-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-acl-model.xml">
<!ENTITY I-D.ietf-i2rs-traceability SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-traceability.xml">
<!ENTITY I-D.ietf-i2rs-usecase-reqs-summary SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-usecase-reqs-summary.xml">
<!ENTITY I-D.ietf-i2rs-pub-sub-requirements SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-pub-sub-requirements.xml">
<!ENTITY I-D.ietf-i2rs-protocol-security-requirements 
  SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-protocol-security-requirements.xml">
<!ENTITY I-D.ietf-i2rs-security-environment-reqs 
    SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-security-environment-reqs.xml">
<!ENTITY I-D.hares-i2rs-protocol-strawman 
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hares-i2rs-protocol-strawman.xml">
<!ENTITY I-D.ietf-netmod-yang-metadata SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-yang-metadata.xml">
<!ENTITY I-D.ietf-netconf-restconf SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-restconf.xml">
<!ENTITY I-D.ietf-netconf-yang-metadata SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-yang-metadata.xml">
<!ENTITY I-D.ietf-netconf-yang-library SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-yang-library.xml">
<!ENTITY I-D.ietf-netconf-yang-push SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-yang-push.xml">
<!ENTITY I-D.ietf-netconf-yang-patch SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-yang-patch.xml">
<!ENTITY I-D.ietf-netconf-server-model 
  SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-server-model.xml">
<!ENTITY I-D.ietf-netconf-call-home
  SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-call-home.xml">
<!ENTITY I-D.ietf-netconf-zerotouch
  SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-zerotouch.xml">
  ]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<rfc category="std" docName="draft-ietf-i2rs-ephemeral-state-12"  ipr="trust200902">
  <front>
    <title abbrev="I2RS Ephemeral State Requirements">I2RS Ephemeral State Requirements </title>

	<author fullname="Jeff Haas" initials="J." surname="Haas">
      <organization>Juniper</organization>
      <address>
        <postal>
          <street></street>
          <city> </city>
          <country></country>
        </postal>
        <email>jhaas@juniper.net</email>
      </address>
    </author>
	<author fullname="Susan Hares" initials="S." surname="Hares">
	<organization> Huawei </organization>
	<address>
	  <postal>
	   <street></street>
	    <city>Saline</city>
		<country>US</country>
	  </postal>
	 <email>shares@ndzh.com </email>
	</address>
	</author>
	 
    <date year="2016" />
    <area>Routing Area</area>
    <workgroup>I2RS working group</workgroup>
    <keyword>RFC</keyword>
    <keyword>Request for Comments</keyword>
    <keyword>I-D</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>I2RS</keyword>
    <abstract>
      <t>This document covers requests to the NETMOD and NETCONF Working
   Groups for functionality to support the ephemeral state requirements
   to implement the I2RS architecture. </t>
	 </abstract>
  </front>
  <middle>
<section anchor="intro" title="Introduction">
   <t>The Interface to the Routing System (I2RS) Working Group is chartered
   with providing architecture and mechanisms to inject into and
   retrieve information from the routing system.  The I2RS Architecture
   document <xref target="I-D.ietf-i2rs-architecture"></xref> abstractly documents a number
   of requirements for implementing the I2RS requirements.
   Section 2 reviews 10 key requirements related to ephemeral state.</t>
   <t>
   The I2RS Working Group has chosen to use the YANG data modeling
   language <xref target="RFC6020"></xref> as the basis to implement its mechanisms.
   </t>
   <t> 
   Additionally, the I2RS Working group has chosen to re-use two existing protocols,  
   NETCONF <xref target="RFC6241"></xref> and its similar but lighter-weight relative RESTCONF
   <xref target="I-D.ietf-netconf-restconf"></xref>, as the protocols for carrying I2RS.
   </t>
   <t>What does re-use of a protocol mean? Re-use means that while YANG, NETCONF and RESTCONF 
   are a good starting basis for the I2RS protocol, the creation of the I2RS protocol implementations 
   requires that the I2RS requirements 
   <list style="numbers">
   <t>select features from YANG, NETCONF, and RESTCONF per version of the I2RS protocol
    (See sections 4, 5, and 6)   
   </t>
   <t>propose additions to YANG, NETCONF, and RESTCONF per version of the I2RS protocol 
    for key functions (ephemeral state, protocol security, publication/subscription service, 
	traceability), </t>
	<t>suggest protocol strawman (e.g. <xref target="I-D.hares-i2rs-protocol-strawman"></xref>) 
	as ideas for the NETCONF, RESTCONF, and YANG changes.</t>
   </list>   
    The purpose of these requirements and the suggested protocol straw man is to provide
	a quick turnaround on creating the I2RS protocol. 
     </t>
	 <t>Support for ephemeral state is I2RS protocol requirement that requires datastore 
	 changes (see section 3), YANG additions (see section 4), NETCONF additions (see section 5),
	 and RESTCONF additions (see section 6).  
	 </t>
	 <t> Sections 7-9 provide details that expand upon the changes in 
	 sections 3-6 to clarify requirements discussed by the I2RS and NETCONF working groups. 
	 Sections 7 provide additional requirements that detail how write-conflicts 
	 should be resolved if two I2RS client write the same data. 
	 Section 8 provides an additional requirement that details on I2RS support 
	 of multiple message transactions.
	 Section 9 highlights two requirements in the I2RS publication/subscription requirements
	 <xref target="I-D.ietf-i2rs-pub-sub-requirements"></xref> that must be expanded for 
	 ephemeral state. 
	 </t>
	 <section title="Requirements Language">
        <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">RFC 2119</xref>.</t>
	 </section>
	</section>
<section title="Review of Requirements from I2RS architecture document"> 
 <t> The I2RS architecture defines important high-level requirements for
 the I2RS protocol. The following are ten requirements that 
 <xref target="I-D.ietf-i2rs-architecture"></xref>
  contains which provide context for the ephemeral data state requirements
  given in sections 3-8: 
<list style="numbers">
<t>The I2RS protocol SHOULD support highly reliable notifications (but
not perfectly reliable notifications) from an I2RS agent to an  I2RS client. </t>
 <t>The I2RS protocol SHOULD support a high bandwidth, asynchronous
interface, with real-time guarantees on getting data from an I2RS  agent by
an I2RS client. </t>
<t> The I2RS protocol will operate on data models which MAY be protocol
independent or protocol dependent.  </t>
<t> I2RS Agent MUST record the client identity when a node is created or modified. 
The I2RS Agent SHOULD to be able to read the client identity of a node and 
use the client identity's associated priority to resolve conflicts.   
The secondary identity is useful for traceability and may also be recorded.</t>
<t>Client identity MUST have only one priority for the client's identifier. A
collision on writes is considered an error, but the priority associated 
with each client identifier is utilized to compare 
requests from two different clients in order to modify an existing
node entry.  Only an entry from a client which is higher priority can modify
an existing entry (First entry wins). Priority only has meaning at the time
of use.</t>
<t>The Agent identity and the Client identity SHOULD be passed outside of
the I2RS protocol in a authentication and authorization  protocol (AAA).
Client priority may be passed in the AAA protocol.  The values of identities
are originally set by operators, and not  standardized. </t>
<t>An I2RS Client and I2RS Agent MUST mutually authenticate each other based on
pre-established authenticated identities. </t>
<t>Secondary identity data is read-only meta-data that is recorded by the
I2RS agent associated with a data model's node is written, updated or
deleted. Just like the primary identity, the secondary identity SHOULD 
only be recorded when the data node is written or updated or deleted</t>
<t>I2RS agent MAY have a lower priority I2RS client attempting to modify
a higher priority client's entry in a data model.  The filtering out of
lower priority clients attempting to write or modify a higher priority
client's entry in a data model SHOULD be effectively handled and not put an
undue strain on the I2RS agent.  
</t>
<t>The I2RS protocol MUST support the use of a secure transport. However, 
certain functions such as notifications MAY use a non-secure transport.  
Each model or service (notification, logging) must define within the model or 
service the valid uses of a non-secure transport.</t>
</list>
</t>
</section>
<section title="Ephemeral State Requirements"> 
<t>
In requirements Ephemeral-REQ-01 to Ephemeral-05, Ephemeral state 
is defined as potentially including both ephemeral configured state and operational state.	
</t>
<section title="Persistence">
   <t> Ephemeral-REQ-01: I2RS requires ephemeral state; i.e. state that does not persist
    across reboots. If state must be restored, it should be done solely
    by replay actions from the I2RS client via the I2RS agent. 
  </t>
   <t>While at first glance this may seem equivalent to the writable-
   running data store in NETCONF, running-config can be copied to a
   persistent data store, like startup config.  I2RS ephemeral state
   MUST NOT be persisted. </t>
</section>
 <section title="Constraints">
   <t>Ephemeral-REQ-02: Non-ephemeral state MUST NOT refer to 
   ephemeral state for constraint purposes; 
   it SHALL be considered a validation error if it does. </t>
   <t>Ephemeral-REQ-03: Ephemeral state may have constraints that refer
     to operational state, this includes potentially fast changing or
     short lived operational state nodes, such as MPLS LSP-ID or a BGP IN-RIB.
      </t>
   <t>Ephemeral-REQ-04: Ephemeral state MUST be able to refer to non-ephemeral state 
   as a constraint. 
   </t>
   <t>Ephemeral-REQ-05: I2RS pub-sub, logging, RPC or other mechanisms may lead to undesirable 
   or unsustainable resource consumption on a system implementing an I2RS Agent.
   It is RECOMMENDED that mechanisms be made available to permit 
   prioritization of I2RS operations, when appropriate, to permit 
   implementations to shed work load when operating under constrained 
   resources.  An example of such a work shedding mechanism is rate-limiting.
   </t>
 </section>
<section title="Hierarchy">
<t> 
Ephemeral-REQ-06: The ability to:
<list style="numbers">
<t>to define a YANG module or submodule schema that
   only contains data nodes with the property of being ephemeral, and 
</t>
<t>to augment a YANG data model with additional YANG
   schema nodes that have the property of being ephemeral.
</t>
</list>
</t>
</section> 
<section title="Ephemeral Configuration overlapping Local Configuration">
<t>
Ephemeral-REQ-07: Ephemeral configuration state could override overlapping 
local configuration state, or vice-versa.  
Implementations MUST provide a mechanism to choose which takes precedence.  
This mechanism MUST include local configuration
(policy) and MAY be provided via the I2RS protocol mechanisms.
</t>
</section>
</section> 
<section title="YANG Features for Ephemeral State">
<t>Ephemeral-REQ-08: YANG MUST have a way to 
indicate in a data model that schema nodes have the following 
properties: ephemeral, writable/not-writable, and status/configuration.
</t>
</section>
<section title="NETCONF Features for Ephemeral State">
<t>
Ephemeral-REQ-09: The conceptual changes to NETCONF 	
<list style="numbers">
<t>Support for communication mechanisms to enable an I2RS client to 
determine that an I2RS agent supports the mechanisms needed for I2RS operation. 
</t>
<t>The ephemeral state must support notification 
of write conflicts using the priority requirements 
defined in section 7 below in requirements Ephemeral-REQ-11 through Ephemeral-REQ-14). 
</t>
</list>
</t>
</section>
<section title="RESTCONF Features for Ephemeral State">
<t>Ephemeral-REQ-10: The conceptual changes to RESTCONF are:   	
<list style="numbers">
<t>Support for communication mechanisms to enable an I2RS client to 
determine that an I2RS agent supports the mechanisms needed for I2RS operation. 
</t>
<t>The ephemeral state must support notification 
of write conflicts using the priority requirements 
defined in section 7 below in requirements Ephemeral-REQ-11 through Ephemeral-REQ-14). 
</t>
</list>
</t>
</section>
 <section title="Requirements regarding Supporting Multi-Head Control via Client Priority">
   <t> To support Multi-Headed Control, I2RS requires that there be a
   decidable means of arbitrating the correct state of data when
   multiple clients attempt to manipulate the same piece of data.  This
   is done via a priority mechanism with the highest priority winning.
   This priority is per-client.
  </t>
   <t>Ephemeral-REQ-11: The data nodes MAY store I2RS client identity and not
   the effective priority at the time the data node is stored. Per SEC-REQ-07
   in section 3.1 of <xref target="I-D.ietf-i2rs-protocol-security-requirements"></xref>, 
   an identifier must have just one priority. Therefore, the data nodes MAY
   store I2RS client identity and not the effective priority of the I2RS client 
   at the time the data node is stored.  The priority MAY be 
   dynamically changed by AAA, but the exact actions
   are part of the protocol definition as long as collisions are handled 
   as described in Ephemeral-REQ-12, Ephemeral-REQ-13, and Ephemeral-REQ-14. </t>
   <t>Ephemeral-REQ-12: When a collision occurs as two clients are trying 
   to write the same data node, this collision is considered an error 
   and priorities were created to give a deterministic result.
   When there is a collision, a notification
  (which includes indicating data node the collision occurred on)
   MUST BE sent to the original client to give the original client a chance
   to deal with the issues surrounding the collision.  
   The original client may need to fix their state. 
   </t> 
   <t>Ephemeral-REQ-13: The requirement to support
   multi-headed control is required for collisions and the priority
   resolution of collisions. Multi-headed control is not tied to 
   ephemeral state. I2RS is not mandating how AAA
   supports priority. Mechanisms which prevent collisions of
   two clients trying to modify the same node of data are the focus.  </t>
   <t>Ephemeral-REQ-14: A deterministic conflict resolution mechanism MUST
   be provided to handle the error scenario that two clients, with
   the same priority, update the same configuration data node.  The I2RS
   architecture gives one way that this could be achieved, by
   specifying that the first update wins.  Other solutions, that prevent
   oscillation of the config data node, are also acceptable.
 </t>
 </section>
  <section title="Multiple Message Transactions">
 <t> Ephemeral-REQ-15: Section 7.9 of 
 the <xref target="I-D.ietf-i2rs-architecture"></xref>
states the I2RS architecture does not include
multi-message atomicity and roll-back mechanisms.  I2RS notes 
multiple operations in one or more messages handling can 
handle errors within the set of operations in many ways. 
No multi-message commands SHOULD cause errors to be 
inserted into the I2RS ephemeral state.
</t>
 </section>
 <section title="Pub/Sub Requirements Expanded for Ephemeral State">
 <t>
   I2RS clients require the ability to monitor changes to ephemeral
   state.  While subscriptions are well defined for receiving
   notifications, the need to create a notification set for all
   ephemeral configuration state may be overly burdensome to the user.
   </t>
   <t>
   There is thus a need for a general subscription mechanism that can
   provide notification of changed state, with sufficient information to
   permit the client to retrieve the impacted nodes.  This should be
   doable without requiring the notifications to be created as part of
   every single I2RS module. 
</t>
<t>The publication/subscription requirements for I2RS are in 
   <xref target="I-D.ietf-i2rs-pub-sub-requirements"></xref>, and the 
   following general requirements SHOULD be understood to be expanded to to 
   include ephemeral state: 
   <list style="symbols">
   <t>Pub-Sub-REQ-01: The Subscription Service MUST support 
   subscriptions against ephemeral data in operational data stores, configuration data stores or both.
   </t>
   <t> Pub-Sub-REQ-02: The Subscription Service MUST support filtering 
   so that subscribed updates under a target node might publish only 
   ephemeral data in operational data or configuration data, or publish both 
   ephemeral and operational data. 
   </t>
   </list>
   </t>
 </section>
<section anchor="IANA" title="IANA Considerations">
      <t>There are no IANA requirements for this document.</t>
</section>
 <section title="Security Considerations">
      <t>The security requirements for the I2RS protocol are 
	  covered in <xref target="I-D.ietf-i2rs-protocol-security-requirements"></xref> document.
	  The security requirements for the I2RS protocol environment are in 
	  <xref target="I-D.ietf-i2rs-security-environment-reqs"></xref>.
	  </t>
    </section>
<section anchor="Acknowledgements" title="Acknowledgements">
	<t>
	    This document is an attempt to distill lengthy conversations on
	    the I2RS mailing list for an architecture that was for a long
	    period of time a moving target.  Some individuals in particular
	    warrant specific mention for their extensive help in providing
	    the basis for this document:
	</t>
	<t>
	    <list style="symbols">
		<t>Alia Atlas</t>
		<t>Andy Bierman</t>
		<t>Martin Bjorklund</t>
		<t>Dean Bogdanavich</t>
		<t>Rex Fernando</t>
		<t>Joel Halpern</t>
		<t>Thomas Nadeau</t>
		<t>Juergen Schoenwaelder</t>
		<t>Kent Watsen</t>
		<t>Robert Wilton</t>
	    </list>
	</t>
</section>
</middle>
  <back>
    <references title="Normative References:">
	 &RFC6241;
     &I-D.ietf-netconf-restconf;
	 &I-D.ietf-i2rs-architecture;
	 &I-D.ietf-i2rs-traceability;
	 &I-D.ietf-i2rs-pub-sub-requirements;
	 &I-D.ietf-i2rs-protocol-security-requirements;
	 &I-D.ietf-i2rs-security-environment-reqs;
	 &I-D.ietf-netmod-yang-metadata;
	 &I-D.ietf-netconf-yang-library;
	 &I-D.ietf-netconf-yang-push;
	 &I-D.ietf-netconf-yang-patch;
	 &I-D.ietf-netconf-server-model;
	 &I-D.ietf-netconf-call-home;
	 &I-D.ietf-netconf-zerotouch;
	</references>
    <references title="Informative References">
      &RFC2119;
	  &RFC6020;
	  &RFC6536;
	  &I-D.hares-i2rs-protocol-strawman;
    </references>
  </back>
</rfc>