MGMT · management · draft
NETCONF
Network Configuration Protocol
RPC operations over a secure session against configuration datastores — candidate, running, and optional startup — with locks and confirmed commit.
Presenter modeEmbed this figure
Why it exists
CLI scraping does not give transactional, machine-readable configuration across vendors. NETCONF standardizes datastore RPCs over a secure session. IntroductionRFC 6241 · PROPOSED STANDARD · June 2011
NETCONF is the write (and read) path for configuration. Streaming telemetry is a separate subscription model that often reuses YANG but is not a substitute for <edit-config>. Protocol OperationsRFC 6241 · PROPOSED STANDARD · June 2011
Edit candidate, then commit to running
With :candidate, edits land in the candidate datastore. <commit> copies validated candidate into running. Skipping the commit leaves running unchanged.
Session starts with <hello> exchanging capabilities. The client learns whether :candidate, :confirmed-commit, and specific YANG modules are advertised. NETCONF client. Device · datastores.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| NETCONF client | host | — |
| Device · datastores | router | — |
| NETCONF client — Device · datastores | link | up |
Session starts with <hello> exchanging capabilities. The client learns whether :candidate, :confirmed-commit, and specific YANG modules are advertised.
What changed
- <hello>: NETCONF client → Device · datastores
- <hello> · caps: Device · datastores → NETCONF client
- Advertise capabilities
How it works
A session begins with capability exchange. Each side advertises protocol features and YANG modules it supports. Capabilities ExchangeRFC 6241 · PROPOSED STANDARD · June 2011
Configuration lives in datastores. :candidate stages edits; <commit> applies them to running. :writable-running edits running directly when advertised. Configuration DatastoresRFC 6241 · PROPOSED STANDARD · June 2011
Locks serialize conflicting editors. Confirmed commit applies with an automatic revert unless confirmed — useful when a change can sever management access. Confirmed Commit CapabilityRFC 6241 · PROPOSED STANDARD · June 2011
Content is modeled in YANG; NETCONF carries the RPC framing and datastore semantics. Wrong module revisions look like “NETCONF is broken.” TerminologyRFC 6241 · PROPOSED STANDARD · June 2011
On the wire
Constructed examples, encoded from the field table below them — not captured traffic.
- TCP
- Options, if any, follow this header and are covered by the data offset. RFC 9293
Configure it
netconf-yang netconf-yang feature candidate-datastoreEnable NETCONF and advertise candidate where supported so <edit-config> can stage before <commit>.
Common mistake: Assuming :candidate without checking server <hello> capabilities on the session.
RFC 6241 §5.1
aaa new-model aaa authentication login default local aaa authorization exec default local username netconf privilege 15 secret <configured out of band> ip ssh version 2NETCONF over SSH needs an authorized operator. Use out-of-band secrets — never commit real passwords.
Common mistake: Leaving a shared lab password in the repository or golden configs.
Cisco IOS XE — NETCONF and RESTCONF §NETCONF
Verify
show netconf-yang status- NETCONF enabled; listen sockets present.
show netconf-yang sessions- Active client sessions after connect.
Caveats
- Marked draft: feature names and candidate support differ by IOS-XE train.
- Placeholder secrets only — never commit real credentials.
When it breaks
Symptom first, because that is what you have when it happens.
Client reports edit success but the box still has old behavior.
Narrow it down
- Check whether the edit targeted candidate without a subsequent <commit>.
- Compare <get-config> of candidate versus running.
Cause
Edits remained in candidate and were never committed.
Fix
Commit (or discard) explicitly; verify running after apply.
<commit>RFC 6241 · PROPOSED STANDARD · June 2011A change appears then silently reverts minutes later.
Narrow it down
- Look for a confirmed commit without a confirming commit.
- Check the configured confirm timeout.
Cause
Confirmed commit timer expired and restored prior configuration.
Fix
Issue the confirming commit while reachable, or use confirmed commit intentionally for risky changes.
Confirmed Commit CapabilityRFC 6241 · PROPOSED STANDARD · June 2011RPCs fail with operation-not-supported or unknown-element.
Narrow it down
- Diff client assumptions against server <hello> capabilities.
- Confirm YANG module revisions on both sides.
Cause
Client invoked an optional capability or module the server did not advertise.
Fix
Adapt the workflow to advertised capabilities; upgrade platform or models if required.
Capabilities ExchangeRFC 6241 · PROPOSED STANDARD · June 2011Edits fail because the datastore is locked.
Narrow it down
- Identify which session holds <lock>.
- Check for abandoned automation sessions.
Cause
Another client holds a lock on the target datastore.
Fix
Wait, unlock from the owning session, or use partial-lock patterns where supported.
<lock>RFC 6241 · PROPOSED STANDARD · June 2011TCP connects but the NETCONF session never starts.
Narrow it down
- Verify SSH/user credentials and subsystem configuration.
- Confirm NETCONF is enabled on the management VRF/source.
Cause
Secure transport or subsystem setup failed before <hello>.
Fix
Fix AAA and NETCONF enablement; match source interface and ACL.
Cisco IOS XE — NETCONF and RESTCONF §NETCONF
Design notes
Never assume :candidate or :confirmed-commit. Branch on hello capabilities every session.
Transport is typically SSH (RFC 6242) or another secure stream. TCP alone is not the NETCONF security story. Transport Protocol RequirementsRFC 6241 · PROPOSED STANDARD · June 2011
Misconceptions
- “<edit-config> always changes the live device immediately.”
- When using :candidate, edits stage until <commit>. Running changes only after a successful apply path. Configuration DatastoresRFC 6241 · PROPOSED STANDARD · June 2011
- “Streaming telemetry replaces NETCONF for configuration.”
- Telemetry subscriptions observe state. Configuration writes remain NETCONF/RESTCONF (or vendor equivalents), not YANG-Push alone. Protocol OperationsRFC 6241 · PROPOSED STANDARD · June 2011
- “Capability exchange is informational only.”
- Optional features such as :candidate and :confirmed-commit are valid only when advertised. Ignoring hello causes hard failures. Capabilities ExchangeRFC 6241 · PROPOSED STANDARD · June 2011
More walkthroughs
Confirmed commit rolls back without confirmationdesign-choice
A confirmed commit applies changes but reverts unless a confirming commit arrives before the timeout — a safety rail for remote changes that can cut management reachability.
The client issues <commit> with a confirmed parameter and timeout. The server applies the candidate but arms an automatic revert timer. Operator. Device: running provisional. Mgmt path at risk.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| Operator | host | — |
| Device | router | running: provisional |
| Mgmt path at risk | zone | — |
| Operator — Device | link | up |
| Device — Mgmt path at risk | link | up |
The client issues <commit> with a confirmed parameter and timeout. The server applies the candidate but arms an automatic revert timer.
What changed
- <commit confirmed>: Operator → Device
- Revert timer armed
- Device: running → provisional
Client assumes a capability the server did not advertisefailure
Operations such as :candidate or :confirmed-commit are optional capabilities. Invoking them without a matching hello advertisement fails or falls back incorrectly.
Server hello omits :candidate. The client still targets candidate in <edit-config> because its library defaults to that workflow. Client · assumes candidate. Server · running-only.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| Client · assumes candidate | host | — |
| Server · running-only | router | — |
| Client · assumes candidate — Server · running-only | link | up |
Server hello omits :candidate. The client still targets candidate in <edit-config> because its library defaults to that workflow.
What changed
- <hello> · no :candidate: Server · running-only → Client · assumes candidate
- Ignores hello