A YANG Data Model for Layer 3 Topologies
Extracted elements (22)
Notifications include the full attribute data of the affected node, link, prefix, or termination point—making them larger than strictly necessary—to avoid the need for subsequent retrieval of context information that might have changed in the meantime.
The interface-name leaf in l3-termination-point-attributes cannot use the interface-ref data type from RFC 8343 directly because that type references interfaces in a single node's datastore, whereas this model needs to uniquely reference interfaces across an entire network.
The model is intentionally protocol-independent and separate from routing protocol configuration models (e.g., ietf-routing, ietf-rib-extension). Traffic Engineering Database (TED) information is out of scope and left to a separate model (YANG-TE).
The model uses identity-based flag types (identityref with base flag-identity) for all flag attributes at topology, node, link, and prefix levels, so that augmenting modules can introduce additional flag values without modifying the base module.
The 'ietf-l3-unicast-topology' module is designed for NMDA-compliant implementations (RFC 8342). A companion module 'ietf-l3-unicast-topology-state' is provided in Appendix A for implementations that do not support NMDA; this state module augments the -state variants of the base modules and contains only read-only data nodes.
The model complies with RFC 8242 ephemeral state requirements: for ephemeral topology data that is server-provided, the process maintaining topology information loads data from the routing process (e.g., OSPF) into the data model without relying on a configuration datastore.
The unnumbered-id in l3-termination-point-attributes corresponds to the ifIndex value of the interface as defined in the Interfaces Group MIB (RFC 2863) for implementations that support it.
The companion module 'ietf-l3-unicast-topology-state' SHOULD NOT be supported by implementations that support NMDA.
Four notifications are defined: l3-node-event, l3-link-event, l3-prefix-event, and termination-point-event. Each carries an l3-event-type (add, remove, or update), a reference to the affected element, and the element's full attribute set to avoid subsequent retrieval.
The example OSPF topology extension (Appendix B) illustrates how to augment ietf-l3-unicast-topology: it introduces an ospf topology type, an area-id attribute on the topology, router-type (abr, asbr, internal, pseudonode) and dr-interface-id attributes on nodes, and ospf-link-attributes on links.
The flag-identity base identity and associated typedefs (l3-flag-type, node-flag-type, link-flag-type, prefix-flag-type) are all identityref types, allowing augmenting modules to introduce additional flags via new identities without revising this module.
The l3-event-type typedef is an enumeration with three values: 'add' (element added), 'remove' (element removed), and 'update' (element updated), used in all four notification types.
The l3-link-attributes grouping adds a link name (string), link flags, metric1 (uint64), and metric2 (uint64) to topology links.
The l3-node-attributes grouping adds a domain-name, a set of node flags, one or more router-ids (rt-types:router-id), and a list of IP prefixes (each with an inet:ip-prefix, a uint32 metric, and prefix flags) to network nodes.
The l3-termination-point-attributes grouping adds a choice of three termination point types: ip (leaf-list of inet:ip-address), unnumbered (uint32 unnumbered-id corresponding to ifIndex per RFC 2863), or interface-name (string).
The l3-topology-attributes grouping adds a topology name (string) and a set of flags (leaf-list of l3-flag-type identityref) to the network level.
The YANG module 'ietf-l3-unicast-topology' augments the base network topology model (RFC 8345) with Layer 3 Unicast-specific attributes for networks, nodes, links, and termination points, plus notification events for each topology element type.
Two XML namespace URIs are registered in the IETF XML Registry (RFC 3688): 'urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology' and 'urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology-state'.
Two YANG modules are registered in the YANG Module Names registry (RFC 6020): 'ietf-l3-unicast-topology' (prefix l3t) and 'ietf-l3-unicast-topology-state' (prefix l3t-s), both referencing RFC 8346.
Access to the YANG modules MUST be via NETCONF over SSH (mandatory secure transport per RFC 6242) or RESTCONF over HTTPS/TLS (RFC 5246), and access control MUST use the NETCONF access control model (RFC 8341) to restrict operations and content to authorized users.
In NMDA-compliant servers, L3 Unicast topology data is typically ephemeral and system-controlled, residing only in <operational> as read-only data, which reduces vulnerability. However, the model does in principle allow configurable topology information.
Several writable data nodes (l3-topology-attributes, l3-node-attributes including router-id and prefix, l3-link-attributes including metrics, and l3-termination-point-attributes including IP address) are sensitive: unauthorized write operations could sabotage network configuration and negatively affect network operations.