<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>

<!DOCTYPE rfc [
  <!ENTITY nbsp   "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-patki-grow-bmp-common-updates-02"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">

<front>
    <title abbrev="Common BMP Messages">
    Common BMP Route-Monitoring Messages for Routes Unchanged by Policy
    </title>

    <author initials="D" surname="Patki" fullname="Dhananjay Patki">
    <organization abbrev="">Cisco Systems, Inc.</organization>
    <address>
    <postal>
    <street>Cessna Business Park SEZ, Kadubeesanahalli</street>
    <city>Bangalore</city>
    <region>Karnataka</region>
    <code>560103</code>
    <country>India</country>
    </postal>
    <email>dhpatki@cisco.com</email>
    </address>
    </author>

    <author initials="P" surname="Narasimha" fullname="Prasad S. Narasimha">
    <organization abbrev="">Cisco Systems, Inc.</organization>
    <address>
    <postal>
    <street>Cessna Business Park SEZ, Kadubeesanahalli</street>
    <city>Bangalore</city>
    <region>Karnataka</region>
    <code>560103</code>
    <country>India</country>
    </postal>
    <email>snprasad@cisco.com</email>
    </address>
    </author>

    <date year="2025" />
    <area>Routing</area>
    <workgroup>GROW</workgroup>


    <!--  SECTION 0:  Abstract  -->
    <abstract>
    <t>
    A route unmodified by the inbound policy on a monitored router is
    included both in Pre-Policy Adj-RIB-In as well as Post-Policy
    Adj-RIB-In Route-Monitoring messages when both the Pre-Policy and
    Post-Policy Route-Monitoring modes are enabled. Similarly, a route
    unmodified by the outbound policy is included in Pre-Policy Adj-RIB-Out
    as well as Post-Policy Adj-RIB-Out Route-Monitoring messages. This
    document defines a method to avoid duplicate inclusion of routes
    unmodified by policy either in Adj-RIB-In or Adj-RIB-Out.
    </t>
    </abstract>
</front>

<middle>

<section anchor="introduction" title="Introduction">
    <t>
    <xref target="RFC7854"/> defined Pre-Policy and Post-Policy Adj-RIB-In
    Route-Monitoring messages, whereas <xref target="RFC8671"/> defined
    Pre-Policy and Post-Policy Adj-RIB-Out Route-Monitoring messages.
    If both Pre-Policy and Post-Policy Route-Monitoring modes are enabled
    on a device for a RIB (Adj-RIB-In or Adj-RIB-Out), the routes are
    included in both Pre-Policy and Post-Policy Route-Monitoring messages,
    even if the routes remains unmodified as a result of the application
    of policy.
    </t>
    <t>
    The optimization proposed in this document will help improve the BMP
    convergence as described in the section below.
    </t>

    <section anchor="convergence" title="BMP Convergence">
    <t>
    The monitored routers may have policies that modify none, some or
    several attributes of prefixes learnt from a few to many BGP peers.

    For example, a Route Reflector Inbound policy may modify very few
    of the received attributes. Whereas, a Provider Edge router Inbound
    policy may modify more attributes in the prefixes learnt across
    several peers.

    Consider a monitored router that learns 1,000,000 prefixes from various
    peers and, in different cases, 100%, 50%, 10% and none of the prefixes
    are modified by the policies. For the sake of simplicity, consider
    that 10 prefixes are packed in a single Route-Monitoring message and
    the average size of Route-Monitoring messages is 200 bytes. The
    following illustration shows the number of Route-Monitoring messages
    sent in each of these cases.
    </t>


    <table anchor="conv" align="center">
      <name>Route-Monitoring messages generated for inbound policy variations</name>
      <thead>
        <tr>
          <th align="center" colspan="1" rowspan="1">Prefixes modified by inbound policy</th>
          <th align="center" colspan="1" rowspan="1">Pre-Policy Messages</th>
          <th align="center" colspan="1" rowspan="1">Post-Policy Messages</th>
          <th align="center" colspan="1" rowspan="1">Common Messages</th>
          <th align="center" colspan="1" rowspan="1">Total Messages Transmitted</th>
          <th align="center" colspan="1" rowspan="1">Total Bytes Transmitted</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td align="left" colspan="1" rowspan="1">100% = 1,000,000</td>
          <td align="center" colspan="1" rowspan="1">100,000</td>
          <td align="center" colspan="1" rowspan="1">100,000</td>
          <td align="center" colspan="1" rowspan="1">0</td>
          <td align="center" colspan="1" rowspan="1">200,000</td>
          <td align="center" colspan="1" rowspan="1">40 MB</td>
        </tr>
        <tr>
          <td align="left" colspan="1" rowspan="1">50% = 500,000</td>
          <td align="center" colspan="1" rowspan="1">50,000</td>
          <td align="center" colspan="1" rowspan="1">50,000</td>
          <td align="center" colspan="1" rowspan="1">50,000</td>
          <td align="center" colspan="1" rowspan="1">150,000</td>
          <td align="center" colspan="1" rowspan="1">30 MB</td>
        </tr>
        <tr>
          <td align="left" colspan="1" rowspan="1">10% = 100,000</td>
          <td align="center" colspan="1" rowspan="1">10,000</td>
          <td align="center" colspan="1" rowspan="1">10,000</td>
          <td align="center" colspan="1" rowspan="1">90,000</td>
          <td align="center" colspan="1" rowspan="1">110,000</td>
          <td align="center" colspan="1" rowspan="1">22 MB</td>
        </tr>
        <tr>
          <td align="left" colspan="1" rowspan="1">None</td>
          <td align="center" colspan="1" rowspan="1">0</td>
          <td align="center" colspan="1" rowspan="1">0</td>
          <td align="center" colspan="1" rowspan="1">100,000</td>
          <td align="center" colspan="1" rowspan="1">100,000</td>
          <td align="center" colspan="1" rowspan="1">20 MB</td>
        </tr>
      </tbody>
    </table>

    <t>
    While there can be multi-dimensional variations that determine the
    number of messages sent, the above simplified cases broadly illustrates
    that the number or Route-Monitoring messages can be reduced by a
    factor of two in the best case. This can therefore reduce the
    transmission processing, number of transmit buffers required for
    sending the BMP updates and internal queuing delays in the monitored
    router and load on
    the network connecting to the monitoring station; thereby improving
    the overall BMP convergence. This can also reduce the number of
    messages processed by the monitoring station.
    </t>
    </section>

    <section anchor="solution" title="Solution">
    <t>
    To avoid sending duplicate unmodified routes in the Post-Policy
    Route-Monitoring messages, we introduce in this document a method based on
    Common Update TLV as defined in <xref target="I-D.ietf-grow-bmp-tlv"/>.
    </t>
    </section>

    <section 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"/>.
        </t>
    </section>
</section>

<section anchor="ctlv" title="Common Update TLV">
  <t>
  Here we define a new TLV named Common Update TLV using the TLV construct defined in
  <xref target="I-D.ietf-grow-bmp-tlv" sectionFormat="of" section="4.2"/>.
  In addition to
  allowing sharing a common BGP Update PDU between Pre-Policy and Post-Policy modes
  of Adj-RIB-In and the same for Adj-RIB-Out,
  this method is extensible in allowing sharing across Adj-RIB-In and Adj-RIB-Out
  views, though we see it being used rarely.
  </t>
  <t>
  The TLV has Index zero (0) which specifies that a TLV applies to all NLRIs
  contained in the BGP Update PDU. The value of the TLV defines flags that
  are described below.
  </t>
  <figure anchor="ctlvfig" title="Common Update TLV">
  <artwork>
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |            Type=TBD1            |          Length = 3         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             Index=0             |I|J|O|P|  Resv |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  </artwork>
  </figure>
  <ul>
    <li>
      When I flag is set, it indicates that the BGP Update PDU reflects
      the Pre-Policy Adj-RIB-In view of all contained NLRIs
    </li>
    <li>
      When J flag is set, it indicates that the BGP Update PDU reflects
      the Post-Policy Adj-RIB-In view of all contained NLRIs
    </li>
    <li>
      When O flag is set, it indicates that the BGP Update PDU reflects
      the Pre-Policy Adj-RIB-Out view of all contained NLRIs
    </li>
    <li>
      When P flag is set, it indicates that the BGP Update PDU reflects
      the Post-Policy Adj-RIB-Out view of all contained NLRIs
    </li>
    <li>
      The remaining bits are reserved for future use. They MUST be
      transmitted as 0 and their values MUST be ignored on receipt.
    </li>
  </ul>

  <section anchor="examples" title="Examples of the Common Update TLV">
    <ul>
      <li>
        When I=1, J=1, O=0, P=0 it indicates that the BGP Update PDU
        is the same for Pre-Policy and Post-Policy Adj-RIB-In views.
      </li>
      <li>
        When I=0, J=0, O=1, P=1 it indicates that the BGP Update PDU
        is the same for Pre-Policy and Post-Policy Adj-RIB-Out views.
      </li>
    </ul>
      <t>
      The following examples demonstrate sharing across Adj-RIB-In and Adj-RIB-Out views
      as well, but we anticipate this not to be used
      </t>
    <ul>
      <li>
        When I=0, J=1, O=1, P=0 it indicates that the BGP Update PDU
        is the same for Post-Policy Adj-RIB-In and Pre-Policy
        Adj-RIB-Out views.
      </li>
      <li>
        When I=0, J=1, O=1, P=1 it indicates that the BGP Update PDU
        is the same for Post-Policy Adj-RIB-In, and Pre-Policy
        and Post-Policy Adj-RIB-Out views.
      </li>
    </ul>
  </section>
</section>

<section anchor="messages" title="BMP Messages">
    <t>
    The Common Update TLV is used in the context of BGP Update PDU,
    and has no
    significance for Peer-Up, Peer-Down, Initiation, Termination and
    Statistics Report messages. Though the Route Mirroring message contains
    a BGP Update PDU, as there is no policy execution involved in its
    transmission, the Common Update TLV has no significance. In all messages
    except the Route-Monitoring message, the Common Update TLV MUST NOT be
    included during transmission and MUST be ignored if found on reception.
    </t>

    <section anchor="routemon" title="Route Monitoring">
    <t>
    The Common Update TLV is of relevance only in the Adj-RIB-In and Adj-RIB-Out
    Route-Monitoring messages and not in the Loc-RIB Route-Monitoring messages.
    </t>
    <t>
    A Route-Monitoring Update message containing the Common Update TLV MAY
    also include Adj-In Time and Adj-Out Time Timestamp TLVs defined in
    <xref target="I-D.younsi-grow-bmp-snts"/>. The Adj-In Timestamp TLV MUST
    NOT be included if the Common Update TLV does not have I flag or
    J flag set, and, the Adj-Out Timestamp TLV MUST NOT be included if
    the Common Update TLV does not have O flag or P flag set. If included,
    the same must be ignored by the receiver.
    </t>
    </section>

    <section anchor="routemonaggr" title="Aggregated Route Monitoring">
    <t>
    The Common Update TLV can also be used in the Aggregated BMP Route-Monitoring
    Message defined in <xref target="I-D.liu-grow-bmp-rm-aggregated"/>.
    This TLV is of relevance only in the Adj-RIB-In and Adj-RIB-Out Aggregated
    Route-Monitoring messages and not in the Loc-RIB Aggregated Route-Monitoring
    messages.
    </t>
    <t>
    An Aggregated Route-Monitoring Update message containing the Common Update
    TLV MAY also include Adj-In Time and Adj-Out Time Timestamp TLVs defined in
    <xref target="I-D.younsi-grow-bmp-snts"/>. The Adj-In Timestamp TLV MUST
    NOT be included if the Common Update TLV does not have I flag or
    J flag set, and, the Adj-Out Timestamp TLV MUST NOT be included if
    the Common Update TLV does not have O flag or P flag set. If included,
    the same must be ignored by the receiver.
    </t>
    </section>

    <section anchor="stats" title="Statistics Report">
        <t>
          This document defines new statistics types that use the following bitmap
          which is used to indicate a combination of Route-Monitoring views
          for which routes are the same, i.e. unmodified by policy.
        </t>
        <figure anchor="cbmap" title="Bitmap of Route-Monitoring views">
        <artwork>
          +-+-+-+-+-+-+-+-+
          |I|J|O|P|  Resv |
          +-+-+-+-+-+-+-+-+
        </artwork>
        </figure>
        <ul>
          <li>I bit - Pre-Policy Adj-RIB-In</li>
          <li>J bit - Post-Policy Adj-RIB-In</li>
          <li>O bit - Pre-Policy Adj-RIB-Out</li>
          <li>P bit - Post-Policy Adj-RIB-Out</li>
          <li> The remaining bits are reserved for future use. They MUST be
               transmitted as 0 and their values MUST be ignored on receipt.</li>
        </ul>
        <t>
          The following new statistics types are defined.
        </t>
        <ul>
          <li>
            Stat Type = TBD2:
            Number of routes common across a combination of Route-Monitoring
            views. The value is structured as follows:
            Bitmap of Route-Monitoring views,
            Number of routes (64-bit Gauge) common between the views
            indicated by the bitmap.

            Multiple instances of this statistics type MAY be included in the
            same Statistics Report message, each for a unique value of the bitmap.
          </li>
          <li>
            Stat Type = TBD3:
            Number of routes common across a combination of Route-Monitoring
            views per-AFI/SAFI. The value is structured as follows:
            2-byte Address Family Identifier (AFI),
            1-byte Subsequent Address Family Identifier (SAFI),
            Bitmap of Route-Monitoring views,
            Number of routes (64-bit Gauge) common between the views indicated
            by the bitmap.

            Multiple instances of this statistics type MAY be included in the
            same Statistics Report message, each for a unique value of AFI/SAFI
            and the bitmap.
          </li>
        </ul>
    </section>
</section>

<section anchor="iana" title="IANA Considerations">
    <t>
      IANA needs to assign the following new parameters to the
      <eref target="https://www.iana.org/assignments/bmp-parameters/" brackets="none">
      "BGP Monitoring Protocol (BMP) Parameters" registry</eref>.
    </t>

    <section anchor="iana-bmp-tlv" title="Addition to BMP Route Monitoring TLVs">
      <t>
      IANA needs to make the following assignment for the "Common Update TLV"
      in the "BMP Route Monitoring TLVs" registry.
      </t>
      <t>
      Type = TBD1 (15 Bits): Common Update TLV
      </t>
    </section>

    <section anchor="iana-stats" title="Additions to BMP Statistics Types Registry">
      <t>
        IANA needs to make the following assignment for the statistics types
        defined in <xref target="stats"/> of this document:
      </t>
      <table anchor="iana2" align="left">
        <name>Additions to the "BMP Statistics Types" Registry</name>
        <thead>
          <tr>
            <th align="left" colspan="1" rowspan="1">Stat Type</th>
            <th align="left" colspan="1" rowspan="1">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">TBD2</td>
            <td align="left" colspan="1" rowspan="1">
                Number of routes common across a combination of Route-Monitoring
                views.</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">TBD3</td>
            <td align="left" colspan="1" rowspan="1">
                Number of routes common across a combination of Route-Monitoring
                views per-AFI/SAFI.</td>
          </tr>
        </tbody>
      </table>
    </section>
</section>

<section anchor="secons" title="Security Considerations">
    <t>
    This document does not add any additional security considerations.
    The considerations in <xref target="RFC7854" section="11" sectionFormat="of"/> apply to this document.
    </t>
</section>

<section anchor="ack" title="Acknowledgements">
<t>
TBD
</t>
</section>

</middle>

<back>

<references>
    <name>Normative References</name>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7854.xml"/>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8671.xml"/>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-grow-bmp-tlv.xml"/>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.liu-grow-bmp-rm-aggregated.xml"/>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.younsi-grow-bmp-snts.xml"/>
</references>

</back>
</rfc>
