YANG Data Model for Babel
Kloud Services
California
USA
mjethanandani@gmail.com
AT&T
Atlanta
GA
USA
barbara.stark@att.com
Routing Area
Babel Working Group
babel
YANG
This document defines a data model for the Babel routing protocol. The data model is defined using the YANG data modeling language.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
described in BCP 14 when, and only when, they appear in all capitals, as shown here.
This document defines a data model for The Babel Routing Protocol . The data model is defined using YANG 1.1 and is Network Management Datastore Architecture (NDMA) compatible. It is based on the Babel Information
Model . The data model only includes data nodes that are useful for managing Babel over IPv6.
Artwork in this document contains shorthand references to drafts in progress. Please apply the following replacements and remove this note before publication.
"XXXX" --> the assigned RFC value for this draft both in this draft and in the YANG models under the revision statement.
Revision date in model, in the format 2021-09-20 needs to get updated with the date the draft gets approved. The date also needs to get reflected on the line with <CODE
BEGINS>.
For a reference to the annotations used in tree diagrams included in this draft, please see YANG Tree Diagrams .
This document defines a YANG 1.1 data model for the configuration and management of Babel. The YANG module is based on the Babel Information Model .
There are a few things that should be noted between the Babel Information Model and this data module. The information model mandates the definition of some of the attributes, e.g.,
'babel-implementation-version' or the 'babel-self-router-id'. These attributes are marked as read-only objects in the information module as well as in this data module. However, there is no way
in the data module to mandate that a read-only attribute be present. It is up to the implementation of this data module to make sure that the attributes that are marked read-only and are
mandatory are indeed present.
The following diagram illustrates a top level hierarchy of the model. In addition to the version implemented by this device, the model contains subtrees on
'constants', 'interfaces', 'mac-key-set', 'dtls', and 'routes'.
The 'interfaces' subtree describes attributes such as the 'interface' object that is being referenced, the type of link, e.g., wired, wireless or tunnel, as enumerated by 'metric-algorithm' and
'split-horizon' and whether the interface is enabled or not.
The 'constants' subtree describes the UDP port used for sending and receiving Babel messages, and the multicast group used to send and receive announcements on IPv6.
The 'routes' subtree describes objects such as the prefix for which the route is advertised, a reference to the neighboring route, and 'next-hop' address.
Finally, for security two subtrees are defined to contain MAC keys and DTLS certificates. The 'mac-key-set' subtree contains keys used with the MAC security mechanism. The boolean flag
'default-apply' indicates whether the set of MAC keys is automatically applied to new interfaces. The 'dtls' subtree contains certificates used with DTLS security mechanism. Similar to the MAC
mechanism, the boolean flag 'default-apply' indicates whether the set of DTLS certificates is automatically applied to new interfaces.
This YANG module augments the YANG Routing Management module to provide a common framework for all routing subsystems. By augmenting the module it provides a
common building block for routes, and Routing Information Bases (RIBs). It also has a reference to an interface defined by A YANG Data Model for Interface
Management .
A router running Babel routing protocol can sometimes determine the parameters it needs to use for an interface based on the interface name. For example, it can detect that eth0 is a wired interface,
and that wlan0 is a wireless interface. This is not true for a tunnel interface, where the link parameters need to be configured explicitly.
For a wired interface, it will assume 'two-out-of-three' for 'metric-algorithm', and 'split-horizon' set to true. On the other hand, for a wireless interface it will assume 'etx' for
'metric-algorithm', and 'split-horizon' set to false. However, if the wired link is connected to a wireless radio, the values can be overriden by setting 'metric-algorithm' to 'etx', and
'split-horizon' to false. Similarly, an interface that is a metered 3G link, and used for fallback connectivity needs much higher default time constants, e.g., 'mcast-hello-interval', and
'update-interval', in order to avoid carrying control traffic as much as possible.
In addition to the modules used above, this module imports
definitions from Common YANG Data Types ,
and references HMAC: Keyed-Hashing
for Message Authentication ,
Using HMAC-SHA-256, HMAC-SHA-384, and
HMAC-SHA-512 with IPsec , The Datagram Transport
Layer Security (DTLS) Version 1.3 , The
Blake2 Cryptographic Hash and Message Authentication Code
(MAC) , Babel
Information Model , The Babel Routing
Protocol , YANG
Data Types and Groupings for Cryptography ,
Network Configuration Access Control
Model
and MAC Authentication for Babel .
file "ietf-babel@2021-09-20.yang"
module ietf-babel {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-babel";
prefix babel;
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types.";
}
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types.";
}
import ietf-interfaces {
prefix if;
reference
"RFC 8343: A YANG Data Model for Interface Management";
}
import ietf-routing {
prefix rt;
reference
"RFC 8349: YANG Routing Management";
}
import ietf-crypto-types {
prefix ct;
reference
"I-D.ietf-netconf-crypto-types: YANG Data Types and Groupings
for Cryptographay.";
}
import ietf-netconf-acm {
prefix nacm;
reference
"RFC 8341: Network Configuration Access Control Model";
}
organization
"IETF Babel routing protocol Working Group";
contact
"WG Web: http://tools.ietf.org/wg/babel/
WG List: babel@ietf.org
Editor: Mahesh Jethanandani
mjethanandani@gmail.com
Editor: Barbara Stark
bs7652@att.com";
description
"This YANG module defines a model for the Babel routing
protocol.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.
Copyright (c) 2021 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.";
revision 2021-09-20 {
description
"Initial version.";
reference
"RFC XXXX: Babel YANG Data Model.";
}
/*
* Features
*/
feature two-out-of-three-supported {
description
"This implementation supports the '2-out-of-3'
computation algorithm.";
}
feature etx-supported {
description
"This implementation supports the Expected Transmission Count
(ETX) metric computation algorithm.";
}
feature mac-supported {
description
"This implementation supports MAC-based security.";
reference
"RFC 8967: MAC authentication for Babel Routing
Protocol.";
}
feature dtls-supported {
description
"This implementation supports DTLS based security.";
reference
"RFC 8968: Babel Routing Protocol over Datagram
Transport Layer Security.";
}
feature hmac-sha256-supported {
description
"This implementation supports the HMAC-SHA256 MAC algorithm.";
reference
"RFC 8967: MAC authentication for Babel Routing
Protocol.";
}
feature blake2s-supported {
description
"This implementation supports BLAKE2s MAC algorithms.";
reference
"RFC 8967: MAC authentication for Babel Routing
Protocol.";
}
feature x-509-supported {
description
"This implementation supports the X.509 certificate type.";
reference
"RFC 8968: Babel Routing Protocol over Datagram
Transport Layer Security.";
}
feature raw-public-key-supported {
description
"This implementation supports the Raw Public Key certificate
type.";
reference
"RFC 8968: Babel Routing Protocol over Datagram
Transport Layer Security.";
}
/*
* Identities
*/
identity metric-comp-algorithms {
description
"Base identity from which all Babel metric computation
algorithms MUST be derived.";
}
identity two-out-of-three {
if-feature "two-out-of-three-supported";
base metric-comp-algorithms;
description
"2-out-of-3 algorithm.";
reference
"RFC 8966: The Babel Routing Protocol, Section A.2.1.";
}
identity etx {
if-feature "etx-supported";
base metric-comp-algorithms;
description
"Expected Transmission Count (ETX) metric computation
algorithm.";
reference
"RFC 8966: The Babel Routing Protocol, Section A.2.2.";
}
/*
* Babel MAC algorithms identities.
*/
identity mac-algorithms {
description
"Base identity for all Babel MAC algorithms.";
}
identity hmac-sha256 {
if-feature "mac-supported";
if-feature "hmac-sha256-supported";
base mac-algorithms;
description
"HMAC-SHA256 algorithm supported.";
reference
"RFC 4868: Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512
with IPsec.";
}
identity blake2s {
if-feature "mac-supported";
if-feature "blake2s-supported";
base mac-algorithms;
description
"BLAKE2s algorithms supported. Specifically, BLAKE2-128 is
supported.";
reference
"RFC 7693: The BLAKE2 Cryptographic Hash and Message
Authentication Code (MAC).";
}
/*
* Babel Cert Types
*/
identity dtls-cert-types {
description
"Base identity for Babel DTLS certificate types.";
}
identity x-509 {
if-feature "dtls-supported";
if-feature "x-509-supported";
base dtls-cert-types;
description
"X.509 certificate type.";
}
identity raw-public-key {
if-feature "dtls-supported";
if-feature "raw-public-key-supported";
base dtls-cert-types;
description
"Raw Public Key certificate type.";
}
/*
* Babel routing protocol identity.
*/
identity babel {
base rt:routing-protocol;
description
"Babel routing protocol";
}
/*
* Groupings
*/
grouping routes {
list routes {
key "prefix";
config false;
leaf prefix {
type inet:ip-prefix;
description
"Prefix (expressed in ip-address/prefix-length format) for
which this route is advertised.";
reference
"RFC 9046: Babel Information Model, Section 3.6.";
}
leaf router-id {
type binary {
length 8;
}
description
"router-id of the source router for which this route is
advertised.";
reference
"RFC 9046: Babel Information Model, Section 3.6.";
}
leaf neighbor {
type leafref {
path "/rt:routing/rt:control-plane-protocols/"
+ "rt:control-plane-protocol/babel/interfaces/"
+ "neighbor-objects/neighbor-address";
}
description
"Reference to the neighbor-objects entry for the neighbor
that advertised this route.";
reference
"RFC 9046: Babel Information Model, Section 3.6.";
}
leaf received-metric {
type union {
type enumeration {
enum null {
description
"Route was not received from a neighbor.";
}
}
type uint16;
}
description
"The metric with which this route was advertised by the
neighbor, or maximum value (infinity) to indicate the
route was recently retracted and is temporarily
unreachable. This metric will be NULL if the
route was not received from a neighbor but instead was
injected through means external to the Babel routing
protocol. At least one of calculated-metric or
received-metric MUST be non-NULL.";
reference
"RFC 9046: Babel Information Model, Section 3.6,
RFC 8966: The Babel Routing Protocol, Section 2.1.";
}
leaf calculated-metric {
type union {
type enumeration {
enum null {
description
"Route has not been calculated.";
}
}
type uint16;
}
description
"A calculated metric for this route. How the metric is
calculated is implementation-specific. Maximum value
(infinity) indicates the route was recently retracted
and is temporarily unreachable. At least one of
calculated-metric or received-metric MUST be non-NULL.";
reference
"RFC 9046: Babel Information Model, Section 3.6,
RFC 8966: The Babel Routing Protocol, Section 2.1.";
}
leaf seqno {
type uint16;
description
"The sequence number with which this route was
advertised.";
reference
"RFC 9046: Babel Information Model, Section 3.6.";
}
leaf next-hop {
type union {
type enumeration {
enum null {
description
"Route has no next-hop address.";
}
}
type inet:ip-address;
}
description
"The next-hop address of this route. This will be NULL
if this route has no next-hop address.";
reference
"RFC 9046: Babel Information Model, Section 3.6.";
}
leaf feasible {
type boolean;
description
"A boolean flag indicating whether this route is
feasible.";
reference
"RFC 9046: Babel Information Model, Section 3.6,
RFC 8966, The Babel Routing Protocol, Section 3.5.1.";
}
leaf selected {
type boolean;
description
"A boolean flag indicating whether this route is selected,
i.e., whether it is currently being used for forwarding
and is being advertised.";
reference
"RFC 9046: Babel Information Model, Section 3.6.";
}
description
"A set of babel-route-obj objects. Contains routes known to
this node.";
reference
"RFC 9046: Babel Information Model, Section 3.1.";
}
description
"Common grouping for routing used in RIB.";
}
/*
* Data model
*/
augment "/rt:routing/rt:control-plane-protocols/"
+ "rt:control-plane-protocol" {
when "derived-from-or-self(rt:type, 'babel')" {
description
"Augmentation is valid only when the instance of routing type
is of type 'babel'.";
}
description
"Augment the routing module to support a common structure
between routing protocols.";
reference
"YANG Routing Management, RFC 8349, Lhotka & Lindem, March
2018.";
container babel {
presence "A Babel container.";
description
"Babel Information Objects.";
reference
"RFC 9046: Babel Information Model, Section 3.";
leaf version {
type string;
config false;
description
"The name and version of this implementation of the Babel
protocol.";
reference
"RFC 9046: Babel Information Model, Section 3.1.";
}
leaf enable {
type boolean;
mandatory true;
description
"When written, it configures whether the protocol should be
enabled. A read from the or datastore
therefore indicates the configured administrative value of
whether the protocol is enabled or not.
A read from the datastore indicates whether
the protocol is actually running or not, i.e. it indicates
the operational state of the protocol.";
reference
"RFC 9046: Babel Information Model, Section 3.1.";
}
leaf router-id {
type binary;
must '../enable = "true"';
config false;
description
"Every Babel speaker is assigned a router-id, which is an
arbitrary string of 8 octets that is assumed to be unique
across the routing domain.
The router-id is valid only if the protocol is enabled,
at which time a non-zero value is assigned.";
reference
"RFC 9046: Babel Information Model, Section 3.1,
RFC 8966: The Babel Routing Protocol,
Section 3.";
}
leaf seqno {
type uint16;
config false;
description
"Sequence number included in route updates for routes
originated by this node.";
reference
"RFC 9046: Babel Information Model, Section 3.1.";
}
leaf statistics-enabled {
type boolean;
description
"Indicates whether statistics collection is enabled (true)
or disabled (false) on all interfaces. On transition to
enabled, existing statistics values are not cleared and
will be incremented as new packets are counted.";
}
container constants {
description
"Babel Constants object.";
reference
"RFC 9046: Babel Information Model, Section 3.1.";
leaf udp-port {
type inet:port-number;
default "6696";
description
"UDP port for sending and receiving Babel messages. The
default port is 6696.";
reference
"RFC 9046: Babel Information Model, Section 3.2.";
}
leaf mcast-group {
type inet:ip-address;
default "ff02::1:6";
description
"Multicast group for sending and receiving multicast
announcements on IPv6.";
reference
"RFC 9046: Babel Information Model, Section 3.2.";
}
}
list interfaces {
key "reference";
description
"A set of Babel Interface objects.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
leaf reference {
type if:interface-ref;
description
"References the name of the interface over which Babel
packets are sent and received.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf enable {
type boolean;
default "true";
description
"If true, babel sends and receives messages on this
interface. If false, babel messages received on this
interface are ignored and none are sent.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf metric-algorithm {
type identityref {
base metric-comp-algorithms;
}
mandatory true;
description
"Indicates the metric computation algorithm used on this
interface. The value MUST be one of those identities
based on 'metric-comp-algorithms'.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf split-horizon {
type boolean;
description
"Indicates whether or not the split horizon optimization
is used when calculating metrics on this interface.
A value of true indicates the split horizon optimization
is used.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf mcast-hello-seqno {
type uint16;
config false;
description
"The current sequence number in use for multicast hellos
sent on this interface.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf mcast-hello-interval {
type uint16;
units "centiseconds";
description
"The current multicast hello interval in use for hellos
sent on this interface.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf update-interval {
type uint16;
units "centiseconds";
description
"The current update interval in use for this interface.
Units are centiseconds.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf mac-enable {
type boolean;
description
"Indicates whether the MAC security mechanism is enabled
(true) or disabled (false).";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf-list mac-key-sets {
type leafref {
path "../../mac-key-set/name";
}
description
"List of references to the MAC entries that apply
to this interface. When an interface instance is
created, all MAC instances with default-apply 'true'
will be included in this list.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf mac-verify {
type boolean;
description
"A Boolean flag indicating whether MACs in
incoming Babel packets are required to be present and
are verified. If this parameter is 'true', incoming
packets are required to have a valid MAC.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf dtls-enable {
type boolean;
description
"Indicates whether the DTLS security mechanism is enabled
(true) or disabled (false).";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf-list dtls-certs {
type leafref {
path "../../dtls/name";
}
description
"List of references to the dtls entries that apply to
this interface. When an interface instance
is created, all dtls instances with default-apply
'true' will be included in this list.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf dtls-cached-info {
type boolean;
description
"Indicates whether the cached_info extension is enabled.
The extension is enabled for inclusion in ClientHello
and ServerHello messages if the value is 'true'.";
reference
"RFC 9046: Babel Information Model, Section 3.3.
RFC 8968: Babel Routing Protocol over
Datagram Transport Layer Security, Appendix A.";
}
leaf-list dtls-cert-prefer {
type leafref {
path "../../dtls/certs/type";
}
ordered-by user;
description
"List of supported certificate types, in order of
preference. The values MUST be the 'type' attribute
in the list 'certs' of the list 'dtls'
(../../dtls/certs/type). This list is used to populate
the server_certificate_type extension in a ClientHello.
Values that are present in at least one instance in the
certs object under dtls of a referenced dtls instance
and that have a non-empty private-key will be used to
populate the client_certificate_type extension in a
ClientHello.";
reference
"RFC 9046: Babel Information Model, Section 3.3
RFC 8968: Babel Routing Protocol over
Datagram Transport Layer Security, Appendix A.";
}
leaf packet-log-enable {
type boolean;
description
"If true, logging of babel packets received on this
interface is enabled; if false, babel packets are not
logged.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
leaf packet-log {
type inet:uri;
config false;
description
"A reference or url link to a file that contains a
timestamped log of packets received and sent on
udp-port on this interface. The [libpcap] file
format with .pcap file extension SHOULD be supported for
packet log files. Logging is enabled / disabled by
packet-log-enable.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
}
container statistics {
config false;
description
"Statistics collection object for this interface.";
reference
"RFC 9046: Babel Information Model, Section 3.3.";
leaf discontinuity-time {
type yang:date-and-time;
mandatory true;
description
"The time on the most recent occasion at which any one
or more of counters suffered a discontinuity. If no
such discontinuities have occurred since the last
re-initialization of the local management subsystem,
then this node contains the time the local management
subsystem re-initialized itself.";
}
leaf sent-mcast-hello {
type yang:counter32;
description
"A count of the number of multicast Hello packets sent
on this interface.";
reference
"RFC 9046: Babel Information Model, Section 3.4.";
}
leaf sent-mcast-update {
type yang:counter32;
description
"A count of the number of multicast update packets sent
on this interface.";
reference
"RFC 9046: Babel Information Model, Section 3.4.";
}
leaf sent-ucast-hello {
type yang:counter32;
description
"A count of the number of unicast Hello packets sent
on this interface.";
reference
"RFC 9046: Babel Information Model, Section 3.6.";
}
leaf sent-ucast-update {
type yang:counter32;
description
"A count of the number of unicast update packets sent
on this interface.";
reference
"RFC 9046: Babel Information Model, Section 3.6.";
}
leaf sent-ihu {
type yang:counter32;
description
"A count of the number of IHU packets sent on this
interface.";
reference
"RFC 9046: Babel Information Model, Section 3.6.";
}
leaf received-packets {
type yang:counter32;
description
"A count of the number of Babel packets received on
this interface.";
reference
"RFC 9046: Babel Information Model, Section 3.4.";
}
action reset {
description
"The information model [RFC 9046] defines reset
action as a system-wide reset of Babel statistics.
In YANG the reset action is associated with the
container where the action is defined. In this case
the action is associated with the statistics container
inside an interface. The action will therefore
reset statistics at an interface level.
Implementations that want to support a system-wide
reset of Babel statistics need to call this action
for every instance of the interface.";
input {
leaf reset-at {
type yang:date-and-time;
description
"The time when the reset was issued.";
}
}
output {
leaf reset-finished-at {
type yang:date-and-time;
description
"The time when the reset finished.";
}
}
}
}
list neighbor-objects {
key "neighbor-address";
config false;
description
"A set of Babel Neighbor Object.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
leaf neighbor-address {
type inet:ip-address;
description
"IPv4 or v6 address the neighbor sends packets from.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
leaf hello-mcast-history {
type string;
description
"The multicast Hello history of whether or not the
multicast Hello packets prior to exp-mcast-
hello-seqno were received, with a '1' for the most
recent Hello placed in the most significant bit and
prior Hellos shifted right (with '0' bits placed
between prior Hellos and most recent Hello for any
not-received Hellos); represented as a string of
utf-8 encoded hex digits. A bit that is set indicates
that the corresponding Hello was received, and a bit
that is cleared indicates that the corresponding Hello
was not received.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
leaf hello-ucast-history {
type string;
description
"The unicast Hello history of whether or not the
unicast Hello packets prior to exp-ucast-hello-seqno
were received, with a '1' for the most
recent Hello placed in the most significant bit and
prior Hellos shifted right (with '0' bits placed
between prior Hellos and most recent Hello for any
not-received Hellos); represented as a string using
utf-8 encoded hex digits where a '1' bit = Hello
received and a '0' bit = Hello not received.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
leaf txcost {
type int32;
default "0";
description
"Transmission cost value from the last IHU packet
received from this neighbor, or maximum value
(infinity) to indicate the IHU hold timer for this
neighbor has expired description.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
leaf exp-mcast-hello-seqno {
type union {
type enumeration {
enum null {
description
"Multicast Hello packets are not expected, or
processing of multicast packets is not
enabled.";
}
}
type uint16;
}
description
"Expected multicast Hello sequence number of next Hello
to be received from this neighbor; if multicast Hello
packets are not expected, or processing of multicast
packets is not enabled, this MUST be NULL.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
leaf exp-ucast-hello-seqno {
type union {
type enumeration {
enum null {
description
"Unicast Hello packets are not expected, or
processing of unicast packets is not enabled.";
}
}
type uint16;
}
default null;
description
"Expected unicast Hello sequence number of next Hello
to be received from this neighbor; if unicast Hello
packets are not expected, or processing of unicast
packets is not enabled, this MUST be NULL.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
leaf ucast-hello-seqno {
type union {
type enumeration {
enum null {
description
"Unicast Hello packets are not being sent.";
}
}
type uint16;
}
default null;
description
"The current sequence number in use for unicast Hellos
sent to this neighbor. If unicast Hellos are not being
sent, this MUST be NULL.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
leaf ucast-hello-interval {
type uint16;
units "centiseconds";
description
"The current interval in use for unicast hellos sent to
this neighbor. Units are centiseconds.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
leaf rxcost {
type uint16;
description
"Reception cost calculated for this neighbor. This
value is usually derived from the Hello history, which
may be combined with other data, such as statistics
maintained by the link layer. The rxcost is sent to a
neighbor in each IHU.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
leaf cost {
type int32;
description
"Link cost is computed from the values maintained in
the neighbor table. The statistics kept in the
neighbor table about the reception of Hellos, and the
txcost computed from received IHU packets.";
reference
"RFC 9046: Babel Information Model, Section 3.5.";
}
}
}
list mac-key-set {
key "name";
description
"A MAC key set object. If this object is implemented, it
provides access to parameters related to the MAC security
mechanism.";
reference
"RFC 9046: Babel Information Model, Section 3.7.";
leaf name {
type string;
description
"A string that uniquely identifies the MAC object.";
}
leaf default-apply {
type boolean;
description
"A Boolean flag indicating whether this object
instance is applied to all new interfaces, by default.
If 'true', this instance is applied to new babel-
interfaces instances at the time they are created,
by including it in the mac-key-sets list under
the interface. If 'false', this instance is not applied
to new interface instances when they are created.";
reference
"RFC 9046: Babel Information Model, Section 3.7.";
}
list keys {
key "name";
min-elements 1;
description
"A set of keys objects.";
reference
"RFC 9046: Babel Information Model, Section 3.8.";
leaf name {
type string;
description
"A unique name for this MAC key that can be used to
identify the key in this object instance, since the
key value is not allowed to be read. This value can
only be provided when this instance is created, and is
not subsequently writable.";
reference
"RFC 9046: Babel Information Model, Section 3.8.";
}
leaf use-send {
type boolean;
mandatory true;
description
"Indicates whether this key value is used to compute a
MAC and include that MAC in the sent Babel packet. A
MAC for sent packets is computed using this key if the
value is 'true'. If the value is 'false', this key is
not used to compute a MAC to include in sent Babel
packets.";
reference
"RFC 9046: Babel Information Model, Section 3.8.";
}
leaf use-verify {
type boolean;
mandatory true;
description
"Indicates whether this key value is used to verify
incoming Babel packets. This key is used to verify
incoming packets if the value is 'true'. If the value
is 'false', no MAC is computed from this key for
comparing an incoming packet.";
reference
"RFC 9046: Babel Information Model, Section 3.8.";
}
leaf value {
nacm:default-deny-all;
type binary;
mandatory true;
description
"The value of the MAC key.
This value is of a length suitable for the associated
babel-mac-key-algorithm. If the algorithm is based on
the HMAC construction [RFC2104], the length MUST be
between 0 and an upper limit that is at least the size
of the output length (where 'HMAC-SHA256' output
length is 32 octets as described in [RFC4868]). Longer
lengths MAY be supported but are not necessary if the
management system has the ability to generate a
suitably random value (e.g., by randomly generating a
value or by using a key derivation technique as
recommended in [RFC8967] Security Considerations). If
the algorithm is 'BLAKE2s-128', the length MUST be
between 0 and 32 bytes inclusive as specified by
[RFC7693].";
reference
"RFC 9046: Babel Information Model, Section 3.8,
RFC 2104: HMAC: Keyed-Hashing for Message
Authentication
RFC 4868: Using HMAC-SHA-256, HMAC-SHA-384, and
HMAC-SHA-512 with IPsec,
RFC 7693: The BLAKE2 Cryptographic Hash and Message
Authentication Code (MAC).
RFC 8967: MAC Authentication for Babel.";
}
leaf algorithm {
type identityref {
base mac-algorithms;
}
mandatory true;
description
"The MAC algorithm used with this key. The
value MUST be one of the identities
listed with the base of 'mac-algorithms'.";
reference
"RFC 9046: Babel Information Model, Section 3.8.";
}
action test {
description
"An operation that allows the MAC key and MAC
algorithm to be tested to see if they produce an
expected outcome. Input to this operation are a
binary string and a calculated MAC (also in the
format of a binary string) for the binary string.
The implementation is expected to create a MAC over
the binary string using the value and algorithm.
The output of this operation is a binary indication
that the calculated MAC matched the input MAC (true)
or the MACs did not match (false).";
reference
"RFC 9046: Babel Information Model, Section 3.8.";
input {
leaf test-string {
type binary;
mandatory true;
description
"Input to this operation is a binary string.
The implementation is expected to create
a MAC over this string using the value and
the algorithm defined as part of the
mac-key-set.";
reference
"RFC 9046: Babel Information Model, Section 3.8.";
}
leaf mac {
type binary;
mandatory true;
description
"Input to this operation includes a MAC.
The implementation is expected to calculate a MAC
over the string using the value and algorithm of
this key object and compare its calculated MAC to
this input MAC.";
reference
"RFC 9046: Babel Information Model, Section 3.8.";
}
}
output {
leaf indication {
type boolean;
mandatory true;
description
"The output of this operation is a binary
indication that the calculated MAC matched the
input MAC (true) or the MACs did not match
(false).";
reference
"RFC 9046: Babel Information Model, Section 3.8.";
}
}
}
}
}
list dtls {
key "name";
description
"A dtls object. If this object is implemented,
it provides access to parameters related to the DTLS
security mechanism.";
reference
"RFC 9046: Babel Information Model, Section 3.9";
leaf name {
type string;
description
"A string that uniquely identifies a dtls object.";
}
leaf default-apply {
type boolean;
mandatory true;
description
"A Boolean flag indicating whether this object
instance is applied to all new interfaces, by default.
If 'true', this instance is applied to new interfaces
instances at the time they are created, by including it
in the dtls-certs list under the interface. If 'false',
this instance is not applied to new interface
instances when they are created.";
reference
"RFC 9046: Babel Information Model, Section 3.9.";
}
list certs {
key "name";
min-elements 1;
description
"A set of cert objects. This contains
both certificates for this implementation to present
for authentication, and to accept from others.
Certificates with a non-empty private-key
can be presented by this implementation for
authentication.";
reference
"RFC 9046: Babel Information Model, Section 3.10.";
leaf name {
type string;
description
"A unique name for this certificate that can be
used to identify the certificate in this object
instance, since the value is too long to be useful
for identification. This value MUST NOT be empty
and can only be provided when this instance is created
(i.e., it is not subsequently writable).";
reference
"RFC 9046: Babel Information Model, Section 3.10.";
}
leaf value {
nacm:default-deny-write;
type string;
mandatory true;
description
"The certificate in PEM format [RFC7468]. This
value can only be provided when this instance is
created, and is not subsequently writable.";
reference
"RFC 9046: Babel Information Model, Section 3.10.";
}
leaf type {
nacm:default-deny-write;
type identityref {
base dtls-cert-types;
}
mandatory true;
description
"The certificate type of this object instance.
The value MUST be the same as one of the
identities listed with the base 'dtls-cert-types'.
This value can only be provided when this
instance is created, and is not subsequently
writable.";
reference
"RFC 9046: Babel Information Model, Section 3.10.";
}
leaf private-key {
nacm:default-deny-all;
type binary;
mandatory true;
description
"The value of the private key. If this is non-empty,
this certificate can be used by this implementation to
provide a certificate during DTLS handshaking.";
reference
"RFC 9046: Babel Information Model, Section 3.10.";
}
leaf algorithm {
nacm:default-deny-write;
type identityref {
base ct:private-key-format;
}
mandatory true;
description
"Identifies the algorithm identity with which the
private-key has been encoded. This value can only be
provided when this instance is created, and is not
subsequently writable.";
}
}
}
uses routes;
}
}
}
]]>
This document registers a URI and a YANG module.
URI: urn:ietf:params:xml:ns:yang:ietf-babel
This document registers a YANG module in the YANG Module Names registry YANG .
The YANG module specified in this document defines a schema for data that is designed to be accessed via network management protocol such as NETCONF or RESTCONF . The lowest NETCONF layer is the secure transport layer and the mandatory-to-implement secure transport is SSH . The lowest RESTCONF
layer is HTTPS, and the mandatory-to-implement secure transport is TLS .
The NETCONF Access Control Model (NACM ) provides the means to restrict access for particular NETCONF users to a pre-configured subset of all available NETCONF
protocol operations and content.
The security considerations outlined here are specific to the YANG data model, and do not cover security considerations of the Babel protocol or its security mechanisms in The Babel Routing Protocol , MAC Authentication for the Babel Routing Protocol , and Babel Routing Protocol over Data Transport Layer Security . Each of these has its own Security Considerations section for considerations that are specific to it.
There are a number of data nodes defined in the YANG module which are writable/created/deleted (i.e., config true, which is the default). These data nodes may be considered sensitive or
vulnerable in some network environments. Write operations (e.g., <edit-config>) to these data nodes without proper protection can have a negative effect on network operations. These are
the subtrees and data nodes and their sensitivity/vulnerability from a config true perspective:
'babel': This container includes an 'enable' parameter that can be used to enable or disable use of Babel on a router
'babel/constants': This container includes configuration parameters that can prevent reachability if misconfigured.
'babel/interfaces': This leaf-list has configuration parameters that can enable/disable security mechanisms and change performance characteristics of the Babel protocol. For example, enabling logging of packets and giving unintended access to the log files gives an attacker detailed knowledge of the network, and allows it to launch an attack on the traffic traversing the network device.
'babel/hmac' and 'babel/dtls': These contain security credentials that influence whether incoming packets are trusted, and whether outgoing packets are produced in a way such that the receiver will treat them as trusted.
Some of the readable data or config false nodes in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control read access (e.g.,
via get, get-config, or notification) to these data nodes. These are the subtrees and data nodes and their sensitivity/vulnerability from a config false perpective:
'babel': Access to the information in the various nodes can disclose the network topology. Additionally, the routes used by a network device may be used to mount a subsequent attack on
traffic traversing the network device.
'babel/hmac' and 'babel/dtls': These contain security credentials, including private credentials of the router; however it is required that these values not be readable.
Some of the RPC operations in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control access to these operations. These are
the operations and their sensitivity/vulnerability from a RPC operation perspective:
This model defines two actions. Resetting the statistics within an interface container would be visible to any monitoring processes, which should be designed to account for the possibility of such a reset. The "test" action allows for validation that a MAC key and MAC algorithm have been properly configured. The MAC key is a sensitive piece of information, and it is important to prevent an attacker that does not know the MAC key from being able to determine the MAC value by trying different input parameters. The "test" action has been designed to not reveal such information directly. Such information might also be revealed indirectly, due to side channels such as the time it takes to produce a response to the action. Implementations SHOULD use a constant-time comparison between the input mac and the locally generated MAC value for comparison, in order to avoid such side channel leakage.
Juliusz Chroboczek provided most of the example configurations for babel that are shown in the Appendix.
This section is devoted to including a complete tree diagram and
examples that demonstrate how Babel can be configured.
This section includes the complete tree diagram for
the Babel YANG module.
../../mac-key-set/name
| +--rw mac-verify? boolean
| +--rw dtls-enable? boolean
| +--rw dtls-certs* -> ../../dtls/name
| +--rw dtls-cached-info? boolean
| +--rw dtls-cert-prefer* -> ../../dtls/certs/type
| +--rw packet-log-enable? boolean
| +--ro packet-log? inet:uri
| +--ro statistics
| | +--ro discontinuity-time yang:date-and-time
| | +--ro sent-mcast-hello? yang:counter32
| | +--ro sent-mcast-update? yang:counter32
| | +--ro sent-ucast-hello? yang:counter32
| | +--ro sent-ucast-update? yang:counter32
| | +--ro sent-ihu? yang:counter32
| | +--ro received-packets? yang:counter32
| | +---x reset
| | +---w input
| | | +---w reset-at? yang:date-and-time
| | +--ro output
| | +--ro reset-finished-at? yang:date-and-time
| +--ro neighbor-objects* [neighbor-address]
| +--ro neighbor-address inet:ip-address
| +--ro hello-mcast-history? string
| +--ro hello-ucast-history? string
| +--ro txcost? int32
| +--ro exp-mcast-hello-seqno? union
| +--ro exp-ucast-hello-seqno? union
| +--ro ucast-hello-seqno? union
| +--ro ucast-hello-interval? uint16
| +--ro rxcost? uint16
| +--ro cost? int32
+--rw mac-key-set* [name]
| +--rw name string
| +--rw default-apply? boolean
| +--rw keys* [name]
| +--rw name string
| +--rw use-send boolean
| +--rw use-verify boolean
| +--rw value binary
| +--rw algorithm identityref
| +---x test
| +---w input
| | +---w test-string binary
| | +---w mac binary
| +--ro output
| +--ro indication boolean
+--rw dtls* [name]
| +--rw name string
| +--rw default-apply boolean
| +--rw certs* [name]
| +--rw name string
| +--rw value string
| +--rw type identityref
| +--rw private-key binary
| +--rw algorithm identityref
+--ro routes* [prefix]
+--ro prefix inet:ip-prefix
+--ro router-id? binary
+--ro neighbor? leafref
+--ro received-metric? union
+--ro calculated-metric? union
+--ro seqno? uint16
+--ro next-hop? union
+--ro feasible? boolean
+--ro selected? boolean
]]>
In this example, interface eth0 is being configured for routing protocol Babel, and statistics gathering is enabled. For security, HMAC-SHA256 is supported. Every sent Babel packets is
signed with the key value provided, and every received Babel packet is verified with the same key value.
eth0
ianaift:ethernetCsmacd
true
babel:babel
name:babel
true
true
eth0
two-out-of-three
true
hmac-sha256
hmac-sha256-keys
true
true
base64encodedvalue==
hmac-sha256
]]>
eth0
ianaift:ethernetCsmacd
true
wlan0
ianaift:ieee80211
true
babel:babel
name:babel
true
eth0
true
two-out-of-three
true
wlan0
true
etx
false
]]>
eth0
ianaift:ethernetCsmacd
true
eth1
ianaift:ethernetCsmacd
true
tun0
ianaift:tunnel
true
babel:babel
name:babel
true
eth0
true
two-out-of-three
true
eth1
true
etx
false
tun0
true
two-out-of-three
true
]]>
eth0
ianaift:ethernetCsmacd
true
ppp0
ianaift:ppp
true
babel:babel
name:babel
true
eth0
true
two-out-of-three
true
ppp0
true
30
120
two-out-of-three
]]>