I2RS working group S. Hares
Internet-Draft Huawei
Intended status: Informational A. Dass
Expires: January 9, 2017 Ericsson
July 8, 2016

I2RS protocol strawman
draft-hares-i2rs-protocol-strawman-03.txt

Abstract

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.

This document is a living document providing insights gained in design, implementation and debugging of the I2RS protocol.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on January 9, 2017.

Copyright Notice

Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

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.

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 [RFC6241] and RESTCONF [I-D.ietf-netconf-restconf].

This strawman proposal supports I2RS requirements for ephemeral data store, management data flows, and protocol security. It proposes extensions to the following:

This protocol strawman utilizes the following existing proposed features for NETCONF and RESTCONF

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.

2. Definitions Related to Ephemeral Configuration

This section reviews definitions from I2RS architecture [I-D.ietf-i2rs-architecture] and NETCONF operational state [I-D.ietf-netmod-opstate-reqs] before using these to construct a definition of the ephemeral data store.

2.1. Requirements language

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 RFC 2119 [RFC2119].

2.2. I2RS Definitions

The I2RS architecture [I-D.ietf-i2rs-architecture] defines the following terms:

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.
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.
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:

Three possible setting for the above knobs are:

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.
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.
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.

2.3. Operational and Ephemeral State definitions

The [I-D.ietf-netmod-opstate-reqs] defines the following to augment [RFC6244] to define how configuration state and operational state are different.

Applied Configuration:
This data represents the configuration state that the server is actually in.
Derived State:
This data represents information which is generated as part of the server's own interactions.
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.
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.
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.
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."

In each of these definitions, the "server" is the routing system.

The [I-D.ietf-netmod-opstate-reqs] defines two actions that update the intended and the applied configuration:

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.
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.

3. DataStore Model Melee

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.

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:

  1. Opstate model from I-D.draft-kwatsen-netmod-opstate (figure 1 below),
  2. Persistent/Non-Persistent Config from I-D.draft-wilton-netmod-refined-datastores (figure 2 below) ,
  3. Revised Data Store (Ephemeral is OPSTATE ) from I-D.draft-schoenw-netmod-revised-datastores (figure 3)
  4. I2RS model (figure 4 below in section 2.4.1).

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.

3.1. Opstate model

  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 

Model from: I-D.draft-kwatsen-netmod-opstate

   
                   |  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 				

I2RS Proposed Ephemeral state addition to Model

Pro:

  1. Ephemeral configuration utilize the constraint checks in yang 1.1 [I-D.ietf-netmod-rfc6020bis] 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).
  2. Operational state can occur in ephemeral only data models
  3. Ephemeral augmentations seem a logical extension.
  4. Event/notification for I2RS can work with config and ephemeral.
  5. Can query ephemeral + local configurations as overlay or separately.

Con:

  1. Ephemeral configuration cannot elect to use only the Yang 1.1 syntactical checks (section 8.3.1 of [I-D.ietf-netmod-rfc6020bis]).

3.2. Persistent/Non-Persistent Config


      +-------------+                  +-----------+
      | <candidate> |                  | <startup> |
      |  (ct, rw)   |<---+        +--->| (ct, rw)  |
      +-------------+    |        |    +-----------+
             |           |        |          |
             |      .....|........|........  |
             |      . +-----------------+ .  |
             +------->|<persistent cfg> |<---+
                    . | (ct, rw)        | .
      Intended      . +-----------------+ .
       Config   ==> .         v           .
      Datastore     . +-----------------+ .
      (abstract)    . |<ephemeral cfg>  |<--- Can override persistent
                    . | (ct, rw)        | .   cfg. Optional
                    . +-----------------+ .
                    ..........|............
                              |
                    +---------v-----------+
                    | ................... |
                    | . <applied cfg>   .<--- Actual cfg in effect
     Operational    | . (ct, ro)        . |
        State   ==> | ................... |
      Datastore     |         +           |
                    |    system cfg      <--- System created config
                    |         +           |
                    |    system state    <--- All config false nodes
                    +---------------------+

Persistent/Non-Persistent Config from I-D.draft-wilton-netmod-refined-datastores

Pro:

  1. Ephemeral configuration utilize the constraint checks in yang 1.1 [I-D.ietf-netmod-rfc6020bis] 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).
  2. Operational state can occur in ephemeral only data models
  3. Ephemeral augmentations align with the I2RS ephemeral requirements [I-D.ietf-i2rs-ephemeral-state]
  4. Event/notification for I2RS can work with config and ephemeral.
  5. Can query ephemeral + local configurations as overlay or separately.

Con:

  1. Ephemeral configuration cannot elect to use only the Yang 1.1 syntactical checks (section 8.3.1 of [I-D.ietf-netmod-rfc6020bis]).

3.3. Revised Data Store (Ephemeral is OPSTATE

Revised Data Store (Ephemeral is OPSTATE ) from I-D.draft-schoenw-netmod-revised-datastores

  +-------------+                  +-----------+
  | <candidate> |                  | <startup> |
  |  (ct, rw)   |<---+        +--->| (ct, rw)  |
  +-------------+    |        |    +-----------+
         |           |        |           |
         |         +------------+         |
         +--------<| <running>  |>--------+
                   | (ct, rw)   |
                   +------------+
                         |
                        (A)       // e.g., removal of 'inactive' nodes
                         v
                   +------------+
                   | <intended> | // subject to validation
                   | (ct, ro)   |
                   +------------+
                         |
                        (B)       // e.g., missing resources or delays
                         v
                   +------------+
                   | <applied>  |
                   | (ct, ro)   |
                   +------------+
                         |
                        (C)       // e.g., autodiscovery, control-plane
                         |        // protocols, control-plane datastores
                         v
         +--------------------------------+
         | <operational-state>            |
         | (ct + cf, ro)                  |
         +--------------------------------+

Pro:

  1. Ephemeral configuration can tailor its constraint checking to the data model.
  2. Ephemeral data is like data sent to/from any routing process.

Con:

  1. Ephemeral configuration state must create its own constraint checking
  2. Ephemeral state has no easy way to query the overlay of ephemeral state and local configuration since there is no augmentation of local configuration.
  3. Event/notification for I2RS can work with config and ephemeral.
  4. Ephemeral configuration

3.4. Another Model for Ephemeral

This model came out of dicussions with the authors of all the drafts:

                  +---------------+
				  | Ephemeral     |
				  | Configuration |
                  +---------------+
				        ^  |
                        |  |
  +-------------+       |  |       +-----------+
  | <candidate> |       |  |       | <startup> |
  |  (ct, rw)   |<---+  |  |  +--->| (ct, rw)  |
  +-------------+    |  |  |  |    +-----------+
         |           |  |  V  |           |
         |         +------------+         |
         +-------->| <running>  |<--------+
                   | (ct, rw)   |
                   +------------+
                         |
                        (A)       // e.g., removal of 'inactive' nodes
                         v
                   +------------+
                   | <intended> | // subject to validation
                   | (ct, ro)   |
                   +------------+
                         |
                        (B)       // e.g., missing resources or delays
                         v
                   +------------+
                   | <applied>  |
                   | (ct, ro)   |
                   +------------+
                         |
                        (C)       // e.g., autodiscovery, control-plane
                         |        // protocols, control-plane datastores
                         v
 +---------+      +----------------------------+  +--------------+
 |injected |-->| <operational-state>  |  |  forwarding  | 
 |ephemeral|      | process (ct + cf,      |------|              |
 |         |      |   ro + injected  )     |      |              |
 +---------+      +------------------------+      +--------------+

4. Summary of Protocol Changes

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.

4.1. Ephemeral Data

This section provides an overview of the ephemeral data store, I2RS agent caching support, and ephemeral requirements (from [I-D.ietf-i2rs-ephemeral-state]).

4.1.1. Overview of Ephemeral Data Store

This section augments the [I-D.ietf-netmod-opstate-reqs] 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.

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.

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.

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).

The ephemeral data store has the following general qualities:

  1. Ephemeral state is not unique to I2RS work.
  2. The ephemeral datastore is never locked.
  3. The ephemeral portion of the intended configuration, applied state, and derived state does not persist over a reboot,
  4. an ephemeral node cannot roll-back to its previous value,
  5. 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.

  6. 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 [I-D.ietf-netconf-yang-library].

4.1.2. I2RS Agent Caching of Ephemeral Data

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.

4.2. Protocol Security

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.

4.2.1. Summary of Protocol Security Changes

The I2RS protocol requires the following new security features:

This section describes these new features.

4.2.1.1. Multiple secure transports

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.

4.2.1.2. Mutual Identification

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.

4.2.1.3. I2RS Client has Identifier + Priority + Secondary Identifier

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.

4.2.1.4. I2RS Role Based Access

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).

4.2.1.5. Insecure Transport

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.

4.3. Data Flow

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.

4.3.1. Data Flow for Ephemeral Configuration

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 [I-D.ietf-i2rs-architecture]. lients can send large amount of ephemeral configuration data to the I2RS Agent. The writes may be done via NETCONF (<edit-config> or an rpc function), or via RESTCONF (PUT, PATCH, POST). Reads can be done via NETCONF <get-config> or RESTCONF GET or query.

The I2RS RIB Data Model [I-D.ietf-i2rs-rib-data-model] 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 <edit-config> could update these 1000 routes with a write, or the RESTCONF POST, PUT or PATCH should be able to add the 1000 routes.

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.

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",

4.3.2. Write Error handling

This section reviews I2RS normal error handling and error handling for rpc with no validation checks.

4.3.2.1. Normal validation checks

An I2RS agent validates an I2RS client's information by examining the following:

4.3.2.1.1. Multiple I2RS Clients Write Same Node

Multiple I2RS clients writing to the same variable is considered an "error condition" in the I2RS architecture [I-D.ietf-i2rs-architecture], 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.

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).

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:

4.3.2.1.2. Multiple Action Messages

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.

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.

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."

I2RS suggests the following are some of the potential error handling techniques for multiple message sent to the I2RS client:

  1. Perform all or none: All operations succeed or none of them will be applied. This useful when there are mutual dependencies.
  2. 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.
  3. 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.

The initial version of I2SR protocol restricts I2RS protocol implementations to an "all or nothing" (aka roll-back on error).

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.

Discussion of Current NETCONF/RESTCONF versus

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.

I2RS processing is dependent on the I2RS model. The I2RS model must consider the dependencies within multiple operations work within a model.

4.3.2.1.2.1. Grouping and Error handling

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.

4.3.2.1.2.2. Why All-or-Nothing

NETCONF does not support a mandated sequencing of edit functions or write functions. Without this mandated sequences, NETCONF cannot support partial edits.

RESTCONF has a complete set of operations per message. The RESTCONF patch [I-D.ietf-netconf-yang-patch] could support partial edit functions per messages.

Since version 1 of I2RS protocol desires to support NETCONF and RESTCONF equally, the partial

4.3.2.1.2.3. Future Error Handling of Multiple Write Messages

The [I-D.ietf-i2rs-architecture] specifies three types of error handling for a partial write operation of orthogonal data:

Grouped data must only use "all-or-nothing."

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.

4.3.2.2. Reduced Validation (Experimental)

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.

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

4.3.2.2.1. Reduced Validation RPC (Experimental)

The "no validation" feature requires:

4.3.3. Data Flows From the I2RS Agent to I2RS Client

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. [I-D.ietf-i2rs-pub-sub-requirements] 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 [I-D.ietf-netconf-yang-push].

Large data flows can also be required to trace the actions of a routing system. These requirements are listed in the [I-D.ietf-i2rs-traceability]. 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 [RFC5424], the pub-sub mechanism or a large data push. This large data push can be a pull in a large write.

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).

4.3.4. OAM Constraints

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).

4.3.5. IPFIX for traffic monitoring

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.

4.4. Yang Changes

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 [I-D.ietf-netconf-yang-library].

The Proposed changes to Yang for I2RS protocol version 1 are:

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.

4.5. Transport Protocol Changes

4.5.1. Secure Protocols

NETCONF's XML-based protocol ([RFC6241]) can operate over the following secure and encrypted transport layer protocols:

RESTCONF's XML-based or JSON [RFC7158] data encodings of Yang functions are passed over HTTOS with (GET, POST, PUT, PATCH, DELETE, OPTIONS, and HEAD).

4.5.2. Insecure Protocol

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.

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.  
   }

[RFC6536] with extensions supporting ephemeral, non-secure transport, and rpcs with no validation checks might look like:

4.6. NETCONF protocol extensions for the ephemeral datastore

capability-name: ephemeral-datastore

4.6.1. Overview

This capability defines the NETCONF protocol extensions for the ephemeral state. The ephemeral state has the following features:

4.6.2. Dependencies

The following are the dependencies for ephemeral support:

4.6.3. Capability identifier

The ephemeral-datastore capability is identified by the following capability string: (capability uri)

4.6.4. New Operations

None

4.6.5. Modification to existing operations

The capability for :ephemeral-datastore modifies the target for existing operations.

4.6.5.1. <get-config>

The :ephemeral-datastore capability modifies the <edit-config> to accept the <ephemeral> as a target for source, and allows the filters focused on a particular module, submodule, or node.

The positive and negative responses remain the same.

Example - retrieve users subtree from 
          ephemeral database

 <rpc message-id="101"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
   <get-config>
      <source>
        <emphemeral-datastore/>
      </source>
      <filter type="subtree">
        <top xmlns="http://example.com/schema/1.0/thermostat/config">
        <desired-temp>
         </top>
      </filter>
   </get-config>
 </rpc>

4.6.5.2. <edit-config>

The :ephemeral-datastore capability modifies the <edit-config> to accept the <ephemeral> 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:

The existing parameters are modified as follows:

4.6.5.3. <copy-config>

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:

4.6.5.4. <delete-config>

The delete will delete all ephemeral nodes out of a datastore. The target parameter must be changed to allow :ephemeral-datastore. and filters.

4.6.5.5. <lock> and <unlock>

Lock and unlock are not supported with a target of :ephemeral-datastore.

4.6.5.6. <get>

The <get> is altered to allow a target of :ephemeral-datastore and with the filters.

4.6.5.7. <close-session> and <kill-session>

The close session is modified to take a target of :ephemeral-datastore, Since no locks are set, none should be released.

The kill session is modified to take a target of "ephemeral-datastore. Since no locks are set, none should be released.

4.6.6. Interactions with Capabilities

[RFC6241] 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.

4.6.6.1. writable-running and candidate datastore

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.

4.6.6.2. confirmed commmit

Confirmed commit capability is not supported for the ephemeral datastore.

4.6.6.3. rollback-on-error

The rollback-on-error when included with ephemeral state allows the error handling to be "all-or-nothing" (roll-back-on-error).

4.6.6.4. validate

The validation function operates normally with one addition with one addition for any data handled by an rpc with "ephemeral-validation nocheck".

  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."; 
  };

The rpc specifying ephemeral-validation nocheck MUST specify within the ephemeral data written by the rpc function the following grouping:

(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.

4.6.6.5. Distinct Startup Capability

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.

4.6.6.6. URL capability and XPATH capability

The URL capabilities specify a <url> in the <source> and <target>. The initial suggestion to allow both of these features to work with ephemeral datastore.

4.7. RESTCONF protocol extensions for the ephemeral datastore

capability-name: ephemeral-datastore

4.7.1. Overview

This capability defines the RESTCONF protocol extensions for the ephemeral state. The ephemeral state has the features described in the previous section on NETCONF.

4.7.2. Dependencies

The ephemeral capabilities have the following dependencies:

4.7.3. Capability identifier

The ephemeral-datastore capability is identified by the following capability string: (capability uri)

4.7.4. New Operations

none

4.7.5. modification to data resources

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.

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.

4.7.6. Modification to existing operations

The current operations in RESTCONF are: OPTIONS, HEAD, GET, POST, PUT, PATCH, and DELETE. This section describes the modification to these exiting operations.

4.7.6.1. OPTIONS changes

The options methods should be augmented by the [I-D.ietf-netconf-yang-library] information that will provide an indication of what ephemeral state exists in a data modules, or a data modules sub-modules or nodes.

4.7.6.2. HEAD changes

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.

4.7.6.3. GET changes

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.

4.7.6.4. POST changes

POST must simply be able to create resources in ephemeral datastores ("context=ephemeral") and invoke operations defined in ephemeral data models.

4.7.6.5. PUT changes

PUT must be able to reference an ephemeral module, sub-module, and nodes ("?context=ephemeral").

4.7.6.6. PATCH changes

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.

4.7.6.7. DELETE changes

The phrase "?context=ephemeral" following an element will specify the ephemeral data store when deleting an entry.

4.7.6.8. Query Parameters

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.

4.7.7. Interactions with Notifications

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 [I-D.ietf-netconf-yang-push].

4.7.8. Interactions with Error Reporting

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.

5. Simple Thermostat Model

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.

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.

The NETCONF example shows a simple write of the ephemeral state value over the local configuration

 ...........     ...................    ...........
 :Candidate :---:running config    :--: start-up  :
 :          :   :desired-temp (cfg):  :           :
 ...........     ..................    ...........
                  |  
                  |                        ==========
                  |                        |  I2RS  |
                  |                      +-|Client 1|
                  |                      | |=========
         .........|..................... |   
Intended . '''''''|''''''''''''''''''' . |  =========
 Config  . 'local config|ephemeral   '<--| |I2RS    |
         . 'desired-temp|desired-temp'<----|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 

5.1. YANG data model

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 

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.


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

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.

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.)


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

5.2. NETCONF Changes

<rpc-message-id=101
  xmlns="urn:ietf:params:xml:ns:base:1.0"> 
  <edit-config>
    <target>
     <ephemeral >
	    true 
	 </ephemeral >
    </target>
    <config>
      <top xmlsns="http:://example.com/schema/1.0/thermostat/config>
       <desired-temp> 70 </desired-temp>
      </top>
    </config>
   </edit-config>
</rpc>

figure 9 NETCONF setting of desired-temp     

The NETCONF way of writing the ephemeral data to the intended configuratino would be

5.3. RESTCONF Initial Write

 RESTCONF ephemeral datastore 

PUT /restconf/data/thermostat:desired-temp?context=ephemeral
{"desired-temp":19 }

Figure 8 - RESTCONF setting of ephemeral state 

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:

6. Simple Route Add

In this discussion of ephemeral configuration, this draft utilizes the I2RS RIB data model [I-D.ietf-i2rs-rib-data-model] where one client adds an route via a rpc to the I2RS ephemeral data model.

 ...........     ...................    ...........
 :Candidate :---:running config    :--: start-up  :
 :          :   :desired-temp (cfg):  :           :
 ...........     ..................    ...........
                  |  
                  |                      ==========
                  |                      |  I2RS  |
                  |                    +-|Client 1|
                  |                    | |=========
         .........|................... |   
Intended . '''''''|''''''''''''''''' . |  =========
 Config  . 'local config|ephemeral '<--| |I2RS    |
         . '   route    | route    '<----|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 

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 10 shows the addition of routes to a IPv4 RIB using the rpc-add route function in the I2RS RIB [I-D.ietf-i2rs-rib-data-model]. 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.

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.

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.

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.


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

6.1. Portions of I2RS YANG data model

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 

6.2. NETCONF Changes

 (TBD)  
 
 Figure 14 

The NETCONF way of writing the ephemeral I2RS data would be:

6.3. RESTCONF Changes

 RESTCONF ephemeral datastore 

(TBD) 

Figure 15 - RESTCONF Route change 

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:

7. Previously Considered Ideas

7.1. A Separate Ephemeral Data store

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.

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

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.

7.2. Panes of Glass/Overlay

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.

In this overlay scenario, persistent configuration that was not shadowed by ephemeral configuration could be "read through".

There were two perceived disadvantages to this mechanism:

8. IANA Considerations

This is a protocol strawman - nothing is going to IANA.

9. Security Considerations

The security requirements for the I2RS protocol are covered in [I-D.ietf-i2rs-protocol-security-requirements]. The security environment the I2RS protocol is covered in [I-D.ietf-i2rs-security-environment-reqs]. Any person implementing or deploying the I2RS protocol should consider both security requirements.

10. Acknowledgements

This document is an attempt to distill lengthy conversations on the I2RS proto design team from August

Here's the list of the I2RS protocol design team members

11. Major Contributors

12. List of I2RS Requirements

The I2RS protocol requirements which include requirements for:

The I2RS environment requirments are find on [I-D.ietf-i2rs-security-environment-reqs].

13. References

13.1. Normative References:

[I-D.kwatsen-netmod-opstate] Watsen, K., Bierman, A., Bjorklund, M. and J. Schoenwaelder, "Operational State Enhancements for YANG, NETCONF, and RESTCONF", Internet-Draft draft-kwatsen-netmod-opstate-02, February 2016.
[I-D.schoenw-netmod-revised-datastores] Schoenwaelder, J., "A Revised Conceptual Model for YANG Datastores", Internet-Draft draft-schoenw-netmod-revised-datastores-01, June 2016.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC4107] Bellovin, S. and R. Housley, "Guidelines for Cryptographic Key Management", BCP 107, RFC 4107, DOI 10.17487/RFC4107, June 2005.
[RFC4960] Stewart, R., "Stream Control Transmission Protocol", RFC 4960, DOI 10.17487/RFC4960, September 2007.
[RFC5339] Le Roux, JL. and D. Papadimitriou, "Evaluation of Existing GMPLS Protocols against Multi-Layer and Multi-Region Networks (MLN/MRN)", RFC 5339, DOI 10.17487/RFC5339, September 2008.
[RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, DOI 10.17487/RFC5424, March 2009.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010.
[RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J. and A. Bierman, "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011.
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011.
[RFC6244] Shafer, P., "An Architecture for Network Management Using NETCONF and YANG", RFC 6244, DOI 10.17487/RFC6244, June 2011.
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration Protocol (NETCONF) Access Control Model", RFC 6536, DOI 10.17487/RFC6536, March 2012.
[RFC7158] Bray, T., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 7158, DOI 10.17487/RFC7158, March 2014.
[RFC7589] Badra, M., Luchuk, A. and J. Schoenwaelder, "Using the NETCONF Protocol over Transport Layer Security (TLS) with Mutual X.509 Authentication", RFC 7589, DOI 10.17487/RFC7589, June 2015.

13.2. Informative References

[I-D.ietf-i2rs-architecture] Atlas, A., Halpern, J., Hares, S., Ward, D. and T. Nadeau, "An Architecture for the Interface to the Routing System", Internet-Draft draft-ietf-i2rs-architecture-15, April 2016.
[I-D.ietf-i2rs-ephemeral-state] Haas, J. and S. Hares, "I2RS Ephemeral State Requirements", Internet-Draft draft-ietf-i2rs-ephemeral-state-14, July 2016.
[I-D.ietf-i2rs-protocol-security-requirements] Hares, S., Migault, D. and J. Halpern, "I2RS Security Related Requirements", Internet-Draft draft-ietf-i2rs-protocol-security-requirements-06, May 2016.
[I-D.ietf-i2rs-pub-sub-requirements] Voit, E., Clemm, A. and A. Prieto, "Requirements for Subscription to YANG Datastores", Internet-Draft draft-ietf-i2rs-pub-sub-requirements-09, May 2016.
[I-D.ietf-i2rs-rib-data-model] Wang, L., Ananthakrishnan, H., Chen, M., amit.dass@ericsson.com, a., Kini, S. and N. Bahadur, "A YANG Data Model for Routing Information Base (RIB)", Internet-Draft draft-ietf-i2rs-rib-data-model-06, July 2016.
[I-D.ietf-i2rs-rib-info-model] Bahadur, N., Kini, S. and J. Medved, "Routing Information Base Info Model", Internet-Draft draft-ietf-i2rs-rib-info-model-08, October 2015.
[I-D.ietf-i2rs-security-environment-reqs] Migault, D., Halpern, J. and S. Hares, "I2RS Environment Security Requirements", Internet-Draft draft-ietf-i2rs-security-environment-reqs-01, April 2016.
[I-D.ietf-i2rs-traceability] Clarke, J., Salgueiro, G. and C. Pignataro, "Interface to the Routing System (I2RS) Traceability: Framework and Information Model", Internet-Draft draft-ietf-i2rs-traceability-11, May 2016.
[I-D.ietf-netconf-call-home] Watsen, K., "NETCONF Call Home and RESTCONF Call Home", Internet-Draft draft-ietf-netconf-call-home-17, December 2015.
[I-D.ietf-netconf-restconf] Bierman, A., Bjorklund, M. and K. Watsen, "RESTCONF Protocol", Internet-Draft draft-ietf-netconf-restconf-14, June 2016.
[I-D.ietf-netconf-server-model] Watsen, K. and J. Schoenwaelder, "NETCONF Server and RESTCONF Server Configuration Models", Internet-Draft draft-ietf-netconf-server-model-09, March 2016.
[I-D.ietf-netconf-yang-library] Bierman, A., Bjorklund, M. and K. Watsen, "YANG Module Library", Internet-Draft draft-ietf-netconf-yang-library-06, April 2016.
[I-D.ietf-netconf-yang-patch] Bierman, A., Bjorklund, M. and K. Watsen, "YANG Patch Media Type", Internet-Draft draft-ietf-netconf-yang-patch-10, July 2016.
[I-D.ietf-netconf-yang-push] Clemm, A., Prieto, A., Voit, E., Tripathy, A. and E. Nilsen-Nygaard, "Subscribing to YANG datastore push updates", Internet-Draft draft-ietf-netconf-yang-push-03, June 2016.
[I-D.ietf-netconf-zerotouch] Watsen, K. and M. Abrahamsson, "Zero Touch Provisioning for NETCONF or RESTCONF based Management", Internet-Draft draft-ietf-netconf-zerotouch-09, July 2016.
[I-D.ietf-netmod-opstate-reqs] Watsen, K. and T. Nadeau, "Terminology and Requirements for Enhanced Handling of Operational State", Internet-Draft draft-ietf-netmod-opstate-reqs-04, January 2016.
[I-D.ietf-netmod-rfc6020bis] Bjorklund, M., "The YANG 1.1 Data Modeling Language", Internet-Draft draft-ietf-netmod-rfc6020bis-14, June 2016.
[I-D.ietf-netmod-schema-mount] Bjorklund, M. and L. Lhotka, "YANG Schema Mount", Internet-Draft draft-ietf-netmod-schema-mount-02, July 2016.
[I-D.ietf-netmod-syslog-model] Wildes, C. and K. Koushik, "Syslog YANG Model", Internet-Draft draft-ietf-netmod-syslog-model-09, July 2016.
[I-D.ietf-netmod-yang-metadata] Lhotka, L., "Defining and Using Metadata with YANG", Internet-Draft draft-ietf-netmod-yang-metadata-07, March 2016.
[I-D.wilton-netmod-refined-datastores] Wilton, R., "Refined YANG datastores", Internet-Draft draft-wilton-netmod-refined-datastores-01, July 2016.

Authors' Addresses

Susan Hares Huawei Saline, US EMail: shares@ndzh.com
Amit Daas Ericsson EMail: amit.dass@ericsson.com