Understanding NETCONF get-config Operation Purpose
Short answer
A Retrieves config from datastore.
Question
Key Takeaways
The NETCONF get-config operation retrieves configuration data from a specified datastore such as running, candidate, or startup. It wins because it is strictly a read-only command defined by RFC 6241, unlike edit-config which modifies data. This distinction is critical for network automation tools that verify device state before applying changes.
Expert Analysis
The NETCONF protocol defines a precise set of operations for interacting with network device configurations, and the get-config operation is strictly limited to reading data without altering state. This distinction is fundamental because NETCONF separates configuration management (write operations) from configuration retrieval (read operations), ensuring that audit logs and transaction integrity are not compromised by accidental modifications during inspection. The decisive condition here is that the operation name 'get' implies acquisition rather than mutation, and the target 'config' refers to the stored configuration datastore, making option A the only technically valid description of its function within the IETF RFC 6241 specification.
Read-Only Semantics Define the Operational Boundary
NETCONF operations are categorized into two distinct classes: those that modify the candidate or running configuration and those that merely inspect it. The get-config operation belongs exclusively to the inspection class. It does not support any form of write-back, commit, or rollback mechanism inherent in its definition. When a client issues a get-config request, the server processes the filter criteria (if provided) and serializes the matching configuration nodes into an XML document. This process is purely informational. Any operation that implies modification, deletion, or structural locking falls outside the scope of get-config. The protocol design ensures that read operations are idempotent and safe to perform concurrently with other administrative tasks, provided that locks are held correctly for the modifying operations. Therefore, the boundary between get-config and other operations is defined by the absence of side effects on the device's configuration state.
Datastore Retrieval is the Sole Purpose of the Command
The core function of get-config is to extract configuration data from one of the three standard NETCONF datastores: running, candidate, or startup. The operation accepts optional parameters to specify which datastore to query and how to filter the results using XPath expressions. For instance, a user might request only interface configurations from the running datastore. The server validates the request against access control lists and returns the structured XML payload. This capability is essential for verification, debugging, and integration with higher-level automation tools that need to understand the current state before proceeding. The specificity of this action—retrieving from a named datastore—distinguishes it from generic API calls that might return operational data or telemetry streams. In the context of network automation, get-config serves as the primary method for establishing the baseline state of a device before applying changes via edit-config or for validating compliance after deployment.
Other Options Represent Mutative or Administrative Actions
Selecting incorrect options often stems from confusing get-config with other NETCONF RPCs that handle different aspects of configuration lifecycle management. Option B suggests modification, which is the domain of the edit-config operation. Edit-config allows clients to add, remove, or replace configuration nodes in the candidate datastore, requiring a subsequent commit to take effect. Option C suggests deletion, which is also handled by edit-config through the removal of specific nodes; there is no standalone delete-config RPC in standard NETCONF. Option D suggests locking, which is performed by the lock operation. Locking is a prerequisite for edit-config to prevent concurrent modifications but is itself a separate administrative action that does not retrieve configuration data. Confusing these operations leads to significant errors in automation scripts, where attempting to modify data via a read-only call would result in protocol errors or silent failures depending on the implementation.
Execution Occurs at the Protocol Session Layer Before Commit
The get-config operation takes effect at the session layer of the NETCONF protocol stack, immediately after the session is established and authentication is complete. Unlike edit-config, which may require a lock and a commit phase to ensure atomicity, get-config executes synchronously and returns the result directly to the caller. The processing happens within the NETCONF server daemon on the network device, which parses the incoming XML request, evaluates the datastore filters, and constructs the response XML. This immediate execution model makes get-config ideal for real-time monitoring and validation tasks where latency must be minimized. The operation does not interact with the commit engine or the configuration database transaction log unless necessary for consistency checks. Understanding this timing helps engineers optimize their automation workflows by batching read operations or using parallel sessions to reduce overhead when gathering large amounts of configuration data across multiple devices.
Official Reference
https://www.rfc-editor.org/rfc/rfc6241.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
When answering NETCONF questions, always distinguish between read-only operations (get, get-config, get-schema) and mutative operations (edit-config, copy-config, discard-commit). If an option involves changing the configuration structure, it cannot be get-config. Focus on whether the action alters the datastore or merely inspects it. Memorize the three standard datastores (running, candidate, startup) as they are frequently tested in conjunction with get-config filtering capabilities.
Related Analysis
Practice All 300-435 Questions
Access 150 questions with complete answers and detailed explanations.
View Full 300-435 Practice Test →