rfc-8343

A YANG Data Model for Interface Management

M. Bjorklund
date2018-03 streamIETF areaops wgnetmod statusPROPOSED STANDARD pages49 canonicalhttps://www.rfc-editor.org/rfc/rfc8343 doi10.17487/RFC8343
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 definitions for configuration and system state (status information and counters for the collection of statistics). The YANG data model in this document conforms to the Network Management Datastore Architecture (NMDA) defined in RFC 8342. This document obsoletes RFC 7223.

obsoletes

Extracted elements (24)

design-rationale §4

Only 64-bit counters are provided in the statistics container, unlike the IF-MIB which defines both 32-bit and 64-bit versions. The rationale is that today's implementations generally support high-speed interfaces (>20 Mbps) where 64-bit counters are needed, making the 32-bit variants redundant.

yang, netconf, snmp

design-rationale §2

The data model uses a simple flat list of interfaces rather than a hierarchical structure, to facilitate mapping to existing proprietary native data models and to make interface references as simple as possible (a single leafref). Interface layering is expressed through read-only 'higher-layer-if' and 'lower-layer-if' leaf-lists rather than a generic configurable hierarchy.

yang, netconf

design-rationale §2

The model supports pre-provisioning of interface configuration (configuring an interface before its hardware is present) as an optional capability advertised via the 'pre-provisioning' feature. This is recommended for devices supporting dynamic addition/removal of physical interfaces, but cannot be assumed in all cases due to OS and hardware constraints.

yang, netconf

design-rationale §3.3

There is intentionally no generic mechanism in 'ietf-interfaces' for configuring interface layering. Interface-type-specific models are expected to define their own layering data nodes using 'interface-ref' types, allowing type-appropriate constraints (e.g., a bonding slave must be of type 'ethernetCsmacd').

yang, netconf

interoperability-note §4

The IF-MIB allows two ifEntries to share the same ifName; devices supporting this feature cannot maintain a 1-1 mapping between the 'name' leaf and ifName. Additionally, ifMtu, ifDescr, ifConnectorPresent, and ifPromiscuousMode are not mapped to 'ietf-interfaces' and are expected to be provided by interface-type-specific augmenting modules.

yang, netconf, snmp

interoperability-note §1.1

The '/interfaces-state' subtree with 'config false' data nodes from RFC 7223 is deprecated in this revision; all 'config false' data nodes are now present in the '/interfaces' subtree in conformance with the NMDA architecture (RFC 8342).

yang, netconf

interoperability-note §4

This document maps YANG data nodes to IF-MIB objects: 'name'→ifName, 'type'→ifType, 'description'→ifAlias, 'admin-status'→ifAdminStatus, 'oper-status'→ifOperStatus, 'if-index'→ifIndex, 'phys-address'→ifPhysAddress, 'higher-layer-if'/'lower-layer-if'→ifStackTable, 'speed'→ifSpeed/ifHighSpeed, and all statistics counters to their HC (64-bit) IF-MIB counterparts.

yang, netconf, snmp

normative-requirement §5 MUST

If a client tries to create configuration for a system-controlled interface not present in the operational state and the implementation does not support pre-provisioning, a NETCONF server MUST reply with an rpc-error with the 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 (unsupported type or type mismatch with name), the server MUST reject the request; a NETCONF server MUST reply with an rpc-error with the error-tag 'invalid-value'.

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.1 MUST

If the server does not advertise the 'arbitrary-names' feature, the names of user-controlled interfaces MUST match the device's naming scheme.

yang, netconf

normative-requirement §3.2 SHOULD

Other YANG modules SHOULD use the 'interface-ref' typedef when they need to reference an interface, ensuring consistent referencing across data models.

yang, netconf

normative-requirement §1.1 MAY

Servers that do not implement NMDA, or that wish to support clients that do not implement NMDA, MAY implement the deprecated '/interfaces-state' tree.

yang, netconf

protocol-element §5

The 'discontinuity-time' mandatory leaf (yang:date-and-time) in the statistics container records the most recent time any counter on the interface suffered a discontinuity; if no discontinuity since last management subsystem re-initialization, it contains the re-initialization time. Consumers must check this value before computing counter deltas.

yang, netconf

protocol-element §5

The 'enabled' leaf (boolean, default true) represents the configured desired state of the interface. Systems implementing IF-MIB map this to ifAdminStatus ('up' when true, 'down' when false). The 'admin-status' leaf (if-mib feature) is a read-only reflection of the same value from the operational state.

yang, netconf

protocol-element §3

The 'ietf-interfaces' YANG module defines a flat list '/interfaces/interface' keyed by 'name', with a mandatory 'type' leaf (identityref based on 'interface-type' identity). Each entry carries configuration leaves (enabled, description, link-up-down-trap-enable) and read-only state leaves (admin-status, oper-status, last-change, if-index, phys-address, higher-layer-if, lower-layer-if, speed, statistics).

yang, netconf

protocol-element §3.2

The 'interface-ref' typedef is a leafref to '/if:interfaces/if:interface/if:name' and is the standard type other YANG modules should use when referencing an interface by name.

yang, netconf

protocol-element §5

The 'link-up-down-trap-enable' leaf (if-mib feature, enumeration: enabled=1/disabled=2) controls whether linkUp/linkDown SNMP notifications are generated. If unconfigured, 'enabled' is operationally used for interfaces with no lower-layer-if entries, and 'disabled' otherwise.

yang, netconf, snmp

protocol-element §5

The 'statistics' container under each interface entry is read-only (config false) and contains a mandatory 'discontinuity-time' leaf (yang:date-and-time), 64-bit counters 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 for in-discards, in-errors, in-unknown-protos, out-discards, out-errors.

yang, netconf

protocol-element §5

Three YANG features gate optional behavior: 'arbitrary-names' (device allows freely named user-controlled interfaces), 'pre-provisioning' (interface config may be added before hardware is present), and 'if-mib' (device implements the IF-MIB, enabling admin-status, if-index, and link-up-down-trap-enable nodes).

yang, netconf

registry §6

This document registers URI 'urn:ietf:params:xml:ns:yang:ietf-interfaces' in the IETF XML Registry (RFC 3688) as an XML namespace, and registers the YANG module named 'ietf-interfaces' (prefix 'if') in the YANG Module Names registry (RFC 6020).

registry, yang, netconf

security-consideration §7

The '/interfaces/interface' list and '/interfaces/interface/enabled' leaf are writable and considered sensitive: unauthorized write access could cause the device to ignore packets it should receive and process, disrupting network operations.

security, yang, netconf

security-consideration §7

The YANG module is accessed via NETCONF or RESTCONF; the mandatory-to-implement secure transport for NETCONF is SSH (RFC 6242) and for RESTCONF is TLS (RFC 5246). The NETCONF Access Control Model (RFC 8341) must be used to restrict access to authorized users.

security, yang, netconf, tls

state-machine §5

The 'oper-status' leaf defines seven operational states: up (passing packets), down (not passing packets), testing (test mode, no operational traffic), unknown (status indeterminate), dormant (waiting for external event), not-present (hardware component missing), and lower-layer-down (down due to lower-layer interface state).

yang, netconf