NETCONF get versus get-config data scope
Short answer
A NETCONF <get> returns both state and configuration data, while <get-config> returns configuration only from the named datastore
Question
Key Takeaways
NETCONF's two read RPCs differ by data scope: <get> returns configuration plus operational state, while <get-config> returns only configuration from the datastore named in the request. Option A captures that split, since state counters and health data never appear in a get-config reply. The distinction matters when choosing an RPC for monitoring versus configuration backup in automation scripts.
Expert Analysis
Because NETCONF splits operational state from configuration, the RPC you choose determines which data lands in the reply: <get> returns configuration plus state data from the candidate or running datastore, while <get-config> returns configuration only, and that split is exactly what option A records.
The datastore scope decides what get-config returns
A <get-config> operation names one datastore — running, candidate, or intended — and returns only the nodes that exist in that datastore's configuration tree. Anything an operator cannot write back through a <copy-config> or <edit-config> is excluded: interface counters, CPU load, routing protocol adjacency status and other <operational> leaves never appear, because they live in the state datastore rather than in running or candidate. That is the whole scope rule behind the option-A wording: get-config = configuration only, from the datastore named in the request. A NETCONF client that asks for get-config on running and then separately queries state needs two exchanges; there is no filter flag that widens get-config into operational data. The server enforces the split in the YANG model itself, since each container is tagged config true or config false, and the RPC simply follows that tagging.
<get> is where operational state enters the reply
The <get> RPC runs against the whole configuration + state tree: it merges the running datastore with the device's live state, so a single request can return, for example, both the configured bandwidth of an interface and its current input error counters. This is the operation a monitoring script reaches for when it needs current conditions without touching configuration, and it is also the operation that pairs naturally with a subtree or filter element scoped to a state container. The reply for <get> carries <data> whose contents reflect both categories, whereas <get-config> replies contain only config true nodes. Timing matters too: state values are read at the moment of the RPC, so a <get> reply is a snapshot of live counters, while a <get-config> reply is a snapshot of stored configuration. Building on ncclient or a raw SSH NETCONF session, the library call is usually get versus get_config(source='running'), and the difference in returned XML is visible immediately.
Each wrong option misstates the split in a different direction
Option B claims the two RPCs are identical, which would make the protocol expose two interchangeable verbs for one purpose — it does not, and the differing reply contents make that claim testable in any packet capture. Option C inverts the assignment by saying get is configuration only; in fact get is the wider of the two, adding operational state, so restricting it to config discards precisely the live data a health check needs. Option D assigns state-only to get-config, which is the exact opposite of its documented behavior: get-config is the configuration-scoped operation and can never return state by itself. Both C and D therefore break the config/state boundary in opposite directions, while B erases the boundary altogether; only A preserves the correct pairing on both sides of the versus.
What would make B or C the right choice
Option B would become correct only if NETCONF defined a single RPC covering both trees and treated the second name as a legacy alias — some protocols do collapse such pairs, and a reader who has only met RESTCONF's /data and /data?content=deep endpoints could assume the same collapse here. That condition is not met: RFC 6241 specifies two distinct operations with distinct data scopes, and a server must honor both. Option C would be correct if the question were restricted to configuration retrieval, or if the device exposed no state datastore at all — for instance, a NETCONF server implementing only the schema with no <operational> containers. Cisco IOS XE devices do expose state, so get must cover state plus config, leaving A as the only accurate statement.
Official Reference
https://www.rfc-editor.org/rfc/rfc6241.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
Treat each NETCONF RPC as a scope question and ask which tree it reads: configuration-only versus configuration-plus-state. When two options describe a protocol's verbs as identical or inverted, verify against the protocol's own operation list before accepting the simplification, because exam distractors usually reverse the correct pairing rather than invent a new one. For read operations, remember that only the state-inclusive RPC serves live monitoring needs.
Related Analysis
Practice All 300-435 Questions
Access 150 questions with complete answers and detailed explanations.
View Full 300-435 Practice Test →