What is the difference between native, OpenConfig and IETF YANG models? Which do you use?
Show the answer
Say this first
IETF models are standards (ietf-interfaces, ietf-ip, ietf-routing) and are vendor neutral but cover a limited set of features. OpenConfig models are written by operators such as Google and Microsoft, are vendor neutral, and pair config with operational state for streaming telemetry. Native models come from the vendor (Cisco-IOS-XE-native, the Junos configuration schema) and cover every feature, but only on that platform. I use OpenConfig or IETF where coverage is good and fall back to native for the gaps.
Go deeper
Side by side
| IETF | OpenConfig | Native | |
|---|---|---|---|
| Written by | IETF working groups | Operator consortium | Vendor |
| Coverage | Basic building blocks | Broad for common features, grows each year | Everything the OS supports |
| Portability | High | High, within each vendor's support | None |
| Style | Config and state in separate or NMDA trees | config and state containers under each node | Mirrors the CLI |
| Typical transport | NETCONF, RESTCONF | gNMI, also NETCONF | All |
What the paths look like
IETF: /interfaces/interface[name=GigabitEthernet1]/description
OpenConfig: /interfaces/interface[name=Ethernet1]/config/description
/interfaces/interface[name=Ethernet1]/state/counters/in-octets
IOS-XE: /native/interface/GigabitEthernet[name=1]/descriptionCisco operational models
IOS-XE also ships -oper models for state, for example Cisco-IOS-XE-interfaces-oper and
Cisco-IOS-XE-process-cpu-oper. IOS XR splits native models into -cfg and -oper.
The practical rule
A multi-vendor shop gets the most from OpenConfig, especially for telemetry. But vendors implement OpenConfig at different depths and publish deviations, so test each model on each platform and release before you build on it.
They will ask next
Why would a mostly Cisco shop still use native models?
Coverage and fidelity. Native models map one to one to the CLI the team already knows, include every feature, and behave predictably on that OS. The cost is that the code is not portable.
Traps
- Assuming "OpenConfig supported" means every leaf works. Check the vendor's deviations for your release.