NETCONF Support for Event NotificationsVMWarealberto.gonzalezprieto@yahoo.comHuaweiludwig@clemm.orgCisco Systemsevoit@cisco.comCisco Systemseinarnn@cisco.comCisco Systemsambtripa@cisco.com
Operations & Management
NETCONFDraftThis document defines how to transport network subscriptions and event messages on top of the Network Configuration protocol (NETCONF). This includes the full set of RPCs, subscription state changes, and message payloads needing asynchronous delivery. The capabilities and operations defined in this document used in conjunction with are intended to obsolete . In addition, the capabilities within those two documents along with are intended to enable an extract of a YANG datastore on a remote device.This document defines mechanisms that provide an asynchronous message notification delivery service for the NETCONF protocol based on . This is an optional capability built on top of the base NETCONF definition. plus this transport specification document provides a superset of the capabilities previously defined in . Newly introduced capabilities include the ability to have multiple subscriptions on a single NETCONF session, the ability to terminate subscriptions without terminating the client session, and the ability to modify existing subscriptions.In addition, plus the capabilities of this document provide a mechanism for a NETCONF client to maintain a subset/extract of an actively changing YANG datastore.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.The following terms are defined in : client, server, operation, RPC.The following terms are defined in : event, event notification, stream, publisher, receiver, subscriber, subscription, configured subscription.Note that a publisher in corresponds to a server in . Similarly, a subscriber corresponds to a client. A receiver is also a client. In the remainder of this document, we will use the terminology in to simplify 's mental mappings to embedded NETCONF terminology.In this section, we describe and exemplify how is to be supported over NETCONF.In the context of an event stream exposes a continuous set of events available for subscription. A NETCONF client can retrieve the list of available event streams from a NETCONF server using the "get" operation. The reply contains the elements defined in the YANG model under the container "/streams", which includes the stream identities supported on the NETCONF server.The following example illustrates the retrieval of the list of available event streams using the <get> operation.The NETCONF server returns a list of event streams available. In this example, the list contains the NETCONF, SNMP, and SYSLOG streams.For , a similar get is needed to retrieve available datastore names.A NETCONF server implementation supporting must support the "NETCONF" notification event stream.A NETCONF server implementation supporting must support the "running" datastore.The dynamic subscription RFC and interactions operation is defined in . An example of interactions over NETCONF transport for one sample subscription is below:If the NETCONF server can satisfy the request, the server sends a positive <subscription-result> element, and the subscription-id of the accepted subscription.If the NETCONF server cannot satisfy the request, or client has no authorization to establish the subscription, the server will send a negative <subscription-result> element. For instance:If the client requests parameters the NETCONF server cannot serve, the negative <subscription-result> may include additional information. For instance, consider the following subscription from , which augments the establish-subscription with some additional parameters, including "period". If the client requests a which period the NETCONF server cannot serve, the back-and-forth exchange may be:This operation is defined in and enhanced in .The following demonstrates modifying a subscription. Consider a subscription from , which augments the establish-subscription with some additional parameters, including "period". A subscription may be established as follows.The subscription may be modified with and RPC request such as:If the NETCONF server can satisfy the request, the server sends a positive <subscription-result> element. This response is like that to an establish-subscription request, but without the subscription identifier.If the NETCONF server cannot satisfy the request, the server sends a negative <subscription-result> element. Its contents and semantics are identical to those in an establish-subscription request. For instance:This operation is defined in for events, and enhanced in for datastores.The following demonstrates deleting a subscription.If the NETCONF server can satisfy the request, the server sends an OK element. For example:If the NETCONF server cannot satisfy the request, the server sends an error-rpc element indicating the modification didn't work. For example:Configured subscriptions are established, modified, and deleted using configuration operations against the top-level subtree of or via normal NETCONF operations. In this section, we present examples of how to manage the configuration subscriptions using a NETCONF client. Key differences from dunamic subscriptions over NETCONF is that subscription lifetimes are decoupled from NETCONF sessions.For subscription establishment, a NETCONF client may send:if the request is accepted, the server would reply:if the request is not accepted because the server cannot serve it, no configuration is changed. Int this case the server may reply:For every configured receiver, once NETCONF transport session between the server and the receiver is recognized as active, the server will issue a "subscription-started" notification. After that, the server will send notifications to the receiver as per the subscription notification.Note that the server assumes that the receiver is ready to accept notifications on the NETCONF session. This may require coordination between the client that configures the subscription and the clients for which the notifications are intended. This coordination is out of the scope of this document.Once this configuration is active, if NETCONF transport is needed but does not exist to one or more target IP address plus port, the server initiates a transport session via to those receiver(s) in the subscription using the address and port specified.Configured subscriptions can be modified using configuration operations against the top-level subtree subscription-config.For example, the subscription established in the previous section could be modified as follows, choosing a different receiver:if the request is accepted, the server would reply:Subscriptions can be deleted using configuration operations against the top-level subtree subscription-config. For example:Once a dynamic or configured subscription has been created, the NETCONF server sends (asynchronously) event notifications from the subscribed stream to receiver(s) over NETCONF. We refer to these as data plane notifications.The following is an example of an event notification from :This notification might result in the following, prior to it being placed into NETCONF. Note that the mandatory eventTime and Subscription id have been added.The equivalent using JSON encoding would beIn addition to data plane notifications, a server may send control plane notifications (defined in ) to indicate to receivers that an event related to the subscription management has occurred. Control plane notifications cannot be filtered out. Next we exemplify them using both XML, and JSON encodings for the notification-specific content: A subscription-started would look like:The equivalent using JSON encoding would be:The subscription-modified is identical, with just the word "started" being replaced by "modified".A notification-complete would look like:The equivalent using JSON encoding would be:The subscription-resumed and replay-complete are virutally identical, with "notification-complete" simply being replaced by "subscription-resumed" and "replay-complete" in both encodings.A subscription-terminated would look like:The above, and the subscription-suspended are virutally identical, with "subscription-terminated" simply being replaced by "subscription-suspended".The <notification> elements are never sent before the transport layer and the NETCONF layer, including capabilities exchange, have been established and the manager has been identified and authenticated.A secure transport must be used and the server must ensure that the user has sufficient authorization to perform the function they are requesting against the specific subset of content involved.The contents of notifications, as well as the names of event streams, may contain sensitive information and care should be taken to ensure that they are viewed only by authorized users. The NETCONF server MUST NOT include any content in a notification that the user is not authorized to view.If a malicious or buggy NETCONF client sends a number of <establish-subscription>requests, then these subscriptions accumulate and may use up system resources. In such a situation, subscriptions MAY be terminated by terminating the suspect underlying NETCONF sessions. The server MAY also suspend or terminate a subset of the active subscriptions on the NETCONF session .Configured subscriptions from one or more publishers could be used to overwhelm a receiver, which perhaps doesn't even support subscriptions. Clients that do not want pushed data need only terminate or refuse any transport sessions from the publisher.The NETCONF Authorization Control Model SHOULD be used to control and restrict authorization of subscription configuration. This control models permits specifying per-user permissions to receive specific event notification types. The permissions are specified as a set of access control rules.We wish to acknowledge the helpful contributions, comments, and suggestions that were received from: Andy Bierman, Yan Gang, Sharon Chisholm, Hector Trevino, Peipei Guo, Susan Hares, Tim Jenkins, Balazs Lengyel, Kent Watsen, and Guangying Zheng.Subscribing to YANG datastore push updatesSubscribing to Event Notifications(To be removed by RFC editor prior to publication)Text simplifications throughoutv02 had no meaningful changesAdded Call Home in solution for configured subscriptions.Clarified support for multiple subscription on a single session. No need to support multiple create-subscription.Added mapping between terminology in and (the one followed in this document).Editorial improvements.