Purpose of NETCONF lock/unlock Operations
Short answer
A NETCONF <lock> places an exclusive datastore lock so no other session can modify the configuration during critical operations.
Question
Key Takeaways
The NETCONF <lock> and <unlock> operations exist to prevent concurrent configuration changes by giving one session exclusive ownership of a datastore during critical operations. Option A is correct because locking blocks other sessions' edit-config attempts outright, while encryption, authentication and logging belong to SSH, session establishment and audit facilities respectively. A lock is per-datastore, so it must be explicitly released even after a failed edit.
Expert Analysis
Lock/unlock prevents other sessions from modifying the datastore during critical operations.
The <lock> operation is a NETCONF protocol operation, defined in RFC 6241, that places an exclusive lock on a datastore (running, candidate, or startup) so that a single session owns it for the duration of a critical change. In this question the deciding constraint is concurrency: while one session holds the lock, any other session attempting to <edit-config> on that datastore receives a 'lock denied' error, which is exactly what option A, "Prevents concurrent config changes during operations," describes. The purpose is therefore mutual exclusion across sessions, not protection of the transport or of the operator's identity.
Option B, "Encrypts traffic," fails because encryption is a property of the transport layer beneath NETCONF. NETCONF commonly runs over SSH (port 830), and that SSH channel supplies confidentiality; the <lock> RPC itself carries no cryptographic function, and locking the datastore has no effect on whether packets on the wire are readable. Option C, "Authenticates user," also fails: authentication happens when the SSH (or TLS) session is established, before any NETCONF hello exchange occurs, and an unauthenticated client never reaches the point of issuing <lock>. Option D, "Logs access," fails because <lock>/<unlock> is a datastore-consistency mechanism, not an audit facility; while a server may log that a lock was taken, logging is incidental to the operation rather than its purpose, and the protocol offers no logging semantics through <lock>.
A mechanism this question relies on but never states: a successful <lock> is scoped to a specific datastore, and locking one does not protect the others. Using this scenario's entities as the example, a session that locks the candidate datastore still allows another session to edit the running datastore directly, because the lock is per-datastore, not per-device. That is why in practice an operator performing a candidate-then-commit sequence on an IOS XE device must lock the candidate datastore, make the edits, commit, and then <unlock> — and why a <unlock> is mandatory even after an <edit-config> failure, since a leaked lock blocks every other automation pipeline (Ansible, ncclient scripts, controller-driven jobs) until the session closes or the lock is released. The lock also fails fast rather than queueing: a second session does not wait, it errors immediately, which is what makes option A's "prevents concurrent changes" precise rather than merely "delays" them.
The correct option therefore holds under this scenario's constraints because the question asks for the purpose of the operation itself, and mutual exclusion during operations is that purpose; the other three options each attribute to <lock>/<unlock> a function that belongs to SSH, to session establishment, or to audit logging, none of which the lock operation performs.
Official Reference
https://www.rfc-editor.org/rfc/rfc6241
This link opens the official vendor documentation in a new tab.
Exam Strategy
On protocol-operation questions, attribute each function to its correct layer: confidentiality comes from SSH/TLS, identity from session authentication, and consistency from datastore operations like lock/unlock. When an option names a purpose the operation cannot technically perform (encrypt, authenticate, log), eliminate it before judging the remaining candidate. Apply the same layering test to candidate vs running datastore semantics in related 300-435 items.
Related Analysis
Practice All 300-435 Questions
Access 150 questions with complete answers and detailed explanations.
View Full 300-435 Practice Test →