<?xml version='1.0' encoding='utf-8'?>
<rfc ipr="trust200902" docName="draft-smc-grow-bmp-route-change-stats-00" 
category="std" submissionType="IETF" consensus="true">
  <front>
    <title abbrev="BMP Route-Map Stats">BMP Route Change Statistics Based on Routing Policy</title>
    <author initials="S." surname="Dikshit" fullname="Saumya Dikshit">
      <organization>Aruba Networks, HPE</organization>
      <address>
        <email>saumya.dikshit@hpe.com</email>
      </address>
    </author>
    <author initials="M." surname="Srivastava" fullname="Mukul Srivastava">
      <organization>Hewlett Packard Enterprise</organization>
      <address>
        <email>mukul.srivastava@hpe.com</email>
      </address>
    </author>
    <author initials="C." surname="Lin" fullname="Changwang Lin">
      <organization>New H3C Technologies</organization>
      <address>
        <email>linchangwang.04414@h3c.com</email>
      </address>
    </author>
    <date year="2026"/>
    <area>Routing</area>
    <workgroup>GROW</workgroup>
    <keyword>BMP, Routing Policy, Statistics, BGP</keyword>
    <abstract>
      <t>This document defines few generic BGP Monitoring Protocol (BMP) statistics
      for monitoring route modifications or changes due to applying Routing Policy.
      These statistics are reported per BGP peer using the BMP Statistics Report message.</t>
    </abstract>
  </front>
  <middle>
  <section title="Introduction" anchor="intro">
    <t><xref target="RFC7854"/> and <xref target="RFC8671"/> defines different BMP statistics,
    and <xref target="I-D.ietf-grow-bmp-bgp-rib-stats"/> extends these BMP statistics to
    provide more insights into the BGP RIBs.</t>

   <t>Routing Policy are widely used in BGP to modify route attributes.
    Monitoring which route attributes are modified and how often can provide
    valuable insights for network operators.</t>

    <t>This document defines few BMP statistics to report such route modifications
    in a generic and address-family-independent manner. The format of the BMP
    statistics message remains same as defined in <xref target="RFC7854"/>.
    Besides address family and gauge in the Stat Data (value) <xref target="RFC7854"/>,
    these statistics also provide attribute types of route changes.
    This route attribute could be the BGP path attributes <xref target="RFC4271"/>
    or additional route attributes for Qos and forwarding-related parameters.</t>

    <section title="Requirements Language" anchor="req-lang">
      <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. The BCP14 is used to
      stress importance for operators but are not required as formal
      implementation requirement.</t>
    </section>
  </section>

  <section title="Motivation and Use Cases" anchor="motivation">
    <t>The ability to track route modifications via Routing Policy
    enables operators to understand policy impact, detect misconfigurations,
    and analyze routing behavior. The attribute type and gauge allow external
    collectors to derive distribution insights.</t>
  </section>

  <section title="Per-Peer Reporting" anchor="peer">
    <t>The BMP peer statistics report message is reported per BGP peer. Therefore,
    each route attribute modification count is associated with a specific peer,
    enabling peer-level policy analysis.</t>

    <t>For locally originated routes applying routing policy, the peer is regarded as
    the local router itself, per Section 8.2 of <xref target="RFC7854"/>.</t>
  </section>

  <section title="Route Change Statistics based on Routing Policy" anchor="route-map-stats">
  <section title="Statistics Format" anchor="format">
    <t>These statistics defined in this document indicate which route attribute were modified by
    routing policy using a 16-bit attribute type value followed by a 64-bit Gauge. and These statistics
    are applicable to all BGP address families, represented by Address Family Identifier (AFI)
    and Subsequent Address Family Identifier (SAFI) <xref target="RFC4760"/>. Therefore, the value (Stat Data) of these
    statistics is structured as: 2-byte AFI, 1-byte SAFI, 16-bit Attribute Type, followed by a 64-bit Gauge,
    as shown in the figure below.</t>
    <figure>
      <artwork>
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          2-byte AFI           |  1-byte SAFI  |  1-byte NUM   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 16-bit Attribute Type (first) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     64-bit Gauge (first)                      |
|                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ 16-bit Attribute Type (last)  ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                     64-bit Gauge (last)                       ~
~                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      </artwork>
    </figure>
    <t>
      <list style="symbols">
        <t>AFI: The AFI value is defined in 
          <eref target="https://www.iana.org/assignments/address-family-numbers.xhtml">
          IANA Address Family Numbers</eref>.</t>
        <t>SAFI: The SAFI value is defined in 
          <eref target="https://www.iana.org/assignments/safi-namespace.xhtml">
          IANA SAFI Values</eref>.</t>
        <t>NUM: Indicates that the number of attribute types included in the same message.</t>
        <t>Attribute Type: Indicates which route attribute was modified by applying routing policy.
        The attribute type supports up to 2^16 types. In addition to the types
        defined in this document, new attribute types of route change may be defined in the future.
        The attribute type defined in this document is as follows:</t>
        <t>
          <list style="symbols">
            <t>Attribute Type = 0x0001: Local Preference.</t>
            <t>Attribute Type = 0x0002: AS Path.</t>
            <t>Attribute Type = 0x0003: MED.</t>
            <t>Attribute Type = 0x0004: Community.</t>
            <t>Attribute Type = 0x0005: Extended Community.</t>
            <t>Attribute Type = 0x0006: Large Community.</t>
            <t>Attribute Type = 0x0007: Origin.</t>
            <t>Attribute Type = 0x0008: Next Hop.</t>
            <t>Attribute Type = 0x0009: ESI.</t>
            <t>Attribute Type = 0x000A: AIGP.</t>
            <t>Attribute Type = 0x000B: Prefix SID.</t>
            <t>Attribute Type = 0x000C: DSCP.</t>
            <t>Attribute Type = 0x000D: VPN Peer ID.</t>
            <t>Attribute Type = 0x000E: Preferred Value.</t>
            <t>Attribute Type = 0x000F: IP Precedence.</t>
            <t>Attribute Type = 0x0010: QoS Local ID.</t>
            <t>Attribute Type = 0x0011: Traffic Index.</t>
            <t>Attribute Type = 0x0012: MPLS EXP.</t>
            <t>Attribute Type = 0x0013-0xFFFF: Reserved, Vendor-specific route attribute range.</t>
          </list>
        </t>
      </list>
    </t>
    <t>These statistics only apply to the AFI/SAFIs that a BGP speaker supports and
    negotiates with its peer. 
    These statistics for the Attribute Type that hasn't been modified by routing policy,
    MUST NOT be reported via the BMP Statistics Report Message.
    For these statistics defined in this document, the routes that are rejected
    by inbound or outbound policy are not considered.</t>
  </section>

  <section title="Statistics Definition" anchor="definition">
    <t>
      <list style="symbols">
        <t>Stat Type = TBD_01: (64-bit Gauge) Number of routes with specific change attribute
        in per-AFI/SAFI post-policy Adj-RIB-In due to the application of inbound policy.</t>

        <t>Stat Type = TBD_02: (64-bit Gauge) Number of routes with specific change attribute
        in per-AFI/SAFI post-policy Adj-RIB-Out due to the application of outbound policy.</t>
      </list>
    </t>
  </section>
  </section>

  <section anchor="Security" title="Security Considerations">
      <t>Procedures and protocol extensions defined in this document do not
      affect the BMP security model. All security and authentication
      mechanisms required by Section 11 of <xref target="RFC7854"/>, and Section
      8 of <xref target="RFC8671"/> are also applicable to the gauges defined in this
      document. This document does not add any additional security
      considerations.</t>
  </section>

  <section anchor="IANA" title="IANA Considerations">
      <t>IANA has assigned the following new parameters in the <eref
      target="https://www.iana.org/assignments/bmp-parameters/bmp-parameters.xhtml#statistics-types">BMP
      Statistics Types registry</eref>, part of the <eref
      target="https://www.iana.org/assignments/bmp-parameters/bmp-parameters.xhtml">
      BMP parameters registry group</eref>.</t>

      <t>This document requests IANA to update these entries as follows. Also,
      the document requests IANA to update the reference cited for the entries.</t>

      <t>
        <list style="symbols">
          <t>Type = TBD_01: Number of routes with specific change attribute
             in per-AFI/SAFI post-policy Adj-RIB-In due to the application of inbound policy.</t>
          <t>Type = TBD_02: Number of routes with specific change attribute
             in per-AFI/SAFI post-policy Adj-RIB-Out due to the application of outbound policy.</t>
        </list>
      </t>
  </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <references title="References">
      <references title="Normative References">
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4760.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7854.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />

        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8671.xml"
                    xmlns:xi="http://www.w3.org/2001/XInclude" />
        <reference anchor="I-D.ietf-grow-bmp-bgp-rib-stats" target="https://datatracker.ietf.org/doc/html/draft-ietf-grow-bmp-bgp-rib-stats-17">
          <front>
            <title>Advanced BGP Monitoring Protocol (BMP) Statistics Types</title>
            <author initials="M." surname="Srivastava" fullname="Mukul Srivastava"/>
            <author initials="Y." surname="Liu" fullname="Yisong Liu"/>
            <author initials="C." surname="Lin" fullname="Changwang Lin"/>
            <author initials="J." surname="Li" fullname="Jinming Li"/>
            <date year="2025" month="December"/>
          </front>
          <seriesInfo name="Work in Progress" value="draft-ietf-grow-bmp-bgp-rib-stats-17"/>
        </reference>
      </references>
    </references>
  </back>
</rfc>
