<?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-chen-idr-mbinding-00"
     ipr="trust200902">
  <front>
    <title abbrev="Mirror Binding">BGP for Mirror Binding</title>

     <author initials="H" surname="Chen" fullname="Huaimo Chen">
      <organization>Futurewei</organization>
      <address>
        <postal>
          <street></street>
          <city>Boston, MA</city>
          <region></region>
          <code></code>
          <country>USA</country>
        </postal>
        <email>huaimo.chen@futurewei.com</email>
      </address>
    </author>

    <author initials="B" fullname="Bruno Decraene" 
            surname="Decraene">
      <organization> Orange </organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <country>France</country>
        </postal>
        <email>bruno.decraene@orange.com</email>
      </address>
     </author>
 
    <author fullname="Gyan S. Mishra" initials="G" surname="Mishra">
      <organization>Verizon</organization>
      <address>
        <postal>
          <street>13101 Columbia Pike</street>
          <city>Silver Spring</city>
          <code>MD 20904</code>
          <country>USA</country>
        </postal>
        <phone> 301 502-1347</phone>
        <email>gyan.s.mishra@verizon.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="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="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>
-->
   <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>


    <date year="2022"/>

    <abstract>
     <t>BGP is used to distribute a binding SID with a list of SIDs 
        to a node. 
        This document describes extensions to
        BGP for distributing 
        the binding SID with the list of SIDs and an identifier of the node.
        When detecting the failure of the node, an neighbor of the node
        protects the binding SID of the failed node.
</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><xref target="I-D.ietf-idr-segment-routing-te-policy"/> 
specifies how BGP may be used to distribute a 
Segment Routing (SR) Policy to a network node.
An SR Policy is an
   ordered list of segments (i.e., instructions) that represent a
   source-routed policy.
An SR Policy consists of one or more candidate
   paths, each consisting of one or more segment lists.
An SR Policy may contain a binding SID associated with a path
represented by a segment list (i.e., a list of SIDs).
</t>

     <t>After a BGP as a controller distributes an SR policy containing 
a binding SID associated with a list of SIDs to a network node,
each neighbor of the node needs the information about the binding SID
for protecting the binding SID of the node when the node fails.
The information includes the binding SID, the list of SIDs and 
the identifier (ID) of the node.

This document proposes some procedures and extensions 
         to BGP for distributing the information.
</t> 

    </section> <!-- Introduction -->

<!--
    <section title="Terminologies">
    <t>The following terminologies are used in this document.
      <list style="hanging" hangIndent="6">
       <t hangText="BGP:">Border Gateway Protocol</t>
      </list>
     </t>
    </section> 
-->
<!-- Terminologies -->


    <section title="Extensions to BGP">
     <t>This section defines a new Binding Protection sub-TLV  
         under a Tunnel Encapsulation Attribute TLV of type 15 
        (i.e., SR Policy TLV). 
       A Tunnel Encapsulation Attribute contains a Tunnel Encapsulation 
       Attribute TLV.
       </t>

     <t>The structure containing a Binding Protection 
         sub-TLV is shown below.
        <figure>
            <artwork><![CDATA[
    Attributes:
        Tunnel Encapsulation Attribute (23)
            Tunnel Type (15): SR Policy TLV
                Preference sub-TLV
                Binding SID sub-TLV 
                SRv6 Binding SID sub-TLV
                Explicit NULL Label Policy (ENLP) sub-TLV
                Priority sub-TLV
                Policy Candidate Path Name sub-TLV
                Policy Name sub-TLV
                Binding Protection sub-TLV
                Segment List sub-TLV
                    Weight sub-TLV
                    Segment sub-TLV
                    Segment sub-TLV
                    ...
                ...]]></artwork>
          </figure>
</t>

<t> 
A Binding Protection sub-TLV contains the information
   about a binding SID of a network node for a neighbor of the node to
   protect the Binding SID of the node when the neighbor detects the
   failure of the node. 
</t>

<t>
The format of a Binding Protection sub-TLV is
   illustrated below.
</t>

<t>
<figure anchor="binding-bsid-sub-tlv-formet" 
        title="Binding Protection sub-TLV Format">
<artwork> <![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type (TBD1) |    Length     |     Flags     |   RESERVED    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           sub-TLVs                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
</t>
<t>
     <list style="hanging">
       <t hangText="Type:"> Its value (TBD1) is to be assigned by IANA.</t>
       <t hangText="Length:">It is variable.</t>
       <t hangText="Flags:">1 octet of flags.  No flags is defined now.
          MUST be set to zero by the sender 
          and MUST be ignored by the receiver.</t>
      <t hangText="sub-TLVs:"> This field contains 
         the sub-TLV below to indicate the node to be protected 
         (i.e., the protected node).

         <list style="hanging">
            <t hangText="o "> Protected Node BGP ID sub-TLV 
               indicating the BGP ID of the Protected Node.</t>
         </list>
       </t>
      </list>
</t>

<t>
  When a SR Policy (i.e., SR Policy TLV) contains a binding SID and a
   path with a protected node, the SR policy is for distributing the
   binding information of the node for protecting the binding SID of the
   node when the node fails (binding protection for short).  The binding
   SID is encoded by a Binding SID sub-TLV or SRv6 Binding SID sub-TLV,
   the path is encoded by a Segment List Sub-TLV, and the node is
   encoded by a Binding Protection sub-TLV.
</t>

<t>
When a SR Policy contains a binding SID and a path without a
   protected node, the SR policy is for replacing the Binding SID with
   the path (i.e., the list of SIDs) when the node receives a packet
   with the Binding SID (binding for short).
</t>

<!--
<t>A Mirror Binding SID sub-TLV or Mirror SRv6 Binding SID sub-TLV
contains the information 
about a binding SID of a network node for a neighbor of the node
to protect the Binding SID of the node 
when the neighbor detects the failure of the node.
</t>

      <t>
         The format of a Mirror Binding SID sub-TLV 
is illustrated below.</t>
<t>
<figure anchor="mirror-bsid-sub-tlv-formet" 
        title="Mirror Binding SID sub-TLV Format">
<artwork> <![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type (TBD1) |    Length     |     Flags     |   RESERVED    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Binding SID                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           sub-TLVs                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
</t>
<t>
     <list style="hanging">
       <t hangText="Type:"> Its value (TBD1) is to be assigned by IANA.</t>
       <t hangText="Length:">It is variable.</t>
       <t hangText="Flags:">1 octet of flags.  No flags is defined now.
          MUST be set to zero by the sender 
          and MUST be ignored by the receiver.</t>

       <t hangText="Binding SID:"> It contains a 4-octet SID.</t>

      <t hangText="sub-TLVs:"> This field contains 
         the sub-TLV below to indicate the node to be protected 
         (i.e., the protected node).

         <list style="hanging">
            <t hangText="o "> Protected Node BGP ID sub-TLV 
               indicating the BGP ID of the Protected Node.</t>
         </list>
       </t>
      </list>
</t>


      <t>
         The format of a Mirror SRv6 Binding SID sub-TLV 
is illustrated below.</t>
<t>
<figure anchor="mirror-srv6-bsid-sub-tlv-formet" 
        title="Mirror SRv6 Binding SID sub-TLV Format">
<artwork> <![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type (TBD2) |    Length     |     Flags     |   RESERVED    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 SRv6 Binding SID (16 octets)                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            SRv6 Endpoint Behavior and SID Structure           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           sub-TLVs                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
</t>
<t>
     <list style="hanging">
       <t hangText="Type:"> Its value (TBD2) is to be assigned by IANA.</t>
       <t hangText="Length:">It is variable.</t>
       <t hangText="Flags:">1 octet of flags.  No flags is defined now.
          MUST be set to zero by the sender 
          and MUST be ignored by the receiver.</t>
       <t hangText="SRv6 Binding SID:">It contains a 16-octet SRv6 SID.</t>
       <t hangText="SRv6 Endpoint Behavior and SID Structure:">
          It contains SRv6 Endpoint Behavior and SID Structure.</t>
      <t hangText="sub-TLVs:"> This field contains 
         the sub-TLV below to indicate the node to be protected 
         (i.e., the protected node).

         <list style="hanging">
            <t hangText="o "> Protected Node BGP ID sub-TLV 
               indicating the BGP ID of the Protected Node.</t>
         </list>
       </t>
      </list>
</t>


<t>When a SR Policy (i.e., SR Policy TLV) contains a mirror binding SID and 
a path, the SR policy is for distributing 
the binding information of the node for protecting the binding 
SID of the node when the node fails (binding protection for short). 
The binding SID is encoded by a Binding SID sub-TLV or 
SRv6 Binding SID sub-TLV, the path is encoded by a Segment List 
Sub-TLV, and the node is encoded by a Distributing Binding Protection 
sub-TLV.
</t>

<t>When a SR Policy contains a binding SID and a path without 
a protected node, the SR policy is for replacing the Binding SID 
with the path (i.e., the list of SIDs) when the node receives 
a packet with the Binding SID (binding for short).
</t>
-->


      <t>
         The format of Protected Node BGP ID sub-TLV 
         is illustrated below.</t>
<t>
<figure anchor="bgp-node-sub-tlv-formet" 
        title="Protected Node BGP ID sub-TLV Format">
<artwork> <![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type (1)   |  Length (4)   |           
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Protected Node BGP ID (4 octets)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
</t>

<t>
     <list style="hanging">
       <t hangText="Type:"> Its value (1) indicates the type of 
          Protected Node BGP ID sub-TLV.</t>
       <t hangText="Length:">Its value (4) indicates the length 
          of the value field of the sub-TLV is 4.</t>
       <t hangText="Protected Node BGP ID:"> 4-octet field 
          contains the BGP identifier (ID) of
          the Protected Node.</t>
      </list>
</t>
    </section> <!-- Extensions to BGP -->

    <section anchor="procedure" title="Procedure for Updating Information">
      <t>When a BGP sends a piece of binding information to node N 
in a first Update message, the BGP sends the corresponding binding 
protection information to each neighbor of node N in a second 
Update message. The first message contains a first SR Policy 
carried in MP_REACH_NLRI. The first SR Policy includes a binding SID 
and a path but does not include node N as a protected node. 
The second message contains a second SR Policy carried in MP_REACH_NLRI. 
The second SR Policy includes the binding SID, the path and node N 
as a protected node. 
 </t>

      <t>After a BGP sends the binding information to node N, 
if BGP removes the binding information from node N through sending 
a third Update message to node N, BGP removes the corresponding 
binding protection information from each neighbor of node N through 
sending a fourth Update message to the neighbor. The third message 
contains a third SR Policy carried in MP_UNREACH_NLRI. 
The third SR Policy includes the binding SID and the path 
but does not include node N as a protected node. The fourth message 
contains a fourth SR Policy carried in MP_UNREACH_NLRI. 
The fourth SR Policy includes the binding SID, the path and 
node N as a protected node. 
 </t>

      <t>After a BGP sends the binding information to node N, 
if the BGP changes the binding information in node N through 
sending a fifth Update message to node N, BGP changes the 
corresponding binding protection information in each neighbor 
of node N through sending a sixth Update message to the neighbor. 
The fifth message contains a fifth SR Policy carried in MP_REACH_NLRI. 
The fifth SR Policy includes the binding SID and a (changed) 
path but does not include node N as a protected node. 
The sixth message contains a sixth SR Policy carried in 
MP_REACH_NLRI. The sixth SR Policy includes the binding SID, 
the (changed) path and node N as a protected node. 
 </t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>Protocol extensions defined in this document do not 
      affect the BGP security other than those as discussed 
      in the Security Considerations section of 
      <xref target="RFC5575"/>.</t>
    </section>
<!--
    <section anchor="Acknowledgements" title="Acknowledgements">
     <t>The authors of this document would like to thank 
     Dhruv Dhody
     for the comments.</t>
    </section>
-->
    <section anchor="IANA" title="IANA Considerations">


    <section anchor="existing-tunnel-type-subtlvs" 
      title="Existing Registry: 
      BGP Tunnel Encapsulation Attribute sub-TLVs">
      <t>This document requests assigning a new sub-TLV 
         in the registry "BGP Tunnel Encapsulation Attribute sub-TLVs"
         as follows:
        <figure>
            <artwork align="center"><![CDATA[
   +------------+--------------------+-------------+
   | Code Point | Description        | Reference   |
   +------------+--------------------+-------------+
   | TBD1       | Binding Protection |This document|
   +------------+--------------------+-------------+
]]></artwork>
          </figure>
</t>
    </section>
    </section>


  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.9012"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.I-D.ietf-idr-segment-routing-te-policy"?>

      <?rfc include="reference.RFC.5575"?>
    </references>

  </back>

</rfc>
