Use this when NETCONF sessions or RPCs fail.
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.
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.
connect → hello → rpc → rpc-error
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
nc -vz <host> 830Primary Commands
Configuration and operational commands for this Topic.
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 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
- netconf-yang must be enabled on IOS XE.
- rpc-error explains failures.
- Namespaces must match models.
- rpc-error details (error-tag, error-path, error-message) — cause
show netconf-yang sessions / device logs— device sidepython3 -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 tag | Meaning |
|---|---|
invalid-value | Value violates model |
unknown-element | Wrong namespace or model not supported |
lock-denied | Datastore locked by another session |
operation-not-supported | Capability (e.g. candidate) missing |
access-denied | NACM/privilege |
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 Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc6241 · confidence 94%