Advanced BGP Monitoring Protocol (BMP) Statistics Types
New BMP counters that let a router report how many routes sit in, or were filtered from, its BGP route tables.
Srivastava, M., Ed., Liu, Y., Lin, C., Ed., and J. Li, "Advanced BGP Monitoring Protocol (BMP) Statistics Types", RFC 9972, DOI 10.17487/RFC9972, May 2026, <https://www.rfc-editor.org/info/rfc9972>.
@misc{rfc9972,
series = {Request for Comments},
number = 9972,
howpublished = {RFC 9972},
publisher = {RFC Editor},
doi = {10.17487/RFC9972},
url = {https://www.rfc-editor.org/info/rfc9972},
author = {M. Srivastava and Y. Liu and C. Lin and J. Li},
title = {{Advanced BGP Monitoring Protocol (BMP) Statistics Types}},
pagetotal = 15,
year = 2026,
month = may,
} RFC text
Contents
Internet Engineering Task Force (IETF) M. Srivastava, Ed.
Request for Comments: 9972 Hewlett Packard Enterprise
Category: Standards Track Y. Liu
ISSN: 2070-1721 China Mobile
C. Lin, Ed.
New H3C Technologies
J. Li
China Mobile
May 2026
Advanced BGP Monitoring Protocol (BMP) Statistics Types
Abstract
The BGP Monitoring Protocol (BMP) described in RFC 7854 defines
statistics message types to observe events that occur on a monitored
router. This document defines new statistics types to monitor BMP
Adj-RIB-In and Adj-RIB-Out Routing Information Bases (RIBs).
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 7841.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
https://www.rfc-editor.org/info/rfc9972.
Copyright Notice
Copyright (c) 2026 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Revised BSD License text as described in Section 4.e of the
Trust Legal Provisions and are provided without warranty as described
in the Revised BSD License.
Table of Contents
1. Introduction
1.1. Requirements Language
2. Terminology
3. RIB Monitoring Statistics
3.1. Statistics Format
3.2. Adj-RIB-In RIB Monitoring Statistics Definition
3.3. Adj-RIB-Out RIB Monitoring Statistics Definition
4. Application Scope of Statistics
5. Implementation Considerations
6. Operational Considerations
7. Security Considerations
8. IANA Considerations
9. Normative References
Acknowledgements
Authors' Addresses
1. Introduction
Section 4.8 of [RFC7854] defines a number of different BGP Monitoring
Protocol (BMP) statistics types to observe major events that occur on
a monitored router. Statistics are either counters or Gauges.
Section 6.2 of [RFC8671] also defines several BMP statistics types
for Adj-RIB-Out of a monitored router.
New BMP statistics types are needed to enable more-refined BGP route
monitoring and analysis to improve operational maintenance and
troubleshooting capabilities.
This document defines Gauges for new BMP statistics. The
applicability scope of these new Gauges (Adj-RIB-In, Adj-RIB-Out,
Loc-RIB) is provided in Section 4. The format of the BMP Statistics
Report message remains the same as defined in [RFC7854].
1.1. Requirements Language
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
| Note that the key words are used to stress importance for
| operations; they are not required as a formal implementation
| requirement.
2. Terminology
This document makes use of the following terms:
Adj-RIB-In: As defined in Section 1.1 of [RFC4271]:
| The Adj-RIBs-In contains unprocessed routing information that
| has been advertised to the local BGP speaker by its peers.
Pre-policy Adj-RIB-In: The result before applying the inbound policy
to an Adj-RIB-In. Note that this is an explicit definition that
aligns with the pre-policy Adj-RIB-In concept specified in
Section 2 of [RFC7854].
Post-policy Adj-RIB-In: As defined in Section 2 of [RFC7854]:
| The result of applying inbound policy to an Adj-RIB-In, but
| prior to the application of route selection to form the Loc-
| RIB.
Adj-RIB-Out: As defined in Section 1.1 of [RFC4271]:
| The Adj-RIBs-Out contains the routes for advertisement to
| specific peers by means of the local speaker's UPDATE messages.
Pre-policy Adj-RIB-Out: As defined in Section 3 of [RFC8671]:
| The result before applying the outbound policy to an
| Adj-RIB-Out. This normally would match what is in the local
| RIB.
Post-policy Adj-RIB-Out: As defined in Section 3 of [RFC8671]:
| The result of applying outbound policy to an Adj-RIB-Out. This
| MUST convey to the BMP receiver what is actually transmitted to
| the peer.
Loc-RIB: As defined in Section 1.1 of [RFC4271]:
| The Loc-RIB contains the routes that have been selected by the
| local BGP speaker's Decision Process.
Note that the Loc-RIB state as monitored through BMP might also
contain routes imported from other routing protocols such as an
IGP or local static routes.
Route: As defined in Section 1.1 of [RFC4271]:
| A unit of information that pairs a set of destinations with the
| attributes of a path to those destinations.
The terms "producer" and "collector" are equivalent to "monitored
router" and "monitoring station", respectively. Also,
"implementation" follows the same usage as in [RFC7854].
3. RIB Monitoring Statistics
This section defines different statistics types for Adj-RIB-In and
Adj-RIB-Out monitoring types. Some of these statistics are also
applicable to Loc-RIB; refer to Section 4 for more details.
3.1. Statistics Format
The BMP Statistics Report message carries statistic information in
Type-Length-Value (TLV) formats. Each statistic is encoded as a TLV
(Stat Type, Stat Len, Stat Data) (see Section 4.8 of [RFC7854]).
"Stat Data" is being referred to as "value" when defining various RIB
Monitoring Statistics.
Statistics defined in this document can be categorized into two
granularities: Global Statistics and Per-AFI/SAFI (see [RFC4760])
Statistics. Statistics defined with Per-AFI/SAFI descriptions belong
to Per-AFI/SAFI Statistics, while other statistics belong to Global
Statistics. Both Global Statistics and their corresponding Per-AFI/
SAFI Statistics can be reported simultaneously.
The Per-AFI/SAFI Statistics apply only to the AFI/SAFI that a BGP
speaker supports and negotiates with its peer. The authoritative
registries for AFI/SAFI values are maintained by IANA (see [IANA-AFI]
and [IANA-SAFI]).
For Global Statistics, the "Stat Data" (value) field is a single
64-bit unsigned integer Gauge where the "Stat Len" field MUST be set
to 8. Each global statistic MUST appear only once in a BMP
Statistics Report message.
For Per-AFI/SAFI Statistics, the "Stat Data" (value) field is a
11-byte structured value formatted as a 2-byte AFI, a 1-byte SAFI,
and a 64-bit Gauge. The "Stat Len" MUST be set to 11. For any given
per-AFI/SAFI Statistic, duplicate (AFI, SAFI) pairs MUST NOT appear
within the same BMP Statistics Report message. Per-AFI/SAFI
statistics MUST NOT be included in the BMP Statistics Report message
if there is no data to report for that AFI/SAFI.
If statistics apply to the Loc-RIB, the "Peer Type" field in the Per-
Peer Header of the corresponding BMP Statistics Report message MUST
be set to 3 (Loc-RIB Instance Peer) [RFC9069]. Otherwise, the "Peer
Type" field MUST be set as defined in Section 4.2 of [RFC7854].
A BMP implementation MUST ignore unrecognized Stat Types upon
receipt.
3.2. Adj-RIB-In RIB Monitoring Statistics Definition
Type = 18: (64-bit Gauge)
Current number of routes in the pre-policy Adj-RIB-In. This Gauge
is similar to Stat Type 7 defined in [RFC7854] and makes it
explicitly for the pre-policy Adj-RIB-In.
Type = 19: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI pre-policy
Adj-RIB-In. This Gauge is similar to Stat Type 9 defined in
Section 4.8 of [RFC7854] and makes it explicitly for the pre-
policy Adj-RIB-In.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 20: (64-bit Gauge)
Current number of routes in the post-policy Adj-RIB-In.
Type = 21: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-In.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 22: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI pre-policy Adj-RIB-In
rejected by an inbound policy. This Gauge is different from Stat
Type 0 defined in Section 4.8 of [RFC7854]. Stat Type 0 is a
32-bit counter that is a monotonically increasing number; the Stat
Type 22 is a 64-bit Gauge that represents the current number of
routes rejected by an inbound policy due to ongoing policy
configuration changes.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 23: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-In accepted by an inbound policy.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 26: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-In or Loc-RIB suppressed by a configured route-damping
policy.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
'Suppressed' refers to a route that has been declared suppressed
by the BGP Route Flap Damping mechanism as described in
Section 2.2 of [RFC2439].
Type = 27: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-In or Loc-RIB marked as stale by Graceful Restart (GR)
events.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
'Stale' refers to a route that has been declared stale by the BGP
GR mechanism as described in Section 4.1 of [RFC4724].
Type = 28: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-In or Loc-RIB marked as stale by Long-Lived Graceful
Restart (LLGR).
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
'Stale' refers to a route that has been declared stale by the BGP
LLGR mechanism as described in Section 4.3 of [RFC9494].
Type = 29: (64-bit Gauge)
Current number of routes in the post-policy Adj-RIB-In left before
exceeding the received-route threshold as defined in Section 6.7
of [RFC4271].
Type = 30: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI in post-policy
Adj-RIB-In left before exceeding the received-route threshold that
corresponds to the upper bound of per-AFI/SAFI accepted routes
following the model defined in Section 6.7 of [RFC4271].
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 31: (64-bit Gauge)
Current number of routes in the post-policy Adj-RIB-In or Loc-RIB
left before exceeding a license-customized route threshold. If no
such license is configured, or if the license does not impose a
hard limit, this value MUST NOT be reported.
Type = 32: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-In or Loc-RIB left before exceeding a license-customized
route threshold. If no such license is configured, or if the
license does not impose a hard limit, this value MUST NOT be
reported.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 33: (64-bit Gauge)
Current number of routes in the pre-policy Adj-RIB-In rejected due
to exceeding the maximum AS_PATH length supported by the local
configuration.
Type = 34: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI in pre-policy
Adj-RIB-In rejected due to exceeding the maximum AS_PATH length
supported by the local configuration.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 35: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-In invalidated after verifying the route origin Autonomous
System Number (ASN) through the Route Origin Authorization (ROA)
of the Resource Public Key Infrastructure (RPKI) [RFC6811]. This
is the total number of routes invalidated due to a mismatch of
origin ASNs and a mismatch of prefix length.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 36: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-In validated after verifying the route origin ASN through
the ROA of the RPKI [RFC6811].
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 37: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-In whose RPKI route origin validation state is NotFound
due to the absence of a matching ROA of RPKI [RFC6811].
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
3.3. Adj-RIB-Out RIB Monitoring Statistics Definition
Type = 38: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI pre-policy
Adj-RIB-Out rejected by an outbound policy. These routes are
active routes that otherwise would have been advertised in the
absence of an outbound policy that rejected them.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 39: (64-bit Gauge)
Current number of routes in the pre-policy Adj-RIB-Out filtered
due to the AS_PATH length exceeding the locally configured
maximum.
Type = 40: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI pre-policy
Adj-RIB-Out filtered due to AS_PATH length exceeding the locally
configured maximum.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 41: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-Out invalidated after verifying the route origin ASN
through the ROA of the RPKI [RFC6811]. This is the total number
of routes invalidated due to a mismatch of origin ASNs and a
mismatch of prefix lengths.
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 42: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-Out validated after verifying the route origin ASN through
the ROA of the RPKI [RFC6811].
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
Type = 43: (64-bit Gauge)
Current number of routes in the per-AFI/SAFI post-policy
Adj-RIB-Out whose RPKI route origin validation state is NotFound
due to the absence of a matching ROA of RPKI [RFC6811].
The value is structured as a 2-byte AFI, a 1-byte SAFI, and a
64-bit Gauge.
4. Application Scope of Statistics
Table 1 briefly lists the statistics defined in this document and
outlines their scope of application.
+====+==========+=============+=======+=============+=============+
|Type|Pre-policy| Post-policy |Loc-RIB| Pre-policy | Post-policy |
| |Adj-RIB-In| Adj-RIB-In | | Adj-RIB-Out | Adj-RIB-Out |
+====+==========+=============+=======+=============+=============+
| 18 | Y | N | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 19 | Y | N | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 20 | N | Y | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 21 | N | Y | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 22 | Y | N | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 23 | N | Y | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 26 | N | Y | Y | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 27 | N | Y | Y | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 28 | N | Y | Y | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 29 | N | Y | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 30 | N | Y | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 31 | N | Y | Y | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 32 | N | Y | Y | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 33 | Y | N | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 34 | Y | N | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 35 | N | Y | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 36 | N | Y | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 37 | N | Y | N | N | N |
+----+----------+-------------+-------+-------------+-------------+
| 38 | N | N | N | Y | N |
+----+----------+-------------+-------+-------------+-------------+
| 39 | N | N | N | Y | N |
+----+----------+-------------+-------+-------------+-------------+
| 40 | N | N | N | Y | N |
+----+----------+-------------+-------+-------------+-------------+
| 41 | N | N | N | N | Y |
+----+----------+-------------+-------+-------------+-------------+
| 42 | N | N | N | N | Y |
+----+----------+-------------+-------+-------------+-------------+
| 43 | N | N | N | N | Y |
+----+----------+-------------+-------+-------------+-------------+
Table 1: Scope of Application
5. Implementation Considerations
This document specifies Gauges for new BMP statistics. The format of
BMP Statistics Report messages remains unchanged from [RFC7854].
This section outlines the implementation considerations for new BMP
statistics.
For backward compatibility, and absent any other policy, it is
RECOMMENDED that BMP producers capable of generating both (Types 7
and 18) and (Types 9 and 19) BMP statistics transmit both
corresponding types simultaneously. This allows BMP collectors to
process either format according to their needs without disrupting
existing implementations that rely on Types 7 or 9. The selection of
which statistics types to generate within each pair SHOULD be treated
as an implementation decision rather than a protocol requirement,
with the BMP collector behavior for handling these statistics types
remaining implementation specific.
Some statistics are dependent on feature configurations, such as GR,
LLGR, and RPKI; therefore, the corresponding statistics SHOULD only
be generated and sent when these features are enabled on the BMP
producer. These statistics include the following Types: 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, and 43.
Some statistics are also relevant for the Loc-RIB view [RFC9069];
therefore, they may apply to the Loc-RIB view after best-path
selection is completed. These statistics include Types 26, 27, 28,
31, and 32. When these statistics apply to the Loc-RIB view, the
"Peer Type" field in the Per-Peer Header of the corresponding BMP
Statistics Report message MUST set to 3.
Certain statistics may have logical relationships (e.g., per-AFI/SAFI
counts summing to global totals). BMP statistics producers and
collectors MAY perform consistency checks but MUST NOT assume strict
dependencies (due to potential race conditions or partial failures).
Discrepancies (e.g., sum(per-AFI/SAFI) != global count) SHOULD be
logged as warnings but MUST NOT disrupt protocol operation.
The generation and transmission of Types 27 and 28 during an active
GR/LLGR event consumes additional control plane resources (e.g.,
CPU). BMP statistics producers SHOULD prioritize the core GR/LLGR
convergence procedures. To avoid adversely impacting the restart
process, a BMP statistics producer MAY choose to sample this value at
a lower frequency, buffer the updates, or temporarily suspend
reporting for this type during the most critical phases of a
switchover.
These Gauges may reset due to manual clearance or overflow. BMP
statistics producers and collectors MUST track discontinuities and
log this anomaly.
6. Operational Considerations
This section outlines some operational considerations of new BMP
statistics for BMP operators.
Transmission scheduling and triggering mechanisms for new Gauges are
implementation dependent. BMP operators SHOULD determine appropriate
report generation and delivery strategies, including configurable
timing intervals and threshold values. The mechanism for controlling
the reporting of new Gauges SHOULD be consistent with that of
existing types.
BMP operators SHOULD rate-limit statistics updates to minimize
performance impact on control plane processes. BMP operators SHOULD
only enable necessary statistics to reduce memory and CPU overhead.
Implementations SHOULD also support per-router configuration of
statistic subsets for collection and reporting.
Some BMP statistics producers, or configurations in BMP statistics
producers, MAY discard routes that do not match policy; thus, the
accepted count (Type 23) and the Adj-RIB-In counts (Type 21) will be
identical in such cases. BMP operators SHOULD be aware of this
behavior when interpreting these Gauges. BMP operators SHOULD be
aware that BMP statistics producers and collectors MAY log
inconsistencies between statistics as warnings.
7. Security Considerations
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 [RFC7854], Section 8 of
[RFC8671], and Section 7 of [RFC9069] are also applicable to the
Gauges defined in this document. This document does not add any
additional security considerations.
Monitored devices SHOULD be configured to implement rate-limited
reporting of new Gauges.
8. IANA Considerations
IANA has assigned the following new parameters in the "BMP Statistics
Types" registry, part of the "BGP Monitoring Protocol (BMP)
Parameters" registry group <https://www.iana.org/assignments/bmp-
parameters/>.
IANA has listed these entries as follows. This document serves as a
reference for each entry.
+======+=================================================+
| Stat | Description |
| Type | |
+======+=================================================+
| 18 | Number of routes currently in the pre-policy |
| | Adj-RIB-In. |
+------+-------------------------------------------------+
| 19 | Number of routes currently in the per-AFI/SAFI |
| | pre-policy Adj-RIB-In. |
+------+-------------------------------------------------+
| 20 | Number of routes currently in the post-policy |
| | Adj-RIB-In. |
+------+-------------------------------------------------+
| 21 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In. |
+------+-------------------------------------------------+
| 22 | Number of routes currently in the per-AFI/SAFI |
| | pre-policy Adj-RIB-In rejected by an inbound |
| | policy. |
+------+-------------------------------------------------+
| 23 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In accepted by an inbound |
| | policy. |
+------+-------------------------------------------------+
| 26 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In or Loc-RIB suppressed by |
| | a configured route-damping policy. |
+------+-------------------------------------------------+
| 27 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In or Loc-RIB marked as |
| | stale by GR events. |
+------+-------------------------------------------------+
| 28 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In or Loc-RIB marked as |
| | stale by LLGR. |
+------+-------------------------------------------------+
| 29 | Number of routes currently in the post-policy |
| | Adj-RIB-In left before exceeding the received- |
| | route threshold. |
+------+-------------------------------------------------+
| 30 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In left before exceeding |
| | the received-route threshold. |
+------+-------------------------------------------------+
| 31 | Number of routes currently in the post-policy |
| | Adj-RIB-In or Loc-RIB left before exceeding a |
| | license-customized route threshold. |
+------+-------------------------------------------------+
| 32 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In or Loc-RIB left before |
| | exceeding a license-customized route threshold. |
+------+-------------------------------------------------+
| 33 | Number of routes currently in the pre-policy |
| | Adj-RIB-In rejected due to exceeding the |
| | locally configured maximum AS_PATH length. |
+------+-------------------------------------------------+
| 34 | Number of routes currently in the per-AFI/SAFI |
| | pre-policy Adj-RIB-In rejected due to exceeding |
| | the locally configured maximum AS_PATH length. |
+------+-------------------------------------------------+
| 35 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In invalidated after |
| | verifying the route origin ASN through the ROA |
| | of the RPKI and mismatch of prefix length. |
+------+-------------------------------------------------+
| 36 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In validated after |
| | verifying the route origin ASN through the ROA |
| | of the RPKI. |
+------+-------------------------------------------------+
| 37 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-In whose RPKI route origin |
| | validation state is NotFound. |
+------+-------------------------------------------------+
| 38 | Number of routes currently in the per-AFI/SAFI |
| | pre-policy Adj-RIB-Out rejected by an outbound |
| | policy. |
+------+-------------------------------------------------+
| 39 | Number of routes currently in the pre-policy |
| | Adj-RIB-Out filtered due to AS_PATH length |
| | exceeding the locally configured maximum. |
+------+-------------------------------------------------+
| 40 | Number of routes currently in the per-AFI/SAFI |
| | pre-policy Adj-RIB-Out filtered due to AS_PATH |
| | length exceeding the locally configured |
| | maximum. |
+------+-------------------------------------------------+
| 41 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-Out invalidated after |
| | verifying the route origin ASN through the ROA |
| | of the RPKI and mismatch of prefix length. |
+------+-------------------------------------------------+
| 42 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-Out validated after |
| | verifying the route origin ASN through the ROA |
| | of the RPKI. |
+------+-------------------------------------------------+
| 43 | Number of routes currently in the per-AFI/SAFI |
| | post-policy Adj-RIB-Out whose RPKI route origin |
| | validation state is NotFound. |
+------+-------------------------------------------------+
Table 2: BMP Statistics Types
9. Normative References
[IANA-AFI] IANA, "Address Family Numbers",
<https://www.iana.org/assignments/address-family-numbers>.
[IANA-SAFI]
IANA, "Subsequent Address Family Identifiers (SAFI)
Parameters",
<https://www.iana.org/assignments/safi-namespace>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route
Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November
1998, <https://www.rfc-editor.org/info/rfc2439>.
[RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A
Border Gateway Protocol 4 (BGP-4)", RFC 4271,
DOI 10.17487/RFC4271, January 2006,
<https://www.rfc-editor.org/info/rfc4271>.
[RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y.
Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724,
DOI 10.17487/RFC4724, January 2007,
<https://www.rfc-editor.org/info/rfc4724>.
[RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter,
"Multiprotocol Extensions for BGP-4", RFC 4760,
DOI 10.17487/RFC4760, January 2007,
<https://www.rfc-editor.org/info/rfc4760>.
[RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R.
Austein, "BGP Prefix Origin Validation", RFC 6811,
DOI 10.17487/RFC6811, January 2013,
<https://www.rfc-editor.org/info/rfc6811>.
[RFC7854] Scudder, J., Ed., Fernando, R., and S. Stuart, "BGP
Monitoring Protocol (BMP)", RFC 7854,
DOI 10.17487/RFC7854, June 2016,
<https://www.rfc-editor.org/info/rfc7854>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8671] Evens, T., Bayraktar, S., Lucente, P., Mi, P., and S.
Zhuang, "Support for Adj-RIB-Out in the BGP Monitoring
Protocol (BMP)", RFC 8671, DOI 10.17487/RFC8671, November
2019, <https://www.rfc-editor.org/info/rfc8671>.
[RFC9069] Evens, T., Bayraktar, S., Bhardwaj, M., and P. Lucente,
"Support for Local RIB in the BGP Monitoring Protocol
(BMP)", RFC 9069, DOI 10.17487/RFC9069, February 2022,
<https://www.rfc-editor.org/info/rfc9069>.
[RFC9494] Uttaro, J., Chen, E., Decraene, B., and J. Scudder, "Long-
Lived Graceful Restart for BGP", RFC 9494,
DOI 10.17487/RFC9494, November 2023,
<https://www.rfc-editor.org/info/rfc9494>.
Acknowledgements
The authors would like to thank Jeff Haas, Mohamed Boucadair, Thomas
Graf, and Prasad S. Narasimha for their valuable input.
Thanks to Giuseppe Fioccola for the OPSDIR, Jouni Korhonen for the
GENART, and Bruno Decraene for the RTGDIR review.
Thanks to Gunter van de Velde, Éric Vyncke, and Ketan Talaulikar for
the IESG review.
Authors' Addresses
Mukul Srivastava (editor)
Hewlett Packard Enterprise
10 Technology Park Dr
Westford, MA 01886
United States of America
Email: mukul.srivastava@hpe.com
Yisong Liu
China Mobile
32 Xuanwumen West Street
Beijing
Xicheng District, 100053
China
Email: liuyisong@chinamobile.com
Changwang Lin (editor)
New H3C Technologies
8 Yongjia North Road
Beijing
Haidian District, 100094
China
Email: linchangwang.04414@h3c.com
Jinming Li
China Mobile
32 Xuanwumen West Street
Beijing
Xicheng District, 100053
China
Email: lijinming@chinamobile.com
AI ELI5
On this page
§1Why More BMP Statistics
The BGP Monitoring Protocol (BMP, RFC 7854) lets a monitored router report to a monitoring station. Section 4.8 of that RFC defines statistics types for major events, which are either counters or Gauges. RFC 8671 adds some for Adj-RIB-Out.
This document says new types are needed for more refined route monitoring and analysis, to improve operational maintenance and troubleshooting. It defines only new Gauges. The BMP Statistics Report message keeps the format from RFC 7854.
Watchers of a router could only see a few simple numbers. This gives them more useful numbers to look at.
§2RIBs and Policy Stages
A RIB is a routing information base. The RFC reuses these terms, mostly from RFC 4271.
- Adj-RIB-In: unprocessed routing information advertised to the local BGP speaker by its peers. It has a pre-policy form (before inbound policy) and a post-policy form (after inbound policy but before route selection).
- Adj-RIB-Out: routes for advertisement to specific peers in UPDATE messages, with pre-policy and post-policy forms around outbound policy. The post-policy form MUST convey what is actually sent to the peer.
- Loc-RIB: routes selected by the Decision Process. As monitored through BMP it may also contain routes from other protocols such as an IGP, or local static routes.
The terms "producer" and "collector" mean the monitored router and the monitoring station.
Think of an in tray for routes just arrived, an out tray for routes to send, and a best-of pile. Policy is the filter between trays.
§3.1Statistics Format
Each statistic is a TLV of Stat Type, Stat Len and Stat Data; the data is called the value. Statistics come in two granularities, which may be reported at the same time.
- Global: the value is one 64-bit unsigned Gauge and
Stat LenMUST be 8. Each global statistic MUST appear only once in a report. - Per-AFI/SAFI: the value is 11 bytes: a 2-byte AFI, a 1-byte SAFI and a 64-bit Gauge, with
Stat Lenset to 11 (RFC 4760). The same (AFI, SAFI) pair MUST NOT appear twice for one statistic in a report, and entries with no data MUST NOT be included.
For statistics that apply to the Loc-RIB, the Peer Type in the Per-Peer Header MUST be 3 (Loc-RIB Instance Peer, RFC 9069). A BMP implementation MUST ignore Stat Types it does not recognize.
Each number comes in a small labeled box. Some boxes hold one total, and some hold a total for each kind of route.
| Field | Name | Size | Value | Description |
|---|---|---|---|---|
AFI | AFI | 2 bytes | Address family identifier. | |
SAFI | SAFI | 1 byte | Subsequent address family identifier. | |
GAUGE | Gauge | 8 bytes | 64-bit current value of the statistic. |
§3.2The New Statistics Types
Types 18 to 23 and 26 to 37 cover Adj-RIB-In, and Types 38 to 43 cover Adj-RIB-Out. All are 64-bit Gauges. Groups of them are:
- Route counts: Types 18 and 19 count the pre-policy Adj-RIB-In (global and per-AFI/SAFI), and Types 20 and 21 the post-policy one. Type 18 is like Type 7 and Type 19 is like Type 9 of RFC 7854, but explicitly pre-policy.
- Policy results: Type 22 is routes rejected by inbound policy, and Type 23 is routes accepted. Unlike the monotonically increasing 32-bit counter of Type 0, Type 22 is the current number rejected.
- Route state: Type 26 is routes suppressed by route flap damping (RFC 2439), Type 27 stale by Graceful Restart (RFC 4724), and Type 28 stale by Long-Lived Graceful Restart (RFC 9494).
- Headroom: Types 29 and 30 are routes left before the received-route threshold of RFC 4271 is exceeded. Types 31 and 32 are routes left before a license-customized threshold, which MUST NOT be reported if no license or no hard limit exists.
- AS_PATH length: Types 33 and 34 count Adj-RIB-In routes rejected for exceeding the locally supported maximum, and Types 39 and 40 count Adj-RIB-Out routes filtered for the same reason.
- RPKI origin validation (RFC 6811): Types 35 to 37 give invalid, valid and NotFound counts for Adj-RIB-In, and Types 41 to 43 the same for Adj-RIB-Out.
- Outbound rejects: Type 38 counts active routes that outbound policy rejected and that would otherwise have been advertised.
IANA has assigned these values in the "BMP Statistics Types" registry.
Each new counter answers a question such as how many routes are in the tray, how many were thrown out, or how many are old.
- 18Pre-policy Adj-RIB-In routes — Global count of routes now in the pre-policy Adj-RIB-In.
- 20Post-policy Adj-RIB-In routes — Global count of routes now in the post-policy Adj-RIB-In.
- 22Rejected by inbound policy — Per-AFI/SAFI routes currently rejected.
- 26Suppressed by damping — Per-AFI/SAFI routes suppressed by route flap damping.
- 27Stale by GR — Per-AFI/SAFI routes marked stale by Graceful Restart.
- 35RPKI invalid (in) — Per-AFI/SAFI Adj-RIB-In routes invalidated by origin validation.
- 38Rejected by outbound policy — Per-AFI/SAFI routes that outbound policy blocked.
- 43RPKI NotFound (out) — Per-AFI/SAFI Adj-RIB-Out routes with no matching ROA.
§4Where Each Statistic Applies
A table in the RFC marks each Type against five views: pre-policy Adj-RIB-In, post-policy Adj-RIB-In, Loc-RIB, pre-policy Adj-RIB-Out and post-policy Adj-RIB-Out.
Most types apply to one view only. Types 26, 27, 28, 31 and 32 apply to both post-policy Adj-RIB-In and the Loc-RIB. When reported for the Loc-RIB, Peer Type MUST be 3. Types 18, 19, 22, 33 and 34 are pre-policy Adj-RIB-In. Types 38, 39 and 40 are pre-policy Adj-RIB-Out and Types 41, 42 and 43 are post-policy Adj-RIB-Out.
A chart says which counter belongs to which tray, so you do not read a number from the wrong one.
§5Implementation Considerations
For backward compatibility, producers able to send both Types 7 and 18, and both 9 and 19, are RECOMMENDED to send both of each pair. The choice is otherwise an implementation decision.
Statistics that depend on Graceful Restart, Long-Lived Graceful Restart or RPKI SHOULD only be generated when those features are enabled. The RFC lists Types 26 to 37 and 39 to 43 here.
Statistics may have logical links, such as per-AFI/SAFI counts summing to a global total, but implementations MAY check yet MUST NOT assume strict dependencies, because of race conditions and partial failures. A mismatch SHOULD be logged as a warning and MUST NOT disrupt protocol operation.
Reporting Types 27 and 28 during a restart costs control plane resources such as CPU, so producers SHOULD prioritize restart convergence. They MAY sample less often, buffer updates or suspend reporting. Gauges may reset after manual clearance or overflow, and producers and collectors MUST track and log such discontinuities.
Counting costs effort. A busy router should do its main job first and count later, and the numbers may not always add up exactly.
§6Operational Considerations
When and how new Gauges are sent is implementation dependent. Operators SHOULD choose report generation and delivery strategies, with configurable timing intervals and thresholds, and the control SHOULD match that of existing types.
Operators SHOULD rate-limit statistics updates to limit the impact on control plane processes, and enable only the statistics they need to save memory and CPU. Implementations SHOULD support per-router selection of which statistics subsets to collect and report.
Some producers may discard routes that fail policy. Then the accepted count (Type 23) and the post-policy Adj-RIB-In count (Type 21) will be identical, and operators SHOULD keep that in mind.
Turn on only the counters you need, and do not ask for updates too often, or the router gets tired.
§7Security
This document does not change the BMP security model. The security and authentication mechanisms in RFC 7854, RFC 8671 and RFC 9069 also apply to these Gauges, and the RFC adds no further security considerations other than one request. Monitored devices SHOULD be configured to rate-limit their reporting of the new Gauges.
The same locks protect the new numbers, and the router should not send them too fast.