A YANG Data Model for Routing Management
obsoleted by
- rfc-8349 — A YANG Data Model for Routing Management (NMDA Version)
Extracted elements (26)
System-controlled and user-controlled list entries are distinguished: system-controlled entries are created by the server independently in state data, while user-controlled entries are created/deleted as a direct consequence of configuration changes. Deleting a user-controlled config entry removes the state entry; deleting a system-controlled config entry only removes supplemental config, leaving the state entry intact.
The 'valid-lifetime' and 'preferred-lifetime' prefix advertisement parameters are specified with constant (non-decrementing) values rather than real-time countdown, because no implementation is known to use decrementing behavior and values could be unexpectedly reset to higher configured values after configuration reload.
The 'ietf-ipv6-router-advertisements' submodule augments both 'ietf-interfaces' (RFC 7223) and 'ietf-ip' (RFC 7277) modules. The 'IsRouter' flag required by RFC 4861 is implemented via the 'ip:forwarding' leaf in ietf-ip rather than in this module.
Configuration of IPv4 or IPv6 addresses and network prefixes on an enabled interface MUST result in immediate creation of the corresponding direct route, with the destination prefix set per the configured IP address and network prefix/mask.
Every implementation of the core routing data model MUST provide exactly one instance of the 'direct' pseudo-protocol type, which is the source of direct routes for all configured address families.
For every supported address family, exactly one RIB MUST be marked as the default RIB to which control-plane protocols place their routes by default.
If '/if:interfaces/if:interface/if:enabled' is set to false, all routing and forwarding functions MUST be disabled on that interface. Similarly, setting 'ip:ipv4/ip:enabled' or 'ip:ipv6/ip:enabled' to false MUST disable all IPv4 or IPv6 routing and forwarding on that interface.
If 'ip:ipv4/ip:forwarding' or 'ip:ipv6/ip:forwarding' is set to false for a network-layer interface, the forwarding of datagrams through that interface MUST be disabled, though the interface MAY still participate in routing protocol functions.
Protocol-specific data nodes added by augmenting modules SHOULD use a 'when' statement so they are conditional on the 'rt:type' value matching the new protocol's identity, and SHOULD be encapsulated in a named container with presence.
The 'default-lifetime' for Router Advertisements MUST be either zero or between max-rtr-adv-interval and 9000 seconds. If not configured, the device SHOULD use a value of 3 * max-rtr-adv-interval.
The 'min-rtr-adv-interval' MUST NOT be greater than 75% of 'max-rtr-adv-interval', as enforced by a YANG must statement.
The 'preferred-lifetime' of an advertised prefix MUST NOT be greater than 'valid-lifetime', as enforced by a YANG must statement.
When defining a new control-plane protocol in an augmenting module, a new identity MUST be defined with base set to 'rt:control-plane-protocol', and additional route attributes MUST be inserted by augmenting the route data nodes in routing-state.
A route entry in the RIB has three minimal attributes: 'destination-prefix' (mandatory address prefix), 'route-preference' (uint32 administrative distance; lower value = more preferred), and 'next-hop' (outgoing interface and/or next-hop address, or special operation).
A Routing Information Base (RIB) is represented as an entry of '/routing-state/ribs/rib' and contains only routes of one address family (an identity derived from 'rt:address-family'). The 'active-route' action returns the active RIB route for a given destination address.
Control-plane protocol instances are keyed by 'type' (an identityref derived from 'rt:control-plane-protocol') and 'name'. Two built-in pseudo-protocol identities are defined: 'direct' (routes to directly connected networks) and 'static' (manually configured routes).
The 'ietf-ipv4-unicast-routing' module augments the core routing model with IPv4-specific fields: 'destination-prefix' (inet:ipv4-prefix) on route entries, 'next-hop-address' (inet:ipv4-address) on simple-next-hop and next-hop-list cases, and 'destination-address' input to the active-route action.
The 'ietf-ipv6-router-advertisements' submodule defines configuration and state for IPv6 Router Advertisement parameters including send-advertisements, max/min-rtr-adv-interval (4–1800s / 3–1350s), managed-flag, other-config-flag, link-mtu, reachable-time (0–3600000ms), retrans-timer, cur-hop-limit, default-lifetime (0–9000s), and a prefix-list with valid-lifetime, on-link-flag, preferred-lifetime, and autonomous-flag per prefix.
The 'ietf-ipv6-unicast-routing' module augments the core routing model with IPv6-specific fields analogous to the IPv4 module, and includes the 'ietf-ipv6-router-advertisements' submodule that augments ietf-interfaces and ietf-ip with IPv6 RA configuration per RFC 4861.
The 'ietf-routing' YANG module defines the generic components of a routing system including routes, RIBs, and control-plane protocols. It provides the core routing data model framework intended to be augmented by additional modules for specific protocols and address families.
The 'multiple-ribs' feature indicates server support for user-defined RIBs per address family. Servers not advertising this feature SHOULD provide exactly one system-controlled RIB per supported address family as the default RIB.
The 'next-hop-content' grouping provides a choice with three cases for next hops in static routes: 'simple-next-hop' (outgoing interface, augmented with address by AF modules), 'special-next-hop' (blackhole/unreachable/prohibit/receive), and 'next-hop-list' (multiple next hops with index key).
The 'route-metadata' grouping defines common state-data route attributes: 'source-protocol' (mandatory identityref to routing-protocol), 'active' (empty leaf indicating preferred route for the destination prefix), and 'last-updated' (yang:date-and-time timestamp).
The 'routing-state' container (config false) holds state data for the routing subsystem, including router-id, interfaces, control-plane-protocols, and ribs lists. The 'routing' container holds configuration data with corresponding structure.
This document registers three YANG module namespace URIs in the IETF XML Registry and three YANG modules plus one submodule in the YANG Module Names registry: ietf-routing (prefix rt), ietf-ipv4-unicast-routing (prefix v4ur), ietf-ipv6-unicast-routing (prefix v6ur), and submodule ietf-ipv6-router-advertisements.
Configuration and state data conforming to the core routing data model should be accessed via a secure transport such as NETCONF with the NETCONF access control model (RFC 6536) to restrict access. Unauthorized write access to '/routing/control-plane-protocols/control-plane-protocol' or '/routing/ribs/rib' can adversely affect the routing subsystem, potentially causing network malfunctions or delivery of packets to inappropriate destinations.