<?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-attribute-sets-stats-00"
     ipr="trust200902">
  <front>
    <title abbrev="BMP Path Attribute Sets and Statistics">BMP Extension for
    BGP Path Attribute Sets and Statistics</title>

    <author fullname="Zhiyuan Wang" initials="Z." surname="Wang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

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

        <phone/>

        <facsimile/>

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

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

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

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

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

        <phone/>

        <facsimile/>

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

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

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

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

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

        <phone/>

        <facsimile/>

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

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

    <author fullname="Haibo Wang" initials="H." surname="Wang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

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

        <phone/>

        <facsimile/>

        <email>rainsword.wang@huawei.com</email>

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

    <date day="28" month="October" year="2026"/>

    <area>Ops &amp; Mgmt Area</area>

    <workgroup>GROW</workgroup>

    <keyword>BGP Path Attribute Sets</keyword>

    <keyword>Draft</keyword>

    <abstract>
      <t>The BGP Monitoring Protocol (BMP) specified in RFC 7854 requires a
      monitored router to send full BGP Path Attributes for every Route
      Monitoring message. In networks with a large number of prefixes sharing
      identical BGP Path Attributes, this requirement leads to substantial
      transmission redundancy and protocol overhead.</t>

      <t>This document specifies a decoupled architecture for BMP monitoring
      that separates Path Attribute Set registration from NLRI volume
      statistics. Attribute updates are triggered immediately upon path
      attribute changes, while NLRI count updates can be configured for either
      event-driven (immediate) or periodic reporting modes, with mandatory
      instant notification when an attribute set's reference count drops to
      zero.</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>The BGP Monitoring Protocol (BMP) <xref target="RFC7854"/> provides a
      mechanism to monitor BGP routing state and updates on a router.
      Currently, BMP encapsulates standard BGP UPDATE messages containing
      Network Layer Reachability Information (NLRI) and Path Attributes <xref
      target="RFC4271"/> inside BMP Route Monitoring (RM) messages.</t>

      <t>In modern scale-out networks, hundreds of thousands of NLRIs often
      share identical BGP Path Attributes (e.g., AS_PATH, Local-Preference,
      Communities). Transmitting identical attribute structures repeatedly for
      each route update introduces significant redundancy.</t>

      <t>To minimize export bandwidth while maintaining visibility, this draft
      decouples Attribute Sets from Prefix Counts:</t>

      <t><list style="numbers">
          <t>BMP Attribute Set Declaration Message: Event-driven notification
          triggered immediately whenever a unique BGP Path Attribute Set is
          created, modified, or deleted.</t>

          <t>BMP Attribute Count Update Message: Flexible statistics report
          supporting both Event-driven (Immediate) and Periodic polling
          modes.</t>
        </list></t>
    </section>

    <section title="Terminology">
      <t><list style="symbols">
          <t>Attribute Set (AS): A canonical, ordered collection of BGP Path
          Attributes contained within a BGP UPDATE message.</t>

          <t>Attribute Set Identifier (AS-ID): A 32-bit locally unique integer
          generated by the router to represent a unique Attribute Set.</t>
        </list></t>
    </section>

    <section title="Protocol Extensions">
      <t/>

      <section title="BMP Attribute Set Declaration Message">
        <t>The BMP Attribute Set Declaration Message is used to register a new
        unique BGP Path Attribute Set or explicitly unregister an existing
        one.</t>

        <t><figure>
            <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Attribute Set ID (AS-ID)                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Action| Reserved                                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Path Attributes Length (2 Octets)              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Path Attributes (Variable Length)                  |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>
          </figure>Fields:</t>

        <t><list style="symbols">
            <t>Attribute Set ID (AS-ID) (32 bits): A 32-bit unsigned integer
            assigned locally by the monitored router to uniquely identify a
            specific BGP Path Attribute Set during the active session
            lifecycle. The value MUST NOT be 0 (0x00000000 is reserved).</t>

            <t>Action (4 bits): Specifies the operation to be performed on the
            target AS-ID:<list style="symbols">
                <t>0x1 (REGISTER): Indicates the declaration of a new unique
                Path Attribute Set. The receiver MUST associate the provided
                Path Attributes with this AS-ID.</t>

                <t>0x2 (UNREGISTER): Indicates that the AS-ID is explicitly
                deleted. The receiver MUST purge or mark inactive the Path
                Attribute Set associated with this AS-ID.</t>

                <t>Values 0x0 and 0x3-0xF are reserved for future use and MUST
                be ignored on receipt.</t>
              </list></t>

            <t>Reserved (28 bits): Reserved for future extension. MUST be set
            to 0 by the sender on transmission and MUST be ignored by the
            receiver upon receipt.</t>

            <t>Path Attributes Length (16 bits): A 16-bit unsigned integer
            specifying the total length, in octets, of the Path Attributes
            field.<list style="symbols">
                <t>When Action = 0x1 (REGISTER), this field MUST be greater
                than 0.</t>

                <t>When Action = 0x2 (UNREGISTER), this field SHOULD be set to
                0.</t>
              </list></t>

            <t>Path Attributes (Variable Length): Contains zero or more BGP
            Path Attributes formatted as specified in Section 5 of <xref
            target="RFC4271"/>. This field is evaluated only when Action = 0x1
            (REGISTER).</t>
          </list></t>
      </section>

      <section title="BMP Attribute Count Update Message">
        <t>The BMP Attribute Count Update Message is used to convey prefix
        volume statistics bound to a previously registered AS-ID.</t>

        <t><figure>
            <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Attribute Set ID (AS-ID)                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Op    | Mode  | Reserved                                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       NLRI Count / Delta                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>
          </figure>Fields:</t>

        <t><list style="symbols">
            <t>Attribute Set ID (AS-ID) (32 bits): A 32-bit unsigned integer
            referencing a valid AS-ID previously announced via a BMP Attribute
            Set Declaration Message (Action = REGISTER).</t>

            <t>Op (Operation Type) (4 bits): Defines how the receiver
            interprets the value in the NLRI Count / Delta field:<list
                style="symbols">
                <t>0x1 (ABSOLUTE_COUNT): The value represents the exact total
                number of prefixes (NLRIs) currently bound to this AS-ID.</t>

                <t>0x2 (DELTA_ADD): The value represents an incremental
                addition (+N) to the current prefix count associated with this
                AS-ID.</t>

                <t>0x3 (DELTA_DEL): The value represents an incremental
                subtraction (-N) from the current prefix count associated with
                this AS-ID.</t>

                <t>0x4 (ZERO_REF): Indicates that the prefix count bound to
                this AS-ID has dropped to 0. The NLRI Count / Delta field MUST
                be set to 0.</t>
              </list></t>

            <t>Mode (4 bits): Indicates the operational context under which
            this report was generated:<list style="symbols">
                <t>0x1 (EVENT_DRIVEN): Sent immediately in response to a
                routing state change (e.g., prefix addition/withdrawal).</t>

                <t>0x2 (PERIODIC): Sent as part of a scheduled, regular
                telemetry sweep.</t>
              </list></t>

            <t>Reserved (24 bits): Reserved for future extension. MUST be set
            to 0 on transmission and ignored on receipt.</t>

            <t>NLRI Count / Delta (32 bits): A 32-bit unsigned integer
            representing either the total prefix volume or the change delta,
            interpreted according to the Op field.</t>
          </list></t>
      </section>

      <section title="BMP Message Type Allocations">
        <t>This document defines two new BMP message types to be registered by
        IANA under the "BMP Message Types" registry:</t>

        <t><list style="symbols">
            <t>BMP Message Type = TBD1: Attribute Set Declaration Message
            (used to register or unregister canonical path attribute
            sets).</t>

            <t>BMP Message Type = TBD2: Attribute Count Update Message (used
            to report prefix volume statistics associated with a specific
            AS-ID).</t>
          </list></t>
      </section>
    </section>

    <section title="Operational Procedures">
      <t/>

      <section title="Attribute Set Declaration Logic (Immediate Trigger)">
        <t/>

        <t><list style="numbers">
            <t>The router MUST monitor unique Path Attribute combinations in
            its RIB.</t>

            <t>When a route arrives with a previously unseen Path Attribute
            combination, the router MUST immediately allocate a new AS-ID and
            transmit an Attribute Set Declaration Message (Action =
            REGISTER).</t>
          </list></t>
      </section>

      <section title="Attribute Count Update Modes">
        <t>An implementation SHOULD allow the operator to configure one of the
        following export modes for Attribute Count Update messages:</t>

        <t>Option 1: Event-Driven Mode (Immediate Reporting)<list
            style="symbols">
            <t>Whenever prefixes associated with an AS-ID are added or
            withdrawn, the router immediately transmits a Count Update Message
            using either DELTA or ABSOLUTE values.</t>
          </list></t>

        <t>Option 2: Periodic Reporting Mode (Interval Polling + Zero
        Threshold)<list style="symbols">
            <t>The router suppresses real-time per-route update messages and
            instead transmits ABSOLUTE count reports for all active AS-IDs at
            a configured interval (e.g., every 30 seconds).</t>

            <t>EXCEPTION: If the prefix count for any AS-ID drops to 0 prior
            to the next periodic timer expiration, the router MUST immediately
            emit a Count Update Message (Op = ZERO_REF, NLRI Count = 0).</t>

            <t>Upon emitting or receiving Op = ZERO_REF, the router and server
            MAY initiate unregistration/garbage collection for that AS-ID.</t>
          </list></t>

        <t/>
      </section>

      <section title="Session Re-establishment and State Synchronization">
        <t>When a BMP session between the Monitored Router and the Monitoring
        Station is established or re-established after a failure:</t>

        <t><list style="numbers">
            <t>The Monitored Router MUST re-advertise all currently active
            Path Attribute Sets present in its RIB using Attribute Set
            Declaration Messages (Action = REGISTER) with their corresponding
            valid AS-IDs. </t>

            <t>Following the attribute declarations, the router SHOULD
            transmit initial Attribute Count Update Messages (Op =
            ABSOLUTE_COUNT, Mode = EVENT_DRIVEN) to synchronize current prefix
            volumes for each AS-ID, ensuring the BMP Monitoring Station
            rapidly achieves state convergence without waiting for the next
            periodic polling interval.</t>
          </list></t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>This extension introduces no new security vulnerabilities beyond
      those described in <xref target="RFC7854"/>.</t>
    </section>

    <section title="IANA Considerations">
      <t>This document requests IANA to allocate two new message types in the
      "BMP Message Types" registry defined in <xref target="RFC7854"/>:</t>

      <t><figure>
          <artwork><![CDATA[+-------+----------------------------------+---------------+
| Value | Description                      | Reference     |
+-------+----------------------------------+---------------+
| TBD1  | Attribute Set Declaration Message| This document |
| TBD2  | Attribute Count Update Message   | This document |
+-------+----------------------------------+---------------+
      ]]></artwork>
        </figure></t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>TBD</t>
    </section>
  </middle>

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

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

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

      <?rfc include="reference.RFC.8174"?>
    </references>

    <references title="Informative References"/>
  </back>
</rfc>
