<?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-idr-rpd-17" ipr="trust200902">
  <front>
    <title abbrev="BGP RPD">BGP Extensions for Routing Policy
    Distribution (RPD)</title>

    <author fullname="Zhenbin Li" initials="Z. " surname="Li">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>
          <city>Beijing</city>
          <code>100095</code>
          <country>China</country>
        </postal>
        <email>lizhenbin@huawei.com</email>
      </address>
    </author>

    <author fullname="Liang Ou" initials="L. " surname="Ou">
      <organization>China Telcom Co., Ltd.</organization>
      <address>
        <postal>
          <street>109 West Zhongshan Ave,Tianhe District</street>
          <city>Guangzhou</city>
          <code>510630</code>
          <country>China</country>
        </postal>
        <email>ouliang@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Yujia Luo" initials="Y. " surname="Luo">
      <organization>China Telcom Co., Ltd.</organization>
      <address>
        <postal>
          <street>109 West Zhongshan Ave,Tianhe District</street>
          <city>Guangzhou</city>
          <code>510630</code>
          <country>China</country>
        </postal>
        <email>luoyuj@sdu.edu.cn</email>
      </address>
    </author>

<!--
    <author fullname="Sujian Lu" initials="S." surname="Lu">
      <organization>Tencent</organization>
      <address>
        <postal>
          <street>Tengyun Building,Tower A ,No. 397 Tianlin Road</street>
          <city>Shanghai</city>
          <region>Xuhui District</region>
          <code>200233</code>
          <country>China</country>
        </postal>
        <phone/>
        <facsimile/>
        <email>jasonlu@tencent.com</email>
        <uri/>
      </address>
    </author>
-->

    <author fullname="Gyan S. Mishra" initials="G" surname="Mishra">
      <organization>Verizon Inc.</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="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 fullname="Shunwan Zhuang" initials="S. " surname="Zhuang">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>
          <city>Beijing</city>
          <code>100095</code>
          <country>China</country>
        </postal>
        <email>zhuangshunwan@huawei.com</email>
      </address>
    </author>
-->
    <author fullname="Haibo Wang" initials="H. " surname="Wang">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>
          <city>Beijing</city>
          <code>100095</code>
          <country>China</country>
        </postal>
        <email>rainsword.wang@huawei.com</email>
      </address>
    </author>
    <date year="2023"/>

    <abstract>
      <t>It is hard to adjust traffic in a 
      traditional IP network from time to time through manual configurations. 
      It is desirable to have a mechanism for setting up 
      routing policies, which adjusts traffic automatically. 
      This document describes BGP Extensions for Routing Policy Distribution 
      (BGP RPD) to support this with a controller.</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"></xref> <xref target="RFC8174"></xref>
      when, and only when, they appear in all
      capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Providers have the requirement to adjust their business traffic
         from time to time in a number of cases including:
         <list style="symbols">
           <t>Link congestion and overload caused by 
              a network failure such as a link or node failure, 
              or a live event such as a world cup.</t>
           <t>Poor network transmission quality as the result of traffic delay or
              loss in some part of a network.</t>
           <t>Some unused network resources such as idle links 
              because of business changes or network additions.</t>
         </list>
      </t>

      <t>To adjust the traffic flowing to a destination 
         (or adjust traffic for short)
         is to move the traffic from a overloaded path 
         to another lightly used path. 
         The move keeps the quality of the traffic transmission and uses
         the network resources optimally.</t> 

      <t>It is difficult to adjust traffic in a traditional
      IP network where an operator configures routing policies using
      command lines or configuration files.
          
      Traffic can only be adjusted device by device. 
      All the routers that
      the traffic traverses need to be reconfigured.
      </t>

      <t> 
        Using a configuration automation system for adjusting traffic 
        affects network performance when the number of routers 
        the traffic may traverse is big. 
        The system has to keep its connections live to all these routers.
        This consumes network resources.        
      </t>

      <t>It is desirable to have an automatic mechanism 
      for setting up routing policies to adjust traffic, 
      which is simple and efficient.
      This document describes extensions to BGP for Routing
      Policy Distribution (RPD) for this mechanism 
      with a controller.
      </t>
    </section> <!-- Introduction -->

    <section title="Terminology">
    <t>The following terminology is used in this document.</t>
      <t><list style="symbols">
          <t>AFI: Address Family Identifier</t>
          <t>SAFI: Subsequent Address Family Identifier</t>
          <t>MED: Multiple Exit Discriminator (or MULTI_EXIT_DISC)</t> 
<!--
          <t>Route: A unit of information that pairs a set of destinations with the
      attributes of a path to those destinations. The set of
      destinations are systems whose IP addresses are contained in one
      IP address prefix carried in the Network Layer Reachability
      Information (NLRI) field of an UPDATE message.  The path is the
      information reported in the path attributes field of the same
      UPDATE message. 
          An IP address prefix is encoded as a 2-tuple of the
          form &lt;length, prefix&gt;.</t>
-->
          <t>RPD: Routing Policy Distribution</t>
        </list></t>
    </section> <!-- Terminology -->


   <section title="An Example of Traffic Adjustment">
     <t><xref target="ctr-rr"/> illustrates a simple scenario, 
        where RPD is used by a controller with a Route Reflector 
        (RR) to adjust traffic automatically. </t>
     <t>
       <figure anchor="ctr-rr" align="center" 
               title="Controller with RR Adjusts Traffic">
         <artwork align="center"><![CDATA[
          +--------------+  
          |  Controller  |   
          +-------+------+       
                   \                 
                    \ RPD               
            +--+._.--\._.+--+                        ___...__
        __(           \      '.---...              (         )
       /            RR o -------- A o) ---------- (o X   AS2  )
      (o E             |\             )     _____//(___   ___)
       (  PrefixA      | \_______ B o) ____/     /     '''
        (o F            \           )       ____/
         (               \_____ C o) ______/         ___...__
          '      AS1            _)  \_____          (         )
           '---._.-._.          )         \_______ (o Y   AS3  )
                      '___'---'                     (___   ___)
                                                        '''
]]></artwork>
          </figure>
    </t>

    <t>AS1, AS2 and AS3 belong to provider P1, P2 and P3 
       respectively. 
       Routers A, B and C are in AS1. 
       Router X is in AS2. 
       There is a BGP session between X and each of routers 
           A, B and C.
       Router Y is in AS3.
       There is a BGP session between Y and router C.</t>

    <t>AS1 has an IP address prefix named PrefixA, 
       which is advertised to AS2 from AS1. 
       Provider P1 of AS1 
       wants to adjust the traffic to PrefixA from AS2 
       automatically. 
       For the traffic to PrefixA from AS2 via link X--A, 
       once link X--A gets congested, 
       P1 wants to move the traffic to link X--B,
       which is lightly used.
    </t>

    <t>The controller peers with the RR using a BGP session.
       There is a BGP session between the RR and each of  
       routers A, B and C in AS1, which are shown in the figure. 
       Other sessions in AS1 are not shown in the figure. </t>

    <t>The controller obtains the information about traffic flows
       including the traffic flow to PrefixA. 
       When it decides that the traffic to PrefixA needs to 
       be moved from link X--A to link X--B from the information, 
       it sends a RPD routing policy to A or B for changing MED attribute 
       in the IP route with PrefixA, which is advertised to AS2. 
       Router X in AS2 moves the traffic to link X--B after
       receiving the IP route with PrefixA having the changed attribute.
       (Note: how the controller gets the information and 
       makes decision is out of scope of this document).</t>

    <t>Suppose that MED of the IP unicast route with PrefixA sent to X 
       by A, B and C is 50, 100 and 150 respectively.
       To move the traffic to PrefixA in AS1 from link X--A to X--B,  
       the controller sends a RPD routing policy to A.
       After receiving the RPD routing policy,
       router A sends the IP unicast route 
       with PrefixA in AS1 to router X in AS2 and changes the 
       MED to 160 before sending the IP route. </t>

    <t>The RPD routing policy includes:
       <list style="symbols">
          <t>Peer IP = the IP address of router X,</t>
          <t>Match conditions: prefix matching PrefixA exact and 
             AS_PATH matching AS1, and</t>
          <t>Action: set MED to 160.</t> 
       </list>
    </t>

    <t>After receiving the RPD routing policy, router A sets the MED to 160 
       for the IP unicast route with PrefixA in AS1 and sends 
       the IP unicast route to router X.
       The IP unicast route sent to X from A, B and C has MED 160, 100 
       and 150 respectively.
       Router X sends the traffic to PrefixA using link X--B 
       since MED 100 from B is the smallest.</t>
      </section> <!-- Application Scenario -->

    <section title="Protocol Extensions">
       <t>This document specifies a solution using a new 
          &lt;AFI, SAFI&gt;<xref target="RFC4760"/>
          with the BGP Wide Community 
          <xref target="I-D.ietf-idr-wide-bgp-communities"/> 
          for encoding and distributing a routing policy.
          This routing policy is called a RPD routing policy.
       </t>
      <section title="Using a New &lt;AFI, SAFI&gt;">
       <t>A new &lt;AFI, SAFI&gt; pair is defined, 
         where the Routing Policy AFI has codepoint 16398 
         and SAFI has codepoint 75.
         This new pair is called RPD &lt;AFI, SAFI&gt;.</t>

        <t>The RPD &lt;AFI, SAFI&gt; uses a new Network Layer Reachability
           Information (NLRI) defined as follows:</t>
        <t><figure anchor="nlri" align="center" 
            title="NLRI of RPD &lt;AFI, SAFI&gt;">
            <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
+-+-+-+-+-+-+-+-+
| NLRI Length   |
+-+-+-+-+-+-+-+-+
| Policy Type   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Distinguisher (4 octets)                                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Peer IP (4/16 octets)                                         ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure></t>
<t>
Where:
<list style="hanging">
<t hangText="  NLRI Length:"> 1 octet represents the length of NLRI 
   in octets as defined in <xref target="RFC4760"/>.
   If the Length is anything other than 9 or 21 octets, 
   the NLRI is corrupt 
   and the enclosing UPDATE message MUST be ignored.</t>
<t hangText="  Policy Type:"> 1 octet indicates the type of a policy. 
   1 is for Export policy. 
   If the Policy Type is any other value, the NLRI is corrupt and 
   the enclosing UPDATE message MUST be ignored.</t>
<t hangText="  Distinguisher:"> 4 octet unsigned integer that 
   uniquely identifies the content/policy. It is used to sort/order 
   the polices from the lower to higher Distinguisher. 
   They are applied in ascending order.
   A policy with a lower/smaller Distinguisher is applied before
   the policies with a higher/larger Distinguisher.</t>
<t hangText="  Peer IP:"> 4/16 octet value indicates IPv4/IPv6 peers.
   Its default value is 0.
   If the value is not a valid IP address and not 0, the NLRI is corrupt and 
   the enclosing UPDATE message MUST be ignored.
   </t>
</list>
</t>

<t>
The NLRI of RPD &lt;AFI, SAFI&gt; is carried in an MP_REACH_NLRI
attribute in a BGP UPDATE message.
The "Length of Next Hop Network Address" field of the MP_REACH_NLRI 
attribute MUST be set to zero.
</t>
       <t> 
          The RPD routing policies in the UPDATE messages 
          received are stored under the RPD &lt;AFI, SAFI&gt;.
    
          Before advertising an IPv4/IPv6 Unicast route 
          (IP route for short),
          a BGP speaker MUST apply the 
          routing policies to the route.</t>
<!--
       <t>After a BGP speaker receives a BGP UPDATE message 
          with a routing policy for it, 
          the speaker processes the policy as follows:
        <list style="symbols">
          <t>If the Peer IP in the NLRI is non-zero and 
             indicates a Peer of this BGP speaker, 
             then it MUST apply the routing
             policy to the IP routes to this Peer.</t>
          <t>If the Peer IP in the NLRI is 0, then it MUST apply 
             the routing policy to the IP routes to all its Peers.</t>
         </list>
        </t>
-->
        <t>The content of the Routing Policy is encoded 
           in a BGP Wide Community.</t>
    </section> <!-- Using a New AFI and SAFI  -->

    <section title="Atoms">
     <t>This section defines three Atoms. 
        For your reference, the format of the Atoms is illustrated below:
     </t>
          <t><figure anchor="atom-tlv" align="center" 
              title="Format of Atoms TLVs">
            <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      |             Length            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                         Value (variable)                      ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure></t>
<!--
<t>Targets TLV contains RouteAttr TLV. The Type of Targets TLV is 1.
At the same level, there are ExcTargets TLV (Type = 2) and
Param TLV (Type = 3).
 </t>
-->
      <section title="Atom Type TBD1, The Route Attributes (RouteAttr)">

        <t>A RouteAttr Atom TLV (or RouteAttr Atom for short) 
           specifies one or two groups of conditions.
           The first group of conditions states a set of IPv4/IPv6
           address prefix ranges.  
           The second group identifies a list of route attributes.  

          The Atom has the following format.</t>
          <t><figure anchor="rta-atom-tlv" 
              title="Format of RouteAttr Atom TLV">
            <artwork align="center"><![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 (variable)        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                         Value (sub-TLVs)                      ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>

<t>The Type for RouteAttr Atom is TBD1.</t>
<t>
In RouteAttr Atom, four sub-TLVs are defined:
IPv4 Address Prefix Range List, IPv6 Address Prefix Range List, 
AS_PATH RegEx, and Community List sub-TLV. 
The first two state IPv4 and IPv6 address prefix ranges respectively.
The last two identify AS_PATH and Community attributes respectively.
Each of these sub-TLVs has the format as follows.
</t>

          <t><figure anchor="rta-atom-sub-tlv" 
              title="Format of sub-TLV in RouteAttr Atom">
            <artwork align="center"><![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      |        Length (variable)        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                     Value (variable)                          ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>

      <section anchor="ipv4-prefix-range-list-sub-tlv" 
               title="IPv4 Address Prefix Range List sub-TLV">
          <t>The IPv4 Address Prefix Range List sub-TLV contains a list of 
             IPv4 address prefix ranges. 
             Each range describes an IPv4 address prefix 
             or group of Pv4 address prefixes and 
             is represented by a tuple 
             &lt;M-Type, IPv4 Address, Prefix Length, PL-Lower-Bound,
              PL-Upper-Bound&gt;, where PL is short for prefix length.
 
          Its format is illustrated below:</t>
          <t><figure anchor="ipv4-range-sub-tlv" align="center" 
              title="Format of IPv4 Address Prefix Range List sub-TLV">
            <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 (TBDa)  |         Length (N x 8)        | 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |M-Type | Resv  |                 IPv4 Address                  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | IPv4 Address  | Prefix-Length | PL-Lower-Bound| PL-Upper-Bound|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~       . . . 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |M-Type | Resv  |                 IPv4 Address                  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | IPv4 Address  | Prefix-Length | PL-Lower-Bound| PL-Upper-Bound|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>
<t>
     <list style="hanging">
       <t hangText="Type:">The Type for IPv4 Address Prefix Range List is TBDa.</t>
       <t hangText="Length:"> N x 8, 
          where N is the number of IPv4 address prefix ranges in the sub-TLV.
          If Length is not a multiple of 8, the Atom is corrupt and  
          the enclosing UPDATE message MUST be ignored.</t>
       <t hangText="Resv:"> 4 bits. 
          They MUST be sent as zero and ignored on receipt.</t>
       <t hangText="IPv4 Address:"> 
          4 octets that describe an IPv4 prefix.  This field,
          together with the Prefix-Length follows the same semantics as the NLRI
          encoding from <xref target="RFC4271"/>, 
          except that the trailing bits in the
          IPv4 Address fill the 4-octet field.</t>

       <t hangText="Prefix-Length:"> 
          1 octet field that represents the Prefix Length of the
         IPv4 Address, as specified in <xref target="RFC4271"/>.</t> 
       <t hangText="PL-Lower-Bound:"> 
          1-octet field that represents the lower bound of
          the IPv4 Address's prefix length. This field MUST be greater than,
          or equal to, the Prefix-Length, or be 0.

          If this field is less than the Prefix-Length and not 0,  
          the enclosing UPDATE message MUST be ignored.</t> 

       <t hangText="PL-Upper-Bound:"> 
          1-octet field that represents the upper bound of
          the IPv4 Address's prefix length.  
          This field MUST be greater than, or equal to, 
          the Prefix-Length, or be 0.

          If this field is less than the Prefix-Length and not 0,  
          the enclosing UPDATE message MUST be ignored.</t> 

       <t hangText="M-Type:"> 4-bit field specifying the IPv4 address prefix range  
          format type. The values are specified below. 
          <list style="hanging">
            <t hangText="M-Type = 0:"> The IPv4 address prefix  
               described corresponds 
               to the IPv4 Address with the specified Prefix-Length.
               PL-Lower-Bound and PL-Upper-Bound MUST be sent as zero 
               and ignored on receipt.</t>
            <t hangText="M-Type = 1:"> 
               Describes a set of IPv4 address prefixes that correspond to
               the IPv4 Address/Prefix-Length 
               combination and a prefix length
               greater than or equal to PL-Lower-Bound.
               PL-Upper-Bound MUST be sent as zero and ignored on receipt.
               </t>
            <t hangText="M-Type = 2:">  
               Describes a set of IPv4 address prefixes that correspond to the
               IPv4 Address/Prefix-Length 
               combination and a prefix length
               less than or equal to PL-Upper-Bound.
               PL-Lower-Bound MUST be sent as zero and ignored on receipt.
               </t>
            <t hangText="M-Type = 3:"> 
               Describes a set of IPv4 address prefixes that correspond to the
               IPv4 Address/Prefix-Length 
               combination and a prefix length
               greater than or equal to PL-Lower-Bound and 
               less than or equal to PL-Upper-Bound.
               </t>
          </list>
       </t>

      </list>
</t>
          <t>For example, tuple 
          &lt;M-Type=0, IPv4 Address = 10.1.0.0, Prefix-Length = 16, 
          PL-Lower-Bound = 0, PL-Upper-Bound = 0&gt; represents  
          10.1.0.0/16. </t>

          <t>&lt;M-Type=1, IPv4 Address = 10.1.1.0, Prefix-Length = 24, 
          PL-Lower-Bound = 28, PL-Upper-Bound = 0&gt; 
          represents the set of IPv4 address prefixes that correspond to
          10.1.1.0/24 with a prefix length greater than, or equal to, 
          28 bits (up to and including 32 bits). That is that it
          represents any IPv4 address prefix that matches 10.1.1.0/24 
          and 28 &lt;= whose prefix length &lt;= 32.
          </t> 

          <t>&lt;M-Type=2, IPv4 Address = 10.1.1.0, Prefix-Length = 24, 
          PL-Lower-Bound = 0, PL-Upper-Bound = 26&gt; 
          represents the set of IPv4 address prefixes that correspond to
          10.1.1.0/24 with a prefix length less than, or equal to, 
          26 bits (up to and including 24 bits). That is that it

          represents any IPv4 address prefix that matches 10.1.1.0/24 
          and 24 &lt;= whose prefix length &lt;= 26.
          </t>

          <t>&lt;M-Type=3, IPv4 Address = 10.1.1.0, Prefix-Length = 24, 
          PL-Lower-Bound = 26, PL-Upper-Bound = 30&gt; 
          represents the set of IPv4 address prefixes that correspond to
          10.1.1.0/24 with a prefix length greater than, or equal to, 26 bits, and
          less than, or equal to, 30 bits. That is that it

          represents any IPv4 address prefix that matches 10.1.1.0/24 
          and 26 &lt;= whose prefix length &lt;= 30.
          </t>
      </section> <!-- IPv4 Prefix sub-TLV -->

      <section title="IPv6 Address Prefix Range List sub-TLV">
          <t>Similarly,  
             an IPv6 Address Prefix Range List sub-TLV contains a list of 
             IPv6 address prefix ranges. 
             Each range describes an IPv6 address prefix
             or group of IPv6 address prefixes and 
             is represented by a tuple 
             &lt;M-Type, IPv6 Address, Prefix Length, PL-Lower-Bound,
              PL-Upper-Bound&gt;.
          Its format is illustrated below:</t>

          <t><figure anchor="ipv6-range-sub-tlv" align="center" 
              title="Format of IPv6 Address Prefix Range List sub-TLV">
            <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 (TBDb)  |         Length (N x 20)       | 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |M-Type | Resv  |       IPv6 Address (16 octets)                |
 +-+-+-+-+-+-+-+-+                                               +
 |                                                               |
 +                                                               +
 |                                                               |
 +                                                               +
 |                                                               |
 +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |               | Prefix-Length | PL-Lower-Bound| PL-Upper-Bound|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~       . . . 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |M-Type | Resv  |       IPv6 Address (16 octets)                |
 +-+-+-+-+-+-+-+-+                                               +
 |                                                               |
 +                                                               +
 |                                                               |
 +                                                               +
 |                                                               |
 +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |               | Prefix-Length | PL-Lower-Bound| PL-Upper-Bound|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
         </figure></t>
     <t>
      <list style="hanging">
       <t hangText="Type:">The Type for IPv6 Address Prefix Range List is TBDb.</t>
       <t hangText="Length:"> N x 20, 
          where N is the number of IPv6 address prefix ranges in the sub-TLV.
          If Length is not a multiple of 20,   
          the enclosing UPDATE message MUST be ignored.</t>
       </list>
      </t>   
      <t>The other fields are similar to those described in 
         <xref target="ipv4-prefix-range-list-sub-tlv"/>. </t>

          <t>For example, tuple 
          &lt;M-Type=0, IPv6 Address = 2001:db8:0:0:0:0:0:0, Prefix-Length = 32, 
          PL-Lower-Bound = 0, PL-Upper-Bound = 0&gt; represents  
          2001:db8:0:0:0:0:0:0/32. </t>

          <t>&lt;M-Type=1, IPv6 Address = 2001:db8:0:0:0:0:0:0, Prefix-Length = 32, 
          PL-Lower-Bound = 32, PL-Upper-Bound = 0&gt; 
          represents the set of IPv6 address prefixes that correspond to
          2001:db8:0:0:0:0:0:0/32 with a prefix length greater than, or equal to, 
          32 bits (up to and including 128 bits).</t> 

          <t>&lt;M-Type=2, IPv6 Address = 2001:db8:0:0:0:0:0:0, Prefix-Length = 32, 
          PL-Lower-Bound = 0, PL-Upper-Bound = 64&gt; 
          represents the set of IPv6 address prefixes that correspond to
          2001:db8:0:0:0:0:0:0/32 with a prefix length less than, or equal to, 
          64 bits (up to and including 32 bits).</t>

          <t>&lt;M-Type=3, IPv6 Address = 2001:db8:0:0:0:0:0:0, Prefix-Length = 32, 
          PL-Lower-Bound = 48, PL-Upper-Bound = 64&gt; 
          represents the set of IPv6 address prefixes that correspond to
          2001:db8:0:0:0:0:0:0/32 with a prefix length greater than, 
          or equal to, 48 bits, and
          less than, or equal to, 64 bits.</t>

      </section> <!-- IPv6 Prefix sub-TLV -->

      <section title="AS_PATH RegEx sub-TLV">
          <t>An AS_PATH RegEx sub-TLV represents any AS_PATH specified 
          by a regular expression <xref target="RegExIEEE"/>. 
          Its format is illustrated below:</t>
          <t><figure anchor="as-path-sub-tlv" align="center" 
              title="Format of AS_PATH RegEx sub-TLV">
            <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 (TBDc)  |      Length (Variable)        |  
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                    AS_PATH Regex String                       |
 :                                                               :
 |                                                               ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>
        <t>
          <list style="hanging">
            <t hangText="Type:">The Type for AS_PATH RegEx is TBDc.</t>
            <t hangText="Length:"> Variable, maximum is 1024.</t>
            <t hangText="AS_PATH Regex String:">
               It is a regular expression as defined in 
               <xref target="RegExIEEE"/>.</t>
          </list>
        </t>

        <t>For example, regular expression "12345$" represents 
           any AS_PATH that end with 12345.</t>
      </section> <!-- AS-Path sub-TLV -->

      <section title="Community List sub-TLV">
          <t>A Community List sub-TLV represents a list of 
          communities in the BGP COMMUNITIES defined by 
          <xref target="RFC1997"/>. 
          Its format is illustrated below:</t>
          <t><figure anchor="com-sub-tlv" align="center" 
              title="Format of Community List sub-TLV">
            <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 (TBDd)  |        Length (N x 4 + 1)       |    Resv     |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                      Community 1 Value                        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                              . . .                            ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                      Community N Value                        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>
<t>
     <list style="hanging">
       <t hangText="Type:">The Type for Community List is TBDd.</t>
       <t hangText="Length:"> N x 4 + 1, 
          where N is the number of communities.
          If Length is not a multiple of 4 plus 1, the Atom is corrupt and 
          the enclosing UPDATE message MUST be ignored.
          </t>
       <t hangText="Resv:"> 1 octet. 
          These bits MUST be sent as zero and ignored on receipt.</t>
       <t hangText="Community Value:"> The Community List 
          contains a list of Community Values. Each Community Value
          is a 4-octet field for a community defined 
          by <xref target="RFC1997"/>.</t>
      </list>
</t>
      </section> <!-- Community List sub-TLV -->
      </section> <!-- RouteAttr Atom -->

      <section title="Atom Type TBD2, The MED Change">
          <t>A MULTI_EXIT_DISC (MED) Change Atom indicates  
           an action to change the MED.
          Its format is illustrated as a TLV (Type Length Value) below. 
          The Value field consists of an OP field of 1 octet and an
          Argument field of 4 octets.</t>
          <t><figure anchor="med-sub-tlv" align="center" 
              title="Format of MED Change Atom">
            <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 (5)           | 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |      OP       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                           Argument                            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>
<t>
     <list style="hanging">
       <t hangText="Type:"> The Type for MED Change Atom is TBD2.</t>
       <t hangText="Length:"> 5.
          If Length is any other value, the Atom is corrupt and the enclosing 
          UPDATE message MUST be ignored.</t>
       <t hangText="Argument:"> 4 octet unsigned integer.</t>
       <t hangText="OP:"> 1 octet. Three values are defined:
          <list style="hanging">
            <t hangText="OP = 0:"> assign the Value of the Argument to 
               the existing MED.
               If the MED attribute does not exist for an IP route, 
               add a MED attribute with the value.</t>
            <t hangText="OP = 1:"> add the Value of the Argument to 
               the existing MED.
               If the sum is greater than the maximum
               allowed value, use that maximum value instead.
               If the MED attribute does not exist for an IP route, 
               the action specified by the Atom to the route is not taken.</t>
            <t hangText="OP = 2:"> subtract the Value of the Argument from 
               the existing MED.
               If the result is less than 0, use 0 instead.
               If the MED attribute does not exist for an IP route, 
               the action specified by the Atom to the route is not taken.</t>
            <t hangText="If OP is any other value, 
               the Atom is corrupt and the enclosing 
               UPDATE message MUST be ignored."></t>
          </list>
        </t>
      </list>
</t>
        </section> <!-- MED Change -->

        <section title="Atom Type TBD3, The AS_PATH Change">
          <t>An AS_PATH Change Atom indicates an action to change the AS_PATH. 
          Its format is illustrated below:</t>
          <t><figure anchor="as-path-change-sub-tlv" align="center" 
              title="Format of AS_PATH Change Atom">
            <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 (TBD3)  |        Length (n x 5)         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                             AS1                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    Count1     |  
 +-+-+-+-+-+-+-+-+
 ~       . . . 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                             ASn                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    Countn     |  
 +-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>
<t>
     <list style="hanging">
       <t hangText="Type:"> The Type for AS_PATH Change Atom is TBD3.</t>
       <t hangText="Length:"> n x 5.
           If Length is not a multiple of 5, the Atom is corrupt and the 
           enclosing UPDATE message MUST be ignored.</t>
       <t hangText="AS and Count:"> The Atom contains a list of 
          AS and Count pairs. 
          Each AS and Count pair has 
          an AS field of 4 octets for an AS number and 
          a Count field of 1 octet for an unsigned integer indicating
          the number of times the AS number repeats.</t>
      </list>
</t>
          <t>The sequence of AS numbers specified by the Atom is added 
          to the existing AS_PATH. 
          The AS numbers SHOULD be local AS numbers.</t>

        </section> <!-- AS-Path Change -->
      </section> <!-- Atoms -->

      <section title="Community Value in BGP Wide Community">
        <t> 
          <xref target="I-D.ietf-idr-wide-bgp-communities"/> defines
          the Type 1 BGP Community Container, the BGP Wide Community. 
          It contains a Community Value of 4 octets
          indicating what set of actions a router is
          requested to take upon reception of an IP route 
          matching the conditions in this
          community.

          This section specifies two Community Values:

          <list style="symbols">
           <t>MATCH AND SET ATTR (TBDx) </t>
           <t>MATCH AND NOT ADVERTISE (TBDy) </t>  
          </list>
        </t>

      <section anchor="match-and-set" title="MATCH AND SET ATTR (TBDx)">
       <t>For the BGP Wide Community with Community Value
          MATCH AND SET ATTR (TBDx), 
          its Targets TLV MUST contain a RouteAttr Atom,
          its Parameters TLV MUST include a MED Change Atom and/or
          a AS_PATH Change Atom.

          The RouteAttr Atom MUST contain
          an IPv4/IPv6 (IP for short) Address Prefix Range List and 
          may contain a Community List and/or AS_PATH sub-TLVs.

          The Prefix Range List states a set
          of IP address prefix ranges.  
          The Community List and/or AS_PATH identify a
          set of path attributes. 
       </t>

       <t>
          After a BGP speaker receives the BGP Wide Community in a 
          BGP UPDATE message for it, 
          the speaker extracts the routing policy 
          from the BGP Wide Community.

          For any IP route to a peer of the speaker,
          if the IP address prefix of the route is 
             in any prefix range stated by the Prefix Range List 
             and the route has the attributes identified by 
             the Community List and/or AS_PATH, 
  
          then the attributes of the IP
          route are modified per the
          actions specified by the MED Change and/or
          AS_PATH Change Atom 
          before sending it to the peer.
       </t>
<!--
       <t>
        If the IP routes to a peer
        match the specific conditions defined in the routing policy extracted
        from the RPD route, then the attributes of the IP
        routes will be modified when sending to the peer per the
        actions defined in the RPD route.</t>
-->
      </section> <!-- MATCH AND SET ATTR (TBDa) -->

      <section title="MATCH AND NOT ADVERTISE (TBDy)">
       <t>For the BGP Wide Community with Community Value
          MATCH AND NOT ADVERTISE (TBDy), 
          its Targets TLV MUST contain a RouteAttr Atom.
          The Atom has the same contents and semantic as the one 
          described in <xref target="match-and-set"/>.

<!--
   The
   RouteAttr Atom MUST contain an IP Address Prefix Range List
   and may contain a Community List and/or AS_PATH sub-TLVs. The Prefix
   Range List states a set of IP address prefix ranges. The
   Community List and/or AS_PATH identify a set of path attributes.
-->
       </t>

       <t>
          After a BGP speaker receives the BGP Wide Community in a 
          BGP UPDATE message for it, 
          the speaker extracts the routing policy 
          from the BGP Wide Community.

          For any IP route to a peer of the speaker,
   if the IP address prefix of the route is in any
   prefix range stated by the Prefix Range List and the route has the
   attributes identified by the Community List and/or AS_PATH, 
          then the IP route will
          not be advertised to the peer.
       </t>
<!--
       <t>
        If the IPv4/IPv6 unicast routes to a 
        peer match the specific conditions defined in the routing policy
        extracted from the RPD route, then the IP routes will
        not be advertised to the peer.</t>

        <t>For the Parameter(s) TLV, two action sub-TLVs are defined:
        MED change sub-TLV and AS-Path change sub-TLV.
        When the community in the container is MATCH AND SET ATTR,
        the Parameter(s) TLV can include these sub-TLVs. 
        When the community is MATCH AND NOT ADVERTISE,
        the Parameter(s) TLV's value is empty.</t>

        <t>These BGP Wide Communities support all three TLVs defined in
          <xref target="I-D.ietf-idr-wide-bgp-communities"/>: Targets TLV, Exclude
          Targets TLV, and Parameters TLV.
        </t>
-->
       </section> <!-- MATCH AND NOT ADVERTISE (TBDb) -->
      </section> <!-- Community Value in BGP Wide Community  -->
    </section> <!-- Protocol Extensions -->


    <section title="Operational Considerations">
       <t>To adjust the traffic flowing to an AS with a controller, 
          an operator needs to create a BGP RPD session
          between the controller and a RR in the AS.
          This session SHOULD be independent of routing information.
          The controller can distribute a RPD routing policy  
          to any BGP speaker in the AS
          using this session. 
          The speaker applies the policy to the IP routes 
          to be sent to its peers as specified.</t>

       <t>For the session between the controller and the RR, 
          some existing mechanisms such as BGP Graceful Restart (GR)
          <xref target="RFC4724"/> 
          and BGP Long-lived Graceful Restart (LLGR) SHOULD be used
          to let the RR keep the RPD routing policies 
          from the controller for some time.
          With support of "Long-lived Graceful Restart Capability"
          <xref target="I-D.ietf-idr-long-lived-gr"/>, 
          the RPD routing policies can be retained for a longer time 
          after the controller fails.
          When the controller recovers from its failure within
          the graceful period, 
          the RR still have the RPD routing policies 
          from the controller before the failure.</t>

       <t>For the sessions between the speaker and its peers,
          the mechanisms mentioned above are not necessary. 
          When the speaker goes down, 
          the traffic to the AS through the speaker from its peers
          needs take another path without going through the speaker. 
          The peers withdraw the routes from the speaker 
          and adjust (reroute) the traffic to use another path
          without the speaker. This is expected.</t>

       <t>For the traffic to an IP address prefix in the AS 
          from an neighbor AS, 
          the operator needs make sure that the traffic 
          can be adjusted through changing the MED and/or 
          AS_PATH attribute in the IP route with the prefix
          to be sent to the neighbor AS.</t>

       <t>In a BGP speaker, there are routing policies from 
          different sources, including RPD and others such as
          configuration and PCE. 
          The speaker applies all the policies as needed.

          It applies the RPD routing policies after applying
          the other routing policies. 

          In order to adjust traffic using RPD routing policies
          with MED change and/or AS_PATH change,
          the operator needs make sure that 
          the RPD policies are not superseded by any  
          policy from other sources.  
       </t>

       <t>When a RPD routing policy is to be applied 
          by a BGP speaker to 
          only one of its peers, the Peer field SHOULD be 
          the IP address of this peer. 
          After receiving the RPD routing policy,
          the BGP speaker applies the policy to 
          the IP routes to be sent to this peer. </t>      

       <t>When a RPD routing policy is to be applied 
          by a BGP speaker to 
          all its peers in some of its neighbor ASs, 
          the Autonomous System Number (ANS) List Atom 
          can be used in the Targets TLV 
          to select these neighbor ASs while the Peer field is 0.
          After receiving the RPD routing policy,
          the BGP speaker applies the policy to 
          the IP routes to be sent to the peers in 
          these selected neighbor ASs.</t>

       <t>When a RPD routing policy is to be applied 
          by a BGP speaker to some of its peers, 
          the IP Prefix List Atom can be used in the Targets TLV 
          to select these peers while the Peer field is 0.

          After receiving the RPD routing policy,
          the BGP speaker applies the policy to
          the IP routes to be sent to these selected
          peers.
       </t>

       <t>There are already lots of existing policies
      configured on the routers in an operational network. There are
      different types of policies, which include security, management
      and control policies.  These policies are relatively stable.
      However, the policies for adjusting traffic are dynamic.  Whenever
      the traffic through a path is not expected, the policies to
      adjust the traffic for that path are configured on the related
      routers.    
      Some users would like to separate the stable 
      policies from the dynamic ones even though they have configuration
      automation systems (including YANG models). 
      In this case, RPD with a controller (RPD for short)
      should be considered over others.
      Using RPD, the stable policies and dynamic ones are 
      separated from users' view.</t>

       <t>When the number of routers to be configured for 
          adjusting traffic is big and keeping all the connections
          live between a configuration
          automation system and these routers affects
          network performance, 
          RPD should be considered over this system.
          Using RPD, there is one connection 
          between the controller and a RR in an AS.
          There is almost no impact on the network performance.</t>

      <t>When it takes a long time for a configuration
         automation system to adjust traffic, 
         RPD should be considered over this system.
         Using RPD, the policies for adjusting traffic are  
         distributed to the related routers and applied 
         in routing speed.</t>

    </section> <!-- Operations -->




    <section anchor="IANA" title="IANA Considerations">

    <section anchor="existing" title="Existing Assignments">

      <t>IANA has assigned an AFI of value 16398 from the registry 
      "Address Family Numbers" for Routing Policy.</t>

      <t>IANA has assigned the Routing Policy SAFI of value 75 
         from the registry 
         "Subsequent Address Family Identifiers (SAFI) Parameters".</t>

      <t>IANA has assigned a Code Point of value 72 from the registry
         "Capability Codes" for Routing Policy Distribution.</t>
    </section>

<section anchor="wide-com-values" title="BGP Wide Community Community Types">
<t>IANA is requested to assign from the registry 
"Registered Type 1 BGP Wide Community Community Types" the following values:
<figure>
<artwork align="center">
<![CDATA[ 
+---------------------------+-----------------------+-------------+ 
| Community Type Value      | Description           | Reference   | 
+---------------------------+-----------------------+-------------+ 
|TBDx (0x80000018 suggested)|MATCH AND SET ATTR     |This document|
+---------------------------+-----------------------+-------------+ 
|TBDy (0x80000019 suggested)|MATCH AND NOT ADVERTISE|This document|
+---------------------------+-----------------------+-------------+ ]]>
</artwork>
</figure>
</t>
</section>

    <section anchor="rt-attr-type" title="BGP Community Container Atom Types">
      <t>IANA is requested to assign from the registry
         "BGP Community Container Atom Types" as follows:

        <figure>
            <artwork align="center"><![CDATA[
   +-----------------------+------------------------+-------------+
   | Type Value            | Name                   | Reference   |
   +-----------------------+------------------------+-------------+
   | TBD1 (0x09 suggested) | RouteAttr              |This document|
   +-----------------------+------------------------+-------------+
   | TBD2 (0x0A suggested) | MED Change             |This document|
   +-----------------------+------------------------+-------------+
   | TBD3 (0x0B suggested) | AS_PATH Change         |This document|
   +-----------------------+------------------------+-------------+
   | TBDa (0x0C suggested) | IPv4 Prefix Range List |This document|
   +-----------------------+------------------------+-------------+
   | TBDb (0x0D suggested) | IPv6 Prefix Range List |This document|
   +-----------------------+------------------------+-------------+
   | TBDc (0x0E suggested) | AS-Path RegEx          |This document|
   +-----------------------+------------------------+-------------+
   | TBDd (0x0F suggested) | Community List         |This document|
   +-----------------------+------------------------+-------------+
]]></artwork>
          </figure>
      </t>
    </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>All the security considerations for base BGP 
         <xref target="RFC4271"/><xref target="RFC4272"/> and 
         BGP Wide Community 
         <xref target="I-D.ietf-idr-wide-bgp-communities"/> 
         apply to the BGP extensions defined in this document.</t>

<t>This document depends on 
   the BGP Multiprotocol extension <xref target="RFC4760"/>,
   which states that the extension does not change the
   underlying security issues inherent in the existing BGP. 

   It does not fundamentally change the security behavior of
   BGP deployments.

   It may be observed that
   the RPD is used only within a well-defined scope, for example,
   within a single AS or a set of ASes that are administrated 
   by a single service provider.
</t>

      <t>This document defines two community values in the BGP 
         Wide Community to distribute and apply routing policies. 
         One is MATCH AND SET ATTR (TBDx)
         and the other is MATCH AND NOT ADVERTISE (TBDy).
         Using the former changes one or more best IP routes 
         distributed by BGP 
         and redirects a certain traffic flows 
         in a network.
         Using the latter drops one or more IP routes 
         distributed by BGP and
         redirects some traffic flows in a network.

         The potential effects of the distribution and use 
         of a undesired routing policy from a (rogue) router 
         include causing network congestions and 
         reducing the quality of the services. 

         They can also have the effect of dropping traffic.  
         Note that a rogue node can use these to attack the network, 
         but a misconfigured policy could have the same effect. 

         It is necessary to prevent a (rogue) router 
         from advertising an incorrect or undesired 
         routing policy through BGP sessions. 


         The risk can be mitigated by using the techniques 
         such as those discussed in <xref target="RFC5925"/>
         to help authenticate BGP sessions.
<!--
         Thus, it is harder to spoof update messages (which 
         could be used to install bogus RPD policies).

         It also helps constrain 
         the distribution of  
         routing policies through BGP sessions 
         within the trusted domain.
-->  
       </t>

       <t>
Note that a typical RPD deployment requires a BGP session
between a controller and a route reflector 
in a network administrated by a single service provider. 
The controller distributes RPD routing policies to some routers 
in the network through this BGP session. 

There is concern that a rogue controller might
be introduced into the network.
The rogue controller may inject false RPD routing policies or 
take over and change existing RPD routing policies.

This corresponds to a rogue BGP speaker entering the 
network, or a route reflector being subverted.

It is strongly recommended that 
the techniques such as those in <xref target="RFC5925"/> 
be used to secure this BGP session, 
the route reflector be configured with the identity of 
the controller, and
software loads on the controller be protected. 
       </t>

    </section>
  </middle>
  <back>

    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <?rfc include='reference.RFC.4271'?>
      <?rfc include='reference.RFC.4272'?>
      <?rfc include='reference.RFC.4760'?>
      <?rfc include='reference.RFC.8174'?>
      <?rfc include='reference.RFC.1997'?>
      <?rfc include='reference.I-D.ietf-idr-wide-bgp-communities'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.4724'?>
      <?rfc include='reference.RFC.5925'?>
      <?rfc include='reference.RFC.9012'?>
      <?rfc include='reference.I-D.ietf-idr-long-lived-gr'?>
      <reference anchor="RegExIEEE">
        <front>
        <title>IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008)</title>
        <author initials="The Open Group" surname="" fullname="The Open Group"></author>
        <date year="2018"/>
        </front>
      </reference>

    </references>

    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t>The authors would like to thank Acee Lindem, Jeff Haas, Jie Dong,
      Lucy Yong, Qiandeng Liang, Zhenqiang Li, Robert Raszuk, 
      Donald Eastlake, Ketan Talaulikar, and Jakob Heitz
      for their comments to this work.</t>
    </section>

    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-contributors">Contributors</name>

      <t>The following people have substantially contributed to the definition
      of the BGP RPD and to the editing of this document:<figure
          align="left">
          <artwork><![CDATA[
Sujian Lu
Tencent
Email: jasonlu@tencent.com


Shunwan Zhuang
Huawei
Email: zhuangshunwan@huawei.com


Peng Zhou
Huawei
Email: Jewpon.zhou@huawei.com
]]></artwork>
        </figure></t>
    </section>

  </back>
</rfc>
