NETCONF & RESTCONF Explained
NETCONF and RESTCONF are protocols for configuring network devices programmatically using structured YANG data models — replacing fragile CLI-scraping with reliable, schema-defined access. NETCONF is XML-based and transaction-safe; RESTCONF is a simpler REST/HTTP-based interface to the same models.
The role of YANG
Both protocols operate on YANG models — formal schemas describing exactly what data a device exposes and how it's structured. This is the key advance: instead of guessing at CLI output formats, automation reads a defined model. Change validation, structure and meaning are all explicit.
NETCONF vs RESTCONF
| NETCONF | RESTCONF | |
|---|---|---|
| Transport | SSH | HTTPS |
| Encoding | XML | JSON or XML |
| Transactions | Yes (commit/rollback) | Simpler, per-request |
| Best for | Complex, atomic changes | Simpler REST-style access |
Why it matters
These are the "proper" successors to CLI automation — NETCONF's transaction support means a multi-part change either fully applies or cleanly rolls back (no half-configured device). They're central to controller-based networking and appear in the CCNP ENCOR automation blueprint. Reached via Python libraries like ncclient.
Frequently asked questions
What is NETCONF?
An XML-based, SSH-transported protocol for configuring network devices using YANG data models, with transaction support for safe, atomic changes.
What is the difference between NETCONF and RESTCONF?
NETCONF uses SSH/XML with full transaction (commit/rollback) support for complex changes; RESTCONF uses HTTPS with JSON/XML in a simpler REST style for more straightforward access.
What is YANG?
A data-modelling language that formally describes the structure of configuration and operational data a device exposes — the schema NETCONF and RESTCONF operate on.
Why use NETCONF over CLI scripting?
NETCONF offers structured, schema-validated data and transactional changes that fully apply or cleanly roll back — far more reliable than parsing CLI text output.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.