Concepts / Automation and APIs

Automation and APIs

NETCONF and YANG

Also called NETCONF, YANG, YANG model, get-config, edit-config

A device's config as data: YANG models say what it may hold, and NETCONF reads and changes it as XML over SSH.

An edit is checked against the model, then committed
An edit is checked against the model, then committed

NETCONF sends each change as XML over SSH. The router checks it against its YANG model, and with a candidate datastore nothing runs until the commit.

NETCONF reads and changes a device's config as XML over SSH, on port 830. YANG is its schema language: a model such as ietf-interfaces says which settings exist and which values each may take. <get-config> reads a datastore (running, or a candidate draft), <edit-config> changes one and is refused whole if a value breaks the model, <commit> makes the candidate live. RESTCONF serves the same data over HTTP.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab