Skip to main content

NETCONF and YANG: Automating Networks with Data Models

·2 min read·295 words

NETCONF (RFC 6241) + YANG (RFC 7950) are the modern standards for programmatic multi-vendor configuration. NETCONF is a protocol (XML/SSH), while YANG is a data modeling language. They are natively supported by Cisco IOS-XE/NX-OS, Juniper Junos, Arista EOS, and Nokia. They are gradually replacing CLI parsing.

Why NETCONF/YANG

  • CLI parsing is fragile (syntax changes break scripts)
  • NETCONF uses structured XML for reliable parsing
  • YANG provides schemas for validation before deployment
  • Atomic transactions (commit/rollback)
  • Multi-vendor standard

NETCONF

  • Transport: SSH port 830 or TLS 6513
  • Payload: structured XML
  • Operations: get, get-config, edit-config, copy-config, delete-config, lock, unlock, close, kill, commit
  • Candidate/running/startup datastores
  • Capability advertisement

YANG

  • Modeling language (similar to JSON Schema)
  • Hierarchical structure: containers, lists, leaves
  • Types: string, int, boolean, enum
  • Standards: OpenConfig (multi-vendor), IETF, vendor-specific (Cisco-YANG, Junos-YANG)
  • Version: YANG 1.1 (RFC 7950)

OpenConfig: multi-vendor standard

  • Consortium: Google, Microsoft, Apple, and network operators
  • Cross-vendor models: interfaces, BGP, routing, LLDP
  • Used by Cisco, Arista, Juniper, and Nokia
  • Vision: write-once, run-anywhere automation

NETCONF + Python (ncclient) example

  • from ncclient import manager
  • with manager.connect(host='10.0.0.1', port=830, username='admin', password='pass', hostkey_verify=False) as m:
  • config = m.get_config(source='running').data_xml
  • print(config)

gNMI

  • gRPC Network Management Interface: a modern gRPC-based alternative
  • Higher performance than NETCONF/XML
  • Native streaming telemetry
  • Supported by Cisco IOS-XE 16.10+, Arista, and Nokia
  • Growing adoption in 2026

Streaming telemetry

  • Push model: the device sends metrics regularly
  • Replaces SNMP polling
  • Transport: gNMI, gRPC, Kafka
  • Collectors: Prometheus, InfluxDB, Grafana

Tools

  • ncclient (Python): NETCONF library
  • pyang: YANG model validation
  • pyangbind: YANG → Python objects
  • gnmic: gNMI CLI client
  • gnxi: gNMI + gNOI from Google

Adoption in France in 2026

  • ISPs/network operators: mature NETCONF + OpenConfig adoption
  • Large enterprises: migration underway
  • SMEs and mid-sized companies: still using CLI + Netmiko/Ansible
  • Evolution: slow but inevitable

Order from OPTINOC

NETCONF/YANG + gNMI training. Streaming telemetry deployment. OpenConfig integration. Quote within 48 hours.

Frequently Asked Questions

Reply within 2 business hours

Need a quote?

Our technical team responds within 2 business hours. European delivery 24-72h.

Request a quote