Use this when starting with NETCONF automation.
NETCONF Fundamentals
1. NETCONF (RFC 6241): SSH transport, RPC messages, operations, YANG content.
2. Capabilities negotiated in hello.
3. Candidate and confirmed-commit are optional.
4. Use hostkey verification.
5. Session per task.
connect → hello → RPCs → close
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as capability mismatch, namespace drift, wrong datastore, lock contention, partial edit semantics and assuming <ok/> shows final device behavior, choosing the cases most relevant to capability exchange, framing/session, RPC request/reply, datastores, errors and read-versus-write transaction boundaries. For NETCONF → NETCONF Fundamentals, 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 2 Common mistakes Narrow the fault
- Using NETCONF without checking capabilities first.
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.
- Hello exchange with capabilities — supported features
- Layers: transport, messages, operations, content — architecture
python3 -c "from ncclient import manager;m=manager.connect(host='<dev>',port=830,username='<u>',password='<p>',hostkey_verify=True);print(len(m.server_capabilities))"— connect
ReferenceWhy it matters1 section · depth on demand
In depth
NETCONF is the IETF standard protocol (RFC 6241) for managing network device configuration as structured, model-driven data. It runs over SSH (port 830), uses XML-encoded RPCs, and is designed for automation: transactions, validation, locking and confirmed commits that CLI scripting cannot offer reliably.
| CLI automation | NETCONF |
|---|---|
| Text commands, screen scraping | Structured XML defined by YANG |
| Line by line, partial failures | Transactional (with candidate) |
| No built-in validation | Validate before commit |
| Output format varies by version | Model-defined data |
Getting started: enable it on the device, check capabilities in the <hello>, explore models with pyang or YANG Suite, and use ncclient (Python) or Ansible's netconf connection.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
NETCONF → NETCONF Fundamentals is owned at runtime by the NETCONF client/server session and the network device datastore implementation. 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. The linked authority for bounded mechanics is RFC 6241 — Network Configuration Protocol (NETCONF); documentation support is separate from observed lab/production Evidence.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in NETCONF > NETCONF Fundamentals. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc6241 · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For capability exchange, framing/session, RPC request/reply, datastores, errors and read-versus-write transaction boundaries, prefer typed fields and stable IDs over human presentation text.