Use this when sending NETCONF RPCs and reading rpc-reply or rpc-error responses.
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.
1. RPCs carry operations; replies contain data, ok or rpc-error.
2. Check every reply for errors.
3. message-id correlates replies.
4. Vendor RPCs for actions.
5. Log errors with details.
<rpc> → device → <rpc-reply> (ok/data/error)
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
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.
Step 2 Common mistakes Narrow the fault
- Ignoring
rpc-errordetails.
Step 3 Where it fails Narrow the fault
Failure analysis for NETCONF → RPC should follow the path through the components: client model → SSH/TLS transport → NETCONF RPC → datastore validation/lock → commit/apply → datastore read-back. 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 · 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.
- Each RPC has a message-id.
- rpc-reply contains data, ok or rpc-error.
- rpc-error has type, tag and message.
- <rpc message-id> / <rpc-reply> — message format
- rpc-error handling — errors
- Custom RPCs (actions) — operations
ReferenceWhy it matters1 section · depth on demand
In depth
NETCONF is built on remote procedure calls (RPCs): every operation is an <rpc> message with a message-id, and the device answers with an <rpc-reply> containing <ok/>, data or <rpc-error>. Besides the standard operations, YANG models can define custom RPCs, such as saving the configuration or clearing counters.
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config><source><running/></source></get-config>
</rpc>
An <rpc-error> includes error-type, error-tag, error-severity, error-path and error-message — the path points at the element that caused the problem, which is the fastest route to fixing a rejected change.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
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 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.
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 > RPC. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc6241 · confidence 94%