Internet-Draft RIFT March 2023
Przygienda, et al. Expires 14 September 2023 [Page]
Workgroup:
RIFT Working Group
Internet-Draft:
draft-ietf-rift-rift-17
Published:
Intended Status:
Standards Track
Expires:
Authors:
A. Przygienda, Ed.
Juniper Networks
A. Sharma
Comcast
P. Thubert
Cisco
Bruno. Rijsman
Individual
Dmitry. Afanasiev
Yandex
J. Head
Juniper Networks

RIFT: Routing in Fat Trees

Abstract

This document defines a specialized, dynamic routing protocol for Clos and fat tree network topologies optimized towards minimization of control plane state as well as configuration and operational complexity.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 14 September 2023.

Table of Contents

1. Introduction

Clos [CLOS] topologies (called commonly a fat tree/network in modern IP fabric considerations [VAHDAT08] as homonym to the original definition of the term [FATTREE]) have gained prominence in today's networking, primarily as result of the paradigm shift towards a centralized data-center based architecture that is poised to deliver a majority of computation and storage services in the future. Many builders of such IP fabrics desire a protocol that auto-configures itself and deals with failures and mis-configurations with a minimum of human intervention. Such a solution would allow local IP fabric bandwidth to be consumed in a 'standard component' fashion, i.e. provision it much faster and operate it at much lower costs than today, much like compute or storage is consumed already.

In looking at the problem through the lens of such IP fabric requirements, RIFT addresses those challenges not through an incremental modification of either a link-state (distributed computation) or distance-vector (diffused computation) techniques but rather a mixture of both, colloquially best described as "link-state towards the spines" and "distance vector towards the leaves". In other words, "bottom" levels are flooding their link-state information in the "northern" direction while each node generates under normal conditions a "default route" and floods it in the "southern" direction. This type of protocol allows naturally for highly desirable aggregation. Alas, such aggregation could drop traffic in cases of misconfiguration or while failures are being resolved or even cause partial network partitioning and this has to be addressed by some adequate mechanism. The approach RIFT takes is described in Section 4.2.5 and is basically based on automatic, sufficient disaggregation of prefixes in case of link and node failures.

The protocol does further provide:

  • optional fully automated construction of fat tree topologies based on detection of links without any configuration (Section 4.2.7) while allowing for conventional configuration methods and arbitrary mix of both types of nodes as well,
  • minimum amount of routing state held at each level,
  • automatic pruning and load balancing of topology flooding exchanges over a sufficient subset of links (Section 4.2.3.9),
  • automatic aggregation (Section 4.2.3.8) and consequently automatic disaggregation (Section 4.2.5) of prefixes on link and node failures to prevent traffic loss and suboptimal routing,
  • loop-free non-ECMP forwarding due to its inherent valley-free nature,
  • fast mobility (Section 4.3.4),
  • re-balancing of traffic towards the spines based on bandwidth available (Section 4.3.7.1), and finally
  • mechanisms to synchronize a limited key-value data-store (Section 4.3.5.1) that can be used after protocol convergence to e.g. bootstrap higher levels of functionality on nodes.

Figure 1 presents as first example of operation a simplified, conceptual view of the resulting information and routes on a RIFT fabric. The top of the fabric is holding in its link-state database the information about the nodes below it and the routes to them whereas the notation A/32 is used to indicate a loopback route to node A and 0/0 is the usual notation for a default route. First row of information represents the nodes for which full topology information is available. The second row of the database table indicates that partial information of other nodes in the same level is available as well. Such information will be necessary to perform certain algorithms necessary for correct protocol operation. When "bottom" of the fabric is considered, or in other words the leaves, the topology is basically empty and, under normal conditions, the leaves hold a load balanced default route to the next level.

The balance of this document fills in the protocol specification details.

rift-rift-information-distribution
Figure 1: RIFT Information Distribution

1.1. Requirements 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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

2. A Reader's Digest

This section should serve as an initial guided tour through the document in order to convey the necessary information for any reader, depending on their level of interest. The glossary section (Section 3.1) should be used as a supporting reference as the document is read.

The indications of direction (i.e. "top", "bottom", etc.) referenced in the Section 1 are of paramount importance. RIFT (Routing in Fat Trees) requires a topology with a sense of top and bottom in order to properly achieve a sorted topology. Clos, Fat Tree, and other similarly structured networks are conducive to such requirements. RIFT does allow for further relaxation of these constraints, they will be mentioned later in this section.

Operators and implementors alike must understand if multi-plane IP fabrics are of interest or not. Section 3.2 illustrates an example of both single-plane in Figure 2 and multi-plane fabric in Figure 3. Multi-plane fabrics require understanding of additional RIFT concepts (e.g. negative disaggregation in Section 4.2.5.2) that are otherwise unnecessary in context of strictly single-plane fabrics. The Overview (Section 4.1) and Section 4.1.2 aim to provide enough context to determine if multi-plane fabrics are of interest to the reader. The Fallen Leaf part (Section 4.1.3), and additionally Section 4.1.4 and Section 4.1.5 describe further considerations that are specific to multi-plane fabrics.

The fundamental protocol concepts are described starting in the specification part (Section 4.2), but some sub-sections are not quite as relevant unless dealing with implementation of the protocol. The protocol transport (Section 4.2.1) is of particular importance for two reasons. First, it introduces RIFT's packet formats in the form of a normative Thrift model given in Appendix B.3. Second, the Thrift model component is a prelude to understanding the RIFT's inherent security features as defined in both security models part (Section 4.4) and the security segment (Section 7). The normative schema defining the Thrift model can be found in both Appendix B.2 and Appendix B.3. Furthermore, while a detailed understanding of Thrift [thrift] and the models is not required unless implementing RIFT, they may provide additional useful information for other readers.

If implementing RIFT to support multi-plane topologies Section 4.2 should be reviewed in its entirety in conjunction with the previously mentioned Thrift schemas. Sections not relevant to single-plane implementations will be noted later in the section. Special attention should be paid to the Link Information Element (LIE) definitions part (Section 4.2.2) as it not only outlines basic neighbor discovery and adjacency formation, but also provides necessary context for RIFT's Zero Touch Provisioning (ZTP) (Section 4.2.7) and mis-cabling detection capabilities that allow it to automatically detect and build the underlay topology with negligible configuration. These specific capabilities are detailed in Section 4.2.7.

For other readers, the following sections provide a more detailed understanding of the fundamental properties and highlight some additional benefits of RIFT such as link state packet formats, efficient flooding, synchronization, loop-free path computation and link-state database maintenance - Section 4.2.3, Section 4.2.3.2, Section 4.2.3.3, Section 4.2.3.4, Section 4.2.3.6, Section 4.2.3.7, Section 4.2.3.8, Section 4.2.4, Section 4.2.4.1, Section 4.2.4.2, Section 4.2.4.3, Section 4.2.4.4. RIFT's ability to perform weighted unequal-cost load balancing of traffic across all available links is outlined in Section 4.3.7 with an accompanying example.

Section 4.2.5 is the place where the single-plane vs. multi-plane requirement is explained in more detail. For those interested in single-plane fabrics, only Section 4.2.5.1 is required. For the multi-plane interested reader Section 4.2.5.2, Section 4.2.5.2.1, Section 4.2.5.2.2, and Section 4.2.5.2.3 are also mandatory. Section 4.2.6 is especially important for any multi-plane interested reader as it outlines how the RIB and FIB are built via the disaggregation mechanisms, but also illustrates how they prevent defective routing decisions that cause traffic loss in both single or multi-plane topologies.

Section 5 contains a set of comprehensive examples that show how RIFT contains the impact of failures to only the required set of nodes. It should also help cement some of RIFT's core concepts in the reader's mind.

Last, but not least, RIFT has other optional capabilities. One example is the key-value data-store, which enables RIFT to advertise data post-convergence in order to bootstrap higher levels of functionality (e.g. operational telemetry). Those are covered in Section 4.3 and Section 6.

More information related to RIFT can be found in the "RIFT Applicability" [APPLICABILITY] document, which discusses alternate topologies upon which RIFT may be deployed, use cases where it is applicable, and presents operational considerations that complement this document.

3. Reference Frame

3.1. Terminology

This section presents the terminology used in this document.

Crossbar:
Physical arrangement of ports in a switching matrix without implying any further scheduling or buffering disciplines.
Clos/Fat Tree:
This document uses the terms Clos and Fat Tree interchangeably whereas it always refers to a folded spine-and-leaf topology with possibly multiple Points of Delivery (PoDs) and one or multiple Top of Fabric (ToF) planes. Several modifications such as leaf-2-leaf shortcuts and multiple level shortcuts are possible and described further in the document.
Directed Acyclic Graph (DAG):
A finite directed graph with no directed cycles (loops). If links in a Clos are considered as either being all directed towards the top or vice versa, each of such two graphs is a DAG.
Folded Spine-and-Leaf:
In case the Clos fabric input and output stages are analogous, the fabric can be "folded" to build a "superspine" or top which is called Top of Fabric (ToF) in this document.
Level:
Clos and Fat Tree networks are topologically partially ordered graphs and 'level' denotes the set of nodes at the same height in such a network, where the bottom level (leaf) is the level with lowest value. A node has links to nodes one level down and/or one level up. Under some circumstances, a node may have links to nodes at the same level and a leaf may have links to nodes multiple levels higher. RIFT counts levels from top-of-fabric (ToF) numerically down. Level 0 always implies a leaf in RIFT but a leaf does not have to be level 0. Level in RIFT can be configured or automatically derived via Section 4.2.7. As a final footnote: Clos terminology uses often the concept of "stage" but due to the folded nature of the Fat Tree it is not used from this point on to prevent misunderstandings.
Superspine, Aggregation/Spine and Edge/Leaf Switches:"
Traditional level names in 5-stages folded Clos for Level 2, 1 and 0 respectively (counting up from the bottom). We normalize this language to talk about top-of-fabric (ToF), top-of-pod (ToP) and leaves.
Zero Touch Provisioning (ZTP):
Optional RIFT mechanism which allows to derive node levels automatically based on minimum configuration. Such a mininum configuration consists solely of ToFs being configured as such.
Point of Delivery (PoD):
A self-contained vertical slice or subset of a Clos or Fat Tree network containing normally only level 0 and level 1 nodes. A node in a PoD communicates with nodes in other PoDs via the Top-of-Fabric. PoDs are numbered to distinguish them and PoD value 0 (defined later in the encoding schema as `common.default_pod`) is used to denote "undefined" or "any" PoD.
Top of PoD (ToP):
The set of nodes that provide intra-PoD communication and have northbound adjacencies outside of the PoD, i.e. are at the "top" of the PoD.
Top of Fabric (ToF):
The set of nodes that provide inter-PoD communication and have no northbound adjacencies, i.e. are at the "very top" of the fabric. ToF nodes do not belong to any PoD and are assigned `common.default_pod` PoD value to indicate the equivalent of "any" PoD.
Spine:
Any nodes north of leaves and south of top-of-fabric nodes. Multiple layers of spines in a PoD are possible.
Leaf:
A node without southbound adjacencies. As mentioned before, Level 0 implies a leaf in RIFT but a leaf does not have to be level 0.
Top-of-fabric Plane or Partition:
In large fabrics top-of-fabric switches may not have enough ports to aggregate all switches south of them and with that, the ToF is 'split' into multiple independent planes. Section 4.1.2 explains the concept in more detail. A plane is a subset of ToF nodes that are aware of each other through south reflection or E-W links.
Radix:
A radix of a switch is number of switching ports it provides. It's sometimes called fanout as well.
North Radix:
Ports cabled northbound to higher level nodes.
South Radix:
Ports cabled southbound to lower level nodes.
South/Southbound and North/Northbound (Direction):
When describing protocol elements and procedures, in different situations the directionality of the compass is used. I.e., 'lower', 'south' or 'southbound' mean moving towards the bottom of the Clos or Fat Tree network and 'higher', 'north' and 'northbound' mean moving towards the top of the Clos or Fat Tree network.
Northbound Link:
A link to a node one level up or in other words, one level further north.
Southbound Link:
A link to a node one level down or in other words, one level further south.
East-West (E-W) Link:
A link between two nodes at the same level. East-West links are normally not part of Clos or "fat tree" topologies.
Leaf shortcuts (L2L):
East-West links at leaf level will need to be differentiated from East-West links at other levels.
Routing on the host (RotH):
Modern data center architecture variant where servers/leaves are multi-homed and consecutively participate in routing.
Northbound representation:
Subset of topology information flooded towards higher levels of the fabric.
Southbound representation:
Subset of topology information sent towards a lower level.
South Reflection:
Often abbreviated just as "reflection", it defines a mechanism where South Node TIEs are "reflected" from the level south back up north to allow nodes in the same level without E-W links to be aware of each other's node Topology Information Elements (TIEs).
TIE:
This is an acronym for a "Topology Information Element". TIEs are exchanged between RIFT nodes to describe parts of a network such as links and address prefixes. A TIE has always a direction and a type. North TIEs (sometimes abbreviated as N-TIEs) are used when dealing with TIEs in the northbound representation and South-TIEs (sometimes abbreviated as S-TIEs) for the southbound equivalent. TIEs have different types such as node and prefix TIEs.
Node TIE:
This stands as acronym for a "Node Topology Information Element", which contains all adjacencies the node discovered and information about the node itself. Node TIE should not be confused with a North TIE since "node" defines the type of TIE rather than its direction. Consequently North Node TIEs and South Node TIEs exist.
Prefix TIE:
This is an acronym for a "Prefix Topology Information Element" and it contains all prefixes directly attached to this node in case of a North TIE and in case of South TIE the necessary default routes the node advertises southbound.
Key Value (KV) TIE:
A TIE that is carrying a set of key value pairs [DYNAMO]. It can be used to distribute non topology related information within the protocol.
TIDE:
Topology Information Description Element carrying descriptors of the TIEs stored in the node.
TIRE:
Topology Information Request Element carrying set of TIDE descriptors. It can both confirm received and request missing TIEs.
Disaggregation:
Process in which a node decides to advertise more specific prefixes Southwards, either positively to attract the corresponding traffic, or negatively to repel it. Disaggregation is performed to prevent traffic loss and suboptimal routing to the more specific prefixes.
LIE:
This is an acronym for a "Link Information Element" exchanged on all the system's links running RIFT to form ThreeWay adjacencies and carry information used to perform Zero Touch Provisioning (ZTP) of levels.
Valid LIE:
LIEs undergo different checks to determine their validity. The term "valid LIE" is used to describe a LIE that can be used to form or maintain an adjacency. The amount of checks itself depends on the FSM involved and its state. A "minimally valid LIE" is a LIE that passes checks necessary on any FSM in in any state. A "ThreeWay valid LIE" is a LIE that successfully underwent further checks with a LIE FSM in ThreeWay state. Minimally valid LIE is a subcategory of ThreeWay valid LIE.
Flood Repeater (FR):
A node can designate one or more northbound neighbor nodes to be flood repeaters. The flood repeaters are responsible for flooding northbound TIEs further north. The document sometimes calls them flood leaders as well.
Bandwidth Adjusted Distance (BAD):
Each RIFT node can calculate the amount of northbound bandwidth available towards a node compared to other nodes at the same level and can modify the route distance accordingly to allow for the lower level to adjust their load balancing towards spines.
Overloaded:
Applies to a node advertising the `overload` attribute as set. Overload attribute is carried in the `NodeFlags` object of the encoding schema.
Interface:
A layer 3 entity over which RIFT control packets are exchanged.
ThreeWay Adjacency:
RIFT tries to form a unique adjacency between two nodes over a point-to-point interface and exchange local configuration and necessary ZTP information. An adjacency is only advertised in Node TIEs and used for computations after it achieved ThreeWay state, i.e. both routers reflected each other in LIEs including relevant security information. Nevertheless, LIEs before ThreeWay state is reached may carry ZTP related information already.
Bi-directional Adjacency:
Bidirectional adjacency is an adjacency where nodes of both sides of the adjacency advertised it in the Node TIEs with the correct levels and system IDs. Bi-directionality is used to check in different algorithms whether the link should be included.
Neighbor:
Once a ThreeWay adjacency has been formed a neighborship relationship contains the neighbor's properties. Multiple adjacencies can be formed to a remote node via parallel point-to-point interfaces but such adjacencies are *not* sharing a neighbor structure. Saying "neighbor" is thus equivalent to saying "a ThreeWay adjacency".
Metric:
The cost between two neighbors exactly one layer 3 hop away from each other.
Cost:
The sum of metrics between two nodes.
Distance:
The sum of costs (bound by infinite distance) between two nodes.
Shortest-Path First (SPF):
A well-known graph algorithm attributed to Dijkstra [DIJKSTRA] that establishes a tree of shortest paths from a source to destinations on the graph. SPF acronym is used due to its familiarity as general term for the node reachability calculations RIFT can employ to ultimately calculate routes of which Dijkstra algorithm is a possible one.
North SPF (N-SPF):
A reachability calculation that is progressing northbound, as example SPF that is using South Node TIEs only. Normally it progresses a single hop only and installs default routes.
South SPF (S-SPF):
A reachability calculation that is progressing southbound, as example SPF that is using North Node TIEs only.
Security Envelope:
RIFT packets are flooded within an authenticated security envelope that allows to protect the integrity of information a node accepts.
System ID:
RIFT nodes identify themselves with a unique network-wide number when trying to build adjacencies or describe their topology. RIFT System IDs can be auto-derived or configured.

Additionally, when the specification refers to elements of packet encoding or constants provided in the Appendix B grave accents are used, e.g. `invalid_distance`. Same convention is used when referring to finite state machine states or events outside the context of the machine itself, e.g. `OneWay`.

3.2. Topology

Topology in Figure 2 is refered to in all further considerations. This figure depicts a generic "single plane fat tree" and the concepts explained using three levels apply by induction to further levels and higher degrees of connectivity. Further, this document will deal also with designs that provide only sparser connectivity and "partitioned spines" as shown in Figure 3 and explained further in Section 4.1.2.

4. RIFT: Routing in Fat Trees

The remainder of this document presents the detailed specification of a protocol optimized for Routing in Fat Trees (RIFT) that in most abstract terms has many properties of a modified link-state protocol when distributing information northbound and a distance vector protocol when distributing information southbound. While this is an unusual combination, it does quite naturally exhibit the desirable properties desired.

4.1. Overview

4.1.1. Properties

The most singular property of RIFT is that it floods link-state information northbound only so that each level obtains the full topology of levels south of it. Link-State information is, with some exceptions, never flooded East-West or back South again. Exceptions like south reflection is explained in detail in Section 4.2.5.1 and east-west flooding at ToF level in multi-plane fabrics is outlined in Section 4.1.2. In the southbound direction, the necessary routing information, normally just the default route, propagates one hop south and is 're-advertised' by nodes at next lower level. However, RIFT uses flooding in the southern direction as well to avoid the overhead of building an update per adjacency. For the moment describing the East-West direction is left out.

Those information flow constraints create not only an anisotropic protocol (i.e. the information is not distributed "evenly" or "clumped" but summarized along the N-S gradient) but also a "smooth" information propagation where nodes do not receive the same information from multiple directions at the same time. Normally, accepting the same reachability on any link, without understanding its topological significance, forces tie-breaking on some kind of distance metric. And such tie-breaking leads ultimately in hop-by-hop forwarding to shortest paths only. In contrast to that, RIFT, under normal conditions, does not need to tie-break the same reachability information from multiple directions. Its computation principles (south forwarding direction is always preferred) leads to valley-free [VFR] forwarding behavior. And since valley free routing is loop-free, it can use all feasible paths which is another highly desirable property if available bandwidth should be utilized to the maximum extent possible.

To account for the "northern" and the "southern" information split the link state database is partitioned accordingly into "north representation" and "south representation" TIEs. In simplest terms the North TIEs contain a link state topology description of lower levels and and South TIEs carry simply node description of the level above and default routes pointing north. This oversimplified view will be refined gradually in the following sections while introducing protocol procedures and state machines at the same time.

4.1.2. Generalized Topology View

This section and resulting Section 4.2.5.2 are dedicated to multi-plane fabrics, in contrast with the single plane designs where all top-of-fabric nodes are topologically equal and initially connected to all the switches at the level below them.

It is quite difficult to visualize multi plane design, which are effectively multi-dimensional switching matrices. To cope with that, this document introduces a methodology allowing to depict the connectivity in two-dimensional pictures. Further, the fact can be leveraged that what is under consideration here are basically stacked crossbar fabrics where ports align "on top of each other" in a regular fashion.

A word of caution to the reader; at this point it should be observed that the language used to describe Clos variations, especially in multi-plane designs, varies widely between sources. This description follows the terminology introduced in Section 3.1. It is unavoidable to have it present to be able to follow the rest of this section correctly.

4.1.2.1. Terminology and Glossary

This section describes the terminology and acronyms used in the rest of the text. Though the glossary may not be comprehensible on a first read, the following sections will gradually introduce the terms in their proper context.

P:
Denotes the number of PoDs in a topology.
S:
Denotes the number of ToF nodes in a topology.
K:
To simplify the visual aids, notations and further considerations, implicit assumption is made that the switches are symmetrical, i.e. equal number ports point northbound and southbound. With that simplification, K denotes half of the radix of a symmetrical switch, meaning that the switch has K ports pointing north and K ports pointing south. K_LEAF (K of a leaf) thus represents both the number of access ports in a leaf Node and the maximum number of planes in the fabric, whereas K_TOP (K of a ToP) represents the number of leaves in the PoD and the number of ports pointing north in a ToP Node towards a higher spine level, thus the number of ToF nodes in a plane.
ToF Plane:
Set of ToFs that are aware of each other by means of south reflection. Planes are numbered by capital letters, e.g. plane A.
N:
Denotes the number of independent ToF planes in a topology.
R:
Denotes a redundancy factor, i.e. number of connections a spine has towards a ToF plane. In single plane design K_TOP is equal to R.
Fallen Leaf:
A fallen leaf in a plane Z is a switch that lost all connectivity northbound to Z.
4.1.2.2. Clos as Crossed, Stacked Crossbars

The typical topology for which RIFT is defined is built of P number of PoDs and connected together by S number of ToF nodes. A PoD node has K number of ports. From here on half of them (K=Radix/2) are assumed to connect host devices from the south, and the other half to connect to interleaved PoD Top-Level switches to the north. The K ratio can be chosen differently without loss of generality when port speeds differ or the fabric is oversubscribed but K=Radix/2 allows for more readable representation whereby there are as many ports facing north as south on any intermediate node. A node is hence represented in a schematic fashion with ports "sticking out" to its north and south rather than by the usual real-world front faceplate designs of the day.

Figure 4 provides a view of a leaf node as seen from the north, i.e. showing ports that connect northbound. For lack of a better symbol, the document chooses to use the "o" as ASCII visualisation of a single port. In this example, K_LEAF has 6 ports. Observe that the number of PoDs is not related to Radix unless the ToF Nodes are constrained to be the same as the PoD nodes in a particular deployment.

The Radix of a PoD's top node may be different than that of the leaf node. Though, more often than not, a same type of node is used for both, effectively forming a square (K*K). In the general case, switches at the top of the PoD with K_TOP southern ports not necessarily equal to K_LEAF could be considered . For instance, in the representations below, we pick a 6 port K_LEAF and a 8 port K_TOP. In order to form a crossbar, K_TOP Leaf Nodes are necessary as illustrated in Figure 5.

As further visualized in Figure 6 the K_TOP Leaf Nodes are fully interconnected with the K_LEAF ToP nodes, providing connectivity that can be represented as a crossbar when "looked at" from the north. The result is that, in the absence of a failure, a packet entering the PoD from the north on any port can be routed to any port in the south of the PoD and vice versa. And that is precisely why it makes sense to talk about a "switching matrix".

Side views of this PoD is illustrated in Figure 7 and Figure 8.

As next step, observe further that a resulting PoD can be abstracted as a bigger node with a number K of K_POD= K_TOP * K_LEAF, and the design can recurse.

It will be critical at this point that, before progressing further, the concept and the picture of "crossed crossbars" is clear. Else, the following considerations might be difficult to comprehend.

To continue, the PoDs are interconnected with each other through a Top-of-Fabric (ToF) node at the very top or the north edge of the fabric. The resulting ToF is *not* partitioned if, and only if (IIF), every PoD top level node (spine) is connected to every ToF Node. This topology is also referred to as a single plane configuration and is quite popular due to its simplicity. In order to reach a 1:1 connectivity ratio between the ToF and the leaves, it results that there are K_TOP ToF nodes, because each port of a ToP node connects to a different ToF node, and K_LEAF ToP nodes for the same reason. Consequently, it will take (P * K_LEAF) ports on a ToF node to connect to each of the K_LEAF ToP nodes of the P PoDs. Figure 9 illustrates this, looking at P=3 PoDs from above and 2 sides. The large view is the one from above, with the 8 ToF of 3*6 ports each interconnecting the PoDs, every ToP Node being connected to every ToF node.

The top view can be collapsed into a third dimension where the hidden depth index is representing the PoD number. One PoD can be shown then as a class of PoDs and hence save one dimension in the representation. The Spine Node expands in the depth and the vertical dimensions, whereas the PoD top level Nodes are constrained, in horizontal dimension. A port in the 2-D representation represents effectively the class of all the ports at the same position in all the PoDs that are projected in its position along the depth axis. This is shown in Figure 10.

As simple as single plane deployment is, it introduces a limit due to the bound on the available radix of the ToF nodes that has to be at least P * K_LEAF. Nevertheless, it will be come clear that a distinct advantage of a connected or non-partitioned Top-of-Fabric is that all failures can be resolved by simple, non-transitive, positive disaggregation (i.e. nodes advertising more specific prefixes with the default to the level below them that is however not propagated further down the fabric) as described in Section 4.2.5.1 . In other words; non-partitioned ToF nodes can always reach nodes below or withdraw the routes from PoDs they cannot reach unambiguously. And with this, positive disaggregation can heal all failures and still allow all the ToF nodes to be aware of each other via south reflection. Disaggregation will be explained in further detail in Section 4.2.5.

In order to scale beyond the "single plane limit", the Top-of-Fabric can be partitioned by an N number of identically wired planes where N is an integer divider of K_LEAF. The 1:1 ratio and the desired symmetry are still served, this time with (K_TOP * N) ToF nodes, each of (P * K_LEAF / N) ports. N=1 represents a non-partitioned Spine and N=K_LEAF is a maximally partitioned Spine. Further, if R is any integer divisor of K_LEAF, then N=K_LEAF/R is a feasible number of planes and R a redundancy factor that denotes the number of independent paths between 2 leaves within a plane. It proves convenient for deployments to use a radix for the leaf nodes that is a power of 2 so they can pick a number of planes that is a lower power of 2. The example in Figure 11 splits the Spine in 2 planes with a redundancy factor R=3, meaning that there are 3 non-intersecting paths between any leaf node and any ToF node. A ToF node must have, in this case, at least 3*P ports, and be directly connected to 3 of the 6 ToP nodes (spines) in each PoD. The ToP nodes are represented horizontally with K_TOP=8 ports northwards each.

At the extreme end of the spectrum it is even possible to fully partition the spine with N = K_LEAF and R=1, while maintaining connectivity between each leaf node and each Top-of-Fabric node. In that case the ToF node connects to a single Port per PoD, so it appears as a single port in the projected view represented in Figure 12. The number of ports required on the Spine Node is more than or equal to P, the number of PoDs.

4.1.3. Fallen Leaf Problem

As mentioned earlier, RIFT exhibits an anisotropic behavior tailored for fabrics with a North / South orientation and a high level of interleaving paths. A non-partitioned fabric makes a total loss of connectivity between a Top-of-Fabric node at the north and a leaf node at the south a very rare but yet possible occasion that is fully healed by positive disaggregation as described in Section 4.2.5.1. In large fabrics or fabrics built from switches with low radix, the ToF ends often being partitioned in planes which makes the occurrence of having a given leaf being only reachable from a subset of the ToF nodes more likely to happen. This makes some further considerations necessary.

A "Fallen Leaf" is a leaf that can be reached by only a subset, but not all, of Top-of-Fabric nodes due to missing connectivity. If R is the redundancy factor, then it takes at least R breakages to reach a "Fallen Leaf" situation.

In a maximally partitioned fabric, the redundancy factor is R=1, so any breakage in the fabric will cause one or more fallen leaves in the affected plane. R=2 guarantees that a single breakage will not cause a fallen leaf. However, not all cases require disaggregation. The following cases do not require particular action:

  • If a southern link on a node goes down, then connectivity through that node is lost for all nodes south of it. There is no need to disaggregate since the connectivity to this node is lost for all spine nodes in a same fashion.
  • If a ToF Node goes down, then northern traffic towards it is routed via alternate ToF nodes in the same plane and there is no need to disaggregate routes.

In a general manner, the mechanism of non-transitive positive disaggregation is sufficient when the disaggregating ToF nodes collectively connect to all the ToP nodes in the broken plane. This happens in the following case:

  • If the breakage is the last northern link from a ToP node to a ToF node going down, then the fallen leaf problem affects only the ToF node, and the connectivity to all the nodes in the PoD is lost from that ToF node. This can be observed by other ToF nodes within the plane where the ToP node is located and positively disaggregated within that plane.

On the other hand, there is a need to disaggregate the routes to Fallen Leaves within the plane in a transitive fashion, that is, all the way to the other leaves, in the following cases:

  • If the breakage is the last northern link from a leaf node within a plane (there is only one such link in a maximally partitioned fabric) that goes down, then connectivity to all unicast prefixes attached to the leaf node is lost within the plane where the link is located. Southern Reflection by a leaf node, e.g., between ToP nodes, if the PoD has only 2 levels, happens in between planes, allowing the ToP nodes to detect the problem within the PoD where it occurs and positively disaggregate. The breakage can be observed by the ToF nodes in the same plane through the North flooding of TIEs from the ToP nodes. The ToF nodes however need to be aware of all the affected prefixes for the negative, possibly transitive disaggregation to be fully effective (i.e. a node advertising in the control plane that it cannot reach a certain more specific prefix than default whereas such disaggregation must in the extreme condition propagate further down southbound). The problem can also be observed by the ToF nodes in the other planes through the flooding of North TIEs from the affected leaf nodes, together with non-node North TIEs which indicate the affected prefixes. To be effective in that case, the positive disaggregation must reach down to the nodes that make the plane selection, which are typically the ingress leaf nodes. The information is not useful for routing in the intermediate levels.
  • If the breakage is a ToP node in a maximally partitioned fabric (in which case it is the only ToP node serving the plane in that PoD that goes down), then the connectivity to all the nodes in the PoD is lost within the plane where the ToP node is located. Consequently, all leaves of the PoD fall in this plane. Since the Southern Reflection between the ToF nodes happens only within a plane, ToF nodes in other planes cannot discover fallen leaves in a different plane. They also cannot determine beyond their local plane whether a leaf node that was initially reachable has become unreachable. As the breakage can be observed by the ToF nodes in the plane where the breakage happened, the ToF nodes in the plane need to be aware of all the affected prefixes for the negative disaggregation to be fully effective. The problem can also be observed by the ToF nodes in the other planes through the flooding of North TIEs from the affected leaf nodes, if there are only 3 levels and the ToP nodes are directly connected to the leaf nodes, and then again it can only be effective it is propagated transitively to the leaf, and useless above that level.

For the sake of easy comprehension the abstractions are rolled back into a simple example that shows that in Figure 3 the loss of link between spine node 3 and leaf node 3 will make leaf node 3 a fallen leaf for Top-of-Fabric plane C. Worse, if the cabling was never present in the first place, plane C will not even be able to know that such a fallen leaf exists. Hence partitioning without further treatment results in two grave problems:

  • Leaf node 1 trying to route to leaf node 3 must not choose spine node 3 in plane C as its next hop since it will inevitably drop the packet when forwarding using default routes or do excessive bow tying. This information must be in its routing table.
  • A path computation trying to deal with the problem by distributing host routes may only form paths through leaves. The flooding of information about leaf node 3 would have to go up to Top-of-Fabric nodes in planes A, B, and D and then "loopback" over other leaves to ToF C leading in extreme cases to traffic for leaf node 3 when presented to plane C taking an "inverted fabric" path where leaves start to serve as ToFs, at least for the duration of a protocol's convergence.

4.1.4. Discovering Fallen Leaves

When aggregation is used, RIFT deals with fallen leaves by ensuring that all the ToF nodes share the same north topology database. This happens naturally in single plane design by the means of northbound flooding and south reflection but needs additional considerations in multi-plane fabrics. To enable routing to fallen leaves in multi-plane designs, RIFT requires additional interconnection across planes between the ToF nodes, e.g., using rings as illustrated in Figure 13. Other solutions are possible but they either need more cabling or end up having much longer flooding paths and/or single points of failure.

In detail, by reserving at least two ports on each Top-of-Fabric node it is possible to connect them together by interplane bi-directional rings as illustrated in Figure 13. The rings will be used to exchange full north topology information between planes. All ToFs having same north topology allows by the means of transitive, negative disaggregation described in Section 4.2.5.2 to efficiently fix any possible fallen leaf scenario. Somewhat as a side-effect, the exchange of information fulfills the requirement to have a full view of the fabric topology at the Top-of-Fabric level, without the need to collate it from multiple points.

4.1.5. Addressing the Fallen Leaves Problem

One consequence of the "Fallen Leaf" problem is that some prefixes attached to the fallen leaf become unreachable from some of the ToF nodes. RIFT defines two methods to address this issue, the positive and the negative disaggregation. Both methods flood corresponding types of South TIEs to advertise the impacted prefix(es).

When used for the operation of disaggregation, a positive South TIE, as usual, indicates reachability to a prefix of given length and all addresses subsumed by it. In contrast, a negative route advertisement indicates that the origin cannot route to the advertised prefix.

The positive disaggregation is originated by a router that can still reach the advertised prefix, and the operation is not transitive. In other words, the receiver does *not* generate its own TIEs or flood them south as a consequence of receiving positive disaggregation advertisements from a higher level node. The effect of a positive disaggregation is that the traffic to the impacted prefix will follow the longest match and will be limited to the northbound routers that advertised the more specific route.

In contrast, the negative disaggregation can be transitive, and is propagated south when all the possible routes have been advertised as negative exceptions. A negative route advertisement is only actionable when the negative prefix is aggregated by a positive route advertisement for a shorter prefix. In such case, the negative advertisement "punches out a hole" in the positive route in the routing table, making the positive prefix reachable through the originator with the special consideration of the negative prefix removing certain next hop neighbors. The specific procedures will be explained in detail in Section 4.2.5.2.3.

When the top of fabric switches are not partitioned into multiple planes, the resulting southbound flooding of the positive disaggregation by the ToF nodes that can still reach the impacted prefix is in general enough to cover all the switches at the next level south, typically the ToP nodes. If all those switches are aware of the disaggregation, they collectively create a ceiling that intercepts all the traffic north and forwards it to the ToF nodes that advertised the more specific route. In that case, the positive disaggregation alone is sufficient to solve the fallen leaf problem.

On the other hand, when the fabric is partitioned in planes, the positive disaggregation from ToF nodes in different planes do not reach the ToP switches in the affected plane and cannot solve the fallen leaves problem. In other words, a breakage in a plane can only be solved in that plane. Also, the selection of the plane for a packet typically occurs at the leaf level and the disaggregation must be transitive and reach all the leaves. In that case, the negative disaggregation is necessary. The details on the RIFT approach to deal with fallen leaves in an optimal way are specified in Section 4.2.5.2.

4.2. Specification

This section specifies the protocol in a normative fashion by either prescriptive procedures or behavior defined by Finite State Machines (FSM).

The FSMs, as usual, are presented as states a neighbor can assume, events that it can be given and the corresponding actions performed when transitioning between states on event processing.

Actions are performed before the end state is assumed.

The FSMs can queue events against itself to chain actions or against other FSMs in the specification. Events are always processed in the sequence they have been queued.

Consequently, "On Entry" actions on FSM state are performed every time and right before the corresponding state is entered, i.e. after any transitions from previous state.

"On Exit" actions are performed every time and immediately when a state is exited, i.e. before any transitions towards target state are performed.

Any attempt to transition from a state towards another on reception of an event where no action is specified must be considered an unrecoverable error, i.e. the protocol MUST reset all adjacencies, discard all the state and may not start again.

The data structures and FSMs described in this document are conceptual and do not have to be implemented precisely as described here, as long as the implementations support the described functionality and exhibit the same externally visible behavior.

The machines can use conceptually "timers" for different situations. Those timers are started through actions and their expiration leads to queuing of corresponding events to be processed.

The term `holdtime` is used often as short-hand for `holddown timer` and signifies either the length of the holding down period or the timer used to expire after such period. Such timers are used to "hold down" state within an FSM that is cleaned if the machine triggers a `HoldtimeExpired` event.

4.2.1. Transport

All RIFT packet structures and their contents are defined in the Thrift [thrift] models in Appendix B. The packet structure itself is defined in `ProtocolPacket` which contains the packet header (`PacketHeader`) and the packet contents (`PacketContent`). `PacketContent` is a union of the LIE, TIE, TIDE, and TIRE packets and are defined in `LIEPacket`, `TIEPacket`, `TIDEPacket`, and `TIREPacket` respectively.

In terms of bits on the wire, it is the `ProtocolPacket` that is serialized and carried in an envelope defined in Section 4.4.3 within a UDP frame that provides security and allows validation/modification of several important fields without de-serialization for performance and security reasons. Security model and procedures are further explained in Section 7.

RIFT LIE exchange auto-discovers neighbors, negotiates ZTP parameters and discovers miscablings. The formation progresses under normal conditions from OneWay to TwoWay and then ThreeWay state at which point it is ready to exchange TIEs per Section 4.2.3. The adjacency exchanges ZTP information (Section 4.2.7) in any of the states, i.e. it is not necessary to reach ThreeWay for zero-touch provisioning to operate.

RIFT supports any combination of IPv4 and IPv6 addressing on the fabric with the additional capability for forwarding paths that are capable of forwarding IPv4 packets in presence of IPv6 addressing only.

For IPv4 LIE exchange happens over well-known administratively locally scoped and configured or otherwise well-known IPv4 multicast address [RFC2365]. For IPv6 [RFC8200] exchange is performed over link-local multicast scope [RFC4291] address which is configured or otherwise well-known. In both cases a destination UDP port defined in the schema Appendix B.2 is used unless configured otherwise. LIEs MUST be sent with an IPv4 Time to Live (TTL) or an IPv6 Hop Limit (HL) of either 1 or 255 to prevent RIFT information reaching beyond a single L3 next-hop in the topology. LIEs SHOULD be sent with network control precedence unless an implementation is prevented from doing so [RFC2474].

The originating port of the LIE has no further significance other than identifying the origination point. LIEs are exchanged over all links running RIFT.

An implementation may listen and send LIEs on IPv4 and/or IPv6 multicast addresses. A node MUST NOT originate LIEs on an address family if it does not process received LIEs on that family. LIEs on same link are considered part of the same LIE FSM independent of the address family they arrive on. Observe further that the LIE source address may not identify the peer uniquely in unnumbered or link-local address cases so the response transmission MUST occur over the same interface the LIEs have been received on. A node may use any of the adjacency's source addresses it saw in LIEs on the specific interface during adjacency formation to send TIEs (Section 4.2.3.3). That implies that an implementation MUST be ready to accept TIEs on all addresses it used as source of LIE frames.

A simplified version MAY be implemented on platforms with limited or no multicast support (e.g. IoT devices) by sending and receiving LIE frames on IPv4 subnet broadcast addresses or IPv6 all routers multicast address. However, this technique is less optimal and presents a wider attack surface from a security perspective.

A ThreeWay adjacency (as defined in the glossary) over any address family implies support for IPv4 forwarding if the `ipv4_forwarding_capable` flag in `LinkCapabilities` is set to true. In the absence of IPv4 LIEs with `ipv4_forwarding_capable` set to true, a node MUST forward IPv4 packets using gateways discovered on IPv6-only links advertising this capability. The mechanism to discover the corresponding IPv6 gateway is out of scope for this specification and may be implementation specific. It is expected that the whole fabric supports the same type of forwarding of address families on all the links, any other combination is outside the scope of this specification. If IPv4 forwarding is supported on an interface, `ipv4_forwarding_capable` MUST be set to true for all LIEs advertised from that interface. If IPv4 and IPv6 LIEs indicate contradicting information, protocol behavior is unspecified.

Operation of a fabric where only some of the links are supporting forwarding on an address family or have an address in a family and others do not is outside the scope of this specification.

Any attempt to construct IPv6 forwarding over IPv4 only adjacencies is outside this specification.

Table 1 outlines protocol behavior pertaining to LIE exchange over different address family combinations. Table 2 outlines the way in which neighbors forward traffic as it pertains to the `ipv4_forwarding_capable` flag setting across the same address family combinations.

The specific forwarding implementation to support the described behavior is out of scope for this document.

Table 1: Control Plane Behavior for Neighbor AF Combinations
Local Neighbor AF Remote Neighbor AF LIE Exchange Behavior
IPv4 IPv4 LIEs and TIEs are exchanged over IPv4 only. The local neighbor receives TIEs from remote neighbors on any of the LIE source addresses.
IPv6 IPv6 LIEs and TIEs are exchanged over IPv6 only. The local neighbor receives TIEs from remote neighbors on any of the LIE source addresses.
IPv4, IPv6 IPv6 The local neighbor sends LIEs for both IPv4 and IPv6 while the remote neighbor only sends LIEs for IPv6. The resulting adjacency will exchange TIEs over IPv6 on any of the IPv6 LIE source addresses.
IPv4, IPv6 IPv4, IPv6 LIEs and TIEs are exchanged over IPv6 and IPv4. TIEs are received on any of the IPv4 or IPv6 LIE source addresses. The local neighbor receives TIEs from the remote neighbors on any of the IPv4 or IPv6 LIE source addresses.
Table 2: Forwarding Behavior for Neighbor AF Combinations
Local Neighbor AF Remote Neighbor AF Forwarding Behavior
IPv4 IPv4 Both nodes are required to set the `ipv4_forwarding_capable` flag to true. Only IPv4 traffic can be forwarded.
IPv6 IPv6 If either neighbor sets `ipv4_forwarding_capable` to false, only IPv6 traffic can be forwarded. If both neighbors set `ipv4_forwarding_capable` to true, IPv4 traffic is also forwarded via IPv6 gateways.
IPv4, IPv6 IPv6 If the remote neighbor sets `ipv4_forwarding_capable` to false, only IPv6 traffic can be forwarded. If both neighbors set `ipv4_forwarding_capable` to true, IPv4 traffic is also forwarded via IPv6 gateways.
IPv4, IPv6 IPv4, IPv6 IPv4 and IPv6 traffic can be forwarded. If IPv4 and IPv6 LIEs advertise conflicting `ipv4_forwarding_capable` flags, the behavior is unspecified.

The protocol does *not* support selective disabling of address families after adjacency formation, disabling IPv4 forwarding capability or any local address changes in ThreeWay state, i.e. if a link has entered ThreeWay IPv4 and/or IPv6 with a neighbor on an adjacency and it wants to stop supporting one of the families or change any of its local addresses or stop IPv4 forwarding, it has to tear down and rebuild the adjacency. It also has to remove any state it stored about the remote side of the adjacency such as associated LIE source addresses.

Unless ZTP as described in Section 4.2.7 is used, each node is provisioned with the level at which it is operating and advertises it in the `level` of the `PacketHeader` schema element. It MAY be also provisioned with its PoD. If level is not provisioned it is not present in the optional `PacketHeader` schema element and established by ZTP procedures if feasible. If PoD is not provisioned it is as governed by the `LIEPacket` schema element assuming the `common.default_pod` value. This means that switches except top of fabric do not need to be configured at all. Necessary information to configure all values is exchanged in the `LIEPacket` and `PacketHeader` or derived by the node automatically.

Further definitions of leaf flags are found in Section 4.2.7 given they have implications in terms of level and adjacency forming here. Leaf flags are carried in `HierarchyIndications`.

A node MUST form a ThreeWay adjacency if at a minimum the following first order logic conditions are satisfied on a LIE packet as specified by the `LIEPacket` schema element and received on a link (such as LIE is considered a "minimally valid" LIE). Observe that depending on the FSM involved and its state further conditions may be checked and even a minimally valid LIE can be considered ultimately invalid if any of the additional conditions fail.

  1. the neighboring node is running the same major schema version as indicated in the `major_version` element in `PacketHeader` *and*
  2. the neighboring node uses a valid System ID (i.e. value different from `IllegalSystemID`) in the `sender` element in `PacketHeader` *and*
  3. the neighboring node uses a different System ID than the node itself *and*
  4. (the advertised MTU values in the `LiePacket` element match on both sides while a missing MTU in the `LiePacket` element is interpreted as `default_mtu_size`) *and*
  5. both nodes advertise defined level values in `level` element in `PacketHeader` *and*
  6. [

    • i) the node is at `leaf_level` value and has no ThreeWay adjacencies already to nodes at Highest Adjacency ThreeWay (HAT as defined later in Section 4.2.7.1) with level different than the adjacent node *or*
    • ii) the node is not at `leaf_level` value and the neighboring node is at `leaf_level` value *or*
    • iii) both nodes are at `leaf_level` values *and* both indicate support for Section 4.3.9 *or*
    • iv) neither node is at `leaf_level` value and the neighboring node is at most one level difference away

    ].

LIEs arriving with IPv4 Time to Live (TTL) or an IPv6 Hop Limit (HL) different than 1 or 255 MUST be ignored.

4.2.2.1. LIE Finite State Machine

This section specifies the precise, normative LIE FSM. For easier reference the corresponding figure is given as well in Figure 14. Additionally, some sets of actions repeat often and are hence summarized into well-known procedures.

Events generated are fairly fine grained, especially when indicating problems in adjacency forming conditions. The intention of such differentiation is to simplify tracking of problems in deployment.

Initial state is `OneWay`.

The machine sends LIEs proactively on several transitions to accelerate adjacency bring-up without waiting for the corresponding timer tic.

T h r e e W a y | T i m e r T i c k | |HALChanged| | H A T C h a n g e d | |HALSChanged| |LieRcvd| | V a l i d R e f l e c t i o n | |FloodLeadersChanged| |SendLie| | U p d a t e Z T P O f f e r | M u l t i p l e N e i g h b o r s W a i t |MultipleNeighbors| O n e W a y |LevelChanged| |NeighborChangedLevel| |NeighborChangedAddress| |UnacceptableHeader| |MTUMismatch| |HoldtimeExpired| T w o W a y |NeighborDroppedReflection| | T i m e r T i c k | |HALChanged| | H A T C h a n g e d | |HALSChanged| |LieRcvd| | V a l i d R e f l e c t i o n | |NeighborDroppedReflection| |NeighborChangedBFDCapability| |NeighborChangedAddress| |UnacceptableHeader| |MTUMismatch| |HoldtimeExpired| |MultipleNeighbors| |FloodLeadersChanged| |SendLie| | U p d a t e Z T P O f f e r | |LevelChanged| |MultipleNeighborsDone| Enter | V a l i d R e f l e c t i o n | |MultipleNeighbors| | T i m e r T i c k | |LevelChanged| |HALChanged| | H A T C h a n g e d | |HALSChanged| |LieRcvd| |NeighborDroppedReflection| |NeighborChangedLevel| |NeighborChangedAddress| |UnacceptableHeader| |MTUMismatch| |NeighborChangedMinorFields| |HoldtimeExpired| |FloodLeadersChanged| |SendLie| | U p d a t e Z T P O f f e r | |NewNeighbor| | V a l i d R e f l e c t i o n | |NewNeighbor| |MultipleNeighbors| |NeighborChangedLevel| |NeighborChangedAddress| |UnacceptableHeader| |MTUMismatch| |HoldtimeExpired| | T i m e r T i c k | |LevelChanged| |HALChanged| | H A T C h a n g e d | |HALSChanged| |LieRcvd| |FloodLeadersChanged| |SendLie| | U p d a t e Z T P O f f e r |
Figure 14: LIE FSM

The following words are used for well known procedures:

  • PUSH Event: queues an event to be executed by the FSM upon exit of this action
  • CLEANUP: The FSM *conceptually* holds a 'current neighbor' variable that contains information received in the remote node's LIE that is processed against LIE validation rules. In the event that the LIE is considered to be invalid, the existing state held by 'current neighbor' MUST be deleted.
  • SEND_LIE: create and send a new LIE packet

    1. reflecting the neighbor as described in ValidReflection and
    2. setting the necessary `not_a_ztp_offer` variable if level was derived from the last known neighbor on this interface and
    3. setting `you_are_flood_repeater` to computed value
  • PROCESS_LIE:

    1. if LIE has a major version not equal to this node's major version *or* System ID equal to (this node's system ID or `IllegalSystemID`) then CLEANUP else
    2. if both sides advertise MTU values and the MTU in the received LIE does not match the MTU advertised by the local system *or* at least one of the nodes does not advertise an MTU value and the advertising node's LIE does not match the `default_mtu_size` of the system not advertising an MTU then CLEANUP, PUSH UpdateZTPOffer, PUSH MTUMismatch else
    3. if the LIE has an undefined level *or* this node's level is undefined *or* this node is a leaf and remote level is lower than HAT *or* (the LIE's level is not leaf *and* its difference is more than one from this node's level) then CLEANUP, PUSH UpdateZTPOffer, PUSH UnacceptableHeader else
    4. PUSH UpdateZTPOffer, construct temporary new neighbor structure with values from LIE, if no current neighbor exists then set current neighbor to new neighbor, PUSH NewNeighbor event, CHECK_THREE_WAY else

      1. if current neighbor system ID differs from LIE's system ID then PUSH MultipleNeighbors else
      2. if current neighbor stored level differs from LIE's level then PUSH NeighborChangedLevel else
      3. if current neighbor stored IPv4/v6 address differs from LIE's address then PUSH NeighborChangedAddress else
      4. if any of neighbor's flood address port, name, local LinkID changed then PUSH NeighborChangedMinorFields
    5. CHECK_THREE_WAY
  • CHECK_THREE_WAY: if current state is OneWay do nothing else

    1. if LIE packet does not contain neighbor then if current state is ThreeWay then PUSH NeighborDroppedReflection else
    2. if packet reflects this system's ID and local port and state is ThreeWay then PUSH event ValidReflection else PUSH event MultipleNeighbors

States:

  • OneWay: initial state the FSM is starting from. In this state the router did not receive any valid LIEs from a neighbor.
  • TwoWay: that state is entered when a node has received a minimally valid LIE from a neighbor but not a ThreeWay valid LIE.
  • ThreeWay: this state signifies that ThreeWay valid LIEs from a neighbor are received. On achieving this state the link can be advertised in `neighbors` element in `NodeTIEElement`.
  • MultipleNeighborsWait: occurs normally when more than two nodes become aware of each other on the same link or a remote node is quickly reconfigured or rebooted without regressing to `OneWay` first. Each occurrence of the event SHOULD generate notification to help operational deployments.

Events:

  • TimerTick: one second timer tick, i.e. the event is provided to the FSM once a second by an implementation-specific mechanism that is outisde the scope of this specification. This event is quietly ignored if transition does not exist.
  • LevelChanged: node's level has been changed by ZTP or configuration. This is provided by the ZTP FSM.
  • HALChanged: best HAL computed by ZTP has changed. This is provided by the ZTP FSM.
  • HATChanged: HAT computed by ZTP has changed. This is provided by the ZTP FSM.
  • HALSChanged: set of HAL offering systems computed by ZTP has changed. This is provided by the ZTP FSM.
  • LieRcvd: received LIE on the interface.
  • NewNeighbor: new neighbor is present in the received LIE.
  • ValidReflection: received valid reflection of this node from neighbor, i.e. all elements in `neighbor` element in `LiePacket` have values corresponding to this link.
  • NeighborDroppedReflection: lost previously held reflection from neighbor, i.e. `neighbor` element in `LiePacket` does not correspond to this node or is not present.
  • NeighborChangedLevel: neighbor changed advertised level from the previously held one.
  • NeighborChangedAddress: neighbor changed IP address, i.e. LIE has been received from an address different from previous LIEs. Those changes will influence the sockets used to listen to TIEs, TIREs, TIDEs.
  • UnacceptableHeader: Unacceptable header received.
  • MTUMismatch: MTU mismatched.
  • NeighborChangedMinorFields: minor fields changed in neighbor's LIE.
  • HoldtimeExpired: adjacency holddown timer expired.
  • MultipleNeighbors: more than one neighbor is present on interface
  • MultipleNeighborsDone: multiple neighbors timer expired.
  • FloodLeadersChanged: node's election algorithm determined new set of flood leaders.
  • SendLie: send a LIE out.
  • UpdateZTPOffer: update this node's ZTP offer. This is sent to the ZTP FSM.

Actions:

  • on HATChanged in OneWay finishes in OneWay: store HAT
  • on FloodLeadersChanged in OneWay finishes in OneWay: update `you_are_flood_repeater` LIE elements based on flood leader election results
  • on UnacceptableHeader in OneWay finishes in OneWay: no action
  • on NeighborChangedMinorFields in OneWay finishes in OneWay: no action
  • on SendLie in OneWay finishes in OneWay: SEND_LIE
  • on HALSChanged in OneWay finishes in OneWay: store HALS
  • on MultipleNeighbors in OneWay finishes in MultipleNeighborsWait: start multiple neighbors timer with interval `multiple_neighbors_lie_holdtime_multipler` * `default_lie_holdtime`
  • on NeighborChangedLevel in OneWay finishes in OneWay: no action
  • on LieRcvd in OneWay finishes in OneWay: PROCESS_LIE
  • on MTUMismatch in OneWay finishes in OneWay: no action
  • on ValidReflection in OneWay finishes in ThreeWay: no action
  • on LevelChanged in OneWay finishes in OneWay: update level with event value, PUSH SendLie event
  • on HALChanged in OneWay finishes in OneWay: store new HAL
  • on HoldtimeExpired in OneWay finishes in OneWay: no action
  • on NeighborChangedAddress in OneWay finishes in OneWay: no action
  • on NewNeighbor in OneWay finishes in TwoWay: PUSH SendLie event
  • on UpdateZTPOffer in OneWay finishes in OneWay: send offer to ZTP FSM
  • on NeighborDroppedReflection in OneWay finishes in OneWay: no action
  • on TimerTick in OneWay finishes in OneWay: PUSH SendLie event
  • on FloodLeadersChanged in TwoWay finishes in TwoWay: update `you_are_flood_repeater` LIE elements based on flood leader election results
  • on UpdateZTPOffer in TwoWay finishes in TwoWay: send offer to ZTP FSM
  • on NewNeighbor in TwoWay finishes in MultipleNeighborsWait: PUSH SendLie event
  • on ValidReflection in TwoWay finishes in ThreeWay: no action
  • on LieRcvd in TwoWay finishes in TwoWay: PROCESS_LIE
  • on UnacceptableHeader in TwoWay finishes in OneWay: no action
  • on HALChanged in TwoWay finishes in TwoWay: store new HAL
  • on HoldtimeExpired in TwoWay finishes in OneWay: no action
  • on LevelChanged in TwoWay finishes in TwoWay: update level with event value
  • on TimerTick in TwoWay finishes in TwoWay: PUSH SendLie event, if last valid LIE was received more than `holdtime` ago as advertised by neighbor then PUSH HoldtimeExpired event
  • on HATChanged in TwoWay finishes in TwoWay: store HAT
  • on NeighborChangedLevel in TwoWay finishes in OneWay: no action
  • on HALSChanged in TwoWay finishes in TwoWay: store HALS
  • on MTUMismatch in TwoWay finishes in OneWay: no action
  • on NeighborChangedAddress in TwoWay finishes in OneWay: no action
  • on SendLie in TwoWay finishes in TwoWay: SEND_LIE
  • on MultipleNeighbors in TwoWay finishes in MultipleNeighborsWait: start multiple neighbors timer with interval `multiple_neighbors_lie_holdtime_multipler` * `default_lie_holdtime`
  • on TimerTick in ThreeWay finishes in ThreeWay: PUSH SendLie event, if last valid LIE was received more than `holdtime` ago as advertised by neighbor then PUSH HoldtimeExpired event
  • on LevelChanged in ThreeWay finishes in OneWay: update level with event value
  • on HATChanged in ThreeWay finishes in ThreeWay: store HAT
  • on MTUMismatch in ThreeWay finishes in OneWay: no action
  • on UnacceptableHeader in ThreeWay finishes in OneWay: no action
  • on MultipleNeighbors in ThreeWay finishes in MultipleNeighborsWait: start multiple neighbors timer with interval `multiple_neighbors_lie_holdtime_multipler` * `default_lie_holdtime`
  • on NeighborChangedLevel in ThreeWay finishes in OneWay: no action
  • on HALSChanged in ThreeWay finishes in ThreeWay: store HALS
  • on LieRcvd in ThreeWay finishes in ThreeWay: PROCESS_LIE
  • on FloodLeadersChanged in ThreeWay finishes in ThreeWay: update `you_are_flood_repeater` LIE elements based on flood leader election results, PUSH SendLie
  • on NeighborDroppedReflection in ThreeWay finishes in TwoWay: no action
  • on HoldtimeExpired in ThreeWay finishes in OneWay: no action
  • on ValidReflection in ThreeWay finishes in ThreeWay: no action
  • on UpdateZTPOffer in ThreeWay finishes in ThreeWay: send offer to ZTP FSM
  • on NeighborChangedAddress in ThreeWay finishes in OneWay: no action
  • on HALChanged in ThreeWay finishes in ThreeWay: store new HAL
  • on SendLie in ThreeWay finishes in ThreeWay: SEND_LIE
  • on MultipleNeighbors in MultipleNeighborsWait finishes in MultipleNeighborsWait: start multiple neighbors timer with interval `multiple_neighbors_lie_holdtime_multipler` * `default_lie_holdtime`
  • on FloodLeadersChanged in MultipleNeighborsWait finishes in MultipleNeighborsWait: update `you_are_flood_repeater` LIE elements based on flood leader election results
  • on TimerTick in MultipleNeighborsWait finishes in MultipleNeighborsWait: check MultipleNeighbors timer, if timer expired PUSH MultipleNeighborsDone
  • on ValidReflection in MultipleNeighborsWait finishes in MultipleNeighborsWait: no action
  • on UpdateZTPOffer in MultipleNeighborsWait finishes in MultipleNeighborsWait: send offer to ZTP FSM
  • on NeighborDroppedReflection in MultipleNeighborsWait finishes in MultipleNeighborsWait: no action
  • on LieRcvd in MultipleNeighborsWait finishes in MultipleNeighborsWait: no action
  • on UnacceptableHeader in MultipleNeighborsWait finishes in MultipleNeighborsWait: no action
  • on NeighborChangedAddress in MultipleNeighborsWait finishes in MultipleNeighborsWait: no action
  • on LevelChanged in MultipleNeighborsWait finishes in OneWay: update level with event value
  • on HATChanged in MultipleNeighborsWait finishes in MultipleNeighborsWait: store HAT
  • on MTUMismatch in MultipleNeighborsWait finishes in MultipleNeighborsWait: no action
  • on HALSChanged in MultipleNeighborsWait finishes in MultipleNeighborsWait: store HALS
  • on NeighborChangedBFDCapability in MultipleNeighborsWait finishes in MultipleNeighborsWait: no action
  • on HALChanged in MultipleNeighborsWait finishes in MultipleNeighborsWait: store new HAL
  • on HoldtimeExpired in MultipleNeighborsWait finishes in MultipleNeighborsWait: no action
  • on SendLie in MultipleNeighborsWait finishes in MultipleNeighborsWait: no action
  • on MultipleNeighborsDone in MultipleNeighborsWait finishes in OneWay: no action
  • on Entry into OneWay: CLEANUP

4.2.3. Topology Exchange (TIE Exchange)

4.2.3.1. Topology Information Elements

Topology and reachability information in RIFT is conveyed by the means of TIEs.

The TIE exchange mechanism uses the port indicated by each node in the LIE exchange as `flood_port` in `LIEPacket` and the interface on which the adjacency has been formed as destination. TIEs MUST be sent with an IPv4 Time to Live (TTL) or an IPv6 Hop Limit (HL) of either 1 or 255 and also MUST be ignored if received with values different than 1 or 255. This prevents RIFT information from reaching beyond a single L3 next-hop in the topology. TIEs SHOULD be sent with network control precedence unless an implementation is prevented from doing so [RFC2474].

TIEs contain sequence numbers, lifetimes, and a type. Each type has ample identifying number space and information is spread across multiple TIEs with the same TIEElement type (this is true for all TIE types).

More information about the TIE structure can be found in the schema in Appendix B starting with `TIEPacket` root.

4.2.3.2. Southbound and Northbound TIE Representation

A central concept of RIFT is that each node represents itself differently depending on the direction in which it is advertising information. More precisely, a spine node represents two different databases over its adjacencies depending whether it advertises TIEs to the north or to the south/east-west. Those differing TIE databases are called either south- or northbound (South TIEs and North TIEs) depending on the direction of distribution.

The North TIEs hold all of the node's adjacencies and local prefixes while the South TIEs hold only all of the node's adjacencies, the default prefix with necessary disaggregated prefixes and local prefixes. Section 4.2.5 explains further details.

All TIE types are mostly symmetrical in both diredctions. The (Appendix B.3) defines the TIE types (i.e. the TIETypeType element) and their directionality (i.e. `direction` within the `TIEID` element).

As an example illustrating a databases holding both representations, the topology in Figure 2 with the optional link between spine 111 and spine 112 (so that the flooding on an East-West link can be shown) is considered. Unnumbered interfaces are implicitly assumed and for simplicity, the key value elements which may be included in their South TIEs or North TIEs are not shown. First, in Figure 15 are the TIEs generated by some nodes.

        ToF 21 South TIEs:
        Node South TIE:
          NodeTIEElement(level=2,
            neighbors(
              (Spine 111, level 1, cost 1, links(...)),
              (Spine 112, level 1, cost 1, links(...)),
              (Spine 121, level 1, cost 1, links(...)),
              (Spine 122, level 1, cost 1, links(...))
            )
          )
        Prefix South TIE:
          PrefixTIEElement(prefixes(0/0, metric 1), (::/0, metric 1))

        Spine 111 South TIEs:
        Node South TIE:
          NodeTIEElement(level=1,
            neighbors(
              (ToF 21, level 2, cost 1, links(...)),
              (ToF 22, level 2, cost 1, links(...)),
              (Spine 112, level 1, cost 1, links(...)),
              (Leaf111, level 0, cost 1, links(...)),
              (Leaf112, level 0, cost 1, links(...))
            )
          )
        Prefix South TIE:
          PrefixTIEElement(prefixes(0/0, metric 1), (::/0, metric 1))

        Spine 111 North TIEs:
        Node North TIE:
          NodeTIEElement(level=1,
            neighbors(
              (ToF 21, level 2, cost 1, links(...)),
              (ToF 22, level 2, cost 1, links(...)),
              (Spine 112, level 1, cost 1, links(...)),
              (Leaf111, level 0, cost 1, links(...)),
              (Leaf112, level 0, cost 1, links(...))
            )
          )
        Prefix North TIE:
          PrefixTIEElement(prefixes(Spine 111.loopback)

        Spine 121 South TIEs:
        Node South TIE:
          NodeTIEElement(level=1,
            neighbors(
              (ToF 21, level 2, cost 1, links(...)),
              (ToF 22, level 2, cost 1, links(...)),
              (Leaf121, level 0, cost 1, links(...)),
              (Leaf122, level 0, cost 1, links(...))
            )
          )
        Prefix South TIE:
          PrefixTIEElement(prefixes(0/0, metric 1), (::/0, metric 1))

        Spine 121 North TIEs:
        Node North TIE:
          NodeTIEElement(level=1,
            neighbors(
              (ToF 21, level 2, cost 1, links(...)),
              (ToF 22, level 2, cost 1, links(...)),
              (Leaf121, level 0, cost 1, links(...)),
              (Leaf122, level 0, cost 1, links(...))
            )
          )
        Prefix North TIE:
          PrefixTIEElement(prefixes(Spine 121.loopback)

        Leaf112 North TIEs:
        Node North TIE:
          NodeTIEElement(level=0,
            neighbors(
              (Spine 111, level 1, cost 1, links(...)),
              (Spine 112, level 1, cost 1, links(...))
            )
          )
        Prefix North TIE:
          PrefixTIEElement(prefixes(Leaf112.loopback, Prefix112, Prefix_MH))
Figure 15: Example TIEs Generated in a 2 Level Spine-and-Leaf Topology

It may not be obvious here as to why the Node South TIEs contain all the adjacencies of the corresponding node. This will be necessary for algorithms further elaborated on in Section 4.2.3.9 and Section 4.3.7.

For Node TIEs to carry more adjacencies than fit into an MTU-sized packet, the element `neighbors` may contain a different set of neighbors in each TIE. Those disjoint sets of neighbors MUST be joined during corresponding computation. Nevertheless, in case across multiple Node TIEs

  1. `capabilities` do not match *or*
  2. `flags` values do not match *or*
  3. same neighbor repeats in multiple TIEs with different values

Since the receiving node cannot control the arrival order of TIEs, it is expected that an implementation will use the value of any of the valid TIEs it received.

The `miscabled_links` element SHOULD be included in every Node TIE, otherwise the behavior is undefined.

A ToF node MUST include all other ToFs it is aware of through reflection. The `same_plane_tofs` element is used to carry this information. To prevent MTU overrun problems, multiple Node TIEs can carry disjointed sets of ToFs which MUST be joined to form a single set.

Different TIE types are carried in `TIEElement`. Schema enum `common.TIETypeType` in `TIEID` indicates which elements MUST be present in the `TIEElement`. In case of mismatch the unexpected elements MUST be ignored. In case of lack of expected element in the TIE an error MUST be reported and the TIE MUST be ignored. The element `positive_disaggregation_prefixes` and `positive_external_disaggregation_prefixes` MUST be advertised southbound only and ignored in North TIEs. The element `negative_disaggregation_prefixes` MUST be propagated according to Section 4.2.5.2 southwards towards lower levels to heal pathological upper level partitioning, otherwise traffic loss may occur in multiplane fabrics. It MUST NOT be advertised within a North TIE and ignored otherwise.

4.2.3.3. Flooding

As described before, TIEs themselves are transported over UDP with the ports indicated in the LIE exchanges and using the destination address on which the LIE adjacency has been formed.

TIEs are uniquely identified by the `TIEID` schema element. `TIEID` space is a total order achieved by comparing the elements in sequence defined in the element and comparing each value as an unsigned integer of corresponding length. The `TIEHeader` element contains a `seq_nr` element to distinguish newer versions of same TIE.

The TIEHEader can also carry an `origination_time` schema element (for fabrics that utilize precision timing) which contains the absolute timestamp of when the TIE was generated and an `origination_lifetime` to indicate the original lifetime when the TIE was generated. When carried, they can be used for debugging or security purposes (e.g. to prevent lifetime modification attacks).

`remaining_lifetime` counts down to 0 from `origination_lifetime`. TIEs with lifetimes differing by less than `lifetime_diff2ignore` MUST be considered EQUAL (if all other fields are equal). This constant MUST be larger than `purge_lifetime` to avoid retransmissions.

This normative ordering methodology is described in Figure 16 and MUST be used by all implementations.

for each TIEPacket:
    TIEHeader = TIEPacket.TIEHeader
    TIEElement = TIEPacket.TIEElement

    seq_nr = TIEHeader.seq_nr

    TIEID = TIEHeader.TIEID
    direction = TIEID.direction

    # System ID
    originator = TIEID.originator

    # TIETypeType
    tietype = TIEID.tietype
    tie_nr = TIEID.tie_nr

    if X.direction > Y.direction:
        return X.direction
    else if X.direction < Y.direction:
        return Y.direction
    else if X.originator > Y.originator:
        return X.originator
    else if X.originator < Y.originator:
        return Y.originator
    else:
        if X.tietype == Y.tietype:
            if X.tie_nr == Y.tie_nr:
                if X.seq_nr == Y.seq_nr:
                    X.lifetime_left = X.remaining_lifetime - time since TIE was received
                    Y.lifetime_left = Y.remaining_lifetime - time since TIE was received

                    if absolute_value_of(X.lifetime_left - Y.lifetime_left) <= common.lifetime_diff2ignore:
                        return equal

                    else:
                        return TIE with largest lifetime_left
                else:
                    return X.seq_nr compared to Y.seq_nr
            else:
                return X.tie_nr compared to Y.tie_nr
        else:
            return X.TIEType compared to Y.TIEType
Figure 16: TIE Ordering

All valid TIE types are defined in `TIETypeType`. This enum indicates what TIE type the TIE is carrying. In case the value is not known to the receiver, the TIE MUST be re-flooded. This allows for future extensions of the protocol within the same major schema with types opaque to some nodes with some restrictions.

4.2.3.3.1. Normative Flooding Procedures

On reception of a TIE with an undefined level value in the packet header the node MUST issue a warning and discard the packet.

This section specifies the precise, normative flooding mechanism and can be omitted unless the reader is pursuing an implementation of the protocol or looks for a deep understanding of underlying information distribution mechanism.

Flooding Procedures are described in terms of the flooding state of an adjacency and resulting operations on it driven by packet arrivals. Implementations MUST implement a behavior that is externally indistinguishable from a verbatim implementation of the FSMs and normative procedures given here.

RIFT does not specify any kind of flood rate limiting. To help with adjustement of flooding speeds the encoded packets provide hints to react accordingly to losses or overruns via `you_are_sending_too_quickly` in the `LIEPacket` and `Packet Number` in the security envelope described in Section 4.4.3. Flooding of all corresponding topology exchange elements SHOULD be performed at highest feasible rate whereas the rate of transmission MUST be throttled by reacting to packet elements and adequate features of the system such as e.g. queue lengths or congestion indications in the protocol packets.

A node SHOULD NOT send out any topology information elements if the adjacency is not in a "ThreeWay" state. No further tightening of this rule is possible. For example, link buffering may cause both LIEs and TIEs/TIDEs/TIREs to be re-ordered.

A node MUST drop any received TIEs/TIDEs/TIREs unless it is in ThreeWay state.

TIEs generated by other nodes MUST be re-flooded. TIDEs and TIREs MUST NOT be re-flooded.

4.2.3.3.1.1. FloodState Structure per Adjacency

The structure contains conceptually on each adjacency the following elements. The word collection or queue indicates a set of elements that can be iterated over:

TIES_TX:
Collection containing all the TIEs to transmit on the adjacency.
TIES_ACK:
Collection containing all the TIEs that have to be acknowledged on the adjacency.
TIES_REQ:
Collection containing all the TIE headers that have to be requested on the adjacency.
TIES_RTX:
Collection containing all TIEs that need retransmission with the corresponding time to retransmit.

Following words are used for well known elements and procedures operating on this structure:

TIE:
Describes either a full RIFT TIE or just the `TIEHeader` or `TIEID` equivalent as defined in Appendix B.3. The corresponding meaning is unambiguously contained in the context of each algorithm.
is_flood_reduced(TIE):
returns whether a TIE can be flood reduced or not.
is_tide_entry_filtered(TIE):
returns whether a header should be propagated in TIDE according to flooding scopes.
is_request_filtered(TIE):
returns whether a TIE request should be propagated to neighbor or not according to flooding scopes.
is_flood_filtered(TIE):
returns whether a TIE requested be flooded to neighbor or not according to flooding scopes.
try_to_transmit_tie(TIE):
  1. if not is_flood_filtered(TIE) then
    1. remove TIE from TIES_RTX if present
    2. if TIE" with same key is found on TIES_ACK then

      1. if TIE" is same or newer than TIE do nothing else
      2. remove TIE" from TIES_ACK and add TIE to TIES_TX
    3. else insert TIE into TIES_TX
ack_tie(TIE):
remove TIE from all collections and then insert TIE into TIES_ACK.
tie_been_acked(TIE):
remove TIE from all collections.
remove_from_all_queues(TIE):
same as `tie_been_acked`.
request_tie(TIE):
if not is_request_filtered(TIE) then remove_from_all_queues(TIE) and add to TIES_REQ.
move_to_rtx_list(TIE):
remove TIE from TIES_TX and then add to TIES_RTX using TIE retransmission interval.
clear_requests(TIEs):
remove all TIEs from TIES_REQ.
bump_own_tie(TIE):
for self-originated TIE originate an empty or re-generate with version number higher then the one in TIE.

The collection SHOULD be served with the following priorities if the system cannot process all the collections in real time:

  1. Elements on TIES_ACK should be processed with highest priority
  2. TIES_TX
  3. TIES_REQ and TIES_RTX
4.2.3.3.1.2. TIDEs

`TIEID` and `TIEHeader` space forms a strict total order (modulo incomparable sequence numbers as explained in Appendix A in the very unlikely event that can occur if a TIE is "stuck" in a part of a network while the originator reboots and reissues TIEs many times to the point its sequence# rolls over and forms incomparable distance to the "stuck" copy) which implies that a comparison relation is possible between two elements. With that it is implicitly possible to compare TIEs, TIEHeaders and TIEIDs to each other whereas the shortest viable key is always implied.

When generating and sending TIDEs an implementation SHOULD ensure that enough bandwidth is left to send elements from other queues of `Floodstate` structure.

4.2.3.3.1.2.1. TIDE Generation

As given by timer constant, periodically generate TIDEs by:

  • NEXT_TIDE_ID: ID of next TIE to be sent in TIDE.
  • TIDE_START: Begin of TIDE packet range.
  1. NEXT_TIDE_ID = MIN_TIEID
  2. while NEXT_TIDE_ID not equal to MAX_TIEID do

    1. TIDE_START = NEXT_TIDE_ID
    2. HEADERS = At most TIRDEs_PER_PKT headers in TIEDB starting at NEXT_TIDE_ID or higher that SHOULD be filtered by is_tide_entry_filtered and MUST either have a lifetime left > 0 or have no content
    3. if HEADERS is empty then START = MIN_TIEID else START = first element in HEADERS
    4. if HEADERS' size less than TIRDEs_PER_PKT then END = MAX_TIEID else END = last element in HEADERS
    5. send *sorted* HEADERS as TIDE setting START and END as its range
    6. NEXT_TIDE_ID = END

The constant `TIRDEs_PER_PKT` SHOULD be computed per interface and used by the implementation to limit the amount of TIE headers per TIDE so the sent TIDE PDU does not exceed interface MTU.

TIDE PDUs SHOULD be spaced on sending to prevent packet drops.

4.2.3.3.1.2.2. TIDE Processing

On reception of TIDEs the following processing is performed:

  • TXKEYS: Collection of TIE Headers to be sent after processing of the packet
  • REQKEYS: Collection of TIEIDs to be requested after processing of the packet
  • CLEARKEYS: Collection of TIEIDs to be removed from flood state queues
  • LASTPROCESSED: Last processed TIEID in TIDE
  • DBTIE: TIE in the LSDB if found
  1. LASTPROCESSED = TIDE.start_range
  2. for every HEADER in TIDE do

    1. DBTIE = find HEADER in current LSDB
    2. if HEADER < LASTPROCESSED then report error and reset adjacency and return
    3. put all TIEs in LSDB where (TIE.HEADER > LASTPROCESSED and TIE.HEADER < HEADER) into TXKEYS
    4. LASTPROCESSED = HEADER
    5. if DBTIE not found then

      I)
      if originator is this node then bump_own_tie
      II)
      else put HEADER into REQKEYS
    6. if DBTIE.HEADER < HEADER then

      I)

      if originator is this node then bump_own_tie else

      i.
      if this is a North TIE header from a northbound neighbor then override DBTIE in LSDB with HEADER
      ii.
      else put HEADER into REQKEYS
    7. if DBTIE.HEADER > HEADER then put DBTIE.HEADER into TXKEYS
    8. if DBTIE.HEADER = HEADER then

      I)
      if DBTIE has content already then put DBTIE.HEADER into CLEARKEYS
      II)
      else put HEADER into REQKEYS
  3. put all TIEs in LSDB where (TIE.HEADER > LASTPROCESSED and TIE.HEADER <= TIDE.end_range) into TXKEYS
  4. for all TIEs in TXKEYS try_to_transmit_tie(TIE)
  5. for all TIEs in REQKEYS request_tie(TIE)
  6. for all TIEs in CLEARKEYS remove_from_all_queues(TIE)
4.2.3.3.1.3. TIREs
4.2.3.3.1.3.1. TIRE Generation

Elements from both TIES_REQ and TIES_ACK MUST be collected and sent out as fast as feasible as TIREs. When sending TIREs with elements from TIES_REQ the `remaining_lifetime` field in `TIEHeaderWithLifeTime` MUST be set to 0 to force reflooding from the neighbor even if the TIEs seem to be same.

4.2.3.3.1.3.2. TIRE Processing

On reception of TIREs the following processing is performed:

  • TXKEYS: Collection of TIE Headers to be send after processing of the packet
  • REQKEYS: Collection of TIEIDs to be requested after processing of the packet
  • ACKKEYS: Collection of TIEIDs that have been acked
  • DBTIE: TIE in the LSDB if found
  1. for every HEADER in TIRE do

    1. DBTIE = find HEADER in current LSDB
    2. if DBTIE not found then do nothing
    3. if DBTIE.HEADER < HEADER then put HEADER into REQKEYS
    4. if DBTIE.HEADER > HEADER then put DBTIE.HEADER into TXKEYS
    5. if DBTIE.HEADER = HEADER then put DBTIE.HEADER into ACKKEYS
  2. for all TIEs in TXKEYS try_to_transmit_tie(TIE)
  3. for all TIEs in REQKEYS request_tie(TIE)
  4. for all TIEs in ACKKEYS tie_been_acked(TIE)
4.2.3.3.1.4. TIEs Processing on Flood State Adjacency

On reception of TIEs the following processing is performed:

  • ACKTIE: TIE to acknowledge
  • TXTIE: TIE to transmit
  • DBTIE: TIE in the LSDB if found
  1. DBTIE = find TIE in current LSDB
  2. if DBTIE not found then

    1. if originator is this node then bump_own_tie with a short remaining lifetime
    2. else insert TIE into LSDB and ACKTIE = TIE

    else

    1. if DBTIE.HEADER = TIE.HEADER then

      i.
      if DBTIE has content already then ACKTIE = TIE
      ii.
      else process like the "DBTIE.HEADER < TIE.HEADER" case
    2. if DBTIE.HEADER < TIE.HEADER then

      i.
      if originator is this node then bump_own_tie
      ii.
      else insert TIE into LSDB and ACKTIE = TIE
    3. if DBTIE.HEADER > TIE.HEADER then

      i.
      if DBTIE has content already then TXTIE = DBTIE
      ii.
      else ACKTIE = DBTIE
  3. if TXTIE is set then try_to_transmit_tie(TXTIE)
  4. if ACKTIE is set then ack_tie(TIE)
4.2.3.3.1.5. Sending TIEs

On a periodic basis all TIEs with lifetime left > 0 MUST be sent out on the adjacency, removed from TIES_TX list and requeued onto TIES_RTX list.

4.2.3.3.1.6. TIEs Processing In LSDB

The Link State Database can be considered to be a switchboard that does not need any flooding procedures but can be given versions of TIEs by peers. Consecutively, after version tie-breaking by LSDB, a peer receives from the LSDB newest versions of TIEs received by other peers and processes them (without any filtering) just like receiving TIEs from its remote peer. Such a publisher model can be implemented in many ways, either in a single thread of execution of in parallel threads.

LSDB can be logically considered as the entity aging out TIEs, i.e. being responsible to discard TIEs that are stored longer than `remaining_lifetime` on their reception.

LSDB is also expected to periodically re-originate the node's own TIEs. It is recommended to originate at interval significantly shorter than `default_lifetime` to prevent TIE expiration by other nodes in the network which can lead to instabilities.

4.2.3.4. TIE Flooding Scopes

In a somewhat analogous fashion to link-local, area and domain flooding scopes, RIFT defines several complex "flooding scopes" depending on the direction and type of TIE propagated.

Every North TIE is flooded northbound, providing a node at a given level with the complete topology of the Clos or Fat Tree network that is reachable southwards of it, including all specific prefixes. This means that a packet received from a node at the same or lower level whose destination is covered by one of those specific prefixes will be routed directly towards the node advertising that prefix rather than sending the packet to a node at a higher level.

A node's Node South TIEs, consisting of all node's adjacencies and prefix South TIEs limited to those related to default IP prefix and disaggregated prefixes, are flooded southbound in order inform nodes one level down of connectivity of the higher level as well as reachability to the rest of the fabric. In order to allow an E-W disconnected node in a given level to receive the South TIEs of other nodes at its level, every *NODE* South TIE is "reflected" northbound to level from which it was received. It should be noted that East-West links are included in South TIE flooding (except at ToF level); those TIEs need to be flooded to satisfy algorithms in Section 4.2.4. In that way nodes at same level can learn about each other without a lower level except in case of leaf level. The precise, normative flooding scopes are given in Table 3. Those rules govern as well what SHOULD be included in TIDEs on the adjacency. Again, East-West flooding scopes are identical to South flooding scopes except in case of ToF East-West links (rings) which are basically performing northbound flooding.

Node South TIE "south reflection" allows to support positive disaggregation on failures as described in in Section 4.2.5 and flooding reduction in Section 4.2.3.9.

Table 3: Normative Flooding Scopes
Type / Direction South North East-West
Node South TIE flood if level of originator is equal to this node flood if level of originator is higher than this node flood only if this node is not ToF
non-Node South TIE flood self-originated only flood only if neighbor is originator of TIE flood only if self-originated and this node is not ToF
all North TIEs never flood flood always flood only if this node is ToF
TIDE include at least all non-self originated North TIE headers and self-originated South TIE headers and Node South TIEs of nodes at same level include at least all Node South TIEs and all South TIEs originated by peer and all North TIEs if this node is ToF then include all North TIEs, otherwise only self-originated TIEs
TIRE as Request request all North TIEs and all peer's self-originated TIEs and all Node South TIEs request all South TIEs if this node is ToF then apply North scope rules, otherwise South scope rules
TIRE as Ack Ack all received TIEs Ack all received TIEs Ack all received TIEs

If the TIDE includes additional TIE headers beside the ones specified, the receiving neighbor must apply the corresponding filter to the received TIDE strictly and MUST NOT request the extra TIE headers that were not allowed by the flooding scope rules in its direction.

As an example to illustrate these rules, consider using the topology in Figure 2, with the optional link between spine 111 and spine 112, and the associated TIEs given in Figure 15. The flooding from particular nodes of the TIEs is given in Table 4.

Table 4: Flooding some TIEs from example topology
Local Node Neighbor Node TIEs Flooded from Local to Neighbor Node
Leaf111 Spine 112 Leaf111 North TIEs, Spine 111 Node South TIE
Leaf111 Spine 111 Leaf111 North TIEs, Spine 112 Node South TIE
... ... ...
Spine 111 Leaf111 Spine 111 South TIEs
Spine 111 Leaf112 Spine 111 South TIEs
Spine 111 Spine 112 Spine 111 South TIEs
Spine 111 ToF 21 Spine 111 North TIEs, Leaf111 North TIEs, Leaf112 North TIEs, ToF 22 Node South TIE
Spine 111 ToF 22 Spine 111 North TIEs, Leaf111 North TIEs, Leaf112 North TIEs, ToF 21 Node South TIE
... ... ...
ToF 21 Spine 111 ToF 21 South TIEs
ToF 21 Spine 112 ToF 21 South TIEs
ToF 21 Spine 121 ToF 21 South TIEs
ToF 21 Spine 122 ToF 21 South TIEs
... ... ...
4.2.3.5. 'Flood Only Node TIEs' Bit

RIFT includes an optional ECN (Explicit Congestion Notification) mechanism to prevent "flooding inrush" on restart or bring-up with many southbound neighbors. A node MAY set on its LIEs the corresponding `you_are_sending_too_quickly` flag to indicate to the neighbor that it should temporarily only flood Node TIEs to it and slow down the flooding of any other TIEs. It SHOULD only set it in the southbound direction. The receiving node should accommodate the request to lessen the flooding load on the affected node if south of the sender and should ignore the indication if north of the sender.

This mechanism is most useful in the southbound direction. The distribution of Node TIEs guarantees correct behavior of algorithms like disaggregation or default route origination. Furthermore though, the use of this bit presents an inherent trade-off between processing load and convergence speed since suppressing flooding of northbound prefixes from neighbors permanently will lead to traffic loss.

4.2.3.6. Initial and Periodic Database Synchronization

The initial exchange of RIFT includes periodic TIDE exchanges that contain description of the link state database and TIREs which perform the function of requesting unknown TIEs as well as confirming reception of flooded TIEs. The content of TIDEs and TIREs is governed by Table 3.

4.2.3.7. Purging and Roll-Overs

When a node exits the network, if "unpurged", residual stale TIEs may exist in the network until their lifetimes expire (which in case of RIFT is by default a rather long period to prevent ongoing re-origination of TIEs in very large topologies). RIFT does however not have a "purging mechanism" in the traditional sense based on sending specialized "purge" packets. In other routing protocols such mechanism has proven to be complex and fragile based on many years of experience. RIFT simply issues a new, i.e. higher sequence number, empty version of the TIE with a short lifetime given by `purge_lifetime` constant and relies on each node to age out and delete such TIE copy independently. Abundant amounts of memory are available today even on low-end platforms and hence keeping those relatively short-lived extra copies for a while is acceptable. The information will age out and in the meantime all computations will deliver correct results if a node leaves the network due to the new information distributed by its adjacent nodes breaking bi-directional connectivity checks in different computations.

Once a RIFT node issues a TIE with an ID, it SHOULD preserve the ID as long as feasible (also when the protocol restarts), even if the TIE looses all content. The re-advertisement of empty TIE fulfills the purpose of purging any information advertised in previous versions. The originator is free to not re-originate the corresponding empty TIE again or originate an empty TIE with relatively short lifetime to prevent large number of long-lived empty stubs polluting the network. Each node MUST timeout and clean up the corresponding empty TIEs independently.

Upon restart a node MUST be prepared to receive TIEs with its own system ID and supersede them with equivalent, newly generated, empty TIEs with a higher sequence number. As above, the lifetime can be relatively short since it only needs to exceed the necessary propagation and processing delay by all the nodes that are within the TIE's flooding scope.

TIE sequence numbers are rolled over using the method described in Appendix A. First sequence number of any spontaneously originated TIE (i.e. not originated to override a detected older copy in the network) MUST be a reasonably unpredictable random number in the interval [0, 2^30-1] which will prevent otherwise identical TIE headers to remain "stuck" in the network with content different from TIE originated after reboot. In traditional link-state protocols this is delegated to a 16-bit checksum on packet content. RIFT avoids this design due to the CPU burden presented by computation of such checksums and additional complications tied to the fact that the checksum must be "patched" into the packet after the generation of the content, a difficult proposition in binary hand-crafted formats already and highly incompatible with model-based, serialized formats. The sequence number space is hence consciously chosen to be 64-bits wide to make the occurrence of a TIE with same sequence number but different content as much or even more unlikely than the checksum method. To emulate the "checksum behavior" an implementation could e.g. choose to compute 64-bit checksum over the TIE content and use that as part of the first sequence number after reboot.

4.2.3.8. Southbound Default Route Origination

Under certain conditions nodes issue a default route in their South Prefix TIEs with costs as computed in Section 4.3.7.1.

A node X that

  1. is *not* overloaded *and*
  2. has southbound or East-West adjacencies

SHOULD originate in its south prefix TIE such a default route if and only if

  1. all other nodes at X's' level are overloaded *or*
  2. all other nodes at X's' level have NO northbound adjacencies *or*
  3. X has computed reachability to a default route during N-SPF.

The term "all other nodes at X's' level" describes obviously just the nodes at the same level in the PoD with a viable lower level (otherwise the Node South TIEs cannot be reflected and the nodes in e.g. PoD 1 and PoD 2 are "invisible" to each other).

A node originating a southbound default route SHOULD install a default discard route if it did not compute a default route during N-SPF. This basically means that the top of the fabric will drop traffic for unreachable addresses.

4.2.3.9. Northbound TIE Flooding Reduction

RIFT chooses only a subset of northbound nodes to propagate flooding and with that both balances it (to prevent 'hot' flooding links) across the fabric as well as reduces its volume. The solution is based on several principles:

  1. a node MUST flood self-originated North TIEs to all the reachable nodes at the level above which is called the node's "parents";
  2. it is typically not necessary that all parents reflood the North TIEs to achieve a complete flooding of all the reachable nodes two levels above which we choose to call the node's "grandparents";
  3. to control the volume of its flooding two hops North and yet keep it robust enough, it is advantageous for a node to select a subset of its parents as "Flood Repeaters" (FRs), which combined together deliver two or more copies of its flooding to all of its parents, i.e. the originating node's grandparents;
  4. nodes at the same level do *not* have to agree on a specific algorithm to select the FRs, but overall load balancing should be achieved so that different nodes at the same level should tend to select different parents as FRs;
  5. there are usually many solutions to the problem of finding a set of FRs for a given node; the problem of finding the minimal set is (similar to) a NP-Complete problem and a globally optimal set may not be the minimal one if load-balancing with other nodes is an important consideration;
  6. it is expected that there will be often sets of equivalent nodes at a level L, defined as having a common set of parents at L+1. Applying this observation at both L and L+1, an algorithm may attempt to split the larger problem in a sum of smaller separate problems;
  7. it is another expectation that there will be from time to time a broken link between a parent and a grandparent, and in that case the parent is probably a poor FR due to its lower reliability. An algorithm may attempt to eliminate parents with broken northbound adjacencies first in order to reduce the number of FRs. Albeit it could be argued that relying on higher fanout FRs will slow flooding due to higher replication load reliability of FR's links seems to be a more pressing concern.

In a fully connected Clos Network, this means that a node selects one arbitrary parent as FR and then a second one for redundancy. The computation can be kept relatively simple and completely distributed without any need for synchronization amongst nodes. In a "PoD" structure, where the Level L+2 is partitioned in silos of equivalent grandparents that are only reachable from respective parents, this means treating each silo as a fully connected Clos Network and solve the problem within the silo.

In terms of signaling, a node has enough information to select its set of FRs; this information is derived from the node's parents' Node South TIEs, which indicate the parent's reachable northbound adjacencies to its own parents, i.e. the node's grandparents. A node may send a LIE to a northbound neighbor with the optional boolean field `you_are_flood_repeater` set to false, to indicate that the northbound neighbor is not a flood repeater for the node that sent the LIE. In that case the northbound neighbor SHOULD NOT reflood northbound TIEs received from the node that sent the LIE. If the `you_are_flood_repeater` is absent or if `you_are_flood_repeater` is set to true, then the northbound neighbor is a flood repeater for the node that sent the LIE and MUST reflood northbound TIEs received from that node. The element `you_are_flood_repeater` MUST be ignored if received from a northbound adjacency.

This specification provides a simple default algorithm that SHOULD be implemented and used by default on every RIFT node.

  • let |NA(Node) be the set of Northbound adjacencies of node Node and CN(Node) be the cardinality of |NA(Node);
  • let |SA(Node) be the set of Southbound adjacencies of node Node and CS(Node) be the cardinality of |SA(Node);
  • let |P(Node) be the set of node Node's parents;
  • let |G(Node) be the set of node Node's grandparents. Observe that |G(Node) = |P(|P(Node));
  • let N be the child node at level L computing a set of FR;
  • let P be a node at level L+1 and a parent node of N, i.e. bi-directionally reachable over adjacency ADJ(N, P);
  • let G be a grandparent node of N, reachable transitively via a parent P over adjacencies ADJ(N, P) and ADJ(P, G). Observe that N does not have enough information to check bidirectional reachability of ADJ(P, G);
  • let R be a redundancy constant integer; a value of 2 or higher for R is RECOMMENDED;
  • let S be a similarity constant integer; a value in range 0 .. 2 for S is RECOMMENDED, the value of 1 SHOULD be used. Two cardinalities are considered as equivalent if their absolute difference is less than or equal to S, i.e. |a-b|<=S.
  • let RND be a 64-bit random number generated by the system once on startup.

The algorithm consists of the following steps:

  1. Derive a 64-bits number by XOR'ing 'N's system ID with RND.
  2. Derive a 16-bits pseudo-random unsigned integer PR(N) from the resulting 64-bits number by splitting it in 16-bits-long words W1, W2, W3, W4 (where W1 are the least significant 16 bits of the 64-bits number, and W4 are the most significant 16 bits) and then XOR'ing the circularly shifted resulting words together:

    1. (W1<<1) xor (W2<<2) xor (W3<<3) xor (W4<<4);

      where << is the circular shift operator.

  3. Sort the parents by decreasing number of northbound adjacencies (using decreasing system id of the parent as tie-breaker): sort |P(N) by decreasing CN(P), for all P in |P(N), as ordered array |A(N)
  4. Partition |A(N) in subarrays |A_k(N) of parents with equivalent cardinality of northbound adjacencies (in other words with equivalent number of grandparents they can reach):

    1. set k=0; // k is the ID of the subarrray
    2. set i=0;
    3. while i < CN(N) do

      i)
      set j=i;
      ii)

      while i < CN(N) and CN(|A(N)[j]) - CN(|A(N)[i]) <= S

      a.
      place |A(N)[i] in |A_k(N) // abstract action, maybe noop
      b.
      set i=i+1;
      iii)

      /* At this point j is the index in |A(N) of the first member of |A_k(N) and (i-j) is C_k(N) defined as the cardinality of |A_k(N) */

      set k=k+1;

    /* At this point k is the total number of subarrays, initialized for the shuffling operation below */

  5. shuffle individually each subarrays |A_k(N) of cardinality C_k(N) within |A(N) using the Durstenfeld variation of Fisher-Yates algorithm that depends on N's System ID:

    1. while k > 0 do

      i)

      for i from C_k(N)-1 to 1 decrementing by 1 do

      a.
      set j to PR(N) modulo i;
      b.
      exchange |A_k[j] and |A_k[i];
      ii)
      set k=k-1;
  6. For each grandparent G, initialize a counter c(G) with the number of its south-bound adjacencies to elected flood repeaters (which is initially zero):

    1. for each G in |G(N) set c(G) = 0;
  7. Finally keep as FRs only parents that are needed to maintain the number of adjacencies between the FRs and any grandparent G equal or above the redundancy constant R:

    1. for each P in reshuffled |A(N);

      i)

      if there exists an adjacency ADJ(P, G) in |NA(P) such that c(G) < R then

      a.
      place P in FR set;
      b.
      for all adjacencies ADJ(P, G') in |NA(P) increment c(G')
    2. If any c(G) is still < R, it was not possible to elect a set of FRs that covers all grandparents with redundancy R

Additional rules for flooding reduction:

  1. The algorithm MUST be re-evaluated by a node on every change of local adjacencies or reception of a parent South TIE with changed adjacencies. A node MAY apply a hysteresis to prevent excessive amount of computation during periods of network instability just like in case of reachability computation.
  2. Upon a change of the flood repeater set, a node SHOULD send out LIEs that grant flood repeater status to newly promoted nodes before it sends LIEs that revoke the status to the nodes that have been newly demoted. This is done to prevent transient behavior where the full coverage of grandparents is not guaranteed. Such a condition is sometimes unavoidable in case of lost LIEs but it will correct itself though at possible transient hit in flooding propagation speeds. The election can use the LIE FSM `FloodLeadersChanged` event to notify LIE FSMs of necessity to update the sent LIEs.
  3. A node MUST always flood its self-originated TIEs to all its neighbors.
  4. A node receiving a TIE originated by a node for which it is not a flood repeater SHOULD NOT reflood such TIEs to its neighbors except for rules in Section 4.2.3.9, Paragraph 10, Item 6.
  5. The indication of flood reduction capability MUST be carried in the Node TIEs in the `flood_reduction` element and MAY be used to optimize the algorithm to account for nodes that will flood regardless.
  6. A node generates TIDEs as usual but when receiving TIREs or TIDEs resulting in requests for a TIE of which the newest received copy came on an adjacency where the node was not flood repeater it SHOULD ignore such requests on first and only first request. Normally, the nodes that received the TIEs as flooding repeaters should satisfy the requesting node and with that no further TIREs for such TIEs will be generated. Otherwise, the next set of TIDEs and TIREs MUST lead to flooding independent of the flood repeater status. This solves a very difficult incast problem on nodes restarting with a very wide fanout, especially northbound. To retrieve the full database they often end up processing many in-rushing copies whereas this approach load-balances the incoming database between adjacent nodes and flood repeaters should guarantee that two copies are sent by different nodes to ensure against any losses.
4.2.3.10. Special Considerations