Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

NETCONF Troubleshooting

Direct answer

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.

When to use this

Use this when NETCONF sessions or RPCs fail.

First 30 seconds

1. Failures: auth/AAA, capability missing, invalid payload (namespace, path, type), lock-denied, timeouts.

2. Read rpc-error fields.

3. Validate payload against model.

4. Check device logs.

5. Fix and retry.

Operational verification

connect → hello → rpc → rpc-error

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
NETCONF / YANG datastore automation
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.

PlatformNETCONF / YANG datastore automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior. · TCP / NETCONF
Key commandnc -vz <host> 830
Scope / prerequisiteUse this when NETCONF sessions or RPCs fail.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Automation command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

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

5 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 Known-good, broken and when it is fixed Verify boundary

Known-good requires session/capability negotiation, successful intended RPC, required commit, and get/get-config read-back showing the target values in the authoritative datastore, followed by device operational verification where applicable. An <ok/> response shows that RPC was accepted, but it does not show a candidate was committed or that the network behavior changed as intended.

Step 2 Command read-back and what it shows Verify boundary

Known-good is port 830 is reachable, the client establishes a NETCONF session with expected capabilities and the original read RPC returns successful data for the intended model/path; broken state is transport refusal/timeout, SSH/subsystem negotiation failure, missing capability or reproducible <rpc-error> for the requested operation. nc -vz <host> 830 shows TCP reachability to the NETCONF port only; it cannot show SSH authentication, capability negotiation, datastore access or RPC correctness.

Step 3 Common mistakes Narrow the fault
  • Debugging without the server capabilities and rpc-error.
Step 4 Native failure isolation and next-check logic Narrow the fault

Show SSH/NETCONF subsystem reachability and session establishment, then capture server capabilities before choosing datastore/operation. For rpc-error, inspect error-type/tag/path/message and the exact YANG namespace/path. Verify locks and candidate state before retrying edits. After edit-config, distinguish validation from commit and read back the same datastore/model subtree. Avoid raw XML trial-and-error when the real issue is unsupported capability or namespace/schema mismatch.

Step 5 Observation-driven branch and next-check logic Narrow the fault

If port 830 is closed/unreachable, inspect routing/ACL/device service; if TCP opens but SSH/NETCONF negotiation fails, inspect AAA, subsystem and host-key/cipher policy; if session opens but RPC errors occur, inspect capability, datastore, namespace and authorization details.

Key points
  • netconf-yang must be enabled on IOS XE.
  • rpc-error explains failures.
  • Namespaces must match models.
Key checks
  • rpc-error details (error-tag, error-path, error-message) — cause
  • show netconf-yang sessions / device logs — device side
  • python3 -c 'import logging;logging.basicConfig(level=logging.DEBUG)' (ncclient debug) — trace
ReferenceHow it works2 sections · depth on demand

How it works

NETCONF depends on transport (commonly SSH), capability negotiation, YANG-modeled RPCs, datastore semantics, locking and commit behavior. Devices may support running only or candidate/confirmed-commit workflows; an edit-config RPC success can still leave changes uncommitted or affect a datastore different from the one later read. RPC error details and message IDs are authoritative transaction evidence.

How it works

NETCONF Troubleshooting is governed by TCP/SSH transport, NETCONF subsystem negotiation, capabilities/datastores and RPC processing on the network device; the device NETCONF subsystem owns protocol-session and datastore-access state. A NETCONF client first reaches SSH port 830, opens the NETCONF subsystem, exchanges <hello> capabilities and then sends RPCs against supported datastores; transport success precedes protocol and model authorization. DNS/routing, SSH policy, AAA, host keys, device NETCONF configuration and YANG capability support are distinct boundaries. The important state separation is that an open TCP port does not mean NETCONF subsystem negotiation or a specific RPC is authorized/supported.

ReferenceImportant terms & boundaries1 section · depth on demand

Method

NETCONF troubleshooting checks the session layers in order: transport, SSH, NETCONF hello, then RPCs.

1. TCP 830 reachable: nc -zv r1 830.

2. NETCONF enabled on the device (netconf-yang on IOS XE) and user has privilege 15.

3. Open a manual session: ssh -s admin@r1 -p 830 netconf and check the hello capabilities.

4. Run the RPC with ncclient debug logging.

5. Read <rpc-error>: tag, path and message.

rpc-error tagMeaning
invalid-valueValue violates model
unknown-elementWrong namespace or model not supported
lock-deniedDatastore locked by another session
operation-not-supportedCapability (e.g. candidate) missing
access-deniedNACM/privilege
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 docNETCONF / YANG datastore automation current

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

Basis: https://www.rfc-editor.org/rfc/rfc6241 · confidence 94%
Confirmation

Confirm action

Continue?