<?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-wang-grow-bmp-bgp-rib-stats-ext-01"
     ipr="trust200902">
  <front>
    <title abbrev="BMP Stats Ext">BGP RIB Fine-Grained Filtering Statistics
    Extensions for BGP Monitoring Protocol (BMP)</title>

    <author fullname="Lili Wang" initials="L." surname="Wang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>lily.wong@huawei.com</email>
      </address>
    </author>

    <author fullname="Nan Geng" initials="N." surname="Geng">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>gengnan@huawei.com</email>
      </address>
    </author>

    <author fullname="Lei Li" initials="L." surname="Li">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>kenny.lilei@huawei.com</email>
      </address>
    </author>

    <author fullname="Shunwan Zhuang" initials="S." surname="Zhuang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>zhuangshunwan@huawei.com</email>

        <uri/>
      </address>
    </author>

    <date day="5" month="July" year="2026"/>

    <abstract>
      <t>The BGP Monitoring Protocol (BMP) defines mechanisms to monitor BGP
      running status and routing information bases (RIBs). <xref
      target="RFC9972"/> extended BMP statistics reporting by introducing
      advanced BGP RIB stat types. However, with the rapid deployment of
      path-level cryptographic security protocols (such as ASPA) and the
      complex interactions between control plane and hardware forwarding
      resources, network operators require granular, behavior-driven
      observability into why routes are discarded, invalidated, or restricted
      at both the ingress and egress boundaries. This document updates the
      registry established by <xref target="RFC7854"/> and extended by <xref
      target="RFC9972"/> by defining some fine-grained BGP RIB monitoring
      statistics types covering hardware resource exhaustion, next-hop
      resolution anomalies, structured route leaks (<xref target="RFC7908"/>),
      and ingress/egress ASPA verification states. Furthermore, it introduces
      a 4-bit control flag space within the Stat Type TLV to enable dynamic
      differential rate monitoring and proactive asynchronous trigger-driven
      telemetry. </t>

      <t/>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when,
      they appear in all capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>.</t>

      <t> The BGP Monitoring Protocol (BMP) <xref target="RFC7854"/> provides
      an operational interface to monitor BGP peer sessions and receive
      fine-grained updates. <xref target="RFC9972"/> enhanced BMP's diagnostic
      capabilities by defining advanced BGP RIB statistics, allowing routers
      to report global numbers of routes within multiple execution phases.
      </t>

      <t> As global infrastructure transitions toward automated operations and
      cryptographic path validation&mdash;including Autonomous System Provider
      Authorization (ASPA)&mdash;coarse-grained statistics are no longer
      sufficient. When routing updates are dropped or become inactive,
      collectors must immediately differentiate between software policy
      rejects, underlying hardware forwarding path resource exhaustion (such
      as FIB or SID space limits), next-hop tunnel resolution failures, or
      specific types of route leaks. </t>

      <t> The initial version of this work [draft-wang-grow-bmp-bgp-rib-stats-
      ext-00] specified 21 detailed fine-grained statistics types. This
      document maintains all 21 original statistics definitions to protect
      operational telemetry granularity, while updating the Stat Type TLV
      structure to incorporate behavioral flags. These flags enable native
      support for trigger-based telemetry and differential rate statistics.
      </t>

      <t/>
    </section>

    <section title="BMP Statistics Type TLV Format Enhancement">
      <t>To support real-time rate monitoring and event-driven asynchronous
      telemetry, the Value region of the Statistics Report (SR) Message Stat
      Type TLV defined in Section 4.11 of [RFC7854] is enhanced and structured
      as follows:</t>

      <t><figure>
          <artwork align="left"><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Stat Type            |          Stat Len             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Flags | Reserved              |              AFI              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     SAFI      |                                               |
   +-+-+-+-+-+-+-+-+                                               +
   |                Gauge Value (64-bit, Upper 32)                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                Gauge Value (64-bit, Lower 32)                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


]]></artwork>
        </figure></t>

      <t><list style="symbols">
          <t>Stat Type: 2 bytes. Identifies the specific fine-grained counter.
          </t>

          <t>Stat Len: 2 bytes. Indicates the length of the value field. </t>

          <t>Flags: 4 bits. Defined as follows: </t>

          <t><list style="symbols">
              <t>Bit 0 (T-bit - Triggered Bit): If set to 1, indicates that
              the report is actively triggered by an anomalous boundary breach
              or threshold cross-over event rather than a regular periodic
              timer. </t>

              <t>Bit 1 (D-bit - Differential Bit): If set to 1, indicates that
              the Gauge Value represents the first-order differential value
              (Delta rate of change, routes per second) over a sliding
              sampling window. If set to 0, it contains the standard absolute
              counter. </t>

              <t>Bit 2-3: Reserved for future use. MUST be set to 0. </t>
            </list></t>

          <t>Reserved: 12 bits. MUST be set to 0. o AFI: 2 bytes. Address
          Family Identifier. </t>

          <t>SAFI: 1 byte. Subsequent Address Family Identifier. </t>

          <t>Gauge Value: 64 bits. Unsigned value representing the absolute
          count or differential velocity of the targeted routing state. </t>
        </list></t>

      <t/>
    </section>

    <section title="BGP RIB Monitoring Statistics Definitions">
      <t/>

      <section title="Adj-RIB-In RIB Monitoring Statistics Definitions">
        <t>The following fine-grained statistics types are defined for the
        ingress routing stage (Adj-RIB-In):</t>

        <t><list style="symbols">
            <t>Type = TBD1: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to exceeding the received route
            threshold.</t>

            <t>Type = TBD2: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to insufficient memory.</t>

            <t>Type = TBD3: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In that cannot be downloaded to the FIB module
            due to insufficient forwarding resources.</t>

            <t>Type = TBD4: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In that cannot be downloaded to the FIB module
            due to insufficient label resources or SID resources.</t>

            <t>Type = TBD5: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to invalid next-hop.</t>

            <t>Type = TBD6: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to next-hop unreachable.</t>

            <t>Type = TBD7: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In that are inactive due to the inability to
            resolve the next-hop tunnel.</t>

            <t>Type = TBD8: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to Type 1 Route Leak as defined
            in <xref target="RFC7908"/>: Hairpin Turn with Full Prefix.</t>

            <t>Type = TBD9: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to Type 2 Route Leak as defined
            in <xref target="RFC7908"/>: Lateral ISP-ISP-ISP Leak.</t>

            <t>Type = TBD10: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to Type 3 Route Leak as defined
            in <xref target="RFC7908"/>: Leak of Transit-Provider Prefixes to
            Peer.</t>

            <t>Type = TBD11: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to Type 4 Route Leak as defined
            in <xref target="RFC7908"/>: Leak of Peer Prefixes to Transit
            Provider.</t>

            <t>Type = TBD12: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to Type 5 Route Leak as defined
            in <xref target="RFC7908"/>: Prefix Re-origination with Data Path
            to Legitimate Origin.</t>

            <t>Type = TBD13: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-In rejected due to Type 6 Route Leak as defined
            in <xref target="RFC7908"/>: Accidental Leak of Internal Prefixes
            and More-Specific Prefixes.</t>

            <t>Type = TBD14: (64-bit Gauge) Current number of routes in
            per-AFI/SAFI post-policy Adj-RIB-In invalidated through the
            AS_PATH Verification <xref
            target="I-D.ietf-sidrops-aspa-verification"/>. This is total
            number of routes invalidated due to AS_PATH Verification.</t>

            <t>Type = TBD15: (64-bit Gauge) Current number of routes in
            per-AFI/SAFI post-policy Adj-RIB-In validated through the AS_PATH
            Verification <xref target="I-D.ietf-sidrops-aspa-verification"/>.
            This is total number of routes validated due to AS_PATH
            Verification.</t>

            <t>Type = TBD16: (64-bit Gauge) Current number of routes in
            per-AFI/SAFI post-policy Adj-RIB-In whose AS_PATH Verification
            state is Unknown due to the AS_PATH Verification <xref
            target="I-D.ietf-sidrops-aspa-verification"/>.</t>
          </list></t>
      </section>

      <section title="Adj-RIB-Out RIB Monitoring Statistics Definitions">
        <t>The following fine-grained statistics types are defined for the
        egress routing stage (Adj-RIB-Out):</t>

        <t><list style="symbols">
            <t>Type = TBD17: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-Out rejected due to exceeding the sent route
            threshold. </t>

            <t>Type = TBD18: Number of routes currently in per-AFI/SAFI
            pre-policy Adj-RIB-Out that cannot be advertised to its peer due
            to insufficient label resources or SID resources. </t>

            <t>Type = TBD19: (64-bit Gauge) Current number of routes in
            per-AFI/SAFI post-policy Adj-RIB-Out invalidated through the
            AS_PATH Verification <xref
            target="I-D.ietf-sidrops-aspa-verification"/> <xref
            target="I-D.zhang-sidrops-aspa-egress"/>. This is total number of
            routes invalidated due to AS_PATH Verification. </t>

            <t>Type = TBD20: (64-bit Gauge) Current number of routes in
            per-AFI/SAFI post-policy Adj-RIB-Out validated through the AS_PATH
            Verification <xref target="I-D.ietf-sidrops-aspa-verification"/>
            <xref target="I-D.zhang-sidrops-aspa-egress"/>. This is total
            number of routes validated due to AS_PATH Verification. </t>

            <t>Type = TBD21: (64-bit Gauge) Current number of routes in
            per-AFI/SAFI post-policy Adj-RIB-Out whose AS_PATH Verification
            state is Unknown due to the AS_PATH Verification <xref
            target="I-D.ietf-sidrops-aspa-verification"/> <xref
            target="I-D.zhang-sidrops-aspa-egress"/>. </t>
          </list></t>
      </section>
    </section>

    <section title="Operational and Performance Considerations">
      <t>The granular counters defined in this specification map directly into
      the low-level pipeline execution stages of the BGP policy engine and the
      forwarding infrastructure (FIB/Label managers). These metrics MUST be
      implemented as atomic O(1) mathematical increments to guarantee zero
      line-rate performance penalty under high-scale BGP churn.</t>

      <t>By deploying the newly structured T-bit and D-bit control flags, the
      operational cost of centralized network monitoring centers can be
      dramatically minimized. In nominal configurations, periodic BMP SR
      messages consume a flat, low volume of network bandwidth.</t>

      <t>However, if a sudden resource exhaustion event occurs (e.g., FIB
      table space exhaustion matched by Type TBD3) or a high-velocity Route
      Leak anomaly happens (e.g., Type TBD10 spikes due to a transit leak),
      the monitored router can bypass the standard timer queue. It sets the
      T-bit to 1 and the D-bit to 1 to immediately inject an asynchronous,
      differential rate-of-change telemetry burst into the BMP channel. This
      allows telemetry collectors and automated controllers to respond within
      milliseconds to mitigate wide-scale network anomalies.</t>

      <t/>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests that IANA assign the following new parameters
      to the BMP parameters name space (https://www.iana.org/assignments/
      bmp-parameters/bmp-parameters.xhtml).</t>

      <t><figure>
          <artwork align="left"><![CDATA[
   +----------+-------------------------------------------+----------+
   | Stat Type| Description                               | Reference|
   +----------+-------------------------------------------+----------+
   | TBD1     | Adj-RIB-In Rx Limit Exceeded Prefixes     | This doc |
   | TBD2     | Adj-RIB-In Insufficient Memory Prefixes   | This doc |
   | TBD3     | Adj-RIB-In Ingress FIB Resource Exhausted | This doc |
   | TBD4     | Adj-RIB-In Ingress Label/SID Exhausted    | This doc |
   | TBD5     | Adj-RIB-In Invalid Next-Hop Prefixes      | This doc |
   | TBD6     | Adj-RIB-In Next-Hop Unreachable Prefixes  | This doc |
   | TBD7     | Adj-RIB-In Next-Hop Tunnel Unresolved     | This doc |
   | TBD8     | Adj-RIB-In RFC7908 Type 1 Route Leak Drop | This doc |
   | TBD9     | Adj-RIB-In RFC7908 Type 2 Route Leak Drop | This doc |
   | TBD10    | Adj-RIB-In RFC7908 Type 3 Route Leak Drop | This doc |
   | TBD11    | Adj-RIB-In RFC7908 Type 4 Route Leak Drop | This doc |
   | TBD12    | Adj-RIB-In RFC7908 Type 5 Route Leak Drop | This doc |
   | TBD13    | Adj-RIB-In RFC7908 Type 6 Route Leak Drop | This doc |
   | TBD14    | Adj-RIB-In Inbound ASPA Invalid Prefixes  | This doc |
   | TBD15    | Adj-RIB-In Inbound ASPA Valid Prefixes    | This doc |
   | TBD16    | Adj-RIB-In Inbound ASPA Unknown Prefixes  | This doc |
   | TBD17    | Adj-RIB-Out Tx Limit Exceeded Prefixes    | This doc |
   | TBD18    | Adj-RIB-Out Egress Label/SID Exhausted    | This doc |
   | TBD19    | Adj-RIB-Out Outbound ASPA Invalid Prefixes| This doc |
   | TBD20    | Adj-RIB-Out Outbound ASPA Valid Prefixes  | This doc |
   | TBD21    | Adj-RIB-Out Outbound ASPA Unknown Prefixes| This doc |
   +----------+-------------------------------------------+----------+

]]></artwork>
        </figure></t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The enhancements detailed in this document do not modify the
      fundamental transport security architecture of the BGP Monitoring
      Protocol. However, exporting highly granular telemetry regarding
      hardware forwarding table space (FIB/Labels), specific Route Leak
      classifications, and detailed ASPA states provides clear insight into a
      network boundary's operational limits and security policy profile.</t>

      <t>If malicious actors capture this stream, they could exploit known
      resource limitations or policy gaps to launch targeted Denial of Service
      (DoS) attacks or targeted routing exploits. Therefore, sessions handling
      these advanced telemetry extensions MUST leverage robust crypto
      encapsulation and authorization mechanisms, such as TLS or IPsec, as
      mandated in <xref target="RFC7854"/>.</t>

      <t/>
    </section>

    <section title="Contributors ">
      <t>The following people made significant contributions to this
      document:</t>

      <t><figure>
          <artwork align="left"><![CDATA[To be added.

]]></artwork>
        </figure></t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to acknowledge the review and inputs from
      xxx.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.4271'?>

      <?rfc include='reference.RFC.4760'?>

      <?rfc include='reference.RFC.7908'?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.7854'?>

      <?rfc include='reference.RFC.8671'?>

      <?rfc include='reference.RFC.9069'?>

      <?rfc include='reference.RFC.9972'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.ietf-sidrops-aspa-verification'?>

      <?rfc include='reference.I-D.zhang-sidrops-aspa-egress'?>
    </references>      
  </back>
</rfc>
