<?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 RFC4107 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4107.xml">
<!ENTITY RFC4960 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4960.xml">
<!ENTITY RFC5339 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5339.xml">
<!ENTITY RFC5424 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5424.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 RFC6242 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6242.xml">
<!ENTITY RFC6244 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6244.xml">
<!ENTITY RFC6536 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6536.xml">
<!ENTITY RFC7158 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7158.xml">
<!ENTITY RFC7589 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7589.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-i2rs-rib-info-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-rib-info-model.xml">
<!ENTITY I-D.ietf-i2rs-rib-data-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-rib-data-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-ephemeral-state SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-ephemeral-state.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.ietf-netconf-restconf SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-restconf.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-yang-push SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-yang-push.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-server-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-server-model.xml">
<!ENTITY I-D.ietf-netconf-zerotouch SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-zerotouch.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-netmod-opstate-reqs SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-opstate-reqs.xml">
<!ENTITY I-D.ietf-netmod-rfc6020bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-rfc6020bis.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-netmod-syslog-model 
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-syslog-model.xml">
<!ENTITY I-D.ietf-netmod-schema-mount 
  SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-schema-mount.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.draft-kwatsen-netmod-opstate SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-kwatsen-netmod-opstate-02.xml">
 <!ENTITY I-D.draft-wilton-netmod-refined-datastores SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-wilton-netmod-refined-datastores-01.xml">
 <!ENTITY I-D.draft-schoenw-netmod-revised-datastores SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-schoenw-netmod-revised-datastores-01.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="info" docName="draft-hares-i2rs-protocol-strawman-03.txt"  ipr="trust200902">
  <front>
    <title abbrev="I2RS Protocol Strawman">I2RS protocol strawman</title>
	<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>
		<author fullname="Amit Daas" initials="A." surname="Dass">
	<organization> Ericsson </organization>
	<address>
	 <email>amit.dass@ericsson.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 strawman proposal discusses requirement, design, and implementation 
	    issues for an I2RS protocol which supports 
	    I2RS requirements for ephemeral data store, management data flows, 
		and protocol security. It proposes additions to the NETCONF, 
		RESTCONF, and YANG for these requirements. 
	  </t>
	  <t>This document is a living document providing insights 
	  gained in design, implementation and debugging of the I2RS protocol.
	  </t>
	 </abstract>
  </front>
  <middle>
 <section anchor="intro" title="Introduction">
    <t>This is a strawman proposal for the first version of the I2RS protocol. 
	This draft is input to a NETCONF Working Group which 
   standardizes extensions to the NETCONF and RESTCONF protocol, 
   and to the NETMOD Working Group which standardizes extensions to 
   YANG. This draft is also input to the early implementers of the I2RS protocol. 
   As such, feedback from early implementations would help. 
   </t>
   <t>
    The I2RS protocol is a higher level protocol comprised of a set 
   of existing protocols which have been extended to work together to
   support a new interface to the routing system. 
   The I2RS protocol is a "reuse" management protocol which creates new management protocols
    by reusing existing protocols and extending these protocols for new 
	uses.  The first version of the I2RS protocols is comprised of extensions of the 
    NETCONF <xref target="RFC6241"></xref> and  
	RESTCONF <xref target="I-D.ietf-netconf-restconf"></xref>.   
   </t>
   <t>This strawman proposal supports I2RS requirements for 
   ephemeral data store, management data flows, and protocol security.
   It proposes extensions to the following: 
   <list style="symbols">
   <t>YANG 1.1 <xref target="I-D.ietf-netmod-rfc6020bis"></xref>,</t>
   <t>NETCONF <xref target="RFC6241"></xref>, </t>
   <t> RESTCONF <xref target="I-D.ietf-netconf-restconf"></xref>
   </t>
   <t>Network Access Control Model <xref target="RFC6536"></xref>
   </t>
   </list> 
   </t>
   <t>This protocol strawman utilizes the following existing 
   proposed features for NETCONF and RESTCONF 
   <list style="symbols">
   <t>Call Home <xref target="I-D.ietf-netconf-call-home"></xref>, 
   </t>
   <t>Server Configuratino Module <xref target="I-D.ietf-netconf-server-model"></xref>,
   </t>
   <t>Module library <xref target="I-D.ietf-netconf-yang-library"></xref>,
  </t>
  <t>Publication/Subscription via Push <xref target="I-D.ietf-netconf-yang-push"></xref>,
  </t>
  <t>Patch <xref target="I-D.ietf-netconf-yang-patch"></xref>, 
  </t>
  <t>syslog yang module (both <xref target="RFC5424"></xref>
   and <xref target="I-D.ietf-netmod-syslog-model"></xref>
   </t>
  </list>   
  </t>
   <t>
   Section 2 provides definitions for terms in this document.
   Section 3 summarizes the changes to configuration data store, NETCONF, 
   RESTCONF, and YANG. 
   Section 4 details the changes to Yang. 
   Section 5 summarizes the changes to transport support for RESTCONF and NETCONF.
   Section 6 details the changes to NETCONF. 
   Section 7 details the changes to RESTCONF. 
   Section 8 provides a simple example of 
   I2RS protocol support for the ephemeral data store using 
   a simple temperature model.  Section 9 provides a simple 
   example of the I2RS protocol with an ephemeral route updating 
   an existing route. Section 10 provides information on the 
   security considerations for the I2RS protocol. 
   </t>
   </section>
 <section title="Definitions Related to Ephemeral Configuration">
<t> This section reviews definitions from I2RS architecture 
<xref target="I-D.ietf-i2rs-architecture"></xref> and 
NETCONF operational state <xref target="I-D.ietf-netmod-opstate-reqs"></xref>
before using these to construct a definition of the ephemeral data store. 
</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 title="I2RS Definitions">
 <t>The I2RS architecture <xref target="I-D.ietf-i2rs-architecture"></xref>
defines the following terms: 
<list style="hanging">
<t hangText="ephemeral data: "> is data which does not persist across a 
reboot (software or hardware) or a power on/off condition.  Ephemeral 
data can be configured data or data recorded from operations of the router. 
Ephemeral configuration data also has the property that a system 
cannot roll back to a previous ephemeral configuration state. 
</t>
<t hangText="local configuration: ">is the data on a routing system 
which does persist across a reboot (software or hardware) and a 
power on/off condition.  Local configuration has the ability to 
roll back to a pervious configuration state. </t>
<t hangText="operator-applied policy:  "> is a policy that 
an operator sets that determines how ephemeral configuration 
interacts with local configuration.  One could consider these
policy knobs that the operator sets to determine how the 
I2RS agent will act.  Two policy knobs are necessary:
<list style="symbols">
<t>policy knob 1: Ephemeral configuration overwrites local configuration, </t>
<t>policy knob 2: Updated configuration overwrites ephemeral configuration</t>
</list>
</t>
</list>
</t>
<t>
Three possible setting for the above knobs are: 
<list style="hanging">
<t hangText="Policy knob 1=false and policy knob 2=true: "> 
I2RS software is installed, but the operator does not want it 
to overwrite write any configuration variables.  This might be valid 
if I2RS is only suppose to monitor data on this node. 
</t>
<t hangText="Policy knob 1=true and policy Knob 2=false:  ">
This is the normal case for the I2RS Agent where the 
ephemeral configuration data overwrites the local configuration data,
and the ephemeral data stays even when the local configuration value changes. 
When the ephemeral data is removed by the I2RS agent, the 
most recent local configuration value is set. 
</t>
<t hangText="Policy knob 1=true and Policy Knob 2=true:  ">
This case can occur if the ephemeral write is only suppose to 
take place until the next configuration cycle from a centralized
system. Suppose the local configuration is get by the centralized 
system at 11:00pm each night. The I2RS Client writes 
temporary changes to the routing system via the I2RS agent 
ephemeral write.  At 11:00pm, the local configuration update 
overwrite the ephemeral.  The I2RS Agent notifies the 
I2RS Client which is tracking which of the ephemeral changes
are being overwritten.  
</t> 
</list>
</t>
</section>
<section title="Operational and Ephemeral State definitions">
<t>
The <xref target="I-D.ietf-netmod-opstate-reqs"></xref>
defines the following to augment <xref target="RFC6244"></xref> 
to define how configuration state and operational state are different. 
<list style="hanging">
<t hangText="Applied Configuration:  "> This data represents the 
configuration state that the server is actually in. 
</t>
<t hangText=" Derived State:  "> This data represents information which is generated
 as part of the server's own interactions.
</t>	   
<t hangText="Intended Configuration:  "> This data is the configuration state
that the network operator intends the server to be in, and that
has been accepted by the server as valid configuration.
</t>
<t hangText="Operational State:  "> is the current state of the
 system as known to the various components of the system (e.g.,
 control plane daemons, operating system kernels, line cards).
  The operational state includes both applied configuration and
  derived state.
 </t>
 <t hangText="Ephemeral State:  "> contains both 
 ephemeral configuration state and operational state. 
 In a data model which is only ephemeral, 
 the operational data created based on ephemeral configuration state. 
 In a non-ephemeral data model, the ephemeral augmentatation to 
 operational state may create ephemeral operational state. </t>
 <t hangText="Ephemeral Configuration state: ">
 Ephemeral configuration state is state which is an ephemeral only 
 data modules or ephemeral configuration that augments a 
 non-ephemeral data model."
 </t> 
</list>
</t>
<t>
In each of these definitions, the "server" is the routing system. 
</t>
<t>
The <xref target="I-D.ietf-netmod-opstate-reqs"></xref> 
defines two actions that update the intended and the applied configuration:
<list style="hanging">
<t hangText="Asynchronous Configuration Operation:  "> the server 
MUST update its intended configuration before replying to the
client indicating whether the request will be processed. The
 server's applied configuration state is updated after 
 the configuration change has been fully
 effected to all impacted components in the server.
</t>
<t hangText="Synchronous Configuration Operation:  "> the server
MUST  fully attempt to apply the configuration change 
to all impacted components in the server, updating 
both its configuration (intended configuration and the
applied configuration), before replying to the client.  
</t>
</list> 
 </t>
 </section> 
</section>
 <section title="DataStore Model Melee">
<t>The NETMOD Working Group has been 
working to create new definitions of 
datastores based on feedback from operators on 
desiring a split between operational state
and configuration state. 
</t>
<t>
In a system without ephemeral data, the 
structure of the routing systems local 
intended configuration, applied configuration, 
and derived state can be modeled in the following ways: 
<list style="numbers">
<t> Opstate model from I-D.draft-kwatsen-netmod-opstate
(figure 1 below), 
</t> 
<t>
Persistent/Non-Persistent Config from I-D.draft-wilton-netmod-refined-datastores
(figure 2 below) , 
</t>
<t>Revised Data Store (Ephemeral is OPSTATE )  from I-D.draft-schoenw-netmod-revised-datastores
 (figure 3) </t>
 
<t>I2RS model (figure 4 below in section 2.4.1).
</t>
</list>
</t>
<t>
Section 2.4.1-2.4.4 provide diagrams and pro/cons of each model. 
Operational experience will improve our understanding of these datastore models.
</t>
<section title="Opstate model">
<t>
Model from: I-D.draft-kwatsen-netmod-opstate
<figure> 
<artwork>
  Local Configuration 
   
                   |  Synchronous
                   |  or Asychronous updsate 
                   |          
           ===========================   
           |  local                  |   
           | intended configuration  |    
           ===========================				
                       ||    read/write 
      -----------------||-------------------
                       ||   read only 
         +-------------||------+
         | operational ||      |
         | state       ||      | 
         |    =========||==    |
         |    | Applied   |    |
  config |    | config    |    |
    true |    =============    |
  ******************************
  config |   _____________     |
   false |   |  derived  |     |
         |   |  state    |     |
         |   |___________|     |
         +---------------------+

		 Figure 1 
</artwork>
</figure>
</t>
<t>I2RS Proposed Ephemeral state addition to Model
<figure>
<artwork>   
                   |  Synchronous
                   |  or Asychronous updsate 
                   |     
          ================================
          | Local         | Ephemeral    |=====I2RS Agent 
          | configuration | Confguration |
          |''''''''''''''''''''''''''''''|			 
          | Intended  configuration      |   
          =============||=================				
                       ||    read/write 
                      -||-------------------
                       ||   read only 
         +-------------||-------------+
         | operational ||             |
         | state       ||             | 
         |    =========||==========   |
         |    | Local  * ephemeral|   |
         |    | config * config   |   | 	 
  config |    | Applied config    |   |
    true |    =====================   |
  ****************************************
  config |   ______________________   |
   false |   | local  * ephemeral |   |
         |   | state  *  state    |   |
         |   |  derived state     |   |
         |   |_____________________   |
         +----------------------------+
 Figure 2 				
</artwork>
</figure>
</t>
<t>
Pro: 
<list style="numbers">
<t>Ephemeral configuration utilize the constraint 
checks in yang 1.1 <xref target="I-D.ietf-netmod-rfc6020bis"></xref>
in section 8.3 for message syntactial checks (8.3.1), and 
can use insertion and datastore based constraint checking 
in NETCONF/RESTCONF in their normal manner (section 8.3.2 and 8.3.3). 
</t>
<t>Operational state can occur in ephemeral only data models 
</t>
<t>Ephemeral augmentations seem a logical extension. 
</t>
<t>Event/notification for I2RS can work with config and ephemeral.
</t>
<t>Can query ephemeral + local configurations as overlay or 
separately. 
</t>
</list>
</t>
<t>
Con: 
<list style="numbers">
<t>Ephemeral configuration cannot elect to use only the 
Yang 1.1 syntactical checks (section 8.3.1 of 
<xref target="I-D.ietf-netmod-rfc6020bis"></xref>).  
</t>
</list>
</t>
</section>  
<section title="Persistent/Non-Persistent Config ">
<t>Persistent/Non-Persistent Config from I-D.draft-wilton-netmod-refined-datastores
<figure>
<artwork>

      +-------------+                  +-----------+
      | &lt;candidate&gt; |                  | &lt;startup&gt; |
      |  (ct, rw)   |&lt;---+        +---&gt;| (ct, rw)  |
      +-------------+    |        |    +-----------+
             |           |        |          |
             |      .....|........|........  |
             |      . +-----------------+ .  |
             +------->|&lt;persistent cfg&gt; |&lt;---+
                    . | (ct, rw)        | .
      Intended      . +-----------------+ .
       Config   ==&gt; .         v           .
      Datastore     . +-----------------+ .
      (abstract)    . |&lt;ephemeral cfg&gt;  |&lt;--- Can override persistent
                    . | (ct, rw)        | .   cfg. Optional
                    . +-----------------+ .
                    ..........|............
                              |
                    +---------v-----------+
                    | ................... |
                    | . &lt;applied cfg&gt;   .&lt;--- Actual cfg in effect
     Operational    | . (ct, ro)        . |
        State   ==&gt; | ................... |
      Datastore     |         +           |
                    |    system cfg      &lt;--- System created config
                    |         +           |
                    |    system state    &lt;--- All config false nodes
                    +---------------------+
</artwork>
</figure>
</t>
<t>
Pro: 
<list style="numbers">
<t>Ephemeral configuration utilize the constraint 
checks in yang 1.1 <xref target="I-D.ietf-netmod-rfc6020bis"></xref>
in section 8.3 for message syntactial checks (8.3.1), and 
can use insertion and datastore based constraint checking 
in NETCONF/RESTCONF in their normal manner (section 8.3.2 and 8.3.3). 
</t>
<t>Operational state can occur in ephemeral only data models 
</t>
<t>Ephemeral augmentations align with the I2RS ephemeral 
requirements <xref target="I-D.ietf-i2rs-ephemeral-state"></xref>
</t>
<t>Event/notification for I2RS can work with config and ephemeral.
</t>
<t>Can query ephemeral + local configurations as overlay or 
separately. 
</t>
</list>
</t>
<t>
Con: 
<list style="numbers">
<t>Ephemeral configuration cannot elect to use only the 
Yang 1.1 syntactical checks (section 8.3.1 of 
<xref target="I-D.ietf-netmod-rfc6020bis"></xref>).  
</t>
</list>
</t>
</section>
<section title="Revised Data Store (Ephemeral is OPSTATE">
<t>Revised Data Store (Ephemeral is OPSTATE )  from I-D.draft-schoenw-netmod-revised-datastores
</t>
<t>
<figure>
<artwork>
  +-------------+                  +-----------+
  | &lt;candidate&gt; |                  | &lt;startup&gt; |
  |  (ct, rw)   |&lt;---+        +---&gt;| (ct, rw)  |
  +-------------+    |        |    +-----------+
         |           |        |           |
         |         +------------+         |
         +--------&lt;| &lt;running&gt;  |&gt;--------+
                   | (ct, rw)   |
                   +------------+
                         |
                        (A)       // e.g., removal of 'inactive' nodes
                         v
                   +------------+
                   | &lt;intended&gt; | // subject to validation
                   | (ct, ro)   |
                   +------------+
                         |
                        (B)       // e.g., missing resources or delays
                         v
                   +------------+
                   | &lt;applied&gt;  |
                   | (ct, ro)   |
                   +------------+
                         |
                        (C)       // e.g., autodiscovery, control-plane
                         |        // protocols, control-plane datastores
                         v
         +--------------------------------+
         | &lt;operational-state&gt;            |
         | (ct + cf, ro)                  |
         +--------------------------------+
</artwork>
</figure>
</t>
<t>
Pro: 
<list style="numbers">
<t>Ephemeral configuration can tailor its constraint checking to 
the data model.
</t>
<t>Ephemeral data is like data sent to/from 
any routing process. 
</t>
</list>
</t>
<t>
Con: 
<list style="numbers">
<t>Ephemeral configuration state must create its 
own constraint checking 
</t>
<t>Ephemeral state has no easy way to query the 
overlay of ephemeral state and local configuration since there is
no augmentation of local configuration. 
</t>
<t>Event/notification for I2RS can work with config and ephemeral.
</t>
<t>Ephemeral configuration  </t>
</list>
</t>
</section> 
<section title="Another Model for Ephemeral">
<t> 
This model came out of dicussions with the authors of 
all the drafts: 
</t>
<t>
<figure>
<artwork>
                  +---------------+
				  | Ephemeral     |
				  | Configuration |
                  +---------------+
				        ^  |
                        |  |
  +-------------+       |  |       +-----------+
  | &lt;candidate&gt; |       |  |       | &lt;startup&gt; |
  |  (ct, rw)   |&lt;---+  |  |  +---&gt;| (ct, rw)  |
  +-------------+    |  |  |  |    +-----------+
         |           |  |  V  |           |
         |         +------------+         |
         +--------&gt;| &lt;running&gt;  |&lt;--------+
                   | (ct, rw)   |
                   +------------+
                         |
                        (A)       // e.g., removal of 'inactive' nodes
                         v
                   +------------+
                   | &lt;intended&gt; | // subject to validation
                   | (ct, ro)   |
                   +------------+
                         |
                        (B)       // e.g., missing resources or delays
                         v
                   +------------+
                   | &lt;applied&gt;  |
                   | (ct, ro)   |
                   +------------+
                         |
                        (C)       // e.g., autodiscovery, control-plane
                         |        // protocols, control-plane datastores
                         v
 +---------+      +----------------------------+  +--------------+
 |injected |--&gt;| &lt;operational-state&gt;  |  |  forwarding  | 
 |ephemeral|      | process (ct + cf,      |------|              |
 |         |      |   ro + injected  )     |      |              |
 +---------+      +------------------------+      +--------------+
</artwork>
</figure>
</t>
</section>
</section> 
<section title="Summary of Protocol Changes">
<t>This section provides a summary of requirements for 
changes to support the I2RS protocol features of 
ephemeral data, a secure protocol, management data 
flows, and I2RS error handling.  Management data flows 
may be large data flows for notifications, events, and
protocol events.  Management flows could also be tracing 
the routing system's operation or OAM operations.  
</t>
<section title="Ephemeral Data"> 
 <t> 
 This section provides an overview of the ephemeral data store,
 I2RS agent caching support, and ephemeral requirements
 (from <xref target="I-D.ietf-i2rs-ephemeral-state"></xref>). 
 
 </t>
<section title="Overview of Ephemeral Data Store">
<t>This section augments the <xref target="I-D.ietf-netmod-opstate-reqs"></xref> 
 with definitions for ephemeral state as the longest held 
 NETMOD datastore model.  Any of the ephemeral data models 
 described above can be made to align to ephemeral state, but
 the revised data store (ephemeral is operation state ) may take 
 more effort. 
 </t>
 <t> NETCONF provides the concept of a data store, but RESTCONF only defines the concept of a 
 "context".  The logical description of ephemeral additions to 
 the NETCONF data store below still 
 fits the general concepts of the RESTCONF context. 
 </t>
 <t>This approach to the ephemeral datastore is two panes-of-glass model
 one pane of glass is the "local configuration" within the Intended configuration
 and the other pane of glass is the "ephemeral data".  The two panes of 
 glass are pressed together to create the intended configuration 
 which then applied to the routing node and generates
 derived state as shown in figure 2.   
</t>  
<t>The applied configuration is the result of the
the intent configuration (normal and ephemeral). Similarly, 
the derived data is a result of the applied configuration 
(normal and ephemeral).  Therefore derived state may be defined
in local configuration or ephemeral portions of a data model
(or data models). 
</t>
<t> 
The ephemeral data store has the following general qualities: 
<list style="numbers">
<t>Ephemeral state is not unique to I2RS work.</t>
<t>The ephemeral datastore is never locked.
 </t>
<t> The ephemeral portion of the intended configuration, 
applied state, and derived state does not persist over a reboot,
</t>
<t>an ephemeral node cannot roll-back to its previous value,          
</t>
<t>Since ephemeral data store is just data that does not presist
 over a reboot, then in theory any node or group of nodes 
 in a YANG data model could be ephemeral.
The YANG data module must indicate what portion of the data model (if any)
is ephemeral.
<list style="symbols">
<t>A YANG data module could be all ephemeral 
(e.g. <xref target="I-D.ietf-i2rs-rib-data-model"></xref>) 
with no directly associated configuration models, 
</t>
<t>A YANG model could be all ephemeral but associated with a configuration model 
</t>
<t>or a single data node or data tree could be made ephemeral.
</t>
</list>
</t>
<t>The management protocol (NETCONF/RESTCONF) needs to signal which
poritons of a data model(node, tree, or data model) are ephemeral
in the module library <xref target="I-D.ietf-netconf-yang-library"></xref>.
</t>
</list>
</t>
</section> 
<section title="I2RS Agent Caching of Ephemeral Data ">
<t> I2RS protocol version does not support caching of ephemeral 
data the I2RS Agents.  Future I2RS work MAY support 
caching of data in the I2RS Agents. Implementers 
are encourages to experiment with caching of ephemeral 
data in I2RS Agents. 
 </t>
</section> 
</section> 
<section title="Protocol Security">
<t>
The I2RS protocol requires the ability to run over
secure transport connections for the I2RS protocol to run over.  
Each secure transport must provide data confidentiality, data integrity, and 
replay prevention. NETCONF running over TLS or SSH over TCP, and
RESTCONF running over HTTP 1.1 over TLS over TCP provide these features.
However, the I2RS protocol requires extensions to this protocol security. 
This section provides an overview these changes.  
</t>
<section title="Summary of Protocol Security Changes">
<t>The I2RS protocol requires the following new security features: 
<list style="symbols">
<t>mutual identification of I2RS Client and Agents via unique identifiers,
</t>
<t>the I2RS client identifier to be associated with a priority and 
a secondary identity 
</t> 
<t>data access (read/write) for each data model to be associated
with I2RS client roles, 
</t>
<t>the ability to send some data over an insecure section 
as specified in a data model. 
</t>
</list>
This section describes these new features. 
</t>
<section title="Multiple secure transports">
<t>The I2RS protocol MAY operate over a set of secure 
transports (1 to many transports) which provide data
confidentiality, data integrity, and replay prevention.
The key management that distributes keys MUST  
guarantee that only the entities having sufficient privileges 
can get the keys to encrypt/decrypt the sensitive data. 
NETCONF's operatoring over TLS or SSH protocols, both of which run over TCP,
provide such a secure transport as does RESTCONF operating over HTTP 1.1
operating over TLS which runs over TCP also fits this description.  
 </t>
</section>
<section title="Mutual Identification ">
<t>I2RS protocol security requires mutual identification of 
I2RS client and agent via a unique identifier.  The identity of each 
I2RS client must be represented by at least one unique I2RS client identifier, 
and the identity of an I2RS Agent must be represented by 
at least one unique I2RS agent identifier. The I2RS protocol 
must perform mutual identification of the I2RS client and the I2RS agent.
The I2RS client-agent security association is valid for a single transport session
or a set of parallel transport sessions. The I2RS client-agent security association 
does not need to have an active transport session to remain active. 
The I2RS agent and client unique identifiers are created and distributed
outside the I2RS protocol. 
</t>
</section> 
<section title="I2RS Client has Identifier + Priority + Secondary Identifier">
<t>
Each I2RS client identifier will have one priority and 
one secondary identifier during a particular I2RS transaction 
(read/write sequence), but the priority and the secondary 
identity associated with a I2RS client identity may change during 
a I2RS client-agent association.  
</t>
</section> 
<section title="I2RS Role Based Access">
 <t>
Certain data within routing elements is sensitive and read/write operations on 
such data SHOULD be controlled as to which I2RS client can access the 
data for read/write based on the I2RS client's roles in order to 
protect its confidentiality.  A I2RS Client's role describe 
which data models and which data within those data models
the I2RS client can have read access, write access, or both (read/write). 
</t>
</section> 
<section title="Insecure Transport">
<t>An I2RS data model with ephemeral state MAY 
require the passage of I2RS data will require the some data to be
be sent from the I2RS agent to a I2RS client via an insecure transport.
Examples of this transport could be the I2RS agent agent opening up 
a TCP connection to an I2RS Client via TCP.  
The yang data model specifying this MUST indicate what 
data is able to be passed over an insecure transport connection.  
Insecure transport must still support traceability and 
publication/subscription of the insecure data. 
</t>
</section> 
</section> 
</section>
 <section title="Data Flow">
 <t>Large amounts of data can flow from the I2RS agent 
 to the I2RS client, or from the I2RS client to the I2RS Agent.
 The I2RS client may set or query ephemeral configuration in the 
 routing system via the I2RS agent and receive operational state, 
 notifications, or logging from the I2RS Agent on behalf of the I2RS
 routing system.  In addition, some OAM functions engaged by the 
 by the I2RS Client via the I2RS Agent can require large 
 data flows plus system resources (cpu, memory, data storage). 
 This section discusses implementation issues regarding this 
 work. 
 </t>
 <section title="Data Flow for Ephemeral Configuration">
  <t> The requirements for high performance and high-volune 
 data flow between the I2RS Clients and the I2RS agents in 
 the routing system have been described in general in the I2RS architecture 
 <xref target="I-D.ietf-i2rs-architecture"></xref>.  
lients can send large amount of ephemeral configuration data 
 to the I2RS Agent.  The writes may be done 
 via NETCONF (&lt;edit-config&gt; or an rpc function), or via 
 RESTCONF (PUT, PATCH, POST).  Reads can be done via NETCONF
 &lt;get-config&gt; or RESTCONF GET or query. 
 </t>
 <t>
  The I2RS RIB Data Model <xref target="I-D.ietf-i2rs-rib-data-model"></xref> 
 also supports the use of rpc to add/delete RIBs, add/delete/update routes, 
 and add/delete nexthops.  If the I2RS client does a 
 small to medium number of writes to the I2RS ephemeral state in 
the I2RS Agent in a routing system, the full validation that NETCONF or RESTCONF 
does will be able to be done without any reduction in speed to the 
I2RS high-performance system. For example, if the I2RS RIB Data Model 
has adds a 1000 routes, the I2RS RIB use of rpc to add/delete/update 
routes should be able to provide a high-performance system.  Alternatively
the NETCONF &lt;edit-config&gt; could update these 1000 routes with a write, or 
the RESTCONF POST, PUT or PATCH should be able to add the 1000 routes.
</t>
<t>If a large number of ephemeral routes or filters are written (updates or new)  
by the I2RS Client to the ephemeral state in the I2RS agent, one of the key issues
for a high performance interface is the time it takes to validate routes.
Due to this concern, the I2RS architecture was design to allow less than the full 
NETCONF or RESTCONF validation.  The concept is that the I2RS routes would 
be validated within the I2RS client and sent via a 99.999% reliable
connection.  In this scenario, the I2RS Agent would trust the validation 
that the I2RS Client did, and the communication of the route additions
via the network connection.
</t>
<t>An experiment regarding this has been done with the 
ODL code base update of ephemeral routes, but additional 
experimentation needs to be done prior to finalizing this design. 
Section 3.4.2 reviews how this process might be done, but many 
open issues exist in implementing this "low-validation" interface.
Without additional experimentation and prototype code, 
this type of "low-validation", 
</t>
</section>
<section title="Write Error handling">
<t>This section reviews  I2RS normal error handling and 
error handling for rpc with no validation checks. 
</t>
<section title="Normal validation checks ">
<t>
An I2RS agent validates an I2RS client's information 
by examining the following: 
<list style="symbols"> 
<t>message syntax validation,  </t>
<t>syntax validation for nodes of data model,</t>
<t>referential checks (leafref checks
MUST clauses, and instance indentifier),  </t>
<t>checks groups of data within a data model or 
groups of data across data models, </t>
<t>write access to data,  </t>
<t>if write access and values already exist, if I2RS client 
write access is higher than existing priority.</t>
</list>
</t>
<section title="Multiple I2RS Clients Write Same Node">
<t>Multiple I2RS clients writing to the same variable 
is considered an "error condition" in the I2RS architecture
<xref target="I-D.ietf-i2rs-architecture"></xref>, but 
an I2RS Agent must handle this error condition. 
Upon multiple I2RS clients writing, the ephemeral data store 
allows for priority pre-emption of the write operation.  
Priority pre-emption means each I2RS client of the
ephemeral I2RS agent (netconf server) is associated with a priority.
Priority pre-emption occurs when a I2RS client with a higher priority 
writes a node which has been written by an I2RS client (with the lower priority). 
At this point, the I2RS agent (netconf server) allows the write and 
provides a notification indication to the notification publication/subscription 
service.
</t>
<t>The I2RS protocol security requires that 
each I2RS client has a identity that has a unique identifier 
which has one priority and one secondary identitifer associated it during
a write sequence (singel write or multiple group actions (see below).
</t>
<t>
An I2RS client's unique identifier is distributed along with valid roles and  
a valid priority via exterior mechanisms (AAA, administrative interface)
to the I2RS agent.  The secondary identifier is passed as an opaque 
meta value in the I2RS Client write.  The exterior mechanism may 
change the the valid roles and priority associated with an I2RS client's 
identifier.  If a change occurs after the I2RS client data has written 
information, the I2RS agent must revaluate the writes associate with this
I2RS client (including rpcs).  The I2RS agent may schedule this evaluation, 
but it should provide the following notifications to the I2RS client: 
<list style="symbol">
<t>I2RS agent had received change of priority for I2RS client,</t>
<t>I2RS agent is beginning reevaluation of writes or rpcs associated 
with the client due to priority change,  </t>
<t>I2RS agent has completed the revaluation due to priority change.</t> 
</list>
</t>
</section>
<section title="Multiple Action Messages ">
<t> An I2RS agent receiving multiple action to write data within a message from
an I2RS client must validate the data and check to make sure 
this I2RS client has permission and priority to change all the values. 
If one of the values in the multiple action messages 
fails one of these tests, then error handling must decide 
what to do with the rest of the values. 
</t>
<t>Error handling in I2RS protocol version 1 simply remove all changed
nodes and restores the previous values (all-or-nothing).  In this case, 
the short term ephemeral values are kept until the message is processed.
</t>
<t>
Error handling on writes of the ephemeral datastore could be different for nodes 
that are grouped versus orthogonal.  Group nodes may need to be all changed
or all removed (all-or-nothing).  In contrast, writing orthogonal data nodes
in the same data module or between data models need to be added or deleted in sync, 
but the writes do not have to be "all-or-nothing." 
</t>
<t>
I2RS suggests the following are some of the potential error handling techniques
for multiple  message sent to the I2RS client:
 <list style="numbers">
 <t>Perform all or none: All operations succeed or none of them will be applied. 
   This useful when there are mutual dependencies.</t>
 <t>Perform until error: Operations are applied in order, and when error occurs
   the processing stops. This is useful when dependencies exist between
   multiple-message operations, and order is important.</t>
  <t>Perform all storing errors: Perform all actions storing error indications
    for errors.  This method can be used when there are no dependencies  
    between operations, and the client wants to sort it out.</t>
 </list> 
 </t>
 <t> The initial version of I2SR protocol restricts I2RS protocol implementations to 
 an "all or nothing" (aka roll-back on error).
 </t>
<t>Is important to reliability of the data store that none of these error handling for
multiple operations in one more multiple messages cause errors into be insert the I2RS ephemeral data-store. 
</t>
<t>
</t>
<t>Discussion of Current NETCONF/RESTCONF versus </t>
<t>RESTCONF does an atomic action within a http session, 
and NETCONF has atomic actions within a commit. 
These features may be used to perform these features.</t>
<t> I2RS processing is dependent on the I2RS model. The I2RS model must consider 
the dependencies within multiple operations work within a model.  
</t>

<section title="Grouping and Error handling">
<t>Yang 1.1 provide the ability to group data in
groupings, leafref lists, lists, and containers. Grouping of 
data within a model links to data that is logically associated with one another.  
Data models may logical group data across models.  One example of such an association 
is the association of a static route with an interface.  The concepts of 
groupings apply to both ephemeral and non-ephemeral nodes within a data model. 
</t>
</section> 
<section title="Why All-or-Nothing ">
<t>NETCONF does not support a mandated sequencing of 
edit functions or write functions.  Without this 
mandated sequences, NETCONF cannot support partial edits. 
 </t>
<t>RESTCONF has a complete set of operations per message. 
The RESTCONF patch <xref target="I-D.ietf-netconf-yang-patch"></xref> 
could support partial edit functions per messages. </t>
<t>Since version 1 of I2RS protocol desires to support
NETCONF and RESTCONF equally, the partial 
</t>
</section>
<section title="Future Error Handling of Multiple Write Messages">
<t>
The <xref target="I-D.ietf-i2rs-architecture"></xref> specifies three types
of error handling for a partial write operation of orthogonal data:
<list style="symbols">
<t>stop-on-error - means that the configuration process stops when a write
to the configuration detects an error due to write conflict.</t>
<t>continue-on-error - means the configuration process continues when a
write to the configuration detects an error due to write process, and
error reports are transmitted back to the client writing the error. </t>
<t>all-or-nothing - means that all of the configuration process is 
correctly applied or no configuration process is applied.
(Inherent in all-or-nothing is the concept of checking all changes
before applying.)</t>
</list>
Grouped data must only use "all-or-nothing."
</t>
<t>Future I2RS protocol versions will mandate "stop-on-error"
handling or "continue-on-error" handling of multiple orthongal actions
if a RESTCONF "patch" like facility is defined for NETCONF. 
</t>
</section> 
</section>
</section> 
<section title="Reduced Validation (Experimental)">
<t>Note: It is not clear how reduced validation works handles
all failures cases, so implementers are encouraged to experiment and
report results.  The authors are concerned about the various 
failures scenarios.  One authors (Andy Bierman) raises concerns
whether this can work with local configuration. 
</t>
<t>As described above, in some circumstances the I2RS client-agent 
communication may be considered almost perfect (99.999%), and
the speed of update critical.  In such cases, 
the operator may choose to have the I2RS client do 
all the validation within a group and between groups 
prior to downloading the data, and the I2RS agent 
to simply upload the data.  One mechanisms puts this 
function in an RPCs
</t>
<section title="Reduced Validation RPC (Experimental)">
<t>
The "no validation" feature requires:
<list style="symbols">
<t>operator-applied policy knob enabling this feature; 
</t>
<t>rpc in a data model with the yang 
"ephemeral-validation no-check;"
</t>
</list> 
</t>
</section>
</section> 
</section> 
 <section title="Data Flows From the I2RS Agent to I2RS Client">
   <t> Large data flows can be required by the I2RS agent to 
   publish large data for protocol state, virtual topologies, 
   events, and notifications from a routing system. 
   <xref target="I-D.ietf-i2rs-pub-sub-requirements"></xref>
   specify the I2RS requirements for publication of large data flows
   from the I2RS Agent via a publication/subscription (aka pub-sub) mechanism. 
   The pub-sub mechanisms has been specified for the "push" service 
   in <xref target="I-D.ietf-netconf-yang-push"></xref>.
   </t>
   <t>Large data flows can also be required to trace the 
   actions of a routing system.  These requirements 
   are listed in the <xref target="I-D.ietf-i2rs-traceability"></xref>. 
   These traceability requirements specify mandatory fields in 
   the trace log including an end of message marker for a record
   plus handling of the trace logs.  This handling includes
   creation of trace logs, limits on trace logs, trace log rotation, 
   and trace log retrieval by syslog <xref target="RFC5424"></xref>,
   the pub-sub mechanism or a large data push.  This large 
   data push can be a pull in a large write. 
   </t> 
   <t>Large data flows from the I2RS client also mean that 
   some of the data flows from the I2RS Agent 
   may be prioritized over other data flows
   (I2RS-DF-REQ-07).  This priorization will be based on 
   what the data is, what the operator-applied policy knobs
   are for reporting, and the current resource constraints 
   (I2RS-DF-REQ-05).
   </t>
 </section>
 <section title="OAM Constraints">
<t>OAM actions in a router may require extra 
processing, extra memory or data storage, or extra 
data flows to/from the I2RS agent.  The OAM functions 
SHOULD not impact the routing functions so it cannot 
perform its main task of guiding the traffic.  
OAM functions must be able to be limited in terms of 
processing power, memory, data storage, or data flows
to/from network (I2RS-DF-REQ-05).
 </t>
 </section>
 <section title="IPFIX for traffic monitoring">
	<t>Due to the potentially large data flow the traffic measurment 
   statistics generate, these statistics are best handled by 
   publication techniques within NETCONF or a separate protocol such as IPFIX.  
   In the future version of the I2RS protocol may desire to 
   support a data stream outbound from the I2RS Agent to an I2RS 
   client via the IPFIX protocol.
    </t>   
	</section>
</section>
<section title="Yang Changes">
<t>
The data modules supporting the ephemeral datastore 
can use the Yang module library to describe their datastore. 
Figure 5 shows the module library data structure
as found <xref target="I-D.ietf-netconf-yang-library"></xref>.
</t>
<t>
The Proposed changes to 
Yang for I2RS protocol version 1 are:  
<list style="symbols">
<t>i2rs:version 1;</t>
<t>i2rs:transport-nonsecure ok;</t>
<t>i2rs:ephemeral-validation nocheck; </t>
<t>ephemeral true; </t>
<t>encoding [XML | JSON] </t>
<t>protocol [RESTCONF | NETCONF] </t>
<t>protocol-transport [ssh, tls, tcp]</t>
<t>transport-ports [ports] </t>
</list>
</t>
<t>Since ephemeral data store, encoding methods, 
protocols, protocol transport, and transport ports 
are features of the general protocols, these are not 
tagged with the "i2rs:" key word. 
</t>
</section>
<section title="Transport Protocol Changes">
<section title="Secure Protocols">
<t>NETCONF's XML-based protocol (<xref target="RFC6241"></xref>) can operate over 
the following secure and encrypted transport layer protocols: 
<list>
<t>SSH as defined in <xref target="RFC6242"></xref>,</t>
<t>TLS with X.509 authentication <xref target="RFC7589"></xref></t>
</list>
</t>
<t>RESTCONF's XML-based or JSON <xref target="RFC7158"></xref>
data encodings of Yang functions are passed over HTTOS with (GET, POST, 
PUT, PATCH, DELETE, OPTIONS, and HEAD). 
</t>
</section>
<section title="Insecure Protocol">
<t> The ephemeral database may support insecure protocols
for information which is ephemeral state which 
does not engage in configuration.  The insecure protocol
must be defined in conjunction with a data model or 
a subdata model.
</t>
<t><xref target="RFC6536"></xref> with 
extensions supporting ephemeral, non-secure transport, and 
rpcs with no validation checks might look like: 
<figure>
<artwork>
extension ephemeral {
 description "if present in a data definition statement
    then the object is considered OK for editing as ephemeral data."
	}
extension non-secure-ok {
  description "if present in data definition statement 
   then the object is considered OK for non-secure transport."
   }
extension ephemeral-validation-nocheck {
  description "if present in rpc definition 
  the data received in the rpc is considered to 
  not require validation checks.  
   }
</artwork>
</figure>
</t>
</section>
</section>
<section title="NETCONF protocol extensions for the ephemeral datastore">
<t>
capability-name: ephemeral-datastore
</t>
<section title="Overview">
<t>
This capability defines the NETCONF protocol extensions for the ephemeral state.
The ephemeral state has the following features: 
<list style="symbols">
<t>the ephemeral data store is a part of the intended configuration datastore, 
applied configuration datastore, and the derived state store whose 
components are not survive a reboot. </t>
<t>The ephemeral capability is signalled as a capability of
 a leaf, grouping, a sub-module, or module that is stored as a feature of  
 the module in the netconf yang module library 
 (<xref target="I-D.ietf-netconf-yang-library"></xref>) used by Yang 1.1 and
 RESTCONF and NETCONF.   
 </t>
 <t>ephemeral data will be noted by an "ephemeral" statement in for a leaf,
 grouping, sub-module, or module. </t>
<t>The ephemeral datastore is never locked. </t>
<t>The ephemeral data store is one pane of glass that overrides the local configuration 
(which is considered one pane of glass) in the intended config based on 
operator-applied policy knobs (see section 2.1). 
 </t>
<t>Ephemeral data can occur as part of protocol or protocol independent modules.
However, ephemeral data nodes cannot have non-ephemeral data nodes within the
subtree. Ephemeral sub-modules cannot have non-ephemeral data nodes within the module.
Ephemeral modules cannot have non-ephemeral sub-modules or nodes within the module.
Yang 1.1 <xref target="I-D.ietf-netmod-rfc6020bis"></xref> augmented 
by ephemeral state must enforce this restriction. 
Similarly, the Yang mount schema <xref target="I-D.ietf-netmod-schema-mount"></xref>
must check for this restriction. 
</t>
<t>Ephemeral writes should enforce the normal validation checks, priority
pre-emption error handling if multiple I2RS clients write the same data, and 
"all-or-nothing" error handling for multiple actions in a write 
for data in groupings or orthogonal data (see section 3.4).
The I2RS agent should send the I2RS client requesting write 
the notification of any type of error during the write process:  
failure of normal validation,  priority pre-emption 
causing failure to write, multiple actions causing failure to 
sustain write (aka all-or-nothing roll-back). 
If the I2RS agent allows a priority pre-emption of the write of 
data model value by an I2RS client (e.g. client 1) of another 
I2RS client (e.g. client 2), then the I2RS agent must send a 
notification of the I2RS pre-emption to the previous I2RS 
client (e.g. client 2).
</t>
<t>Ephemeral writes as part of an rpc should allow the rpc 
to skip normal validation checks if data model specifies
"ephemeral-validation nocheck;".  The rpc which skips 
the normal validation MUST resolve the 
pre-emption write error handling for any data being
written without normal validation check, and MUST 
only all the data within a grouping rather than orthogonal data. 
</t>
</list>
</t>
</section>
<section title="Dependencies">
<t>The following are the dependencies for ephemeral support:
<list style="symbols">
<t>The Yang definitions specified in section 6. </t>
<t>The Yang modules must support the event notification 
write and read errors as well as data model errors. 
</t>
 <t> The following features must be supported by NETCONF 
   <list style="symbols">
   <t>Call Home <xref target="I-D.ietf-netconf-call-home"></xref>, 
   </t>
   <t>Server Configuratino Module <xref target="I-D.ietf-netconf-server-model"></xref>,
   </t>
   <t>Module library <xref target="I-D.ietf-netconf-yang-library"></xref>,
  </t>
  <t>Publication/Subscription via Push <xref target="I-D.ietf-netconf-yang-push"></xref>,
  </t>
  <t>Patch <xref target="I-D.ietf-netconf-yang-patch"></xref>, 
  </t>
  <t>syslog yang module (both <xref target="RFC5424"></xref>
   and <xref target="I-D.ietf-netmod-syslog-model"></xref>
   </t>
  </list>   
  </t>
  </list>
  </t>
</section>
<section title="Capability identifier">
<t>
The ephemeral-datastore capability is identified by the following capability
 string: (capability uri)</t>
</section>
<section title="New Operations">
<t>None</t>
</section>
<section title="Modification to existing operations">
<t>The capability for :ephemeral-datastore modifies the 
target for existing operations. </t>
<section title="&lt;get-config&gt;">
<t>The :ephemeral-datastore capability modifies the &lt;edit-config&gt;
to accept the &lt;ephemeral&gt; as a target for source, and allows
the filters focused on a particular module, submodule, or node.
</t>
<t> The positive and negative responses remain the same.
</t>
<t>
<figure>
<artwork>
Example - retrieve users subtree from 
          ephemeral database

 &lt;rpc message-id="101"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
   &lt;get-config&gt;
      &lt;source&gt;
        &lt;emphemeral-datastore/&gt;
      &lt;/source&gt;
      &lt;filter type="subtree"&gt;
        &lt;top xmlns="http://example.com/schema/1.0/thermostat/config">
        &lt;desired-temp&gt;
         &lt;/top&gt;
      &lt;/filter&gt;
   &lt;/get-config&gt;
 &lt;/rpc&gt;
</artwork>
</figure>
</t>
</section>
<section title="&lt;edit-config&gt;">
<t>The :ephemeral-datastore capability modifies the &lt;edit-config&gt;
to accept the &lt;ephemeral&gt; as a target for source with filters. 
The operations of merge, replace, create, delete, and remove are available,
but each of these operations is modified by the priority write as follows:
<list>
<t>&lt;merge&gt; parameter is replaced by &lt;merge-priority&gt; 
The current data is modified by the new data in a merge
fashion only if existing data either does not exist, or is owned by a lower priority client.
If any data is replaced, this event is passed to the notification function 
within the pub/sub and traceability. 
</t>
<t>&lt;replace&gt; is replaced by &lt;replace-priority&gt; 
for ephemeral datastore which replaces data if the existing 
data is owned by a lower priority client.  If data any data is replaced,
this event is passed to the notification function within pub/sub 
and traceability for notification to the previous client. 
The success or failure of the event is passed to traceabilty. 
</t>
<t>&lt;create&gt; - the creation of the data node works as in 
<xref target="RFC6241"></xref> except that the success or failure is
passed to pub/sub and traceability functions. 
</t>
<t>&lt;deletion&gt; - the deletion of the data node works as in 
<xref target="RFC6241"></xref> except event that the success or 
the error event is passed to the notiication services in the pub/sub
and traceability functions.  
</t>
<t>&lt;remove&gt; - the remove of the data node works as in 
<xref target="RFC6241"></xref> except that all results are 
forwarded to traceabilty. 
</t>
</list>
</t>
<t>
The existing parameters are modified as follows: 
<list>
<t>&lt;target&gt; - add a target of :emphemeral-datastore
</t>
<t>&lt;default-operation&gt; -allows only &lt;merge-priority&gt; or
&lt;replace-priority&gt;</t>
<t>&lt;error-option&gt; - the I2RS agent agent supports only the 
 a"all-or-nothing" equivalent to a "rollback-on-error" function. </t>
<t>positive response - the &lt;ok&gt; is sent for a positive response 
within an &lt;rpc-reply&gt;. </t>
<t>negative response - the &lt;rpc-error&gt; is sent for a negative response 
within an &lt;rpc-reply&gt;.  Note a negative respones may 
evoke a publication of an event.  </t>
</list>
</t>
</section>
<section title="&lt;copy-config&gt;">
<t>Copy config allows for the complete replacement
of all the ephemeral nodes within a target. 
The alternation is that source is the :ephemeral datastore
with the filtering to match the datastore.
The following existing parameters are modified as follows: 
<list>
<t>&lt;target&gt; - add a target of :emphemeral-datastore
</t>
<t>&lt;error-option&gt; - the I2RS agent agent supports only the 
 a"all-or-nothing" equivalent to a "rollback-on-error" function. </t>
 <t>positive response - the &lt;ok&gt; is sent for a positive response 
within an &lt;rpc-reply&gt;. </t>
<t>negative response - the &lt;rpc-error&gt; is sent for a negative response 
within an &lt;rpc-reply&gt;. </t>
</list>
</t>
</section>
<section title="&lt;delete-config&gt;">
<t>The delete will delete all ephemeral nodes out of a datastore. 
The target parameter must be changed to allow :ephemeral-datastore. 
and filters. </t>
</section>
<section title="&lt;lock&gt; and &lt;unlock&gt;">
<t>Lock and unlock are not supported with a target of :ephemeral-datastore.
 </t>
</section>
<section title="&lt;get&gt;">
<t>The &lt;get&gt; is altered to allow a target of :ephemeral-datastore and  
with the filters.  
 </t>
</section>
<section title="&lt;close-session&gt; and &lt;kill-session&gt;">
<t>The close session is modified to take a target of :ephemeral-datastore,
Since no locks are set, none should be released. 
</t>
<t>The kill session is modified to take a target of "ephemeral-datastore.
Since no locks are set, none should be released. </t>
</section>
</section>
<section title="Interactions with Capabilities">
<t>
<xref target="RFC6241"></xref> defines NETCONF capabilities for 
writeable-running datastore, candidate config data store, 
confirmed commit, rollback-on-error, validate, distinct start-up, 
URL capability, and XPATH capability.  I2RS ephemeral state
does not impact the writeable-running data store or the 
candiate config datastore. 
</t>
<section title="writable-running and candidate datastore">
<t>
The writeable-running and the candidate datastore cannot be used in conjunction
with the ephemeral data store. Ephemeral database overlays
an intended configuration, and does not impact the writable-running
or candidate data store.  
</t>
</section>
<section title="confirmed commmit">
<t>Confirmed commit capability is not supported for the ephemeral 
datastore. </t>
</section>
<section title="rollback-on-error">
<t> The rollback-on-error when included with ephemeral state 
allows the error handling to be "all-or-nothing" (roll-back-on-error). 
</t>
</section>
<section title="validate">
<t>The validation function operates normally with 
one addition with one addition for any 
data handled by an rpc with 
 "ephemeral-validation nocheck".
 </t>
 <t>
The rpc specifying ephemeral-validation nocheck  
MUST specify within the ephemeral data written by 
the rpc function the following grouping:
<figure>
<artwork>
  grouping ephemeral-validation-notcheck {
	leaf rpc {
	  type string rpc-id;
	  description "rpc wrote 
	   the non-check data";
	}
    leaf rpc-seq {
	   type uint32 rpc-id; 
	   description "sequence number of
	    rpc that wrote non-check data";
	}
    leaf client-id {
      type uint64 client-id;
	  description "client identifier
	   that wrote non-checking rpc;"
	}
    description "Tracking on rpc with 
      no validation checking so validation 
      failure can send note to client."; 
  };

</artwork>
</figure>
If the data validation finds an error in 
a component that was non-check, the 
notification should include 
the data module, submodule 
(if valid). 
</t>
<t>
(Editor's note: Initial experiments on this type of 
rpc for I2RS RIB routes and I2RS FB-RIB filters
will be done before IETF 96. 
</t>
</section>
<section title="Distinct Startup Capability">
<t>This NETCONF capability appears to operate to load write-able running config,
running-config, or candidate datastore.  The ephemeral state does not 
change the environment based on this command. 
</t>
</section>
<section title="URL capability and XPATH capability">
<t>The URL capabilities specify a &lt;url&gt; in the &lt;source&gt;
and &lt;target&gt;.  The initial suggestion to allow both of these
features to work with ephemeral datastore.  </t>
</section>
</section>
</section> 
<section title="RESTCONF protocol extensions for the ephemeral datastore">
<t>
capability-name: ephemeral-datastore
</t>
<section title="Overview">
<t>
This capability defines the RESTCONF protocol extensions for the ephemeral state.
The ephemeral state has the features described in the previous section on NETCONF. 
</t>
</section>
<section title="Dependencies">
<t>The ephemeral capabilities have the following dependencies: 
<list style="symbols">
<t>The Yang definitions specified in section 6. </t>
<t>The Yang modules must support the event notification 
write and read errors as well as data model errors. 
</t>
   <t> The following features must be supported by RESTCONF
   <list style="symbols">
   <t>Call Home <xref target="I-D.ietf-netconf-call-home"></xref>, 
   </t>
   <t>Server Configuratino Module <xref target="I-D.ietf-netconf-server-model"></xref>,
   </t>
   <t>Module library <xref target="I-D.ietf-netconf-yang-library"></xref>,
  </t>
  <t>Publication/Subscription via Push <xref target="I-D.ietf-netconf-yang-push"></xref>,
  </t>
  <t>Patch <xref target="I-D.ietf-netconf-yang-patch"></xref>, 
  </t>
  <t>syslog yang module (both <xref target="RFC5424"></xref>
   and <xref target="I-D.ietf-netmod-syslog-model"></xref>
   </t>
  </list>   
  </t>
  </list>
  </t>
</section>
<section title="Capability identifier">
<t>
The ephemeral-datastore capability is identified by the following capability
 string: (capability uri)</t>
</section>
<section title="New Operations">
 <t>none</t>
</section>
<section title="modification to data resources">
<t>RESTCONF must be able to support the ephemeral 
datstore as a context with its rules as part of the "{+restconf}/data" 
subtree. The "edit collision" features in RESTCONF
must be able to provide notification to I2RS read functions 
or to rpc functions. The "timestamp" with a
last modified features must support the traceability function.
</t>
<t> 
The "Entity Tag" could  support saving a  client-priority 
tuple as a opaque string, but it is important that
that additions be made to restore client-priority so it 
can be compared with strimgs can be done to determine 
the comparison of two I2RS client-priorities. 
</t>
</section> 
<section title="Modification to existing operations">
<t>The current operations in RESTCONF are: OPTIONS,
HEAD, GET,  POST, PUT, PATCH, and DELETE. This section 
describes the modification to these exiting operations.</t>
<section title="OPTIONS changes">
<t>
The options methods should be augmented by the
<xref target="I-D.ietf-netconf-yang-library"></xref> information
that will provide an indication of what ephemeral state exists
in a data modules, or a data modules sub-modules or nodes.
</t>
</section>
<section title="HEAD changes">
<t>
The HEAD in retrieving the headers of a resources. It would
be useful to changes these headers to indicate the datastore 
a node or submodule or module is in (ephemeral or normal), and 
allow filtering on ephemeral nodes or trees, submodules or module. 
</t>
</section>
<section title="GET changes">
<t>
GET must be able to read from the URL and a context ("?context=ephemeral").
Similarly, it is important the Get be able to determine if 
the context=ephemeral. 
</t>
</section>
<section title="POST changes">
<t>
POST must simply be able to create resources in ephemeral datastores 
("context=ephemeral") and invoke operations defined in ephemeral 
data models.
</t>
</section>
<section title="PUT changes">
<t>
PUT must be able to reference an ephemeral module,
sub-module, and nodes ("?context=ephemeral").
</t>
</section>
<section title="PATCH changes">
<t>
Plain PATCH must be able to update or create child resources in an 
ephemeral context ("?context=ephemeral")  The PATCH for the ephemeral state must be
change to provide a merge or update of the original data only 
if the client's using the patch has a higher priority than an existing
datastore's client, or if PATCH requests to create a new node, 
sub-module or module in the datastore.  
</t>
</section>
<section title="DELETE changes">
<t>
The phrase "?context=ephemeral" following an element will specify
the ephemeral data store when deleting an entry. 
</t>
</section>
<section title="Query Parameters">
<t>The query parameters (content, depth, fields,
insert, point, start-time, stop-time, and with-defaults (report-all,
trim, explicit, report-all-tagged) must support ephemeral context
("?context=ephemeral") described above. </t>
</section>
</section>
<section title="Interactions with Notifications">
<t>The ephemeral database must support the ability to publish 
notifications as events and the I2RS clients being able to 
receiving notifications as Event stream.  The event error stream
processing should support the publication/subscription mechanisms
for ephemeral state defined in 
<xref target="I-D.ietf-netconf-yang-push"></xref>.
</t>
</section>
<section title="Interactions with Error Reporting">
<t>The ephemeral database must support in RESTCONF must also support passing error information regarding 
ephemeral data access over to RESTCONF equivalent of the and traceability client. 
</t>
</section> 
</section> 
</section>
<section title="Simple Thermostat Model">
<t> 
In this discussion of ephemeral configuration, 
this draft utilizes a simple thermostat model with the
YANG configuration found in figure 6. 
The desired-temp is local configuration node
that has an ephemeral 
The actual temperature is a derived state 
node that records the actual temperature of 
the room. 
</t>
<t>
Figure 6 shows two I2RS clients.  
I2RS client 1 has one connection to write the 
ephemeral copy of the desired temperature at 
priority 1. I2RS client 2 writes 
to the intended configuration with priority 10.  
I2RS client 1 has a second connetion to read 
the actual temperature, and I2RS client 2
also has a second connection to read the actual 
temperature.  
</t>
<t>The NETCONF example shows a simple
write of the ephemeral state value 
over the local configuration 
</t>
<t>
<figure>
<artwork>
 ...........     ...................    ...........
 :Candidate :---:running config    :--: start-up  :
 :          :   :desired-temp (cfg):  :           :
 ...........     ..................    ...........
                  |  
                  |                        ==========
                  |                        |  I2RS  |
                  |                      +-|Client 1|
                  |                      | |=========
         .........|..................... |   
Intended . '''''''|''''''''''''''''''' . |  =========
 Config  . 'local config|ephemeral   '&lt;--| |I2RS    |
         . 'desired-temp|desired-temp'&lt;----|Client 2|  
         . ''''''''''''|'''''''''''''' .    ==========
         ..............|................
                       |     read-write data 
    -------------------|----------------------------------------
	                   |     read only data 
                       |      
                 ======|======     ---------------        
                 | Actual    |-----|I2RS client 1|
 Config true     | Config    |	   ---------------
                 |  desired- |      |				 
                 |  temp     |==============
                 =============	    |     ||
   ******************************** |     ||
 config false    | derived   |------+     ||
                 | state     |       ===============
                 |  actual-  |=======|I2RS Client 2 |
                 |  temp     |       ===============
                 -------------
 
 Policy Knob 1:Ephemeral overwrites local config (TRUE)
 Policy Knob 2:Updated local config overwrite ephemeral (FALSE)
 
Figure 6 - Two I2RS clients 
</artwork>
</figure>
</t>
<section title="YANG data model">
<t> 
<figure>
<artwork>
module thermostat {
  ..
  leaf desired-temp {
     type int32;
	 config true;
	 ephemeral true;
	 units "degrees Celsius";
	 description "The desired temperature";
	 }
  .... 
  leaf actual-temp {
     type int32;
	 config false;
	 units "degrees Celsius";
	 description "The measured 
	 temperature is derived state.
	 }
  }
Figure 6 - Simple thermostat YANG Model 
</artwork>
</figure>
</t>
<t>The changes in each step are shown in the 
figure 7. In step 1, the running configuration 
desired-temp is change to 68 degress. 
In step 2, the intended configuration 
value for desired-temp is updated, and asynchronously
the applied configuration is updated in step 4. 
The actual temperature begins to rise to meet the 
desired temperature, and reaches it in step 4. 
In step 5, I2RS client 1 update the intended 
configuration with a desired-temp=70.  
In step 6 this value is updated to the applied 
configuration, and the actual temperature begins 
to rise (actual-temp = 69). In step 7, 
the actual temperature has reached 70 degrees.  
In step 8, I2RS Client 1 removes the ephemeral 
state from the intended configuration 
and the local configuration value is reasserted. 
In step 9, the intended desired-temp is 
synchronously moved to applied configuration 
and the actual temperature drops. 
</t>
<t>
<figure> 
<artwork>

Step Running  Intended Config Applied Config  Derived
                                              state 
======================================================											  
 1  desired-                                  actual- 
     temp=68                                  temp=65
------------------------------------------------------	 
 2   desired-  from running                   actual-
     temp=68   desired-temp                   temp=65
               temp = 68 
------------------------------------------------------
3    Desired    Desired        Desired       Actual-
     temp=68    temp=68        temp=68       temp=67
-------------------------------------------------------
4    Desired    Desired        Desired        Actual-
     temp=68    temp=68        temp=68        temp=68
------------------------------------------------------
                from I2RS
                client 1 
5    Desired    Desired        Desired        Actual-
     temp=68    temp=70        temp=68        temp=68
------------------------------------------------------
6    Desired    Desired        Desired        Actual-
     temp=68    temp=70        temp=70       temp=69
------------------------------------------------------
7    Desired    Desired        Desired        Actual-
     temp=68    temp=70        temp=70       temp=70			  
------------------------------------------------------
                I2RS client 1
                removes state					
8    Desired    Desired        Desired        Actual-
     temp=68    temp=68        temp=70       temp=70			  
-----------------------------------------------------	  	  					
9    Desired    Desired        Desired        Actual-
     temp=68    temp=68        temp=68        temp=68	 
====================================================== 

Figure 7
</artwork>
</figure>
</t>
<t>
I2RS Client 1 handle the normal lowering 
and raising of the temperature during different
time periods in the day. I2RS Client 2 has the 
ability for individuals to request the room warms 
up rapidly to a maximum of 72 degrees.  Figure 8
shows a simple example of the two clients interaction.
Steps 1-6 are the same as in figure 7.  In step 7, 
I2RS Client 2 sets the desired-temp in the 
intended configuration to 72.  In step 8, 
this intended configuration is passed to the 
applied configuration and the actual temperature 
reaches 72.  
</t>
<t>In step 9, I2RS client 2 removes
its state.   The I2RS Client 1 is notified of 
the removal, and the I2RS Client 1 re-write 
the desired value of 70 degrees (desired-temp=70), 
and this is passed to the applied state. 
The actual temperature drops to 70 degress 
(actual-temp=70). In step 10, I2RS Client 1
removes its ephemeral state and desired-temp 
reverts to the local configuration value 
(desired=temp=68).  This value is installed
in applied temperature and the actual temperature 
goes to 68 (actual-temp=68.)
</t>
<t>
<figure> 
<artwork>

Step Running  Intended Config Applied Config  Derived
                                              state 
======================================================											  
 1  desired-                                  actual- 
     temp=68                                  temp=65
------------------------------------------------------	 
 2   Desired   from running                   actual-
     temp=68   desired-temp                   temp=65
               temp = 68 
------------------------------------------------------
3    Desired    Desired        Desired       Actual-
     temp=68    temp=68        temp=68       temp=67
-------------------------------------------------------
4    Desired    Desired        Desired        Actual-
     temp=68    temp=68        temp=68        temp=68
------------------------------------------------------
                from I2rs
				client 1 
5    Desired    Desired        Desired        Actual-
     temp=68    temp=70        temp=68        temp=68
------------------------------------------------------
6    Desired    Desired        Desired        Actual-
     temp=68    temp=70        temp=70       temp=69
------------------------------------------------------
                I2RS Client 2 
                sets 				
7    Desired    Desired        Desired        Actual-
     temp=68    temp=72        temp=70       temp=70			  
------------------------------------------------------				
8    Desired    Desired        Desired        Actual-
     temp=68    temp=72        temp=72       temp=72			  
-----------------------------------------------------	  	  
                I2RS client 2 removes state
                reverts to I2RS client 1
				
9    Desired    Desired        Desired        Actual-
     temp=68    temp=70        temp=70        temp=70
-----------------------------------------------------	  	  
                I2RS client 1 removes state 	
				
10    Desired    Desired        Desired        Actual-
     temp=68    temp=68        temp=68        temp=68	 	 
====================================================== 

Figure 8
</artwork>
</figure>
</t>
</section>
<section title="NETCONF Changes" >
<t>
The NETCONF way of writing the ephemeral data to 
the intended configuratino would be
<figure>
<artwork>
&lt;rpc-message-id=101
  xmlns="urn:ietf:params:xml:ns:base:1.0"&gt; 
  &lt;edit-config&gt;
    &lt;target&gt;
     &lt;ephemeral &gt;
	    true 
	 &lt;/ephemeral &gt;
    &lt;/target&gt;
    &lt;config&gt;
      &lt;top xmlsns="http:://example.com/schema/1.0/thermostat/config&gt;
       &lt;desired-temp&gt; 70 &lt;/desired-temp&gt;
      &lt;/top&gt;
    &lt;/config&gt;
   &lt;/edit-config&gt;
&lt;/rpc&gt;

figure 9 NETCONF setting of desired-temp     
</artwork>
</figure>
</t>
</section> 
<section title="RESTCONF Initial Write">
<t>
Figure 10 shows the thermostat model has ephemeral variable desired-temp in the
running configuration and the ephemeral data store. The RESTCONF way of 
addressing is below: 
<figure>
<artwork>
 RESTCONF ephemeral datastore 

PUT /restconf/data/thermostat:desired-temp?context=ephemeral
{"desired-temp":19 }

Figure 8 - RESTCONF setting of ephemeral state 
</artwork>
</figure>
</t>
</section> 
</section>
<section title="Simple Route Add">
<t> 
In this discussion of ephemeral configuration, 
this draft utilizes the I2RS RIB data model
<xref target="I-D.ietf-i2rs-rib-data-model"></xref>
 where one client adds an route 
via a rpc to the I2RS ephemeral data model. 
</t>
<t>
Figure 9 shows two I2RS clients.  I2RS client 1
writes ephemeral routes with priority 1, 
and I2RS client 2 writes ephemeral routes with 
priority 5.  I2RS Client 1 and I2RS client can read 
the I2RS RIB With its status of installation.  
For ease of display the I2RS client 1 is show 
as two separate boxes, but these boxes are logically
one client.  Client 2 is also shown as two boxes, but
has only one box. 
<figure>
<artwork>
 ...........     ...................    ...........
 :Candidate :---:running config    :--: start-up  :
 :          :   :desired-temp (cfg):  :           :
 ...........     ..................    ...........
                  |  
                  |                      ==========
                  |                      |  I2RS  |
                  |                    +-|Client 1|
                  |                    | |=========
         .........|................... |   
Intended . '''''''|''''''''''''''''' . |  =========
 Config  . 'local config|ephemeral '&lt;--| |I2RS    |
         . '   route    | route    '&lt;----|Client 2|  
         . ''''''''''''|''''''''''' .    ==========
         ..............|.............
                               read-write data 
    ------------------------------------------------------------
                         |     read only data 
                         |      
                 =============     ---------------        
                 | Actual    |-----|I2RS client 1|
 Config true     | Config    |	   ---------------
                 |  route    |      |				 
                 |           |==============
                 =============	    |     ||
   ******************************** |     ||
 config false    | derived   |------+     ||
                 | state     |       ===============
                 |  route    |=======|I2RS Client 2 |
                 |  active   |       ===============
                 -------------

Policy Knob 1:Ephemeral overwrites local config (TRUE)
Policy Knob 2:Updated local config overwrite ephemeral (FALSE)
 
Figure 11 - Two I2RS clients 
</artwork>
</figure>
</t>
<t>
Figure 10 shows the addition of routes to 
a IPv4 RIB using the rpc-add route function 
in the I2RS RIB <xref target="I-D.ietf-i2rs-rib-data-model"></xref>.
Step 1 shows the route being configured
via netconf as a static route, and step 
2 shows how this static route is installed in the 
intended configuration.  Step 3 shows 
how this static route is installed in the applied
configuration and the derived status "installed"
is added to the routing devices route table. 
Step 4 shows how the I2RS Client 1 adds
the same route with a different next hop.  
In this example, there is only one nexthop per 
route so the ephemeral route replaces static
route configuration and is synchronously installed
in the applied configuration.  Due to the 
installation, the "installed" state is recorded in 
the kernel and associated with the I2RS RIB route. 
</t>
<t>In step 5, I2RS client 2 adds the same 
route to the intended configuration with a 
different next hop which replaces the route 
added by I2RS client 1 because I2RS Client 2 
has a higher priority that client 1.  
</t>
<t>In step 6, I2RS client 2 removes the route. 
and the I2RS client 1 is notified of the removal. 
The I2RS client 1 re-write the route with 
a nexthop of 192.11.1.2, and the applied configuration 
is updasted. 
</t>
<t>
In step 7,  the I2RS Client 1 removes route and 
the local configuration is restored in the intended 
configuration. The intended configuration sent to 
applied configuration as part of the restoration. 
</t>
<t>
<figure> 
<artwork>

Step Running  Intended Config Applied Config  Derived
                                              state 
======================================================											  
1    route=
     128.2/16
	 nexthop=
	 192.11.1.1
------------------------------------------------------	 
2    route=      route=
     128.2/16    128.2/16
     nexthop=    nexthop=
     192.11.1.1  192.11.1.1 
------------------------------------------------------
3    route=      route=        route=          route-
     128.2/16    128.2/16      128.2/16        128.2/16
     nexthop=    nexthop=      nexthop=        nexthop= 
     192.11.1.1  192.11.1.1    192.11.1.1      192.11.1.1
                                               status-installed
-------------------------------------------------------
                 I2RS 
				 client 1
				 rpc route-add 
4    route=      route=        route=          route-
     128.2/16    128.2/16      128.2/16        128.2/16
     nexthop=    nexthop=      nexthop=        nexthop= 
     192.11.1.1  192.11.1.2    192.11.1.2     192.11.1.2
	                                           status-installed
---------------------------------------------------------------
                from I2RS client 2
				
5    route=      route=        route=          route-
     128.2/16    128.2/16      128.2/16        128.2/16
     nexthop=    nexthop=      nexthop=        nexthop= 
     192.11.1.1  192.11.1.3    192.11.1.3     192.11.1.3
	                                           status-installed
---------------------------------------------------------------
                 I2RS Client2 removes route 
                 and I2RS agent notifies 
                 I2RS Client of change. 
                 I2RS client 1 re-writes route. 
				 
6    route=      route=        route=          route-
     128.2/16    128.2/16      128.2/16        128.2/16
     nexthop=    nexthop=      nexthop=        nexthop= 
     192.11.1.1  192.11.1.2    192.11.1.2     192.11.1.2
	                                           status-installed
---------------------------------------------------------------
                 I2RS client 1
                 removes route
                 local configuration is restored 				 
				 
7    route=      route=        route=          route-
     128.2/16    128.2/16      128.2/16        128.2/16
	 nexthop=    nexthop=      nexthop=        nexthop= 
	 192.11.1.1  192.11.1.1    192.11.1.1      192.11.1.1
	                                           status-installed
================================================================

Figure 12
</artwork>
</figure>
</t>
<section title="Portions of I2RS YANG data model">
<t> 
<figure>
<artwork>
module I2rs-RIB {
  ..
module i2rs-rib { 
     container routing-instance {
      …  
       list rib-list {
        … 
           list route-list {
               key “route-index”;
               uses route; 
          }
     }

  .... 
   grouping route  {
        description 
          “The common attribute used for all routes;”       
         uses routeg-prefix; 
          container nexthop {
                   uses nexthop; 
               }  
           container route-statistics {
               leaf route-state {
                  type route-state-def; 
                  config false;    /* operational state */
                }
              leaf route-installed state {
                  type route-installed-state def;
                  config false; 
                 }
              leaf route-reason {
                type route-reason-def;
                 config false;
               }
           }
       container router-attributes {
            uses router-attributes; 
         }
      container route-vendor-attributes
           uses route-vendor attributes;
     }
  }
Figure 13 - Simplified I2RS Route Model 
</artwork>
</figure>
</t>
</section>
<section title="NETCONF Changes" >
<t>
The NETCONF way of writing the ephemeral I2RS data would be: 
<figure>
<artwork>
 (TBD)  
 
 Figure 14 
</artwork>
</figure>
</t>
</section> 
<section title="RESTCONF Changes">
<t>
Figure 8 shows the thermostat model has ephemeral variable desired-temp in the
running configuration and the ephemeral data store. The RESTCONF way of 
addressing is below: 
<figure>
<artwork>
 RESTCONF ephemeral datastore 

(TBD) 

Figure 15 - RESTCONF Route change 
</artwork>
</figure>
</t>
</section> 
</section>
<section title=" Previously Considered Ideas">
 <section title="A Separate Ephemeral Data store">
 <t>
 The primary advantage of a fully separate data store is that the
   semantics of its contents are always clearly ephemeral.  It also
   provides strong segregation of I2RS configuration and operational
   state from the rest of the system within the network element.
 </t>
 <t>
    The most obvious disadvantage of such a fully separate data store is
   that interaction with the network element's operational or
   configuration state becomes significantly more difficult.  As an
   example, a BGP I2RS use case would be the dynamic instantiation of a
   BGP peer.  While it is readily possible to re-use any defined
   groupings from an IETF-standardized BGP module in such an I2RS
   ephemeral data store's modules, one cannot currently reference state
   from one data store to another
 </t>
 <t>
    For example, XPath queries are done in the context document of the
   data store in question and thus it is impossible for an I2RS model to
   fulfil a "must" or "when" requirement in the BGP module in the
   standard data stores.  To implement such a mechanism would require
   appropriate semantics for XPath.
 </t>
 </section>
 <section title=" Panes of Glass/Overlay">
 <t>   I2RS ephemeral configuration state is generally expected to be
   disjoint from persistent configuration.  In some cases, extending
   persistent configuration with ephemeral attributes is expected to be
   useful.  A case that is considered potentially useful but problematic
   was explored was the ability to "overlay" persistent configuration
   with ephemeral configuration.
 </t>
 <t>   In this overlay scenario, persistent configuration that was not
   shadowed by ephemeral configuration could be "read through".
 </t>
 <t>   There were two perceived disadvantages to this mechanism:
 <list>
 <t>The general complexity with managing the overlay mechanism
       itself.</t>
 <t>Consistency issues with validation should the ephemeral state be
       lost, perhaps on reboot.  In such a case, the previously shadowed
       persistent state may no longer validate.
</t>
 </list>
 </t>
 </section>
 </section>
<section anchor="IANA" title="IANA Considerations">
 <t>This is a protocol strawman - nothing is going to IANA.  </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>.
 The security environment the I2RS protocol is covered in
 <xref target="I-D.ietf-i2rs-security-environment-reqs"></xref>.
 Any person implementing or deploying the I2RS protocol
 should consider both security requirements.  
</t>
</section>
<section anchor="Acknowledgements" title="Acknowledgements">
	<t>
	    This document is an attempt to distill lengthy conversations on
	    the I2RS proto design team from August 
	</t>
	<t> Here's the list of the I2RS protocol design team members
	    <list style="symbols">
		<t>Alia Atlas</t>
		<t>Ignas Bagdonas</t>
		<t>Andy Bierman</t>
		<t>Alex Clemm</t>
		<t>Eric Voit</t>
		<t>Kent Watsen </t>
		<t>Jeff Haas</t>
		<t>Keyur Patel</t>
		<t>Hariharan Ananthakrishnan</t>
		<t>Dean Bogdanavich</t>
		<t>Anu Nair</t>
		<t>Juergen Schoenwaelder</t>
		<t>Kent Watsen</t>
	    </list>
	</t>
</section>
<section title="Major Contributors"> 
<t>
<list style="symbols">
<t>Andy Bierman (Yuman Networks) - andy@yumaworks.com </t>
<t>Kent Watson (Juniper) (kwatsent@juniper.net)</t>
<t>Russ White (Linkedin) </t>
</list>
</t>
</section> 
<section anchor="i2rs-reqs" title="List of I2RS Requirements">
<t>The I2RS protocol requirements 
which include requirements for:
<list style="symbols">
<t>ephemeral state (<xref target="I-D.ietf-i2rs-ephemeral-state"></xref>),
</t>
<t>protocol security (<xref target="I-D.ietf-i2rs-protocol-security-requirements"></xref>), 
</t>
<t>traceability (<xref target="I-D.ietf-i2rs-traceability"></xref>
</t>
<t>publication and subscription service (<xref target="I-D.ietf-i2rs-pub-sub-requirements"></xref>,
</t>
</list>
</t>
<t>The I2RS environment requirments are find on 
<xref target="I-D.ietf-i2rs-security-environment-reqs"></xref>.
</t>
</section> 
</middle>
 <back>
    <references title="Normative References:">
	 &RFC2119;
	 &RFC4107;
	 &RFC4960;
	 &RFC5339;
	 &RFC5424;
	 &RFC6020;
	 &RFC6241;
	 &RFC6242;
	 &RFC6244;
	 &RFC6536;
	 &RFC7158;
	 &RFC7589;
	 &I-D.draft-kwatsen-netmod-opstate;
	 &I-D.draft-schoenw-netmod-revised-datastores;
	 </references>
	 <references title="Informative References">
	 &I-D.ietf-i2rs-architecture;
 	 &I-D.ietf-i2rs-traceability;
	 &I-D.ietf-i2rs-ephemeral-state;
	 &I-D.ietf-i2rs-pub-sub-requirements;
	 &I-D.ietf-i2rs-protocol-security-requirements;
	 &I-D.ietf-i2rs-security-environment-reqs;	
     &I-D.ietf-i2rs-rib-info-model;
	 &I-D.ietf-i2rs-rib-data-model;
	 &I-D.ietf-netconf-yang-patch;
	 &I-D.ietf-netconf-yang-push;
     &I-D.ietf-netconf-restconf;
	 &I-D.ietf-netconf-yang-library;
	 &I-D.ietf-netconf-server-model;
	 &I-D.ietf-netconf-call-home;
	 &I-D.ietf-netconf-zerotouch;
	 &I-D.ietf-netmod-rfc6020bis;
 	 &I-D.ietf-netmod-opstate-reqs;
 	 &I-D.ietf-netmod-yang-metadata;
	 &I-D.ietf-netmod-syslog-model;
  	 &I-D.ietf-netmod-schema-mount;
	 &I-D.draft-wilton-netmod-refined-datastores;
	 </references>
  </back>
</rfc>