<?xml version='1.0' encoding='utf-8'?>
<rfc ipr="trust200902" docName="draft-saum-grow-bmp-afi-safi-evpn-03" category="std" submissionType="IETF" consensus="true">
  <front>
    <title abbrev="EVPN BMP Stats">EVPN-Specific BMP RIB Statistics Extensions</title>
    <author initials="S." surname="Dikshit" fullname="Saumya Dikshit">
      <organization>Aruba Networks, HPE</organization>
      <address>
        <postal>
          <street>Mahadevpura</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560 048</code>
          <country>India</country>
        </postal>
        <email>saumya.dikshit@hpe.com</email>
      </address>
    </author>
    <author initials="M." surname="Srivastava" fullname="Mukul Srivastava">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>10 Technology Park Dr</street>
          <city>Westford</city>
          <region>MA</region>
          <code>01886</code>
          <country>United States of America</country>
        </postal>
        <email>msri@juniper.net</email>
      </address>
    </author>
    <date year="2025" month="September" day="16"/>
    <area>Routing</area>
    <workgroup>GROW</workgroup>
    <keyword>BMP, EVPN, Statistics, BGP, RIB</keyword>
    <abstract>
      <t>This document defines new EVPN-specific BGP Monitoring Protocol (BMP) statistics types. 
      These extensions include scalar counters for EVPN route types (1-8) specifically, 
      while also keeping scope for defining counters which are EVPN route-type agnostic but related to BGP-EVPN RIB like, 
      number of multihoming Ethernet Segments, number of multihomed EVIs, number of aliased paths, 
      number of dynamic inter-VRF route leaking (IVRL).
       </t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction" anchor="intro">
      <t><xref target="RFC7854"/> defines different BMP statistics message types and <xref target="I-D.ietf-grow-bmp-bgp-rib-stats"/> 
      extends the BMP statistics to provide more insights into the BGP RIBs.
      This document extends the BMP RIB statistics by adding EVPN-specific statistics types to monitor EVPN-related events in 
      Adj-RIB-In, Adj-RIB-Out, and Local-RIB for the EVPN address family (AFI=25, SAFI=70) as defined in <xref target="RFC7432"/> 
      and extended by <xref target="RFC9135"/> for integrated routing and bridging, forms the basis for these statistics.
      </t>
      <t>The format of the BMP statistics message remains same as defined in <xref target="RFC7854"/>.
      </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.</t>
      </section>
    </section>
    <section title="EVPN-Specific BMP Statistics Extensions" anchor="evpn-stats">
      <t>This section defines EVPN-specific statistics types for BMP, applicable to the EVPN address family (AFI=25, SAFI=70).
      These statistics type for all 5 RIB views: Adj-RIB-In-Pre, Adj-RIB-In-Post, Local-RIB, Adj-RIB-Out-Pre and Adj-RIB-Out-Pre.
      The statistics values are encoded as 1-byte Stats types, 1 bytes stats sub-type followed by 64-bit gauges. 
      Currently there are EVPN route types numbered 1 to 8. The remaining bits provides flexibility for future extensions to 
      EVPN . and to define more specific counters other than the route-types in future. 
      </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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stats Type   |  Stats Subtype   |             
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                             
|		                    Gauge (64 bits)                         |
~                                                               ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        </artwork>
      </figure>
  <t>
<list style="symbols">
<t>
     Stats Type (1 bytes): EVPN stats type.
     Defined types are:
<list style="symbols">
<t>
      Type = 0: EVNP route statistics. 
</t>

</list>
</t>
<t>
      Stats subtype (1 bytes): The stats sub type.
      Defined subtypes are:
<list style="symbols">
<t>
      Subtype = 0: EVPN route type 1 (Ethernet Auto-discovery).
</t>
<t>
      Subtype = 1: EVPN route type 2 (MAC/IP Advertisement).  
</t>
<t>
      Subtype = 2: EVPN route type 3 (Inclusive Multicast Ethernet Tag Route).
</t>
<t>
      Subtype = 3: EVPN route type 4 (Ethernet Segment Route).  
</t>
<t>
      Subtype = 4: EVPN route type 5 (IP Prefix Route).
</t>
<t>
      Subtype = 5: EVPN route type 6 (EVPN Inclusive Multicast Service Interface Route).
</t>
<t>
      Subtype = 6: EVPN route type 7 (EVPN Ethernet Tag Service Interface Route).
</t>
<t>
      Subtype = 7: EVPN route type 8 (EVPN IP Prefix Service Interface Route).
</t>
<t>
      Subtype = 8: EVPN route type 9 (EVPN IP Prefix Route with MAC Mobility).
</t>
  </list>
</t>
</list>
</t>
      </section>
    <section title="YANG Model Alignment" anchor="yang-align">
      <t>The counters defined in this document align with the EVPN YANG model described in <xref target="I-D.ietf-bess-evpn-yang-07"/>. Route type counters map to YANG leaves for EVPN route statistics, multihoming and IVRL counters align with Ethernet Segment and VRF-related leaves, the route-map bitmap aligns with policy-related leaves, and segment failure impact aligns with failure event counters. The referenced EVPN YANG model is expired but used due to its relevance to EVPN statistics alignment. Implementations SHOULD check for newer versions. Implementations SHOULD ensure compatibility with the YANG model for integrated monitoring.</t>
    </section>
    <section title="IANA Considerations" anchor="iana">
      <t>This document requests that IANA assign new BMP statistics types from the "BMP Statistics Type" registry for the following:</t>
      <t>
        <list style="symbols">
          <t>Type TBD_01: rib-in-pre-evpn-route-stats: Statistics for EVPN routes received before inbound policy is applied.</t>
          <t>Type TBD_02: rib-in-post-evpn-route-stats: Statistics for EVPN routes after inbound policy is applied.</t>
          <t>Type TBD_03: loc-rib-evpn-route-stats: Statistics for EVPN routes in the local RIB.</t>
          <t>Type TBD_04: rib-out-pre-evpn-route-stats: Statistics for EVPN routes before outbound policy is applied.</t>
          <t>Type TBD_05: rib-out-post-evpn-route-stats: Statistics for EVPN routes after outbound policy is applied.</t></list>
      </t>
      <t>The 5 types are sufficient to provide generic monitoring of EVPN route types (1-8) across Adj-RIB-In, Adj-RIB-Out, 
      and Local-RIB.
      </t>
    </section>
    <section title="Security Considerations" anchor="security">
      <t>The security considerations of <xref target="RFC7854"/> apply to this document. No additional security risks are introduced by these EVPN-specific statistics, including the route-map attributes bitmap.</t>
    </section>
  </middle>
  <back>
    <references title="References">
      <references title="Normative References">
        <reference anchor="RFC7854" target="https://www.rfc-editor.org/info/rfc7854">
          <front>
            <title>BGP Monitoring Protocol (BMP)</title>
            <author initials="J." surname="Scudder" fullname="John Scudder"/>
            <author initials="R." surname="Fernando" fullname="Rex Fernando"/>
            <author initials="S." surname="Stuart" fullname="Stephen Stuart"/>
            <date year="2016" month="June"/>
          </front>
          <seriesInfo name="RFC" value="7854"/>
          <seriesInfo name="DOI" value="10.17487/RFC7854"/>
        </reference>
        <reference anchor="RFC7432" target="https://www.rfc-editor.org/info/rfc7432">
          <front>
            <title>BGP MPLS-Based Ethernet VPN</title>
            <author initials="A." surname="Sajassi" fullname="Ali Sajassi"/>
            <author initials="R." surname="Aggarwal" fullname="Rahul Aggarwal"/>
            <author initials="N." surname="Bitar" fullname="Nabil Bitar"/>
            <author initials="A." surname="Isaac" fullname="Aldrin Isaac"/>
            <author initials="J." surname="Uttaro" fullname="James Uttaro"/>
            <author initials="J." surname="Drake" fullname="John Drake"/>
            <author initials="W." surname="Henderickx" fullname="Wim Henderickx"/>
            <date year="2015" month="February"/>
          </front>
          <seriesInfo name="RFC" value="7432"/>
          <seriesInfo name="DOI" value="10.17487/RFC7432"/>
        </reference>
        <reference anchor="RFC9135" target="https://www.rfc-editor.org/info/rfc9135">
          <front>
            <title>Integrated Routing and Bridging in Ethernet VPN (EVPN)</title>
            <author initials="A." surname="Sajassi" fullname="Ali Sajassi"/>
            <author initials="J." surname="Drake" fullname="John Drake"/>
            <author initials="S." surname="Boutros" fullname="Sami Boutros"/>
            <author initials="J." surname="Rabadan" fullname="Jorge Rabadan"/>
            <date year="2021" month="October"/>
          </front>
          <seriesInfo name="RFC" value="9135"/>
          <seriesInfo name="DOI" value="10.17487/RFC9135"/>
        </reference>
        <reference anchor="I-D.ietf-grow-bmp-bgp-rib-stats" target="https://datatracker.ietf.org/doc/html/draft-ietf-grow-bmp-bgp-rib-stats-08">
          <front>
            <title>Definition For New BGP Monitoring Protocol (BMP) Statistics Types</title>
            <author initials="M." surname="Srivastava" fullname="Manish Srivastava"/>
            <author initials="Y." surname="Liu" fullname="Ying Liu"/>
            <author initials="C." surname="Lin" fullname="Camilo Lin"/>
            <author initials="J." surname="Li" fullname="Jian Li"/>
            <date year="2025" month="April"/>
          </front>
          <seriesInfo name="Work in Progress" value="draft-ietf-grow-bmp-bgp-rib-stats-08"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="Scott Bradner"/>
            <date year="1997" month="March"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="Barry Leiba"/>
            <date year="2017" month="May"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references title="Informative References">
        <reference anchor="I-D.ietf-bess-evpn-yang-07" target="https://datatracker.ietf.org/doc/html/draft-ietf-bess-evpn-yang-07">
          <front>
            <title>Yang Data Model for EVPN</title>
            <author initials="P." surname="Brissette" fullname="Patrice Brissette"/>
            <author initials="H." surname="Shah" fullname="Hiren Shah"/>
            <author initials="I." surname="Chen" fullname="Ing-Wher Chen"/>
            <author initials="K." surname="Patel" fullname="Keyur Patel"/>
            <date year="2019" month="March"/>
          </front>
          <seriesInfo name="Work in Progress" value="draft-ietf-bess-evpn-yang-07"/>
        </reference>
      </references>
    </references>
  </back>
</rfc>
