NETCONF et YANG : automatiser le réseau avec des modèles de données
NETCONF (RFC 6241) + YANG (RFC 7950) sont les standards modernes pour configuration programmatique multi-vendor. NETCONF = protocole (XML/SSH), YANG = langage modèles de données. Supportés nativement Cisco IOS-XE/NX-OS, Juniper Junos, Arista EOS, Nokia. Remplace progressivement CLI parsing.
Pourquoi NETCONF/YANG
- Parsing CLI = fragile (changements syntaxe casse scripts)
- NETCONF = XML structuré = parsing fiable
- YANG = schéma = validation avant push
- Transactions atomiques (commit/rollback)
- Standard multi-vendor
NETCONF
- Transport : SSH port 830 ou TLS 6513
- Payload : XML structured
- Operations : get, get-config, edit-config, copy-config, delete-config, lock, unlock, close, kill, commit
- Candidate/running/startup datastores
- Capabilities advertisement
YANG
- Langage de modélisation (comme JSON Schema)
- Hiérarchique : 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 : standard multi-vendor
- Consortium : Google, Microsoft, Apple, opérateurs
- Modèles cross-vendor : interfaces, BGP, routing, LLDP
- Utilisé Cisco, Arista, Juniper, Nokia
- Vision : automation 'write once, run anywhere'
Exemple NETCONF + Python (ncclient)
- 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 : alternative moderne basée gRPC
- Plus performant que NETCONF/XML
- Streaming telemetry natif
- Supporté Cisco IOS-XE 16.10+, Arista, Nokia
- Adoption croissante 2026
Streaming telemetry
- Push model : device envoie metrics régulièrement
- Remplace SNMP polling
- Transport : gNMI, gRPC, Kafka
- Collecteurs : Prometheus, InfluxDB, Grafana
Tools
- ncclient (Python) : NETCONF library
- pyang : validation YANG models
- pyangbind : YANG → Python objects
- gnmic : gNMI CLI client
- gnxi : gNMI + gNOI from Google
Adoption en France 2026
- ISP/opérateurs : NETCONF + OpenConfig mature
- Grands comptes : migration en cours
- PME/ETI : encore CLI + Netmiko/Ansible
- Évolution : lente mais inévitable
Commander chez OPTINOC
Formation NETCONF/YANG + gNMI. Déploiement streaming telemetry. Intégration OpenConfig. Devis sous 48h.
