Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

NETCONF

Direct answer

NETCONF and RESTCONF expose YANG-modeled configuration and operational data through structured, machine-oriented interfaces.

When to use this

Use NETCONF for RPC/datastore workflows and RESTCONF for HTTPS resource operations over the same model-driven data.

First 30 seconds

1. NETCONF: XML RPCs over SSH port 830.

2. Datastores: running, candidate, startup.

3. Operations: get, get-config, edit-config, commit, lock.

4. Transactions and validation.

5. YANG models.

Operational verification

client → SSH 830 → hello → RPCs → datastores

Evidence · next step

1. Verify service, route, port and certificate/SSH.
2. Authenticate and inspect capabilities/models.
3. Read a narrow resource.
4. Validate/edit with correct datastore and media type.
5. Confirm reply errors and device state.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
automation design and operations
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformautomation design and operations · Exact syntax, defaults, scale and output fields vary by platform and IOS / IOS XE release. · Cisco IOS / IOS XE
Key commandnetconf-yang
Scope / prerequisiteUse NETCONF for RPC/datastore workflows and RESTCONF for HTTPS resource operations over the same model-driven data.
Show · 1Reference · 1
What next?3 suggested next steps
Child topics (this level)13
Catalog command links2
Evidence1
On this pageJump to a specific section
Automation command reference

Primary Commands

Configuration and operational commands for this Topic.

Verification

Show Commands

Read-only and diagnostic commands for confirming state, narrowing a fault and interpreting the current boundary.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Target-state verification ladder Verify boundary

NETCONF uses a strict target-state ladder for NETCONF RPC and datastore/effective network state: request accepted → job/task succeeded → target object changed → effective runtime state confirmed → original workload verified.

Step 2 Verification path Verify boundary

Record device, session/RPC message-id, datastore, YANG module/revision and target path; inspect the runtime/control-plane result; then query the selected configuration or operational subtree on the network device through an independent read path and compare it with the versioned intent. For Automation → NETCONF, the evidence must connect the control-plane result to the selected configuration or operational subtree on the network device and explain any gap between desired, controller-reported and consumer-visible state.

Step 3 Where it fails Narrow the fault

Failure analysis for Automation → NETCONF should follow the path through the components: client model → SSH/TLS transport → NETCONF RPC → datastore validation/lock → commit/apply → datastore read-back. Common failure classes include capability mismatch, namespace drift, wrong datastore, lock contention, partial edit semantics and assuming <ok/> shows final device behavior. Before retrying a mutating operation, read current target state using the stable identity device, session/RPC message-id, datastore, YANG module/revision and target path; if state is unknown, stop broad retries.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

command output · 1
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic NETCONF Fundamentals

NETCONF fundamentals: a client opens an SSH session to port 830, exchanges hello messages with capabilities, then sends XML RPCs such as get-config and edit-config that follow YANG models.

Subtopic SSH Transport

NETCONF normally runs over SSH on TCP port 830 as an SSH subsystem, reusing SSH authentication and encryption, such as ssh -s admin@router -p 830 netconf.

Subtopic RPC

An RPC is a NETCONF request in an <rpc> element with a message-id, answered by <rpc-reply> containing data, <ok/> or <rpc-error> with the error type, tag and message.

Subtopic Datastores

NETCONF datastores are separate copies of configuration: running (active), candidate (staged changes) and startup (loaded at boot).

Subtopic running

The running datastore is the active configuration currently in effect on the device.

Subtopic candidate

The candidate datastore holds staged configuration changes that do not affect the device until a commit copies them to running, letting several edits be applied together or discarded.

Subtopic startup

The startup datastore holds the configuration loaded at boot.

Subtopic get

get retrieves both configuration and operational state data, such as interface counters, optionally limited by a subtree or XPath filter.

Subtopic get-config

get-config retrieves configuration only, from a chosen datastore such as running or candidate, optionally filtered to part of the YANG tree.

Subtopic edit-config

edit-config changes a datastore with an XML payload, using operations like merge, replace, create, delete and remove on specific nodes of the YANG data tree.

Subtopic commit

commit is the NETCONF operation that applies the candidate datastore to running.

Subtopic Locking

NETCONF locking (lock and unlock operations) gives one session exclusive access to a datastore while it makes changes, preventing other sessions or users from editing at the same time.

Subtopic NETCONF Troubleshooting

Troubleshoot NETCONF by checking it is enabled (netconf-yang on IOS XE) and port 830 reachable, the capabilities in the hello, rpc-error messages, namespaces in the XML payload and the device's YANG model support.

Key points
  • NETCONF commonly uses SSH/TCP 830 and XML RPCs
  • RESTCONF uses HTTPS, HTTP methods and JSON/XML representations
  • Capability/model discovery precedes path or payload construction
  • Running, candidate and startup semantics depend on server capabilities
  • Transport success does not prove authorization, valid YANG paths or transaction success.
Key checks
  • python3 -c 'from ncclient import manager' — library
  • ssh -p 830 <u>@<dev> -s netconf — subsystem
  • Device capabilities list — features
ReferenceWhy it matters1 section · depth on demand

When to use it

Use NETCONF for RPC/datastore workflows and RESTCONF for HTTPS resource operations over the same model-driven data.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

NETCONF (RFC 6241) is a network management protocol for reading and changing device configuration using YANG-modelled XML data. It runs over SSH (TCP 830), supports separate datastores (running, candidate, startup) and transactions, so a set of changes can be validated and committed as a whole.

OperationPurpose
<get>Configuration and operational state
<get-config>Configuration from a datastore
<edit-config>Change configuration
<lock>/<unlock>Prevent concurrent changes
<commit>Apply candidate to running
<validate>Check candidate before commit
from ncclient import manager
with manager.connect(host='r1', port=830, username='admin', password=pw, hostkey_verify=True) as m:
    print(m.get_config(source='running', filter=('subtree', '<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/>')))

Mechanics

Automation → NETCONF is owned at runtime by the NETCONF client/server session and the network device datastore implementation. Its durable intent is capability-aware XML RPC intent against explicit running/candidate/startup datastores; the stable identity contract is device, session/RPC message-id, datastore, YANG module/revision and target path. The consumer-visible target is the selected configuration or operational subtree on the network device. The operating invariants are that server capabilities are discovered, namespaces and datastores are explicit, locks/transactions are honored, and RPC success is followed by datastore read-back. Follow the chain of components client model → SSH/TLS transport → NETCONF RPC → datastore validation/lock → commit/apply → datastore read-back and record which layer currently owns truth.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docautomation design and operations current

Authoritative/upstream documentation reviewed for bounded claims in NETCONF. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/azure/well-architected/operational-excellence/enable-automation · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
RESTCONF NETCONFmodel driven programmabilityNETCONF datastore RPC
Embedded reference data

Quick lookup tables

RESTCONF / NETCONF evidence chain

Configuration, operational state, counters and downstream proof remain separate.

BoundaryQuestionEvidenceDoes not prove
DefinitionWhat is configured or intended?running configuration / controller policylive operation
Local stateIs the feature active at the expected scope?show netconf-yang sessionsremote success
CountersDid controlled traffic or an event reach this stage?scoped counters/timestampscomplete return path
Next boundaryWhat consumes or transports this state?transport/TLS/SSH → authentication/authorization → capabilities/YANG path → RPC/HTTP operation → datastore → device stateapplication success
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

Capture at minimum device, session, message-id, datastore, module/revision, target path, rpc-error/error-tag/error-path, commit result and read-back values.

Confirmation

Confirm action

Continue?