Octet

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

IETFOpenConfigNative
Written byIETF working groupsOperator consortiumVendor
CoverageBasic building blocksBroad for common features, grows each yearEverything the OS supports
PortabilityHighHigh, within each vendor's supportNone
StyleConfig and state in separate or NMDA treesconfig and state containers under each nodeMirrors the CLI
Typical transportNETCONF, RESTCONFgNMI, also NETCONFAll

What the paths look like

Output
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]/description

Cisco 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.

Traps

  • Assuming "OpenConfig supported" means every leaf works. Check the vendor's deviations for your release.
How did you do?