<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-lsr-flooding-topo-min-degree-06"
     ipr="trust200902">
  <front>
    <title abbrev="FTC Algorithm">Flooding Topology Minimum Degree Algorithm</title>

    <author fullname="Huaimo Chen" initials="H" surname="Chen">
      <organization>Futurewei</organization>

      <address>
        <postal>
          <street></street>
          <city>Boston</city>
          <region></region>
          <code></code>
          <country>USA</country>
        </postal>

        <email>huaimo.chen@futurewei.com</email>
      </address>
    </author>

    <author initials="M" fullname="Mehmet Toy" 
            surname="Toy">
      <organization> Verizon </organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <country>USA</country>
        </postal>
        <email>mehmet.toy@verizon.com</email>
      </address>
     </author>

     <author initials="Y" fullname="Yi Yang" 
            surname="Yang">
      <organization>IBM</organization>

      <address>
        <postal>
          <street> </street>
          <city>Cary</city>
          <region>NC</region>
          <code> </code>
          <country>United States of America</country>
        </postal>
        <email>yyietf@gmail.com</email>
      </address>
    </author>

     <author initials="A" fullname="Aijun Wang" 
            surname="Wang">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street>Beiqijia Town, Changping District</street>
          <city>Beijing</city>
          <region> </region>
          <code>102209</code>
          <country>China</country>
        </postal>
        <email>wangaj3@chinatelecom.cn</email>
      </address>
    </author>

  <author initials="X" fullname="Xufeng Liu" 
            surname="Liu">
      <organization>IBM Corporation</organization>
      <address>
        <postal>
          <street> </street>
          <city> </city>
          <region> </region>
          <code></code>
          <country>USA</country>
        </postal>
        <email>xufeng.liu.ietf@gmail.com</email>
      </address>
    </author>

 <author initials="Y" fullname="Yanhe Fan" 
            surname="Fan">
      <organization>Casa Systems</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <code></code>
          <country>USA</country>
        </postal>
        <email>yfan@casa-systems.com</email>
      </address>
    </author>

 <author initials="L" fullname="Lei Liu" 
            surname="Liu">
      <organization>Fujitsu</organization>
      <address>
        <postal>
          <street> </street>
          <city> </city>
          <region></region>
          <code></code>
          <country>USA</country>
        </postal>
        <email>liulei.kddi@gmail.com</email>
      </address>
    </author>

    <date year="2023"/>

    <abstract>
    <t>This document proposes an algorithm for a node to compute 
a flooding topology, which is a subgraph of the 
complete topology per underline physical network.
When every node in an area automatically calculates
a flooding topology by using a same algorithm and floods 
the link states using the flooding topology,
the amount of flooding traffic in the network is greatly 
reduced. This would reduce convergence time with a more stable 
and optimized routing environment.</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
<section title="Introduction">

<t> For some networks such as dense Data Center (DC) networks, 
the existing Link State (LS) flooding mechanism 
is not efficient and may have some issues. 
The extra LS flooding consumes network bandwidth. 
Processing the extra LS flooding, 
including receiving, buffering and decoding the extra LSs, 
wastes memory space and processor time.
This may cause scalability issues and 
affect the network convergence negatively.
</t>

<t>
This document proposes an algorithm for a node to compute 
a flooding topology, which is a subgraph of the 
complete topology per underline physical network.
The physical network can be any network, including
clos leaf spine network. 

It can be used in the distributed mode of flooding topology computation 
for flooding reduction 
and the centralized mode, which are described in 
<xref target="I-D.ietf-lsr-dynamic-flooding"/>.

When the distributed mode is selected, 
every node in an area automatically calculates
a flooding topology by using a same algorithm and floods 
the link states using the flooding topology,
the amount of flooding traffic in the network is greatly 
reduced. This would reduce convergence time with a more stable 
and optimized routing environment.
</t>

<t>
There may be multiple algorithms for computing a flooding topology. 
Users can select one they prefer,
and smoothly switch from one to another.
</t> 

</section> <!-- Introduction -->


<section title="Terminology">
<t>
<list style="hanging" hangIndent="4">

<t hangText="LSA:">A Link State Advertisement in OSPF.</t>
<t hangText="LSP:">A Link State Protocol Data Unit (PDU) in IS-IS.</t>
<t hangText="LS:">A Link Sate, which is an LSA or LSP.</t>
<t hangText="FT:">Flooding Topology.</t>
<t hangText="FTC:">Flooding Topology Computation.</t>

</list></t>
</section> <!-- Terminology -->


<section anchor="Floodingtopo" title="Flooding Topology">

<t>
For a given network topology, 
a flooding topology is a sub-graph or sub-network of the given 
network topology that has the same reachability to every node 
as the given network topology. Thus all the nodes in the 
given network topology MUST be in the flooding topology. All 
the nodes MUST be inter-connected directly or indirectly.
As a result, LS flooding will in most cases occur only on
the flooding topology, that includes all nodes but a
subset of links. Note even though the flooding topology is a
sub-graph of the original topology, any single LS MUST 
still be disseminated in the entire network.
</t>

<section anchor="constructFT" title="Flooding Topology Construction">
<t>
Many different flooding topologies can be constructed for a given
network topology. For example, 
a chain connecting all the nodes in the given network topology is 
a flooding topology. 
A circle connecting all the nodes is another flooding topology.
A tree connecting all the nodes is a flooding topology.
In addition, the tree plus the connections 
between some leaves of the tree and branch nodes of the tree is
a flooding topology.
</t>

<t>
The following parameters need to be considered for constructing 
a flooding topology:
<list style="symbols">
<t>
Degree: The degree of the flooding topology is the maximum degree 
among the degrees of the nodes on the flooding topology.
The degree of a node on the flooding topology is the number of 
connections on the flooding topology it has to other nodes.
</t>
<t>
Number of links: The number of links on the flooding topology
is a key factor for reducing the amount of LS flooding. 
In general, the smaller the number of links, 
the less the amount of LS flooding.
</t>
<t>
Diameter: The diameter of the flooding topology is the shortest 
distance between the two most distant nodes on the flooding topology. 
It is a key factor for reducing the network convergence time.
The smaller the diameter, the less the convergence time.
</t>
<t>
Redundancy: The redundancy of the flooding topology means 
a tolerance to the failures of some links and nodes on the flooding topology.
If the flooding topology is split by some failures,
it is not tolerant to these failures. 
In general, the larger the number of links on the flooding topology is,
the more tolerant the flooding topology to failures.
</t>
</list>
</t>


<t>Note that the flooding topology constructed by a
node is dynamic in nature, that means when the base
topology (the entire topology graph) changes, the flooding
topology (the sub-graph) MUST be re-computed/re-constructed 
to ensure that any node that is reachable on the base 
topology MUST also be reachable on the flooding topology.  
</t>

</section> <!-- Construct Flooding Topology -->

</section>


<section title="Algorithms to Compute Flooding Topology">

<t>
There are many algorithms to compute a flooding topology. 
A simple and efficient one is briefed, which comprises:

<list style="symbols">
<t>
Selecting a node R0 with the smallest node ID;
</t>
<t>
Building a tree using R0 as root in breadth first; and then
</t>
<t>
Connecting each node whose degree is one to another node to have a flooding topology.
</t>
</list>

</t>

<section title="Algorithm with Considering Degree">
<t>The algorithm is described below, 
where a variable MaxD with an initial value 3, 
data structures candidate queue Cq and flooding topology FT are used. 
Cq and FT comprise elements of form (N, D, PHs),
where N represents a Node, D is the Degree of node N, and 
PHs contains the Previous Hops of node N.  
The detailed FT computation by the algorithm is illustrated 
in <xref target="appnx1"></xref>
through an example.
</t>
<t>
The algorithm starts from node R0 as root with
 <list style="symbols">
 <t>
 a maximum degree MaxD of value 3; 
 </t>

 <t>
an initial flooding topology FT = {(R0, D=0, PHs={ })},
where node R0 is the root, 
D = 0 indicates that the Degree (D for short) of R0 is 0 (i.e., 
the number of links on the flooding topology connected to R0 is 0),
PHs = { } indicates that the Previous Hops (PHs for short) of R0 
is empty;
 </t>

 <t>
an initial candidate queue Cq = {(R1,D=0, PHs={R0}), (R2,D=0, PHs={R0}),
..., (Rm,D=0, PHs={R0})}, where each of nodes R1 to Rm
is connected to R0, its Degree D = 0 and Previous Hops PHs ={R0},
R1 to Rm are in increasing order by their IDs.
 </t>
</list>
 
</t>

<t>
<list style="numbers">

<t>
Finding and removing the first element with node A from Cq 
that is not on FT and one PH's D in PHs &lt; MaxD, 
and add the element with A into FT; 
Set A's D to one, increase A's PH's D by one.  
If no element in Cq satisfies the conditions, 
algorithm is restarted with ++MaxD, the initial FT and Cq.
</t>

<t> If all the nodes are on the FT, then goto step 4;</t>

<t>
Suppose that node Xi (i = 1, 2,..., n) is connected to node A and not on FT, 
and X1, X2,..., Xn are in an increasing order by their IDs 
(i.e., X1's ID &lt; X2's ID &lt; ... &lt; Xn's ID).
If Xi is not in Cq, then add it into the end of Cq with D = 0 and PHs = {A}; 
otherwise (i.e., Xi is in Cq), add A into the end of Xi's PHs; 
Goto step 1.
</t>

<t>
For each node B on FT whose D is one 
(from minimum to maximum node ID), 
find a link L attached to B such that 
L's remote node R has minimum D and ID and R'D &lt; MaxD, 
add link L between B and R into FT and increase B's D and R's D by one.
Return FT if every node on FT has its D &gt; 1; 
otherwise, algorithm is restarted with ++MaxD, the initial FT and Cq.
</t>
</list>

</t>
</section> <!-- Algorithm with Considering Degree -->


<section title="Algorithm with Considering Others">
<t>
There may be some constraints on some nodes in a network.
For example, in a spine-and-leaf network, 
there may be a constraint on the degree of every leaf node on the 
flooding topology, which is that the degree of every leaf node is 
not greater than a given number ConMaxD of value 2.  
For each of the other nodes such as the spine nodes, 
there is no such constraint, that is that ConMaxD is a huge number
for each of these nodes.
</t>

<t>
Step 1 of the algorithm described above is updated below 
to consider this constraint.
In addition to checking constraint PH's D &lt; MaxD,
step 1 checks another constraint PH's D &lt; PH's ConMaxD.
</t>

<t>
<list style="numbers">

<t>
Finding and removing the first element with node A from Cq 
that is not on FT and 
one PH's D in PHs &lt; MaxD and PH's D &lt; PH's ConMaxD,
and add the element with A into FT; 
Set A's D to one, increase A's PH's D by one.  
If no element in Cq satisfies the conditions, 
algorithm is restarted with ++MaxD, the initial FT and Cq.
</t>
</list>
</t>

<t>
Similarly, step 4 of the algorithm described above is updated  
to consider this constraint.
In addition to checking constraint R's D &lt; MaxD,
step 4 checks another constraint R's D &lt; R's ConMaxD.
</t>
</section> <!-- Algorithms with Considering Others -->

</section>




<section anchor="Security" title="Security Considerations">
<t>
This document does not introduce any new security issue. 
</t>
</section> <!-- Security Considerations -->

<section anchor="IANA" title="IANA Considerations">
<t>
Under Registry Name: "IGP Algorithm Type For
   Computing Flooding Topology" under an existing "Interior Gateway
   Protocol (IGP) Parameters" IANA registries (refer to
   <xref target="I-D.ietf-lsr-dynamic-flooding">Section 7.3. IGP</xref>),
 IANA is requested to assign one value of 
 IGP Algorithm Type For Computing Flooding Topology as follows:
<figure>
  <artwork> 
+==========+========================================+=============+
|Type Value|               Type Name                | reference   |
+==========+========================================+=============+
|    1     | Breadth First Minimum Degree Algorithm |This document|
+----------+----------------------------------------+-------------+
|    2     | Breadth First Leaf Constraint Algorithm|This document|
+----------+----------------------------------------+-------------+
  </artwork>
</figure>
</t> 
</section> <!-- IANA Considerations -->

<section title="Acknowledgements">
<t>The authors would like to thank Dean Cheng, 
  Acee Lindem, Zhibo Hu, Robin Li, Stephane Litkowski 
  and Alvaro Retana
  for their valuable suggestions and comments on this draft.</t>
</section>
  </middle>

<back>
<references title="Normative References">
      <?rfc include='reference.RFC.1195'?>

      <?rfc include='reference.RFC.2119'?>
 
      <?rfc include='reference.RFC.2328'?> 
<!--
      <?rfc include='reference.RFC.4552'?>
      <?rfc include="reference.RFC.5250"?> 
      <?rfc include='reference.RFC.5304'?>
      <?rfc include='reference.RFC.5310'?>

      <?rfc include='reference.RFC.5340'?>

      <?rfc include='reference.RFC.7474'?>
      <?rfc include='reference.RFC.7770'?> 
-->
      <?rfc include='reference.I-D.ietf-lsr-dynamic-flooding'?>

</references>

<references title="Informative References">
  <?rfc include="reference.RFC.8126"?>
  <?rfc include='reference.I-D.ietf-rtgwg-spf-uloop-pb-statement'?>


</references>

<section anchor="appnx1" title="FT Computation Details through Example">

<t>
This section presents the details on FT computation 
by the algorithm through an example.  
The detailed procedure of computing a FT for a network of five nodes 
with full mess connections is illustrated. 
Suppose that the network has five nodes R0, R1, R2, R3 and R4;
R0's ID &lt; R1's ID &lt; R2's ID &lt; R3's ID &lt; R4's ID.
The algorithm starts with MaxD = 3, FT = {(R0, D=0, PH={})}, 
Cq = { (R1,0,{R0}), (R2,0,{R0}), (R3,0,{R0}), (R4,0,{R0}) }.
</t>

<t>
<figure>   
<artwork><![CDATA[
1. //remove first element (R1,D=0,PHs={R0}) from Cq, R0's D=0 < MaxD
   Cq = { (R2,0,{R0}), (R3,0,{R0}), (R4,0,{R0}) };
   // add (R1,1,{R0}) into FT, increase PH R0's D by one
   FT = { (R0,1, { }), (R1,1, {R0}) }; // Link R1--R0 on FT
             ^^^       ^^^^^^^^^^^^
   // for Ri connected to R1 (in Cq) not on FT, append R1 to Ri's PHs
   Cq = { (R2,0, {R0,R1}), (R3,0, {R0,R1}), (R4,0,{R0,R1}) }. 
                     ^^               ^^              ^^
                                R0            ==== Link on FT
                         __//== O ---\__
                      __//     / \      \__   link R1--R0 added to FT
                   __//       /   \        \__
                __//         /     \          \__
               //           /       \            \
           R1 O--\_--------/---------\--------_/--O R4
               \   \____  /           \  ____/   /
                \       \/             \/       /
                 \      /\_____    ____/\      /
                  \    /    ___\__/___   \    /
                   \  /    /          \   \  /
                    \/____/            \___\/
                 R2 O --------------------- O R3]]></artwork>
</figure> 
</t>

<t>
<figure>   
<artwork><![CDATA[
2. // remove the first element (R2,0, {R0,R1}) from Cq, R0's D=1 < MaxD
   Cq = { (R3,0, {R0,R1}), (R4,0,{R0,R1}) }
   // add (R2,1,{R0}) into FT, increase R0's D by one
   FT = { (R0,2,{ }), (R1,1,{R0}), (R2,1,{R0}) } //Link R2--R0 on FT
             ^^^                   ^^^^^^^^^^^
   // for Ri connected to R2 (in Cq) not on FT, append R2 to Ri's PHs
   Cq = { (R3,0, {R0,R1,R2}), (R4,0,{R0,R1,R2}) }
                        ^^                 ^^
                                R0           ==== Link on FT
                         __//== O ---\__
                      __//    // \      \__  link R2--R0 added to FT
                   __//      //   \        \__
                __//        //     \          \__
               //          //       \            \
           R1 O--\_-------//---------\--------_/--O R4
               \   \____ //           \  ____/   /
                \       \/             \/       /
                 \     //\_____    ____/\      /
                  \   //    ___\__/___   \    /
                   \ //    /          \   \  /
                    \/____/            \___\/
                 R2 O --------------------- O R3]]></artwork>
</figure> 
</t>

<t>
<figure>   
<artwork><![CDATA[
3. //remove the 1st element (R3,0,{R0,R1,R2}) from Cq, R0's D=2 < MaxD
   Cq = { (R4,0,{R0,R1,R2}) }
   // add (R3,1,{R0}) into FT, increase R0's D by one
   FT = { (R0,3,{}), (R1,1,{R0}), (R2,1,{R0}), (R3,1,{R0}) }
             ^^^                               ^^^^^^^^^^^
   // for Ri connected to R3 (in Cq) not on FT, append R3 to Ri's PHs
   Cq = { (R4,0,{R0,R1,R2,R3}) }.
                          ^^
                                R0           ==== Link on FT
                         __//== O ---\__
                      __//    // \\     \__  link R3--R0 added to FT
                   __//      //   \\       \__
                __//        //     \\         \__
               //          //       \\           \
           R1 O--\_-------//---------\\-------_/--O R4
               \   \____ //           \\ ____/   /
                \       \/             \/       /
                 \     //\_____    ____/\\     /
                  \   //    ___\__/___   \\   /
                   \ //    /          \   \\ /
                    \/____/            \___\/
                 R2 O --------------------- O R3]]></artwork>
</figure> 
</t>

<t>
<figure>   
<artwork><![CDATA[
4. //remove the 1st element (R4,0,{R0,R1,R2,R3}) from Cq,R1's D=1 < MaxD
   Cq = { }
   // add (R4,1,{R1}) into FT, increase R1's D by one
   FT = {(R0,3,{}), (R1,2,{R0}), (R2,1,{R0}), (R3,1,{R0}), (R4,1,{R1})}
                       ^^^                                 ^^^^^^^^^^^
                                R0           ==== Link on FT
                         __//== O ---\__
                      __//    // \\     \__  link R4--R1 added to FT
                   __//      //   \\       \__
                __//        //     \\         \__
               //          //       \\           \
           R1 O==\_=======//=========\\=======_/==O R4
               \   \____ //           \\ ____/   /
                \       \/             \/       /
                 \     //\_____    ____/\\     /
                  \   //    ___\__/___   \\   /
                   \ //    /          \   \\ /
                    \/____/            \___\/
                 R2 O --------------------- O R3]]></artwork>
</figure> 
</t>

<t>
All nodes are on FT now. In the following, 
for each node on FT whose D = 1 (from minimum to maximum ID), 
link L attached to it and not on FT is found such that L's remote 
node has minimum D and ID. L is added into FT. 
<figure>   
<artwork><![CDATA[
5. // On FT, get node R2 with smallest ID whose D=1
   FT = {(R0,3,{}),(R1,2,{R0}),(R2,1,{R0}),(R3,1,{R0}), (R4,1,{R1})}
   // Add link R2--R3 to FT,   ^^^^^^^^^^^
   // where R2--R3 is not on FT, R3's D=1 is minimum first and then 
   // R3's ID is minimum (R3 and R4 tie for D), R2's D++ and R3's D++
   FT = {(R0,3,{}),(R1,2,{R0}),(R2,2,{R0,R3}),(R3,2,{R0}),(R4,1,{R1})}
                                  ^^^    ^^      ^^^    
                                R0           ==== Link on FT
                         __//== O ---\__
                      __//    // \\     \__  link R2--R3 added to FT
                   __//      //   \\       \__
                __//        //     \\         \__
               //          //       \\           \
           R1 O==\_=======//=========\\=======_/==O R4
               \   \____ //           \\ ____/   /
                \       \/             \/       /
                 \     //\_____    ____/\\     /
                  \   //    ___\__/___   \\   /
                   \ //    /          \   \\ /
                    \/____/            \___\/
                 R2 O ===================== O R3]]></artwork>
</figure> 
</t>


<t>
<figure>   
<artwork><![CDATA[
6. // On FT, get node R4 with smallest ID whose D=1
   FT = {(R0,3,{}),(R1,2,{R0}),(R2,2,{R0,R3}),(R3,2,{R0}),(R4,1,{R1})}
   // Add link R4--R2 to FT, where                        ^^^^^^^^^^^
   // R4--R2 is not on FT, R2's D=2 is minimum first and then R2's ID is
   // minimum (R2 and R3 tie for D), increase R2's D and R4's D by one
   FT = {(R0,3,{}),(R1,2,{R0}),(R2,3,{R0,R3}),(R3,2,{R0}),(R4,2,{R1,R2})}
                                  ^^^                        ^^^    ^^
                                R0           ==== Link on FT
                         __//== O ---\__
                      __//    // \\     \__  link R4--R2 added to FT
                   __//      //   \\       \__
                __//        //     \\         \__
               //          //       \\           \
           R1 O==\_=======//=========\\=======//==O R4
               \   \____ //           \\ ____//  /
                \       \/             \//      /
                 \     //\_____    ___//\\     /
                  \   //    ___\__//__   \\   /
                   \ //    //         \   \\ /
                    \/   _//           \___\/
                 R2 O ==//================= O R3]]></artwork>
</figure> 
FT is computed, which has Degree of 3 and Diameter of 2.
</t>

</section>

  </back>
</rfc>
