module ietf-rift {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-rift";
prefix rift;
import ietf-inet-types {
prefix "inet";
reference "RFC 6991: Common YANG Data Types";
}
import ietf-routing {
prefix "rt";
reference
"RFC 8349: A YANG Data Model for Routing Management
(NMDA Version)";
}
import ietf-interfaces {
prefix "if";
reference
"RFC 8343: A YANG Data Model for Interface Management";
}
import ietf-routing-types {
prefix "rt-types";
reference
"RFC 8294: Common YANG Data Types for the Routing Area";
}
import iana-routing-types {
prefix "iana-rt-types";
reference
"RFC 8294: Common YANG Data Types for the Routing Area";
}
organization
"IETF RIFT (Routing In Fat Trees) Working Group";
contact
"WG Web:
WG List:
Editor: Zheng Zhang
Editor: Yuehua Wei
Editor: Shaowen Ma
Editor: Xufeng Liu
";
// RFC Ed.: replace XXXX with actual RFC number and remove
// this note
description
"The module defines the YANG definitions for Routing in Fat
Trees (RIFT).
Copyright (c) 2020 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.
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.";
revision 2020-07-11 {
description "Initial revision.";
reference "RFC XXXX: A YANG Data Model for RIFT.";
}
/*
* Features
*/
feature nonce-delta-adjust {
description
"Support weak nonce delta adjusting which is used in security
in section 4.4.";
}
typedef system-id {
type string {
pattern
'[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}';
}
description
"This type defines RIFT system id using pattern,
the system id looks like: 0143.0438.0100.AeF0";
}
typedef level {
type uint8 {
range "0 .. 24";
}
default "0";
description "The value of node level. The max value is 24.";
}
typedef linkid-type {
type uint32;
description "This type defines the link id of an interface.";
}
typedef ieee802-1as-timestamp-type {
type uint64;
description
"Timestamp per 802.1AS. It is advertised with prefix to
achieve mobility as described in section 4.3.3.";
}
/*
* Identity
*/
identity rift {
base rt:routing-protocol;
description "Identity for the RIFT routing protocol.";
}
/*
* Groupings
*/
grouping base-node-info {
leaf name {
type string;
description
"The name of this node. It won't be used as the key of node,
just used for description.";
}
leaf level {
type level;
config false;
description "The level of this node.";
}
leaf system-id {
type system-id;
mandatory true;
description
"Each node is identified via a system-id which is 64 bits
wide.";
}
leaf pod {
type uint32;
description
"Point of Delivery. The self-contained vertical slice of a
Clos or Fat Tree network containing normally only level 0 and
level 1 nodes. It communicates with nodes in other PoDs via
the spine. We number PoDs to distinguish them and use PoD #0
to denote 'undefined' PoD.";
}
description "The base information of a node.";
} // base-node-info
grouping node-flag {
leaf overload {
type boolean;
description "If the overload bit in TIEs can be set.";
}
description "The node flag information.";
}
grouping link-capabilities {
leaf bfd {
type boolean;
description
"If this value is set to true, it means that
BFD [RFC5881] function is enabled on the neighbor.";
}
leaf v4-forwarding-capable {
type boolean;
description
"If this value is set to true, it means that
the neighbor supports v4 forwarding.";
}
description "The features of neighbor.";
} // link-capabilities
grouping addresses {
leaf ipv4 {
type inet:ipv4-address;
description "IPv4 address to be used.";
}
leaf ipv6 {
type inet:ipv6-address;
description "IPv6 address to be used.";
}
description "IPv4 or IPv6 address to be used.";
}
grouping lie-elements{
leaf you-are-flood-repeater {
type boolean;
description
"If the neighbor on this link is flooding repeater
described in section 4.2.3.9. When this value is set
to true, the value can be carried in exchanged
packet.";
}
leaf not-a-ztp-offer {
type boolean;
description
"As described in section 4.2.7. When this value is
set to true, the flag can be carried in the LIE
packet. When the value received in the LIE from
neighbor, it indicates the level on the LIE MUST
NOT be used to derive a ZTP level by the receiving
node.";
}
leaf you-are-sending-too-quickly {
type boolean;
description
"Can be optionally set to indicate to neighbor that
packet losses are seen on reception based on packet
numbers or the rate is too high. The receiver SHOULD
temporarily slow down flooding rates. When this value
is set to true, the flag can be carried in packet.";
}
description "The elements set in the LIEs.";
} // lie-elements
grouping neighbor {
container address-families {
list address-family {
key address-family;
leaf address-family {
type iana-rt-types:address-family;
description
"Indication which address families are up on the
interface.";
}
}
}
container received-source-addresses {
uses addresses;
description
"The source address of LIE and TIE packets from
the neighbor.";
}
leaf remote-id {
type uint32;
description "The remote-id to reach this neighbor.";
}
leaf cost {
type uint32;
description "The cost value advertised by the neighbor.";
}
leaf bandwidth {
type uint32;
description
"Total bits bandwith to neighbor, this will be
normally sum of the bandwidths of all the
parallel links.";
}
leaf flood-reduction {
type boolean;
description
"If this neighbor enables the flood reduction function.";
}
container sent-offer {
leaf level {
type level;
description
"The level value.";
}
leaf not-a-ztp-offer {
type boolean;
description
"If the neighbor needs to be offer a level.";
}
description
"The level sent to the neighbor in case the neighbor
needs to be offered.";
}
container received-offer {
leaf level {
type level;
description
"The level value.";
}
leaf not-a-ztp-offer {
type boolean;
description
"If this interface needs to be offered a level.";
}
leaf best {
type boolean;
description
"If level is the best level received from all
the neighbors.";
}
leaf removed-from-consideration {
type boolean;
description
"If the level value is considered to be used. If the
value is not considered to be used, this value is set
to 'TRUE'.";
}
leaf removal-reason {
type string;
description
"The reason why this value is not considered to be used.";
}
description
"The level offered to the interface from the neighbor.
And if the level value is considered to be used.";
}
container received-link-capabilities {
uses link-capabilities;
description
"The link capabilities advertised by the neighbor.";
}
container received-in-lies {
uses lie-elements;
description "The attributes received from this neighbor.";
}
leaf tx-flood-port {
type inet:port-number;
default "915";
description
"The UDP port which is used by the neighbor to flood TIEs.";
}
leaf bfd-up {
type boolean;
description
"Indication whether the link is protected by established
BFD session.";
}
leaf outer-security-key-id {
type uint8;
description
"As described in section 4.4.3, the received security
key id from the neighbor.";
}
description "The neighbor information.";
} // neighbor
grouping direction-type {
leaf direction-type {
config false;
type enumeration {
enum illegal {
description "Illegal direction.";
}
enum south {
description "A link to a node one level down.";
}
enum north {
description "A link to a node one level up.";
}
enum east-west {
description "A link to a node in the same level.";
}
enum max {
description "The max value of direction.";
}
}
description "The type of a link.";
}
description "The type of a link.";
} // direction-type
grouping tie-header {
uses direction-type;
leaf originator {
type system-id;
description "The originator's system-id of this TIE.";
}
leaf tie-type {
type enumeration {
enum "node" {
description "The node TIE.";
}
enum "prefix" {
description "The prefix TIE.";
}
enum "positive-disaggregation-prefix" {
description "The positive disaggregation prefix TIE.";
}
enum "negative-disaggregation-prefix" {
description "The negative disaggregation prefix TIE.";
}
enum "pgp-prefix" {
description "The policy guide prefix TIE.";
}
enum "key-value" {
description "The key value TIE.";
}
enum "external-prefix" {
description "The external prefix TIE.";
}
enum "positive-external-disaggregation-prefix" {
description
"The positive external disaggregation prefix TIE.";
}
}
description "The types of TIE.";
}
leaf tie-number {
type uint32;
description "The number of this TIE";
}
leaf seq {
type uint64;
description
"As described in section 4.2.3.1, the sequence number
of a TIE.";
}
leaf origination-time {
type uint32;
description
"Absolute timestamp when the TIE was generated. This can
be used on fabrics with synchronized clock to prevent
lifetime modification attacks.";
}
leaf origination-lifetime {
type uint32;
description
"Original lifetime when the TIE was generated.
This can be used on fabrics with synchronized clock to
prevent lifetime modification attacks.";
}
description
"TIE is the acronym for 'Topology Information Element'.
TIEs are exchanged between RIFT nodes to describe parts
of a network such as links and address prefixes.
This is the TIE header information.";
} // tie-header
/*
* Data nodes
*/
augment "/rt:routing/rt:control-plane-protocols"
+ "/rt:control-plane-protocol" {
when "rt:type = 'rift:rift'" {
description
"This augment is only valid when routing protocol
instance type is 'RIFT'.";
}
description "RIFT ( Routing in Fat Trees ) YANG model.";
container rift {
presence "Container for RIFT protocol.";
description "RIFT configuration data.";
list node {
description "The node information about RIFT.";
key "name";
uses base-node-info;
leaf configured-level {
type level;
description
"The configured level value of this node.";
}
uses node-flag;
leaf protocol-minor-version {
config false;
type uint16;
mandatory true;
description
"Represents protocol encoding schema minor version.";
}
leaf hierarchy-indications {
config false;
type enumeration {
enum "leaf-only" {
description
"The node will never leave the
'bottom of the hierarchy'.";
}
enum "leaf-only-and-leaf-2-leaf-procedures" {
description "This means leaf to leaf.";
}
enum "top-of-fabric" {
description "The node is 'top of fabric'.";
}
}
description "The hierarchy indications of this node.";
}
leaf flood-reduction {
type boolean;
description
"If the node supports flood reduction function defined in
section 4.2.3.8. If this value is set to 'FALSE', it means
that the flood reduction function is disabled.";
}
leaf nonce-increasing-interval {
type uint16;
units seconds;
description
"The configurable nonce increasing interval.";
}
leaf maximum-nonce-delta {
if-feature nonce-delta-adjust;
type uint8 {
range "1..5";
}
description
"The configurable valid nonce delta value used for security.
It is used as vulnerability window defined in section 4.4.7.
If the nonces in received packet exceeds the range indicated
by this value, the packet MUST be discarded.";
}
container rx-lie-multicast-address {
uses addresses;
description
"The configurable LIE receiving IPv4/IPv6 multicast
address. '224.0.0.120' is default address value.
Different multicast addresses can be used for receiving
and sending.";
}
container tx-lie-multicast-address {
uses addresses;
description
"The configurable LIE sending IPv4/IPv6 multicast
address. 'FF02::A1F7' is default address value.
Different multicast addresses can be used for receiving
and sending.";
}
leaf lie-tx-port {
type inet:port-number;
description
"The UDP port of LIE packet sending. The default port
number is 914. The value can be set to other value
associated with different RIFT instance.";
}
/*leaf lie-ipv4-multicast-address {
type rt-types:ipv4-multicast-group-address;
default "224.0.0.120";
description "The configurable LIE IPv4 multicast address.";
}
leaf lie-ipv6-multicast-address {
type rt-types:ipv6-multicast-group-address;
default "FF02::A1F7";
description "The configurable LIE IPv6 multicast address.";
}*/
container global-link-capabilities {
uses link-capabilities;
description
"The node default link capabilities. It can be overwrite
by the configuration underneath interface and neighbor.";
}
leaf rx-flood-port {
type inet:port-number;
default "915";
description
"The UDP port which can be used to receive flooded
TIEs. The default port number is 915. The value can
be set to other value associated with different
RIFT instance.";
}
leaf holdtime {
type rt-types:timer-value-seconds16;
units seconds;
default "3";
description "The holding time of LIE.";
}
leaf tide-generation-interval {
type rt-types:timer-value-seconds16;
units seconds;
default "5";
description "The TIDE generation interval.";
}
leaf tie-security-key-id {
type uint32;
description
"As described in section 4.4.3, this value implies key
type and algorithm. Value 0 means that no valid
fingerprint was computed. This key ID scope is local
to the nodes on both ends of the adjacency.";
}
list interface {
key "name";
leaf link-id {
config false;
type linkid-type;
description "The local id of this interface.";
}
leaf name {
type if:interface-ref;
description "The interface's name.";
}
leaf cost {
type uint32;
description "The cost from this interface to the neighbor.";
}
container advertised-source-addresses {
uses addresses;
description
"The address used in the advertised LIE and TIE packets.";
}
uses direction-type;
leaf was-the-last-lie-accepted {
config false;
type boolean;
description
"If the most recently received LIE was accepted or
rejected. If the LIE was rejected, the neighbor error
notifications should be used to find the reason.";
}
leaf last-lie-reject-reason {
config false;
type string;
description
"Description for the reject reason of the last LIE.";
}
container advertised-in-lies {
config false;
uses lie-elements;
description
"The attributes advertised in the LIEs from
this interface.";
}
container link-capabilities {
uses link-capabilities;
description
"The interface's link capabilities.";
}
leaf state {
config false;
mandatory true;
type enumeration {
enum "OneWay" {
description "The initial state of neighbor.";
}
enum "TwoWay" {
description "This means leaf to leaf.";
}
enum "ThreeWay" {
description "The node is 'top of fabric'.";
}
enum "Multiple-Neighbors-Wait" {
description "The node is 'top of fabric'.";
}
}
description "The hierarchy indications of this node.";
}
container neighbor {
config false;
uses base-node-info;
leaf protocol-version {
type uint16;
description
"Represents the protocol encoding schema version of
this neighbor.";
}
uses neighbor;
description "The neighbor's information.";
}// container neighbor
description "The interface information on this node.";
} // list interface
leaf-list miscabled-links {
config false;
type linkid-type;
description "List of miscabled links.";
}
choice algorithm-type {
case spf {
description "The algorithm is SPF.";
}
case all-path {
description "The algorithm is all-path.";
}
description "The possible algorithm types.";
}
leaf hal {
type level;
config false;
description
"The highest defined level value seen from all valid level
offers received.";
}
leaf instance-label {
type uint32;
description
"As per section 4.3.7, a locally significant, downstream
assigned, interface specific label may be advertised in
its LIEs. This value can be used to distinguish among
multiple RIFT instances.";
}
container database {
config false;
list ties {
key "direction-type originator tie-type tie-number";
uses tie-header;
container node {
uses base-node-info;
leaf flood-reduction {
type boolean;
description
"If the node enable the flood reduction function.";
}
uses node-flag;
leaf startup-time {
type uint64;
description "Startup time of the node.";
}
list neighbors {
key "system-id";
uses base-node-info;
uses neighbor;
description "The node TIE information of a neighbor.";
}
leaf-list miscabled-links {
config false;
type linkid-type;
description "List of miscabled links.";
}
description "The node element information in this TIE.";
}
container prefix {
leaf prefix {
type inet:ip-prefix;
description "The prefix information.";
}
choice type {
case prefix {
description "It is the prefixes TIE element.";
}
case positive-disaggregation {
description
"It is the positive disaggregation prefixes
TIE element.";
}
case negative-disaggregation {
description
"It is the negative disaggregation prefixes
TIE element.";
}
case external {
description
"It is the external prefixes TIE element.";
}
case positive-external-disaggregation {
description
"It is the positive external disaggregation
prefixes TIE element.";
}
case pgp {
description
"It is the policy guide prefixes TIE element.";
}
description "The type of prefix TIE.";
}
leaf metric {
type uint32;
description "The metric of this prefix.";
}
leaf-list tags {
type uint64;
description "The tags of this prefix.";
}
container monotonic-clock {
container prefix-sequence-type {
leaf timestamp {
mandatory true;
type ieee802-1as-timestamp-type;
description
"The timestamp per 802.1AS can be advertised
with the desired prefix North TIEs.";
}
leaf transaction-id {
type uint8;
description
"As per RFC 8505, a sequence number called a
Transaction ID (TID) with a prefix can be
advertised.";
}
description
"As described in section 4.3.3, the prefix sequence
attribute which can be advertised for mobility.";
}
description "The monotonic clock for mobile addresses.";
}
leaf loopback {
type boolean;
description
"Indicates if the interface is a node loopback.
According to section 4.3.10, the node's loopback
address can be injected into North and South
Prefix TIEs for node reachability.";
}
leaf directly-attached {
type boolean;
description
"Indicates that the prefix is directly attached,
i.e. should be routed to even if the node is
in overload.";
}
leaf from-link {
type linkid-type;
description
"In case of locally originated prefixes,
i.e. interface addresses this can describe which
link the address belongs to.";
}
description "The detail information of a prefix.";
}
}
description "The TIEs information in database.";
}// container database
container kv-store {
config false;
list kvs {
key "kvs-index";
leaf kvs-index {
type uint32;
description "The index of a kv pair.";
}
container kvs-tie {
uses tie-header;
container key-value {
leaf key {
type uint16;
description "The type of key value combination.";
}
leaf value {
type uint32;
description "The value of key value combination.";
}
description "The key-value store information.";
}
description "The TIEs in the kv-store.";
}
description
"The information used to distinguish a Key/Value pair.
When the type of kv is set to 'node', node-element is
making sense. When the type of kv is set to other values
except 'node', prefix-info is making sense.";
}
description "The Key/Value store information.";
}// container kv-store
} // node
}//rift
}//augment
/*
* Notifications
*/
notification error-set {
description "The errors notification of RIFT.";
container tie-level-error {
uses tie-header;
description "The level is undefined in the LIEs.";
}
container neighbor-error {
list neighbor {
key "system-id";
uses base-node-info;
leaf protocol-version {
type uint16;
description
"Represents the protocol encoding schema version of
this neighbor.";
}
uses neighbor;
description "The information of a neighbor.";
}
description "The neighbor errors set.";
}
}
}