rfc-4741

NETCONF Configuration Protocol

R. Enns (Editor)
date2006-12 streamIETF areaops wgnetconf statusPROPOSED STANDARD pages95 canonicalhttps://www.rfc-editor.org/rfc/rfc4741 doi10.17487/RFC4741 errataview
The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices. It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages. The NETCONF protocol operations are realized on top of a simple Remote Procedure Call (RPC) layer. [STANDARDS-TRACK]

obsoleted by

Extracted elements (28)

design-rationale §1.3

Configuration data and state data are strictly separated because mixing them would cause comparison noise from statistics, allow nonsensical writes to read-only data, inflate data set sizes, and complicate restoration from archived configurations. <get-config> returns only configuration; <get> returns both.

netconf

design-rationale §1.2

NETCONF uses a URI-based capability system rather than a fixed feature set so that standard and proprietary extensions can be defined by any naming authority without central coordination, allowing the protocol to evolve incrementally.

netconf

design-rationale §6.1

Subtree filtering was designed so the server does not need data-model-specific semantics during processing, enabling simple, centralized implementation; the trade-off is that only exact-match content filtering and explicit selection are supported, not arbitrary query expressions.

netconf

interoperability-note §1.3

The <get-config> operation retrieves configuration data only, while <get> retrieves both configuration and state data; implementations that conflate the two will produce incorrect results when applications attempt to archive and restore configurations.

netconf

interoperability-note §7.5

When a NETCONF <lock> is active, SNMP and CLI requests to modify the locked configuration MUST also fail with an appropriate error, ensuring that non-NETCONF management interfaces respect the lock; conversely, a non-NETCONF entity holding even a partial lock prevents NETCONF from acquiring a global lock.

netconf, snmp

normative-requirement §1.2 MUST

A capability URI MUST sufficiently distinguish the naming authority to avoid naming collisions; NETCONF capability names MUST be URIs.

netconf

normative-requirement §7.5 MUST

A lock MUST NOT be granted if a lock is already held by any NETCONF session or another entity, or if the <candidate> target has uncommitted modifications. An attempt to lock MUST fail in these cases.

netconf

normative-requirement §2.4 MUST

A NETCONF implementation MUST support the SSH transport protocol mapping. SSH is the sole mandatory transport; other transports are optional.

netconf, yang

normative-requirement §4.3 MUST NOT

A server MUST NOT return application-level or data-model-specific error information in an <rpc-error> element for which the client does not have sufficient access rights.

netconf, security

normative-requirement §3.2 MUST NOT

Document type declarations MUST NOT appear in NETCONF content, preventing XML DTD injection attacks and simplifying parsing.

netconf, security

normative-requirement §7.3 MUST

If the source and target parameters of a <copy-config> operation identify the same URL or configuration datastore, an error MUST be returned with an error-tag of 'invalid-value'.

netconf

normative-requirement §4.5 MUST

NETCONF <rpc> requests MUST be processed serially by the managed device, and the device MUST send responses only in the order the requests were received, even if additional requests are pipelined before previous ones complete.

netconf

normative-requirement §2.1 MUST

Resources requested from the server for a particular connection MUST be automatically released when the connection closes, enabling failure recovery; for example, locks held by a terminated session are automatically freed.

netconf

normative-requirement §2.3 MUST

The authentication process MUST result in an identity whose permissions are known to the device, and those permissions MUST be enforced during the remainder of the NETCONF session.

netconf, security

normative-requirement §4.1 MUST

The <rpc> element has a mandatory 'message-id' attribute; if additional attributes are present in an <rpc> element, a NETCONF peer MUST return them unmodified in the corresponding <rpc-reply> element.

netconf

protocol-element §5.1

NETCONF defines three configuration datastores: <running> (always present, currently active configuration), <candidate> (optional, staging area for changes before commit), and <startup> (optional, configuration loaded at boot).

netconf

protocol-element §1.1

NETCONF is conceptually partitioned into four layers: (1) Transport Protocol, (2) RPC, (3) Operations (e.g., <get-config>, <edit-config>), and (4) Content. The content layer is outside the scope of this document.

netconf

protocol-element §6.2

Subtree filters consist of five component types: namespace selection, attribute match expressions, containment nodes, selection nodes (empty leaf = explicit selection), and content match nodes (leaf with text = exact-match filter with AND semantics across siblings).

netconf

protocol-element §7

The base protocol operations are: get, get-config, edit-config, copy-config, delete-config, lock, unlock, close-session, and kill-session. Additional operations may be defined by capabilities.

netconf

protocol-element §7.2

The <edit-config> operation supports four per-element 'operation' attribute values: merge (default), replace, create (fails with data-exists if present), and delete. The 'default-operation' parameter sets the operation for elements without an explicit attribute.

netconf

protocol-element §7.9

The <kill-session> operation allows an authorized client to terminate another NETCONF session and force release of any locks held by that session; it cannot be used to kill the current session.

netconf

protocol-element §7.5

The <lock> operation acquires an exclusive configuration lock on a named datastore; it fails with error-tag 'lock-denied' and includes the holding session-id (or 0 for non-NETCONF entities) in error-info. The lock is automatically released when the session terminates.

netconf

protocol-element §4.3

The <rpc-error> element carries structured error information including: error-type (transport/rpc/protocol/application), error-tag, error-severity (error/warning), error-app-tag, error-path (XPath), error-message, and error-info for protocol- or data-model-specific content.

netconf

registry §10.3

Section 10.3 defines NETCONF capability URNs registered with IANA, including: :writable-running:1.0, :candidate:1.0, :confirmed-commit:1.0, :rollback-on-error:1.0, :validate:1.0, :startup:1.0, :url:1.0, and :xpath:1.0, all under the 'urn:ietf:params:netconf:capability:' prefix.

netconf, registry

security-consideration §9

NETCONF connections must provide authentication, data integrity, and confidentiality, delegated entirely to the transport layer (e.g., SSH or TLS). The protocol itself provides no built-in security mechanisms.

netconf, security

security-consideration §9

The <kill-session> and <lock> operations allow one authorized session to affect another; implementations must carefully enforce access controls to prevent privilege escalation or denial of service through lock starvation.

netconf, security

state-machine §7.5

A configuration datastore lock transitions from Unlocked to Locked on a successful <lock> operation and returns to Unlocked on <unlock>, <close-session>, <kill-session>, or transport failure. Lock acquisition fails if the datastore is already locked by any session or non-NETCONF entity.

netconf

wire-format §3.1

All NETCONF protocol elements are defined in the XML namespace 'urn:ietf:params:xml:ns:netconf:base:1.0'. The 'message-id' attribute is an arbitrary string (typically a monotonically increasing integer) echoed verbatim from <rpc> to <rpc-reply>.

netconf