<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4364 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4364.xml">
<!ENTITY RFC4760 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4760.xml">
<!ENTITY RFC7854 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7854.xml">
<!ENTITY RFC8126 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY I-D.ietf-grow-bmp-yang SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-grow-bmp-yang.xml">
<!ENTITY I-D.ietf-grow-bmp-stats-informational-tlv SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-grow-bmp-stats-informational-tlv.xml">
<!ENTITY I-D.saum-grow-bmp-afi-safi-evpn SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.saum-grow-bmp-afi-safi-evpn.xml">
<!ENTITY I-D.smc-grow-bmp-route-change-stats SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.smc-grow-bmp-route-change-stats.xml">
<!ENTITY I-D.wang-grow-bmp-bgp-rib-stats-ext SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.wang-grow-bmp-bgp-rib-stats-ext.xml">
<!ENTITY I-D.zhuang-grow-bmp-enhancement-for-vrf-loc-rib SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.zhuang-grow-bmp-enhancement-for-vrf-loc-rib.xml">
<!ENTITY RFC5925 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5925.xml">
<!ENTITY RFC7432 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7432.xml">
<!ENTITY RFC4684 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4684.xml">
<!ENTITY RFC9069 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9069.xml">
]>
<rfc submissionType="IETF" docName="draft-dikshit-grow-bmp-rd-scoped-rib-stats-04" category="std" ipr="trust200902">
	<!-- Generated by id2xml 1.6.0 on 2026-11-19T10:59:51Z -->
	<?rfc strict="yes"?>
	<?rfc compact="yes"?>
	<?rfc subcompact="no"?>
	<?rfc symrefs="yes"?>
	<?rfc sortrefs="yes"?>
	<?rfc text-list-symbols="*o+-"?>
	<?rfc toc="yes"?>
	<front>
	<title abbrev="BMP RD-Scoped RIB Stats">Route-Distinguisher-Scoped BMP RIB Statistics</title>
	<author initials="S." surname="Dikshit" fullname="Saumya Dikshit">
	<organization>Hewlett Packard Enterprise</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>Hewlett Packard Enterprise</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>mukul.srivastava@hpe.com</email>
	</address>
	</author>

	<author initials="C." surname="Lin" fullname="Changwang Lin">
	<organization>New H3C Technologies</organization>
	<address><postal>
	<street>8 Yongjia North Road</street>
	<city>Beijing</city>
	<region>Haidian District</region>
	<code>100094</code>
	<country>China</country>
	</postal>
	<email>linchangwang.04414@h3c.com</email>
	</address>
	</author>

	<date year="2026" month="November" day="20"/>
	<abstract><t>
   <xref target="RFC7854"/> defines the BGP Monitoring Protocol (BMP) and its
   Statistics Report message.  [I-D.ietf-grow-bmp-bgp-rib-stats]
   (published as [RFC9972]) extended that message with a set of
   advanced, per-AFI/SAFI BGP RIB statistics types.  Several ongoing
   individual contributions independently define additional per-
   address-family, per-instance, or per-Route-Distinguisher (RD)
   statistics on top of that base (for example, EVPN-specific RIB
   statistics and VRF Loc-RIB monitoring enhancements), each proposing
   its own ad hoc Stat Data encoding.</t>

	<t>
   This document defines a single, address-family-agnostic Stat Data
   container -- the "RD-Scoped Statistics" format -- for BMP
   statistics that are naturally scoped below the per-AFI/SAFI level,
   to a specific Route Distinguisher (VRF instance, EVPN Instance,
   MVPN instance, or equivalent).  Address-family-specific documents,
   such as EVPN-specific BMP RIB statistics, are expected to become
   thin "profiles" of this container rather than defining their own
   wire format, reducing duplication and Stat Type registry
   fragmentation across the GROW working group's BMP statistics work.</t>

	</abstract>
	</front>

	<middle>
	<section title="Introduction" anchor="sect-1"><t>
   BMP <xref target="RFC7854"/> Statistics Report messages carry Stat Type / Stat
   Length / Stat Data tuples.  [RFC9972] extended the base set of
   counters/gauges with per-AFI/SAFI statistics, encoding an AFI and
   SAFI directly in Stat Data.</t>

	<t>
   Existing BMP statistics stop at the peer boundary
   (<xref target="RFC7854"/>) or the address-family boundary
   (RFC 9972).  Counting one level finer, per routing
   instance, needs an instance scope key inside the Stat Data, which is
   what this document defines:</t>

	<figure><artwork><![CDATA[
  Router  -->  Peer        -->  AFI/SAFI     -->  Instance
               (RFC 7854)       (RFC 9972)        (this document)

  up to AFI/SAFI:  per-family aggregate
  Instance level:  per VRF or EVI, keyed by the RD in the Stat Data
]]></artwork>
	</figure>

	<t>
   When multiple VRFs or EVIs share a single BMP session, where the
   Per-Peer Header's Peer Distinguisher is zero, the instance key must
   travel inside the Stat Data, because the header no longer identifies
   the instance.</t>

	<t>
   Operators increasingly need visibility at a finer granularity than
   "per AFI/SAFI": specifically, per virtual routing instance, where
   the instance is identified by a Route Distinguisher (RD) as used in
   BGP/MPLS IP VPNs <xref target="RFC4364"/>, EVPN <xref target="RFC7432"/>, and MVPN.  At the time
   of writing, at least the following in-progress or recently
   published documents independently define RD-scoped, or closely
   related instance-scoped, statistics or telemetry TLVs:</t>

	<t><list style="symbols"><t><xref target="I-D.saum-grow-bmp-afi-safi-evpn"/> defines per-EVI EVPN route
      statistics keyed by an 8-octet Route Distinguisher, with its own
      Stat Data layout (Stat Type, Stat Subtype, RD, Gauge).</t>

	<t><xref target="I-D.zhuang-grow-bmp-enhancement-for-vrf-loc-rib"/> defines a
      Remote VRF Information TLV, keyed by a remote Route
      Distinguisher, for VPNv4/VPNv6 Loc-RIB reporting.</t>

	<t><xref target="I-D.wang-grow-bmp-bgp-rib-stats-ext"/> defines per-AFI/SAFI
      fine-grained filtering statistics with a distinct Flags/AFI/
      SAFI Stat Data prefix.</t>

	</list>
	</t>

	<t>
   Each of these efforts is solving a legitimate, distinct operational
   problem, but each has (or is likely to end up with) its own Stat
   Data prefix conventions.  Left unaddressed, this fragmentation
   increases implementation cost (every collector needs bespoke
   parsing per document) and increases the likelihood of avoidable
   Stat Type registry collisions or near-duplicate allocations as more
   AFI/SAFI-specific statistics documents are proposed in GROW.</t>

	<t>
   This document extracts the common shape shared by these efforts --
   a statistic that is scoped to one Route Distinguisher, optionally
   further scoped by a per-family Subtype -- into a single reusable
   Stat Data container.  Address-family-specific documents SHOULD
   reference this container instead of defining a new one, supplying
   only the family-specific Subtype values and statistic semantics.</t>

	<t>
   This document does not obsolete or replace any of the drafts
   referenced above; it proposes a shared substrate that a future
   revision of each could adopt, and defines the substrate so that new
   RD-scoped statistics proposals (e.g., for MVPN or plain L3VPN
   address families) have an existing, reviewed pattern to reuse
   rather than inventing another one.</t>

	<section title="Requirements Language" anchor="sect-1.1"><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="Problem: Registry and Encoding Fragmentation" anchor="sect-2"><t>
   Three independent, concurrently active GROW contributions
   (<xref target="sect-1"/>) each define a Stat Data (or TLV Value) layout that
   begins with some combination of {Stat Subtype, AFI, SAFI, Route
   Distinguisher} followed by a value.  None of the three currently
   references either of the others' encodings.  If each proceeds to
   WGLC independently:</t>

	<t><list style="symbols"><t>A BMP collector implementer supporting all three must implement
      three separate, incompatible Stat Data parsers for what is
      conceptually the same idea: "a gauge, scoped to one RD, possibly further scoped by a route-type Subtype."</t>

	<t>Future per-family statistics documents (for MVPN, for plain
      L3VPN Loc-RIB, for SR-TE policies keyed by a color/endpoint
      instead of an RD) have no existing convention to reuse and are
      likely to define a fourth, fifth, and sixth ad hoc encoding.</t>

	<t>IANA "BMP Statistics Types" registrations end up describing the
      full Stat Data shape in free-text registry comments, rather
      than pointing to one shared format definition.</t>

	</list>
	</t>

	<t>
   This document proposes that new work defining RD-scoped statistics
   (while still allocating new Stat Types for new use cases as needed)
   reuse a single Stat Data container definition for the "scoped to one RD" case, described in <xref target="sect-3"/>.</t>

	</section>

	<section title="RD-Scoped Statistics Container" anchor="sect-3"><section title="Stat Data Format" anchor="sect-3.1"><t>
   The RD-Scoped Statistics Stat Data format is as follows.  It is
   used as the Stat Data (value) field of the Stat Type TLV defined in
   Section 4.8 of <xref target="RFC7854"/>, in place of a family-specific encoding.</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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Family     |   Subtype     |             AFI               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    SAFI       |                                               |
   +-+-+-+-+-+-+-+-+                                               +
   |                    Route Distinguisher (8 octets)             |
   +                                                                +
   |                                                                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Gauge (64 bits)                         |
   ~                                                                ~
   |                                                                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>
	<t><list style="symbols"><t>Family (1 octet): Identifies which address-family "profile" of
      this container applies (e.g., EVPN, L3VPN, MVPN), taken from the
      "BMP RD-Scoped Statistics Family" registry defined in
      <xref target="sect-7.1"/>.  A BMP implementation MUST ignore Stat Data with an
      unrecognized Family value on receipt.</t>

	<t>Subtype (1 octet): A Family-specific discriminator, e.g., an
      EVPN route type as defined in <xref target="I-D.saum-grow-bmp-afi-safi-evpn"/>,
      or 0 (Reserved) when the statistic does not need a Subtype.  The
      set of valid Subtype values, and whether Subtype applies at all,
      is defined by the Family-specific profile document, not by this
      document.</t>

	<t>AFI (2 octets), SAFI (1 octet): The Address Family Identifier
      and Subsequent Address Family Identifier <xref target="RFC4760"/> of the routes
      the statistic pertains to.  This is included even though Family
      already implies a typical AFI/SAFI, so that a single Family
      value can be reused across closely related SAFIs (e.g., an
      "L3VPN" Family used for both VPN-IPv4 and VPN-IPv6) without
      requiring a new Family registration per SAFI.</t>

	<t>Route Distinguisher (8 octets): The RD of the VRF, EVI, or
      equivalent routing instance the statistic is scoped to, encoded
      per <xref target="RFC4364"/>.  The RD identifies the instance exactly
      as it appears in the monitored RIB.  On a Local-RIB a locally
      configured instance usually has a single RD, so an RD-scoped count
      there is also a per-instance count.  On an Adj-RIB-In or
      Adj-RIB-Out, and in particular on a Route Reflector or Route
      Server, one instance that spans several originators can appear
      under several RDs, so an RD-scoped count is a per-RD slice rather
      than a per-instance total.  A Family profile (<xref
      target="sect-5"/>) states, for its family, how RDs are expected to
      map to instances in each RIB.</t>

	<t>Gauge (64 bits): The statistic value, encoded as a 64-bit gauge
      per Section 4.8 of <xref target="RFC7854"/>, consistent with [RFC9972].
      Family-specific profiles MAY instead specify that the value is a
      monotonic counter; this must be stated explicitly in the profile
      document.</t>

	</list>
	</t>

	<t>
   Family and AFI/SAFI are two different axes, and both are needed.
   AFI/SAFI identifies the protocol address family of the routes a
   statistic counts (for example VPN-IPv4, or EVPN).  Family identifies
   which profile, and therefore which rulebook, a receiver uses to
   interpret the Subtype octet and the Gauge.  A single Family can span
   more than one AFI/SAFI: an "L3VPN" Family, for instance, applies to
   both VPN-IPv4 (AFI 1, SAFI 128) and VPN-IPv6 (AFI 2, SAFI 128), so one
   Family registration covers both and the AFI/SAFI field records which
   of the two a given Stat Data instance is about.  Keying a profile on
   AFI/SAFI alone would require a separate registration per SAFI and
   would overload a protocol identifier with statistics semantics;
   keying on Family keeps the two concerns apart.  For a family whose
   address family is a single fixed pair, such as EVPN (AFI 25, SAFI 70),
   Family and AFI/SAFI coincide, and the AFI/SAFI field is carried for
   uniformity.</t>

	<figure><artwork><![CDATA[
This container is deliberately restricted to the single-RD,
single-gauge case that covers the documents surveyed in Section 2.
It does not attempt to also subsume the Flags/rate-of-change
mechanism proposed in [I-D.wang-grow-bmp-bgp-rib-stats-ext]; that
mechanism addresses a different, orthogonal concern (triggered /
differential reporting) and MAY be layered independently on top of
a Stat Type using this container, e.g. by also applying the
Statistics Information TLV of
[I-D.ietf-grow-bmp-stats-informational-tlv] to a Stat Type defined
using this format.
]]></artwork>
	</figure>
	</section>

	<section title="Family Registry" anchor="sect-3.2"><t>
   The Family field (<xref target="sect-3.1"/>) is allocated from a new "BMP RD-Scoped Statistics Family" registry (<xref target="sect-7.1"/>).  This document
   requests IANA to create that registry and to populate it with the
   following initial values, corresponding to already-circulating
   proposals:<!--
   draft-dikshit-grow-bmp-rd-scoped-rib-stats-01.txt(292): Warning: Unexpected
   title: expected 'Figure ...', found 'Table 1'.  This looks like a figure that
   has been entered as a texttable.  The generated XML will need adjustment.
   --></t>

	<figure anchor="le-1"><artwork><![CDATA[
+=======+=================================================+=========+
| Value | Family                                          | Ref.    |
+=======+=================================================+=========+
|   0   | Reserved                                        | RFC-TBD |
+-------+-------------------------------------------------+---------+
|   1   | L3VPN (VPN-IPv4 / VPN-IPv6 Loc-RIB)             | RFC-TBD |
+-------+-------------------------------------------------+---------+
|   2   | EVPN                                             | RFC-TBD |
+-------+-------------------------------------------------+---------+
|   3   | MVPN                                             | RFC-TBD |
+-------+-------------------------------------------------+---------+
| 4-127 | Unassigned (Standards Action)                    | --      |
+-------+-------------------------------------------------+---------+
|128-254| Unassigned (First Come First Served)             | --      |
+-------+-------------------------------------------------+---------+
|  255  | Reserved                                          | RFC-TBD |
+-------+-------------------------------------------------+---------+
]]></artwork>
	</figure>
	<figure><artwork><![CDATA[
Family value 2 (EVPN) is intended to be claimed by a future
revision of [I-D.saum-grow-bmp-afi-safi-evpn], re-expressed as a
profile of this container (Section 3.3); its existing Subtype
values (EVPN route types 1-11, as well as the ES/EVI/aliased-path
information types) map directly onto the Subtype field defined
here.  Family value 1 (L3VPN) is offered for
[I-D.zhuang-grow-bmp-enhancement-for-vrf-loc-rib] or a companion
document to adopt as a statistics (as opposed to TLV-only)
complement to that draft's Remote VRF Information TLV.  Family
value 3 (MVPN) is reserved for future work and is not otherwise
defined by this document.
]]></artwork>
	</figure>
	</section>

	<section title="Relationship to Existing and In-Progress Documents" anchor="sect-3.3"><t>
   This document is intentionally scoped as a thin, reusable
   substrate.  It does not itself define any new operator-visible
   statistic; instead it defines the shape that other documents'
   statistics can be expressed in.  Three concrete migration paths are
   anticipated, and authors of the referenced documents are invited to
   pursue whichever (if any) they find useful:</t>

	<figure><artwork><![CDATA[
*  A future [I-D.saum-grow-bmp-afi-safi-evpn] revision could
   redefine its per-EVI statistics (currently Section 2.2 of that
   document, with its own Stat Type/Subtype/RD/Gauge layout) as
   Family=2 (EVPN) instances of the container in Section 3.1,
   without changing the operational semantics of any counter
   already defined there.  The document's global (non-per-EVI)
   statistics (Section 2.1 of that document) are unaffected and
   remain outside the scope of this container; see Section 4.

*  [I-D.zhuang-grow-bmp-enhancement-for-vrf-loc-rib], which
   currently defines only a Remote VRF Information TLV (no
   counters), could add a companion Stat Type using Family=1
   (L3VPN) to report, e.g., the number of routes leaked into a VRF
   from each remote RD -- directly reusing the Remote Route
   Distinguisher concept that draft already established, and
   addressing the "dynamic inter-VRF route leaking (IVRL)" gap
   noted for the EVPN case in [I-D.saum-grow-bmp-afi-safi-evpn].

*  New GROW contributions proposing RD-scoped statistics for
   address families not listed in Table 1 (e.g., MVPN) SHOULD
   request a new Family value from IANA (Section 7.1) rather than
   defining a new Stat Data layout.
]]></artwork>
	</figure>
	<t>
   No normative change to any of the referenced in-progress documents
   is implied or required by this document; the mappings above are
   offered as non-binding guidance to reduce duplicate encoding work,
   pending discussion with the respective authors.</t>

	</section>

	<section title="Worked Examples" anchor="sect-examples"><t>
   These non-normative examples show the container carried as the Stat
   Data (value) of a Stat Type TLV (Section 4.8 of <xref target="RFC7854"/>)
   inside a Statistics Report message.  The container is 21 octets, so
   Stat Length is 21 in each case.  The Stat Type code point and the
   Per-Peer Header come from the profiling document and from
   <xref target="RFC7854"/> and <xref target="RFC9069"/>; they are shown
   only for context.</t>

	<figure><artwork><![CDATA[
Example 1: EVPN, per-EVI IP-Prefix route count, Local-RIB

Statistics Report
  Per-Peer Header: Loc-RIB Instance Peer (RFC 9069)
  Stat TLV
    Stat Type = <EVPN per-EVI Local-RIB code point>
    Stat Len  = 21
    Stat Data (RD-Scoped container):
      Family  = 2    (EVPN)
      Subtype = 5    (EVPN route type 5, IP-Prefix)
      AFI     = 25   SAFI = 70
      RD      = 65001:100
      Gauge   = 42
  => 42 EVPN type-5 routes in EVI 65001:100

Example 2: L3VPN, one VRF, IPv4 and IPv6 route counts

Statistics Report
  Per-Peer Header: Loc-RIB Instance Peer, Peer Distinguisher 65001:100
  Stat TLV (VPN-IPv4)
    Stat Type = <L3VPN per-RD code point>   Stat Len = 21
    Stat Data: Family=1 (L3VPN) Subtype=0 AFI=1 SAFI=128
               RD=65001:100 Gauge=500
  Stat TLV (VPN-IPv6)
    Stat Type = <L3VPN per-RD code point>   Stat Len = 21
    Stat Data: Family=1 (L3VPN) Subtype=0 AFI=2 SAFI=128
               RD=65001:100 Gauge=120
  => 500 VPN-IPv4 and 120 VPN-IPv6 routes in VRF 65001:100
     one Family (L3VPN); the AFI field selects v4 vs v6
]]></artwork>
	</figure>
	<t>
   On a shared Route Reflector session the Per-Peer Header would be a
   Global Instance Peer with a zero Peer Distinguisher; the RD inside the
   container is then the only field that names the instance.</t>

	</section>

	<section title="BMP Version Compatibility and Receiver Rules" anchor="sect-bmpver"><t>
   The container is agnostic to the underlying BMP protocol version.  It
   is carried as the Stat Data of a Stat Type entry in a Statistics
   Report, both in the base BMP protocol <xref target="RFC7854"/> and in
   the TLV-based BMP extensions being developed in the working group
   (informally, BMPv4):</t>

	<figure><artwork><![CDATA[
BMP (RFC 7854):
  [Common Hdr] [Per-Peer Hdr] [Stats Count]
    [Stat Type | Stat Length | Stat Data = container]

BMP TLV extensions (BMPv4):
  [Common Hdr] [Per-Peer Hdr] [Stats Count]
    [Stats TLV: Type | Length | Stat Data = container] [optional TLVs]
]]></artwork>
	</figure>
	<t>
   A collector applies two levels of backward compatibility:</t>

	<t><list style="numbers"><t>Unknown Stat Type: skip 4 + Stat Length octets and parse the next
      entry, as already specified by [RFC9972].</t>

	<t>Unknown Family: if the Stat Type is recognized but the 1-octet
      Family value is not, ignore that Stat Data payload and continue
      parsing subsequent entries, consistent with the receive rule in
      <xref target="sect-3.1"/>.</t>

	</list>
	</t>

	</section>

	</section>

	<section title="Global (non-RD-scoped) Companion Statistics" anchor="sect-4"><t>
   Some statistics that are conceptually related to an address family
   are not scoped to a single RD -- for example, a global count of
   routes of a given EVPN route type across all EVIs on a router (as
   defined in Section 2.1 of <xref target="I-D.saum-grow-bmp-afi-safi-evpn"/>).  Such
   statistics remain out of scope for the container defined in
   <xref target="sect-3.1"/> and continue to be defined directly against [RFC9972]'s
   existing per-AFI/SAFI Stat Data convention (2-byte AFI, 1-byte
   SAFI, Gauge), optionally with a Family-specific Subtype octet
   appended, without requiring a Route Distinguisher field.  This
   document does not change that convention.</t>

	</section>

	<section title="Applicability Guidance for Address-Family-Specific Profiles" anchor="sect-5"><t>
   A document profiling this container (a "Family document") is
   expected to specify at least:</t>

	<t><list style="symbols"><t>The Family value it claims (registered per <xref target="sect-7.1"/>).</t>

	<t>Whether Subtype is used, and if so, its value space and
      semantics (e.g., route-type enumeration).</t>

	<t>Whether AFI/SAFI is redundant with Family for that profile (and
      therefore fixed to a single well-known pair) or genuinely
      variable (e.g., a family spanning both an IPv4 and IPv6 SAFI).</t>

	<t>Which specific Stat Type code point(s), allocated from the "BMP Statistics Types" registry <xref target="RFC7854"/>, carry Stat Data in this
      container's format, and what each Stat Type's Gauge counts.</t>

	<t>Whether the counters are gauges or monotonic counters (<xref target="sect-3.1"/> defaults to gauge, consistent with the majority of existing
      RFC 9972-style statistics).</t>

	<t>How the RD in <xref target="sect-3.1"/> relates to an instance in
      each monitored RIB for that family.  On a Local-RIB an RD-scoped
      count is typically also a per-instance count, while on an
      Adj-RIB-In or Adj-RIB-Out, for example on a Route Reflector or
      Route Server, one instance may appear under several RDs, and
      aggregation to a single per-instance count may require correlation
      by an attribute such as a Route Target that the reporting node
      does not necessarily hold locally.</t>

	<t>Whether the family needs an additional instance-qualifying field
      beyond the RD, and if so how it is carried.  For example, an EVPN
      family that reports RFC 7432 <xref target="RFC7432"/> VLAN-aware
      bundle services, where several broadcast domains share one MAC-VRF
      and one RD and are distinguished only by the 32-bit Ethernet Tag
      ID, either defines an additional selector such as an Ethernet Tag
      ID, set to 0 for VLAN-based services, in its Subtype space or a
      profile-specific extension, or states explicitly that a gauge
      covers the whole bundle rather than an individual broadcast
      domain.</t>

	<t>The counting rule for a route that belongs to more than one
      instance, so that gauges are comparable across implementations.
      For example, under EVPN Integrated Routing and Bridging a single
      Type 2 route can be imported into both a MAC-VRF and an IP-VRF; the
      profile states whether such a route is counted once per RD or once
      per importing instance.</t>

	</list>
	</t>

	<t>
   A Family document is NOT required to duplicate the wire-format
   figure in <xref target="sect-3.1"/>; it MAY simply reference this document and
   list only the Family-specific parameters above.</t>

	</section>

	<section title="YANG Considerations" anchor="sect-6"><t>
   <xref target="I-D.ietf-grow-bmp-yang"/> defines a YANG data model for BMP.  At the
   time of writing, this reviewer-observed gap applies: none of
   [RFC9972]'s advanced statistics, the EVPN-specific statistics of
   <xref target="I-D.saum-grow-bmp-afi-safi-evpn"/>, or the routing-policy change
   statistics of <xref target="I-D.smc-grow-bmp-route-change-stats"/> appear to be
   modeled in the published revisions of <xref target="I-D.ietf-grow-bmp-yang"/>
   available to the authors when this document was written.  Authors
   of this document intend to propose a YANG augmentation, generic
   over the Family registry defined in <xref target="sect-7.1"/>, so that RD-scoped
   statistics defined against this container can be represented in
   that model without each Family document needing to define its own
   YANG augmentation independently.  This is noted here as a
   dependency to be tracked, not as a normative requirement of this
   document.</t>

	</section>

	<section title="IANA Considerations" anchor="sect-7"><t>
   The registration procedures referenced in this section ("Standards Action" and "First Come First Served") are to be interpreted as
   described in <xref target="RFC8126"/>.</t>

	<section title="BMP RD-Scoped Statistics Family Registry" anchor="sect-7.1"><t>
   IANA is requested to create a new registry, "BMP RD-Scoped Statistics Family", within the "BGP Monitoring Protocol (BMP) Parameters" registry group.  Registration procedures for this
   registry are:</t>

	<t><list style="symbols"><t>Values 0, 255: Reserved.</t>

	<t>Values 4-127: Standards Action.</t>

	<t>Values 128-254: First Come First Served.</t>

	</list>
	</t>

	<t>
   Initial values are as listed in Table 1 (<xref target="sect-3.2"/>).</t>

	</section>

	<section title="BMP Statistics Types" anchor="sect-7.2"><t>
   This document does not itself request any new Stat Type code
   points from the "BMP Statistics Types" registry <xref target="RFC7854"/>; it
   defines a Stat Data format that Family-specific documents use when
   they request their own Stat Type code points.  Such documents
   SHOULD note, in their IANA Considerations section, that the
   requested Stat Type's Stat Data is encoded per Section 3.1 of this
   document.</t>

	</section>

	</section>

	<section title="Operational Considerations" anchor="sect-op"><t>
   The statistics carried in this container are produced per Route
   Distinguisher, so the number of Stat Data instances in a report grows
   with the number of monitored RDs.  A producer SHOULD be able to
   rate-limit the reporting interval, and SHOULD allow an operator to
   select a subset of RDs, families, or Stat Types, so that a
   high-cardinality deployment does not emit an unbounded volume of
   statistics.  Reporting only counters that have changed since the
   previous report, for example by layering a triggered or differential
   mechanism on top of a Stat Type that uses this container, further
   bounds the volume.</t>

	<t>
   When these statistics are exported from an Adj-RIB-In or Adj-RIB-Out
   on an intermediate node such as a Route Reflector or Route Server, the
   reported counts reflect only the routes present in that RIB after any
   inbound or outbound policy, Route Target Constrain
   <xref target="RFC4684"/>, and best-path or Add-Path selection have been
   applied.  Such a count is therefore a view of the constrained or
   selected subset seen by that node, not of the entire fabric.  A
   collector SHOULD interpret an RD-scoped count in the context of the
   RIB and the node it was produced on, and SHOULD NOT assume that counts
   from two different nodes for the same RD are directly comparable unless
   those nodes observe the same set of routes.</t>

	</section>

	<section title="Security Considerations" anchor="sect-8"><t>
   This document defines a Stat Data encoding convention; it does not
   change the BMP session security model.  The security considerations
   of <xref target="RFC7854"/> apply.  As with any RD-scoped statistic, exposing per-
   VRF or per-EVI route counts and leak counts to a BMP collector
   reveals customer-instance-level operational detail; deployments
   SHOULD restrict BMP session access to authorized collectors and
   SHOULD use transport security (e.g., TCP-AO <xref target="RFC5925"/> or a TLS
   profile for BMP) consistent with the guidance already given in the
   Family documents referenced in this document.</t>

	</section>

	<section title="Contributors and Acknowledgements" anchor="sect-9"><figure><artwork><![CDATA[
The authors thank the authors of
[I-D.saum-grow-bmp-afi-safi-evpn],
[I-D.zhuang-grow-bmp-enhancement-for-vrf-loc-rib], and
[I-D.wang-grow-bmp-bgp-rib-stats-ext] for the analysis that
motivated this document; this document does not speak on their
behalf and any errors in characterizing their proposals are the
present authors' own.
]]></artwork>
	</figure>
	</section>

	</middle>

	<back>
	<references title="Normative References">
	&RFC2119;
	&RFC4364;
	&RFC4760;
	&RFC7854;
	&RFC8126;
	&RFC8174;
	</references>
	<references title="Informative References">
	&I-D.ietf-grow-bmp-yang;
	&I-D.ietf-grow-bmp-stats-informational-tlv;
	&I-D.saum-grow-bmp-afi-safi-evpn;
	&I-D.smc-grow-bmp-route-change-stats;
	&I-D.wang-grow-bmp-bgp-rib-stats-ext;
	&I-D.zhuang-grow-bmp-enhancement-for-vrf-loc-rib;
	&RFC5925;
	&RFC7432;
	&RFC4684;
	&RFC9069;
	</references>
	<section title="Changes Between Revisions" anchor="sect-a"><t>
   This section is to be removed before publishing as an RFC.</t>

	<t>
   v03 -&gt; v04</t>

	<t><list style="symbols"><t>Added a granularity progression to the Introduction
      (Router, Peer per       <xref target="RFC7854"/>, AFI/SAFI per [RFC9972], then per-instance
      in this document), and
      stated that on a shared BMP session with a zero Peer Distinguisher
      the instance key must travel inside the Stat Data.</t>

	<t>Added a BMP Version Compatibility and Receiver Rules subsection
      (<xref target="sect-bmpver"/>) showing the container carried inside
      both the base BMP protocol and the TLV-based BMP extensions, and
      formalizing the two-level skip rule (unknown Stat Type, then
      unknown Family).</t>

	</list>
	</t>

	<t>
   v02 -&gt; v03</t>

	<t><list style="symbols"><t>Added an explanation in <xref target="sect-3.1"/> of why both
      Family and AFI/SAFI are carried (they are different axes; one
      Family can span several AFI/SAFIs, such as an L3VPN Family covering
      VPN-IPv4 and VPN-IPv6).</t>

	<t>Added a Worked Examples section (<xref target="sect-examples"/>)
      showing the container carried as Stat Data inside a Statistics
      Report, for an EVPN per-EVI count and for an L3VPN per-VRF count in
      both IPv4 and IPv6, and noting the shared Route Reflector case.
      Added <xref target="RFC9069"/> to Informative References.</t>

	<t>Aligned with
      <xref target="I-D.saum-grow-bmp-afi-safi-evpn"/>, which adopts this
      container as its Family=EVPN per-EVI encoding.</t>

	</list>
	</t>

	<t>
   v01 -&gt; v02</t>

	<t><list style="symbols"><t>Clarified in <xref target="sect-3.1"/> that the Route
      Distinguisher identifies the instance as it appears in the
      monitored RIB: an RD-scoped count equals a per-instance count on a
      Local-RIB, but is a per-RD slice on an Adj-RIB-In or Adj-RIB-Out,
      and in particular on a Route Reflector or Route Server, where one
      instance can appear under several RDs.</t>

	<t>Extended the profile guidance in <xref target="sect-5"/> to cover
      the per-RIB RD-to-instance mapping, an optional
      instance-qualifying field for a family (for example an Ethernet Tag
      ID for RFC 7432 VLAN-aware bundles), and the counting rule for a
      route that belongs to more than one instance (for example an EVPN
      IRB Type 2 route imported into both a MAC-VRF and an IP-VRF).</t>

	<t>Added an Operational Considerations section
      (<xref target="sect-op"/>) covering reporting cardinality and
      rate-limiting, and the interpretation of counts exported from an
      Adj-RIB on a Route Reflector or Route Server after policy, Route
      Target Constrain <xref target="RFC4684"/>, and best-path or Add-Path
      selection.  Added <xref target="RFC4684"/> to Informative
      References.</t>

	</list>
	</t>

	<t>
   v00 -&gt; v01</t>

	<t><list style="symbols"><t>Added an introductory sentence to <xref target="sect-7"/> citing <xref target="RFC8126"/> for
      the "Standards Action" and "First Come First Served" terms used
      in <xref target="sect-7.1"/>, and added <xref target="RFC8126"/> to Normative References.
      Neither the new registry definition nor its initial values
      (Table 1) changed.</t>

	</list>
	</t>

	</section>

	</back>

	</rfc>
	
