rfc-7223

A YANG Data Model for Interface Management

M. Bjorklund
date2014-05 streamIETF areaops wgnetmod statusPROPOSED STANDARD pages39 canonicalhttps://www.rfc-editor.org/rfc/rfc7223 doi10.17487/RFC7223 errataview
This document defines a YANG data model for the management of network interfaces. It is expected that interface-type-specific data models augment the generic interfaces data model defined in this document. The data model includes configuration data and state data (status information and counters for the collection of statistics).

obsoleted by

Extracted elements (24)

design-rationale §2

A flat list of interfaces (rather than a hierarchical structure) was chosen to keep the data model simple, facilitate mapping to proprietary native data models, and to allow references by a single leafref. The model supports both physical and logical interfaces in the same flat list.

yang, netconf

design-rationale §3.1

Configuration data and operational state data are kept in separate lists ('/interfaces/interface' and '/interfaces-state/interface') rather than merged, enabling clear separation between desired configuration and actual runtime state. System-controlled interfaces always appear in the state list whether configured or not.

yang, netconf

design-rationale §4

Only 64-bit counters (yang:counter64) are provided in this data model, unlike the IF-MIB which provides both 32-bit and 64-bit versions. This is because today's implementations generally support high-speed interfaces (>20 Mbps) for which 32-bit counters were insufficient.

yang, netconf

design-rationale §3.3

There is no generic mechanism for configuring interface layering; each interface-type-specific model defines its own layering data nodes using 'interface-ref' types. Two generic read-only leaf-lists ('higher-layer-if' and 'lower-layer-if') provide a unified view of the layering hierarchy regardless of the type-specific configuration method.

yang, netconf

interoperability-note §4

ifMtu and ifDescr/ifConnectorPresent from the IF-MIB are intentionally not mapped to the 'ietf-interfaces' module. MTU is expected to be provided by interface-type-specific augmenting modules.

yang, netconf, snmp

interoperability-note §4

The 'description' leaf may be mapped to ifAlias in implementations. Implementers must handle differences in value space and persistence between this leaf and ifAlias; the IF-MIB defines ifAlias to be stored in non-volatile storage.

yang, netconf, snmp

interoperability-note §4

The IF-MIB allows two different ifEntries to have the same ifName. Devices that support this feature and also support the ietf-interfaces data model cannot have a 1-1 mapping between the 'name' leaf and ifName, creating a compatibility constraint.

yang, netconf, snmp

normative-requirement §5 MUST

If a client tries to create configuration for a system-controlled interface not present in '/interfaces-state/interface', the server MAY reject the request if it does not support pre-provisioning or if the name can never exist; in that case, a NETCONF server MUST reply with an rpc-error with error-tag 'invalid-value'.

yang, netconf

normative-requirement §5 MUST

If a client tries to set the interface type to a value that can never be used by the system, the server MUST reject the request and a NETCONF server MUST reply with an rpc-error with the error-tag 'invalid-value'.

yang, netconf

normative-requirement §3.1 MUST

If the 'arbitrary-names' feature is not advertised, the names of user-controlled interfaces MUST match the device's naming scheme. A client cannot assume arbitrary naming is supported.

yang, netconf

normative-requirement §4 MUST

If the device implements the IF-MIB, the 'if-index' leaf MUST contain the value of the corresponding ifEntry's ifIndex.

yang, netconf, snmp

normative-requirement §3.2 SHOULD

Other YANG modules SHOULD use the 'interface-ref' and 'interface-state-ref' typedefs when referencing a configured or operationally used interface, respectively.

yang, netconf

normative-requirement §5 MUST

When a server maps 'description' to ifAlias and the device supports ':startup', reading ifAlias MUST return the value of 'description' in the 'startup' datastore, and writing ifAlias MUST write to both 'running' and 'startup' datastores. If ':startup' is not supported, ifAlias MUST be mapped to the 'description' leaf in the 'running' datastore.

yang, netconf

protocol-element §5

Each configured interface entry under '/interfaces/interface' has leaves: 'name' (string, key), 'description' (optional string), 'type' (mandatory identityref based on interface-type identity), 'enabled' (boolean, default true), and 'link-up-down-trap-enable' (enumeration, if-mib feature only).

yang, netconf

protocol-element §5

Each operational interface entry under '/interfaces-state/interface' has leaves: 'name', 'type', 'admin-status' (up/down/testing), 'oper-status' (up/down/testing/unknown/dormant/not-present/lower-layer-down), 'last-change', 'if-index', 'phys-address', 'higher-layer-if', 'lower-layer-if', 'speed', and a 'statistics' container.

yang, netconf

protocol-element §3

The 'ietf-interfaces' YANG module defines two top-level containers: '/interfaces' (config true) holding the list of configured interfaces keyed by name, and '/interfaces-state' (config false) holding the operational state of all interfaces including counters. Interface-type-specific models are expected to augment these lists.

yang, netconf

protocol-element §5

The 'statistics' container under '/interfaces-state/interface' provides read-only 64-bit counters (yang:counter64) for in-octets, in-unicast-pkts, in-broadcast-pkts, in-multicast-pkts, out-octets, out-unicast-pkts, out-broadcast-pkts, out-multicast-pkts, and 32-bit counters (yang:counter32) for in-discards, in-errors, in-unknown-protos, out-discards, out-errors. A mandatory 'discontinuity-time' leaf marks when counters last reset.

yang, netconf

protocol-element §5

Three YANG features are defined: 'arbitrary-names' (device allows arbitrarily named user-controlled interfaces), 'pre-provisioning' (device supports configuring interfaces whose hardware is not yet present), and 'if-mib' (device implements the IF-MIB, RFC 2863). Feature advertisement occurs in the NETCONF <hello> message.

yang, netconf

protocol-element §5

Two typedefs are defined: 'interface-ref' (leafref to /interfaces/interface/name) for referencing configured interfaces, and 'interface-state-ref' (leafref to /interfaces-state/interface/name) for referencing operationally present interfaces. Other YANG modules should use these when referencing interfaces.

yang, netconf

registry §6

This document registers the URI 'urn:ietf:params:xml:ns:yang:ietf-interfaces' in the IETF XML Registry (RFC 3688) as an XML namespace.

registry, yang

registry §6

This document registers the YANG module 'ietf-interfaces' in the YANG Module Names registry (RFC 6020) with namespace 'urn:ietf:params:xml:ns:yang:ietf-interfaces' and prefix 'if'.

registry, yang

security-consideration §7

The YANG module is designed to be accessed via NETCONF; the mandatory-to-implement secure transport is SSH (RFC 6242). The NETCONF access control model (RFC 6536) provides means to restrict access to NETCONF operations and content.

security, netconf, yang

security-consideration §7

Unauthorized write access to '/interfaces/interface' or '/interfaces/interface/enabled' could cause the device to ignore packets it should receive and process, negatively impacting network operations. These writable nodes must be protected appropriately.

security, netconf, yang

state-machine §5

The 'oper-status' leaf defines seven states: 'up' (ready to pass packets), 'down' (not passing packets), 'testing' (in test mode), 'unknown' (status cannot be determined), 'dormant' (waiting for external event), 'not-present' (hardware missing), and 'lower-layer-down' (down due to lower-layer interface state). These mirror ifOperStatus from IF-MIB.

yang, netconf