rfc-6022

YANG Module for NETCONF Monitoring

M. Scott, M. Bjorklund
date2010-10 streamIETF areaops wgnetconf statusPROPOSED STANDARD pages28 canonicalhttps://www.rfc-editor.org/rfc/rfc6022 doi10.17487/RFC6022 errataview
This document defines a Network Configuration Protocol (NETCONF) data model to be used to monitor the NETCONF protocol. The monitoring data model includes information about NETCONF datastores, sessions, locks, and statistics. This data facilitates the management of a NETCONF server. This document also defines methods for NETCONF clients to discover data models supported by a NETCONF server and defines a new NETCONF <get-schema> operation to retrieve them. [STANDARDS-TRACK]

Extracted elements (28)

design-rationale §4.1

Schema retrieval is separated into two steps: the <get> operation retrieves the schema list metadata (identifier, version, format, location) without schema content, while the <get-schema> operation or external URIs (FTP, HTTP) are used to retrieve the actual schema content. This avoids embedding potentially large schemas in ordinary get responses.

netconf, yang

design-rationale §5

The locks container uses 'presence' semantics — it only exists when the datastore is actually locked — rather than using an empty list or boolean flag, which cleanly models the absence-of-lock state and avoids requiring clients to parse empty lock structures.

netconf, yang

interoperability-note §2.1.3

Schema version for YANG data models is defined as the value of the most recent YANG 'revision' statement in the module or submodule, or the empty string if no 'revision' statement is present, ensuring consistent versioning across implementations.

yang, netconf

interoperability-note §5

The dropped-sessions counter is NOT incremented for sessions closed by <close-session> or killed by <kill-session>; it only counts abnormally terminated sessions (idle timeout, transport close), which implementers must distinguish carefully.

netconf, yang

normative-requirement §2 MUST

A server implementing the ietf-netconf-monitoring data model MUST advertise the capability URI 'urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring' as described in RFC 6020.

yang, netconf

normative-requirement §5 MUST

Both a global lock and a partial lock entry in the locks container MUST contain the NETCONF session-id of the locking session; if the lock is held by a non-NETCONF-managed session (e.g., CLI), a session-id of 0 is reported.

yang, netconf

normative-requirement §5 MUST

For modeling languages that support or require a data model name (e.g., YANG module name), the schema identifier MUST match that name.

yang, netconf

normative-requirement §5 MUST

For YANG data models in the schema list, 'yang' format MUST be supported and 'yin' format MAY also be provided.

yang, netconf

normative-requirement §3.1 MUST

If the requested schema does not exist, <get-schema> MUST return error-tag 'invalid-value'. If more than one schema matches the parameters, error-tag is 'operation-failed' with error-app-tag 'data-not-unique'.

yang, netconf

normative-requirement §2.1.3 MUST

Multiple schema versions MAY be supported simultaneously by a NETCONF server, but each version MUST be reported individually in the schema list with the same identifier but different version.

yang, netconf

normative-requirement §2.1.1 MUST

The /netconf-state/capabilities list MUST include all capabilities exchanged during session setup that are still applicable at the time of the request.

yang, netconf

normative-requirement §2.1.3 SHOULD

The schema location list SHOULD contain at least one entry per schema.

yang, netconf

normative-requirement §2.1.4 MUST

The session list MUST include all currently active NETCONF sessions on the device.

yang, netconf

protocol-element §5

The common-counters grouping defines four zero-based-counter32 leaves (in-rpcs, in-bad-rpcs, out-rpc-errors, out-notifications) reused in both per-session and global statistics contexts.

yang, netconf

protocol-element §3.1

The <get-schema> RPC operation retrieves a schema by mandatory identifier (string), optional version (string), and optional format (identityref, default 'yang'). Returns the schema content as anyxml data.

yang, netconf

protocol-element §2.1

The ietf-netconf-monitoring YANG module defines the netconf-state container as the root of the monitoring data model, containing capabilities, datastores, schemas, sessions, and statistics subtrees. All elements are read-only (config false).

yang, netconf

protocol-element §5

The netconf-datastore-type typedef is an enumeration of running, candidate, and startup, used to name datastores in the /netconf-state/datastores list.

yang, netconf

protocol-element §2.1.2

The /netconf-state/datastores subtree contains a list of NETCONF configuration datastores (running, candidate, startup) and their lock state, including both global and partial lock information per RFC 5717.

yang, netconf

protocol-element §2.1.3

The /netconf-state/schemas subtree lists all supported schemas keyed by (identifier, version, format), with namespace and location fields. Location can be a URI or the special value 'NETCONF' indicating retrieval via <get-schema>.

yang, netconf

protocol-element §2.1.4

The /netconf-state/sessions subtree provides per-session data including session-id (uint32 1..max), transport identity, username, source-host, login-time, and zero-based counters for in-rpcs, in-bad-rpcs, out-rpc-errors, and out-notifications.

yang, netconf

protocol-element §2.1.5

The /netconf-state/statistics subtree provides global server counters: netconf-start-time, in-bad-hellos, in-sessions, dropped-sessions, in-rpcs, in-bad-rpcs, out-rpc-errors, and out-notifications.

yang, netconf

protocol-element §5

The partial-lock list entry contains a lock-id (uint32), lock-info (locked-by-session, locked-time), one or more XPath select expressions used to request the lock, and a list of locked-node instance-identifiers defining the actual locked scope.

yang, netconf

protocol-element §5

The schema-format identity hierarchy defines base identity 'schema-format' with derived identities: xsd, yang, yin, rng, and rnc, representing the supported data modeling language formats for schema retrieval.

yang, netconf

protocol-element §5

The transport identity hierarchy defines base identity 'transport' with derived identities: netconf-ssh (RFC 4742), netconf-soap-over-beep (RFC 4743), netconf-soap-over-https (RFC 4743), netconf-beep (RFC 4744), and netconf-tls (RFC 5539).

yang, netconf, tls

registry §8

This document registers the module 'ietf-netconf-monitoring' with namespace 'urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring' and prefix 'ncm' in the YANG Module Names registry.

registry, netconf, yang

registry §8

This document registers the URI 'urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring' in the IETF XML Registry (RFC 3688) as an XML namespace.

registry, netconf, yang

security-consideration §6

The lowest NETCONF layer is the secure transport layer; the mandatory-to-implement secure transport is SSH (RFC 4742). Access to sensitive monitoring data nodes must be controlled via NETCONF access control mechanisms.

security, netconf, tls

security-consideration §6 SHOULD NOT

The /netconf-state/sessions/session/username leaf contains identity information that could be exploited for authentication attacks; read access MUST be controlled. This username SHOULD NOT be used for access control purposes without careful consideration, as different servers may report identical usernames for different persons.

security, netconf, yang